[x3d-public] X3D Semantic Web minutes 26 JAN 2021: X3D Ontology, new SPARQL queries for meta information, Dublin Core

Don Brutzman brutzman at nps.edu
Tue Jan 26 17:05:27 PST 2021


Attendees: Jakub and Don.  We primarily discussed the query examples listed in the agenda section below, details follow here.

1. When looking at the meta queries, we reviewed how 'meta' elements are always contained within a 'head' element (just like HTML) for document data.  Query/response AllDocumentMetaInformation.rq.txt illustrates this working in SPARQL. Checking further, we found

:head a owl:Class ;
   rdfs:label "Functional summary: each X3D scene includes a head statement that can contain component, unit and meta statements." .

:hasMeta a owl:ObjectProperty ;
   rdfs:subPropertyOf :accessTypeInputOutput ;
   rdfs:domain :head ;
   rdfs:range :meta ;
   rdfs:subPropertyOf :hasChild ;
   rdfs:label "Add meta statements to provide metadata information about this X3D model." .

... which makes sense.  We then looked for the inverse (meta relationship to parent head tag) and didn't immediately see it.  Looking further, found that is strictly defined as the inverse to ensure logical consistency:

:fieldMetaHasParenthead a owl:ObjectProperty ;
   owl:inverseOf :hasMeta ;
   rdfs:subPropertyOf :hasParenthead .

So... good test of the X3D Ontology.  Of note is that X3D component and UNIT statements have identical constructs so these design patterns for reasoning and query remain consistent.

---

2. Next we took a good look at the meta information itself.  The first example AllDocumentMetaInformation.rq.txt demonstrates how specific Dublin Core metadata items can be found via SPARQL query.  It is a rich set of terms and properties that can be queried.

We added to this query to show that inclusion of the OPTIONAL keyword makes the query much more robust.  If any data item is missing, then OPTIONAL allows selection of all values present without the the missing without blocking other queries.

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

SELECT ?title ?MISSING ?modified ?hasLicense

WHERE
{
     # [... as before ...]

     OPTIONAL # allows missing data without blocking other properties
     {
         ?meta9 a x3do:meta ;
                x3do:name         ?name8 ;
                x3do:content      ?content8 .
         FILTER (CONTAINS ( str(?name9),     "MISSING"))
         BIND  (str(?content9)         AS    ?MISSING)
         BIND ((STRLEN(?content9) > 0) AS ?hasMISSING)
     }

Query results:
arq --data=ontologies/X3dOntology4.0.ttl --query=queries/DocumentMetaProperties.rq --graph=examples/HelloX3dAuthorsAnimationChain.ttl
----------------------------------------------------------------------------------
| title                               | MISSING | modified          | hasLicense |
==================================================================================
| "HelloX3dAuthorsAnimationChain.x3d" |         | "20 October 2019" | true       |
----------------------------------------------------------------------------------

---

3. We next looked at how we might go further with Dublin Core metadata.

* X3D Tooltips: head and meta Statements
   https://www.web3d.org/x3d/tooltips/X3dTooltips.html#head
   https://www.web3d.org/x3d/tooltips/X3dTooltips.html#meta

* X3D Scene Authoring Hints: meta Statements
   https://www.web3d.org/x3d/content/examples/X3dSceneAuthoringHints.html#meta

"Dublin Core metadata terms define common conventions for default values used in name="value" attributes. Vocabulary support is provided by Dublin Core Metadata Initiative (DCMI), an open organization supporting innovation in metadata design and best practices across the metadata ecology."

* Dublin Core metadata terms
   http://www.dublincore.org/documents/dcmi-terms

"This document is an up-to-date specification of all metadata terms maintained by the Dublin Core Metadata Initiative, including properties, vocabulary encoding schemes, syntax encoding schemes, and classes."

* Dublin Core Metadata Initiative (DCMI)
   https://www.dublincore.org/about

"The Dublin Core™ Metadata Initiative supports innovation in metadata design and best practices."

Great news: Jakub found that (yes indeed, as hoped) Dublin Core includes its own ontology for DCMI meta terms.

# TODO Dublin Core Metadata Initiative (DCMI) ontology
# https://www.dublincore.org/specifications/dublin-core/dcmi-terms/dublin_core_terms.ttl
# https://www.dublincore.org/schemas/rdfs

Aligning DCMI Ontology with X3D Ontology is our next frontier for implementation efforts, such combined advanced queries are an excellent challenge.

# TODO is it possible to create DCMI terms within X3D Ontology?
# TODO consider XSLT creation of DCMI terms when converting .x3d models into Turtle .ttl?
# TODO consider SPARQL creation of DCMI terms when querying?

So, more good exploration to follow.  We are now considering further example queries and combinations that might best support X3D authors asking questions about models + metadata.

---

4. We had thought we were about to move into typed X3D Metadata* nodes and sets... not so fast! Today's progress review opened a few more toors.  By exploring Semantic Web queries combining X3D and Dublin Core metadata, we are now learning about best practices with perhaps the most important metadata vocabulary in common practice.  Onward we go.

Scheduling next week will deviate from this routine, we'll advise if our calendars can mesh together.

Have fun with X3D Semantic Web!   8)


On 1/23/2021 5:17 PM, Don Brutzman wrote:
> Jakub and I meet weekly for X3D Semantic Web Working Group.  Tuesday's agenda follows.
> 
> * Tuesday 26 JAN 2021, 0800-0845 pacific
>    https://us02web.zoom.us/j/81634670698?pwd=a1VPeU5tN01rc21Oa3hScUlHK0Rxdz09
> 
> 1. Goals
> 
> Congratulations again to Jakub for recent publication of his book!
> 
> ========================================
> 
> [1]    Jakub Flotyński, Knowledge-Based Explorable Extended Reality Environments, Springer, 2020.
>         https://www.springer.com/gp/book/9783030599645
> 
> Describes the concept, architectures, methods and tools for the spatial-temporal composition of XR environments.
> 
> This book presents explorable XR environments—their rationale, concept, architectures as well as methods and tools for spatial-temporal composition based on domain knowledge, including geometrical, presentational, structural and behavioral elements. Explorable XR environments enable monitoring, analyzing, comprehending, examining and controlling users’ and objects’ behavior and features as well as users’ skills, experience, interests and preferences.
> 
> The E-XR approach proposed in this book relies on two main pillars. The first is knowledge representation technologies, such as logic programming, description logics and the semantic web, which permit automated reasoning and queries. The second is imperative programming languages, which are a prevalent solution for building XR environments. Potential applications of E-XR are in a variety of domains, e.g., education, training, medicine, design, tourism, marketing, merchandising, engineering and entertainment.
> 
> The book’s readers will understand the emerging domain of explorable XR environments with their possible applications. Special attention is given to an in-depth discussion of the field with taxonomy and classification of the available related solutions. Examples and design patterns of knowledge-based composition and exploration of XR behavior are provided, and an extensive evaluation and analysis of the proposed approach is included.
> 
> This book helps researchers in XR systems, 3D modeling tools and game engines as well as lecturers and students who search for clearly presented information supported by use cases. For XR and game programmers as well as graphic designers, the book is a valuable source of information and examples in XR development. Professional software and web developers may find the book interesting as the proposed ideas are illustrated by rich examples demonstrating design patterns and guidelines in object-oriented, procedural and declarative programming.
> 
> ========================================
> 
> We will review working group charter goals for our X3D Ontology efforts, looking for paths forward that include and complement the approaches in this book.
> 
> [1.2]    X3D Semantic Web Working Group
>           https://www.web3d.org/working-groups/x3d-semantic-web
> 
> [1.3]    X3D Semantic Web Working Group Charter
>           https://www.web3d.org/working-groups/x3d-semantic-web/charter
> 
> ---
> 
> 2. X3D Ontology Improvements
> 
> [2]    X3D Ontology for Semantic Web
>      https://www.web3d.org/x3d/content/semantics
> 
> a. fixed an error in the ontology with some of the enumeration types, the ontology just had a solitary ":" instead of ":listOfEnumerationValues" and so it was just a blank node.
> 
> b. have added topic-sentence descriptions to every field, taken from X3D Tooltips.  That should aid user understanding of term relevance and comprehension of queries.
> 
> ---
> 
> 3. New X3D SPARQL Queries
> 
> a. Have updated layout of queries table, added bookmarks for easier reference plus some refinement of file naming.
> 
> [3]    X3D Ontology for Semantic Web: Queries
>         https://www.web3d.org/x3d/content/semantics/semantics.html#Queries
> 
> ---
> 
> b. Here is a new query that lists all document information found in head/meta
> 
> [4]    HelloX3dAuthorsAnimationChain Queries
>      https://www.web3d.org/x3d/content/semantics/semantics.html#HelloX3dAuthorsAnimationChainQueries
> 
> These are interesting design patterns for using SPARQL effectively.  This is excellent preparation for upcoming work to define queries to discover embedded Metadata* node values in a scene.
> 
> [5]    AllDocumentMetaInformation Query/Response
>      https://www.web3d.org/x3d/content/semantics/queries/AllDocumentMetaInformation.rq.txt
> 
> ###############################################
> 
> # AllDocumentMetaInformation.rq    Query to identify all document meta information.
> 
> SELECT ?metaName ?metaContent
> 
> WHERE
> {
>      ?meta  a x3do:meta ;     # Shorthand expression: a = rdf:type
>             x3do:name         ?metaName ;
>             x3do:content      ?metaContent .
> }
> 
> ###############################################
> ---------------------------------------------------------------------------------------------------------------------------------------------
> | metaName      | metaContent                                                                                                               |
> =============================================================================================================================================
> | "modified"    | "20 October 2019"                                                                                                         |
> | "generator"   | "X3D-Edit 3.3, https://savage.nps.edu/X3D-Edit"                                                                           |
> | "description" | "Fully developed animation-chain example showing spinning globe and text: Hello!"                                         |
> | "title"       | "HelloX3dAuthorsAnimationChain.x3d"                                                                                       |
> | "identifier"  | "http://X3dGraphics.com/examples/X3dForWebAuthors/Chapter07EventAnimationInterpolation/HelloX3dAuthorsAnimationChain.x3d" |
> | "license"     | "../license.html"                                                                                                         |
> | "creator"     | "Don Brutzman"                                                                                                            |
> | "reference"   | "https://www.web3d.org/x3d/content/examples/Basic/course/HelloX3dAuthorsAnimationChain.x3d"                               |
> | "created"     | "5 October 2000"                                                                                                          |
> ---------------------------------------------------------------------------------------------------------------------------------------------
> 
> ---
> 
> c. Here is another new query that lists all document meta information as specific properties.
> 
> [6]    DocumentMetaProperties Query/Response
>      https://www.web3d.org/x3d/content/semantics/queries/DocumentMetaProperties.rq.txt
> 
> ###############################################
> 
> # DocumentMetaProperties.rq    Query to identify specific document meta properties of interest.
> 
> SELECT ?title ?creator ?created ?modified ?hasLicense ?hasDescription ?hasIdentifier ?hasReference
> 
> # additional properties available:
> # ?hasTitle ?hasCreator ?hasCreated ?hasModified ?license ?description ?identifier ?reference
> 
> WHERE
> {
>      OPTIONAL
>      {
>          ?meta1 a x3do:meta ;     # Shorthand expression: a = rdf:type
>                 x3do:name         ?name1 ;
>                 x3do:content      ?content1 .
>          FILTER (CONTAINS ( str(?name1),     "title"))
>          BIND  (str(?content1)         AS    ?title)
>          BIND ((STRLEN(?content1) > 0) AS ?hasTitle)
>      }
>      OPTIONAL
>      {
>          ?meta2 a x3do:meta ;
>                 x3do:name         ?name2 ;
>                 x3do:content      ?content2 .
>          FILTER (CONTAINS ( str(?name2),     "creator"))
>          BIND  (str(?content2)         AS    ?creator)
>          BIND ((STRLEN(?content2) > 0) AS ?hasCreator)
>      }
>      OPTIONAL
>      {
>          ?meta3 a x3do:meta ;
>                 x3do:name         ?name3 ;
>                 x3do:content      ?content3 .
>          FILTER (CONTAINS ( str(?name3),     "created"))
>          BIND  (str(?content3)         AS    ?created)
>          BIND ((STRLEN(?content3) > 0) AS ?hasCreated)
>      }
>      OPTIONAL
>      {
>          ?meta4 a x3do:meta ;
>                 x3do:name         ?name4 ;
>                 x3do:content      ?content4 .
>          FILTER (CONTAINS ( str(?name4),     "modified"))
>          BIND  (str(?content4)         AS    ?modified)
>          BIND ((STRLEN(?content4) > 0) AS ?hasModified)
>      }
>      OPTIONAL
>      {
>           ?meta5 a x3do:meta ;
>                 x3do:name         ?name5 ;
>                 x3do:content      ?content5 .
>          FILTER (CONTAINS ( str(?name5),     "license"))
>          BIND  (str(?content5)         AS    ?license)
>          BIND ((STRLEN(?content5) > 0) AS ?hasLicense)
>      }
>      OPTIONAL
>      {
>          ?meta6 a x3do:meta ;
>                 x3do:name         ?name6 ;
>                 x3do:content      ?content6 .
>          FILTER (CONTAINS ( str(?name6),     "description"))
>          BIND  (str(?content6)         AS    ?description)
>          BIND ((STRLEN(?content6) > 0) AS ?hasDescription)
>      }
>      OPTIONAL
>      {
>          ?meta7 a x3do:meta ;
>                 x3do:name         ?name7 ;
>                 x3do:content      ?content7 .
>          FILTER (CONTAINS ( str(?name7),     "reference"))
>          BIND  (str(?content7)         AS    ?reference)
>          BIND ((STRLEN(?content7) > 0) AS ?hasReference)
>      }
>      OPTIONAL
>      {
>          ?meta8 a x3do:meta ;
>                 x3do:name         ?name8 ;
>                 x3do:content      ?content8 .
>          FILTER (CONTAINS ( str(?name8),     "identifier"))
>          BIND  (str(?content8)         AS    ?identifier)
>          BIND ((STRLEN(?content8) > 0) AS ?hasIdentifier)
>      }
> }
> 
> ###############################################
> ------------------------------------------------------------------------------------------------------------------------------------------------------------
> | title                               | creator        | created          | modified          | hasLicense | hasDescription | hasIdentifier | hasReference |
> ============================================================================================================================================================
> | "HelloX3dAuthorsAnimationChain.x3d" | "Don Brutzman" | "5 October 2000" | "20 October 2019" | true       | true           | true          | true         |
> ------------------------------------------------------------------------------------------------------------------------------------------------------------
> 
> # additional properties available:
> # ?hasTitle ?hasCreator ?hasCreated ?hasModified ?license ?description ?identifier ?reference
> 
> Speculation: perhaps at some point we can make it easy to import and load all of these kinds of properties in a reusable common-queries SPARQL file.
> 
> ---
> 
> Have fun with X3D and Semantic Web!  8)

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