Using the principles of translation shown before, the techniques used will be illustrated on the the ‘Experiment’ object of the ReSpechTh specification.
This example not only illustrates the general procedure of converting all the information within the specification to a usable and searchable ontology.
In addition, this example also illustrates a technique on how conditional information can be handled. Though the specification appears to be one type of object, there are conditional elements that indicate that more than one type of object is being refered to. For example, the statement in the specification
‘ignitionType – M/N; see element def.’
indicates that there are some implicit conditions that have to be met.
Below is the specification as it appears in the document

Annotations
There are three standard annotations that are common to all objects:
- dcterms:identifer: This is the XML label of the object
- rdfs:comment: This is the full text found in the description
- rdfs:label: This is a label, usually similar to the identifier, meant to be used as a label in a button or field.


Each of the children elements has a corresponding ontology object. In the list above you see all the elements with the exception of ‘ignitionType’ and ‘timeshift’. This is because these have some conditions, ‘see element def.’. The interpretation of this follows below.
Children
The children are pointed to by the ‘has member’ predicate. In the RDF triple ontology language of
Subject -> Predicate -> Object
A particular child would be:
'Experiment'->'has mandatory member'->'Bibliographic Link'

The interpretation of the ‘see element def.’ results in three subclasses of the ‘experiment’ element. All are derived from/related to the top ‘experiment’ class. However, implicit in the specification is the description of three different ‘experiment’ objects. The reasoning is explained below.
ignitionType: M/N (see element def.)
In the ‘ignitionType’ element description, the first sentence is:
An ignitionType element describes how the ignition delay was defined in an ignition delay measurement file. It is mandatory in such a file and non handled otherwise.
This is interpreted in the following way. If the experiment is is a ‘ignition delay measurement file’, then it has the ‘ignition type’ with the annotation ‘Mandatory’. The ‘TimeShift’ element is annotated with ‘Non-Handled’.
The figure shows that the ‘Experiment Ignition Delay Measurement’ object inherits all the elements from the ‘Experiment’ object. This class has the two extra objects ‘ignition type’ and ‘timeshift’ with the appropriate annotations.
Similarly with time shift.


This is the result of the query to determine all the children of all the classes of ‘experiment’
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX owl: <http://www.w3.org/2002/07/owl#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
PREFIX respecth: <http://esblurock.info/respecth#>
PREFIX dtype: <http://www.linkedmodel.org/schema/dtype#>
PREFIX dcterms: <http://purl.org/dc/terms/>
SELECT ?subject ?p ?ans
WHERE { ?subject rdfs:subClassOf* respecth:RespecthExperiment .
?subject rdfs:subClassOf ?restriction .
?restriction owl:onProperty ?p .
?restriction owl:onClass ?ans .
FILTER(?p = respecth:hasMandatoryMember || ?p = respecth:hasOptionalMember || ?p = respecth:hasNonHandledMember) .
}
ORDER BY str(?subject)
To determine the top element of the hierarchy, in this case ‘experiment’, the following SPARQL can be:
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX owl: <http://www.w3.org/2002/07/owl#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
PREFIX respecth: <http://esblurock.info/respecth#>
PREFIX dtype: <http://www.linkedmodel.org/schema/dtype#>
PREFIX dcterms: <http://purl.org/dc/terms/>
SELECT DISTINCT ?subject
WHERE { ?subject dcterms:identifier "experiment"^^xsd:string .
?subject rdfs:subClassOf ?parent .
OPTIONAL{?parent dcterms:identifier ?id } .
?parent rdf:type ?type .
FILTER(?type != owl:Restriction && ( !BOUND(?id) || ?id != "experiment"^^xsd:string))
}
To find the leaf nodes of a hierarchy of related, meaning the same element name (dcterms:identifier in the ontology):
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX owl: <http://www.w3.org/2002/07/owl#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
PREFIX respecth: <http://esblurock.info/respecth#>
PREFIX dtype: <http://www.linkedmodel.org/schema/dtype#>
PREFIX dcterms: <http://purl.org/dc/terms/>
SELECT ?subject ?subclass ?id
WHERE { ?subject dcterms:identifier “experiment”^^xsd:string .
OPTIONAL {?subclass rdfs:subClassOf ?subject} .
FILTER (!Bound(?subclass))
}
Given a leaf node, all the children and attributes can be found with:
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX owl: <http://www.w3.org/2002/07/owl#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
PREFIX respecth: <http://esblurock.info/respecth#>
PREFIX dtype: <http://www.linkedmodel.org/schema/dtype#>
PREFIX dcterms: <http://purl.org/dc/terms/>
SELECT ?subject ?classtype
WHERE { respecth:ExperimentTimeSpeciesProfile rdfs:subClassOf* ?subject .
?subject rdf:type ?classtype .
FILTER( ?classtype = owl:Restriction )
}
The members or properties can be found with the following addition to the above command:
SELECT ?subject ?predicate ?prop
WHERE { respecth:ExperimentTimeSpeciesProfile rdfs:subClassOf* ?subject .
?subject rdf:type ?classtype .
?subject owl:onProperty ?predicate .
OPTIONAL {?subject owl:onClass ?prop } .
OPTIONAL {?subject owl:someValuesFrom ?prop } .
}

