POSC-Caesar FIATECH IDS-ADI Projects

Intelligent Data Sets Accelerating Deployment of ISO15926

Realizing Open Information Interoperability


RDS/WIP sample queries in SPARQL

Contents

  1. Taxonomy
    1. 1. Get me all the subclasses of PUMP, in a table
    2. 2. Get me all subclasses of PUMP, in a typical OWL format

Using the OWL/RDF native endpoint

The triplestores that hold the OWL/RDF content of the RDS/WIP have protocol endpoints conforming to the SPARQL Protocol Recommendation from the W3C. To query it using SPARQL clients, just enter the service URI of the endpoint you're interested in, for example: http://rdl.rdlfacade.org/data is the URI of the endpoint containing classifications outside of the base part 2 data model.

(@todo consider use of word base here versus core)

Using the PCA RDL endpoint

To execute the following scripts, go to the PCA RDL SPARQL query page.

These scripts are currently demonstrated against the PCA RDL endpoint, which represents ISO 15926 definitions in a form closely related to the evolving RDS/WIP form - they give some idea of the possibilities when using SPARQL with ISO 15926.

Taxonomy

1. Get me all the subclasses of PUMP, in a table

If you wish to see what this returns right away, just click here to submit the query to the RDS/WIP.

PREFIX owl: <http://www.w3.org/2002/07/owl#>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
PREFIX dm: <http://dm.rdlfacade.org/data#>
PREFIX dc: <http://purl.org/dc/elements/1.1/>
PREFIX rdl: <http://rds.posccaesar.org/2008/06/OWL/RDL#>
PREFIX base: <http://rdl.rdlfacade.org/data>
SELECT 
  ?subclassIdPCA ?subclassDesignation 
  ?superclassIdPCA ?superclassDesignation
WHERE 
{
  ?specialization dm:hasSuperclass ?superclass .
  ?specialization dm:hasSubclass ?subclass .
  ?subclass rdl:hasIdPCA ?subclassIdPCA .
  ?subclass rdl:hasDesignation ?subclassDesignation .
  ?superclass rdl:hasIdPCA ?superclassIdPCA .
  ?superclass rdl:hasDesignation ?superclassDesignation .
  ?superclass rdl:hasDesignation "PUMP"  
}
LIMIT 100

2. Get me all subclasses of PUMP, in a typical OWL format

The following query serves to extract a (tiny) subset of the Reference Data Library, returning RDF data with rdfs:label applied for the names of the reference entitites. To see the output right away, click here. If you save the resulting page from your browser to a file, say pumps.owl, you can load it in an OWL application, such as the on-line OwlSight or the Protégé editor.

PREFIX owl: <http://www.w3.org/2002/07/owl#>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
PREFIX dm: <http://dm.rdlfacade.org/data#>
PREFIX dc: <http://purl.org/dc/elements/1.1/>
PREFIX rdl: <http://rds.posccaesar.org/2008/06/OWL/RDL#>
PREFIX base: <http://rdl.rdlfacade.org/data>
CONSTRUCT
{
  rdl:RDL_Fragment_Test a owl:Ontology .
  ?subclass a owl:Class .
  ?superclass a owl:Class .
  ?subclass rdfs:subClassOf ?superclass .
  ?subclass rdfs:label ?subclassDesignation .
  ?superclass rdfs:label ?superclassDesignation .
}
WHERE 
{
  ?specialization dm:hasSuperclass ?superclass .
  ?specialization dm:hasSubclass ?subclass .
  ?subclass rdl:hasIdPCA ?subclassIdPCA .
  ?subclass rdl:hasDesignation ?subclassDesignation .
  ?superclass rdl:hasIdPCA ?superclassIdPCA .
  ?superclass rdl:hasDesignation ?superclassDesignation .
  ?superclass rdl:hasDesignation "PUMP"  
}
limit 100

Home
About PCA
Reference Data Services (RDS)
RDS Operations Support
Meetings and Conferences
ISO 15926
Special Interest Groups
Technical Advisory Board
Norwegian Continental Shelf Std
Projects
Search