-
Notifications
You must be signed in to change notification settings - Fork 0
/
JS4GeoDefs.js
17 lines (13 loc) · 8.14 KB
/
JS4GeoDefs.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
var JS4GeoDefs = {}
// JS4GeoDefs['point'] = 'ex:PointShape a sh:NodeShape;\n sh:targetClass sf:Point;\n sh:property [\n sh:path ex:type;\n sh:in ("Point");\n sh:minCount 1;\n sh:maxCount 1;\n ];\n sh:property [\n sh:path ex:coordinates;\n sh:node ex:directPositionShape;\n ex:coordMinSize 2;\n sh:minCount 1;\n sh:maxCount 1;\n ];\n sh:property [\n sh:path ex:bbox;\n sh:node ex:bboxShape;\n ex:bboxMinSize 4;\n sh:maxCount 1;\n ].\n\n'
// JS4GeoDefs['Bbox'] = 'ex:bboxShape a sh:NodeShape ;\n sh:node dash:ListShape ;\n dash:hasMinLength ex:bboxMinSize ;\n dash:hasMaxLength 6 ;\n sh:property [\n sh:path ( [sh:zeroOrMorePath rdf:rest] rdf:first) ;\n sh:datatype xsd:decimal ;\n ] .\n\nex:bboxMinOccurConstraintComponent a sh:ConstraintComponent ;\n sh:parameter [\n sh:path ex:bboxMinSize ;\n sh:datatype xsd:integer ;\n ] ;\n sh:validator ex:bboxMinOccur .\n\nex:bboxMinOccur a sh:JSValidator ;\n sh:message "Verify minOccur in JS4Geo bbox!!!" ;\n sh:jsLibrary [ sh:jsLibraryURL "http://localhost/JS4Geo-SHACL-Validators.js" ] ;\n sh:jsFunctionName "bboxMinOccur" .\n\nex:bboxMaxOccurConstraintComponent a sh:ConstraintComponent\n sh:parameter [\n sh:path ex:bboxMaxSize\n sh:datatype xsd:integer ;\n ] ;\n sh:validator ex:bboxMaxOccur .\n\nex:bboxMaxOccur a sh:JSValidator ;\n sh:message "Verify maxOccur in JS4Geo bbox!!!" ;\n sh:jsLibrary [ sh:jsLibraryURL "http://localhost/JS4Geo-SHACL-Validators.js" ] ;\n sh:jsFunctionName "bboxMaxOccur" .'
// JS4GeoDefs['directPosition'] = 'ex:directPositionShape a sh:NodeShape ;\n sh:node dash:ListShape ;\n dash:hasMinLength ex:coordMinSize ;\n sh:property [\n sh:path ( [sh:zeroOrMorePath rdf:rest] rdf:first);\n sh:datatype xsd:decimal ;\n ] .\n\nex:coordMinOccurConstraintComponent a sh:ConstraintComponent ;\n sh:parameter [\n sh:path ex:coordMinSize ;\n sh:datatype xsd:integer ;\n ] ;\n sh:validator ex:coordMinOccur .\n\nex:coordMinOccur a sh:JSValidator ;\n sh:message "Verify minOccur in JS4Geo coordinates!!!" ;\n sh:jsLibrary [ sh:jsLibraryURL "http://localhost/JS4Geo-SHACL-Validators.js" ] ;\n sh:jsFunctionName "coordMinOccur" .\n\n'
// JS4GeoDefs['lineString'] = 'ex:lineStringShape a sh:NodeShape;\n sh:targetClass sf:LineString ;\n sh:property [\n sh:path ex:type ;\n sh:in ( "LineString" ) ;\n sh:minCount 1 ;\n sh:maxCount 1 ;\n ] ;\n sh:property [\n sh:path ex:coordinates ;\n sh:node dash:ListShape ;\n sh:property [\n sh:path ([sh:zeroOrMorePath rdf:rest] rdf:first) ;\n sh:node ex:directPositionShape ;\n ];\n ex:lineStringMinSize 2 ;\n ex:LScoordMinSize 2 ;\n sh:minCount 1 ;\n sh:maxCount 1 ;\n ] ;\n sh:property [\n sh:path ex:bbox ;\n sh:node ex:bboxShape ;\n ex:bboxMinSize 4 ;\n ex:bboxMaxSize 6 ;\n sh:minCount 1 ;\n sh:maxCount 1 ;\n ] .\n\nex:lineStringMinOccurConstraintComponent a sh:ConstraintComponent ;\n sh:parameter [\n sh:path ex:lineStringMinSize ;\n sh:datatype xsd:integer ;\n ] ;\n sh:parameter [\n sh:path ex:LScoordMinSize ;\n sh:datatype xsd:integer ;\n ] ;\n sh:validator ex:lineStringMinOccur_2 .\n\nex:lineStringMinOccur_2 a sh:JSValidator ;\n sh:message "Verify minOccur in JS4Geo lineString!!!" ;\n sh:jsLibrary [ sh:jsLibraryURL "http://54.201.29.21/shapes/JS4Geo-SHACL-Validators.js" ] ;\n sh:jsFunctionName "lineStringMinOccur_2" .\n\n'
// JS4GeoDefs['polygon'] = 'ex:polygonShape a sh:NodeShape ;\n sh:targetClass sf:Polygon ;\n sh:property [\n sh:path ex:type ;\n sh:in ("Polygon") ;\n sh:minCount 1 ;\n sh:maxCount 1 ;\n ] ;\n sh:property [\n sh:path ex:coordinates ;\n sh:node dash:ListShape ;\n sh:property [\n sh:path ([sh:zeroOrMorePath rdf:rest] rdf:first) ;\n sh:node ex:internalPolygonShape ;\n ] ;\n sh:minCount 1 ;\n sh:maxCount 1 ;\n ] ;\n sh:property [\n sh:path ex:bbox ;\n sh:node ex:bboxShape ;\n ex:bboxMinSize 4 ;\n ex:bboxMaxSize 6 ;\n sh:minCount 1 ; # opcional, verificar quando existe\n sh:maxCount 1 ;\n ] .\n\nex:internalPolygonShape a sh:NodeShape ;\n sh:node dash:ListShape ;\n sh:property [\n sh:path ( [sh:zeroOrMorePath rdf:rest] rdf:first) ;\n sh:node ex:directPositionShape ;\n ] .\n\n'
// JS4GeoDefs['multiPoint'] = 'ex:multiPointShape a sh:NodeShape ;\n sh:targetClass sf:MultiPoint ;\n sh:property [\n sh:path ex:type ;\n sh:in ("MultiPoint") ;\n sh:minCount 1 ;\n sh:maxCount 1 ;\n ];\n sh:property [\n sh:path ex:coordinates;\n sh:node dash:ListShape;\n sh:property [\n sh:path ([sh:zeroOrMorePath rdf:rest] rdf:first);\n sh:node ex:directPositionShape;\n ];\n ex:lineStringMinSize 2 ;\n ex:LScoordMinSize 2 ;\n sh:minCount 1;\n sh:maxCount 1 ;\n ];\n sh:property [\n sh:path ex:bbox ;\n sh:node ex:bboxShape ;\n ex:bboxMinSize 4 ;\n ex:bboxMaxSize 6 ;\n sh:minCount 1 ; # opcional, verificar quando existe\n sh:maxCount 1 ;\n ] .\n\n'
// JS4GeoDefs['multiLineString'] = 'ex:multiLineStringShape a sh:NodeShape;\n sh:targetClass sf:MultiLineString;\n sh:property [\n sh:path ex:type;\n sh:in ("MultiLineString");\n sh:minCount 1;\n sh:maxCount 1 ;\n ];\n sh:property [\n sh:path ex:coordinates;\n sh:node dash:ListShape;\n sh:property [\n sh:path ([sh:zeroOrMorePath rdf:rest] rdf:first);\n sh:node ex:coordsLineStringShape;\n ];\n sh:minCount 1;\n sh:maxCount 1 ;\n ];\n sh:property [\n sh:path ex:bbox ;\n sh:node ex:bboxShape ;\n ex:bboxMinSize 4 ;\n ex:bboxMaxSize 6 ;\n sh:minCount 1 ; # opcional, verificar quando existe\n sh:maxCount 1 ;\n ] .\n\nex:coordsLineStringShape a sh:NodeShape;\n sh:property [\n sh:node dash:ListShape;\n sh:property [\n sh:path ([sh:zeroOrMorePath rdf:rest] rdf:first);\n sh:node ex:directPositionShape;\n ];\n sh:minCount 1;\n ].\n\n'
// JS4GeoDefs['multiPolygon'] = 'ex:multiPolygonShape a sh:NodeShape;\n sh:targetClass sf:MultiPolygon;\n sh:property [\n sh:path ex:type;\n sh:in ("MultiPolygon");\n sh:minCount 1;\n sh:maxCount 1 ;\n ];\n sh:property [\n sh:path ex:coordinates;\n sh:node dash:ListShape;\n sh:property [\n sh:path ([sh:zeroOrMorePath rdf:rest] rdf:first);\n sh:node ex:coordsPolygonShape;\n ];\n sh:minCount 1;\n sh:maxCount 1 ;\n ];\n sh:property [\n sh:path ex:bbox ;\n sh:node ex:bboxShape ;\n ex:bboxMinSize 4 ;\n ex:bboxMaxSize 6 ;\n sh:minCount 1 ; # opcional, verificar quando existe\n sh:maxCount 1 ;\n ] .\n\nex:coordsPolygonShape a sh:NodeShape ;\n sh:property [\n sh:node dash:ListShape ;\n sh:property [\n sh:path ([sh:zeroOrMorePath rdf:rest] rdf:first) ;\n sh:node ex:coordsInternalPolygonShape ;\n ] ;\n sh:minCount 1 ;\n sh:maxCount 1 ;\n ].\n\nex:coordsInternalPolygonShape a sh:NodeShape ;\n sh:node dash:ListShape ;\n sh:property [\n sh:path ( [sh:zeroOrMorePath rdf:rest] rdf:first) ;\n sh:node ex:directPositionShape ;\n ] .\n\n'
// JS4GeoDefs['feature'] = 'ex:featureShape a sh:NodeShape\n sh:targetClass ex:feature\n sh:property [\n sh:path ex:type;\n sh:in ("Feature");\n sh:minCount 1;\n sh:maxCount 1;\n ];\n sh:property [\n sh:path ex:geometry;\n sh:node ex:geometryShape;\n sh:minCount 1;\n sh:maxCount 1 ;\n sh:property [\n sh:path ex:bbox ;\n sh:node ex:bboxShape ;\n ex:bboxMinSize 4 ;\n ex:bboxMaxSize 6 ;\n sh:minCount 1 ; # opcional, verificar quando existe\n sh:maxCount 1 ;\n ] ;\n sh:property [\n sh:path ex:properties ;\n sh:node ex:propertiesShape ;\n sh:minCount 1;\n sh:maxCount 1 ;\n ] .\n\nex:propertiesShape a sh:NodeShape ;\n sh:targetClass ex:properties ;\n sh:property [\n sh:path ex:name ;\n sh:datatype xsd:string ;\n sh:minCount 1;\n sh:maxCount 1 ;\n ] .\n\n'
JS4GeoDefs['imports'] = '<http://www.example.org>\n rdf:type owl:Ontology ;\n owl:imports <http://localhost/SHACL/JS4Geo-ShapesGraph.ttl> .\n'
// JS4GeoDefs['feature'] = 'ex:propertiesShape a sh:NodeShape ;\n sh:targetClass ex:properties ;\n sh:property [\n sh:path ex:name ;\n sh:datatype xsd:string ;\n sh:minCount 1;\n sh:maxCount 1 ;\n ] .\n\n'
module.exports = JS4GeoDefs