Imagine you are querying a data source via an SPARQL endpoint and you want to know if the underlying representation of this data source is OWL or RDF/XML. Is there anyway that you would be able to do that via a SPARQL query? My personal line of thought was to write a query that uses one of the OWL properties and see if that returns any result, however the disadvantage of using such approach is that if you use an OWL property that doesn't appear in the data source even if the underlying representation is OWL you would not get a response. The assumption here is that your don't have access to the schema.
相关问题
- Creating a SPARQL parameterized query using append
- Getting list of persons using SPARQL dbpedia
- How can I optimize a SPARQL query that returns opt
- Calculate the depth of subclass in the OWL ontolog
- How to get the terminal leaves of a Wikipedia root
相关文章
- RDF libraries for Scala [closed]
- The difference between blank nodes and variables i
- How to display alert box when no json value is giv
- How to turn a SPARQL/SPIN query/rule into an RDF s
- Triple extraction from a sentance
- Meaning of owl:hasValue?
- boundary for arbitrary property path in SPARQL 1.1
- boundary for arbitrary property path in SPARQL 1.1
I think an interesting approach to this would be to write a query that gets all the triples that involve some of the reserved URIs for the schema languages that you're concerned with, which should hopefully give you the schema or ontology. E.g., §2.4 IRIs from the OWL specification gives a list of reserved IRIs for OWL. A query like this would hopefully give you most of the information that you need:
Similarly, you might use one like this the following for extracting RDFS schemata. The list of reserved properties here is based on §6. RDF Schema summary (Informative) from the RDFS recommendation. I removed
rdf:type
, though, because there'd always be lots of it.If you run both of these queries against a dataset you can probably make an educated guess about how the data is structured. Note that many of the RDFS properties are also used by OWL, so a rough heuristic might be: