Unverified Commit 1c0456d1 authored by Maxime Lefrançois's avatar Maxime Lefrançois
Browse files

added examples

parent 02361fd1
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -46,8 +46,8 @@ deploy-report:
  stage: deploy
  image: alpine:latest
  script:
    - sudo apk update
    - sudo apk add openssh
    - apk update
    - apk add openssh
    - eval $(ssh-agent -s)
    - ssh-add <(echo "$SAREF_DEV_KEY")
    - mkdir -p ~/.ssh
+4 −0
Original line number Diff line number Diff line
labs.etsi.org/rep/:
  repos:
    - saref/saref4syst
+33 −0
Original line number Diff line number Diff line
@@ -3,25 +3,31 @@
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix saref: <https://saref.etsi.org/core/> .
@prefix ex: <https://saref.etsi.org/core/v3.2.1/example/pressure/> .
@prefix ex: <https://saref.etsi.org/core/v3.2.1/example/commodities/> .
@prefix time: <http://www.w3.org/2006/time#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix dctype: <http://purl.org/dc/dcmitype/> .
@prefix dcterms: <http://purl.org/dc/terms/> .
@prefix skos: <http://www.w3.org/2004/02/skos/core#>.

<https://saref.etsi.org/core/v3.2.1/example/pressure#> a dctype:Dataset ;
<https://saref.etsi.org/core/v3.2.1/example/commodities#> a dctype:Dataset ;
    dcterms:license <https://forge.etsi.org/etsi-software-license> ;
    dcterms:conformsTo <https://saref.etsi.org/core/v3.2.1/> ;
  dcterms:conformsTo <https://saref.etsi.org/core/v3.2.1/example/onoff#> ;
  dcterms:title "Example pressure"@en ;
  dcterms:description "Example pressure"@en .
    dcterms:title "Example commodities"@en ;
    dcterms:description "Example commodities"@en .

saref:Pressure a owl:Class ;
    rdfs:subClassOf saref:Property ;
    rdfs:comment "A saref:Property related to some measurements that are characterized by a certain value that is measured in a pressure unit (bar or pascal)"@en ;
    rdfs:label "Pressure"@en .
ex:Electricity a saref:EnergyCommodity ;
    rdfs:comment "A type of energy commodity"@en ;
    rdfs:label "Electricity"@en .

saref:PressureUnit a owl:Class ;
    rdfs:subClassOf saref:UnitOfMeasure ;
    rdfs:comment "The unit of measure for pressure"@en ;
    rdfs:label "Pressure unit"@en .
ex:Gas a saref:EnergyCommodity , saref:NaturalResourceCommodity ;
    rdfs:comment "A type of energy commodity"@en ;
    rdfs:label "Gas"@en .

ex:Coal a saref:EnergyCommodity , saref:NaturalResourceCommodity ;
    rdfs:comment "A type of commodity"@en ;
    rdfs:label "Coal"@en .

ex:Water a saref:NaturalResourceCommodity ;
    rdfs:comment "A type of commodity"@en ;
    rdfs:label "Water"@en .
+53 −0
Original line number Diff line number Diff line

@prefix geo: <http://www.w3.org/2003/01/geo/wgs84_pos#> .
@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 saref: <https://saref.etsi.org/core/> .
@prefix ex: <https://saref.etsi.org/core/v3.2.1/example/door_switch/> .
@prefix time: <http://www.w3.org/2006/time#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix dctype: <http://purl.org/dc/dcmitype/> .
@prefix dcterms: <http://purl.org/dc/terms/> .
@prefix skos: <http://www.w3.org/2004/02/skos/core#>.

<https://saref.etsi.org/core/v3.2.1/example/door_switch#> a dctype:Dataset ;
    dcterms:license <https://forge.etsi.org/etsi-software-license> ;
    dcterms:conformsTo <https://saref.etsi.org/core/v3.2.1/> ;
    dcterms:title "Example door switch"@en ;
    dcterms:description "Example door switch"@en .

ex:Door a saref:FeatureKind ;
    rdfs:label "Door"@en ;
    rdfs:comment "Doors, a feature kind."@en .

ex:DoorSwitch a saref:FeatureKind ;
    rdfs:comment "A switch that performs the ex:OpenCloseFunction, is used for controlling a door, and can be found in the state ex:OpenCloseState. A ex:DoorSwitch is used to accomplish ex:Safety."@en ;
    rdfs:label "Door switch"@en ;
    saref:hasFunction ex:OpenCloseFunction ;
    saref:controls ex:Door ;
    saref:hasState ex:OpenCloseState ;
    saref:accomplishes ex:Safety .

ex:OpenCloseFunction a saref:Function ;
    rdfs:label "Open Close Function"@en ;
    rdfs:comment "A function to control the open/close state of some feature"@en ;
    saref:controls ex:OpenCloseState .

ex:OpenCloseState a saref:State ;
  rdfs:label "Open Close State"@en ;
  rdfs:comment "the state open or close"@en .

ex:Open a saref:State ;
  skos:broader ex:OpenCloseState ;
  rdfs:label "Open"@en ;
  rdfs:comment "the state open"@en .

ex:Close a saref:State ;
  skos:broader ex:OpenCloseState ;
  rdfs:label "Close"@en ;
  rdfs:comment "the state close"@en .

ex:Safety a saref:Task ;
    rdfs:comment "A type of task for which a device is designed"@en ;
    rdfs:label "Safety"@en .

examples/doorswitch.ttl

deleted100644 → 0
+0 −101
Original line number Diff line number Diff line
@prefix geo: <http://www.w3.org/2003/01/geo/wgs84_pos#> .
@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 saref: <https://saref.etsi.org/core/> .
@prefix ex: <https://saref.etsi.org/core/v3.2.1/example/doorswitch/> .
@prefix time: <http://www.w3.org/2006/time#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix dctype: <http://purl.org/dc/dcmitype/> .
@prefix dcterms: <http://purl.org/dc/terms/> .

<https://saref.etsi.org/core/v3.2.1/example/doorswitch#> a dctype:Dataset ;
  dcterms:license <https://forge.etsi.org/etsi-software-license> ;
  dcterms:conformsTo <https://saref.etsi.org/core/v3.2.1/> ;
  dcterms:conformsTo <https://saref.etsi.org/core/v3.2.1/example/openclose#> ;
  dcterms:conformsTo <https://saref.etsi.org/core/v3.2.1/example/switch#> ;
  dcterms:title "Example doorswitch"@en ;
  dcterms:description "Example doorswitch"@en .


saref:DoorSwitch a owl:Class ;
    rdfs:subClassOf saref:Switch ,
        [ a owl:Restriction ;
        owl:onProperty saref:hasFunction ;
        owl:someValuesFrom saref:OpenCloseFunction
        ] ,
        [ a owl:Restriction ;
        owl:onProperty saref:hasState ;
        owl:someValuesFrom saref:OpenCloseState
        ] ;
    rdfs:comment "A switch that performs the saref:OpenCloseFunction, is used for controlling a door, and can be found in the state saref:OpenCloseState. A saref:DoorSwitch is typically used to accomplish saref:Safety."@en ;
    rdfs:label "Door switch"@en .


geo:lat a owl:DatatypeProperty .
geo:long a owl:DatatypeProperty .

ex:BuildingObject_MainDoor
#  rdf:type saref:Door ;
  rdfs:label "Building object Main door"^^xsd:string ;
.
ex:BuildingSpace_OfficeHall
#  rdf:type saref:BuildingSpace ;
  rdfs:label "Office Hall"^^xsd:string ;
  geo:lat "52.0821"^^xsd:string ;
  geo:long "4.3251"^^xsd:string ;
#  saref:contains ex:BuildingObject_MainDoor ;
#  saref:hasSpaceType "Office hall"^^xsd:string ;
.
ex:CloseCommand
  rdf:type saref:CloseCommand ;
  rdfs:label "CLOSE command "^^xsd:string ;
  saref:actsUpon ex:OpenState ;
.
ex:CloseDoorService
  rdf:type saref:Service ;
  rdfs:label "CLOSE Door service "^^xsd:string ;
#  saref:hasInputParameter ex:OpenState ;
#  saref:hasOutputParameter ex:CloseState ;
  saref:isOfferedBy ex:DoorSwitch_DS3001 ;
  saref:represents ex:OpenCloseFunction ;
.
ex:CloseState
  rdf:type saref:CloseState ;
  rdfs:label "CLOSE state"^^xsd:string ;
.
ex:Comfort
  rdf:type saref:Task ;
  rdfs:label "Comfort"^^xsd:string ;
.
ex:DoorSwitch_DS001
#  rdf:type saref:DoorSwitch ;
  rdfs:label "Door switch DS3001"^^xsd:string ;
#  saref:IsUsedFor ex:BuildingObject_MainDoor ;
  saref:accomplishes ex:Comfort ;
  saref:consistsOf saref:Switch ;
#  saref:hasCategory saref:Actuator ;
  saref:hasDescription "Door switch DS3001 is an example of how to instantiate a door switch using SAREF"^^xsd:string ;
  saref:hasFunction ex:OpenCloseFunction ;
  saref:hasManufacturer "manufacturer-mno"^^xsd:string ;
  saref:hasModel "mno-DS3001-16"^^xsd:string ;
  saref:hasState ex:CloseState ;
  saref:hasState ex:OpenState ;
#  saref:isLocatedIn ex:BuildingSpace_OfficeHall ;
  saref:offers ex:CloseDoorService ;
.
ex:OpenCloseFunction
  rdf:type saref:OpenCloseFunction ;
  rdfs:label "OPEN CLOSE function "^^xsd:string ;
  saref:hasCommand ex:CloseCommand ;
  saref:hasCommand ex:OpenCommand ;
.
ex:OpenCommand
  rdf:type saref:OpenCommand ;
  rdfs:label "OPEN command"^^xsd:string ;
  saref:actsUpon ex:CloseState ;
.
ex:OpenState
  rdf:type saref:OpenState ;
  rdfs:label "Open state"^^xsd:string ;
.
Loading