NamedPizza

IRI: http://draft.ottr.xyz/pizza/NamedPizza

Available formats

Specification

@prefix : <http://draft.ottr.xyz/pizza/NamedPizza#> .
@prefix p: <http://www.co-ode.org/ontologies/pizza/pizza.owl#> .
@prefix t-owl-axiom: <http://candidate.ottr.xyz/owl/axiom/> .
@prefix t-owl-rstr: <http://candidate.ottr.xyz/owl/restriction/> .

http://draft.ottr.xyz/pizza/NamedPizza( :pizza : 1 class , :country : ? individual , <:toppings> : + list )
  ::
  t-owl-axiom:SubClassOf( :pizza , p:NamedPizza )
  t-owl-axiom:SubObjectAllValuesFrom( :pizza , p:hasTopping , _:b1 )
  t-owl-axiom:SubObjectHasValue( :pizza , p:hasCountryOfOrigin , :country )
  X  | t-owl-axiom:SubObjectSomeValuesFrom( :pizza , p:hasTopping , <:toppings> )
  t-owl-rstr:ObjectUnionOf( _:b1 , <:toppings> ) .

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 p:     <http://www.co-ode.org/ontologies/pizza/pizza.owl#> .
@prefix :      <http://draft.ottr.xyz/pizza/NamedPizza#> .
@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#> .

p:hasTopping  a  owl:ObjectProperty .

:pizza  rdfs:subClassOf  p:NamedPizza ;
        rdfs:subClassOf  [ a               owl:Restriction ;
                           owl:hasValue    :country ;
                           owl:onProperty  p:hasCountryOfOrigin
                         ] ;
        rdfs:subClassOf  [ a                  owl:Restriction ;
                           owl:allValuesFrom  [ a            owl:Class ;
                                                owl:unionOf  ( :toppings )
                                              ] ;
                           owl:onProperty     p:hasTopping
                         ] ;
        rdfs:subClassOf  [ a                   owl:Restriction ;
                           owl:onProperty      p:hasTopping ;
                           owl:someValuesFrom  :toppings
                         ] .

p:hasCountryOfOrigin  a  owl:ObjectProperty .

:toppings  a    owl:Class .

Source

Raw source - http://draft.ottr.xyz/pizza/NamedPizza:

@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#> .
@prefix rdfs:      <http://www.w3.org/2000/01/rdf-schema#> .

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

@prefix :          <http://draft.ottr.xyz/pizza/NamedPizza#> .
@prefix p:         <http://www.co-ode.org/ontologies/pizza/pizza.owl#> .

<http://draft.ottr.xyz/pizza/NamedPizza> a ottr:Template ;
  ottr:hasParameter
     [ ottr:index 1 ; ottr:classVariable :pizza ] ,
     [ ottr:index 2 ; ottr:individualVariable :country; ottr:optional true ] ,
     [ ottr:index 3 ; ottr:listVariable (:toppings) ]  .

[] ottr:templateRef <http://candidate.ottr.xyz/owl/axiom/SubClassOf> ;
   ottr:withValues ( :pizza p:NamedPizza ) .

[] ottr:templateRef <http://candidate.ottr.xyz/owl/axiom/SubObjectSomeValuesFrom> ;
   ottr:hasArgument
	[ ottr:index 1; ottr:value :pizza ] ,
	[ ottr:index 2; ottr:value p:hasTopping ] ,
	[ ottr:index 3; ottr:eachValue (:toppings) ] .

[] ottr:templateRef <http://candidate.ottr.xyz/owl/axiom/SubObjectHasValue> ;
   ottr:withValues ( :pizza p:hasCountryOfOrigin :country ) .

[] ottr:templateRef <http://candidate.ottr.xyz/owl/axiom/SubObjectAllValuesFrom> ;
   ottr:withValues ( :pizza p:hasTopping _:alltoppings ) .

[] ottr:templateRef <http://candidate.ottr.xyz/owl/restriction/ObjectUnionOf> ;
   ottr:withValues ( _:alltoppings (:toppings) ) .