You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
"""Mapper Class for creating Rule based yarrrml mappings for data metadata to link to a knowledge graph.
216
+
"""Mapper Class for creating Rule based yarrrml mappings for data metadata to link to a template knowledge graph.
239
217
240
218
Args:
241
-
data_url (AnyUrl): Url to metadata describing the data to link
242
-
method_url (AnyUrl): Url to knowledgegraph describing context to link data to.
243
-
method_subject_super_class_uris (List[URIRef], optional): List of rdflib URIRef objects defining classes to query for as subjects of the mapping rules. Defaults to [InformtionContentEntity,TemporalRegionClass].
219
+
data_url (str): URL to metadata describing the data to link
220
+
template_url (str): URL to template knowledge graph describing context to link data to
221
+
use_template_rowwise (bool): Whether to duplicate the template for each data row
222
+
template_object_types (List[URIRef], optional): List of URIRef objects defining classes to query for as objects in the template graph. Defaults to [InformtionContentEntity,TemporalRegionClass].
244
223
mapping_predicate_uri (URIRef, optional): Object property to use as predicate to link. Defaults to ContentToBearingRelation.
245
-
data_object_super_class_uris (List[URIRef], optional): List of rdflib URIRef objects defining classes to query for as objects of the mapping rules. Defaults to [OA.Annotation,CSVW.Column].
246
-
subjects (List[URIRef], optional): List of rdflib URIRef objects which are individuals in the data metadata. Defaults to [].
247
-
objects (List[URIRef], optional): List of rdflib URIRef objects which are individuals in the knowledge grph. Defaults to [].
248
-
maplist (List[Tuple[str, str]], optional): List of pairs of individual name of objects in knowledge graph and labels of indivuals in data metadata to create mapping rules for. Defaults to [].
249
-
authorization (str): Json strint to use as Authorization Header on requests to external urls.
224
+
data_subject_types (List[URIRef], optional): List of URIRef objects defining classes to query for as subjects in the data metadata. Defaults to [OA.Annotation,CSVW.Column].
225
+
subjects (dict, optional): Dict of subject individuals from data metadata. Defaults to [].
226
+
objects (dict, optional): Dict of object individuals from template knowledge graph. Defaults to [].
227
+
maplist (List[Tuple[str, str]], optional): List of pairs mapping object names in template to subject IDs in data. Defaults to [].
228
+
authorization (str, optional): Authorization Header value for requests to external URLs.
250
229
"""
251
230
logging.info(
252
231
"Following Namespaces available to Mapper: {}".format(ontologies.keys())
253
232
)
254
233
self.data_url=data_url
255
-
self.method_url=method_url
234
+
self.template_url=template_url
256
235
self.use_template_rowwise=use_template_rowwise
257
236
self.mapping_predicate_uri=mapping_predicate_uri
258
237
self.authorization=authorization
259
238
logging.debug("checking objects and subjects populated")
0 commit comments