[x3d-public] how to best represent X3D enumeration values in X3D Ontology? closed and open sets

Don Brutzman brutzman at nps.edu
Thu Mar 18 21:58:06 PDT 2021


Jakub, I suspect that OWL Enumeration class is part of the solution.

====================================
https://www.w3.org/TR/owl-primer/#Enumeration_of_Individuals

5.4 Enumeration of Individuals

A very straightforward way to describe a class is just to enumerate all its instances. OWL provides this possibility, e.g. we can create a class of birthday guests:
Functional-Style Syntax

  EquivalentClasses(
    :MyBirthdayGuests
    ObjectOneOf( :Bill :John :Mary)
  )
====================================

Note however we have two kinds of string-constant enumerations in X3D: strictly closed sets (i.e. Values) and open sets (i.e. Choices).  So we need appropriate patterns for each kind in the X3D Ontology.

X3D XML Schema excerpted examples follow, identical information available in X3DUOM.

       <!-- For schema xs:simpleType with contained xs:enumeration definitions, follow naming convention of name ending in 'Type', 'Choices' (for strict enumeration set) or 'Values' (for suggested tokens). -->

       <SimpleType name="fontFamilyValues"
                   baseType="MFString"
                   appinfo="fontFamilyValues are supported enumeration values for FontStyle/ScreenFontStyle node family field. Unbounded, additional values are allowed."
                   documentation="https://www.web3d.org/specifications/X3Dv4Draft/ISO-IEC19775-1v4-WD3/Part01/components/text.html#Fontfamilyandstyle">
          <enumeration value=""SANS""
                       appinfo="default font family for sans-serif font such as Helvetica"/>
          <enumeration value=""SERIF""
                       appinfo="default font family for serif font such as Times-Roman"/>
          <enumeration value=""TYPEWRITER""
                       appinfo="default font family for a fixed-pitch font such as Courier"/>
       </SimpleType>

       <SimpleType name="fontStyleChoices"
                   baseType="xs:NMTOKEN"
                   appinfo="fontStyleChoices are strictly allowed enumeration values for FontStyle/ScreenFontStyle node style field. Bounded, no additional values are allowed."
                   documentation="https://www.web3d.org/specifications/X3Dv4Draft/ISO-IEC19775-1v4-WD3/Part01/components/text.html#Fontfamilyandstyle">
          <enumeration value="PLAIN" appinfo="default plain type"/>
          <enumeration value="BOLD" appinfo="boldface type"/>
          <enumeration value="ITALIC" appinfo="italic type"/>
          <enumeration value="BOLDITALIC" appinfo="bold and italic type"/>
       </SimpleType>



On 3/17/2021 2:40 AM, Brutzman, Donald (Don) (CIV) wrote:
> Hi Jakub.  I have added GeoMetadata.summary and HAnimHumanoid.info enumeration descriptions from X3D Architecture specification into X3D XML schema, X3DUOM and X3D ontology.  This is a partial step towards custom queries for metadata properties, similar to our head/META queries.
> 
> X3D Ontology representations now look like this:
> 
> :geoMetadataKeyValues rdf:type rdfs:Datatype ;
>    rdfs:label "geoMetadataKeyValues" ;
>    dc:description "The keyword values for the summary field" ;
>    rdfs:domain xsd:NMTOKEN ;
>    rdfs:range [ owl:oneOf ( 'title' 'description' 'coordinateSystem' 'horizontalDatum' 'verticalDatum' 'ellipsoid' 'extent' 'resolution' 'originator' 'copyright' 'date' 'metadataFormat' 'dataUrl' 'dataFormat' ) ] .
> # title "A name to succinctly identify the dataset to user. For example, "San Francisco, California"."
> # description "A brief textual description or summary of the content of the dataset. For example, "LANDSAT 7 satellite imagery taken over northern Scotland"."
> # coordinateSystem "The spatial reference frame used to represent the data (e.g., GD, UTM, or LCC). The list of valid codes that can be used in this field are defined in ISO/IEC 18026. In the case of UTM, the zone number should also be specified in the format "UTM Zx", where the zone number is in the range [1,60]. For example, "UTM Z11"."
> # horizontalDatum "The name of the geodetic datum. The list of valid codes that can be used in this field are defined in ISO/IEC 18026. For example, "W84"."
> # verticalDatum "The name of the vertical datum (geoid). The list of valid codes that can be used in this field are defined in ISO/IEC 18026. For example, "W84"."
> # ellipsoid "The name of the geodetic ellipsoid. The list of valid codes that can be used in this field are defined in ISO/IEC 18026. For example, "WE"."
> # extent "The bounding coordinates for the dataset given in spatial reference frame specified by the coordinateSystem keyword. These are provided in the order eastmost, southmost, westmost, northmost. An example for GD is: "-180.0 -90.0 180.0 90.0"."
> # resolution "SFFloat resolution, or ground sample distance, given in units of length base units. For example, "30"."
> # originator "A string defining the originator of the data, for example the author, agency, organization, publisher, etc. For example, "John Doe, Any Corporation, Some Town, Some Country""
> # copyright "Any appropriate copyright declaration that pertains to the data. For example, "(c) Copyright 2000, Any Corporation. All rights reserved. Freely distributable.""
> # date "A single date/time, or a date/time range, defining the valid time period to which the data pertains. Dates are specified in the format "YYYY MM DD [HH:MM]". Years in the current time period should be specified using four digits (EXAMPLE "1999" or "2001"). Years can have other than four digits and can be negative. A date range is specified by supplying two values separated by a "-" (hyphen) character. An optional time can be supplied should this level of accuracy be required. Times are to be specified in 24-hour format with respect to GMT. For example, "1999 01 01 00:00 - 1999 12 31 23:59"."
> # metadataFormat "A string that specifies the format of the external metadata description specified by the url field of the GeoMetadata node. For example, "FGDC", "ISO TC211", "CEN TC287", or "OGC"."
> # dataUrl "A hypertext link to the source data used to create the X3D node(s) to which this metadata pertains. Multiple dataUrl keyword/value pairs can be specified in order to provide alternative locations for the same source data. For example, "[...]."
> # dataFormat "A free-text string that describes the format of the source data used to create the X3D node(s) to which this metadata pertains. This refers to the source data specified by the dataUrl keyword (if present). For example, "USGS 5.5-min DEM"."
> 
> :hanimHumanoidInfoKeyValues rdf:type rdfs:Datatype ;
>    rdfs:label "hanimHumanoidInfoKeyValues" ;
>    dc:description "Keyword names for keyword=value metadata pairs describing a given HAnimHumanoid. Additional keyword=value pairs may be included as needed for specific applications." ;
>    rdfs:domain xsd:NMTOKEN ;
>    rdfs:range [ owl:oneOf ( 'authorName' 'authorEmail' 'copyright' 'creationDate' 'usageRestrictions' 'humanoidVersion' 'age' 'gender' 'height' 'weight' ) ] .
> # authorName "Name of Humanoid author."
> # authorEmail "Email address of Humanoid author."
> # copyright "Copyright information for this Humanoid model (if any)."
> # creationDate "Creation data for this for this Humanoid model."
> # usageRestrictions "Usage restrictions for this Humanoid model (if any)."
> # humanoidVersion "The humanoidVersion term refers to the version of the humanoid being used, in order to track revisions to the data. It is not the same as the version field of the Humanoid object, which refers to the version of the HAnim specification that was used when building the humanoid."
> # age "Description of Humanoid age (not necessarily numeric)."
> # gender "The gender term typically has a value of female, male or neuter."
> # height "SFFloat Humanoid height in base units (typically meters)."
> # weight "SFFloat Humanoid weight in base units (typically kilograms)."
> 
> Seems like we ought to be able to do better than comments here.  Not sure what form of rdf/rdfs representation is best suited, though.
> 
> Also missing is a place to put the url reference providing authoritative semantics.  These links can be found in the X3DUOM, they are just not getting pulled through into the ontology yet.  X3DUOM excerpt:
> 
> * [...]
> 
>        <SimpleType name="geoMetadataKeyValues"
>                    baseType="xs:NMTOKEN"
>                    appinfo="The keyword values for the summary field"
>                    documentation="[...]">
>           <enumeration value="title"
>                        appinfo="A name to succinctly identify the dataset to user. For example, "San Francisco, California"."/>
>           <enumeration value="description"
>                        appinfo="A brief textual description or summary of the content of the dataset. For example, "LANDSAT 7 satellite imagery taken over northern Scotland"."/>
>           <enumeration value="coordinateSystem"
>                        appinfo="The spatial reference frame used to represent the data (e.g., GD, UTM, or LCC). The list of valid codes that can be used in this field are defined in ISO/IEC 18026. In the case of UTM, the zone number should also be specified in the format "UTM Zx", where the zone number is in the range [1,60]. For example, "UTM Z11"."/>
>           <enumeration value="horizontalDatum"
>                        appinfo="The name of the geodetic datum. The list of valid codes that can be used in this field are defined in ISO/IEC 18026. For example, "W84"."/>
>           <enumeration value="verticalDatum"
>                        appinfo="The name of the vertical datum (geoid). The list of valid codes that can be used in this field are defined in ISO/IEC 18026. For example, "W84"."/>
>           <enumeration value="ellipsoid"
>                        appinfo="The name of the geodetic ellipsoid. The list of valid codes that can be used in this field are defined in ISO/IEC 18026. For example, "WE"."/>
>           <enumeration value="extent"
>                        appinfo="The bounding coordinates for the dataset given in spatial reference frame specified by the coordinateSystem keyword. These are provided in the order eastmost, southmost, westmost, northmost. An example for GD is: "-180.0 -90.0 180.0 90.0"."/>
>           <enumeration value="resolution"
>                        appinfo="SFFloat resolution, or ground sample distance, given in units of length base units. For example, "30"."/>
>           <enumeration value="originator"
>                        appinfo="A string defining the originator of the data, for example the author, agency, organization, publisher, etc. For example, "John Doe, Any Corporation, Some Town, Some Country""/>
>           <enumeration value="copyright"
>                        appinfo="Any appropriate copyright declaration that pertains to the data. For example, "(c) Copyright 2000, Any Corporation. All rights reserved. Freely distributable.""/>
>           <enumeration value="date"
>                        appinfo="A single date/time, or a date/time range, defining the valid time period to which the data pertains. Dates are specified in the format "YYYY MM DD [HH:MM]". Years in the current time period should be specified using four digits (EXAMPLE "1999" or "2001"). Years can have other than four digits and can be negative. A date range is specified by supplying two values separated by a "-" (hyphen) character. An optional time can be supplied should this level of accuracy be required. Times are to be specified in 24-hour format with respect to GMT. For example, "1999 01 01 00:00 - 1999 12 31 23:59"."/>
>           <enumeration value="metadataFormat"
>                        appinfo="A string that specifies the format of the external metadata description specified by the url field of the GeoMetadata node. For example, "FGDC", "ISO TC211", "CEN TC287", or "OGC"."/>
>           <enumeration value="dataUrl"
>                        appinfo="A hypertext link to the source data used to create the X3D node(s) to which this metadata pertains. Multiple dataUrl keyword/value pairs can be specified in order to provide alternative locations for the same source data. For example, [...]
>           <enumeration value="dataFormat"
>                        appinfo="A free-text string that describes the format of the source data used to create the X3D node(s) to which this metadata pertains. This refers to the source data specified by the dataUrl keyword (if present). For example, "USGS 5.5-min DEM"."/>
>        </SimpleType>
> 
> Updates checked in, uploading to our regular site
> 
> [...]
> 
> Please advise on how you think we might best update X3D Ontology design represent individual enumeration values, including documentation and descriptions.

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