Standard Operating Procedure for querying and maintaining the SEA-Forge™ Knowledge Graph using SPARQL and SHACL.
Query semantic concepts, validate relationships, and maintain ontology integrity using the DomainForge™ Knowledge Graph.
Input: Information need
Steps:
Output: Query skeleton
Input: SPARQL query
Steps:
Output: Query results
Input: Query results
Steps:
Output: Interpreted semantic data
Input: Proposed changes
Steps:
Output: Validated changes or error report
Input: Validated changes
Steps:
Output: Updated Knowledge Graph
1
2
3
4
5
PREFIX sea: <http://sea-forge.org/ontology#>
ASK {
sea:BoundedContext a sea:Concept .
}
Result: true or false
1
2
3
4
5
6
7
8
9
PREFIX sea: <http://sea-forge.org/ontology#>
SELECT ?concept ?label ?description
WHERE {
?concept a sea:Concept ;
rdfs:label ?label ;
sea:description ?description .
}
ORDER BY ?label
1
2
3
4
5
6
7
PREFIX sea: <http://sea-forge.org/ontology#>
SELECT ?related ?relationship
WHERE {
sea:Deployment ?relationship ?related .
?related a sea:Concept .
}
1
2
3
4
5
6
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
SELECT ?child ?parent
WHERE {
?child rdfs:subClassOf ?parent .
}
1
2
3
4
5
6
7
8
9
10
PREFIX sh: <http://www.w3.org/ns/shacl#>
PREFIX sea: <http://sea-forge.org/ontology#>
SELECT ?shape ?constraint ?message
WHERE {
?shape a sh:NodeShape ;
sh:targetClass sea:Artifact ;
sh:property ?constraint .
?constraint sh:message ?message .
}
Validate semantic references in cognitive artifact before generation.
1
2
3
4
5
6
7
PREFIX sea: <http://sea-forge.org/ontology#>
ASK {
{ sea:Deployment a sea:Concept . }
UNION
{ sea:QualityGate a sea:Concept . }
}
true: Proceed with artifact generationfalse: Query which concept is missing1
2
3
4
5
6
7
PREFIX sea: <http://sea-forge.org/ontology#>
SELECT ?concept ?exists
WHERE {
VALUES ?concept { sea:Deployment sea:QualityGate }
OPTIONAL { ?concept a sea:Concept . BIND(true AS ?exists) }
}
1
2
3
4
5
6
7
8
9
PREFIX sea: <http://sea-forge.org/ontology#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
INSERT DATA {
sea:NewConcept a sea:Concept ;
rdfs:label "New Concept" ;
sea:description "Description of new concept" ;
rdfs:subClassOf sea:ParentConcept .
}
1
2
3
4
5
PREFIX sea: <http://sea-forge.org/ontology#>
INSERT DATA {
sea:Concept1 sea:relatedTo sea:Concept2 .
}
1
2
3
4
5
6
7
# Run SHACL validation
curl -X POST http://localhost:8080/api/validate \
-H "Content-Type: application/json" \
-d '{
"shapes": "@prefix ...",
"data": "@prefix ..."
}'
namespace:ConceptName)