Skip to content
Snippets Groups Projects
Commit 0c003e7f authored by Aurélien Lamercerie's avatar Aurélien Lamercerie
Browse files

Update action extraction to deal with individual for target

parent 54e9d177
No related branches found
No related tags found
No related merge requests found
Showing
with 2917 additions and 574 deletions
...@@ -53,18 +53,28 @@ def __is_property_to_generate(property_net): ...@@ -53,18 +53,28 @@ def __is_property_to_generate(property_net):
ACTION_SPACING_CODE = '\n ' ACTION_SPACING_CODE = '\n '
# Policy URI
# -----------------------------------------------------
def __compute_policy_uri(graph, net): def __compute_policy_uri(graph, net):
structure_name = net.get_attribute_first_value(net.structure) structure_name = net.get_attribute_first_value(net.structure)
return produce_uriref(graph, f'ext-out:policy_{structure_name}') return produce_uriref(graph, f'ext-out:policy_{structure_name}')
# ODRL Rule Type URI
# -----------------------------------------------------
def __compute_odrl_rule_type_uri(graph, net): def __compute_odrl_rule_type_uri(graph, net):
naming = net.get_attribute_first_value(net.rule_relation_name) naming = net.get_attribute_first_value(net.rule_relation_name)
odrl_rule_type_uri = f'odrl:{naming}' odrl_rule_type_uri = f'odrl:{naming}'
return produce_uriref(graph, odrl_rule_type_uri) return produce_uriref(graph, odrl_rule_type_uri)
def __compute_target_ref(graph, target_net_uri): # Target Reference
# -----------------------------------------------------
def __compute_target_ref_from_class_net(graph, target_net_uri):
target_net = net.ClassNet(graph, target_net_uri) target_net = net.ClassNet(graph, target_net_uri)
individual_name = 'any' individual_name = 'any'
...@@ -74,6 +84,39 @@ def __compute_target_ref(graph, target_net_uri): ...@@ -74,6 +84,39 @@ def __compute_target_ref(graph, target_net_uri):
return f'<http://example.com/asset:{individual_name}.{class_name}>' return f'<http://example.com/asset:{individual_name}.{class_name}>'
def __compute_target_ref_from_individual_net(graph, target_net_uri):
target_net = net.IndividualNet(graph, target_net_uri)
individual_name = target_net.get_attribute_first_value(target_net.individual_label)
class_net_uri = target_net.get_attribute_first_value(target_net.mother_class_net)
class_net = net.ClassNet(graph, class_net_uri)
class_name = class_net.get_attribute_first_value(class_net.class_name)
if class_name is None: class_name = 'unknown'
return f'<http://example.com/asset:{individual_name}.{class_name}>'
def __compute_target_ref(graph, action_net):
target_ref = ''
first = True
for target_net_uri in action_net.target_class_net:
new_ref = __compute_target_ref_from_class_net(graph, target_net_uri)
target_ref = new_ref if first else f'{target_ref}, {new_ref}'
first = False
for target_net_uri in action_net.target_individual_net:
new_ref = __compute_target_ref_from_individual_net(graph, target_net_uri)
target_ref = new_ref if first else f'{target_ref}, {new_ref}'
first = False
return target_ref
# ODRL Action Code
# -----------------------------------------------------
def __compute_odrl_action_code(graph, rule_net): def __compute_odrl_action_code(graph, rule_net):
action_net_uri = rule_net.get_attribute_first_value(rule_net.rule_action_net) action_net_uri = rule_net.get_attribute_first_value(rule_net.rule_action_net)
...@@ -88,14 +131,7 @@ def __compute_odrl_action_code(graph, rule_net): ...@@ -88,14 +131,7 @@ def __compute_odrl_action_code(graph, rule_net):
first = False first = False
if action_ref != '': action_ref = f'{ACTION_SPACING_CODE} odrl:action {action_ref}' if action_ref != '': action_ref = f'{ACTION_SPACING_CODE} odrl:action {action_ref}'
target_ref = '' target_ref = __compute_target_ref(graph, action_net)
first = True
for target_net_uri in action_net.target_net:
if first:
target_ref = __compute_target_ref(graph, target_net_uri)
first = False
else:
target_ref = f'odrl:{action_ref}, {__compute_target_ref(target_net)}'
if target_ref != '': target_ref = f'{ACTION_SPACING_CODE} odrl:target {target_ref} ;' if target_ref != '': target_ref = f'{ACTION_SPACING_CODE} odrl:target {target_ref} ;'
action_string = f"""[ {target_ref} {action_ref} ]""" action_string = f"""[ {target_ref} {action_ref} ]"""
......
...@@ -169,4 +169,8 @@ def extract_atom_individual(graph): ...@@ -169,4 +169,8 @@ def extract_atom_individual(graph):
# class_net_list.append(new_class) # class_net_list.append(new_class)
rule_triple_list += triple_list rule_triple_list += triple_list
# -- Deprecation: Mother Class Net
mother_class_net = net.ClassNet(graph, pattern.classNet)
rule_triple_list += mother_class_net.deprecate()
return rule_label, rule_triple_list return rule_label, rule_triple_list
\ No newline at end of file
...@@ -49,11 +49,77 @@ def __search_target_class(graph, property_net_uri): ...@@ -49,11 +49,77 @@ def __search_target_class(graph, property_net_uri):
return query_code, result_set return query_code, result_set
def __search_target_individual(graph, property_net_uri):
select_data_list = ['?individual_net']
clause_list = [(property_net_uri, f'amr:role_ARG1', '?individual_net'),
f'?individual_net a [rdfs:subClassOf* net:Individual_Net].',
f'FILTER NOT EXISTS {{ ?individual_net a net:Deprecated_Net. }}']
query_code = generate_select_query(graph, select_data_list, clause_list)
result_set = graph.query(query_code)
return query_code, result_set
def __search_subject_class(graph, property_net_uri):
select_data_list = ['?class_net']
clause_list = [(property_net_uri, f'amr:role_ARG0', '?class_net'),
f'?class_net a [rdfs:subClassOf* net:Class_Net].',
f'FILTER NOT EXISTS {{ ?class_net a net:Deprecated_Net. }}']
query_code = generate_select_query(graph, select_data_list, clause_list)
result_set = graph.query(query_code)
return query_code, result_set
def __search_subject_individual(graph, property_net_uri):
select_data_list = ['?individual_net']
clause_list = [(property_net_uri, f'amr:role_ARG0', '?individual_net'),
f'?individual_net a [rdfs:subClassOf* net:Individual_Net].',
f'FILTER NOT EXISTS {{ ?individual_net a net:Deprecated_Net. }}']
query_code = generate_select_query(graph, select_data_list, clause_list)
result_set = graph.query(query_code)
return query_code, result_set
#============================================================================== #==============================================================================
# Useful Computation Method(s) # Useful Computation Method(s)
#============================================================================== #==============================================================================
def __compute_target_class_net(graph, net_composition, property_net_uri):
result_net_list = []
_, pattern_set = __search_target_class(graph, property_net_uri)
for pattern in pattern_set:
result_net_list.append(pattern.class_net)
net_composition.append(net.ClassNet(graph, uri=pattern.class_net))
return result_net_list if len(result_net_list) > 0 else None
def __compute_target_individual_net(graph, net_composition, property_net_uri):
result_net_list = []
_, pattern_set = __search_target_individual(graph, property_net_uri)
for pattern in pattern_set:
result_net_list.append(pattern.individual_net)
net_composition.append(net.IndividualNet(graph, uri=pattern.individual_net))
return result_net_list if len(result_net_list) > 0 else None
def __compute_assignee_class_net(graph, net_composition, property_net_uri):
result_net_list = []
_, pattern_set = __search_subject_class(graph, property_net_uri)
for pattern in pattern_set:
result_net_list.append(pattern.class_net)
net_composition.append(net.ClassNet(graph, uri=pattern.class_net))
return result_net_list if len(result_net_list) > 0 else None
def __compute_assignee_individual_net(graph, net_composition, property_net_uri):
result_net_list = []
_, pattern_set = __search_subject_individual(graph, property_net_uri)
for pattern in pattern_set:
result_net_list.append(pattern.individual_net)
net_composition.append(net.IndividualNet(graph, uri=pattern.individual_net))
return result_net_list if len(result_net_list) > 0 else None
def __filter_relation(relation_list): def __filter_relation(relation_list):
result_list = [] result_list = []
for relation in relation_list: for relation in relation_list:
...@@ -81,14 +147,10 @@ def __construct_action_net(graph, property_net): ...@@ -81,14 +147,10 @@ def __construct_action_net(graph, property_net):
# -- Data Computation # -- Data Computation
action_net.action_name = property_net.property_name action_net.action_name = property_net.property_name
action_net.target_class_net = __compute_target_class_net(graph, net_composition, property_net.uri)
target_net_list = [] action_net.target_individual_net = __compute_target_individual_net(graph, net_composition, property_net.uri)
_, target_class_pattern_set = __search_target_class(graph, property_net.uri) action_net.assignee_class_net = __compute_assignee_class_net(graph, net_composition, property_net.uri)
for pattern in target_class_pattern_set: action_net.assignee_individual_net = __compute_assignee_individual_net(graph, net_composition, property_net.uri)
target_net_list.append(pattern.class_net)
net_composition.append(net.ClassNet(graph, uri=pattern.class_net))
if len(target_net_list) > 0:
action_net.target_net = target_net_list
# -- Net Naming # -- Net Naming
action_net.naming = property_net.naming action_net.naming = property_net.naming
......
...@@ -169,4 +169,8 @@ def extract_atom_individual(graph): ...@@ -169,4 +169,8 @@ def extract_atom_individual(graph):
# class_net_list.append(new_class) # class_net_list.append(new_class)
rule_triple_list += triple_list rule_triple_list += triple_list
# -- Deprecation: Mother Class Net
mother_class_net = net.ClassNet(graph, pattern.classNet)
rule_triple_list += mother_class_net.deprecate()
return rule_label, rule_triple_list return rule_label, rule_triple_list
\ No newline at end of file
This diff is collapsed.
...@@ -34,9 +34,14 @@ class ActionNet(Net): ...@@ -34,9 +34,14 @@ class ActionNet(Net):
self.type_uri = f'net:{self.type_id}' self.type_uri = f'net:{self.type_id}'
# -- Net Attributes # -- Net Attributes
self.attr_list += ['action_name', 'target_net'] self.attr_list += ['action_name',
'target_class_net', 'target_individual_net',
'assignee_class_net', 'assignee_individual_net']
self._action_name = None self._action_name = None
self._target_net = None self._target_class_net = None
self._target_individual_net = None
self._assignee_class_net = None
self._assignee_individual_net = None
#-------------------------------------------------------------------------- #--------------------------------------------------------------------------
...@@ -55,11 +60,44 @@ class ActionNet(Net): ...@@ -55,11 +60,44 @@ class ActionNet(Net):
@property @property
def target_net(self): def target_class_net(self):
if self._target_net is None: if self._target_class_net is None:
self._target_net = self.get_value_list_from_graph('target_net') self._target_class_net = self.get_value_list_from_graph('target_class_net')
return self._target_net return self._target_class_net
@target_net.setter @target_class_net.setter
def target_net(self, new_value): def target_class_net(self, new_value):
self._target_net = self.set_attribute_value_list(new_value, produce_uriref) self._target_class_net = self.set_attribute_value_list(new_value, produce_uriref)
@property
def target_individual_net(self):
if self._target_individual_net is None:
self._target_individual_net = self.get_value_list_from_graph('target_individual_net')
return self._target_individual_net
@target_individual_net.setter
def target_individual_net(self, new_value):
self._target_individual_net = self.set_attribute_value_list(new_value, produce_uriref)
@property
def assignee_class_net(self):
if self._assignee_class_net is None:
self._assignee_class_net = self.get_value_list_from_graph('assignee_class_net')
return self._assignee_class_net
@assignee_class_net.setter
def assignee_class_net(self, new_value):
self._assignee_class_net = self.set_attribute_value_list(new_value, produce_uriref)
@property
def assignee_individual_net(self):
if self._assignee_individual_net is None:
self._assignee_individual_net = self.get_value_list_from_graph('assignee_individual_net')
return self._assignee_individual_net
@assignee_individual_net.setter
def assignee_individual_net(self, new_value):
self._assignee_individual_net = self.set_attribute_value_list(new_value, produce_uriref)
...@@ -78,7 +78,10 @@ class SemanticNetReferenceHandle: ...@@ -78,7 +78,10 @@ class SemanticNetReferenceHandle:
# Action Net # Action Net
'action_name': 'hasActionName', 'action_name': 'hasActionName',
'target_net': 'hasTargetNet', 'target_class_net': 'hasTargetClassNet',
'target_individual_net': 'hasTargetIndividualNet',
'assignee_class_net': 'hasAssigneeClassNet',
'assignee_individual_net': 'hasAssigneeIndividualNet',
# Rule Net # Rule Net
'rule_relation_name': 'hasRuleRelationName', 'rule_relation_name': 'hasRuleRelationName',
......
...@@ -642,27 +642,20 @@ net:Value_Net a owl:Class ; ...@@ -642,27 +642,20 @@ net:Value_Net a owl:Class ;
net:action_use_u a net:Action_Net ; net:action_use_u a net:Action_Net ;
net:composeFrom net:atomClass_movie_m, net:composeFrom net:atomClass_movie_m,
net:atomProperty_use_u ; net:atomProperty_use_u,
net:individual_9898_m ;
net:coverBaseNode :leaf_use-01_u ; net:coverBaseNode :leaf_use-01_u ;
net:coverNode :leaf_movie_m, net:coverNode :leaf_movie_m,
:leaf_use-01_u ; :leaf_use-01_u ;
net:hasActionName "use" ; net:hasActionName "use" ;
net:hasNaming "use" ; net:hasNaming "use" ;
net:hasStructure "document-01" ; net:hasStructure "document-01" ;
net:hasTargetNet net:atomClass_movie_m . net:hasTargetClassNet net:atomClass_movie_m ;
net:hasTargetIndividualNet net:individual_9898_m .
net:has_value a owl:AnnotationProperty ; net:has_value a owl:AnnotationProperty ;
rdfs:subPropertyOf net:netProperty . rdfs:subPropertyOf net:netProperty .
net:individual_9898_m a net:Individual_Net ;
:role_name net:value_9898_blankNode ;
net:coverBaseNode :leaf_movie_m ;
net:coverNode :leaf_movie_m ;
net:hasIndividualLabel "9898" ;
net:hasMotherClassNet net:atomClass_movie_m ;
net:hasNaming "9898" ;
net:hasStructure "document-01" .
net:objectType a owl:AnnotationProperty ; net:objectType a owl:AnnotationProperty ;
rdfs:label "object type" ; rdfs:label "object type" ;
rdfs:subPropertyOf net:objectProperty . rdfs:subPropertyOf net:objectProperty .
...@@ -803,6 +796,15 @@ net:has_relation_value a owl:AnnotationProperty ; ...@@ -803,6 +796,15 @@ net:has_relation_value a owl:AnnotationProperty ;
rdfs:label "has relation value" ; rdfs:label "has relation value" ;
rdfs:subPropertyOf net:has_object . rdfs:subPropertyOf net:has_object .
net:individual_9898_m a net:Individual_Net ;
:role_name net:value_9898_blankNode ;
net:coverBaseNode :leaf_movie_m ;
net:coverNode :leaf_movie_m ;
net:hasIndividualLabel "9898" ;
net:hasMotherClassNet net:atomClass_movie_m ;
net:hasNaming "9898" ;
net:hasStructure "document-01" .
:AMR_Element a owl:Class ; :AMR_Element a owl:Class ;
rdfs:subClassOf :AMR_Structure . rdfs:subClassOf :AMR_Structure .
......
...@@ -675,27 +675,21 @@ net:Value_Net a owl:Class ; ...@@ -675,27 +675,21 @@ net:Value_Net a owl:Class ;
net:action_play_p a net:Action_Net ; net:action_play_p a net:Action_Net ;
net:composeFrom net:atomClass_movie_m, net:composeFrom net:atomClass_movie_m,
net:atomProperty_play_p ; net:atomProperty_play_p,
net:individual_John_p2 ;
net:coverBaseNode :leaf_play-02_p ; net:coverBaseNode :leaf_play-02_p ;
net:coverNode :leaf_movie_m, net:coverNode :leaf_movie_m,
:leaf_person_p2,
:leaf_play-02_p ; :leaf_play-02_p ;
net:hasActionName "play" ; net:hasActionName "play" ;
net:hasAssigneeIndividualNet net:individual_John_p2 ;
net:hasNaming "play" ; net:hasNaming "play" ;
net:hasStructure "document-02" ; net:hasStructure "document-02" ;
net:hasTargetNet net:atomClass_movie_m . net:hasTargetClassNet net:atomClass_movie_m .
net:has_value a owl:AnnotationProperty ; net:has_value a owl:AnnotationProperty ;
rdfs:subPropertyOf net:netProperty . rdfs:subPropertyOf net:netProperty .
net:individual_John_p2 a net:Individual_Net ;
:role_name net:value_John_blankNode ;
net:coverBaseNode :leaf_person_p2 ;
net:coverNode :leaf_person_p2 ;
net:hasIndividualLabel "John" ;
net:hasMotherClassNet net:atomClass_person_p2 ;
net:hasNaming "John" ;
net:hasStructure "document-02" .
net:objectType a owl:AnnotationProperty ; net:objectType a owl:AnnotationProperty ;
rdfs:label "object type" ; rdfs:label "object type" ;
rdfs:subPropertyOf net:objectProperty . rdfs:subPropertyOf net:objectProperty .
...@@ -833,6 +827,15 @@ net:has_relation_value a owl:AnnotationProperty ; ...@@ -833,6 +827,15 @@ net:has_relation_value a owl:AnnotationProperty ;
rdfs:label "has relation value" ; rdfs:label "has relation value" ;
rdfs:subPropertyOf net:has_object . rdfs:subPropertyOf net:has_object .
net:individual_John_p2 a net:Individual_Net ;
:role_name net:value_John_blankNode ;
net:coverBaseNode :leaf_person_p2 ;
net:coverNode :leaf_person_p2 ;
net:hasIndividualLabel "John" ;
net:hasMotherClassNet net:atomClass_person_p2 ;
net:hasNaming "John" ;
net:hasStructure "document-02" .
net:value_John_blankNode a net:Value_Net ; net:value_John_blankNode a net:Value_Net ;
net:coverAmrValue :value_John ; net:coverAmrValue :value_John ;
net:hasNaming "John" ; net:hasNaming "John" ;
...@@ -907,11 +910,6 @@ rdf:Property a owl:Class . ...@@ -907,11 +910,6 @@ rdf:Property a owl:Class .
:hasConcept :concept_movie ; :hasConcept :concept_movie ;
:hasVariable :variable_m . :hasVariable :variable_m .
:leaf_person_p2 a :AMR_Leaf ;
:edge_p2_name_John :value_John ;
:hasConcept :concept_person ;
:hasVariable :variable_p2 .
:leaf_play-02_p a :AMR_Leaf ; :leaf_play-02_p a :AMR_Leaf ;
:edge_p_ARG0_p2 :leaf_person_p2 ; :edge_p_ARG0_p2 :leaf_person_p2 ;
:edge_p_ARG1_m :leaf_movie_m ; :edge_p_ARG1_m :leaf_movie_m ;
...@@ -928,6 +926,11 @@ net:has_object a owl:AnnotationProperty ; ...@@ -928,6 +926,11 @@ net:has_object a owl:AnnotationProperty ;
:AMR_Op_Role a owl:Class ; :AMR_Op_Role a owl:Class ;
rdfs:subClassOf :AMR_Role . rdfs:subClassOf :AMR_Role .
:leaf_person_p2 a :AMR_Leaf ;
:edge_p2_name_John :value_John ;
:hasConcept :concept_person ;
:hasVariable :variable_p2 .
:AMR_AnnotationProperty a owl:AnnotationProperty . :AMR_AnnotationProperty a owl:AnnotationProperty .
:AMR_Core_Role a owl:Class ; :AMR_Core_Role a owl:Class ;
......
...@@ -662,15 +662,6 @@ net:Individual_Net a owl:Class ; ...@@ -662,15 +662,6 @@ net:Individual_Net a owl:Class ;
net:has_value a owl:AnnotationProperty ; net:has_value a owl:AnnotationProperty ;
rdfs:subPropertyOf net:netProperty . rdfs:subPropertyOf net:netProperty .
net:individual_John_p2 a net:Individual_Net ;
:role_name net:value_John_blankNode ;
net:coverBaseNode :leaf_person_p2 ;
net:coverNode :leaf_person_p2 ;
net:hasIndividualLabel "John" ;
net:hasMotherClassNet net:atomClass_person_p2 ;
net:hasNaming "John" ;
net:hasStructure "document-03" .
net:objectType a owl:AnnotationProperty ; net:objectType a owl:AnnotationProperty ;
rdfs:label "object type" ; rdfs:label "object type" ;
rdfs:subPropertyOf net:objectProperty . rdfs:subPropertyOf net:objectProperty .
...@@ -791,14 +782,17 @@ net:Value_Net a owl:Class ; ...@@ -791,14 +782,17 @@ net:Value_Net a owl:Class ;
net:action_play_p a net:Action_Net ; net:action_play_p a net:Action_Net ;
net:composeFrom net:atomClass_movie_m, net:composeFrom net:atomClass_movie_m,
net:atomProperty_play_p ; net:atomProperty_play_p,
net:individual_John_p2 ;
net:coverBaseNode :leaf_play-01_p ; net:coverBaseNode :leaf_play-01_p ;
net:coverNode :leaf_movie_m, net:coverNode :leaf_movie_m,
:leaf_person_p2,
:leaf_play-01_p ; :leaf_play-01_p ;
net:hasActionName "play" ; net:hasActionName "play" ;
net:hasAssigneeIndividualNet net:individual_John_p2 ;
net:hasNaming "play" ; net:hasNaming "play" ;
net:hasStructure "document-03" ; net:hasStructure "document-03" ;
net:hasTargetNet net:atomClass_movie_m . net:hasTargetClassNet net:atomClass_movie_m .
net:objectProperty a owl:AnnotationProperty ; net:objectProperty a owl:AnnotationProperty ;
rdfs:label "object attribute" . rdfs:label "object attribute" .
...@@ -851,6 +845,15 @@ net:has_relation_value a owl:AnnotationProperty ; ...@@ -851,6 +845,15 @@ net:has_relation_value a owl:AnnotationProperty ;
rdfs:label "has relation value" ; rdfs:label "has relation value" ;
rdfs:subPropertyOf net:has_object . rdfs:subPropertyOf net:has_object .
net:individual_John_p2 a net:Individual_Net ;
:role_name net:value_John_blankNode ;
net:coverBaseNode :leaf_person_p2 ;
net:coverNode :leaf_person_p2 ;
net:hasIndividualLabel "John" ;
net:hasMotherClassNet net:atomClass_person_p2 ;
net:hasNaming "John" ;
net:hasStructure "document-03" .
net:value_John_blankNode a net:Value_Net ; net:value_John_blankNode a net:Value_Net ;
net:coverAmrValue :value_John ; net:coverAmrValue :value_John ;
net:hasNaming "John" ; net:hasNaming "John" ;
...@@ -937,11 +940,6 @@ rdf:Property a owl:Class . ...@@ -937,11 +940,6 @@ rdf:Property a owl:Class .
:AMR_Edge a owl:Class ; :AMR_Edge a owl:Class ;
rdfs:subClassOf :AMR_Structure . rdfs:subClassOf :AMR_Structure .
:leaf_person_p2 a :AMR_Leaf ;
:edge_p2_name_John :value_John ;
:hasConcept :concept_person ;
:hasVariable :variable_p2 .
:leaf_play-01_p a :AMR_Leaf ; :leaf_play-01_p a :AMR_Leaf ;
:edge_p_ARG0_p2 :leaf_person_p2 ; :edge_p_ARG0_p2 :leaf_person_p2 ;
:edge_p_ARG1_m :leaf_movie_m ; :edge_p_ARG1_m :leaf_movie_m ;
...@@ -958,6 +956,11 @@ net:has_object a owl:AnnotationProperty ; ...@@ -958,6 +956,11 @@ net:has_object a owl:AnnotationProperty ;
:AMR_Op_Role a owl:Class ; :AMR_Op_Role a owl:Class ;
rdfs:subClassOf :AMR_Role . rdfs:subClassOf :AMR_Role .
:leaf_person_p2 a :AMR_Leaf ;
:edge_p2_name_John :value_John ;
:hasConcept :concept_person ;
:hasVariable :variable_p2 .
:AMR_AnnotationProperty a owl:AnnotationProperty . :AMR_AnnotationProperty a owl:AnnotationProperty .
:AMR_Core_Role a owl:Class ; :AMR_Core_Role a owl:Class ;
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
...@@ -138,6 +138,8 @@ if __name__ == '__main__': ...@@ -138,6 +138,8 @@ if __name__ == '__main__':
print('\n *** Unit Test ***') print('\n *** Unit Test ***')
test_rule_application(TEST_FILE_NAME_1, graph_1, rule.generate_odrl_rule) test_rule_application(TEST_FILE_NAME_1, graph_1, rule.generate_odrl_rule)
test_rule_application(TEST_FILE_NAME_2, graph_2, rule.generate_odrl_rule)
test_rule_application(TEST_FILE_NAME_3, graph_3, rule.generate_odrl_rule)
print('\n \n') print('\n \n')
print('\n *** - ***') print('\n *** - ***')
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment