Current State of Graph:
- FIBO ontology loaded.
- Mappings & Namespaces loaded.
- 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:
- 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:
- We observed that targets are not properly mapped/linked to the respective classes, properties, relations, etc in the ontology.
- 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
Current State of Graph:
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:
###########################################
@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:
Observations:
Regards,
Team QUIPU