partlength

IRI: http://draft.ottr.xyz/i17/partlength

Available formats

Specification

@prefix : <http://draft.ottr.xyz/i17/partlength#> .
@prefix ex: <http://example.com#> .
@prefix owl: <http://www.w3.org/2002/07/owl#> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .

http://draft.ottr.xyz/i17/partlength( :Whole : 1 class , :Part : 1 class , "99"^^xsd:integer : 1 literal )
  ::
  http://draft.ottr.xyz/i17/partof( :Whole , :Part )
  http://draft.ottr.xyz/i17/qualityvalue( :Part , ex:hasLength , ex:meter , "99"^^xsd:integer )
  ( ex:hasLength , rdf:type , owl:ObjectProperty )
  ( ex:meter , rdf:type , owl:Thing ) .

Direct dependency templates

Templates instantiated in the body of this template:

Diagram of pattern

RDF graph visualisation of the expanded body:

Pattern

The pattern the template represents, i.e., the expanded template body.

@prefix :      <http://draft.ottr.xyz/i17/partlength#> .
@prefix partOf: <http://www.ontologydesignpatterns.org/cp/owl/partof.owl#> .
@prefix ex:    <http://example.com#> .
@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 tQ:    <http://draft.ottr.xyz/i17/qualityvalue#> .

:Whole  a                owl:Class ;
        rdfs:subClassOf  [ a                   owl:Restriction ;
                           owl:onProperty      partOf:hasPart ;
                           owl:someValuesFrom  :Part
                         ] .

tQ:hasDatum  a  owl:ObjectProperty .

tQ:hasValue  a  owl:DatatypeProperty .

:Part   a                owl:Class ;
        rdfs:subClassOf  [ a                   owl:Restriction ;
                           owl:onProperty      ex:hasLength ;
                           owl:someValuesFrom  [ a                  owl:Restriction ;
                                                 owl:allValuesFrom  [ a                   owl:Class ;
                                                                      owl:intersectionOf  ( [ a                   owl:Restriction ;
                                                                                              owl:onProperty      tQ:hasUOM ;
                                                                                              owl:someValuesFrom  [ a          owl:Class ;
                                                                                                                    owl:oneOf  ( ex:meter )
                                                                                                                  ]
                                                                                            ]
                                                                                            [ a               owl:Restriction ;
                                                                                              owl:hasValue    99 ;
                                                                                              owl:onProperty  tQ:hasValue
                                                                                            ]
                                                                                          )
                                                                    ] ;
                                                 owl:onProperty     tQ:hasDatum
                                               ]
                         ] .

ex:meter  a     owl:NamedIndividual , owl:Thing .

tQ:hasUOM  a    owl:ObjectProperty .

ex:hasLength  a  owl:ObjectProperty .

Source

Raw source - http://draft.ottr.xyz/i17/partlength:

@prefix rdf:   <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix owl:   <http://www.w3.org/2002/07/owl#> .
@prefix xml:   <http://www.w3.org/XML/1998/namespace> .
@prefix xsd:   <http://www.w3.org/2001/XMLSchema#> .
@prefix rdfs:  <http://www.w3.org/2000/01/rdf-schema#> .

@prefix :      <http://draft.ottr.xyz/i17/partlength#> .

@prefix tQ:    <http://draft.ottr.xyz/i17/qualityvalue#> .
@prefix tP:    <http://draft.ottr.xyz/i17/partof#> .

@prefix ex:   <http://example.com#> .

@prefix ottr:   <http://ns.ottr.xyz/templates#> .


<http://draft.ottr.xyz/i17/partlength> a owl:Ontology , ottr:Template ;
  ottr:hasParameter :pWhole, :pPart, :pLength .

:pWhole    ottr:index 1; ottr:classVariable       :Whole .
:pPart     ottr:index 2; ottr:classVariable       :Part .
:pLength   ottr:index 3; ottr:literalVariable     99 .

ex:hasLength   a owl:ObjectProperty .
ex:meter       a owl:Thing .

[ a ottr:TemplateInstance ;
  ottr:templateRef <http://draft.ottr.xyz/i17/partof> ;
  ottr:withValues ( :Whole :Part )
] .

[ a ottr:TemplateInstance ;
  ottr:templateRef  <http://draft.ottr.xyz/i17/qualityvalue> ;
  ottr:withValues ( :Part ex:hasLength ex:meter 99 )
] .