Closed bigerl closed 4 years ago
suggested solutions:
<owl:Class rdf:about="#uniqueID12345">
<rdf:label>(Block1 ⊓ Punching)</rdf:label>
<rdfs:subClassOf rdf:resource="http://www.w3.org/2002/07/owl#Thing"/>
<owl:equivalentClass>
<owl:Class>
<owl:intersectionOf rdf:parseType="Collection">
<rdf:Description rdf:about="http://siemens.com/knowledge_graph/cyber_physical_systems/sma/product#Block1"/>
<rdf:Description rdf:about="#Punching"/>
</owl:intersectionOf>
</owl:Class>
</owl:equivalentClass>
</owl:Class>
Please be aware of this most specifically section 8. That being said, if the suggestion satisfy both of you @bigerl, @renespeck, I could do the necessary modificaiton less than an hour.
However, would you please @bigerl elaborate on how to create a unique sequence of characters to create "#uniqueID12345 "?
However, would you please @bigerl elaborate on how to create a unique sequence of characters to create "#uniqueID12345 "?
1. Is it a valid and unique URI ?
lets say you have the string
x:str = "(Block1 ⊓ Punching)"
then a unique sequence of characters would be
url_suffix:str = "#{}".format(hash(x))
that should do it.
Where I am currently not completely sure is whether we need the "#" in the string or if it is already in the prefix. But that is easily found out when running it once through Jena. If it results in "##" being in the URI, we don't need it. Anyways, changing it would then be literally a once-character-change commit.
This issue has been solved as described in https://github.com/dice-group/OntoPy/issues/38. If the invalid serialization seem to occur again, please reopen this issue.
enriching a KB currently produces invalid RDF, e.g.
Looking at what the first line means:
By RDF/XML definition it should be an URI not a string label:
Semnatics are explained here: https://www.w3.org/TR/rdf-syntax-grammar/#section-Syntax-typed-nodes
All in all, that means, it parses to
And
http://siemens.com/knowledge_graph/cyber_physical_systems/sma/processI-00076-ex#(Block1 ⊓ Punching)
is no valid URI and thus it is invalid RDF.