@@ -2112,8 +2112,12 @@ def mapping_parser(mapping_file):
21122112 ?_object_map rml:parentTriplesMap ?object_parent_triples_map .
21132113 OPTIONAL {
21142114 ?_object_map rml:joinCondition ?join_condition .
2115- ?join_condition rml:child ?child_value;
2116- rml:parent ?parent_value.
2115+ OPTIONAL{?join_condition rml:child ?child_value.}
2116+ OPTIONAL{?join_condition rml:parent ?parent_value.}
2117+ OPTIONAL{?join_condition rml:childMap ?childMap.
2118+ OPTIONAL{?childMap rml:reference ?child_reference.}
2119+ OPTIONAL{?childMap rml:template ?child_template.}
2120+ OPTIONAL{?childMap rml:constant ?child_constant.}}
21172121 OPTIONAL{?parent_value rml:functionExecution ?executed_parent .
21182122 ?executed_parent rml:function ?parent_function .}
21192123 OPTIONAL{?child_value rml:functionExecution ?executed_child .
@@ -6508,22 +6512,25 @@ def semantify_file(triples_map, triples_map_list, delimiter, output_file_descrip
65086512 if predicate_object_map.object_map.parent != None:
65096513 if (triples_map_element.triples_map_id + "_" + child_list(
65106514 predicate_object_map.object_map.child)) not in join_table:
6511- with open(str(triples_map_element.data_source),
6512- "r") as input_file_descriptor:
6513- if str(triples_map_element.file_format).lower() == "csv":
6514- parent_data = csv.DictReader(input_file_descriptor,
6515- delimiter=delimiter)
6516- hash_maker_list(parent_data, triples_map_element,
6517- predicate_object_map.object_map)
6518- else:
6519- parent_data = json.load(input_file_descriptor)
6520- if isinstance(parent_data, list):
6515+ if "RMLView" in triples_map_element.file_format:
6516+ hash_maker(data, triples_map_element,predicate_object_map.object_map,"", triples_map_list)
6517+ else:
6518+ with open(str(triples_map_element.data_source),
6519+ "r") as input_file_descriptor:
6520+ if str(triples_map_element.file_format).lower() == "csv":
6521+ parent_data = csv.DictReader(input_file_descriptor,
6522+ delimiter=delimiter)
65216523 hash_maker_list(parent_data, triples_map_element,
65226524 predicate_object_map.object_map)
65236525 else:
6524- hash_maker_list(parent_data[list(parent_data.keys())[0]],
6525- triples_map_element,
6526- predicate_object_map.object_map)
6526+ parent_data = json.load(input_file_descriptor)
6527+ if isinstance(parent_data, list):
6528+ hash_maker_list(parent_data, triples_map_element,
6529+ predicate_object_map.object_map)
6530+ else:
6531+ hash_maker_list(parent_data[list(parent_data.keys())[0]],
6532+ triples_map_element,
6533+ predicate_object_map.object_map)
65276534 if sublist(predicate_object_map.object_map.child, row.keys()):
65286535 if child_list_value(predicate_object_map.object_map.child, row) in \
65296536 join_table[triples_map_element.triples_map_id + "_" + child_list(
0 commit comments