GeoSciml RDF encoding 104th OGC Technical Committee Southampton, United Kingdom Eric Boisvert 12 September 2017
ShapeChange RDF/OWL ShapeChange (Interactive Instruments Gmbh) has several transformation tools GeoSciML XSD created by SC Has RDF/OWL and JSON Based on configuration files No need to change the UML Transformation artefacts in SVN https://www.seegrid.csiro.au/subversion/GeoSciML/trunk/ontology Actual ontology in /ontology/out/INPUT Although RDX/XML is similar to GeoSciML XML, not identical
Various representations RDF/XML <rdf:Description rdf:about="http://host.com/id/../Contact/1232 "> <rdf:type rdf:resource=“gsmlb:Contact"/> <gsmlb:contactType rdf:resource=" http://resource.geosciml.org/classifier/cgi/contacttype/conformable_contact"/> <gsmlb:Contact rdf:about="http://host.com/id/../Contact/1232 "> <gsmlb:contactType rdf:resource=" http://resource.geosciml.org/classifier/cgi/contacttype/conformable_contact"/> <http://host.com/id/../Contact/1232> a gsmlb:Contact; gsml:contactType <http://resource.geosciml.org/classifier/cgi/contacttype/conformable_contact>. Turtle (ttl) <http://host.com/id/../Contact/1232> rdf:type <http://host.com/def/../gsmlb:Contact>; <http://host.com/def/../contactType> <http://resource.geosciml.org/classifier/cgi/contacttype/conformable_contact>.
Difference between RDF and XSD News Break GML1 was defined in RDF ! Order is not important Gml:identifier is now rdf:about <rdf:Description rdf:about="http://data.bgs.ac.uk/id/Lexicon/NamedRockUnit/INV"> <rdf:type rdf:resource=“gsml:GeologyUnit”/> <gsmlb:GeologicUnit rdf:about="http://data.bgs.ac.uk/id/Lexicon/NamedRockUnit/INV"> No “xlink:href” <gsmlb:classifier rdf:resource="http://data.bgs.ac.uk/ref/EngineeringGeologyTheme/strongSandstone"/> If you need a human readable label, assign it to the resource (multilingual !) (note, no need for a full skos:Concept) <rdf:Description rdf:about="http://data.bgs.ac.uk/ref/EngineeringGeologyTheme/strongSandstone"> <rdfs:label xml:lang="en">Strong Sandstrone</rdfs:label> <rdfs:label xml:lang="fr">Grès solide</rdfs:label>
Difference between RDF and XSD Can be partitionned <rdf:Description rdf:about="http://data.bgs.ac.uk/id/Lexicon/NamedRockUnit/INV"> <rdf:type rdf:resource=“gsml:GeologyUnit”/> (…) <gsmlb:GeologicUnit rdf:about="http://data.bgs.ac.uk/id/Lexicon/NamedRockUnit/INV"> <gsmlb:occurrence rdf:resource=“http://host.com/features/123“/> </gsmlb:GeologicUnit> Literals can be properties or attributes <rdf:Description rdf:about=http://data.bgs.ac.uk/id/Lexicon/NamedRockUnit/INV rdf:type rdf:type=“gsml:GeologyUnit”/>
Difference between RDF and XSD XML Literals <gsmlbh:boreholeLength rdf:parseType=“Literal"> <swe:Quantity> <swe:uom code="m" xlink:href="http://www.opengis.net/def/uom/OGC/1.0/metre" xlink:title="metre"/> <swe:value>245.0</swe:value> </swe:Quantity> </gsmlbh:boreholeLength>
Global property names Properties are first class citizen in RDF – unlike UML Vocabulary of properties classes can pick from Concerns over unicity of property names gsmlb:GeologicUnitHierarchy.role a owl:ObjectProperty ; rdfs:domain gsmlb:GeologicUnitHierarchy ; rdfs:range owl:Class ; gsmlb:azimuth a owl:ObjectProperty ; rdfs:domain gsmlb:GSML_PlanarOrientation ; rdfs:range swe:QuantityRange ;
Property constraints There are two ways (?) to constrain a property owner rdfs:domain The domain (the subject of the predicate) must be this class (or a subtype) Close to how UML does it gsmlb:azimuth a owl:ObjectProperty ; rdfs:domain gsmlb:GSML_PlanarOrientation ; rdfs:range swe:QuantityRange ; owl:Restriction Property reusable, but when this class uses this property, all the values must be such and such (similar, but more flexible – ie: cardinality) The second one make the property reusable. Because the XSD way to do the same thing is to have a propertyType AND an instance in the scope of the the class gsmlb:GSML_PlanarOrientation a owl:Class ; rdfs:subClassOf gsmlb:GSML_GeometricDescriptionValue ; (...) rdfs:subClassOf [ a owl:Restriction ; owl:allValuesFrom swe:QuantityRange ; owl:onProperty gsmlb:azimuth ] . Close to how XSD does it ?
Vocabularies <<CodeList>> mapped to “skos:Concept” so, it’s a resource, not a string gsmlb:contactType a owl:ObjectProperty ; rdfs:range skos:Concept ; skos:definition "The property <font <http://host.com/id/../Contact/1232> gsml:contactType <http://resource.geosciml.org/classifier/cgi/contacttype/conformable_contact>. <http://resource.geosciml.org/classifier/cgi/contacttype/conformable_contact> skos:preLabel “Conformable Contact”@en, “Contact conforme”@fr.
Dependencies O&M Sampling Features Geometries GeoSPARQL ontology Metadata « 19115-3 » Used 19115:2003 () SWE Common (eg: swe:Quantity) GML Temporal THORS and GTS Maybe use XML Literals ? Blank nodes ?
JSON Only ESRI Geoservice JSON is implemented + extra Only 2 options based on property cardinality Extended Simple Simple is targetting “flat” model (ie, lite) and it map 1..* properties to Property-1 Property-2 Property-3 Will also turn complex content into “.” (dot) notation
JSON Simple has limitations complex simple or
JSON-LD Adding a @context at the beginning of the document maps the JSON property to a proper Qualified Name It’s an instance thing, it maps to a schema (ie: RDF – or other – sorry James, you were right)
JSON-LD from ELFIE { "@context": { "sosa": "http://www.w3.org/ns/sosa/", "time": "http://www.w3.org/2006/time#", "hasFeatureOfInterest": { "@id": "sosa:hasFeatureOfInterest", "@type": "@id" }, "hasResult": "sosa:hasResult", "madeBySensor": { "@id": "sosa:madeBySensor", "observedProperty": { "@id": "sosa:observedProperty", "phenomenonTime": "sosa:phenomenonTime", "hasBeginning": "time:hasBeginning", "hasEnd": "time:hasEnd", "resultTime": "sosa:resultTime", "usedProcedure": { "@id": "sosa:usedProcedure", }