[x3d-public] [Semantics] X3DMetadataObject refactoring for X3D XML Schema, X3DUOM, X3DJSAIL and X3D Ontology progress

John Carlson yottzumm at gmail.com
Tue Sep 17 14:11:42 PDT 2019


Don, is this worth updating the autogenerated JSON schema to handle stuff you posted?
====================================================================================================================
Would welcome discussions on how to convert XML data to OWL/RDF/RDFS.  Once we get a good pattern for an element, I will start a serializer or stylesheet (prototypical stylesheet recommendations?).   Also, is there a naming schema for the stylesheet file you want to use for converting XML data?

Alternatively, I have seen some online converters, but I’m not sure if we can do that or not.

We needs patients for the doctors to examine, right?   It takes a psychologist to examine an Archetype and a doctor to examine a Prototype.

Has the abstract ontology settled enough for us to start handling individuals?

I assume we will follow the roundtrip methodology from RDF individuals back to XML data.

Thanks,

John

Sent from Mail for Windows 10

From: Brutzman, Donald (Don) (CIV)
Sent: Monday, September 16, 2019 3:35 PM
To: Jakub Flotyński; semantics at web3d.org; X3D Graphics public mailing list
Subject: Re: [Semantics] X3DMetadataObject refactoring for X3D XML Schema,X3DUOM, X3DJSAIL and X3D Ontology progress

While adapting X3DUOM, noticed an important mistake:  X3DMetadataObject was a subclass of X3DNode, which is incorrect.  All of the X3D*Object definitions are abstract interfaces, and not part of a class hierarchy.  This refactoring of the Metadata* nodes fixes a major problem that Roy Walmsley unsuccessfully wrestled with a few years back, thankfully.

As with any X3DUOM change, it ripples out in multiple directions:

====================================================================
XML Schema changelog:
https://www.web3d.org/specifications/x3d-schema-changelog.txt

15 SEP 2019, brutzman
- X3DMetadataObject is abstract and cannot implement X3DNode, this changed
   Metadata* node inheritance signatures
- Improved X3DUOM inclusion of inheritedFrom object types and interfaces
- TODO check Layout*, Script and Shader* nodes for potentially similar issues

====================================================================
Updated XML schemas and documentation available at

X3D Specifications: Schema and DOCTYPE Validation
http://www.web3d.org/specifications

http://www.web3d.org/specifications/x3d-4.0.xsd
http://www.web3d.org/specifications/X3dSchemaDocumentation4.0/x3d-4.0.html

====================================================================
Updated X3DUOM, Java package, Python package and X3D Ontology, all autogenerated and cross checked:

http://www.web3d.org/specifications/X3dUnifiedObjectModel-4.0.xml

https://www.web3d.org/specifications/java/X3dJavaSceneAuthoringInterface.html

https://www.web3d.org/x3d/stylesheets/python/python.html

====================================================================
Directories for version control can provide diffs if full detail is desired:

https://sourceforge.net/p/x3d/code/HEAD/tree/www.web3d.org/semantics/

https://sourceforge.net/p/x3d/code/HEAD/tree/www.web3d.org/specifications/

https://sourceforge.net/p/x3d/code/HEAD/tree/www.web3d.org/x3d/stylesheets/
https://sourceforge.net/p/x3d/code/HEAD/tree/www.web3d.org/x3d/stylesheets/java
https://sourceforge.net/p/x3d/code/HEAD/tree/www.web3d.org/x3d/stylesheets/python

====================================================================
Further progress with autogenerated ontology includes offline query testing:

https://www.web3d.org/x3d/content/semantics/ontologies/X3dOntology4.0.ttl
https://www.web3d.org/x3d/content/semantics/ontologies/X3dOntologyQueries.rq
https://www.web3d.org/x3d/content/semantics/build.all.log.txt

excerpt follows:

Test X3D Ontology queries
=========================
# X3dOntologyQueries.rq

PREFIX rdf:  <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX owl:  <http://www.w3.org/2002/07/owl#>
PREFIX xsd:  <http://www.w3.org/2001/XMLSchema#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX x3d:  <https://www.web3d.org/specifications/x3d-4.0.xsd#>
PREFIX x3do: <https://www.web3d.org/semantics/ontologies/X3dOntology4.0#>

###############################################

SELECT distinct ?property ?domain ?range
WHERE
{
	?property rdfs:range  ?range .
	?property rdfs:domain ?domain .
}
ORDER by ASC(?property) # alphabetize

###############################################
=========================

C:\languages\java\apache-jena-3.12.0\bat\arq.bat --data ontologies/X3dOntology4.0.ttl --query X3dOntologyQueries.rq
---------------------------------------------------------------------------------------------------------------------------------------
| property                                        | domain                                  | range                                   |
=======================================================================================================================================
| x3do:AS                                         | x3do:EXPORT                             | x3d:SFString                            |
| x3do:AS                                         | x3do:IMPORT                             | x3d:SFString                            |
| x3do:DEF                                        | x3do:Anchor                             | x3d:SFString                            |
| x3do:DEF                                        | x3do:Appearance                         | x3d:SFString                            |
| x3do:DEF                                        | x3do:Arc2D                              | x3d:SFString                            |
[...]

This was accomplished using Apache Jena ARQ, which validates the ontology while performing the query.

	ARQ - A SPARQL Processor for Jena
	https://jena.apache.org/documentation/query

Next up will be a better documentation page for collecting and presenting that work.

Finally Jakub - I got things to the point where the following pattern could be improved, but so many previously filtered properties are now present that I can't find what your example below says.  I doubt it got resolved but am having trouble finding an example.  Please check and let me know again so that we can fix that pattern, TIA.

On 9/2/2019 9:20 AM, Jakub Flotyński wrote:
> Don,
> 
> I'm preparing and testing queries to the ontology and see some problems with the XSLT. Every time it meets a property in X3D UOM, it generates a triple describing its domain. E.x., for the translation property, we get:
> 
> :translationrdfs:domain:GeoTransform; :translationrdfs:domain :X3DNBodyCollidableNode ;
> :translationrdfs:domain :CADPart ;
> :translationrdfs:domain :EspduTransform ;
> ...
> 
> It is wrong. Instead, it should be:
> 
> :translationrdfs:domain[ owl:unionOf (:GeoTransform  :X3DNBodyCollidableNode :CADPart :EspduTransform ... ) ] ;
> 
> Could you please send me the XSLT? I don't see it in the repositoryhttps://sourceforge.net/p/x3d/code/HEAD/tree/www.web3d.org/semantics/.
> I would try to correct it.
> 
> Best regards
> Jakub
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
-- 
Semantics mailing list
Semantics at web3d.org
http://web3d.org/mailman/listinfo/semantics_web3d.org

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://web3d.org/pipermail/x3d-public_web3d.org/attachments/20190917/1071ec98/attachment-0001.html>


More information about the x3d-public mailing list