0

How can I check the type of a property using Jena in DBpedia? For instance I would like to check the property http://www.w3.org/2000/01/rdf-schema#label is an ObjectProperty or DatatypeProperty? Could you please help me ? there is no answer in the previous questions. Thanks

  • 1
    In OWL, `http://www.w3.org/2000/01/rdf-schema#label` is neither an ObjectProperty nor a DatatypeProperty. It is an AnnotationProperty. – Antoine Zimmermann Sep 05 '18 at 08:37
  • Thanks for your reply, How I can recognize the type of property ? – Olivier rozin Sep 05 '18 at 08:43
  • by querying for the type, i.e. the `rdf:type` attached value of the entity. Note, there might also no type be attached to properties, especially in RDF data - this means, it's just of type `rdf:Property` and the values can be RDF resources and RDF literals in the same dataset. Only OWL introduced stronger types for properties. Especially, DBpedia does contain also properties starting with namespace `http://dbpedia.org/property/` - those are **not** typed, thus, neither data nor object property. – UninformedUser Sep 05 '18 at 09:14
  • In Jena, you either use SPARQL or the API to get the type of an entity (aka `Resource` resp. `Property` in Jena if you load a `Model`). IF you load an `OntModel` it's even more simple given that it represents the OWL layer of Jena. – UninformedUser Sep 05 '18 at 09:20

0 Answers0