neosemantics icon indicating copy to clipboard operation
neosemantics copied to clipboard

SHACL with FIBO (Version: NEO4j-4.3.4)- Not Validating with Graph_Config set to 'MAP' as Prefix is not being resolved

Open harbour-git opened this issue 3 years ago • 3 comments

Current State of Graph:

  1. FIBO ontology loaded.
  2. Mappings & Namespaces loaded.
  3. RDF data imported and linked with the ontology.

Graph_Config: 1 | "handleVocabUris" | "MAP" 2 | "handleMultival" | "OVERWRITE" 3 | "handleRDFTypes" | "LABELS_AND_NODES" 4 | "keepLangTag" | false 5 | "keepCustomDataTypes" | false 6 | "applyNeo4jNaming" | false 7 | "baseSchemaNamespace" | "neo4j://graph.schema#" 8 | "baseSchemaPrefix" | "n4sch" 9 | "classLabel" | "Class" 10 | "subClassOfRel" | "SCO" 11 | "dataTypePropertyLabel" | "Property" 12 | "objectPropertyLabel" | "Relationship" 13 | "subPropertyOfRel" | "SPO" 14 | "domainRel" | "DOMAIN" 15 | "rangeRel" | "RANGE"

SHACL Validation Steps:

  1. Create shape constraints to validate the existing graph.

########################################### @prefix fibo-fro-combined-fob: http://www.semanticweb.org/combined/fiben_object_properties/ . @prefix fibo-fro-combined: http://www.semanticweb.org/combined/ . @prefix fibo-sec-sec-lst: https://spec.edmcouncil.org/fibo/ontology/SEC/Securities/SecuritiesListings/ . @prefix fibo-fnd-acc-cur: https://spec.edmcouncil.org/fibo/ontology/FND/Accounting/CurrencyAmount/ . @prefix sh: http://www.w3.org/ns/shacl# .

fibo-fro-combined:ListedSecurityShape a sh:NodeShape; sh:targetClass fibo-sec-sec-lst:ListedSecurity; sh:property[ sh:path fibo-fro-combined-fob:HASLASTTRADEDVALUE; sh:minCount 1; sh:class fibo-fnd-acc-cur:MonetaryAmount; ].

fibo-fro-combined:MonetaryamountShapewrong a sh:NodeShape; sh:targetClass fibo-fnd-acc-cur:Monetaryamount; sh:property[ sh:path fibo-fnd-acc-cur:hasamount; sh:minInclusive 0; ].

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

Output:

target propertyOrRelationshipPath param value
1 "fibo-fnd-acc-cur__Monetaryamount" "fibo-fnd-acc-cur__hasamount" "sh:minInclusive"
2 "fibo-sec-sec-lst__ListedSecurity" "fibo-fro-combined-fob__HASLASTTRADEDVALUE" "sh:class"
3 "fibo-sec-sec-lst__ListedSecurity" "fibo-fro-combined-fob__HASLASTTRADEDVALUE" "sh:minCount"

Observations:

  1. We observed that targets are not properly mapped/linked to the respective classes, properties, relations, etc in the ontology.
  2. When we run the Shacl Validation (call n10s.validation.shacl.validate() yield focusNode, nodeType,propertyShape,offendingValue,resultPath,severity), there is no validation is happening. (Ideal scenario is to validate if the last traded value of a stock is greater than zero. We have infused few cases in data to check the violation.)

Regards, Team QUIPU

harbour-git avatar Nov 09 '21 17:11 harbour-git

Thanks for raising this team QUIPU! It would be great if you could post a small sample of instance data (including violations) to try and reproduce the behavior you're getting. Would that be possible?

Cheers,

JB

jbarrasa avatar Nov 10 '21 10:11 jbarrasa

Thanks for your reply.

We could prepare a sample as suggested to reproduce and we think it is more generic in nature when we use a custom ontology and map while importing. If it would be okay for you, we could discuss on this more offline, will reach out to you via email (we have an active email thread from our Nodes2020 presentation).

harbour-git avatar Nov 10 '21 14:11 harbour-git

Hello Mr.Barassa, would like to know if there is any update on this issue, we have sent all the details as suggested to the email.

Regards, Team Quipu

harbourpolitica avatar Dec 04 '21 12:12 harbourpolitica