[x3d-public] X3D Ontology question: can we define default values for attributes and field types
Don Brutzman
brutzman at nps.edu
Sun Dec 6 22:42:15 PST 2020
Jakub, during tonight's update I just noticed that we don't include default values for attributes.
* https://www.web3d.org/x3d/content/semantics/semantics.html
* http://www.web3d.org/specifications/X3dOntology4.0.ttl
Wondering if defining default values in the ontolorgy is worthwhile. Having those would allow querying of
- whether default value matches an instance value for a node's field,
- provide default value when no instance value is provided for a node's field.
Not clear if we need default values, but since the question is expressible then having default values available might be useful in a query.
How would we express defaults? Given existing X3D Ontology definitions like:
=====================
:X3D a owl:Class ;
rdfs:label "X3D is the root node for an Extensible 3D (X3D) Graphics model." .
:version a owl:DatatypeProperty ;
rdfs:subPropertyOf :accessTypeInputOutput ;
rdfs:domain :X3D ;
rdfs:range :x3dVersionChoices .
=====================
perhaps insert defaultValue as subPropertyOf :version, which could work for a majority of fields. however there are some fields with the same name but different default values for different parent nodes - for example, there are about a dozen definitions of a "type" field for various nodes across the full X3D vocabulary and no two are the same.
if somehow that defaultValue information is included in ontology, we might write Object Properties for hasDefaultValue but that seems pretty convoluted.
Alternatively we could go "brute force" and directly define new properties on the node's class, something like the following. The following construct is likely not well expressed but hopefully describes the idea:
:versionDefault a owl:DatatypeProperty ;
rdfs:subPropertyOf :x3dVersionChoices; # :SFString
rdfs:domain :X3D ; # parent node class
rdfs:range '4.0' . # fixed value
Whatever the appropriate structure might be (if there is one!) to define default values, then the pattern will be easy to follow for automated production in the ontology.
Going beyond attributes, we might also create similar expressions of the X3D field types, for example default value of :SFInt32 is 0.
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