[x3d-public] X3D Semantic Web minutes 29 June 2020: updated ontology release, query progress

Don Brutzman brutzman at nps.edu
Mon Jun 29 14:01:03 PDT 2020


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

Confirmed: no Web3D Consortium member-only information is included in these minutes.

1. Fixed several subtle flaws in X3D Ontology.

[1] X3D Ontology for Semantic Web
     https://www.web3d.org/x3d/content/semantics/semantics.html

[2] X3D Ontology X3dOntology4.0.ttl
     https://www.web3d.org/x3d/content/semantics/ontologies/X3dOntology4.0.ttl

Also produced a version using RDF syntax via Protege.

[3] X3D Ontology X3dOntology4.0.rdf
     https://www.web3d.org/x3d/content/semantics/ontologies/X3dOntology4.0.rdf

The X3D Ontology gets validated two ways during production:  ARQ and Protege.

Need to test, the online validator currently does not accept turtle... RDF copy paste was too big.

a. Enumeration variable Values/Choices lists had range defined but not domain.  Fixed, surprising the tools didn't flag this.

:pickSensorMatchCriterionChoices rdf:type rdfs:Datatype ;
   rdfs:label "pickSensorMatchCriterionChoices" ;
   dc:description "pickSensorMatchCriterionChoices are strictly allowed enumeration values for X3DPickSensorNode node matchCriterion field. Bounded, no additional values are allowed." ;
   rdfs:domain :xsd:NMTOKEN ;  ### previously missing ###
   rdfs:range [ owl:oneOf ( 'MATCH_ANY' 'MATCH_EVERY' 'MATCH_ONLY_ONE' ) ] .
# MATCH_ANY "any match of objectType values is acceptable"
# MATCH_EVERY "every objectType value in X3DPickSensorNode and X3DPickableObject shall match"
# MATCH_ONLY_ONE "one and only one objectType value can match"

Wow, Jakub noticed a big problem: there should be no colon before xsd:NMTOKEN !!

This took a little doing but we fixed.  Elapsed time, 15 minutes.  Pair programming (aka extreme programming) really helps!!

Then ran unit tests of all queries, and found some related problems getting fixed that we didn't expect.  Version control of logs really helps!!

b. Enumeration variable lists were utilizing owl:unionOf lists of nodes and types, as part of rdfs:domain, which mostly worked but had some examples creating "blank nodes (bnodes)" which caused owldoc problems (and goodness knows what other potential inference problems). This problem didn't occur in rdfs:range definitions.
   
Because errors were inconsistent in Protege, very tricky to track down.

Finally got proper syntax by deleting a construct in Protege, manually re-creating it via interface, and then saving into turtle output to see what syntax Protege preferred.  Turned out to be simpler, can just omit RDF list representation owl:oneOf [ ] and simply list the nodes/types.  Simple is good.

TODO: Don will look at all other owl:oneOf constructs and confirm/deny whether they are necessary.

Example correct implementation:

:matchCriterion a owl:DatatypeProperty ;
   rdfs:label "X3DPickSensorNode field matchCriterion is implemented by multiple nodes." ;
   rdfs:subPropertyOf :accessTypeInputOutput ;
   rdfs:domain :X3DPickSensorNode , :LinePickSensor , :PointPickSensor , :PrimitivePickSensor , :VolumePickSensor ;
   rdfs:range :pickSensorMatchCriterionChoices .

c. Ensured that only xsd: namespace used within X3D Ontology, matching Protege approach and eliminating several apparent ambiguities.

d. Cleaned up a few Protege warnings about "punning" overloading of IS (as DatatypeProperty and ObjectProperty) by dedicating :IS to class and changing the SFNode field accessor to :hasIS.  Also made :metadata SFNode field more consistent by renaming as :hasMetadata instead.

---

2. Improvement in X3dToTurtle.xslt stylesheet.

:DEF and :USE values were not getting generated during model conversion.  This ontology feature simplifies pattern matching.  Restored, running updates to all models in X3D Example Archives overnight.

Example conversion:

     <TimeSensor DEF='OrbitalTimeInterval' cycleInterval='12'/>
to

:OrbitalTimeInterval a owl:NamedIndividual, x3do:TimeSensor ;
   x3do:hasParent :Scene ;
   x3do:DEF 'OrbitalTimeInterval' ;
   x3do:cycleInterval '12' .

---

3. Initial ROUTE query

Now that we have accessType and DEF defined throughout, can get to work on queries that check if a ROUTE connection is well-defined and matches both type and accessType.

[4] X3D Ontology for Semantic Web: Queries
     https://www.web3d.org/x3d/content/semantics/semantics.html#Queries

see last entry in table:

* https://www.web3d.org/x3d/content/semantics/examples/HelloX3dAuthorsAnimationChain.x3d
* https://www.web3d.org/x3d/content/semantics/examples/HelloX3dAuthorsAnimationChain.html
* https://www.web3d.org/x3d/content/semantics/examples/HelloX3dAuthorsAnimationChain.ttl

* https://www.web3d.org/x3d/content/semantics/queries/HelloX3dAuthorsAnimationChainQuery_01.rq.txt

Initial inspection/extraction of ROUTE values works.  Now working on removing duplication entries for fromNodeTypeFound.

----------------------------------------------------------------------------------------------------------------------------------------------------------------------
| parentNode              | RouteFound    | fromNodeDEF               | fromNodeTypeFound            | fromField          | toNodeDEF               | toField        |
======================================================================================================================================================================
| "Scene"                 | "ROUTE_2_5"   | "OrbitalTimeInterval"     | owl:NamedIndividual          | "fraction_changed" | "SpinThoseThings"       | "set_fraction" |
| "Scene"                 | "ROUTE_2_5"   | "OrbitalTimeInterval"     | x3do:TimeSensor              | "fraction_changed" | "SpinThoseThings"       | "set_fraction" |
| "EarthCoordinateSystem" | "ROUTE_2_6_1" | "SpinThoseThings"         | owl:NamedIndividual          | "value_changed"    | "EarthCoordinateSystem" | "set_rotation" |
| "EarthCoordinateSystem" | "ROUTE_2_6_1" | "SpinThoseThings"         | x3do:OrientationInterpolator | "value_changed"    | "EarthCoordinateSystem" | "set_rotation" |
| "EarthCoordinateSystem" | "ROUTE_2_6_5" | "ClickTriggerTouchSensor" | owl:NamedIndividual          | "touchTime"        | "OrbitalTimeInterval"   | "startTime"    |
| "EarthCoordinateSystem" | "ROUTE_2_6_5" | "ClickTriggerTouchSensor" | x3do:TouchSensor             | "touchTime"        | "OrbitalTimeInterval"   | "startTime"    |
----------------------------------------------------------------------------------------------------------------------------------------------------------------------

# TODO Node types, field types, accessTypes, diagnostics for matches

We next worked on the FILTER queries, and good news!! The corrections we just made now leads to both queries working OK.  But... we still have a problem getting output to display properly, in other words we are not binding ?fromNodeTypeFound to an output string properly after the filter occurs.

Query results:
arq --data=ontologies/X3dOntology4.0.ttl --query=queries/HelloX3dAuthorsAnimationChainQuery_01.rq --graph=examples/HelloX3dAuthorsAnimationChain.ttl
-----------------------------------------------------------------------------------------------------------------------------------------------------------
| parentNode              | RouteFound    | fromNodeDEF               | fromNodeTypeFound | fromField          | toNodeDEF               | toField        |
===========================================================================================================================================================
| "Scene"                 | "ROUTE_2_5"   | "OrbitalTimeInterval"     |                   | "fraction_changed" | "SpinThoseThings"       | "set_fraction" |
| "EarthCoordinateSystem" | "ROUTE_2_6_1" | "SpinThoseThings"         |                   | "value_changed"    | "EarthCoordinateSystem" | "set_rotation" |
| "EarthCoordinateSystem" | "ROUTE_2_6_5" | "ClickTriggerTouchSensor" |                   | "touchTime"        | "OrbitalTimeInterval"   | "startTime"    |
-----------------------------------------------------------------------------------------------------------------------------------------------------------

This shows how fundamentally important it is to have everything _exactly correct_ or else results are confounding.

Next steps: keep improving SPARQL query, good progress today.  Not there yet.

Weekly call is Monday 0830 pacific, have fun with X3D Query!

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