"undefined property" validation error related to teamworkconstraints

29 views
Skip to first unread message

Fan Li

unread,
Dec 15, 2020, 11:20:00 PM12/15/20
to TopBraid Suite Users
Hi Holger, I am a little stuck with the EDG SHACL validation tool: /edg/tbl/swp?_viewClass=tblshacl%3AValidationPage

I have constantly got the "Use of an undefined property that is neither the subject of any triple nor the sh:path of any property shape" error. Looking into this particular constraint defined in the <http://topbraid.org/teamworkconstraints> ontology, I don't understand why it is triggered even though the properties are sh:path of some property shapes.

Attached is a minimal reproducible example under version 6.4.2. Thank you! 
 




UndefinedPropData.json.txt
UndefinedPropShape.ttl.txt

Holger Knublauch

unread,
Dec 15, 2020, 11:57:20 PM12/15/20
to topbrai...@googlegroups.com

Hi Fan Li,

the reason is that the data graph is not owl:importing the shapes graph (or another copy of the shape definitions). However, the "undefined property" query goes against the data graph only. In the context of typical TopBraid EDG/Composer constraint checking, the data graph == the shapes graph, and therefore the problem only shows in cases where the two are distinct.

If you don't like/use this constraint, just add sh:deactivated true to it. Or try to add an owl:imports statement to the data graph, assuming the shapes graph is part of the TopBraid workspace.

Holger

--
You received this message because you are subscribed to the Google Groups "TopBraid Suite Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to topbraid-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/topbraid-users/86efc82b-c5b5-416f-9e34-54853da7c1f8n%40googlegroups.com.

Fan Li

unread,
Dec 16, 2020, 12:31:00 AM12/16/20
to TopBraid Suite Users
Thanks, Holger. It all makes sense now. Assuming the URI of shape graph in EDG is urn:x-evn-master:example_ontology, how do I import/reference it within an external JSON-LD data graph?   

Holger Knublauch

unread,
Dec 16, 2020, 1:18:29 AM12/16/20
to topbrai...@googlegroups.com

As an example, I have used our standard Geography Taxonomy and the Ontology, and exported them from EDG's Export tab in JSON-LD and TTL. This shows you the syntax - use the imports field, assuming it's defined as in the @context.

Alternative, use TBC-ME to save your instance graph to .jsonld ending to see the correct owl:imports syntax.

HTH
Holger


{
  "@graph" : [
  {
    "@id" : "urn:x-evn-master:geo",
    "@type" : [ "owl:Ontology", "taxonomies:Taxonomy" ],
    "identifier" : "geo",
    "officialName" : "TopBraid EDG Geography Taxonomy",
    "purpose" : "An example demonstrating features of TopBraid EDG Taxonomies using SKOS-XL.",
    "status" : "metadata:InUseStatus",
    "version" : "rali",
    "defaultNamespace" : "http://topquadrant.com/ns/examples/geography#",
    "comment" : "An example taxonomy of continents, countries, cities and other geographic entities of the world. ",
    "label" : "Geography Taxonomy",
    "imports" : [ "urn:x-evn-master:geography_ontology", "http://topbraid.org/imported" ]
  },
  ... more instances ...
  ],
  "@context" : {
    "defaultNamespace" : {
      "@id" : "http://topbraid.org/swa#defaultNamespace"
    },
    "imports" : {
      "@id" : "http://www.w3.org/2002/07/owl#imports",
      "@type" : "@id"
    },
    "label" : {
      "@id" : "http://www.w3.org/2000/01/rdf-schema#label"
    },
    "status" : {
      "@id" : "http://topbraid.org/metadata#status",
      "@type" : "@id"
    },
    "comment" : {
      "@id" : "http://www.w3.org/2000/01/rdf-schema#comment"
    },
    "dataSteward" : {
      "@id" : "http://edg.topbraid.solutions/model/dataSteward",
      "@type" : "@id"
    },
    "subjectArea" : {
      "@id" : "http://edg.topbraid.solutions/model/subjectArea",
      "@type" : "@id"
    },
    "officialName" : {
      "@id" : "http://topbraid.org/metadata#officialName"
    },
    "identifier" : {
      "@id" : "http://topbraid.org/metadata#identifier"
    },
    "purpose" : {
      "@id" : "http://topbraid.org/metadata#purpose",
      "@type" : "http://www.w3.org/1999/02/22-rdf-syntax-ns#HTML"
    },
    "version" : {
      "@id" : "http://topbraid.org/metadata#version"
    },
    "prefLabel" : {
      "@id" : "http://www.w3.org/2004/02/skos/core#prefLabel"
    },
    "broader" : {
      "@id" : "http://www.w3.org/2004/02/skos/core#broader",
      "@type" : "@id"
    },
    "lat" : {
      "@id" : "http://www.w3.org/2003/01/geo/wgs84_pos#lat",
      "@type" : "http://www.w3.org/2001/XMLSchema#double"
    },
    "long" : {
      "@id" : "http://www.w3.org/2003/01/geo/wgs84_pos#long",
      "@type" : "http://www.w3.org/2001/XMLSchema#double"
    },
    "notation" : {
      "@id" : "http://www.w3.org/2004/02/skos/core#notation"
    },
    "subClassOf" : {
      "@id" : "http://www.w3.org/2000/01/rdf-schema#subClassOf",
      "@type" : "@id"
    },
    "range" : {
      "@id" : "http://www.w3.org/2000/01/rdf-schema#range",
      "@type" : "@id"
    },
    "literalForm" : {
      "@id" : "http://www.w3.org/2008/05/skos-xl#literalForm"
    },
    "capital" : {
      "@id" : "http://topquadrant.com/ns/examples/geography#capital",
      "@type" : "@id"
    },
    "language" : {
      "@id" : "http://topquadrant.com/ns/examples/geography#language"
    },
    "isoCountryCode3" : {
      "@id" : "http://topquadrant.com/ns/examples/geography#isoCountryCode3"
    },
    "callingCode" : {
      "@id" : "http://topquadrant.com/ns/examples/geography#callingCode",
      "@type" : "http://www.w3.org/2001/XMLSchema#integer"
    },
    "areaKM" : {
      "@id" : "http://topquadrant.com/ns/examples/geography#areaKM",
      "@type" : "http://www.w3.org/2001/XMLSchema#decimal"
    },
    "isoCountryCode2" : {
      "@id" : "http://topquadrant.com/ns/examples/geography#isoCountryCode2"
    },
    "related" : {
      "@id" : "http://www.w3.org/2004/02/skos/core#related",
      "@type" : "@id"
    },
    "definition" : {
      "@id" : "http://www.w3.org/2004/02/skos/core#definition",
      "@type" : "http://www.w3.org/1999/02/22-rdf-syntax-ns#HTML"
    },
    "historyNote" : {
      "@id" : "http://www.w3.org/2004/02/skos/core#historyNote"
    },
    "altLabel" : {
      "@id" : "http://www.w3.org/2008/05/skos-xl#altLabel",
      "@type" : "@id"
    },
    "hiddenLabel" : {
      "@id" : "http://www.w3.org/2008/05/skos-xl#hiddenLabel",
      "@type" : "@id"
    },
    "wikidataCountry" : {
      "@id" : "http://topquadrant.com/ns/examples/geography#wikidataCountry",
      "@type" : "@id"
    },
    "webSite" : {
      "@id" : "http://topquadrant.com/ns/examples/geography#webSite",
      "@type" : "http://www.w3.org/2001/XMLSchema#anyURI"
    },
    "versionInfo" : {
      "@id" : "http://www.w3.org/2002/07/owl#versionInfo"
    },
    "note" : {
      "@id" : "http://www.w3.org/2004/02/skos/core#note"
    },
    "labelRelation" : {
      "@id" : "http://www.w3.org/2008/05/skos-xl#labelRelation",
      "@type" : "@id"
    },
    "wikidataCity" : {
      "@id" : "http://topquadrant.com/ns/examples/geography#wikidataCity",
      "@type" : "@id"
    },
    "hasTopConcept" : {
      "@id" : "http://www.w3.org/2004/02/skos/core#hasTopConcept",
      "@type" : "@id"
    },
    "population" : {
      "@id" : "http://topquadrant.com/ns/examples/geography#population",
      "@type" : "http://www.w3.org/2001/XMLSchema#integer"
    },
    "wikipediaLink" : {
      "@id" : "http://topquadrant.com/ns/examples/geography#wikipediaLink",
      "@type" : "http://www.w3.org/2001/XMLSchema#anyURI"
    },
    "hidden" : {
      "@id" : "http://datashapes.org/dash#hidden",
      "@type" : "http://www.w3.org/2001/XMLSchema#boolean"
    },
    "P1082" : {
      "@id" : "http://www.wikidata.org/prop/direct/P1082",
      "@type" : "http://www.w3.org/2001/XMLSchema#decimal"
    },
    "P41" : {
      "@id" : "http://www.wikidata.org/prop/direct/P41",
      "@type" : "@id"
    },
    "shape" : {
      "@id" : "http://datashapes.org/dash#shape",
      "@type" : "@id"
    },
    "rootType" : {
      "@id" : "http://topbraid.org/search#rootType",
      "@type" : "@id"
    },
    "creator" : {
      "@id" : "http://topbraid.org/search#creator",
      "@type" : "@id"
    },
    "queryTemplate" : {
      "@id" : "http://teamwork.topbraidlive.org/graphql.search#queryTemplate"
    },
    "appState" : {
      "@id" : "http://teamwork.topbraidlive.org/graphql.search#appState"
    },
    "lexicalForm" : {
      "@id" : "http://www.w3.org/2008/05/skos-xl#lexicalForm"
    },
    "geo" : "http://www.w3.org/2003/01/geo/wgs84_pos#",
    "metadata" : "http://topbraid.org/metadata#",
    "owl" : "http://www.w3.org/2002/07/owl#",
    "skosxl" : "http://www.w3.org/2008/05/skos-xl#",
    "taxonomies" : "http://evn.topbraidlive.org/evnprojects#",
    "rdf" : "http://www.w3.org/1999/02/22-rdf-syntax-ns#",
    "g" : "http://topquadrant.com/ns/examples/geography#",
    "spin" : "http://spinrdf.org/spin#",
    "xsd" : "http://www.w3.org/2001/XMLSchema#",
    "skos" : "http://www.w3.org/2004/02/skos/core#",
    "rdfs" : "http://www.w3.org/2000/01/rdf-schema#",
    "swa" : "http://topbraid.org/swa#"
  }
}

Fan Li

unread,
Dec 16, 2020, 9:54:49 PM12/16/20
to TopBraid Suite Users
Thanks, Holger! This solved my current problem and also greatly helps me on other JSON-LD related issues.
Reply all
Reply to author
Forward
0 new messages