https://cacontology.projectvic.org/synthesis/shapes#TextEvidencePointerShape
sh:property [sh:datatype xsd:integer, sh:maxCount 1, sh:minCount 1, sh:minInclusive 1, sh:path cacontology-synthesis:lineStart], sh:property [sh:datatype xsd:integer, sh:maxCount 1, sh:minCount 1, sh:minInclusive 1, sh:path cacontology-synthesis:lineEnd], sh:sparql [sh:select
SELECT $this
WHERE {
$this cacontology-synthesis:lineStart ?s ;
cacontology-synthesis:lineEnd ?e .
FILTER (?e < ?s)
}
, sh:severity sh:Violation] | sh:property [sh:datatype xsd:integer, sh:maxCount 1, sh:minCount 1, sh:minInclusive 1, sh:path cacontology-synthesis:pageStart], sh:property [sh:datatype xsd:integer, sh:maxCount 1, sh:minCount 1, sh:minInclusive 1, sh:path cacontology-synthesis:pageEnd], sh:sparql [sh:select
SELECT $this
WHERE {
$this cacontology-synthesis:pageStart ?s ;
cacontology-synthesis:pageEnd ?e .
FILTER (?e < ?s)
}
, sh:severity sh:Violation] )
TextEvidencePointer must include either a (lineStart,lineEnd) range or a (pageStart,pageEnd) range.
Focus nodes of this shape (cacontology-synthesis:TextEvidencePointer) can have the following properties:
| PROPERTY | DESCRIPTION | MIN | MAX | VALUE TYPE | OTHER CONSTRAINTS |
|---|---|---|---|---|---|
| cacontology-synthesis:referencesArtifact | Links a text evidence pointer to the text artifact it references (e.g., normalized.txt ObservableObject). sh:message TextEvidencePointer must reference exactly one text artifact (ObservableObject). |
1 | 1 | uco-observable:ObservableObject |
@prefix cacontology-synthesis: <https://cacontology.projectvic.org/synthesis#> .
@prefix cacontology-synthesis-shapes: <https://cacontology.projectvic.org/synthesis/shapes#> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix sh: <http://www.w3.org/ns/shacl#> .
@prefix uco-observable: <https://ontology.unifiedcyberontology.org/uco/observable/> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
cacontology-synthesis-shapes:TextEvidencePointerShape a sh:NodeShape ;
rdfs:label "Text Evidence Pointer Shape"@en ;
sh:message "TextEvidencePointer must include either a (lineStart,lineEnd) range or a (pageStart,pageEnd) range."@en ;
sh:or ( [ sh:property [ sh:datatype xsd:integer ;
sh:maxCount 1 ;
sh:message "If using lines, lineStart must be a positive integer."@en ;
sh:minCount 1 ;
sh:minInclusive 1 ;
sh:path cacontology-synthesis:lineStart ],
[ sh:datatype xsd:integer ;
sh:maxCount 1 ;
sh:message "If using lines, lineEnd must be a positive integer."@en ;
sh:minCount 1 ;
sh:minInclusive 1 ;
sh:path cacontology-synthesis:lineEnd ] ;
sh:sparql [ sh:message "If using lines, lineEnd must be >= lineStart."@en ;
sh:select """
SELECT $this
WHERE {
$this cacontology-synthesis:lineStart ?s ;
cacontology-synthesis:lineEnd ?e .
FILTER (?e < ?s)
}
""" ;
sh:severity sh:Violation ] ] [ sh:property [ sh:datatype xsd:integer ;
sh:maxCount 1 ;
sh:message "If using pages, pageStart must be a positive integer."@en ;
sh:minCount 1 ;
sh:minInclusive 1 ;
sh:path cacontology-synthesis:pageStart ],
[ sh:datatype xsd:integer ;
sh:maxCount 1 ;
sh:message "If using pages, pageEnd must be a positive integer."@en ;
sh:minCount 1 ;
sh:minInclusive 1 ;
sh:path cacontology-synthesis:pageEnd ] ;
sh:sparql [ sh:message "If using pages, pageEnd must be >= pageStart."@en ;
sh:select """
SELECT $this
WHERE {
$this cacontology-synthesis:pageStart ?s ;
cacontology-synthesis:pageEnd ?e .
FILTER (?e < ?s)
}
""" ;
sh:severity sh:Violation ] ] ) ;
sh:property [ sh:class uco-observable:ObservableObject ;
sh:maxCount 1 ;
sh:message "TextEvidencePointer must reference exactly one text artifact (ObservableObject)."@en ;
sh:minCount 1 ;
sh:path cacontology-synthesis:referencesArtifact ] ;
sh:targetClass cacontology-synthesis:TextEvidencePointer .