Closed justinlittman closed 5 years ago
I think it is an error to treat a DOI as a URI, instead of a literal, as we do here:
to_field RDF::Vocab::BIBO.doi.to_s, lambda { |json, accumulator|
doi = JsonPath.on(json, '$.dynamic_data.cluster_related.identifiers.identifier[?(@.type=="doi")].value').first ||
JsonPath.on(json, '$.dynamic_data.cluster_related.identifiers.identifier[?(@.type=="xref_doi")].value').first
accumulator << RDF::URI("https://doi.org/#{doi}") if doi
}, single: true
Based on BIBO, it seems this should be a literal:
<!-- http://purl.org/ontology/bibo/doi -->
<owl:DatatypeProperty rdf:about="&bibo;doi">
<rdfs:subPropertyOf rdf:resource="&bibo;identifier"/>
<rdfs:range rdf:resource="&rdfs;Literal"/>
<rdfs:domain>
<owl:Class>
<owl:unionOf rdf:parseType="Collection">
<rdf:Description rdf:about="&bibo;Collection"/>
<rdf:Description rdf:about="&bibo;Document"/>
</owl:unionOf>
</owl:Class>
</rdfs:domain>
</owl:DatatypeProperty>
I would propose that we change to a literal in the transform and then makes any necessary changes in webapp to create a link from it.
@justinlittman :+1: That makes complete sense.
Transforming a publication with a DOI containing
<
or>
results in an error.Here is an example publication that produces this error:
This results in:
Prior to writing the SPARQL statement, the writer checks whether the statement is valid.