account for ridiculousness of original coverage
@@ -58,13 +58,18 @@ class OriginalCoverage(AbstractMetaDataElement):
type = type.split('/')[-1]
value_dict = {}
datum = ''
+ projection_string_text = ''
for key_value in value.split("; "):
k, v = key_value.split("=")
if k == 'datum':
datum = v
+ elif k == 'projection_string':
+ projection_string_text = v
+ elif k == 'projection_name':
+ value_dict['projection'] = v
else:
value_dict[k] = v
- OriginalCoverage.create(projection_string_type=type, projection_string_text=value_dict, datum=datum, content_object=content_object)
+ OriginalCoverage.create(projection_string_type=type, projection_string_text=projection_string_text, _value=value_dict, datum=datum, content_object=content_object)
def rdf_triples(self, subject, graph):
@@ -74,8 +79,12 @@ class OriginalCoverage(AbstractMetaDataElement):
graph.add((coverage, RDF.type, DCTERMS_type))
value_dict = {}
for k, v in self.value.items():
+ if k == 'projection':
+ value_dict['projection_name'] = v
+ else:
value_dict[k] = v
value_dict['datum'] = self.datum
+ value_dict['projection_string'] = self.projection_string_text
value_string = "; ".join(["=".join([key, str(val)]) for key, val in value_dict.items()])
graph.add((coverage, RDF.value, Literal(value_string)))
