[TASK] Prepare for integration of background knowledge
This commit is contained in:
parent
018f54ea1c
commit
6d2c90ef96
|
@ -0,0 +1,33 @@
|
|||
<?xml version="1.0"?>
|
||||
<rdf:RDF
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
|
||||
xmlns:owl="http://www.w3.org/2002/07/owl#"
|
||||
xmlns:xsd="http://www.w3.org/2001/XMLSchema#"
|
||||
xmlns:simobjects="http://jpt.lu/objects#"
|
||||
xmlns:simontology="http://jpt.lu/carSimulationOntology#">
|
||||
|
||||
<!-- Car data -->
|
||||
|
||||
<owl:NamedIndividual rdf:about="http://jpt.lu/objects/Car#0">
|
||||
<rdf:type rdf:resource="http://simontology.org/Car"/>
|
||||
<simontology:isDrivenBy rdf:resource="http://jpt.lu/objects/Driver#0"/>
|
||||
<simontology:maximumMotorRPM rdf:datatype="xsd:integer">3500</simontology:maximumMotorRPM>
|
||||
<simontology:maximumTirePressure rdf:datatype="xsd:double">3.5</simontology:maximumTirePressure>
|
||||
<simontology:minimumMotorRPM rdf:datatype="xsd:integer">800</simontology:minimumMotorRPM>
|
||||
<simontology:minimumTirePressure rdf:datatype="xsd:double">2.9</simontology:minimumTirePressure>
|
||||
<simontology:requiresDriverLicense rdf:datatype="xsd:string">B</simontology:requiresDriverLicense>
|
||||
</owl:NamedIndividual>
|
||||
|
||||
|
||||
<!-- Driver data -->
|
||||
|
||||
<owl:NamedIndividual rdf:about="http://jpt.lu/objects/Driver#0">
|
||||
<rdf:type rdf:resource="http://simontology.org/Driver"/>
|
||||
<simontology:drives rdf:resource="http://jpt.lu/objects/Car#0"/>
|
||||
<simontology:hasName rdf:datatype="xsd:string">Max</simontology:hasName>
|
||||
<simontology:hasPhoneNumber rdf:datatype="xsd:string">+49 12345</simontology:hasPhoneNumber>
|
||||
<simontology:hasDriverLicense rdf:datatype="xsd:string">B</simontology:hasDriverLicense>
|
||||
</owl:NamedIndividual>
|
||||
|
||||
</rdf:RDF>
|
|
@ -1,15 +1,14 @@
|
|||
<?xml version="1.0"?>
|
||||
<rdf:RDF xmlns="http://simontology.org#"
|
||||
xml:base="http://simontology.org"
|
||||
<rdf:RDF xmlns="http://jpt.lu/carSimulationOntology#"
|
||||
xml:base="http://jpt.lu/carSimulationOntology"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:owl="http://www.w3.org/2002/07/owl#"
|
||||
xmlns:xml="http://www.w3.org/XML/1998/namespace"
|
||||
xmlns:myexample="http://myexample.org/#"
|
||||
xmlns:xsd="http://www.w3.org/2001/XMLSchema#"
|
||||
xmlns:simontology="http://simontology.org/#"
|
||||
xmlns:simontology="http://jpt.lu/carSimulationOntology#"
|
||||
xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
|
||||
xmlns:simobjects="http://simobjects.org/">
|
||||
<owl:Ontology rdf:about="http://simontology.org">
|
||||
<owl:Ontology rdf:about="http://jpt.lu/carSimulationOntology#">
|
||||
<rdfs:comment xml:lang="de">Beispielhafte Ontologie für die Autosimulation</rdfs:comment>
|
||||
</owl:Ontology>
|
||||
|
||||
|
@ -26,51 +25,51 @@
|
|||
|
||||
|
||||
|
||||
<!-- http://simontology.org/#drives -->
|
||||
<!-- http://jpt.lu/carSimulationOntology#drives -->
|
||||
|
||||
<owl:ObjectProperty rdf:about="http://simontology.org/#drives">
|
||||
<owl:inverseOf rdf:resource="http://simontology.org/#isDrivenBy"/>
|
||||
<rdfs:domain rdf:resource="http://simontology.org/Driver"/>
|
||||
<rdfs:range rdf:resource="http://simontology.org/Car"/>
|
||||
<owl:ObjectProperty rdf:about="http://jpt.lu/carSimulationOntology#drives">
|
||||
<owl:inverseOf rdf:resource="http://jpt.lu/carSimulationOntology#isDrivenBy"/>
|
||||
<rdfs:domain rdf:resource="http://jpt.lu/carSimulationOntology#Driver"/>
|
||||
<rdfs:range rdf:resource="http://jpt.lu/carSimulationOntology#Car"/>
|
||||
</owl:ObjectProperty>
|
||||
|
||||
|
||||
|
||||
<!-- http://simontology.org/#isDrivenBy -->
|
||||
<!-- http://jpt.lu/carSimulationOntology#isDrivenBy -->
|
||||
|
||||
<owl:ObjectProperty rdf:about="http://simontology.org/#isDrivenBy">
|
||||
<rdfs:domain rdf:resource="http://simontology.org/Car"/>
|
||||
<rdfs:range rdf:resource="http://simontology.org/Driver"/>
|
||||
<owl:ObjectProperty rdf:about="http://jpt.lu/carSimulationOntology#isDrivenBy">
|
||||
<rdfs:domain rdf:resource="http://jpt.lu/carSimulationOntology#Car"/>
|
||||
<rdfs:range rdf:resource="http://jpt.lu/carSimulationOntology#Driver"/>
|
||||
</owl:ObjectProperty>
|
||||
|
||||
|
||||
|
||||
<!-- http://simontology.org/#relatedCar -->
|
||||
<!-- http://jpt.lu/carSimulationOntology#relatedCar -->
|
||||
|
||||
<owl:ObjectProperty rdf:about="http://simontology.org/#relatedCar">
|
||||
<owl:inverseOf rdf:resource="http://simontology.org/#relatedEvent"/>
|
||||
<rdfs:domain rdf:resource="http://simontology.org/CarEvent"/>
|
||||
<rdfs:range rdf:resource="http://simontology.org/Car"/>
|
||||
<owl:ObjectProperty rdf:about="http://jpt.lu/carSimulationOntology#relatedCar">
|
||||
<owl:inverseOf rdf:resource="http://jpt.lu/carSimulationOntology#relatedEvent"/>
|
||||
<rdfs:domain rdf:resource="http://jpt.lu/carSimulationOntology#CarEvent"/>
|
||||
<rdfs:range rdf:resource="http://jpt.lu/carSimulationOntology#Car"/>
|
||||
</owl:ObjectProperty>
|
||||
|
||||
|
||||
|
||||
<!-- http://simontology.org/#relatedEvent -->
|
||||
<!-- http://jpt.lu/carSimulationOntology#relatedEvent -->
|
||||
|
||||
<owl:ObjectProperty rdf:about="http://simontology.org/#relatedEvent">
|
||||
<owl:inverseOf rdf:resource="http://simontology.org/#relatedUser"/>
|
||||
<rdfs:domain rdf:resource="http://simontology.org/Car"/>
|
||||
<rdfs:domain rdf:resource="http://simontology.org/Driver"/>
|
||||
<rdfs:range rdf:resource="http://simontology.org/Event"/>
|
||||
<owl:ObjectProperty rdf:about="http://jpt.lu/carSimulationOntology#relatedEvent">
|
||||
<owl:inverseOf rdf:resource="http://jpt.lu/carSimulationOntology#relatedUser"/>
|
||||
<rdfs:domain rdf:resource="http://jpt.lu/carSimulationOntology#Car"/>
|
||||
<rdfs:domain rdf:resource="http://jpt.lu/carSimulationOntology#Driver"/>
|
||||
<rdfs:range rdf:resource="http://jpt.lu/carSimulationOntology#Event"/>
|
||||
</owl:ObjectProperty>
|
||||
|
||||
|
||||
|
||||
<!-- http://simontology.org/#relatedUser -->
|
||||
<!-- http://jpt.lu/carSimulationOntology#relatedUser -->
|
||||
|
||||
<owl:ObjectProperty rdf:about="http://simontology.org/#relatedUser">
|
||||
<rdfs:domain rdf:resource="http://simontology.org/Event"/>
|
||||
<rdfs:range rdf:resource="http://simontology.org/Driver"/>
|
||||
<owl:ObjectProperty rdf:about="http://jpt.lu/carSimulationOntology#relatedUser">
|
||||
<rdfs:domain rdf:resource="http://jpt.lu/carSimulationOntology#Event"/>
|
||||
<rdfs:range rdf:resource="http://jpt.lu/carSimulationOntology#Driver"/>
|
||||
</owl:ObjectProperty>
|
||||
|
||||
|
||||
|
@ -86,10 +85,134 @@
|
|||
|
||||
|
||||
|
||||
<!-- http://jpt.lu/carSimulationOntology#hasName -->
|
||||
|
||||
<owl:DatatypeProperty rdf:about="http://jpt.lu/carSimulationOntology#hasName">
|
||||
<rdfs:domain rdf:resource="http://jpt.lu/carSimulationOntology#Car"/>
|
||||
<rdfs:domain rdf:resource="http://jpt.lu/carSimulationOntology#Driver"/>
|
||||
<rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
|
||||
</owl:DatatypeProperty>
|
||||
|
||||
|
||||
|
||||
<!-- http://jpt.lu/carSimulationOntology#hasPhoneNumber -->
|
||||
|
||||
<owl:DatatypeProperty rdf:about="http://jpt.lu/carSimulationOntology#hasPhoneNumber">
|
||||
<rdfs:domain rdf:resource="http://jpt.lu/carSimulationOntology#Driver"/>
|
||||
<rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
|
||||
</owl:DatatypeProperty>
|
||||
|
||||
|
||||
|
||||
<!-- http://jpt.lu/carSimulationOntology#handbrakeEngaged -->
|
||||
|
||||
<owl:DatatypeProperty rdf:about="http://jpt.lu/carSimulationOntology#handbrakeEngaged">
|
||||
<rdfs:domain rdf:resource="http://jpt.lu/carSimulationOntology#Car"/>
|
||||
<rdfs:domain rdf:resource="http://jpt.lu/carSimulationOntology#CarStatusEvent"/>
|
||||
<rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#boolean"/>
|
||||
</owl:DatatypeProperty>
|
||||
|
||||
|
||||
|
||||
<!-- http://jpt.lu/carSimulationOntology#hasDriverLicense -->
|
||||
|
||||
<owl:DatatypeProperty rdf:about="http://jpt.lu/carSimulationOntology#hasDriverLicense">
|
||||
<rdfs:domain rdf:resource="http://jpt.lu/carSimulationOntology#Driver"/>
|
||||
<rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
|
||||
</owl:DatatypeProperty>
|
||||
|
||||
|
||||
|
||||
<!-- http://jpt.lu/carSimulationOntology#locked -->
|
||||
|
||||
<owl:DatatypeProperty rdf:about="http://jpt.lu/carSimulationOntology#locked">
|
||||
<rdfs:domain rdf:resource="http://jpt.lu/carSimulationOntology#Car"/>
|
||||
<rdfs:domain rdf:resource="http://jpt.lu/carSimulationOntology#CarStatusEvent"/>
|
||||
<rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#boolean"/>
|
||||
</owl:DatatypeProperty>
|
||||
|
||||
|
||||
|
||||
<!-- http://jpt.lu/carSimulationOntology#minimumMotorRPM -->
|
||||
|
||||
<owl:DatatypeProperty rdf:about="http://jpt.lu/carSimulationOntology#minimumMotorRPM">
|
||||
<rdfs:domain rdf:resource="http://jpt.lu/carSimulationOntology#Car"/>
|
||||
<rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#integer"/>
|
||||
</owl:DatatypeProperty>
|
||||
|
||||
|
||||
|
||||
<!-- http://jpt.lu/carSimulationOntology#minimumTirePressure -->
|
||||
|
||||
<owl:DatatypeProperty rdf:about="http://jpt.lu/carSimulationOntology#minimumTirePressure">
|
||||
<rdfs:domain rdf:resource="http://jpt.lu/carSimulationOntology#Car"/>
|
||||
<rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#double"/>
|
||||
</owl:DatatypeProperty>
|
||||
|
||||
|
||||
|
||||
<!-- http://jpt.lu/carSimulationOntology#motorOn -->
|
||||
|
||||
<owl:DatatypeProperty rdf:about="http://jpt.lu/carSimulationOntology#motorOn">
|
||||
<rdfs:domain rdf:resource="http://jpt.lu/carSimulationOntology#Car"/>
|
||||
<rdfs:domain rdf:resource="http://jpt.lu/carSimulationOntology#CarStatusEvent"/>
|
||||
<rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#boolean"/>
|
||||
</owl:DatatypeProperty>
|
||||
|
||||
|
||||
|
||||
<!-- http://jpt.lu/carSimulationOntology#motorRPM -->
|
||||
|
||||
<owl:DatatypeProperty rdf:about="http://jpt.lu/carSimulationOntology#motorRPM">
|
||||
<rdfs:domain rdf:resource="http://jpt.lu/carSimulationOntology#Car"/>
|
||||
<rdfs:domain rdf:resource="http://jpt.lu/carSimulationOntology#CarStatusEvent"/>
|
||||
<rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#integer"/>
|
||||
</owl:DatatypeProperty>
|
||||
|
||||
|
||||
|
||||
<!-- http://jpt.lu/carSimulationOntology#requiresDriverLicense -->
|
||||
|
||||
<owl:DatatypeProperty rdf:about="http://jpt.lu/carSimulationOntology#requiresDriverLicense">
|
||||
<rdfs:domain rdf:resource="http://jpt.lu/carSimulationOntology#Car"/>
|
||||
<rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
|
||||
</owl:DatatypeProperty>
|
||||
|
||||
|
||||
|
||||
<!-- http://jpt.lu/carSimulationOntology#speed -->
|
||||
|
||||
<owl:DatatypeProperty rdf:about="http://jpt.lu/carSimulationOntology#speed">
|
||||
<rdfs:domain rdf:resource="http://jpt.lu/carSimulationOntology#Car"/>
|
||||
<rdfs:domain rdf:resource="http://jpt.lu/carSimulationOntology#CarStatusEvent"/>
|
||||
<rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#integer"/>
|
||||
</owl:DatatypeProperty>
|
||||
|
||||
|
||||
|
||||
<!-- http://jpt.lu/carSimulationOntology#tirePressure -->
|
||||
|
||||
<owl:DatatypeProperty rdf:about="http://jpt.lu/carSimulationOntology#tirePressure">
|
||||
<rdfs:domain rdf:resource="http://jpt.lu/carSimulationOntology#Car"/>
|
||||
<rdfs:domain rdf:resource="http://jpt.lu/carSimulationOntology#CarStatusEvent"/>
|
||||
<rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#double"/>
|
||||
</owl:DatatypeProperty>
|
||||
|
||||
|
||||
|
||||
<!-- http://jpt.lu/carSimulationOntology#usagePeriod -->
|
||||
|
||||
<owl:DatatypeProperty rdf:about="http://jpt.lu/carSimulationOntology#usagePeriod">
|
||||
<rdfs:domain rdf:resource="http://jpt.lu/carSimulationOntology#CarTakenEvent"/>
|
||||
<rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#integer"/>
|
||||
</owl:DatatypeProperty>
|
||||
|
||||
|
||||
|
||||
<!-- http://simobjects.org/maximumMotorRPM -->
|
||||
|
||||
<owl:DatatypeProperty rdf:about="http://simobjects.org/maximumMotorRPM">
|
||||
<rdfs:domain rdf:resource="http://simontology.org/Car"/>
|
||||
<rdfs:domain rdf:resource="http://jpt.lu/carSimulationOntology#Car"/>
|
||||
<rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#integer"/>
|
||||
</owl:DatatypeProperty>
|
||||
|
||||
|
@ -98,136 +221,12 @@
|
|||
<!-- http://simobjects.org/maximumTirePressure -->
|
||||
|
||||
<owl:DatatypeProperty rdf:about="http://simobjects.org/maximumTirePressure">
|
||||
<rdfs:domain rdf:resource="http://simontology.org/Car"/>
|
||||
<rdfs:domain rdf:resource="http://jpt.lu/carSimulationOntology#Car"/>
|
||||
<rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#double"/>
|
||||
</owl:DatatypeProperty>
|
||||
|
||||
|
||||
|
||||
<!-- http://simontology.org#hasName -->
|
||||
|
||||
<owl:DatatypeProperty rdf:about="http://simontology.org#hasName">
|
||||
<rdfs:domain rdf:resource="http://simontology.org/Car"/>
|
||||
<rdfs:domain rdf:resource="http://simontology.org/Driver"/>
|
||||
<rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
|
||||
</owl:DatatypeProperty>
|
||||
|
||||
|
||||
|
||||
<!-- http://simontology.org#hasPhoneNumber -->
|
||||
|
||||
<owl:DatatypeProperty rdf:about="http://simontology.org#hasPhoneNumber">
|
||||
<rdfs:domain rdf:resource="http://simontology.org/Driver"/>
|
||||
<rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
|
||||
</owl:DatatypeProperty>
|
||||
|
||||
|
||||
|
||||
<!-- http://simontology.org/#handbrakeEngaged -->
|
||||
|
||||
<owl:DatatypeProperty rdf:about="http://simontology.org/#handbrakeEngaged">
|
||||
<rdfs:domain rdf:resource="http://simontology.org/Car"/>
|
||||
<rdfs:domain rdf:resource="http://simontology.org/CarStatusEvent"/>
|
||||
<rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#boolean"/>
|
||||
</owl:DatatypeProperty>
|
||||
|
||||
|
||||
|
||||
<!-- http://simontology.org/#hasDriverLicense -->
|
||||
|
||||
<owl:DatatypeProperty rdf:about="http://simontology.org/#hasDriverLicense">
|
||||
<rdfs:domain rdf:resource="http://simontology.org/Driver"/>
|
||||
<rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
|
||||
</owl:DatatypeProperty>
|
||||
|
||||
|
||||
|
||||
<!-- http://simontology.org/#locked -->
|
||||
|
||||
<owl:DatatypeProperty rdf:about="http://simontology.org/#locked">
|
||||
<rdfs:domain rdf:resource="http://simontology.org/Car"/>
|
||||
<rdfs:domain rdf:resource="http://simontology.org/CarStatusEvent"/>
|
||||
<rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#boolean"/>
|
||||
</owl:DatatypeProperty>
|
||||
|
||||
|
||||
|
||||
<!-- http://simontology.org/#minimumMotorRPM -->
|
||||
|
||||
<owl:DatatypeProperty rdf:about="http://simontology.org/#minimumMotorRPM">
|
||||
<rdfs:domain rdf:resource="http://simontology.org/Car"/>
|
||||
<rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#integer"/>
|
||||
</owl:DatatypeProperty>
|
||||
|
||||
|
||||
|
||||
<!-- http://simontology.org/#minimumTirePressure -->
|
||||
|
||||
<owl:DatatypeProperty rdf:about="http://simontology.org/#minimumTirePressure">
|
||||
<rdfs:domain rdf:resource="http://simontology.org/Car"/>
|
||||
<rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#double"/>
|
||||
</owl:DatatypeProperty>
|
||||
|
||||
|
||||
|
||||
<!-- http://simontology.org/#motorOn -->
|
||||
|
||||
<owl:DatatypeProperty rdf:about="http://simontology.org/#motorOn">
|
||||
<rdfs:domain rdf:resource="http://simontology.org/Car"/>
|
||||
<rdfs:domain rdf:resource="http://simontology.org/CarStatusEvent"/>
|
||||
<rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#boolean"/>
|
||||
</owl:DatatypeProperty>
|
||||
|
||||
|
||||
|
||||
<!-- http://simontology.org/#motorRPM -->
|
||||
|
||||
<owl:DatatypeProperty rdf:about="http://simontology.org/#motorRPM">
|
||||
<rdfs:domain rdf:resource="http://simontology.org/Car"/>
|
||||
<rdfs:domain rdf:resource="http://simontology.org/CarStatusEvent"/>
|
||||
<rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#integer"/>
|
||||
</owl:DatatypeProperty>
|
||||
|
||||
|
||||
|
||||
<!-- http://simontology.org/#requiresDriverLicense -->
|
||||
|
||||
<owl:DatatypeProperty rdf:about="http://simontology.org/#requiresDriverLicense">
|
||||
<rdfs:domain rdf:resource="http://simontology.org/Car"/>
|
||||
<rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
|
||||
</owl:DatatypeProperty>
|
||||
|
||||
|
||||
|
||||
<!-- http://simontology.org/#speed -->
|
||||
|
||||
<owl:DatatypeProperty rdf:about="http://simontology.org/#speed">
|
||||
<rdfs:domain rdf:resource="http://simontology.org/Car"/>
|
||||
<rdfs:domain rdf:resource="http://simontology.org/CarStatusEvent"/>
|
||||
<rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#integer"/>
|
||||
</owl:DatatypeProperty>
|
||||
|
||||
|
||||
|
||||
<!-- http://simontology.org/#tirePressure -->
|
||||
|
||||
<owl:DatatypeProperty rdf:about="http://simontology.org/#tirePressure">
|
||||
<rdfs:domain rdf:resource="http://simontology.org/Car"/>
|
||||
<rdfs:domain rdf:resource="http://simontology.org/CarStatusEvent"/>
|
||||
<rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#double"/>
|
||||
</owl:DatatypeProperty>
|
||||
|
||||
|
||||
|
||||
<!-- http://simontology.org/#usagePeriod -->
|
||||
|
||||
<owl:DatatypeProperty rdf:about="http://simontology.org/#usagePeriod">
|
||||
<rdfs:domain rdf:resource="http://simontology.org/CarTakenEvent"/>
|
||||
<rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#integer"/>
|
||||
</owl:DatatypeProperty>
|
||||
|
||||
|
||||
|
||||
<!--
|
||||
///////////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
|
@ -239,106 +238,69 @@
|
|||
|
||||
|
||||
|
||||
<!-- http://simontology.org/Car -->
|
||||
<!-- http://jpt.lu/carSimulationOntology#Car -->
|
||||
|
||||
<owl:Class rdf:about="http://simontology.org/Car"/>
|
||||
<owl:Class rdf:about="http://jpt.lu/carSimulationOntology#Car"/>
|
||||
|
||||
|
||||
|
||||
<!-- http://simontology.org/CarAirbagEvent -->
|
||||
<!-- http://jpt.lu/carSimulationOntology#CarAirbagEvent -->
|
||||
|
||||
<owl:Class rdf:about="http://simontology.org/CarAirbagEvent">
|
||||
<rdfs:subClassOf rdf:resource="http://simontology.org/CarEvent"/>
|
||||
<owl:Class rdf:about="http://jpt.lu/carSimulationOntology#CarAirbagEvent">
|
||||
<rdfs:subClassOf rdf:resource="http://jpt.lu/carSimulationOntology#CarEvent"/>
|
||||
</owl:Class>
|
||||
|
||||
|
||||
|
||||
<!-- http://simontology.org/CarEvent -->
|
||||
<!-- http://jpt.lu/carSimulationOntology#CarEvent -->
|
||||
|
||||
<owl:Class rdf:about="http://simontology.org/CarEvent">
|
||||
<rdfs:subClassOf rdf:resource="http://simontology.org/Event"/>
|
||||
<owl:Class rdf:about="http://jpt.lu/carSimulationOntology#CarEvent">
|
||||
<rdfs:subClassOf rdf:resource="http://jpt.lu/carSimulationOntology#Event"/>
|
||||
</owl:Class>
|
||||
|
||||
|
||||
|
||||
<!-- http://simontology.org/CarReturnedEvent -->
|
||||
<!-- http://jpt.lu/carSimulationOntology#CarReturnedEvent -->
|
||||
|
||||
<owl:Class rdf:about="http://simontology.org/CarReturnedEvent">
|
||||
<rdfs:subClassOf rdf:resource="http://simontology.org/CarUserEvent"/>
|
||||
<owl:Class rdf:about="http://jpt.lu/carSimulationOntology#CarReturnedEvent">
|
||||
<rdfs:subClassOf rdf:resource="http://jpt.lu/carSimulationOntology#CarUserEvent"/>
|
||||
</owl:Class>
|
||||
|
||||
|
||||
|
||||
<!-- http://simontology.org/CarStatusEvent -->
|
||||
<!-- http://jpt.lu/carSimulationOntology#CarStatusEvent -->
|
||||
|
||||
<owl:Class rdf:about="http://simontology.org/CarStatusEvent">
|
||||
<rdfs:subClassOf rdf:resource="http://simontology.org/CarEvent"/>
|
||||
<owl:Class rdf:about="http://jpt.lu/carSimulationOntology#CarStatusEvent">
|
||||
<rdfs:subClassOf rdf:resource="http://jpt.lu/carSimulationOntology#CarEvent"/>
|
||||
</owl:Class>
|
||||
|
||||
|
||||
|
||||
<!-- http://simontology.org/CarTakenEvent -->
|
||||
<!-- http://jpt.lu/carSimulationOntology#CarTakenEvent -->
|
||||
|
||||
<owl:Class rdf:about="http://simontology.org/CarTakenEvent">
|
||||
<rdfs:subClassOf rdf:resource="http://simontology.org/CarUserEvent"/>
|
||||
<owl:Class rdf:about="http://jpt.lu/carSimulationOntology#CarTakenEvent">
|
||||
<rdfs:subClassOf rdf:resource="http://jpt.lu/carSimulationOntology#CarUserEvent"/>
|
||||
</owl:Class>
|
||||
|
||||
|
||||
|
||||
<!-- http://simontology.org/CarUserEvent -->
|
||||
<!-- http://jpt.lu/carSimulationOntology#CarUserEvent -->
|
||||
|
||||
<owl:Class rdf:about="http://simontology.org/CarUserEvent">
|
||||
<rdfs:subClassOf rdf:resource="http://simontology.org/CarEvent"/>
|
||||
<owl:Class rdf:about="http://jpt.lu/carSimulationOntology#CarUserEvent">
|
||||
<rdfs:subClassOf rdf:resource="http://jpt.lu/carSimulationOntology#CarEvent"/>
|
||||
</owl:Class>
|
||||
|
||||
|
||||
|
||||
<!-- http://simontology.org/Driver -->
|
||||
<!-- http://jpt.lu/carSimulationOntology#Driver -->
|
||||
|
||||
<owl:Class rdf:about="http://simontology.org/Driver"/>
|
||||
<owl:Class rdf:about="http://jpt.lu/carSimulationOntology#Driver"/>
|
||||
|
||||
|
||||
|
||||
<!-- http://simontology.org/Event -->
|
||||
<!-- http://jpt.lu/carSimulationOntology#Event -->
|
||||
|
||||
<owl:Class rdf:about="http://simontology.org/Event"/>
|
||||
|
||||
|
||||
|
||||
<!--
|
||||
///////////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Individuals
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////////////////
|
||||
-->
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- http://simobjects.org/Car#0 -->
|
||||
|
||||
<owl:NamedIndividual rdf:about="http://simobjects.org/Car#0">
|
||||
<rdf:type rdf:resource="http://simontology.org/Car"/>
|
||||
<simontology:isDrivenBy rdf:resource="http://simobjects.org/Driver#0"/>
|
||||
<simobjects:maximumMotorRPM rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">3500</simobjects:maximumMotorRPM>
|
||||
<simobjects:maximumTirePressure rdf:datatype="http://www.w3.org/2001/XMLSchema#double">3.5</simobjects:maximumTirePressure>
|
||||
<simontology:minimumMotorRPM rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">800</simontology:minimumMotorRPM>
|
||||
<simontology:minimumTirePressure rdf:datatype="http://www.w3.org/2001/XMLSchema#double">2.9</simontology:minimumTirePressure>
|
||||
<simontology:requiresDriverLicense rdf:datatype="http://www.w3.org/2001/XMLSchema#string">B</simontology:requiresDriverLicense>
|
||||
</owl:NamedIndividual>
|
||||
|
||||
|
||||
|
||||
<!-- http://simobjects.org/Driver#0 -->
|
||||
|
||||
<owl:NamedIndividual rdf:about="http://simobjects.org/Driver#0">
|
||||
<rdf:type rdf:resource="http://simontology.org/Driver"/>
|
||||
<simontology:drives rdf:resource="http://simobjects.org/Car#0"/>
|
||||
<hasName rdf:datatype="http://www.w3.org/2001/XMLSchema#string">Max</hasName>
|
||||
<hasPhoneNumber rdf:datatype="http://www.w3.org/2001/XMLSchema#string">+49 12345</hasPhoneNumber>
|
||||
<simontology:hasDriverLicense rdf:datatype="http://www.w3.org/2001/XMLSchema#string">B</simontology:hasDriverLicense>
|
||||
</owl:NamedIndividual>
|
||||
<owl:Class rdf:about="http://jpt.lu/carSimulationOntology#Event"/>
|
||||
</rdf:RDF>
|
||||
|
||||
|
||||
|
|
|
@ -35,7 +35,7 @@ public class Main {
|
|||
|
||||
// Add static knowledge into local graph from file
|
||||
try {
|
||||
//engine.putStaticNamedModel("http://streamreasoning.org/roomConnection", CsparqlUtils.serializeRDFFile("examples_files/roomConnection.rdf"));
|
||||
engine.putStaticNamedModel("http://jpt.lu/carSimKnowledge", CsparqlUtils.serializeRDFFile("data/carData.rdf"));
|
||||
} catch (Exception e) {
|
||||
logger.error(e.toString());
|
||||
logger.error(e.getStackTrace().toString());
|
||||
|
@ -66,7 +66,7 @@ public class Main {
|
|||
simulationThread.start();
|
||||
|
||||
// Now build a query to run - interchangeable
|
||||
String query = Main.getAllCarAttributesQuery();
|
||||
String query = Main.getSPO();
|
||||
|
||||
// Create a result proxy by registering the query at the engine
|
||||
CsparqlQueryResultProxy resultProxy = null;
|
||||
|
@ -103,10 +103,9 @@ public class Main {
|
|||
return "REGISTER QUERY BasicCarInfo AS "
|
||||
+ "PREFIX f: <http://larkc.eu/csparql/sparql/jena/ext#> "
|
||||
+ "PREFIX xsd: <http://www.w3.org/2001/XMLSchema#> "
|
||||
+ "PREFIX car: <http://myexample.org/car#> "
|
||||
+ "SELECT ?s ?p ?o "
|
||||
+ "FROM STREAM <http://myexample.org/car> [RANGE 5s STEP 1s] "
|
||||
+ "FROM STREAM <http://myexample.org/driver> [RANGE 15s STEP 1s] "
|
||||
+ "FROM STREAM <"+RentACarSimulation.CAR_STREAM_IRI+"> [RANGE 5s STEP 1s] "
|
||||
+ "FROM STREAM <"+RentACarSimulation.DRIVER_STREAM_IRI+"> [RANGE 15s STEP 1s] "
|
||||
+ "WHERE { "
|
||||
+ " ?s ?p ?o . "
|
||||
+ "}";
|
||||
|
@ -118,8 +117,8 @@ public class Main {
|
|||
+ "PREFIX xsd: <http://www.w3.org/2001/XMLSchema#> "
|
||||
+ "PREFIX car: <http://myexample.org/car#> "
|
||||
+ "SELECT ?car ?locked ?on ?speed ?rpm ?handbrake ?tirePressure "
|
||||
+ "FROM STREAM <http://myexample.org/car> [RANGE 5s STEP 1s] "
|
||||
+ "FROM STREAM <http://myexample.org/driver> [RANGE 15s STEP 1s] "
|
||||
+ "FROM STREAM <"+RentACarSimulation.CAR_STREAM_IRI+"> [RANGE 5s STEP 1s] "
|
||||
+ "FROM STREAM <"+RentACarSimulation.DRIVER_STREAM_IRI+"> [RANGE 15s STEP 1s] "
|
||||
+ "WHERE { "
|
||||
+ " ?e car:subject ?car . "
|
||||
+ " ?e car:locked ?locked . "
|
||||
|
|
|
@ -200,8 +200,8 @@ public class Car {
|
|||
String baseIri = RentACarSimulation.BASE_OBJECT_IRI;
|
||||
String baseOnt = RentACarSimulation.BASE_ONTOLOGY_IRI;
|
||||
String eventIri = baseIri + "/event#" + time;
|
||||
this.quads.add(new RdfQuadruple(eventIri, "a", baseOnt+"/CarAirbagEvent", time));
|
||||
this.quads.add(new RdfQuadruple(eventIri, baseOnt+"#relatedCar", this.getIri(), time));
|
||||
this.quads.add(new RdfQuadruple(eventIri, "rdf:type", baseOnt+"CarAirbagEvent", time));
|
||||
this.quads.add(new RdfQuadruple(eventIri, baseOnt+"relatedCar", this.getIri(), time));
|
||||
}
|
||||
|
||||
private void generateContinousReportQuads() {
|
||||
|
@ -209,14 +209,14 @@ public class Car {
|
|||
String baseIri = RentACarSimulation.BASE_OBJECT_IRI;
|
||||
String baseOnt = RentACarSimulation.BASE_ONTOLOGY_IRI;
|
||||
String eventIri = baseIri + "/event#" + time;
|
||||
this.quads.add(new RdfQuadruple(eventIri, "a", baseOnt+"/CarStatusEvent", time));
|
||||
this.quads.add(new RdfQuadruple(eventIri, baseOnt+"#relatedCar", this.getIri(), time));
|
||||
this.quads.add(new RdfQuadruple(eventIri, baseOnt+"#motorOn", ""+this.motorOn+"^^http://www.w3.org/2001/XMLSchema#boolean", time));
|
||||
this.quads.add(new RdfQuadruple(eventIri, baseOnt+"#motorRPM", ""+this.motorRpm+"^^http://www.w3.org/2001/XMLSchema#integer", time));
|
||||
this.quads.add(new RdfQuadruple(eventIri, baseOnt+"#speed", ""+this.speed+"^^http://www.w3.org/2001/XMLSchema#integer", time));
|
||||
this.quads.add(new RdfQuadruple(eventIri, baseOnt+"#handbrakeEngaged", ""+this.handbrakeEngaged+"^^http://www.w3.org/2001/XMLSchema#boolean", time));
|
||||
this.quads.add(new RdfQuadruple(eventIri, baseOnt+"#tirePressure", ""+this.tirePressure+"^^http://www.w3.org/2001/XMLSchema#double", time));
|
||||
this.quads.add(new RdfQuadruple(eventIri, baseOnt+"#locked", ""+this.isLocked+"^^http://www.w3.org/2001/XMLSchema#boolean", time));
|
||||
this.quads.add(new RdfQuadruple(eventIri, "rdf:type", baseOnt+"CarStatusEvent", time));
|
||||
this.quads.add(new RdfQuadruple(eventIri, baseOnt+"relatedCar", this.getIri(), time));
|
||||
this.quads.add(new RdfQuadruple(eventIri, baseOnt+"motorOn", ""+this.motorOn+"^^http://www.w3.org/2001/XMLSchema#boolean", time));
|
||||
this.quads.add(new RdfQuadruple(eventIri, baseOnt+"motorRPM", ""+this.motorRpm+"^^http://www.w3.org/2001/XMLSchema#integer", time));
|
||||
this.quads.add(new RdfQuadruple(eventIri, baseOnt+"speed", ""+this.speed+"^^http://www.w3.org/2001/XMLSchema#integer", time));
|
||||
this.quads.add(new RdfQuadruple(eventIri, baseOnt+"handbrakeEngaged", ""+this.handbrakeEngaged+"^^http://www.w3.org/2001/XMLSchema#boolean", time));
|
||||
this.quads.add(new RdfQuadruple(eventIri, baseOnt+"tirePressure", ""+this.tirePressure+"^^http://www.w3.org/2001/XMLSchema#double", time));
|
||||
this.quads.add(new RdfQuadruple(eventIri, baseOnt+"locked", ""+this.isLocked+"^^http://www.w3.org/2001/XMLSchema#boolean", time));
|
||||
}
|
||||
|
||||
public CarState getState() {
|
||||
|
|
|
@ -151,10 +151,10 @@ public class Driver {
|
|||
String baseIri = RentACarSimulation.BASE_OBJECT_IRI;
|
||||
String baseOnt = RentACarSimulation.BASE_ONTOLOGY_IRI;
|
||||
String eventIri = baseIri + "/event#" + time;
|
||||
this.quads.add(new RdfQuadruple(eventIri, "a", baseOnt+"/CarTakenEvent", time));
|
||||
this.quads.add(new RdfQuadruple(eventIri, baseOnt+"#relatedUser", this.getIri(), time));
|
||||
this.quads.add(new RdfQuadruple(eventIri, baseOnt+"#relatedCar", this.car.getIri(), System.currentTimeMillis()));
|
||||
this.quads.add(new RdfQuadruple(eventIri, baseOnt+"#usagePeriod", ""+useCycles+"^^http://www.w3.org/2001/XMLSchema#integer", System.currentTimeMillis()));
|
||||
this.quads.add(new RdfQuadruple(eventIri, "rdf:type", baseOnt+"CarTakenEvent", time));
|
||||
this.quads.add(new RdfQuadruple(eventIri, baseOnt+"relatedUser", this.getIri(), time));
|
||||
this.quads.add(new RdfQuadruple(eventIri, baseOnt+"relatedCar", this.car.getIri(), System.currentTimeMillis()));
|
||||
this.quads.add(new RdfQuadruple(eventIri, baseOnt+"usagePeriod", ""+useCycles+"^^http://www.w3.org/2001/XMLSchema#integer", System.currentTimeMillis()));
|
||||
}
|
||||
|
||||
private void returnCar() {
|
||||
|
@ -162,9 +162,9 @@ public class Driver {
|
|||
String baseIri = RentACarSimulation.BASE_OBJECT_IRI;
|
||||
String baseOnt = RentACarSimulation.BASE_ONTOLOGY_IRI;
|
||||
String eventIri = baseIri + "/event#" + time;
|
||||
this.quads.add(new RdfQuadruple(eventIri, "a", baseOnt+"/CarReturnedEvent", time));
|
||||
this.quads.add(new RdfQuadruple(eventIri, baseOnt+"#relatedUser", this.getIri(), time));
|
||||
this.quads.add(new RdfQuadruple(eventIri, baseOnt+"#relatedCar", this.car.getIri(), time));
|
||||
this.quads.add(new RdfQuadruple(eventIri, "rdf:type", baseOnt+"CarReturnedEvent", time));
|
||||
this.quads.add(new RdfQuadruple(eventIri, baseOnt+"relatedUser", this.getIri(), time));
|
||||
this.quads.add(new RdfQuadruple(eventIri, baseOnt+"relatedCar", this.car.getIri(), time));
|
||||
this.carPool.returnCar(this.car);
|
||||
this.car = null;
|
||||
}
|
||||
|
|
|
@ -8,9 +8,9 @@ import eu.larkc.csparql.cep.api.RdfStream;
|
|||
|
||||
public class RentACarSimulation implements Runnable {
|
||||
|
||||
public static final String BASE_ONTOLOGY_IRI = "http://simontology.org";
|
||||
public static final String BASE_ONTOLOGY_IRI = "http://jpt.lu/carSimulationOntology#";
|
||||
public static final String BASE_STREAM_IRI = "http://simstream.org";
|
||||
public static final String BASE_OBJECT_IRI = "http://simobject.org";
|
||||
public static final String BASE_OBJECT_IRI = "http://jpt.lu/objects";
|
||||
public static final String CAR_STREAM_IRI = BASE_STREAM_IRI + "/carStream";
|
||||
public static final String DRIVER_STREAM_IRI = BASE_STREAM_IRI + "/driverStream";
|
||||
|
||||
|
@ -99,8 +99,23 @@ public class RentACarSimulation implements Runnable {
|
|||
this.runSimulation = false;
|
||||
}
|
||||
|
||||
public static String getSomeQuery() {
|
||||
|
||||
public static String getEvents() {
|
||||
return "REGISTER QUERY getEvents AS "
|
||||
+ "PREFIX f: <http://larkc.eu/csparql/sparql/jena/ext#> "
|
||||
+ "PREFIX xsd: <http://www.w3.org/2001/XMLSchema#> "
|
||||
+ "PREFIX car: <"+RentACarSimulation.BASE_ONTOLOGY_IRI+"> "
|
||||
+ "SELECT ?car ?locked ?on ?speed ?rpm ?handbrake ?tirePressure "
|
||||
+ "FROM STREAM <"+RentACarSimulation.CAR_STREAM_IRI+"> [RANGE 5s STEP 1s] "
|
||||
+ "FROM STREAM <"+RentACarSimulation.DRIVER_STREAM_IRI+"> [RANGE 15s STEP 1s] "
|
||||
+ "WHERE { "
|
||||
+ " ?e car:subject ?car . "
|
||||
+ " ?e car:locked ?locked . "
|
||||
+ " ?e car:motorOn ?on . "
|
||||
+ " ?e car:speed ?speed . "
|
||||
+ " ?e car:motorRPM ?rpm . "
|
||||
+ " ?e car:handbrakeEngaged ?handbrake . "
|
||||
+ " ?e car:tirePressure ?pressure . "
|
||||
+ "}";
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue