[x3d-public] X3DUOM: Objections for creating aliases for these fields? also updating X3D Ontology

Don Brutzman brutzman at nps.edu
Sun Jan 10 23:11:23 PST 2021


Hi John, excellent question.

On 1/5/2021 10:43 PM, John Carlson wrote:
> 
> These appear at least twice in X3DUOM.   Can we create aliases?
> 
>             <field name="backTexture"
> 
>              <field name="bottomTexture"
> 
>              <field name="frontTexture"
> 
>              <field name="leftTexture"
> 
>              <field name="rightTexture"
> 
>              <field name="topTexture"
> 
> The alias names would be back, bottom, front, left, right, and top.
> 
> Thanks,
> 
> John

1. The information you seek is already included in X3DUOM 4.0.  These were accomplished in late November 2020 as we sorted out the issue for X3D4.

* X3D Unified Object Model (X3DUOM)
   https://www.web3d.org/specifications/X3DUOM.html

* https://www.web3d.org/specifications/X3dUnifiedObjectModel-4.0.xml

Example excerpt, see 'synonym' attribute defining backwards compatibility to X3D3:

       <ConcreteNode name="ComposedCubeMapTexture">
          <InterfaceDefinition specificationUrl="https://www.web3d.org/specifications/X3Dv4Draft/ISO-IEC19775-1v4-WD2/Part01/components/environmentalTexturing#ComposedCubeMapTexture"
                               appinfo="ComposedCubeMapTexture is a texture node that defines a cubic environment map source as an explicit set of images drawn from individual 2D texture nodes.">
             <componentInfo name="CubeMapTexturing" level="1"/>
             <Inheritance baseType="X3DEnvironmentTextureNode"/>
             <field name="backTexture"
                    synonym="back"
                    type="SFNode"
                    accessType="inputOutput"
                    default="NULL"
                    acceptableNodeTypes="X3DTexture2DNode"/>
             <field name="bottomTexture"
                    synonym="bottom"
                    type="SFNode"
                    accessType="inputOutput"
                    default="NULL"
                    acceptableNodeTypes="X3DTexture2DNode"/>

The list of all affected node fields getting renamed for X3D4 is found at

* X3D Scene Authoring Hints, Field name changes planned for improved consistency
   https://www.web3d.org/x3d/content/examples/X3dSceneAuthoringHints.html#fieldNameChanges

You can also find these noted as warnings in X3D Tooltips, for example

* X3D Tooltips: ComposedCubeMapTexture
   https://www.web3d.org/x3d/content/X3dTooltips.html#ComposedCubeMapTexture
   https://www.web3d.org/x3d/content/X3dTooltips.html#ComposedCubeMapTexture.backTexture

I did not provide corresponding pairs of utility methods in X3DJSAIL Java, seemed like a possible source of programmer error/confusion since each field can have multiple invocation methods.

* ComposedCubeMapTexture getBackTexture
   http://www.web3d.org/specifications/java/javadoc/org/web3d/x3d/jsail/CubeMapTexturing/ComposedCubeMapTexture.html#getBackTexture()

* ComposedCubeMapTexture setBackTexture
   http://www.web3d.org/specifications/java/javadoc/org/web3d/x3d/jsail/CubeMapTexturing/ComposedCubeMapTexture.html#setBackTexture(org.web3d.x3d.sai.Texturing.X3DTexture2DNode)

Similarly you won't find corresponding utility methods implemented in X3DPSAIL Python x3d.py codebase, being strict is most Pythonic.

---

2. Related: HAnim enumerations (which are extensive) list equivalent aliases:

             <field name="name"
                    type="SFString"
                    accessType="inputOutput"
                    additionalEnumerationValuesAllowed="true"
                    simpleType="hanimFeaturePointNameValues"
                    baseType="xs:NMTOKEN">
                <enumeration value="skull_vertex"
                             index="0"
                             alias="vertex"
                             loa="1"
                             parent="skull"
                             appinfo="CAESAR 2003 skull_vertex matches ISO 7250-1 part 5.22 Vertex (top of head). No corresponding landmark provided in CAESAR 2018."
                             documentation="https://en.wikipedia.org/wiki/Vertex_(anatomy)"/>
HAnimJoint:

             <field name="name"
                    type="SFString"
                    accessType="inputOutput"
                    additionalEnumerationValuesAllowed="true"
                    simpleType="hanimJointNameValues"
                    baseType="xs:NMTOKEN">
                <enumeration value="humanoid_root"
                             index="1"
                             loa="0"
                             documentation="https://en.wikipedia.org/wiki/Outline_of_human_anatomy#Joints"/>
                <enumeration value="sacroiliac"
                             index="2"
                             alias="SIJ"
                             parent="humanoid_root"
                             loa="1"
                             documentation="https://en.wikipedia.org/wiki/Sacroiliac_joint"/>
                <enumeration value="l_hip"
                             index="3"
                             parent="sacroiliac"
                             loa="1"
                             documentation="https://en.wikipedia.org/wiki/Hip"/>
                <enumeration value="l_knee"
                             index="4"
                             parent="l_hip"
                             loa="1"
                             documentation="https://en.wikipedia.org/wiki/Knee"/>
                <enumeration value="l_talocrural"
                             index="5"
                             alias="l_ankle"
                             parent="l_knee"
                             loa="1"
                             documentation="https://en.wikipedia.org/wiki/Ankle"/>

---

3. Jakub, on our next X3D Ontology call, can we please look at how to represent these in OWL/RDFS.

Goal: define equivalent properties that are sufficient to query consistently across X3D3 and X3D4 models using either field name.

Current excerpt, with no recognition of synonyms:

:ComposedCubeMapTexture a owl:Class ;
   rdfs:subClassOf :X3DEnvironmentTextureNode ;
   rdfs:label "ComposedCubeMapTexture is a texture node that defines a cubic environment map source as an explicit set of images drawn from individual 2D texture nodes." .
:hasBackTexture a owl:ObjectProperty ;
   rdfs:subPropertyOf :accessTypeInputOutput ;
   rdfs:domain :ComposedCubeMapTexture ;
   rdfs:range :X3DTexture2DNode ;
   rdfs:subPropertyOf :hasChild .
:fieldBackTextureHasParentComposedCubeMapTexture a owl:ObjectProperty ;
   owl:inverseOf :hasBackTexture ;
   rdfs:subPropertyOf :hasParentComposedCubeMapTexture .

There aren't too many of these synonyms.  We might duplicate them with synonym, for example as follows, but that doesn't permit equivalence across multiple-model queries:

:hasBack a owl:ObjectProperty ;
   rdfs:subPropertyOf :accessTypeInputOutput ;
   rdfs:domain :ComposedCubeMapTexture ;
   rdfs:range :X3DTexture2DNode ;
   rdfs:subPropertyOf :hasChild .

... or we could declare the synonym as a subproperty of the original property?

:hasBack a owl:ObjectProperty ;
   rdfs:subPropertyOf :hasBackTexture ;
   rdfs:domain :ComposedCubeMapTexture ;
   rdfs:range :X3DTexture2DNode ;
   rdfs:subPropertyOf :hasChild .

... but perhaps best to add an equivalence definition, perhaps using approach shown in

* OWL 2 Web Ontology Language Primer (Second Edition)
   W3C Recommendation 11 December 2012
   https://www.w3.org/TR/owl2-primer

* OWL 2 Web Ontology Language
   Structural Specification and Functional-Style Syntax (Second Edition)
   9.2.2 Equivalent Object Properties
   https://www.w3.org/TR/owl2-syntax/#Equivalent_Object_Properties

... or, most simply perhaps, the following two additions appear complete and work in Protege:

* https://www.w3.org/2007/OWL/wiki/PrimerExampleTurtle

:hasBack a owl:ObjectProperty ;
   owl:equivalentProperty :hasBackTexture .

:fieldBackHasParentComposedCubeMapTexture a owl:ObjectProperty ;
   owl:equivalentProperty :fieldBackTextureHasParentComposedCubeMapTexture  .

Am guessing addition of those last two property definitions as synonym pattern might work well.

Please look it over, thanks.

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