[x3d-public] X3D Ontology representation of enumberations

Don Brutzman brutzman at nps.edu
Mon May 4 10:06:25 PDT 2020


X3D Semantic Web working group meeting, 4 May 2020.

Attendees: Jakub Flotyński, John Carlson, Don Brutzman.

Jakub had improvements to the following representation of enumeration types from X3DUOM in X3D Ontology.

On 4/26/2020 11:32 PM, Don Brutzman wrote:
> -------
> 
> c. X3D Ontology
> https://www.web3d.org/x3d/content/semantics/semantics.html
> - simple-type enumeration lists added, excerpt follows
> - typing of fields now reflects these simple types
> - name attribute typing is also stricter, e.g. some names are NMTOKEN
> - found feature in protege for diagnosing error lines in turtle .ttl
> - ready for further work on accessType representations, continuing prior efforts
> 
> :closureTypeChoices rdf:type rdfs:Datatype ;
>    rdfs:label "closureTypeChoices" ;
>    dc:description "closureTypeChoices are strictly allowed enumeration values for ArcClose2D closureType field" ;
>    rdfs:range xs:NMTOKEN ;
>    rdfs:domain [ owl:unionOf ( 'PIE' 'CHORD' ) ] .
> # PIE "Connects arc endpoints to center, forming a pie wedge"
> # CHORD "Connects arc endpoints directly to each other, as in chord on a circle"

References:

* https://www.w3.org/TR/owl-ref/#EnumeratedDatatype

Important note in recommendation regarding lists:

> NOTE: Enumerated datatypes are not part of OWL Lite. 

We should document the X3D Ontology correspondingly.  We are striving for correctness and completeness so this is not considered a limitation.

Next. As design patterns, please look at the next two excerpts.

* https://github.com/w3c/omn/blob/master/omnlib/import/owl.ttl

[line 88] (Jakub will check further on whether this is the final version)

> owl:DataRange
> 
>     a rdfs:Class ;
> 
>     rdfs:comment "The class of OWL data ranges, which are special kinds of datatypes. Note: The use of the IRI owl:DataRange has been deprecated as of OWL 2. The IRI rdfs:Datatype SHOULD be used instead." ;
> 
>     rdfs:isDefinedBy <http://www.w3.org/2002/07/owl#> ;
> 
>     rdfs:label "DataRange" ;
> 
>     rdfs:subClassOf rdfs:Datatype .

[line 493]

> owl:oneOf
> 
>     a rdf:Property ;
> 
>     rdfs:comment "The property that determines the collection of individuals or data values that build an enumeration." ;
> 
>     rdfs:domain rdfs:Class ;
> 
>     rdfs:isDefinedBy <http://www.w3.org/2002/07/owl#> ;
> 
>     rdfs:label "oneOf" ;
> 
>     rdfs:range rdf:List .

This leads us to a new pattern:
====================================
:accessTypeChoices rdf:type rdfs:Datatype ;
     owl:oneOf ( 'initializeOnly' 'inputOnly' 'outputOnly' 'inputOutput' ).

:accessType rdfs:range :accessTypeChoices.
====================================

Jakub will check latest-greatest W3C Recommendation, Don will apply this pattern in X3D Ontology.  This pattern will pertain to all of the enumeration Choices listed in the ontology.

Assuming that works, we will again look at adding accessType information to every field definition in the X3D Ontology.

Also of interest: enumeration "Values" that are not restrictive but rather optional and extendible values.  I will use same pattern, we will continue scrutinizing these relationships.

================================================
:fontFamilyValues rdf:type rdfs:Datatype ;
   rdfs:label "fontFamilyValues" ;
   dc:description "fontFamilyValues are allowed enumeration values for FontStyle/ScreenFontStyle node family field" ;
   rdfs:range :MFString ;
   rdfs:domain [ owl:unionOf ( '"SANS"' '"SERIF"' '"TYPEWRITER"' ) ] .
# "SANS" "default font family for sans-serif font such as Helvetica"
# "SERIF" "default font family for serif font such as Times-Roman"
# "TYPEWRITER" "default font family for a fixed-pitch font such as Courier"
================================================

Future follow-on work:
a. Confirm enumerations representations, write a SPARQL query or two.
b. SPARQL patterns for X3D event-routing chains: first listing correct chains, then diagnosing malformed event chains.
c. HAnim representations of parent-child relationships for HAnimJoint, HAnimSegment and HAnimSite.

Thanks (as ever) for steady progress today.  Have fun with X3D Ontology!   8)

all the best, Don
-- 
Don Brutzman  Naval Postgraduate School, Code USW/Br       brutzman at nps.edu
Watkins 270,  MOVES Institute, Monterey CA 93943-5000 USA   +1.831.656.2149
X3D graphics, virtual worlds, navy robotics http://faculty.nps.edu/brutzman



More information about the x3d-public mailing list