diff --git a/demo/data1.ttl b/demo/data1.ttl index d8be086..98728cd 100644 --- a/demo/data1.ttl +++ b/demo/data1.ttl @@ -1,4 +1,35 @@ +@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> . +@prefix schema: <http://schema.org/> . +@prefix fidbau: <http://example.org/fidbau#> . +@prefix dcterms: <http://purl.org/dc/terms/> . +@prefix dcat: <http://www.w3.org/ns/dcat#> . +@prefix geo: <http://www.opengis.net/ont/geosparql#> . +@prefix xsd: <http://www.w3.org/2001/XMLSchema#> . -<https://example.com/John-Doe> a <http://schema.org/Person> ; - <http://schema.org/age> 18 ; - <http://schema.org/name> "John", "Johnny" . +<http://example.org/fidbau#4f2a8de3-9fc8-40a9-9237-d5964520ec54> + a dcat:Dataset, fidbau:ArchitectureModelDataset ; + dcterms:title "Einsteinturm" ; + dcterms:description "333"; + dcterms:issued "2023-07-27"^^xsd:date; + dcterms:license <http://www.opendefinition.org/licenses/cc-by>; + dcterms:spatial [ + a dcterms:Location ; + geo:asWKT "POINT(8.65,49.87)"^^geo:wktLiteral ; + dcterms:description "Building has been realized here" ; + ] ; + schema:material "Holz" ; + <http://www.w3.org/ns/prov#qualifiedAttribution> _:0706162f-c5a3-4954-8cf8-a9d324b313f4 ; + <http://purl.org/dc/terms/creator> _:n1150716783622461953 . +_:n1150716783622461953 + <http://xmlns.com/foaf/0.1/name> "Stephan Tittel" ; + <http://xmlns.com/foaf/0.1/mbox> "stephan.tittel@tu-darmstadt.de" ; + <http://purl.org/dc/terms/identifier> "https://orcid.org/0000-0002-0048-6835" ; + <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Agent> . + +_:b6b4cfca-6b02-43c0-a830-b2375dc4653e <http://xmlns.com/foaf/0.1/name> "123"; + a <http://xmlns.com/foaf/0.1/Agent>. +_:1c986e20-c685-47c4-83ca-c22068e07762 <http://xmlns.com/foaf/0.1/name> "123"; + a <http://xmlns.com/foaf/0.1/Agent>. +_:0706162f-c5a3-4954-8cf8-a9d324b313f4 a <http://www.w3.org/ns/prov#Attribution>; + <http://www.w3.org/ns/prov#agent> _:1c986e20-c685-47c4-83ca-c22068e07762; + <http://www.w3.org/ns/dcat#hadRole> <http://w3id.org/nfdi4ing/metadata4ing#RegistrationAgency>. \ No newline at end of file diff --git a/demo/data3.ttl b/demo/data3.ttl index 2bc230f..d8be086 100644 --- a/demo/data3.ttl +++ b/demo/data3.ttl @@ -1,22 +1,4 @@ -@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> . -@prefix schema: <http://schema.org/> . -@prefix fidbau: <http://example.org/fidbau#> . -@prefix dcterms: <http://purl.org/dc/terms/> . -@prefix dcat: <http://www.w3.org/ns/dcat#> . -@prefix geo: <http://www.opengis.net/ont/geosparql#> . -<http://example.org/fidbau#4f2a8de3-9fc8-40a9-9237-d5964520ec54> - a dcat:Dataset, fidbau:ArchitectureModelDataset ; - dcterms:title "Einsteinturm" ; - dcterms:spatial [ - a dcterms:Location ; - geo:asWKT "POINT(8.65,49.87)"^^geo:wktLiteral ; - dcterms:description "Building has been realized here" ; - ] ; - schema:material "Holz" ; - <http://purl.org/dc/terms/creator> _:n1150716783622461953 . -_:n1150716783622461953 - <http://xmlns.com/foaf/0.1/name> "Stephan Tittel" ; - <http://xmlns.com/foaf/0.1/mbox> "stephan.tittel@tu-darmstadt.de" ; - <http://purl.org/dc/terms/identifier> "https://orcid.org/0000-0002-0048-6835" ; - <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Agent> . +<https://example.com/John-Doe> a <http://schema.org/Person> ; + <http://schema.org/age> 18 ; + <http://schema.org/name> "John", "Johnny" . diff --git a/demo/shapes1.ttl b/demo/shapes1.ttl index 0b683f2..ca56b3b 100644 --- a/demo/shapes1.ttl +++ b/demo/shapes1.ttl @@ -1,109 +1,198 @@ -@prefix sh: <http://www.w3.org/ns/shacl#> . -@prefix schema: <http://schema.org/> . -@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> . -@prefix xsd: <http://www.w3.org/2001/XMLSchema#> . -@prefix dash: <http://datashapes.org/dash#> . -@prefix foaf: <http://xmlns.com/foaf/0.1/> . -@prefix vcard: <http://www.w3.org/2006/vcard/ns#> . +@prefix dash: <http://datashapes.org/dash#> . +@prefix dbpedia: <http://dbpedia.org/ontology/> . +@prefix dcat: <http://www.w3.org/ns/dcat#> . +@prefix dcterms: <http://purl.org/dc/terms/> . +@prefix fidbau: <http://purl.org/fidbau/elements/1.1/> . +@prefix foaf: <http://xmlns.com/foaf/0.1/> . +@prefix geo: <http://www.opengis.net/ont/geosparql#> . +@prefix owl: <http://www.w3.org/2002/07/owl#> . +@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> . +@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> . +@prefix schema: <http://schema.org/> . +@prefix sh: <http://www.w3.org/ns/shacl#> . +@prefix xsd: <http://www.w3.org/2001/XMLSchema#> . +@prefix prov: <http://www.w3.org/ns/prov#> . -@prefix ex: <http://example.com/> . -@prefix lexvo: <http://lexvo.org/id/iso639-1/> . +fidbau:ArchitectureModelDataset + rdf:type sh:NodeShape ; + dcterms:description "FID-BAU architecture model dataset with metadata fields for e.g. model dimensions and materials" ; + dcterms:title "Architecture model" ; + sh:node fidbau:BuildingDataset ; + sh:property [ sh:datatype xsd:integer ; + sh:description "Width [mm] of the model" ; + sh:group fidbau:PhysicalPropertiesGroup ; + sh:maxCount 1 ; + sh:minInclusive 1 ; + sh:name "Width" ; + sh:path schema:width + ] ; + sh:property [ sh:datatype xsd:integer ; + sh:description "Height [mm] of the model" ; + sh:group fidbau:PhysicalPropertiesGroup ; + sh:maxCount 1 ; + sh:minInclusive 1 ; + sh:name "Height" ; + sh:path schema:height + ] ; + sh:property [ sh:datatype xsd:integer ; + sh:description "Depth [mm] of the model" ; + sh:group fidbau:PhysicalPropertiesGroup ; + sh:maxCount 1 ; + sh:minInclusive 1 ; + sh:name "Depth" ; + sh:path schema:depth + ] ; + sh:property [ sh:datatype xsd:string ; + sh:description "Scale of the model, e.g. 1:20" ; + sh:group fidbau:PhysicalPropertiesGroup ; + sh:maxCount 1 ; + sh:name "Scale" ; + sh:path dbpedia:scale ; + sh:pattern "^1:\\d+$" + ] ; + sh:property [ sh:datatype xsd:string ; + sh:description "Material used with this model" , "Beim Bau des Modells verwendetes Material"@de ; + sh:group fidbau:PhysicalPropertiesGroup ; + sh:name "Artwork material" ; + sh:path schema:artworkSurface + ] ; + sh:property [ sh:datatype xsd:string ; + sh:description "Technique used building this model" ; + sh:group fidbau:PhysicalPropertiesGroup ; + sh:name "Technique" ; + sh:path schema:technique + ] . -ex:PersonShape - a sh:NodeShape ; - sh:targetClass schema:Person ; - rdfs:label "Person", "Osoba"@pl ; - sh:property ex:NameProperty , - ex:KnowsProperty , - ex:AgeProperty , - ex:GenderProperty , - ex:SpokenLanguagesProperty , - ex:DateOfBirthProperty , - ex:HomePageProperty ; -. +fidbau:BuildingDataset + rdf:type sh:NodeShape ; + dcterms:description "FID-BAU building dataset with metadata fields for e.g. locations and materials" ; + dcterms:title "Building" ; + sh:node fidbau:Dataset ; + sh:property [ sh:datatype xsd:string ; + sh:description "Construction material (eg. concrete, steel, iron, stone, brick, wood)." ; + sh:name "Construction material" ; + sh:path dbpedia:constructionMaterial + ] ; + sh:property [ sh:description "Location of the building" ; + sh:name "Location" ; + sh:node fidbau:Location ; + sh:path dcterms:spatial + ] . -ex:SimplifiedPersonShape - a sh:NodeShape ; - sh:targetNode ex:Jane_Doe ; - rdfs:label "Person (name-only)", "Osoba (tylko imię)"@pl ; - sh:property ex:NameProperty ; -. +fidbau:PhysicalPropertiesGroup + rdf:type sh:PropertyGroup ; + rdfs:label "Physical properties" . -ex:NameProperty - sh:path schema:name ; - sh:name "Name" ; - sh:datatype xsd:string ; - dash:singleLine true ; - sh:maxCount 1 ; - sh:minCount 1 ; - sh:order 2 ; - sh:description "Enter the name of the person here. You should adhere to the scheme <firstname> <lastname>" -. -ex:KnowsProperty - sh:path schema:knows ; - sh:class schema:Person ; - sh:group ex:FriendGroup ; - sh:description "All the persons that this person knows" -. +fidbau:Dataset rdf:type sh:NodeShape ; + owl:imports <https://w3id.org/nfdi4ing/metadata4ing/> ; -ex:AgeProperty - sh:path schema:age ; - sh:name "Age", "Wiek"@pl ; - sh:datatype xsd:integer ; - sh:maxCount 1 ; - sh:defaultValue 21 ; - sh:order 2 ; - sh:minInclusive 18 ; -. + dcterms:description "FID-BAU base dataset with minimal metadata fields" ; + dcterms:title "Generic" ; + sh:property [ sh:datatype xsd:string ; + sh:description "The name of the dataset" , "Der Name des Datensatzes"@de ; + sh:maxCount 1 ; + sh:minCount 1 ; + sh:name "Name" ; + sh:path dcterms:title + ] ; + sh:property [ dash:singleLine false ; + sh:datatype xsd:string ; + sh:description "Description of the dataset" ; + sh:maxCount 1 ; + sh:minCount 1 ; + sh:name "Abstract" ; + sh:path dcterms:description + ] ; + sh:property [ sh:description "License of the dataset" ; + sh:maxCount 1 ; + sh:minCount 1 ; + sh:name "License" ; + sh:nodeKind sh:IRI ; + sh:path dcterms:license ; + sh:in ( + <http://creativecommons.org/licenses/by/4.0/> + <http://creativecommons.org/licenses/by-nc/4.0/> + ) + ] ; + sh:property [ sh:datatype xsd:date ; + sh:description "Date when this dataset has been issued" ; + sh:maxCount 1 ; + sh:minCount 1 ; + sh:name "Issued" ; + sh:path dcterms:issued + ] ; + sh:property [ sh:description "Whether data is freely accessible" ; + sh:in ( "public" "private" ) ; + sh:maxCount 1 ; + sh:minCount 1 ; + sh:name "Access type" ; + sh:path dcterms:accessRights + ] ; + sh:property [ + sh:name "Creator" ; + sh:description "Creator of the dataset" ; + sh:path dcterms:creator ; + sh:minCount 1 ; + sh:node fidbau:Person ; + ] ; + sh:property [ sh:name "Attributions" ; + sh:node fidbau:Attribution ; + sh:path prov:qualifiedAttribution + ] ; + sh:targetClass dcat:Dataset . -ex:GenderProperty - sh:path foaf:gender ; - sh:name "Gender", "Płeć"@pl ; - sh:in ( - "Male" "Female" "Other" "Prefer not to tell" - ) ; - sh:defaultValue "Male" ; - sh:maxCount 1 ; - sh:order 3 ; - sh:message "Please select a valid gender" ; -. +fidbau:Location rdf:type sh:NodeShape ; + rdfs:label "Location" ; + sh:property [ sh:datatype geo:wktLiteral ; + sh:description "Format WKT, e.g. POINT(8.65,49.87)" ; + sh:maxCount 1 ; + sh:minCount 1 ; + sh:name "Coordinates" ; + sh:path geo:asWKT ; + sh:pattern "^POINT\\([+-]?([0-9]*[.])?[0-9]+,[+-]?([0-9]*[.])?[0-9]+\\)$" + ] ; + sh:property [ sh:description "Description of the location" ; + sh:maxCount 1 ; + sh:name "Description" ; + sh:path dcterms:description + ] ; + sh:targetClass dcterms:Location . -ex:DateOfBirthProperty - sh:path schema:birthDate ; - sh:name "Date of birth", "Data urodzenia"@pl ; - sh:maxCount 1 ; - sh:order 4 ; - sh:datatype xsd:date ; -. +fidbau:Person rdf:type sh:NodeShape ; + rdfs:label "Person" ; + sh:property [ sh:maxCount 1 ; + sh:minCount 1 ; + sh:name "Name" ; + sh:path foaf:name + ] ; + sh:property [ sh:maxCount 1 ; + sh:name "Email" ; + sh:path foaf:mbox + ] ; + sh:property [ sh:datatype xsd:string ; + sh:maxCount 1 ; + sh:name "ORCID ID" ; + sh:path dcterms:identifier ; + sh:pattern "^https://orcid.org/\\d{4}-\\d{4}-\\d{4}-\\d{4}$" + ] ; + sh:targetClass foaf:Agent . -ex:SpokenLanguagesProperty - sh:path vcard:language ; - sh:name "Spoken languages", "Języki"@pl ; - sh:nodeKind sh:IRI ; - sh:in ( - lexvo:en lexvo:de lexvo:fr lexvo:pl lexvo:es - ) ; - sh:order 5 ; - sh:minCount 1 ; - sh:maxCount 2 ; -. +fidbau:Attribution rdf:type sh:NodeShape ; + sh:property [ sh:maxCount 1 ; + sh:minCount 1 ; + sh:name "Person with role" ; + sh:node fidbau:Person ; + sh:path prov:agent + ] ; + sh:property [ sh:name "Role" ; + sh:minCount 1 ; + sh:nodeKind sh:IRI ; + sh:path dcat:hadRole ; + sh:class prov:Role + ] ; + sh:targetClass prov:Attribution . -ex:HomePageProperty - sh:path foaf:homepage ; - sh:name "Homepage URL", "Strona internetowa"@pl ; - sh:nodeKind sh:IRI ; - sh:order 6 ; -. -ex:FriendGroup - a sh:PropertyGroup ; - sh:order 17 ; - rdfs:label "Acquaintances", "Znajomi"@pl -. - -lexvo:en rdfs:label "English", "angielski"@pl . -lexvo:de rdfs:label "German", "niemiecki"@pl . -lexvo:fr rdfs:label "French", "francuski"@pl . -lexvo:pl rdfs:label "Polish", "polski"@pl . -lexvo:es rdfs:label "Spanish", "hiszpański"@pl . \ No newline at end of file +<http://creativecommons.org/licenses/by/4.0/> rdfs:label "CC-BY" . +<http://creativecommons.org/licenses/by-nc/4.0/> rdfs:label "CC-BY-NC" . diff --git a/demo/shapes2.ttl b/demo/shapes2.ttl index 2d7bc34..4ee1a3b 100644 --- a/demo/shapes2.ttl +++ b/demo/shapes2.ttl @@ -1,39 +1,49 @@ +@prefix dbo: <http://dbpedia.org/ontology/> . @prefix dcterms: <http://purl.org/dc/terms/> . +@prefix m4i: <http://w3id.org/nfdi4ing/metadata4ing#> . @prefix owl: <http://www.w3.org/2002/07/owl#> . @prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> . @prefix sh: <http://www.w3.org/ns/shacl#> . -@prefix sosa: <http://www.w3.org/ns/sosa/> . -@prefix ssn: <http://www.w3.org/ns/ssn/> . @prefix xsd: <http://www.w3.org/2001/XMLSchema#> . +@prefix aps: <https://w3id.org/nfdi4ing/profiles/> . -<http://www.example.org/aims#SystemShape> dcterms:created "2022-04-07"^^xsd:date ; - dcterms:creator "Nils Preuß" ; - dcterms:description "A System is a unit of abstraction for pieces of infrastructure that implement Procedures. A System may have components, its subsystems, which are other Systems." ; - dcterms:rights "https://spdx.org/licenses/CC0-1.0.html" ; - dcterms:subject <https://github.com/tibonto/dfgfo/4> ; - dcterms:title "system"@en ; +aps:c4eb5a0e-f314-44a6-9f9a-c6b6c9208297 dcterms:created "2022-04-07"^^xsd:date ; + dcterms:creator <https://orcid.org/0000-0002-9413-1874> ; + dcterms:description "Base Station (also called \"anchor\") of a LSM device."@en, "Basisstation (auch \"Anker\" genannt) eines LSM-Messsystems."@de ; + dcterms:license <https://spdx.org/licenses/CC0-1.0.html> ; + dcterms:subject <https://github.com/tibonto/dfgfo/407-02>, <https://github.com/tibonto/dfgfo/41> ; + dcterms:title "base station"@en, "Basisstation"@de ; a sh:NodeShape ; - owl:imports <http://www.example.org/aims#HardwareShape>, <http://www.example.org/aims#ToolShape> ; - sh:node <http://www.example.org/aims#HardwareShape>, <http://www.example.org/aims#ToolShape> ; + owl:imports aps:0e43324b-78c2-4bc3-b7db-661b2b0ff1cb, aps:ae3cd8e6-645d-4652-a7f4-79b74c7aee8f, aps:ef8d75dd-4a14-4edd-9e4b-9b738fdb4d34 ; sh:property [ - sh:node <http://www.example.org/aims#SystemShape> ; - sh:name "Relation between a System and its component parts." ; - sh:path ssn:hasSubSystem ; + sh:qualifiedMinCount 1 ; + sh:qualifiedMaxCount 1 ; + sh:description "Three dimensional position of the base station in Cartesian coordinates in meters."@en ; + sh:name "position"@en ; + sh:qualifiedValueShape aps:0e43324b-78c2-4bc3-b7db-661b2b0ff1cb ; + sh:path m4i:hasParameter ; + sh:qualifiedValueShapesDisjoint true ; ], [ - sh:name "mechanism of action the instrument operates under, piezoresistive, capacitive, optical"@en ; - sh:path <http://www.example.org/aims#mechanismOfAction> ; - sh:datatype xsd:string ; - ], [ - sh:node <http://www.example.org/aims#PlatformShape> ; - sh:name "Relation between a Sensor, or Actuator, Sampler, or Platform, and the Platform that it is mounted on or hosted by." ; - sh:path sosa:isHostedBy ; + sh:qualifiedMinCount 1 ; + sh:qualifiedMaxCount 1 ; + sh:description "Orientation of the base as quaternion."@en ; + sh:name "orientation"@en ; + sh:qualifiedValueShape aps:ae3cd8e6-645d-4652-a7f4-79b74c7aee8f ; + sh:path m4i:hasParameter ; + sh:qualifiedValueShapesDisjoint true ; ], [ - sh:name "timestamp of last calibration of the instrument"@en ; - sh:path <http://www.example.org/aims#calibrationTimestamp> ; + sh:description "State of the base."@en ; + sh:name "state"@en ; + sh:path dbo:status ; + sh:maxCount 1 ; + sh:minCount 1 ; sh:datatype xsd:string ; ], [ - sh:name "type of interface or connector for the instrument, e.g. analog, serial, or even more specific e.g. BNC, RS-232, OPC-UA"@en ; - sh:path <http://www.example.org/aims#interface> ; - sh:datatype xsd:string ; - ] ; - sh:targetClass ssn:System . + sh:qualifiedMinCount 1 ; + sh:qualifiedMaxCount 1 ; + sh:description "Data about the last calibration of the device"@en ; + sh:name "calibration data"@en ; + sh:qualifiedValueShape aps:ef8d75dd-4a14-4edd-9e4b-9b738fdb4d34 ; + sh:path m4i:hasParameter ; + sh:qualifiedValueShapesDisjoint true ; + ] . \ No newline at end of file diff --git a/demo/shapes3.ttl b/demo/shapes3.ttl index f0f6b78..0b683f2 100644 --- a/demo/shapes3.ttl +++ b/demo/shapes3.ttl @@ -1,171 +1,109 @@ -@prefix dcterms: <http://purl.org/dc/terms/> . -@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> . -@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> . -@prefix schema: <http://schema.org/> . @prefix sh: <http://www.w3.org/ns/shacl#> . +@prefix schema: <http://schema.org/> . +@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> . @prefix xsd: <http://www.w3.org/2001/XMLSchema#> . -@prefix fidbau: <http://example.org/fidbau#> . @prefix dash: <http://datashapes.org/dash#> . -@prefix dcat: <http://www.w3.org/ns/dcat#> . @prefix foaf: <http://xmlns.com/foaf/0.1/> . -@prefix geo: <http://www.opengis.net/ont/geosparql#> . -@prefix owl: <http://www.w3.org/2002/07/owl#> . -@prefix dbpedia: <http://dbpedia.org/ontology/> . +@prefix vcard: <http://www.w3.org/2006/vcard/ns#> . -fidbau:ArchitectureModelDataset - a sh:NodeShape ; - sh:node fidbau:BuildingDataset; - rdfs:label "FID-BAU architecture model dataset" ; - sh:property [ - sh:name "Width" ; - sh:description "Width [mm] of the model" ; - sh:group fidbau:PhysicalPropertiesGroup ; - sh:path schema:width ; - sh:maxCount 1 ; - sh:datatype xsd:integer ; - sh:minInclusive 1 ; - ], [ - sh:name "Height" ; - sh:description "Height [mm] of the model" ; - sh:group fidbau:PhysicalPropertiesGroup ; - sh:path schema:height ; - sh:maxCount 1 ; - sh:datatype xsd:integer ; - sh:minInclusive 1 ; - ], [ - sh:name "Depth" ; - sh:description "Depth [mm] of the model" ; - sh:group fidbau:PhysicalPropertiesGroup ; - sh:path schema:depth ; - sh:maxCount 1 ; - sh:datatype xsd:integer ; - sh:minInclusive 1 ; - ], [ - sh:name "Scale" ; - sh:description "Scale of the model, e.g. 1:20" ; - sh:group fidbau:PhysicalPropertiesGroup ; - sh:path dbpedia:scale ; - sh:maxCount 1 ; - sh:datatype xsd:string ; - ], [ - sh:name "Material" ; - sh:description "Material used with this model", "Beim Bau des Modells verwendetes Material"@de ; - sh:group fidbau:PhysicalPropertiesGroup ; - sh:path schema:artworkSurface ; - sh:datatype xsd:string ; - ], [ - sh:name "Technique" ; - sh:description "Technique used building this model" ; - sh:group fidbau:PhysicalPropertiesGroup ; - sh:path schema:technique ; - sh:datatype xsd:string ; - ] . +@prefix ex: <http://example.com/> . +@prefix lexvo: <http://lexvo.org/id/iso639-1/> . -fidbau:BuildingDataset - a sh:NodeShape ; - sh:node fidbau:Dataset; - rdfs:label "FID-BAU building dataset" ; - sh:property [ - sh:name "Material" ; - sh:description "Construction material (eg. concrete, steel, iron, stone, brick, wood)." ; - sh:path dbpedia:constructionMaterial ; - sh:datatype xsd:string ; - ] , [ - sh:name "Location" ; - sh:description "Location of the building" ; - sh:path dcterms:spatial ; - sh:node fidbau:Location ; - ] . +ex:PersonShape + a sh:NodeShape ; + sh:targetClass schema:Person ; + rdfs:label "Person", "Osoba"@pl ; + sh:property ex:NameProperty , + ex:KnowsProperty , + ex:AgeProperty , + ex:GenderProperty , + ex:SpokenLanguagesProperty , + ex:DateOfBirthProperty , + ex:HomePageProperty ; +. -fidbau:Dataset - a sh:NodeShape ; - rdfs:label "FID-BAU base dataset" ; - sh:targetClass dcat:Dataset ; - sh:property [ - sh:name "Name" ; - sh:description "The name of the dataset", "Der Name des Datensatzes"@de ; - sh:path dcterms:title ; - sh:minCount 1 ; - sh:maxCount 1 ; - sh:datatype xsd:string ; - ], [ - sh:name "Abstract" ; - sh:description "Description of the dataset" ; - sh:path dcterms:description ; - sh:minCount 1 ; - sh:maxCount 1 ; - sh:datatype xsd:string ; - dash:singleLine false ; +ex:SimplifiedPersonShape + a sh:NodeShape ; + sh:targetNode ex:Jane_Doe ; + rdfs:label "Person (name-only)", "Osoba (tylko imię)"@pl ; + sh:property ex:NameProperty ; +. - ], [ - sh:name "License" ; - sh:description "License of the dataset" ; - sh:path dcterms:license ; - sh:nodeKind sh:IRI ; - sh:minCount 1 ; - sh:maxCount 1 ; - sh:in ( - <http://www.opendefinition.org/licenses/cc-by> <http://www.opendefinition.org/licenses/cc-by-sa> - ) ; - ], [ - sh:name "Issued" ; - sh:description "Date when this dataset has been issued" ; - sh:path dcterms:issued ; - sh:minCount 1 ; - sh:maxCount 1 ; - sh:datatype xsd:date ; - ], [ - sh:name "Creator" ; - sh:description "Creator of the dataset" ; - sh:path dcterms:creator ; - sh:minCount 1 ; - sh:node fidbau:Creator ; - ] . +ex:NameProperty + sh:path schema:name ; + sh:name "Name" ; + sh:datatype xsd:string ; + dash:singleLine true ; + sh:maxCount 1 ; + sh:minCount 1 ; + sh:order 2 ; + sh:description "Enter the name of the person here. You should adhere to the scheme <firstname> <lastname>" +. -fidbau:Creator - a sh:NodeShape ; - rdfs:label "Creator" ; - sh:targetClass foaf:Agent ; - sh:property [ - sh:name "Name" ; - sh:path foaf:name ; - sh:minCount 1 ; - sh:maxCount 1 ; - ], [ - sh:name "Email" ; - sh:path foaf:mbox ; - sh:maxCount 1 ; - ], [ - sh:name "ORCID ID" ; - sh:path dcterms:identifier ; - sh:maxCount 1 ; - sh:datatype xsd:string ; - sh:pattern "^https://orcid.org/\\d{4}-\\d{4}-\\d{4}-\\d{4}$" ; - ] . +ex:KnowsProperty + sh:path schema:knows ; + sh:class schema:Person ; + sh:group ex:FriendGroup ; + sh:description "All the persons that this person knows" +. -fidbau:Location - a sh:NodeShape ; - rdfs:label "Location" ; - sh:targetClass dcterms:Location ; - sh:property [ - sh:name "Coordinates" ; - sh:description "Format WKT, e.g. POINT(8.65,49.87)" ; - sh:path geo:asWKT ; - sh:minCount 1 ; - sh:maxCount 1 ; - sh:datatype geo:wktLiteral ; - sh:pattern "^POINT\\([+-]?([0-9]*[.])?[0-9]+,[+-]?([0-9]*[.])?[0-9]+\\)$" - ], [ - sh:name "Description" ; - sh:description "Description of the location" ; - sh:path dcterms:description ; - sh:maxCount 1 ; - ] . +ex:AgeProperty + sh:path schema:age ; + sh:name "Age", "Wiek"@pl ; + sh:datatype xsd:integer ; + sh:maxCount 1 ; + sh:defaultValue 21 ; + sh:order 2 ; + sh:minInclusive 18 ; +. + +ex:GenderProperty + sh:path foaf:gender ; + sh:name "Gender", "Płeć"@pl ; + sh:in ( + "Male" "Female" "Other" "Prefer not to tell" + ) ; + sh:defaultValue "Male" ; + sh:maxCount 1 ; + sh:order 3 ; + sh:message "Please select a valid gender" ; +. + +ex:DateOfBirthProperty + sh:path schema:birthDate ; + sh:name "Date of birth", "Data urodzenia"@pl ; + sh:maxCount 1 ; + sh:order 4 ; + sh:datatype xsd:date ; +. + +ex:SpokenLanguagesProperty + sh:path vcard:language ; + sh:name "Spoken languages", "Języki"@pl ; + sh:nodeKind sh:IRI ; + sh:in ( + lexvo:en lexvo:de lexvo:fr lexvo:pl lexvo:es + ) ; + sh:order 5 ; + sh:minCount 1 ; + sh:maxCount 2 ; +. + +ex:HomePageProperty + sh:path foaf:homepage ; + sh:name "Homepage URL", "Strona internetowa"@pl ; + sh:nodeKind sh:IRI ; + sh:order 6 ; +. -fidbau:PhysicalPropertiesGroup +ex:FriendGroup a sh:PropertyGroup ; - rdfs:label "Physical properties" + sh:order 17 ; + rdfs:label "Acquaintances", "Znajomi"@pl . -<http://www.opendefinition.org/licenses/cc-by> rdfs:label "CC-BY" . -<http://www.opendefinition.org/licenses/cc-by-sa> rdfs:label "CC-BY-SA" . \ No newline at end of file +lexvo:en rdfs:label "English", "angielski"@pl . +lexvo:de rdfs:label "German", "niemiecki"@pl . +lexvo:fr rdfs:label "French", "francuski"@pl . +lexvo:pl rdfs:label "Polish", "polski"@pl . +lexvo:es rdfs:label "Spanish", "hiszpański"@pl . \ No newline at end of file diff --git a/public/index.html b/public/index.html index ea9b60f..cd50a54 100644 --- a/public/index.html +++ b/public/index.html @@ -60,9 +60,9 @@ <h3>SHACL form demo</h3> <textarea id="shacl-shape-input"></textarea> <textarea id="shacl-data-input"></textarea> <shacl-form id="shacl-form" class="bootstrap2" - data-language="de" - data-shape-subject2="http://example.org/fidbau#ArchitectureModelDataset" - data-value-subject3="http://example.org/fidbau#4f2a8de3-9fc8-40a9-9237-d5964520ec54" + data-language="en" + data-shape-subject="http://purl.org/fidbau/elements/1.1/ArchitectureModelDataset" + data-value-subject="http://example.org/fidbau#4f2a8de3-9fc8-40a9-9237-d5964520ec54" > <button type="submit" class="btn btn-primary" onclick="save()">Submit</button> </shacl-form> @@ -74,7 +74,6 @@ <h3>SHACL form demo</h3> import { FixedListPlugin, MapBoxPlugin } from './index-with-plugins.js' const form = document.getElementById("shacl-form") - form.registerPlugin(new FixedListPlugin('http://purl.org/dc/terms/license', [{label:'CC-BY',value:'http://www.opendefinition.org/licenses/cc-by'}, {value:'http://license.org/2'}, {value:'http://license.org/3'}])) form.registerPlugin(new MapBoxPlugin('http://www.opengis.net/ont/geosparql#asWKT', 'my-api-key')) const shapes = document.getElementById("shacl-shape-input") @@ -105,26 +104,8 @@ <h3>SHACL form demo</h3> form.addEventListener('change', function (ev) { output.classList.toggle('valid', ev.detail?.valid) output.innerText = form.toRDFTurtle() - /* - const report = await window.validateShaclForm(shapes.value, output.innerText) - if (report.conforms) { - validation.classList.remove('invalid') - validation.classList.add('valid') - } else { - validation.classList.remove('valid') - validation.classList.add('invalid') - } - validation.innerText = 'conforms: ' + report.conforms + '\n' - for (const result of report.results) { - // See https://www.w3.org/TR/shacl/#results-validation-result for details - // about each property - validation.innerText += result.message + '\n' - } - */ - - - // validation.innerText = JSON.stringify(report.results, getCircularReplacer()) + form.validate(true) }) shapesChooser.dispatchEvent(new Event('change')) // loadMetadata('https://workbench-metadata.0pq.de/fid/sparql', '<https://doi.org/10.82319/3dh4-7935>')