semiotproject / wot-semdesc-helper

Semi-automatic generation of semantic description for sensing devices
0 stars 1 forks source link

Include required ontologies and write SPARQL query for getting features of interest and units of measurement #24

Closed soylent-grin closed 8 years ago

soylent-grin commented 8 years ago

Seems like not all the ontologies are included to Fuseki (for example, emtr is not - so we can not declare, for example, ssn:observes emtr:PolyphaseVoltage sensor. After that, write SPARQL query to get list of features of interest and units of measurement

soylent-grin commented 8 years ago

Where are SPARQL queries?

garayzuev commented 8 years ago

If you want to select all qudt quantity in SI you can use this:

SELECT * WHERE {
  <http://qudt.org/vocab/quantity#SystemOfQuantities_SI> <http://qudt.org/schema/qudt#systemDerivedQuantityKind> ?x.
    ?x <http://www.w3.org/2000/01/rdf-schema#rdfs:label> ?z
}

For find all units of measurement you can use next query:

SELECT ?unit ?label WHERE {
  <http://qudt.org/vocab/quantity#SystemOfQuantities_SI> <http://qudt.org/schema/qudt#systemDerivedQuantityKind>|<http://qudt.org/schema/qudt#systemBaseQuantityKind> ?x.
  ?unit <http://qudt.org/schema/qudt#quantityKind> ?x;
    <http://www.w3.org/2000/01/rdf-schema#label> ?label
}
soylent-grin commented 8 years ago

query

SELECT * WHERE {
  <http://qudt.org/vocab/quantity#SystemOfQuantities_SI> <http://qudt.org/schema/qudt#systemDerivedQuantityKind> ?x.
    ?x <http://www.w3.org/2000/01/rdf-schema#rdfs:label> ?z
}

returns zero results

garayzuev commented 8 years ago

It's a misprint. Try this:

SELECT * WHERE {
  <http://qudt.org/vocab/quantity#SystemOfQuantities_SI> <http://qudt.org/schema/qudt#systemDerivedQuantityKind> ?x.
    ?x <http://www.w3.org/2000/01/rdf-schema#label> ?z
}
KMax commented 8 years ago

I suggest a query to get the list of units which are related to a particular Property, e.g. with qudt-quantity:ThermodynamicTemperature:

SELECT ?unit ?label {
  ?unit a qudt:Unit ;
    qudt:quantityKind qudt-quantity:ThermodynamicTemperature ;
    rdfs:label ?label .
}
KMax commented 8 years ago

I think, this issue can be close and the work on incorporating these queries in the app should be continued in #22.