Skip to content

Commit

Permalink
Fixed a small bug in generating the name of the target cells for
Browse files Browse the repository at this point in the history
annotations
  • Loading branch information
cgueret committed Apr 2, 2015
1 parent f50426a commit 0773f98
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/rules.py
Original file line number Diff line number Diff line change
Expand Up @@ -199,16 +199,17 @@ def _process_mapping(self, graph, activity_URI, dimension_name):
'sheet': sheet_name,
'dataset' : dataset_name}
pairs = mappings_list.get_mappings_for(literal, context_map)
cell_uri = self.conf.getURI('cedar', cell_name)
if pairs != None:
count = count + 1
# Mint URIs
annotation_URI = URIRef(cell_name + "-mapping")
annotation_URI = URIRef(cell_uri + "-mapping")
annotation_body_URI = annotation_URI + "-body"
# Add the triples
graph.add((annotation_URI, RDF.type, self.conf.getURI('oa', 'Annotation')))
graph.add((annotation_URI, RDFS.label, Literal('Mapping')))
graph.add((annotation_URI, self.conf.getURI('oa', 'hasBody'), annotation_body_URI))
graph.add((annotation_URI, self.conf.getURI('oa', 'hasTarget'), URIRef(cell)))
graph.add((annotation_URI, self.conf.getURI('oa', 'hasTarget'), cell_uri))
graph.add((annotation_URI, self.conf.getURI('oa', 'serializedAt'), self._now()))
graph.add((annotation_URI, self.conf.getURI('oa', 'serializedBy'), INTEGRATOR_URI))
graph.add((annotation_URI, self.conf.getURI('prov', 'wasGeneratedBy'), activity_URI))
Expand Down

0 comments on commit 0773f98

Please sign in to comment.