diff --git a/.env.test b/.env.test index fa76bee..3a34743 100644 --- a/.env.test +++ b/.env.test @@ -6,8 +6,7 @@ REACT_EDITOR=code EXTEND_ESLINT=true -#REACT_APP_SERVER_RDF_URL=https://expert.agentlab.ru/rdf4j-server -REACT_APP_SERVER_RDF_URL=https://rdf4j.agentlab.ru/rdf4j-server +REACT_APP_SERVER_RDF_URL=https://rdf4j.agentlab.eu/rdf4j-server REACT_APP_RM_REPOSITORY_PARAM='{ "Repository ID": "reqs2" }' REACT_APP_RM_REPOSITORY_TYPE=native-rdfs-dt diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index ad5a85a..fcfb690 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -36,4 +36,4 @@ jobs: run: pnpm lint # Did not work without local files with test data # - name: Test -# run: yarn test --ci --coverage --maxWorkers=2 +# run: pnpm test --ci --coverage --maxWorkers=2 diff --git a/.vscode/settings.json b/.vscode/settings.json index 84ea2dc..e864cde 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -11,47 +11,41 @@ "editor.defaultFormatter": "esbenp.prettier-vscode", "prettier.endOfLine": "lf", "cSpell.words": [ - "Coll's", - "Constr's", - "Constrs", - "Descr", - "Descrs", - "Elems", - "Individ", - "Inferencer", - "Interp", - "Intrnl", - "Modifiability", - "Objs", - "Rubberband", - "SHACL", - "SPDX", - "Schema's", - "Scroller", - "Sparqled", - "Subcat", "addprops", "agentlab", "aldkg", "antd", "antv", "bgps", + "clss", + "Coll's", "collapsable", "colls", "cond", "conds", + "Constr's", + "Constrs", "dcterms", + "Descr", + "Descrs", "dryrun", + "Elems", "ents", + "Individ", + "Inferencer", "inferencing", "insertdelete", + "Interp", + "Intrnl", "jsld", "jsonld", "jumpover", "ldkg", "middlewares", "mktp", + "Modifiability", "notexists", + "Objs", "openrdf", "oslc", "pannable", @@ -63,19 +57,25 @@ "remotedev", "renumerate", "reqs", + "Rubberband", + "Schema's", + "Scroller", + "SHACL", "sider", "sparql", + "Sparqled", "sparqljs", "sparqljsldclient", + "SPDX", "spoc", "strends", "strstarts", + "Subcat", + "triplestore", "undelegate", "unscreen", "uuidv", - "vocabs", - "триплов", - "триплы" + "vocabs" ], "cSpell.language": "en,ru", "terminal.integrated.scrollback": 10000, diff --git a/README.md b/README.md index 3bad17f..28b3589 100644 --- a/README.md +++ b/README.md @@ -1,24 +1,34 @@ # SPARQL JSON Schema Linked Data Client -It is an intelligent SPARQL Client with SHACL Shapes support. You could use JSON objects and JSON Schemas to query SPARQL Endpoint, semi-similar to GraphQL style. +It is an intelligent SPARQL Client with object-oriented reactive blackboard. You could use JSON/JS objects and JSON Schemas to query SPARQL Endpoint, semi-similar to GraphQL. -Some core features requires: +You manipulate JS objects programmatically, client generates SPARQL Queries and interacts with SPARQL Endpoint. The Client retrieves SHACL Shapes to infer available class properties and allowed value types. -- RDF4J REST API in addition to standard SPARQL 1.1 Query and SPARQL 1.1 Update. -- SHACL Shapes for rdfs classes in server RDF repository. +![SPARQL JSLD Client Architecture Overview](/docs/ArchitectureOverview.png) ## Features -- Retrieves lazily SPARQL Prefixes (namespaces) from server (requires RDF4J REST API) -- Retrieves lazily SHACL Shapes from server, converts it into JSON Schemas and UI Schemas and caches them -- Uses JS objects and JSON Schemas (converted from shapes) to generate SPARQL Select Queries and SPARQL Update queries -- Converts SPARQL Results into JS objects for consumption in apps -- Have API server RDF repository creation and deletion (requires RDF4J REST API) -- Supports bulk-load data from local files to server RDF repository (requires RDF4J REST API) +- Retrieves SPARQL Prefixes (namespaces) from a server (requires RDF4J REST API) +- Retrieves RDFS classes and SHACL Shapes from a server, converts it into JSON Schemas and caches them +- Retrieves Linked Data metadata (class contexts, names and descriptions for class and property shapes) and caches them inside JSON Schemas +- Uses object-oriented "entity query" descriptions (Collection Constraints) and JSON Schemas with additional Linked Data metadata (converted from shapes) to generate SPARQL Select and SPARQL Update queries +- Converts SPARQL Results into JS objects and puts it into a blackboard +- Handles state changes and notifies all registered handler functions about specific property change +- Have an API for RDF repository creation and deletion on a server (requires RDF4J REST API) +- Supports bulk-load data from local files to RDF repository on a server (requires RDF4J REST API) +- Supports lazy loading and "load more" incremental page-based fetching +- Could be extended with specialized collection processors via `registerMstCollSchema()` + +## Prerequisites + +Client requires: + +- RDF4J triplestore with RDF4J REST API extensions in addition to standard SPARQL 1.1 Query and SPARQL 1.1 Update. +- RDF triplestore should have SHACL Shapes for rdfs classes and properties (for base classes as well as subclasses used by this client). ## Usage -### RDF4J Repository Creation and Data Uploading (low level, without MST) +### RDF4J Repository Creation and Data Uploading (low level client API, without MST) ```typescript import { SparqlClientImpl, uploadFiles } from '@agentlab/sparql-jsld-client'; @@ -29,27 +39,27 @@ await client.createRepositoryAndSetCurrent({ "Repository ID": "reqs2" }, 'native const files = [ { file: 'vocabs/rm.ttl', - baseURI: '', + baseURI: '', }, { - file: 'shapes/shacl/rm/rm-shapes.ttl', - baseURI: '', + file: 'shapes/rm/rm-shapes.ttl', + baseURI: '', }, { - file: 'data/cpgu/sample-collection.ttl', - baseURI: '', + file: 'data/sample-collection.ttl', + baseURI: '', }, ]; -await uploadFiles(client, files, './test/data/'); +await uploadFiles(client, files, './test-data/'); ``` -### RDF4J Client SPARQL Queries (low level, without MST) +### RDF4J Client SPARQL Queries (low level client API, without MST) ```typescript const results = await client.sparqlSelect('SELECT * WHERE ?s ?p ?o'); ``` -### Reactive Collections (with MST and SPARQL Queries Generation) +### Reactive Collections (high-level client API with MST and SPARQL Queries Generation) ```typescript import { MstRepository, rootModelInitialState } from '@agentlab/sparql-jsld-client'; @@ -84,6 +94,88 @@ when( ); ``` +### More complex entity query example + +For example, an entity query to retrieve class shapes and property shapes: + +```typescript +{ + entConstrs: [ + { + schema: 'sh:NodeShapeShape', + conditions: { + targetClass: 'rm:Artifact', + property: '?eIri1', + }, + }, + { + schema: 'sh:PropertyShapeShape', + }, + ], + orderBy: [{ expression: 'order1', descending: false }], +}, +``` + +From this definition the SparqlGen will produce SPARQL Query like this: + +```SPARQL +PREFIX rdf: +PREFIX dcterms: +PREFIX sh: +PREFIX rm: +CONSTRUCT { + ?eIri0 rdf:type sh:NodeShape. + ?eIri0 sh:property ?eIri1. + ?eIri0 sh:targetClass rm:Artifact. + ?eIri0 dcterms:title ?title0. + ?eIri0 dcterms:description ?description0. + ?eIri0 rm:inCreationMenu ?inCreationMenu0. + ?eIri0 rm:defaultIndividNs ?defaultIndividNs0. + ?eIri0 rm:defaultFormat ?defaultFormat0. + ?eIri0 rm:iconReference ?iconReference0. + + ?eIri1 rdf:type sh:PropertyShape. + ?eIri1 sh:name ?name1. + ?eIri1 sh:description ?description1. + ?eIri1 sh:path ?path1. + ?eIri1 sh:order ?order1. + ?eIri1 sh:datatype ?datatype1. + ?eIri1 sh:minCount ?minCount1. + ?eIri1 sh:maxCount ?maxCount1. + ?eIri1 sh:class ?class1. + ?eIri1 sh:nodeKind ?nodeKind1. + ?eIri1 rm:shapeModifiability ?shapeModifiability1. + ?eIri1 rm:valueModifiability ?valueModifiability1. +} +WHERE { + ?eIri0 rdf:type sh:NodeShape; + sh:targetClass rm:Artifact. + OPTIONAL { ?eIri0 dcterms:title ?title0. } + OPTIONAL { ?eIri0 dcterms:description ?description0. } + OPTIONAL { ?eIri0 rm:inCreationMenu ?inCreationMenu0. } + OPTIONAL { ?eIri0 rm:defaultIndividNs ?defaultIndividNs0. } + OPTIONAL { ?eIri0 rm:defaultFormat ?defaultFormat0. } + OPTIONAL { ?eIri0 rm:iconReference ?iconReference0. } + + OPTIONAL { + ?eIri1 rdf:type sh:PropertyShape. + ?eIri0 sh:property ?eIri1. + ?eIri1 sh:path ?path1. + OPTIONAL { ?eIri1 sh:name ?name1. } + OPTIONAL { ?eIri1 sh:description ?description1. } + OPTIONAL { ?eIri1 sh:order ?order1. } + OPTIONAL { ?eIri1 sh:datatype ?datatype1. } + OPTIONAL { ?eIri1 sh:minCount ?minCount1. } + OPTIONAL { ?eIri1 sh:maxCount ?maxCount1. } + OPTIONAL { ?eIri1 sh:class ?class1. } + OPTIONAL { ?eIri1 sh:nodeKind ?nodeKind1. } + OPTIONAL { ?eIri1 rm:shapeModifiability ?shapeModifiability1. } + OPTIONAL { ?eIri1 rm:valueModifiability ?valueModifiability1. } + } +} +ORDER BY (?order1) +``` + ## Local Development Use pnpm. diff --git a/docs/ArchitectureOverview.png b/docs/ArchitectureOverview.png new file mode 100644 index 0000000..32ebc78 Binary files /dev/null and b/docs/ArchitectureOverview.png differ diff --git a/docs/Testcases Overall Structure.md b/docs/Testcases Overall Structure.md index aaae2e9..e5c5171 100644 --- a/docs/Testcases Overall Structure.md +++ b/docs/Testcases Overall Structure.md @@ -7,36 +7,43 @@ Suitable for quick test-based diagnostics in case you have many errors from seve The list blow is sorted from simple unit tests to more and more complex integration tests (i.e. complexity increases): -## Without SPARQL Generation +## MST Model CRUD Operations and Rx (without SPARQL Generation and client-server I/O) +```bash +pnpm test MstModel.spec.ts +``` + +## RDF4J Client data uploading & low level textual SPARQL queries (without SPARQL Generation) SparqlClientUpload.spec.ts -- REST rdf file upload ```bash -yarn test SparqlClientUpload.spec.ts +pnpm test SparqlClientUpload.spec.ts ``` SparqlClient.spec.ts -- namespaces and basic SPARQL Select with RDFS and DT reasoners ```bash -yarn test SparqlClient.spec.ts +pnpm test SparqlClient.spec.ts ``` -## With SPARQL Generation -SparqlGen.spec.ts -- without: mobx, client-server I/O +## SPARQL Generation (without MST and client-server I/O) +SparqlGen.spec.ts -- without: MST, client-server I/O ```bash -yarn test SparqlGen.spec.ts +pnpm test SparqlGen.spec.ts ``` + +## SPARQL Generation with MST and client-server I/O ArtifactShapeSchema.spec.ts -- initial shapes, server shapes (simple parentless and with inheritance) ```bash -yarn test ArtifactShapeSchema.spec.ts +pnpm test ArtifactShapeSchema.spec.ts ``` SimpleRetrieve.spec.ts -- upload all example files and all kind of selects with different conditions ```bash -yarn test SimpleRetrieve.spec.ts +pnpm test SimpleRetrieve.spec.ts ``` Artifact.spec.ts -- Entity deletion and creation ```bash -yarn test Artifact.spec.ts +pnpm test Artifact.spec.ts ``` ArtifactsInModule.spec.ts ```bash -yarn test ArtifactsInModule.spec.ts +pnpm test ArtifactsInModule.spec.ts ``` In case of errors we recommend to check and fix errors in this order. diff --git a/package.json b/package.json index 99a89cb..5c4edf6 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@agentlab/sparql-jsld-client", - "version": "5.0.11", + "version": "5.0.12", "description": "SPARQL JSON Schema Linked Data Client", "license": "GPL-3.0", "author": "Aleksei Ivanov ", diff --git a/src/SparqlClientImpl.ts b/src/SparqlClientImpl.ts index b0e316a..aa35950 100644 --- a/src/SparqlClientImpl.ts +++ b/src/SparqlClientImpl.ts @@ -305,7 +305,7 @@ export class SparqlClientImpl implements SparqlClient { } /** - * Удаляет все триплы в графе с заданным graph + * Delete all triples in a specified graph * @param graph */ async clearGraph(graph = 'null'): Promise { @@ -339,8 +339,8 @@ export class SparqlClientImpl implements SparqlClient { if (repType === 'virtuoso') { repParam = { ...repParam, - 'Default graph name': `http://cpgu.kbpm.ru/ns/rm/${repId}`, - 'Inference RuleSet name': `http://cpgu.kbpm.ru/ns/rm/${repId}`, + 'Default graph name': `https://agentlab.eu/ns/rm/${repId}`, + 'Inference RuleSet name': `https://agentlab.eu/ns/rm/${repId}`, "Use defGraph with SPARQL queries, if query default graph wasn't set": true, }; } diff --git a/src/SparqlGen.ts b/src/SparqlGen.ts index 638c3ef..5905cf2 100644 --- a/src/SparqlGen.ts +++ b/src/SparqlGen.ts @@ -26,7 +26,7 @@ export const factory: DataFactory = new DataFactory(); export function isUrl(str: string): boolean { if (_isUrl(str) === true) return true; - if (str.startsWith('cpgu:///')) return true; + if (str.startsWith('clss:///')) return true; return false; } @@ -835,8 +835,8 @@ export function getDataTriples(entConstr: EntConstrInternal): any[] { return triples; } -//TODO: упростить сигнатуру функции! -//Гармонизировать сигнатуру с другими функциями (getSimpleFilter, getDataTriples) +//TODO: Simplify function signature! +//Harmonize signature with other functions (getSimpleFilter, getDataTriples) export function getExtendedFilter( entConstr: EntConstrInternal, filterKey: string, diff --git a/src/models/Model.ts b/src/models/Model.ts index dee6ce9..b5bfce8 100644 --- a/src/models/Model.ts +++ b/src/models/Model.ts @@ -22,7 +22,7 @@ export const rootModelInitialState: any = { login: 'guest@example.com', name: 'Guest', }, - processArea: 'projects:gishbbProject', + processArea: 'projects:defaultProject', ns: { current: { rdf: 'http://www.w3.org/1999/02/22-rdf-syntax-ns#', @@ -30,7 +30,7 @@ export const rootModelInitialState: any = { xsd: 'http://www.w3.org/2001/XMLSchema#', sesame: 'http://www.openrdf.org/schema/sesame#', //rdf4j DirectType Inferencer sesame:directSubClassOf rdf4j: 'http://rdf4j.org/schema/rdf4j#', //rdf4j Default Graph rdf4j:nil, rdf4j:SHACLShapeGraph - aldkg: 'https://agentlab.eu/ldkg/onto#', + aldkg: 'https://agentlab.eu/ns/ldkg#', }, }, schemas: { diff --git a/src/models/MstCollConstr.ts b/src/models/MstCollConstr.ts index 3b33e62..4ca6b2c 100644 --- a/src/models/MstCollConstr.ts +++ b/src/models/MstCollConstr.ts @@ -217,7 +217,7 @@ export const MstCollConstr = types * SELECT */ /** - * Заменяет + * * @param obj */ /*selectObjectsArrayProperties: flow(function* selectObjectsArrayProperties(entConstrs: EntConstrInternal[], objects: JsObject[]) { @@ -513,9 +513,9 @@ export async function constructObjectsSnapshot( } /** - * Удаляет ВСЕ триплы для заданного URI, соответствующего набору значений полей из conditions - * @param conditions: объект с полями для условия поиска - * } + * Delete ALL triples for a specific RDF object, which values corresponds values from conditions + * @param conditions: JS object with properties, which defines search conditions + * */ export async function deleteObject(collConstr: ICollConstr, conditions?: JsObject | JsObject[], loadIfNeeded = true) { //TODO: performance diff --git a/src/models/MstRepository.ts b/src/models/MstRepository.ts index 878d577..06eb9c6 100644 --- a/src/models/MstRepository.ts +++ b/src/models/MstRepository.ts @@ -415,7 +415,7 @@ export const MstRepository = types }),*/ /** - * Находит один объект по его идентификатору (численному полю identifier) + * Finds one RDF object by its numeric property 'identifier' * Accepts shape (schema) IRI or schema object */ /*selectMaxObjectId: flow(function* selectMaxObjectId(schema: any) { diff --git a/src/models/MstSchemas.ts b/src/models/MstSchemas.ts index cfc4317..fed0010 100644 --- a/src/models/MstSchemas.ts +++ b/src/models/MstSchemas.ts @@ -50,7 +50,7 @@ export function createSchemaWithSubClassOf(schema: any, iri: string, classIri?: properties: { ...schema.properties, subClassOf: { - title: 'Подкласс класса', + title: 'Subclass of a Class', type: 'string', format: 'iri', }, @@ -459,7 +459,7 @@ export async function resolveSchemaFromServer(conditions: JsObject, nsJs: any, c format: 'iri', }, '@type': { - title: 'Тип', + title: 'Class', type: 'string', format: 'iri', }, diff --git a/src/schema/ArtifactShapeSchema.ts b/src/schema/ArtifactShapeSchema.ts index c751188..129c505 100644 --- a/src/schema/ArtifactShapeSchema.ts +++ b/src/schema/ArtifactShapeSchema.ts @@ -51,7 +51,7 @@ export const ArtifactShapeSchema: JSONSchema6forRdf = { title: 'URI', }, '@type': { - title: 'Тип', + title: 'Class', type: 'object', }, targetClass: { @@ -139,39 +139,39 @@ export const PropertyShapeSchema: JSONSchema6forRdf = { title: 'URI', }, '@type': { - title: 'Тип', + title: 'Class', type: 'object', }, name: { - title: 'Название', + title: 'Name', type: 'string', }, description: { - title: 'Описание', + title: 'Description', type: 'string', }, path: { - title: 'Путь', + title: 'path', type: 'object', }, order: { - title: 'Приоритет', + title: 'Order', type: 'integer', }, datatype: { - title: 'Тип данных', + title: 'DataType', type: 'object', }, minCount: { - title: 'Минимальный предел', + title: 'Min Count', type: 'integer', }, maxCount: { - title: 'Максимальный предел', + title: 'Max Count', type: 'integer', }, class: { - title: 'Класс значений', + title: 'Value Class', type: 'object', }, nodeKind: { diff --git a/src/schema/RdfsSchema.ts b/src/schema/RdfsSchema.ts index c7a3756..9f37a00 100644 --- a/src/schema/RdfsSchema.ts +++ b/src/schema/RdfsSchema.ts @@ -10,7 +10,7 @@ export const NopSchema: any /*JSONSchema6forRdf*/ = { $schema: 'http://json-schema.org/draft-07/schema#', - //$id: 'http://cpgu.kbpm.ru/ns/rm/rdf#NopSchema', + //$id: 'https://agentlab.eu/ns/rm/rdf#NopSchema', '@id': 'rm:NopSchema', // json-ld '@type': 'sh:NodeShape', // json-ld targetClass: 'rdfs:Nop', @@ -26,7 +26,7 @@ export const NopSchema: any /*JSONSchema6forRdf*/ = { export const ResourceSchema: any /*JSONSchema6forRdf*/ = { $schema: 'http://json-schema.org/draft-07/schema#', - //$id: 'http://cpgu.kbpm.ru/ns/rm/rdf#ResourceSchema', + //$id: 'https://agentlab.eu/ns/rm/rdf#ResourceSchema', '@id': 'rm:ResourceSchema', // json-ld '@type': 'sh:NodeShape', // json-ld title: 'Resource Schema', @@ -44,12 +44,12 @@ export const ResourceSchema: any /*JSONSchema6forRdf*/ = { title: 'URI', }, '@type': { - title: 'Тип', + title: 'Class', type: 'string', format: 'iri', }, label: { - title: 'Метка', + title: 'Label', type: 'string', }, }, @@ -58,7 +58,7 @@ export const ResourceSchema: any /*JSONSchema6forRdf*/ = { export const ClassSchema: any /*JSONSchema6forRdf*/ = { $schema: 'http://json-schema.org/draft-07/schema#', - //$id: 'http://cpgu.kbpm.ru/ns/rm/rdf#Class', + //$id: 'https://agentlab.eu/ns/rm/rdf#Class', '@id': 'rm:Class', // json-ld '@type': 'sh:NodeShape', // json-ld title: 'Class Schema', @@ -75,18 +75,18 @@ export const ClassSchema: any /*JSONSchema6forRdf*/ = { title: 'URI', }, '@type': { - title: 'Тип', + title: 'Class', type: 'string', format: 'iri', }, //label: { // '@id': 'rdfs:label', - // title: 'Метка', + // title: 'Label', // type: 'string', //}, //subClassOf: { // '@id': 'rdfs:subClassOf', - // title: 'Подкласс классов', + // title: 'Subclass of a Class', // type: 'array', // items: { // type: 'string', @@ -101,8 +101,8 @@ export const ClassSchema: any /*JSONSchema6forRdf*/ = { $schema: 'http://json-schema.org/draft-07/schema#', '@id': 'rdfs:Datatype', // json-ld '@type': 'rdfs:Datatype', // json-ld - title: 'Типы данных', - description: 'Типы данных', + title: 'DataType', + description: 'DataType', type: 'object', '@context': { '@type': 'rdf:type', @@ -115,12 +115,12 @@ export const ClassSchema: any /*JSONSchema6forRdf*/ = { format: 'iri', }, '@type': { - title: 'Тип', + title: 'Class', type: 'string', format: 'iri', }, label: { - title: 'Метка', + title: 'Label', type: 'string', }, // isDefinedBy: { diff --git a/test-data/data/folders.ttl b/test-data/data/folders.ttl new file mode 100644 index 0000000..e707959 --- /dev/null +++ b/test-data/data/folders.ttl @@ -0,0 +1,102 @@ +@prefix rdf: . +@prefix xsd: . +@prefix dcterms: . +@prefix oslc: . + +@prefix nav: . + +#Data +@prefix projects: . +@prefix users: . +@prefix folders: . + +# in context https://agentlab.eu/ns/rm/folders# + +folders:root + a nav:folder ; + dcterms:title "Requirement Project" ; + dcterms:description "Requirement Project Description" ; +# nav:parent folders:root ; + nav:processArea projects:defaultProject ; + dcterms:created "2019-01-16T13:21:08.720Z"^^xsd:dateTime ; + dcterms:creator users:user1 ; + dcterms:modified "2019-01-16T13:21:08.720Z"^^xsd:dateTime ; + oslc:modifiedBy users:user1 . + +folders:imported + a nav:folder ; + dcterms:title "Imported from documents" ; + dcterms:description "Default folder for requirements, imported from documents" ; + nav:parent folders:root ; + nav:processArea projects:defaultProject ; + dcterms:created "2019-05-29T13:21:08.720Z"^^xsd:dateTime ; + dcterms:creator users:user1 ; + dcterms:modified "2019-05-29T13:21:08.720Z"^^xsd:dateTime ; + oslc:modifiedBy users:user1 . + +folders:samples + a nav:folder ; + dcterms:title "Examples" ; + dcterms:description "Examples, uploaded from files" ; + nav:parent folders:root ; + nav:processArea projects:defaultProject ; + dcterms:created "2019-01-16T13:21:08.720Z"^^xsd:dateTime ; + dcterms:creator users:user4 ; + dcterms:modified "2019-01-16T13:21:08.720Z"^^xsd:dateTime ; + oslc:modifiedBy users:user4 . + +folders:samples_module + a nav:folder ; + dcterms:title "Module Example" ; + dcterms:description "Module example, uploaded from file" ; + nav:parent folders:samples ; + nav:processArea projects:defaultProject ; + dcterms:created "2019-01-16T13:21:08.720Z"^^xsd:dateTime ; + dcterms:creator users:user3 ; + dcterms:modified "2019-01-16T13:21:08.720Z"^^xsd:dateTime ; + oslc:modifiedBy users:user3 . + +folders:samples_collection + a nav:folder ; + dcterms:title "Collection Example" ; + dcterms:description "Collection example, uploaded from file" ; + nav:parent folders:samples ; + nav:processArea projects:defaultProject ; + dcterms:created "2019-01-16T13:21:08.720Z"^^xsd:dateTime ; + dcterms:creator users:user3 ; + dcterms:modified "2019-01-16T13:21:08.720Z"^^xsd:dateTime ; + oslc:modifiedBy users:user3 . + +folders:folder1 + a nav:folder ; + dcterms:title "Folder1" ; + dcterms:description "Folder1" ; + nav:parent folders:root ; + nav:processArea projects:defaultProject ; + dcterms:created "2019-01-16T13:21:08.720Z"^^xsd:dateTime ; + dcterms:creator users:user4 ; + dcterms:modified "2019-01-16T13:21:08.720Z"^^xsd:dateTime ; + oslc:modifiedBy users:user4 . + + +folders:folder2 + a nav:folder ; + dcterms:title "Folder2" ; + dcterms:description "Folder2" ; + nav:parent folders:root ; + nav:processArea projects:defaultProject ; + dcterms:created "2019-01-16T13:21:08.720Z"^^xsd:dateTime ; + dcterms:creator users:user2 ; + dcterms:modified "2019-01-16T13:21:08.720Z"^^xsd:dateTime ; + oslc:modifiedBy users:user2 . + +folders:folder1_1 + a nav:folder ; + dcterms:title "Folder1_1" ; + dcterms:description "Folder1_1" ; + nav:parent folders:folder1 ; + nav:processArea projects:defaultProject ; + dcterms:created "2019-01-16T13:21:08.720Z"^^xsd:dateTime ; + dcterms:creator users:user3 ; + dcterms:modified "2019-01-16T13:21:08.720Z"^^xsd:dateTime ; + oslc:modifiedBy users:user3 . diff --git a/test-data/data/projects.ttl b/test-data/data/projects.ttl new file mode 100644 index 0000000..d465c7c --- /dev/null +++ b/test-data/data/projects.ttl @@ -0,0 +1,19 @@ +@prefix rdf: . +@prefix xsd: . +@prefix dcterms: . +@prefix oslc: . + +@prefix nav: . + +@prefix users: . +@prefix projects: . + +# in context https://agentlab.eu/ns/rm/projects# + +projects:defaultProject + a nav:ProjectArea ; + dcterms:title "Default Project" ; + dcterms:created "2019-01-16T13:21:08.720Z"^^xsd:dateTime ; + dcterms:creator users:user1 ; + dcterms:modified "2019-01-16T13:21:08.720Z"^^xsd:dateTime ; + oslc:modifiedBy users:user1 . diff --git a/test-data/data/sample-collection.ttl b/test-data/data/sample-collection.ttl new file mode 100644 index 0000000..f3c9ee7 --- /dev/null +++ b/test-data/data/sample-collection.ttl @@ -0,0 +1,100 @@ +@prefix rdf: . +@prefix rdfs: . +@prefix xsd: . +@prefix dcterms: . +@prefix oslc: . + +@prefix rm: . +@prefix nav: . +@prefix rmUserTypes: . +@prefix clss: . + +# Data +@prefix projects: . +@prefix users: . +@prefix folders: . +@prefix reqs: . + +# in context https://agentlab.eu/ns/rm/reqs# + +reqs:collect1 + a clss:Document ; + dcterms:identifier "20000"^^xsd:integer ; + dcterms:title "Requirement Collection 20000"^^xsd:string ; + dcterms:description "Requirement Collection 20000 Description"^^xsd:string ; + rm:artifactFormat rmUserTypes:_YwcOsRmREemK5LEaKhoOow_Collection ; + dcterms:creator users:user1 ; + dcterms:created "2017-02-22T15:58:30.675Z"^^xsd:dateTime ; + oslc:modifiedBy users:user1 ; + dcterms:modified "2019-01-16T13:21:08.720Z"^^xsd:dateTime ; + nav:processArea projects:defaultProject ; + rm:assetFolder folders:samples_collection . + +reqs:req1 + a clss:Info ; + dcterms:identifier "20001"^^xsd:integer ; + dcterms:title "Collection 20000 - Req 20001 - Title"^^xsd:string ; + rm:xhtmlText "

Collection 20000 - Req 20001 - Main Text

"^^rdf:HTML ; + rm:artifactFormat rmUserTypes:_YwcOsRmREemK5LEaKhoOow_Text ; + dcterms:creator users:user1 ; + dcterms:created "2017-02-22T15:58:30.675Z"^^xsd:dateTime ; + oslc:modifiedBy users:user1 ; + dcterms:modified "2019-01-16T13:21:08.720Z"^^xsd:dateTime ; + nav:processArea projects:defaultProject ; + rm:assetFolder folders:samples_collection . + +reqs:_a2HusThYEem2Z_XixsC3pQ + a rmUserTypes:UsedIn ; + rdf:object reqs:collect1 ; + rdf:subject reqs:req1 ; + dcterms:creator users:user1 ; + dcterms:created "2014-02-10T10:12:16.000Z"^^xsd:dateTime ; + oslc:modifiedBy users:user1 ; + dcterms:modified "2014-02-10T10:12:16.000Z"^^xsd:dateTime ; + nav:processArea projects:defaultProject . + +reqs:req2 + a clss:Info ; + dcterms:identifier "20002"^^xsd:integer ; + dcterms:title "Collection 20000 - Req 20002 - Title"^^xsd:string ; + rm:xhtmlText "

Collection 20000 - Req 20002 - Main Text

"^^rdf:HTML ; + rm:artifactFormat rmUserTypes:_YwcOsRmREemK5LEaKhoOow_Text ; + dcterms:creator users:user1 ; + dcterms:created "2017-02-22T15:58:30.675Z"^^xsd:dateTime ; + oslc:modifiedBy users:user1 ; + dcterms:modified "2019-01-16T13:21:08.720Z"^^xsd:dateTime ; + nav:processArea projects:defaultProject ; + rm:assetFolder folders:samples_collection . + +reqs:_b2HusThYEem2Z_XixsC3pQ + a rmUserTypes:UsedIn ; + rdf:object reqs:collect1 ; + rdf:subject reqs:req2 ; + dcterms:creator users:user1 ; + dcterms:created "2014-02-10T10:12:16.000Z"^^xsd:dateTime ; + oslc:modifiedBy users:user1 ; + dcterms:modified "2014-02-10T10:12:16.000Z"^^xsd:dateTime ; + nav:processArea projects:defaultProject . + +reqs:req3 + a clss:Info ; + dcterms:identifier "20003"^^xsd:integer ; + dcterms:title "Collection 20000 - Req 20003 - Title"^^xsd:string ; + rm:xhtmlText "

Collection 20000 - Req 20003 - Main Text

"^^rdf:HTML ; + rm:artifactFormat rmUserTypes:_YwcOsRmREemK5LEaKhoOow_Text ; + dcterms:creator users:user1 ; + dcterms:created "2017-02-22T15:58:30.675Z"^^xsd:dateTime ; + oslc:modifiedBy users:user1 ; + dcterms:modified "2019-01-16T13:21:08.720Z"^^xsd:dateTime ; + nav:processArea projects:defaultProject ; + rm:assetFolder folders:samples_collection . + +reqs:_c2HusThYEem2Z_XixsC3pQ + a rmUserTypes:UsedIn ; + rdf:object reqs:collect1 ; + rdf:subject reqs:req3 ; + dcterms:creator users:user1 ; + dcterms:created "2014-02-10T10:12:16.000Z"^^xsd:dateTime ; + oslc:modifiedBy users:user1 ; + dcterms:modified "2014-02-10T10:12:16.000Z"^^xsd:dateTime ; + nav:processArea projects:defaultProject . diff --git a/test-data/data/sample-module.ttl b/test-data/data/sample-module.ttl new file mode 100644 index 0000000..d9570e8 --- /dev/null +++ b/test-data/data/sample-module.ttl @@ -0,0 +1,367 @@ +@prefix rdf: . +@prefix rdfs: . +@prefix xsd: . +@prefix dcterms: . + +@prefix oslc: . +@prefix oslc_asset: . + +@prefix rm: . +@prefix nav: . +@prefix rmUserTypes: . +@prefix clss: . + +# Data +@prefix projects: . +@prefix users: . +@prefix folders: . +@prefix reqs: . + +# in context https://agentlab.eu/ns/rm/reqs# + +# root + + a clss:Classifier ; + dcterms:identifier "30000"^^xsd:integer ; + dcterms:title "Requirement Module 30000 Title"^^xsd:string ; + dcterms:description "Requirement Module 30000 Description"^^xsd:string ; + rm:artifactFormat rmUserTypes:_YwcOsRmREemK5LEaKhoOow_Module ; + dcterms:abstract "Requirement Module 30000 Abstract"^^xsd:string ; + dcterms:alternative "Requirement Module 30000 Alternative"^^xsd:string ; + dcterms:creator users:user1 ; + dcterms:created "2014-02-10T10:12:16.000Z"^^xsd:dateTime ; + oslc:modifiedBy users:user1 ; + dcterms:modified "2014-02-10T10:12:16.000Z"^^xsd:dateTime ; + oslc_asset:guid "E159CD38-5205-DA02-CDAE-560D10043BD5" ; + clss:status rmUserTypes:_YwrbNRmREemK5LEaKhoOow_Draft ; + clss:uri ; + oslc_asset:version "1.0"^^xsd:string ; + nav:processArea projects:defaultProject ; + rm:assetFolder folders:samples_module . + +# parent : +clss:_tHAikozUEeOiy8owVBW5pQ + a clss:Grouping ; + dcterms:identifier "30001"^^xsd:integer ; + dcterms:title "Requirement Module 30000 - Grouping 30001 Title"^^xsd:string ; + rm:xhtmlText "Requirement Module 30000 - Grouping 30001 Text"^^rdf:HTML ; + rm:artifactFormat rmUserTypes:_YwcOsRmREemK5LEaKhoOow_Text ; + clss:format "Text"^^xsd:string ; + clss:link ; + clss:status rmUserTypes:_YwrbNRmREemK5LEaKhoOow_Draft ; + clss:uri clss:_tHAikozUEeOiy8owVBW5pQ ; + dcterms:creator users:user1 ; + dcterms:created "2014-02-10T10:12:16.000Z"^^xsd:dateTime ; + oslc:modifiedBy users:user1 ; + dcterms:modified "2014-02-10T10:12:16.000Z"^^xsd:dateTime ; + nav:processArea projects:defaultProject ; + rm:assetFolder folders:samples_module . + +reqs:_M1HusThYEem2Z_XixsC3pQ + a rmUserTypes:UsedInModule ; + rdf:object ; + rdf:subject clss:_tHAikozUEeOiy8owVBW5pQ ; + rmUserTypes:parentBinding ; + dcterms:creator users:user1 ; + dcterms:created "2014-02-10T10:12:16.000Z"^^xsd:dateTime ; + oslc:modifiedBy users:user1 ; + dcterms:modified "2014-02-10T10:12:16.000Z"^^xsd:dateTime ; + rmUserTypes:depth 1 ; + rmUserTypes:bookOrder 1 ; + rmUserTypes:sectionNumber "0-1"^^xsd:string ; + nav:processArea projects:defaultProject . + +# parent : clss:_tHAikozUEeOiy8owVBW5pQ +clss:_zYXy8ozUEeOiy8owVBW5pQ + a clss:Grouping ; + dcterms:identifier "30002"^^xsd:integer ; + dcterms:title "Requirement Module 30000 - Grouping 30002 Title"^^xsd:string ; + rm:xhtmlText "Requirement Module 30000 - Grouping 30002 Text"^^rdf:HTML ; + rm:artifactFormat rmUserTypes:_YwcOsRmREemK5LEaKhoOow_Text ; + clss:format "Text"^^xsd:string ; + clss:link clss:_alBJ0o2fEeOiy8owVBW5pQ ; + clss:status rmUserTypes:_YwrbNRmREemK5LEaKhoOow_Draft ; + clss:uri clss:_zYXy8ozUEeOiy8owVBW5pQ ; + clss:dataType "0" ; + dcterms:creator users:user1 ; + dcterms:created "2014-02-10T10:12:16.000Z"^^xsd:dateTime ; + oslc:modifiedBy users:user1 ; + dcterms:modified "2014-02-10T10:12:16.000Z"^^xsd:dateTime ; + nav:processArea projects:defaultProject ; + rm:assetFolder folders:samples_module . + +reqs:_M2HusThYEem2Z_XixsC3pQ + a rmUserTypes:UsedInModule ; + rdf:object ; + rdf:subject clss:_zYXy8ozUEeOiy8owVBW5pQ ; + rmUserTypes:parentBinding clss:_tHAikozUEeOiy8owVBW5pQ ; + dcterms:creator users:user1 ; + dcterms:created "2014-02-10T10:12:16.000Z"^^xsd:dateTime ; + oslc:modifiedBy users:user1 ; + dcterms:modified "2014-02-10T10:12:16.000Z"^^xsd:dateTime ; + rmUserTypes:depth 2 ; + rmUserTypes:bookOrder 2 ; + rmUserTypes:sectionNumber "0-1.0-1"^^xsd:string ; + nav:processArea projects:defaultProject . + +# parent : clss:_zYXy8ozUEeOiy8owVBW5pQ +clss:_3AP4kYzUEeOiy8owVBW5pQ + a clss:Grouping ; + dcterms:identifier "30003"^^xsd:integer ; + dcterms:title "Requirement Module 30000 - Grouping 30003 Title"^^xsd:string ; + rm:xhtmlText "Requirement Module 30000 - Grouping 30003 Text"^^rdf:HTML ; + rm:artifactFormat rmUserTypes:_YwcOsRmREemK5LEaKhoOow_Text ; + clss:format "Text" ; + clss:link clss:_bD2a4o2fEeOiy8owVBW5pQ ; + clss:status rmUserTypes:_YwrbNRmREemK5LEaKhoOow_Draft ; + clss:uri clss:_3AP4kYzUEeOiy8owVBW5pQ ; + clss:dataType "0" ; + dcterms:creator users:user1 ; + dcterms:created "2014-02-10T10:12:16.000Z"^^xsd:dateTime ; + oslc:modifiedBy users:user1 ; + dcterms:modified "2014-02-10T10:12:16.000Z"^^xsd:dateTime ; + nav:processArea projects:defaultProject ; + rm:assetFolder folders:samples_module . + +reqs:_M3HusThYEem2Z_XixsC3pQ + a rmUserTypes:UsedInModule ; + rdf:object ; + rdf:subject clss:_3AP4kYzUEeOiy8owVBW5pQ ; + rmUserTypes:parentBinding clss:_zYXy8ozUEeOiy8owVBW5pQ ; + dcterms:creator users:user1 ; + dcterms:created "2014-02-10T10:12:16.000Z"^^xsd:dateTime ; + oslc:modifiedBy users:user1 ; + dcterms:modified "2014-02-10T10:12:16.000Z"^^xsd:dateTime ; + rmUserTypes:depth 3 ; + rmUserTypes:bookOrder 3 ; + rmUserTypes:sectionNumber "0-1.0-1.0-1"^^xsd:string ; + nav:processArea projects:defaultProject . + +# parent : clss:_3AP4kYzUEeOiy8owVBW5pQ +clss:_HmFCYozVEeOiy8owVBW5pQ + a clss:Grouping ; + dcterms:identifier "30004"^^xsd:integer ; + dcterms:title "Requirement Module 30000 - Grouping 30004 Title"^^xsd:string ; + rm:xhtmlText "Requirement Module 30000 - Grouping 30004 Text"^^rdf:HTML ; + rm:artifactFormat rmUserTypes:_YwcOsRmREemK5LEaKhoOow_Text ; + clss:format "Text"^^xsd:string ; + clss:link clss:_bs6mAY2fEeOiy8owVBW5pQ ; + clss:status rmUserTypes:_YwrbNRmREemK5LEaKhoOow_Draft ; + clss:uri clss:_HmFCYozVEeOiy8owVBW5pQ ; + clss:dataType "0" ; + dcterms:creator users:user1 ; + dcterms:created "2014-02-10T10:12:16.000Z"^^xsd:dateTime ; + oslc:modifiedBy users:user1 ; + dcterms:modified "2014-02-10T10:12:16.000Z"^^xsd:dateTime ; + nav:processArea projects:defaultProject ; + rm:assetFolder folders:samples_module . + +reqs:_M4HusThYEem2Z_XixsC3pQ + a rmUserTypes:UsedInModule ; + rdf:object ; + rdf:subject clss:_HmFCYozVEeOiy8owVBW5pQ ; + rmUserTypes:parentBinding clss:_3AP4kYzUEeOiy8owVBW5pQ ; + dcterms:creator users:user1 ; + dcterms:created "2014-02-10T10:12:16.000Z"^^xsd:dateTime ; + oslc:modifiedBy users:user1 ; + dcterms:modified "2014-02-10T10:12:16.000Z"^^xsd:dateTime ; + rmUserTypes:depth 4 ; + rmUserTypes:bookOrder 4 ; + rmUserTypes:sectionNumber "0-1.0-1.0-1.0-1"^^xsd:string ; + nav:processArea projects:defaultProject . + +# parent : clss:_HmFCYozVEeOiy8owVBW5pQ +clss:_L8Lf8YzVEeOiy8owVBW5pQ + a clss:Grouping ; + dcterms:identifier "30005"^^xsd:integer ; + dcterms:title "Requirement Module 30000 - Grouping 30005 Title"^^xsd:string ; + rm:xhtmlText "Requirement Module 30000 - Grouping 30005 Text"^^rdf:HTML ; + rm:artifactFormat rmUserTypes:_YwcOsRmREemK5LEaKhoOow_Text ; + clss:format "Text"^^xsd:string ; + clss:link clss:_crUH8Y2fEeOiy8owVBW5pQ ; + clss:status rmUserTypes:_YwrbNRmREemK5LEaKhoOow_Draft ; + clss:uri clss:_L8Lf8YzVEeOiy8owVBW5pQ ; + clss:dataType "0" ; + dcterms:creator users:user1 ; + dcterms:created "2014-02-10T10:12:16.000Z"^^xsd:dateTime ; + oslc:modifiedBy users:user1 ; + dcterms:modified "2014-02-10T10:12:16.000Z"^^xsd:dateTime ; + nav:processArea projects:defaultProject ; + rm:assetFolder folders:samples_module . + + reqs:_M5HusThYEem2Z_XixsC3pQ + a rmUserTypes:UsedInModule ; + rdf:object ; + rdf:subject clss:_L8Lf8YzVEeOiy8owVBW5pQ ; + rmUserTypes:parentBinding clss:_HmFCYozVEeOiy8owVBW5pQ ; + dcterms:creator users:user1 ; + dcterms:created "2014-02-10T10:12:16.000Z"^^xsd:dateTime ; + oslc:modifiedBy users:user1 ; + dcterms:modified "2014-02-10T10:12:16.000Z"^^xsd:dateTime ; + rmUserTypes:depth 5 ; + rmUserTypes:bookOrder 5 ; + rmUserTypes:sectionNumber "0-1.0-1.0-1.0-1.0-1"^^xsd:string ; + nav:processArea projects:defaultProject . + +# parent : clss:_L8Lf8YzVEeOiy8owVBW5pQ +clss:_RxREAYzVEeOiy8owVBW5pQ + a clss:Grouping ; + dcterms:identifier "30006"^^xsd:integer ; + dcterms:title "Requirement Module 30000 - Grouping 30006 Title"^^xsd:string ; + rm:xhtmlText "Requirement Module 30000 - Grouping 30006 Text"^^rdf:HTML ; + rm:artifactFormat rmUserTypes:_YwcOsRmREemK5LEaKhoOow_Text ; + clss:format "Text"^^xsd:string ; + clss:status rmUserTypes:_YwrbNRmREemK5LEaKhoOow_Draft ; + clss:uri clss:_RxREAYzVEeOiy8owVBW5pQ ; + clss:dataType "0" ; + dcterms:creator users:user1 ; + dcterms:created "2014-02-10T10:12:16.000Z"^^xsd:dateTime ; + oslc:modifiedBy users:user1 ; + dcterms:modified "2014-02-10T10:12:16.000Z"^^xsd:dateTime ; + nav:processArea projects:defaultProject ; + rm:assetFolder folders:samples_module . + +reqs:_M6HusThYEem2Z_XixsC3pQ + a rmUserTypes:UsedInModule ; + rdf:object ; + rdf:subject clss:_RxREAYzVEeOiy8owVBW5pQ ; + rmUserTypes:parentBinding clss:_L8Lf8YzVEeOiy8owVBW5pQ ; + dcterms:creator users:user1 ; + dcterms:created "2014-02-10T10:12:16.000Z"^^xsd:dateTime ; + oslc:modifiedBy users:user1 ; + dcterms:modified "2014-02-10T10:12:16.000Z"^^xsd:dateTime ; + rmUserTypes:depth 6 ; + rmUserTypes:bookOrder 6 ; + rmUserTypes:sectionNumber "0-1.0-1.0-1.0-1.0-1.0-1"^^xsd:string ; + nav:processArea projects:defaultProject . + +# parent : clss:_L8Lf8YzVEeOiy8owVBW5pQ +clss:_TSp-QYzVEeOiy8owVBW5pQ + a clss:Grouping ; + dcterms:identifier "30007"^^xsd:integer ; + dcterms:title "Requirement Module 30000 - Grouping 30007 Title"^^xsd:string ; + rm:xhtmlText "Requirement Module 30000 - Grouping 30007 Text"^^rdf:HTML ; + rm:artifactFormat rmUserTypes:_YwcOsRmREemK5LEaKhoOow_Text ; + clss:format "Text"^^xsd:string ; + clss:status rmUserTypes:_YwrbNRmREemK5LEaKhoOow_Draft ; + clss:uri clss:_TSp-QYzVEeOiy8owVBW5pQ ; + clss:dataType "0" ; + dcterms:creator users:user1 ; + dcterms:created "2014-02-10T10:12:16.000Z"^^xsd:dateTime ; + oslc:modifiedBy users:user1 ; + dcterms:modified "2014-02-10T10:12:16.000Z"^^xsd:dateTime ; + nav:processArea projects:defaultProject ; + rm:assetFolder folders:samples_module . + +reqs:_M7HusThYEem2Z_XixsC3pQ + a rmUserTypes:UsedInModule ; + rdf:object ; + rdf:subject clss:_TSp-QYzVEeOiy8owVBW5pQ ; + rmUserTypes:parentBinding clss:_L8Lf8YzVEeOiy8owVBW5pQ ; + dcterms:creator users:user1 ; + dcterms:created "2014-02-10T10:12:16.000Z"^^xsd:dateTime ; + oslc:modifiedBy users:user1 ; + dcterms:modified "2014-02-10T10:12:16.000Z"^^xsd:dateTime ; + rmUserTypes:depth 6 ; + rmUserTypes:bookOrder 7 ; + rmUserTypes:sectionNumber "0-1.0-1.0-1.0-1.0-1.0-2"^^xsd:string ; + nav:processArea projects:defaultProject . + +# parent : clss:_HmFCYozVEeOiy8owVBW5pQ +clss:_OG314ozVEeOiy8owVBW5pQ + a clss:Grouping ; + dcterms:identifier "30008"^^xsd:integer ; + dcterms:title "Requirement Module 30000 - Grouping 30008 Title"^^xsd:string ; + rm:xhtmlText "Requirement Module 30000 - Grouping 30008 Text"^^rdf:HTML ; + rm:artifactFormat rmUserTypes:_YwcOsRmREemK5LEaKhoOow_Text ; + clss:format "Text"^^xsd:string ; + clss:link clss:_c-KygY2fEeOiy8owVBW5pQ ; + clss:status rmUserTypes:_YwrbNRmREemK5LEaKhoOow_Draft ; + clss:uri clss:_OG314ozVEeOiy8owVBW5pQ ; + clss:dataType "0" ; + dcterms:creator users:user1 ; + dcterms:created "2014-02-10T10:12:16.000Z"^^xsd:dateTime ; + oslc:modifiedBy users:user1 ; + dcterms:modified "2014-02-10T10:12:16.000Z"^^xsd:dateTime ; + nav:processArea projects:defaultProject ; + rm:assetFolder folders:samples_module . + +reqs:_M8HusThYEem2Z_XixsC3pQ + a rmUserTypes:UsedInModule ; + rdf:object ; + rdf:subject clss:_OG314ozVEeOiy8owVBW5pQ ; + rmUserTypes:parentBinding clss:_HmFCYozVEeOiy8owVBW5pQ ; + dcterms:creator users:user1 ; + dcterms:created "2014-02-10T10:12:16.000Z"^^xsd:dateTime ; + oslc:modifiedBy users:user1 ; + dcterms:modified "2014-02-10T10:12:16.000Z"^^xsd:dateTime ; + rmUserTypes:depth 5 ; + rmUserTypes:bookOrder 8 ; + rmUserTypes:sectionNumber "0-1.0-1.0-1.0-1.0-2"^^xsd:string ; + nav:processArea projects:defaultProject . + +# parent : clss:_3AP4kYzUEeOiy8owVBW5pQ +clss:_Jdny0YzVEeOiy8owVBW5pQ + a clss:Grouping ; + dcterms:identifier "30009"^^xsd:integer ; + dcterms:title "Requirement Module 30000 - Grouping 30009 Title"^^xsd:string ; + rm:xhtmlText "Requirement Module 30000 - Grouping 30009 Text"^^rdf:HTML ; + rm:artifactFormat rmUserTypes:_YwcOsRmREemK5LEaKhoOow_Text ; + clss:format "Text"^^xsd:string ; + clss:link clss:_cBl1gY2fEeOiy8owVBW5pQ ; + clss:status rmUserTypes:_YwrbNRmREemK5LEaKhoOow_Draft ; + clss:uri clss:_Jdny0YzVEeOiy8owVBW5pQ ; + clss:dataType "0" ; + dcterms:creator users:user1 ; + dcterms:created "2014-02-10T10:12:16.000Z"^^xsd:dateTime ; + oslc:modifiedBy users:user1 ; + dcterms:modified "2014-02-10T10:12:16.000Z"^^xsd:dateTime ; + nav:processArea projects:defaultProject ; + rm:assetFolder folders:samples_module . + +reqs:_M9HusThYEem2Z_XixsC3pQ + a rmUserTypes:UsedInModule ; + rdf:object ; + rdf:subject clss:_Jdny0YzVEeOiy8owVBW5pQ ; + rmUserTypes:parentBinding clss:_3AP4kYzUEeOiy8owVBW5pQ ; + dcterms:creator users:user1 ; + dcterms:created "2014-02-10T10:12:16.000Z"^^xsd:dateTime ; + oslc:modifiedBy users:user1 ; + dcterms:modified "2014-02-10T10:12:16.000Z"^^xsd:dateTime ; + rmUserTypes:depth 4 ; + rmUserTypes:bookOrder 9 ; + rmUserTypes:sectionNumber "0-1.0-1.0-1.0-2"^^xsd:string ; + nav:processArea projects:defaultProject . + +# parent : clss:_zYXy8ozUEeOiy8owVBW5pQ +clss:_Ep8ocYzVEeOiy8owVBW5pQ + a clss:Grouping ; + dcterms:identifier "30010"^^xsd:integer ; + dcterms:title "Requirement Module 30000 - Grouping 30010 Title"^^xsd:string ; + rm:xhtmlText "Requirement Module 30000 - Grouping 30010 Text"^^rdf:HTML ; + rm:artifactFormat rmUserTypes:_YwcOsRmREemK5LEaKhoOow_Text ; + clss:format "Text"^^xsd:string ; + clss:link clss:_bQ0f442fEeOiy8owVBW5pQ ; + clss:status rmUserTypes:_YwrbNRmREemK5LEaKhoOow_Draft ; + clss:uri clss:_Ep8ocYzVEeOiy8owVBW5pQ ; + clss:dataType "0" ; + dcterms:creator users:user1 ; + dcterms:created "2014-02-10T10:12:16.000Z"^^xsd:dateTime ; + oslc:modifiedBy users:user1 ; + dcterms:modified "2014-02-10T10:12:16.000Z"^^xsd:dateTime ; + nav:processArea projects:defaultProject ; + rm:assetFolder folders:samples_module . + +reqs:_N1HusThYEem2Z_XixsC3pQ + a rmUserTypes:UsedInModule ; + rdf:object ; + rdf:subject clss:_Ep8ocYzVEeOiy8owVBW5pQ ; + rmUserTypes:parentBinding clss:_zYXy8ozUEeOiy8owVBW5pQ ; + dcterms:creator users:user1 ; + dcterms:created "2014-02-10T10:12:16.000Z"^^xsd:dateTime ; + oslc:modifiedBy users:user1 ; + dcterms:modified "2014-02-10T10:12:16.000Z"^^xsd:dateTime ; + rmUserTypes:depth 3 ; + rmUserTypes:bookOrder 10 ; + rmUserTypes:sectionNumber "0-1.0-1.0-2"^^xsd:string ; + nav:processArea projects:defaultProject . diff --git a/test-data/data/users.ttl b/test-data/data/users.ttl new file mode 100644 index 0000000..49b83be --- /dev/null +++ b/test-data/data/users.ttl @@ -0,0 +1,89 @@ +@prefix rdf: . +@prefix xsd: . +@prefix dcterms: . +@prefix oslc: . +@prefix foaf: . +@prefix schema: . + +@prefix pporoles: . +@prefix users: . + +# in context https://agentlab.eu/ns/rm/users# + +users:user1 a pporoles:User ; + schema:affiliation users:agentlab ; + foaf:name "User One" ; + dcterms:creator users:user1 ; + dcterms:created "2014-02-10T10:12:16.000Z"^^xsd:dateTime ; + oslc:modifiedBy users:user1 ; + dcterms:modified "2014-02-10T10:12:16.000Z"^^xsd:dateTime . + +users:user4 a pporoles:User ; + schema:affiliation users:agentlab ; + foaf:name "User Four" ; + dcterms:creator users:user1 ; + dcterms:created "2014-02-10T10:12:16.000Z"^^xsd:dateTime ; + oslc:modifiedBy users:user1 ; + dcterms:modified "2014-02-10T10:12:16.000Z"^^xsd:dateTime . + +users:user2 a pporoles:User ; + schema:affiliation users:agentlab ; + foaf:name "User Two" ; + dcterms:creator users:user1 ; + dcterms:created "2014-02-10T10:12:16.000Z"^^xsd:dateTime ; + oslc:modifiedBy users:user1 ; + dcterms:modified "2014-02-10T10:12:16.000Z"^^xsd:dateTime . + +users:user3 a pporoles:User ; + schema:affiliation users:agentlab ; + foaf:name "User Three" ; + dcterms:creator users:user1 ; + dcterms:created "2014-02-10T10:12:16.000Z"^^xsd:dateTime ; + oslc:modifiedBy users:user1 ; + dcterms:modified "2014-02-10T10:12:16.000Z"^^xsd:dateTime . + +users:officeImporterService a pporoles:User ; + foaf:name "Document Importer Service" ; + dcterms:creator users:user1 ; + dcterms:created "2020-05-15T10:12:16.000Z"^^xsd:dateTime ; + oslc:modifiedBy users:user1 ; + dcterms:modified "2020-05-15T10:12:16.000Z"^^xsd:dateTime . + +users:expertGroup1 a pporoles:UserGroup ; + foaf:name "Expert Group 1" ; + foaf:member users:user1 ; + foaf:member users:user4 ; + foaf:member users:user2 ; + dcterms:creator users:user1 ; + dcterms:created "2014-02-10T10:12:16.000Z"^^xsd:dateTime ; + oslc:modifiedBy users:user1 ; + dcterms:modified "2014-02-10T10:12:16.000Z"^^xsd:dateTime . + +users:expertUsers2 a pporoles:UserGroup ; + foaf:name "Expert Group 2" ; + foaf:member users:user1 ; + foaf:member users:user3 ; + dcterms:creator users:user1 ; + dcterms:created "2014-02-10T10:12:16.000Z"^^xsd:dateTime ; + oslc:modifiedBy users:user1 ; + dcterms:modified "2014-02-10T10:12:16.000Z"^^xsd:dateTime . + +users:adminUsers a pporoles:UserGroup ; + foaf:name "Administrators" ; + foaf:member users:user1 ; + dcterms:creator users:user1 ; + dcterms:created "2014-02-10T10:12:16.000Z"^^xsd:dateTime ; + oslc:modifiedBy users:user1 ; + dcterms:modified "2014-02-10T10:12:16.000Z"^^xsd:dateTime . + +users:agentlab a foaf:Organization ; + foaf:name "AgentLab" ; + foaf:homepage ; + foaf:member users:user1 ; + foaf:member users:user4 ; + foaf:member users:user2 ; + foaf:member users:user3 ; + dcterms:creator users:user1 ; + dcterms:created "2014-02-10T10:12:16.000Z"^^xsd:dateTime ; + oslc:modifiedBy users:user1 ; + dcterms:modified "2014-02-10T10:12:16.000Z"^^xsd:dateTime . diff --git a/test-data/shapes/classifier-shapes.ttl b/test-data/shapes/classifier-shapes.ttl new file mode 100644 index 0000000..ad40cc0 --- /dev/null +++ b/test-data/shapes/classifier-shapes.ttl @@ -0,0 +1,200 @@ +@prefix rdf: . +@prefix xsd: . +@prefix oslc_asset: . +@prefix clss: . +@prefix dc: . +@prefix dcterms: . +@prefix rm: . +@prefix rmUserTypes: . +@prefix sh: . + +##################################### +### Superclass shapes +##################################### + +clss:GenericArtifactShape + a sh:NodeShape ; + sh:targetClass clss:GenericArtifact ; + dcterms:title "RequirementClassShape GenericArtifact Title" ; + dcterms:description "RequirementClassShape GenericArtifact Description" ; + sh:property + dcterms:alternativeShape , + clss:uriShape , + clss:statusShape , + dcterms:abstractShape . + +clss:OSLCAssetArtifactShape + a sh:NodeShape ; + sh:targetClass clss:OSLCAssetArtifact ; + dcterms:title "RequirementClassShape OSLCAssetArtifact Title" ; + dcterms:description "RequirementClassShape OSLCAssetArtifact Description" ; + sh:property + oslc_asset:guidShape , + oslc_asset:versionShape . + +clss:FileLinkArtifactShape + a sh:NodeShape ; + sh:targetClass clss:FileLinkArtifact ; + dcterms:title "RequirementClassShape FileLinkArtifact Title" ; + dcterms:description "RequirementClassShape FileLinkArtifact Description" ; + sh:property + clss:fileShape , + clss:linkShape . + +##################################### +### Class shapes +##################################### +clss:ClassifierShape + a sh:NodeShape ; + sh:targetClass clss:Classifier ; + dcterms:title "RequirementClassShape Classifier Title" ; + dcterms:description "RequirementClassShape Classifier Description" ; + rm:inCreationMenu true ; + rm:defaultIndividNs "https://agentlab.eu/ns/rm/classifier#"^^xsd:anyURI ; + rm:defaultFormat rmUserTypes:_YwcOsRmREemK5LEaKhoOow_Module ; + rm:iconReference . + +clss:GroupingShape + a sh:NodeShape ; + sh:targetClass clss:Grouping ; + dcterms:title "RequirementClassShape Grouping Title" ; + dcterms:description "RequirementClassShape Grouping Description" ; + sh:property + clss:formatShape , + clss:dataTypeShape ; + rm:inCreationMenu true ; + rm:defaultIndividNs "https://agentlab.eu/ns/rm/classifier#"^^xsd:anyURI ; + rm:defaultFormat rmUserTypes:_YwcOsRmREemK5LEaKhoOow_Text . + +clss:DocumentShape + a sh:NodeShape ; + sh:targetClass clss:Document ; + dcterms:title "RequirementClassShape Document Title" ; + dcterms:description "RequirementClassShape Document Description" ; + rm:inCreationMenu true ; + rm:defaultIndividNs "https://agentlab.eu/ns/rm/classifier#"^^xsd:anyURI ; + rm:defaultFormat rmUserTypes:_YwcOsRmREemK5LEaKhoOow_Text ; + rm:iconReference . + +clss:InfoShape + a sh:NodeShape ; + sh:targetClass clss:Info ; + dcterms:title "RequirementClassShape Info Title" ; + dcterms:description "RequirementClassShape Info Description" ; + rm:inCreationMenu true ; + rm:defaultIndividNs "https://agentlab.eu/ns/rm/classifier#"^^xsd:anyURI ; + rm:defaultFormat rmUserTypes:_YwcOsRmREemK5LEaKhoOow_Collection ; + rm:iconReference . + + +##################################### +### Property shapes +##################################### + +#dc:typeShape +# a sh:PropertyShape ; +# sh:name "type" ; +# sh:path dc:type ; +# sh:maxCount 1 ; +# sh:datatype xsd:string . + +clss:uriShape + a sh:PropertyShape ; + sh:name "PropertyShape URI Name" ; + sh:description "PropertyShape URI Description" ; + sh:path clss:uri ; + rm:shapeModifiability "user" ; + rm:valueModifiability "user" ; + sh:maxCount 1 ; + sh:nodeKind sh:IRI . + +clss:statusShape + a sh:PropertyShape ; + sh:name "PropertyShape Status Name" ; + sh:description "PropertyShape Status Description" ; + sh:path clss:status ; +# who could modify shape data + rm:shapeModifiability "user" ; +# who could modify value data + rm:valueModifiability "user" ; +# sh:minCount 1 ; + sh:maxCount 1 ; + sh:nodeKind sh:IRI ; + sh:class rmUserTypes:_YwrbNRmREemK5LEaKhoOow . + +dcterms:alternativeShape + a sh:PropertyShape ; + sh:name "PropertyShape Alternative Name" ; + sh:path dcterms:alternative ; + rm:shapeModifiability "user" ; + rm:valueModifiability "user" ; + sh:maxCount 1 ; + sh:datatype xsd:string . + +dcterms:abstractShape + a sh:PropertyShape ; + sh:name "PropertyShape Abstract Name" ; + sh:path dcterms:abstract ; + rm:shapeModifiability "user" ; + rm:valueModifiability "user" ; + sh:maxCount 1 ; + sh:datatype xsd:string . + +oslc_asset:guidShape + a sh:PropertyShape ; + sh:name "PropertyShape Guid Name" ; + sh:path oslc_asset:guid ; + rm:shapeModifiability "user" ; + rm:valueModifiability "user" ; + sh:maxCount 1 ; + sh:datatype xsd:string . + +oslc_asset:versionShape + a sh:PropertyShape ; + sh:name "PropertyShape Version Name" ; + sh:path oslc_asset:version ; + rm:shapeModifiability "user" ; + rm:valueModifiability "user" ; + sh:maxCount 1 ; + sh:datatype xsd:string . + +clss:fileShape + a sh:PropertyShape ; + sh:name "PropertyShape File Name" ; + sh:description "PropertyShape File Description" ; + sh:path clss:file ; + rm:shapeModifiability "user" ; + rm:valueModifiability "user" ; + sh:maxCount 1 ; + sh:nodeKind sh:IRI ; + sh:class clss:File . + +clss:formatShape + a sh:PropertyShape ; + sh:name "PropertyShape Format Name" ; + sh:description "PropertyShape Format Description" ; + sh:path clss:format ; + rm:shapeModifiability "user" ; + rm:valueModifiability "user" ; + sh:maxCount 1 ; + sh:datatype xsd:string . + +clss:dataTypeShape + a sh:PropertyShape ; + sh:name "PropertyShape DataType Name" ; + sh:description "PropertyShape DataType Description" ; + sh:path clss:dataType ; + rm:shapeModifiability "user" ; + rm:valueModifiability "user" ; + sh:maxCount 1 ; + sh:datatype xsd:string . + +clss:linkShape + a sh:PropertyShape ; + sh:name "PropertyShape Link Name" ; + sh:description "PropertyShape Link Description" ; + sh:path clss:link ; + rm:shapeModifiability "user" ; + rm:valueModifiability "user" ; + sh:maxCount 1 ; + sh:nodeKind sh:IRI . diff --git a/test-data/shapes/ppo-roles-shapes.ttl b/test-data/shapes/ppo-roles-shapes.ttl new file mode 100644 index 0000000..399e20d --- /dev/null +++ b/test-data/shapes/ppo-roles-shapes.ttl @@ -0,0 +1,77 @@ +@prefix rdf: . +@prefix rdfs: . +@prefix dcterms: . +@prefix xsd: . +@prefix foaf: . +@prefix dc: . + +@prefix sh: . + +@prefix rm: . +@prefix pporoles: . + + +# ******** Class Shapes ******** +pporoles:UserShape + a sh:NodeShape ; + sh:targetClass pporoles:User ; + sh:property + rm:nameShape , + rm:creatorShape , + rm:createdShape , + rm:modifiedByShape , + rm:modifiedShape ; + rm:defaultIndividNs "https://agentlab.eu/ns/rm/users#"^^xsd:anyURI . + +pporoles:GroupShape + a sh:NodeShape ; + sh:targetClass pporoles:UserGroup ; + sh:property + rm:nameShape , + rm:creatorShape , + rm:createdShape , + rm:modifiedByShape , + rm:modifiedShape , + pporoles:memberShape ; + rm:defaultIndividNs "https://agentlab.eu/ns/rm/users#"^^xsd:anyURI . + +pporoles:PolicyRoleShape + a sh:NodeShape ; + sh:targetClass pporoles:PolicyRole ; + sh:property + rm:titleShape , + rm:descriptionShape , + rm:creatorShape , + rm:createdShape , + rm:modifiedByShape , + rm:modifiedShape , + pporoles:roleAgentShape , + pporoles:rolePolicyShape ; + rm:defaultIndividNs "https://agentlab.eu/ns/rm/users#"^^xsd:anyURI . + + +# ******** Property Shapes ******** + +pporoles:roleAgentShape + a sh:PropertyShape ; + sh:name "Role Agent"^^xsd:string ; + sh:description "Agent, designated to the Role."^^xsd:string ; + sh:path pporoles:roleAgent ; + sh:class pporoles:UserAgent ; + sh:nodeKind sh:BlankNodeOrIRI . + +pporoles:rolePolicyShape + a sh:PropertyShape ; + sh:name "Role Policy"^^xsd:string ; + sh:description "Policy, assigned to the Role."^^xsd:string ; + sh:path pporoles:rolePolicy ; + sh:class foaf:PrivacyPreference ; + sh:nodeKind sh:BlankNodeOrIRI . + +pporoles:memberShape + a sh:PropertyShape ; + sh:name "Group Member" ; + sh:description "Group Member."^^xsd:string ; + sh:path foaf:member ; + sh:class foaf:UserAgent ; + sh:nodeKind sh:BlankNodeOrIRI . diff --git a/test-data/shapes/rm-shapes.ttl b/test-data/shapes/rm-shapes.ttl new file mode 100644 index 0000000..b60764a --- /dev/null +++ b/test-data/shapes/rm-shapes.ttl @@ -0,0 +1,437 @@ +@prefix rdf: . +@prefix rdfs: . +@prefix dcterms: . +@prefix oslc: . +@prefix foaf: . +@prefix owl: . +@prefix vann: . +@prefix vs: . +@prefix xsd: . +@prefix sh: . + +@prefix rm: . +@prefix nav: . +@prefix pporoles: . + +@prefix rmUserTypes: . + +# in context https://agentlab.eu/ns/rm/rdf# + +rm:ArtifactClassesShape + a sh:NodeShape ; + sh:targetClass rm:ArtifactClasses ; + dcterms:title "Artifact Types"^^xsd:string ; + dcterms:description "Artifact Class of Classes."^^xsd:string ; + sh:property + rm:titleShape , + rm:descriptionShape , + rm:inCreationMenuShape . + +rm:LinkClassesShape + a sh:NodeShape ; + sh:targetClass rm:LinkClasses ; + dcterms:title "Link Types"^^xsd:string ; + dcterms:description "Link Class of Classes."^^xsd:string ; + sh:property + rm:titleShape , + rm:descriptionShape , + rm:subjectToObjectLabelShape , + rm:objectToSubjectLabelShape . + + +rm:ArtifactShape + a sh:NodeShape ; + sh:targetClass rm:Artifact ; + dcterms:title "Artifact"^^xsd:string ; + dcterms:description "Artifact"^^xsd:string ; + sh:property + rm:identifierShape , + rm:titleShape , + rm:descriptionShape , + rm:xhtmlTextShape , + rm:creatorShape , + rm:createdShape , + rm:modifiedByShape , + rm:modifiedShape , + nav:processAreaShape , + rm:assetFolderShape , + rm:formatShape . + +nav:folderShape + a sh:NodeShape ; + sh:targetClass nav:folder ; + dcterms:title "Folder"^^xsd:string ; + dcterms:description "Abstraction of a directory containing Requirements and RequirementCollections."^^xsd:string ; + sh:property + rm:titleShape , + rm:descriptionShape , + nav:parentShape, + nav:processAreaShape , + rm:creatorShape , + rm:createdShape , + rm:modifiedByShape , + rm:modifiedShape ; + rm:defaultIndividNs "https://agentlab.eu/ns/rm/folders#"^^xsd:anyURI . + +rm:ProjectAreaShape + a sh:NodeShape ; + sh:targetClass nav:ProjectArea ; + dcterms:title "Project Area"^^xsd:string ; + dcterms:description "Project Area"^^xsd:string ; + sh:property + rm:titleShape , + rm:creatorShape , + rm:createdShape , + rm:modifiedByShape , + rm:modifiedShape ; + rm:defaultIndividNs "https://agentlab.eu/ns/rm/projects#"^^xsd:anyURI . + +# Link Shapes +rm:LinkShape + a sh:NodeShape ; + sh:targetClass rm:Link ; + dcterms:title "Link"^^xsd:string ; + dcterms:description "Link."^^xsd:string ; + sh:property + rdf:objectShape , + rdf:subjectShape , + nav:processAreaShape , + rm:creatorShape , + rm:createdShape , + rm:modifiedByShape , + rm:modifiedShape . + +rmUserTypes:UsedInShape + a sh:NodeShape ; + sh:targetClass rmUserTypes:UsedIn ; + dcterms:title "UsedIn Link"^^xsd:string ; + dcterms:description "Connects Artifacts in Collection."^^xsd:string . + +rmUserTypes:UsedInModuleShape + a sh:NodeShape ; + sh:targetClass rmUserTypes:UsedInModule ; + dcterms:title "UsedInModule Link"^^xsd:string ; + dcterms:description "Connects Artifacts in Module."^^xsd:string ; + sh:property + rmUserTypes:parentBindingShape , + rmUserTypes:depthShape , + rmUserTypes:bookOrderShape , + rmUserTypes:sectionNumberShape , + rmUserTypes:isHeadingShape . + +# Enumeration Shapes +rmUserTypes:_YwcOsRmREemK5LEaKhoOowShape + a sh:NodeShape ; + sh:targetClass rmUserTypes:_YwcOsRmREemK5LEaKhoOow ; + dcterms:title "Format"^^xsd:string ; + dcterms:description "Artifact Format"^^xsd:string ; + sh:property + rm:titleShape , + rm:descriptionShape , + rm:valueShape . + +rmUserTypes:_YwrbNRmREemK5LEaKhoOowShape + a sh:NodeShape ; + sh:targetClass rmUserTypes:_YwrbNRmREemK5LEaKhoOow ; + dcterms:title "Status"^^xsd:string ; + dcterms:description "Artifact Status"^^xsd:string ; + sh:property + rm:titleShape , + rm:descriptionShape , + rm:valueShape . + +# ******** Properties ******** + +rm:inCreationMenuShape + a sh:PropertyShape ; + sh:name "Show in menu Create"^^xsd:string ; + sh:description "Show in menu Create"^^xsd:string ; + sh:path rm:inCreationMenu ; +# who could modify shape data + rm:shapeModifiability "system" ; +# who could modify value data + rm:valueModifiability "system" ; + #sh:minCount 0 ; + sh:maxCount 1 ; + sh:datatype xsd:boolean . + +rm:subjectToObjectLabelShape + a sh:PropertyShape ; + sh:name "Object Label"^^xsd:string ; + sh:description "Label of an Object of a Link"^^xsd:string ; + sh:path rm:subjectToObjectLabel ; + sh:order 2 ; +# who could modify shape data + rm:shapeModifiability "system" ; +# who could modify value data + rm:valueModifiability "user" ; + #sh:minCount 1 ; + sh:maxCount 1 ; + sh:datatype xsd:string . + +rm:objectToSubjectLabelShape + a sh:PropertyShape ; + sh:name "Subject Label"^^xsd:string ; + sh:description "Label of a Subject of a Link"^^xsd:string ; + sh:path rm:objectToSubjectLabel ; + sh:order 2 ; +# who could modify shape data + rm:shapeModifiability "system" ; +# who could modify value data + rm:valueModifiability "user" ; + #sh:minCount 1 ; + sh:maxCount 1 ; + sh:datatype xsd:string . + +rm:identifierShape + a sh:PropertyShape ; + sh:name "Identifier"^^xsd:string ; + sh:description "Numeric identifier, unique within a system"^^xsd:string ; + sh:path dcterms:identifier ; + sh:order 2 ; +# who could modify shape data + rm:shapeModifiability "system" ; +# who could modify value data + rm:valueModifiability "system" ; + #sh:minCount 1 ; + sh:maxCount 1 ; + sh:datatype xsd:integer . + +rm:titleShape + a sh:PropertyShape ; + sh:name "Title"^^xsd:string ; + sh:description "Title"^^xsd:string ; + sh:path dcterms:title ; + sh:order 3 ; + rm:shapeModifiability "system" ; + rm:valueModifiability "user" ; + sh:minCount 1 ; + sh:maxCount 1 ; + sh:datatype xsd:string . + +rm:descriptionShape + a sh:PropertyShape ; + sh:name "Description"^^xsd:string ; + sh:description "Description"^^xsd:string ; + sh:path dcterms:description ; + sh:order 4 ; + rm:shapeModifiability "system" ; + rm:valueModifiability "user" ; + sh:maxCount 1 ; + sh:datatype xsd:string . + +rm:xhtmlTextShape + a sh:PropertyShape ; + sh:name "Text"^^xsd:string ; + sh:description "Formatted text"^^xsd:string ; + sh:path rm:xhtmlText ; + sh:order 4 ; + rm:shapeModifiability "system" ; + rm:valueModifiability "user" ; + sh:maxCount 1 ; + sh:datatype rdf:HTML . + +rm:creatorShape + a sh:PropertyShape ; + sh:name "Creator"^^xsd:string ; + sh:description "An Agent, created an Artifact"^^xsd:string ; + sh:path dcterms:creator ; + sh:order 5 ; + rm:shapeModifiability "system" ; + rm:valueModifiability "system" ; + #sh:minCount 1; + sh:maxCount 1; + sh:class pporoles:User ; + sh:nodeKind sh:BlankNodeOrIRI . + +rm:createdShape + a sh:PropertyShape ; + sh:name "Created"^^xsd:string ; + sh:description "When an Artifact was created"^^xsd:string ; + sh:path dcterms:created ; + sh:order 6 ; + rm:shapeModifiability "system" ; + rm:valueModifiability "system" ; + #sh:minCount 1; + sh:maxCount 1; + sh:datatype xsd:dateTime . + +rm:modifiedByShape + a sh:PropertyShape ; + sh:name "Modified By"^^xsd:string ; + sh:description "An Agent, modified an Artifact"^^xsd:string ; + sh:path oslc:modifiedBy ; + sh:order 7 ; + rm:shapeModifiability "system" ; + rm:valueModifiability "system" ; + #sh:minCount 1; + sh:maxCount 1; + sh:class pporoles:User ; + sh:nodeKind sh:BlankNodeOrIRI . + +rm:modifiedShape + a sh:PropertyShape ; + sh:name "Modified"^^xsd:string ; + sh:description "When an Artifact was modified"^^xsd:string ; + sh:path dcterms:modified ; + sh:order 8 ; + rm:shapeModifiability "system" ; + rm:valueModifiability "system" ; + #sh:minCount 1; + sh:maxCount 1; + sh:datatype xsd:dateTime . + +nav:processAreaShape + a sh:PropertyShape ; + sh:name "Process Area"^^xsd:string ; + sh:description "Process Area"^^xsd:string ; + sh:path nav:processArea ; + sh:order 9 ; + rm:shapeModifiability "system" ; + rm:valueModifiability "system" ; + sh:minCount 0 ; + sh:maxCount 1 ; + sh:nodeKind sh:IRI ; + sh:class nav:ProjectArea . + +rm:assetFolderShape + a sh:PropertyShape ; + sh:name "Folder"^^xsd:string ; + sh:description "Asset folder"^^xsd:string ; + sh:path rm:assetFolder ; + sh:order 10 ; + rm:shapeModifiability "system" ; + rm:valueModifiability "user" ; + #sh:minCount 1 ; + sh:maxCount 1 ; + sh:nodeKind sh:IRI ; + sh:class nav:folder . + +rm:formatShape + a sh:PropertyShape ; + sh:name "Format"^^xsd:string ; + sh:description "Artifact Format"^^xsd:string ; + sh:path rm:artifactFormat ; + sh:order 11 ; + rm:shapeModifiability "system" ; + rm:valueModifiability "user" ; + #sh:minCount 1 ; + sh:maxCount 1 ; + sh:nodeKind sh:IRI ; + sh:class rmUserTypes:_YwcOsRmREemK5LEaKhoOow . + +nav:parentShape + a sh:PropertyShape ; + sh:name "Parent"^^xsd:string ; + sh:description "Expresses a containment relationship between folders."^^xsd:string ; + sh:path nav:parent ; + rm:shapeModifiability "system" ; + rm:valueModifiability "user" ; + sh:minCount 0 ; + sh:maxCount 1 ; + sh:nodeKind sh:IRI ; + sh:class nav:folder . + +rm:valueShape + a sh:PropertyShape ; + sh:name "Value"^^xsd:string ; + sh:description "Value"^^xsd:string ; + sh:path rdf:value ; + rm:shapeModifiability "system" ; + rm:valueModifiability "user" ; + #sh:minCount 1 ; + sh:maxCount 1 ; + sh:datatype xsd:string . + +rm:nameShape + a sh:PropertyShape ; + sh:name "Name"^^xsd:string ; + sh:description "Name"^^xsd:string ; + sh:path foaf:name ; + rm:shapeModifiability "system" ; + rm:valueModifiability "system" ; + #sh:minCount 1 ; + sh:maxCount 1 ; + sh:datatype xsd:string . + +# Property of Links + +rdf:objectShape + a sh:PropertyShape ; + sh:name "Object"^^xsd:string ; + sh:description "The object of the subject RDF statement."^^xsd:string ; + sh:path rdf:object ; + rm:shapeModifiability "system" ; + rm:valueModifiability "user" ; + sh:minCount 1 ; + sh:maxCount 1 ; + sh:nodeKind sh:IRI ; + sh:class rm:Artifact . + +rdf:subjectShape + a sh:PropertyShape ; + sh:name "Subject"^^xsd:string ; + sh:description "The subject of the subject RDF statement."^^xsd:string ; + sh:path rdf:subject ; + rm:shapeModifiability "system" ; + rm:valueModifiability "user" ; + sh:minCount 1 ; + sh:maxCount 1 ; + sh:nodeKind sh:IRI ; + sh:class rm:Artifact . + +rmUserTypes:parentBindingShape + a sh:PropertyShape ; + sh:name "Parent Binding"^^xsd:string ; + sh:description "Parent Binding."^^xsd:string ; + sh:path rmUserTypes:parentBinding ; + rm:shapeModifiability "system" ; + rm:valueModifiability "user" ; + sh:minCount 1 ; + sh:maxCount 1 ; + sh:nodeKind sh:IRI ; + sh:class rm:Artifact . + +rmUserTypes:depthShape + a sh:PropertyShape ; + sh:name "Depth"^^xsd:string ; + sh:description "Depth"^^xsd:string ; + sh:path rmUserTypes:depth ; + rm:shapeModifiability "system" ; + rm:valueModifiability "user" ; + sh:minCount 1 ; + sh:maxCount 1 ; + sh:datatype xsd:integer . + +rmUserTypes:bookOrderShape + a sh:PropertyShape ; + sh:name "Book Order"^^xsd:string ; + sh:description "Book Order"^^xsd:string ; + sh:path rmUserTypes:bookOrder ; + rm:shapeModifiability "system" ; + rm:valueModifiability "user" ; + sh:minCount 1 ; + sh:maxCount 1 ; + sh:datatype xsd:integer . + +rmUserTypes:sectionNumberShape + a sh:PropertyShape ; + sh:name "Section Number"^^xsd:string ; + sh:description "Section Number"^^xsd:string ; + sh:path rmUserTypes:sectionNumber ; + rm:shapeModifiability "system" ; + rm:valueModifiability "user" ; + sh:minCount 1 ; + sh:maxCount 1 ; + sh:datatype xsd:string . + +rmUserTypes:isHeadingShape + a sh:PropertyShape ; + sh:name "Is Heading"^^xsd:string ; + sh:description "Is Heading"^^xsd:string ; + sh:path rmUserTypes:isHeading ; + rm:shapeModifiability "system" ; + rm:valueModifiability "user" ; + #sh:minCount 1 ; + sh:maxCount 1 ; + sh:datatype xsd:boolean . diff --git a/test-data/shapes/rm-user-types-shapes.ttl b/test-data/shapes/rm-user-types-shapes.ttl new file mode 100644 index 0000000..f6c6bc8 --- /dev/null +++ b/test-data/shapes/rm-user-types-shapes.ttl @@ -0,0 +1,19 @@ +@prefix owl: . +@prefix dcterms: . +@prefix dc: . +@prefix rdf: . +@prefix rdfs: . +@prefix xsd: . + +@prefix sh: . + +@prefix rm: . +@prefix rmUserTypes: . + + +#rmUserTypes:primaryTextShape +# a sh:PropertyShape ; +# sh:name "primaryText" ; +# sh:path rmUserTypes:primaryText ; +# sh:maxCount 1 ; +# sh:datatype xsd:string . diff --git a/test-data/shapes/xsd-shapes.ttl b/test-data/shapes/xsd-shapes.ttl new file mode 100644 index 0000000..1ad6a8c --- /dev/null +++ b/test-data/shapes/xsd-shapes.ttl @@ -0,0 +1,48 @@ +@prefix rdf: . +@prefix rdfs: . +@prefix xsd: . +@prefix sh: . + +@prefix dcterms: . +@prefix rm: . + +@prefix xsdsh: . + +xsdsh: + rdfs:label "SHACL for XSD"@en ; + rdfs:comment "This shapes graph can be used to validate XSD Datatypes against a subset of the syntax rules."@en ; + sh:declare [ + sh:prefix "xsdsh" ; + sh:namespace "https://agentlab.eu/ns/xsd#" ; + ] . + + +xsdsh:DatatypeShape + a sh:NodeShape ; + sh:targetClass rdfs:Datatype ; + dcterms:title "Datatype"^^xsd:string ; + dcterms:description "Data type"^^xsd:string ; + rdfs:seeAlso ; + sh:property [ + sh:path rdfs:label ; + sh:name "Title"^^xsd:string ; + sh:description "Data type title"^^xsd:string ; + sh:minCount 1 ; + #sh:maxCount 1 ; + #sh:datatype xsd:string ; + sh:or ( [ sh:datatype xsd:string ] [ sh:datatype rdf:langString ] ) ; + ] ; + sh:property [ + sh:path rdfs:comment ; + sh:name "Description"^^xsd:string ; + sh:description "Data type description"^^xsd:string ; + sh:minCount 0 ; + sh:maxCount 1 ; + sh:datatype xsd:string ; + ] ; + sh:property [ + sh:path rm:inCreationMenu ; + sh:minCount 0 ; + sh:maxCount 1 ; + sh:datatype xsd:boolean ; + ] . diff --git a/test-data/vocabs/classifier.ttl b/test-data/vocabs/classifier.ttl new file mode 100644 index 0000000..1acd700 --- /dev/null +++ b/test-data/vocabs/classifier.ttl @@ -0,0 +1,109 @@ +@prefix rdf: . +@prefix rdfs: . +@prefix xsd: . +@prefix oslc_asset: . +@prefix dcterms: . + +@prefix rm: . +@prefix rmUserTypes: . + +@prefix clss: . + + +##################################### +### Superclass Classes +##################################### + +clss:GenericArtifact + a rm:ArtifactClasses ; + rdfs:subClassOf rm:Artifact ; + dcterms:title "RequirementClass Title GenericArtifact". + +clss:OSLCAssetArtifact + a rm:ArtifactClasses ; + dcterms:title "RequirementClass Title OSLCAssetArtifact". + +clss:FileLinkArtifact + a rm:ArtifactClasses ; + dcterms:title "RequirementClass Title FileLinkArtifact". + +##################################### +### Actual Classes +##################################### + +clss:Classifier + a rm:ArtifactClasses ; + rdfs:subClassOf + clss:GenericArtifact ; + dcterms:title "RequirementClass Title Classifier" ; + rm:inCreationMenu true ; + dcterms:description "RequirementClass Description Classifier" . + +clss:Grouping + a rm:ArtifactClasses ; + rdfs:subClassOf + clss:GenericArtifact , + clss:FileLinkArtifact ; + dcterms:title "RequirementClass Title Grouping" ; + rm:inCreationMenu true ; + dcterms:description "RequirementClass Description Grouping" . + +clss:Document + a rm:ArtifactClasses ; + rdfs:subClassOf + clss:GenericArtifact , + clss:OSLCAssetArtifact ; + dcterms:title "RequirementClass Title Document" ; + rm:inCreationMenu true ; + dcterms:description "RequirementClass Description Document" . + +clss:Info + a rm:ArtifactClasses ; + rdfs:subClassOf + clss:GenericArtifact , + clss:OSLCAssetArtifact , + clss:FileLinkArtifact ; + dcterms:title "RequirementClass Title Info" ; + rm:inCreationMenu true ; + dcterms:description "RequirementClass Description Info" . + +################################# + + + + + +##################################### +### Properties +##################################### + +clss:uri + a rdf:Property ; + dcterms:title "Property Title URI" ; + dcterms:description "Property Description URI" . + +clss:status + a rdf:Property ; + dcterms:title "Property Title Status" ; + dcterms:description "Property Description Status" . + +clss:file + a rdf:Property ; + dcterms:title "Property Title File" ; + dcterms:description "Property Description File" . + +clss:format + a rdf:Property ; + dcterms:title "Property Title Format" ; + dcterms:description "Property Description Format" . + +clss:dataType + a rdf:Property ; + dcterms:title "Property Title DataType" ; + dcterms:description "Property Description DataType" . + + +clss:link + a rdf:Property ; + dcterms:title "Property Title Link" ; + dcterms:description "Property Description Link" . diff --git a/test-data/vocabs/navigation.ttl b/test-data/vocabs/navigation.ttl new file mode 100644 index 0000000..bbd925f --- /dev/null +++ b/test-data/vocabs/navigation.ttl @@ -0,0 +1,40 @@ +@prefix rdf: . +@prefix owl: . + +@prefix nav: . + +# in context https://agentlab.eu/ns/rm/navigation# + +# ******** Classes ******** + +nav: + a owl:Ontology ; + dcterms:title "IBM Compliant Navigation Vocabulary" ; + rdfs:label "Navigation" . + +nav:folder + a rdfs:Class ; + rdfs:isDefinedBy nav: ; + rdfs:label "Folder" ; + rdfs:comment "Abstraction of a directory containing Requirements and RequirementCollections." . + +nav:ProjectArea + a rdfs:Class ; + rdfs:isDefinedBy nav: ; + rdfs:label "ProjectArea" ; + rdfs:comment "Abstraction of a Project Area." . + + +# ******** Properties ******** + +nav:parent + a rdf:Property ; + rdfs:isDefinedBy nav: ; + rdfs:label "Parent" ; + rdfs:comment "Expresses a containment relationship between folders." . + +nav:processArea + a rdf:Property ; + rdfs:isDefinedBy nav: ; + rdfs:label "Folder" ; + rdfs:comment "Expresses a containment relationship between folder and project." . diff --git a/test-data/vocabs/ppo-roles.ttl b/test-data/vocabs/ppo-roles.ttl new file mode 100644 index 0000000..f10eb65 --- /dev/null +++ b/test-data/vocabs/ppo-roles.ttl @@ -0,0 +1,68 @@ +@prefix rdf: . +@prefix rdfs: . +@prefix owl: . +@prefix adms: . +@prefix dcterms: . +@prefix xsd: . +@prefix vann: . +@prefix foaf: . +@prefix dc: . +@prefix ppo: . + +@prefix rm: . + +@prefix pporoles: . + + + a owl:Ontology, adms:SemanticAsset; + dcterms:title "Roles Extension for Privacy Preference Ontology (PPO)"; + dcterms:description "A roles ontology to create RBAC privacy preferences for Linked Data based on PPO ontology"; + dcterms:modified "2019-08-09"^^xsd:date; + vann:preferredNamespaceUri "https://agentlab.eu/ns/rm/ppo-roles#"; + vann:preferredNamespacePrefix "ppo"; + dcterms:created "2019-08-09"^^xsd:date; + dcterms:type ; + dcterms:status . + +pporoles:ttl a adms:SemanticDistribution; + dcterms:FileFormat <>; + adms:accessURL "https://agentlab.eu/ns/rm/ppo-roles.ttl"; + adms:status . + +pporoles:UserAgent + a rdfs:Class ; + rdfs:subClassOf + foaf:Agent ; + dcterms:title "User Agent" ; + dcterms:description "User Agent of a System." . + +pporoles:User + a rdfs:Class ; + rdfs:subClassOf + pporoles:UserAgent ; + dcterms:title "User" ; + dcterms:description "User of a System." . + +pporoles:UserGroup + a rdfs:Class ; + rdfs:subClassOf + pporoles:UserAgent ; + dcterms:title "User Group" ; + dcterms:description "Group of System Users." . + + +pporoles:PolicyRole a rdfs:Class, owl:Class; + rdfs:label "Policy Role"; + rdfs:comment "Policy Role connects Agents and security Politics" . + +pporoles:roleAgent a rdf:Property, owl:DatatypeProperty; + rdfs:label "Role Agent"; + rdfs:comment "Agent, designated to the Role"; + rdfs:domain pporoles:PolicyRole; + rdfs:range pporoles:UserAgent . + +pporoles:rolePolicy a rdf:Property; + rdfs:label "Role Policy"; + rdfs:comment "Policy, assigned to the Role"; + rdfs:domain pporoles:PolicyRole ; + rdfs:range ppo:PrivacyPreference . diff --git a/test-data/vocabs/ppo.ttl b/test-data/vocabs/ppo.ttl new file mode 100644 index 0000000..99a4099 --- /dev/null +++ b/test-data/vocabs/ppo.ttl @@ -0,0 +1,215 @@ +@prefix rdf: . +@prefix owl: . +@prefix adms: . +@prefix dcterms: . +@prefix xsd: . +@prefix vann: . +@prefix foaf: . +@prefix dc: . +@prefix ppo: . +@prefix rdfs: . + + a owl:Ontology, adms:SemanticAsset; + dcterms:title "Privacy Preference Ontology (PPO)"; + dcterms:description "An ontology to create privacy preferences for Linked Data"; + dcterms:modified "2013-11-13"^^xsd:date; + vann:preferredNamespaceUri "http://vocab.deri.ie/ppo#"; + vann:preferredNamespacePrefix "ppo"; + foaf:homepage ; + dcterms:created "2011-02-15"^^xsd:date; + dcterms:publisher "http://vocab.deri.ie/ppo#DERI%2C%20NUI%20Galway"; + dcterms:partOf ; + dcterms:type ; + dcterms:status ; + dc:creator + ppo:alepas, + ppo:owesac . + +ppo:ttl a adms:SemanticDistribution; + dcterms:FileFormat <>; + adms:accessURL "http://vocab.deri.ie/ppo.ttl"; + adms:status . + +ppo:rdf a adms:SemanticDistribution; + dcterms:FileFormat <>; + adms:accessURL "http://vocab.deri.ie/ppo.rdf"; + adms:status . + +ppo:alepas a foaf:Person; + foaf:name "Alexandre Passant"; + foaf:homepage . + + a dcterms:Agent; + foaf:member + ppo:alepas, + ppo:owesac; + foaf:name "DERI, NUI Galway"; + foaf:homepage + , + . + +ppo:owesac a foaf:Person; + foaf:name "Owen Sacco"; + foaf:homepage . + +ppo:AccessSpace a rdfs:Class, owl:Class; + rdfs:label "Access Space"; + rdfs:comment "A space which contains ASK queries that test certain requirements which a requester must have" . + +ppo:Condition a rdfs:Class, owl:Class; + rdfs:label "Condition"; + rdfs:comment "A condition contains properties that denote restrictions to the data being protected." . + +ppo:PrivacyPreference a rdfs:Class, owl:Class; + rdfs:label "Privacy Preference"; + rdfs:comment "A privacy preference contains statements about restricting RDF data" . + +ppo:Operator a rdfs:Class, owl:Class; + rdfs:label "Operator"; + rdfs:comment "The parent logical operator class" . + +ppo:And a rdfs:Class, owl:Class; + rdfs:label "And"; + rdfs:comment "Logical conjuction"; + rdfs:subClassOf ppo:Operator . + +ppo:Or a rdfs:Class, owl:Class; + rdfs:label "Or"; + rdfs:comment "Logical disjunction"; + rdfs:subClassOf ppo:Operator . + +ppo:Not a rdfs:Class, owl:Class; + rdfs:label "Not"; + rdfs:comment "Logical Negation"; + rdfs:subClassOf ppo:Operator . + +ppo:Create a rdfs:Class, owl:Class; + rdfs:label "Create"; + rdfs:comment "The Create access control privilege for creating new data elements" . + +ppo:Update a rdfs:Class, owl:Class; + rdfs:label "Update"; + rdfs:comment "The Update access control privilege for updating data elements" . + +ppo:Delete a rdfs:Class, owl:Class; + rdfs:label "Delete"; + rdfs:comment "The Delete access control privilege for deleting data elements" . + +ppo:hasAccessQuery a rdf:Property, owl:DatatypeProperty; + rdfs:label "access query"; + rdfs:comment "An ASK query that denotes a pattern which requesters must satisfy"; + rdfs:domain ppo:AccessSpace; + rdfs:range rdfs:Literal . + +ppo:appliesToNamedGraph a rdf:Property; + rdfs:label "applies to named graph"; + rdfs:comment "A privacy preference that applies to a trix:Graph. When a privacy preference has this property it means that the privacy conditions apply to a named graph."; + rdfs:domain ppo:PrivacyPreference . + +ppo:appliesToResource a rdf:Property; + rdfs:label "applies to resource"; + rdfs:comment "A privacy preference that applies to an rdfs:Resource. When a privacy preference has this property it means that the privacy conditions apply to a resource."; + rdfs:domain ppo:PrivacyPreference; + rdfs:range rdfs:Resource . + +ppo:appliesToStatement a rdf:Property; + rdfs:label "applies to statement"; + rdfs:comment "A privacy preference that applies to an rdf:Statement. When a privacy preference has this property it means that the privacy conditions apply to a statement."; + rdfs:domain ppo:PrivacyPreference; + rdfs:range rdf:Statement . + +ppo:classAsObject a rdf:Property; + rdfs:label "class as object"; + rdfs:comment "A condition that applies to an instance of a class when it is as an object of a resource."; + rdfs:domain ppo:Condition; + rdfs:range rdfs:Class; + rdfs:subPropertyOf rdf:object . + +ppo:classAsSubject a rdf:Property; + rdfs:label "class as subject"; + rdfs:comment "A condition that applies to an instance of a class when it is as a subject of a resource."; + rdfs:domain ppo:Condition; + rdfs:range rdfs:Class; + rdfs:subPropertyOf rdf:subject . + +ppo:hasAccess a rdf:Property; + rdfs:label "has access"; + rdfs:comment "The access control privilege which is granted to the user. The access control is described using the Web Access Control vocabulary."; + rdfs:domain ppo:PrivacyPreference . + +ppo:hasAccessSpace a rdf:Property; + rdfs:label "has access space"; + rdfs:comment "An access space which a privacy preference has"; + rdfs:domain ppo:PrivacyPreference; + rdfs:range ppo:AccessSpace . + +ppo:hasCondition a rdf:Property; + rdfs:label "has condition"; + rdfs:comment "The conditions which a privacy preference has"; + rdfs:domain ppo:PrivacyPreference; + rdfs:range ppo:Condition . + +ppo:hasLiteral a rdf:Property, owl:DatatypeProperty; + rdfs:label "has literal"; + rdfs:comment "A condition that applies to an rdfs:Literal."; + rdfs:domain ppo:Condition; + rdfs:range rdfs:Literal . + +ppo:hasProperty a rdf:Property; + rdfs:label "has property"; + rdfs:comment "A condition that applies to an rdf:Property."; + rdfs:domain ppo:Condition; + rdfs:range rdf:Property . + +ppo:resourceAsObject a rdf:Property; + rdfs:label "resource as object"; + rdfs:comment "A condition that applies to a URI when it is an object of an rdfs:Resource."; + rdfs:domain ppo:Condition; + rdfs:range rdfs:Resource; + rdfs:subPropertyOf rdf:object . + +ppo:resourceAsSubject a rdf:Property; + rdfs:label "resource as subject"; + rdfs:comment "A condition that applies to a URI when it is a subject of an rdfs:Resource."; + rdfs:domain ppo:Condition; + rdfs:range rdfs:Resource; + rdfs:subPropertyOf rdf:subject . + +ppo:hasNoAccess a rdf:Property; + rdfs:label "has no access"; + rdfs:comment "The access control privilege which is not granted to the user. The access control is described using the Web Access Control vocabulary."; + rdfs:domain ppo:PrivacyPreference . + +ppo:appliesToDataset a rdf:Property; + rdfs:label "applies to dataset"; + rdfs:comment " A privacy preference that applies to a void:Dataset."; + rdfs:domain ppo:PrivacyPreference . + +ppo:appliesToContext a rdf:Property; + rdfs:label "applies to context"; + rdfs:comment "A privacy preference that applies to a context in a quad (as specified by N-Quads http://sw.deri.org/2008/07/n-quads/) "; + rdfs:domain ppo:PrivacyPreference; + rdfs:range rdfs:Resource . + +ppo:hasAccessAgent a rdf:Property; + rdfs:label "has access agent"; + rdfs:comment "An agent who is granted or denied the access control privilege(s)"; + rdfs:domain ppo:AccessSpace; + rdfs:range foaf:Agent . + +ppo:hasLogicalOperator a rdf:Property; + rdfs:label "has logical operator"; + rdfs:comment "The logical operator which a Condition has"; + rdfs:domain ppo:Condition; + rdfs:range ppo:Operator . + +ppo:hasChildCondition a rdf:Property; + rdfs:label "has child condition"; + rdfs:comment "Nested Conditions"; + rdfs:domain ppo:Condition; + rdfs:range ppo:Condition . + +ppo:hasPriority a rdf:Property; + rdfs:label "has priority"; + rdfs:comment "A weighted value that specifies the priority (rank) of a privacy preference"; + rdfs:domain ppo:PrivacyPreference . diff --git a/test-data/vocabs/rdf.ttl b/test-data/vocabs/rdf.ttl new file mode 100644 index 0000000..9355018 --- /dev/null +++ b/test-data/vocabs/rdf.ttl @@ -0,0 +1,126 @@ +@prefix rdf: . +@prefix rdfs: . +@prefix owl: . +@prefix dc: . + + a owl:Ontology ; + dc:title "The RDF Concepts Vocabulary (RDF)" ; + dc:description "This is the RDF Schema for the RDF vocabulary terms in the RDF namespace, defined in RDF 1.1 Concepts." ; + rdfs:seeAlso . + +rdf:HTML a rdfs:Datatype ; + rdfs:subClassOf rdfs:Literal ; + rdfs:isDefinedBy ; + rdfs:seeAlso ; + rdfs:label "HTML" ; + rdfs:comment "The datatype of RDF literals storing fragments of HTML content" . + +rdf:langString a rdfs:Datatype ; + rdfs:subClassOf rdfs:Literal ; + rdfs:isDefinedBy ; + rdfs:seeAlso ; + rdfs:label "langString" ; + rdfs:comment "The datatype of language-tagged string values" . + +rdf:PlainLiteral a rdfs:Datatype ; + rdfs:subClassOf rdfs:Literal ; + rdfs:isDefinedBy ; + rdfs:seeAlso ; + rdfs:label "PlainLiteral" ; + rdfs:comment "The class of plain (i.e. untyped) literal values , as used in RIF and OWL 2" . + +rdf:type a rdf:Property ; + rdfs:isDefinedBy ; + rdfs:label "type" ; + rdfs:domain rdfs:Resource ; + rdfs:range rdfs:Class ; + rdfs:comment "The subject is an instance of a class." . + +rdf:Property a rdfs:Class ; + rdfs:subClassOf rdfs:Resource ; + rdfs:isDefinedBy ; + rdfs:label "Property" ; + rdfs:comment "The class of RDF properties." . + +rdf:Statement a rdfs:Class ; + rdfs:subClassOf rdfs:Resource ; + rdfs:isDefinedBy ; + rdfs:label "Statement" ; + rdfs:comment "The class of RDF statements." . + +rdf:subject a rdf:Property ; + rdfs:isDefinedBy ; + rdfs:label "subject" ; + rdfs:domain rdf:Statement ; + rdfs:range rdfs:Resource ; + rdfs:comment "The subject of the subject RDF statement." . + +rdf:predicate a rdf:Property ; + rdfs:isDefinedBy ; + rdfs:label "predicate" ; + rdfs:domain rdf:Statement ; + rdfs:range rdfs:Resource ; + rdfs:comment "The predicate of the subject RDF statement." . + +rdf:object a rdf:Property ; + rdfs:isDefinedBy ; + rdfs:label "object" ; + rdfs:domain rdf:Statement ; + rdfs:range rdfs:Resource ; + rdfs:comment "The object of the subject RDF statement." . + +rdf:Bag a rdfs:Class ; + rdfs:subClassOf rdfs:Container ; + rdfs:isDefinedBy ; + rdfs:label "Bag" ; + rdfs:comment "The class of unordered containers." . + +rdf:Seq a rdfs:Class ; + rdfs:subClassOf rdfs:Container ; + rdfs:isDefinedBy ; + rdfs:label "Seq" ; + rdfs:comment "The class of ordered containers." . + +rdf:Alt a rdfs:Class ; + rdfs:subClassOf rdfs:Container ; + rdfs:isDefinedBy ; + rdfs:label "Alt" ; + rdfs:comment "The class of containers of alternatives." . + +rdf:value a rdf:Property ; + rdfs:isDefinedBy ; + rdfs:label "value" ; + rdfs:domain rdfs:Resource ; + rdfs:range rdfs:Resource ; + rdfs:comment "Idiomatic property used for structured values." . + +rdf:List a rdfs:Class ; + rdfs:subClassOf rdfs:Resource ; + rdfs:isDefinedBy ; + rdfs:label "List" ; + rdfs:comment "The class of RDF Lists." . + +rdf:nil a rdf:List ; + rdfs:isDefinedBy ; + rdfs:label "nil" ; + rdfs:comment "The empty list, with no items in it. If the rest of a list is nil then the list has no more items in it." . + +rdf:first a rdf:Property ; + rdfs:isDefinedBy ; + rdfs:label "first" ; + rdfs:domain rdf:List ; + rdfs:range rdfs:Resource ; + rdfs:comment "The first item in the subject RDF list." . + +rdf:rest a rdf:Property ; + rdfs:domain rdf:List ; + rdfs:isDefinedBy ; + rdfs:label "rest" ; + rdfs:range rdf:List ; + rdfs:comment "The rest of the subject RDF list after the first item." . + +rdf:XMLLiteral a rdfs:Datatype ; + rdfs:subClassOf rdfs:Literal ; + rdfs:isDefinedBy ; + rdfs:label "XMLLiteral" ; + rdfs:comment "The datatype of XML literal values." . diff --git a/test-data/vocabs/rdfs.ttl b/test-data/vocabs/rdfs.ttl new file mode 100644 index 0000000..e269860 --- /dev/null +++ b/test-data/vocabs/rdfs.ttl @@ -0,0 +1,125 @@ +@prefix rdf: . +@prefix rdfs: . +@prefix owl: . +@prefix dc: . + + + dc:title "The RDF Schema vocabulary (RDFS)" ; + a owl:Ontology ; + rdfs:seeAlso . + +rdfs:Class + a rdfs:Class ; + rdfs:comment "The class of classes." ; + rdfs:isDefinedBy ; + rdfs:label "Class" ; + rdfs:subClassOf rdfs:Resource . + +rdfs:Container + a rdfs:Class ; + rdfs:comment "The class of RDF containers." ; + rdfs:isDefinedBy ; + rdfs:label "Container" ; + rdfs:subClassOf rdfs:Resource . + +rdfs:ContainerMembershipProperty + a rdfs:Class ; + rdfs:comment """The class of container membership properties, rdf:_1, rdf:_2, ..., + all of which are sub-properties of 'member'.""" ; + rdfs:isDefinedBy ; + rdfs:label "ContainerMembershipProperty" ; + rdfs:subClassOf rdf:Property . + +rdfs:Datatype + a rdfs:Class ; + rdfs:comment "The class of RDF datatypes." ; + rdfs:isDefinedBy ; + rdfs:label "Datatype" ; + rdfs:subClassOf rdfs:Class . + +rdfs:Literal + a rdfs:Class ; + rdfs:comment "The class of literal values, eg. textual strings and integers." ; + rdfs:isDefinedBy ; + rdfs:label "Literal" ; + rdfs:subClassOf rdfs:Resource . + +rdfs:Resource + a rdfs:Class ; + rdfs:comment "The class resource, everything." ; + rdfs:isDefinedBy ; + rdfs:label "Resource" . + +rdfs:comment + a rdf:Property ; + rdfs:comment "A description of the subject resource." ; + rdfs:domain rdfs:Resource ; + rdfs:isDefinedBy ; + rdfs:label "comment" ; + rdfs:range rdfs:Literal . + +rdfs:domain + a rdf:Property ; + rdfs:comment "A domain of the subject property." ; + rdfs:domain rdf:Property ; + rdfs:isDefinedBy ; + rdfs:label "domain" ; + rdfs:range rdfs:Class . + +rdfs:isDefinedBy + a rdf:Property ; + rdfs:comment "The defininition of the subject resource." ; + rdfs:domain rdfs:Resource ; + rdfs:isDefinedBy ; + rdfs:label "isDefinedBy" ; + rdfs:range rdfs:Resource ; + rdfs:subPropertyOf rdfs:seeAlso . + +rdfs:label + a rdf:Property ; + rdfs:comment "A human-readable name for the subject." ; + rdfs:domain rdfs:Resource ; + rdfs:isDefinedBy ; + rdfs:label "label" ; + rdfs:range rdfs:Literal . + +rdfs:member + a rdf:Property ; + rdfs:comment "A member of the subject resource." ; + rdfs:domain rdfs:Resource ; + rdfs:isDefinedBy ; + rdfs:label "member" ; + rdfs:range rdfs:Resource . + +rdfs:range + a rdf:Property ; + rdfs:comment "A range of the subject property." ; + rdfs:domain rdf:Property ; + rdfs:isDefinedBy ; + rdfs:label "range" ; + rdfs:range rdfs:Class . + +rdfs:seeAlso + a rdf:Property ; + rdfs:comment "Further information about the subject resource." ; + rdfs:domain rdfs:Resource ; + rdfs:isDefinedBy ; + rdfs:label "seeAlso" ; + rdfs:range rdfs:Resource . + +rdfs:subClassOf + a rdf:Property ; + rdfs:comment "The subject is a subclass of a class." ; + rdfs:domain rdfs:Class ; + rdfs:isDefinedBy ; + rdfs:label "subClassOf" ; + rdfs:range rdfs:Class . + +rdfs:subPropertyOf + a rdf:Property ; + rdfs:comment "The subject is a subproperty of a property." ; + rdfs:domain rdf:Property ; + rdfs:isDefinedBy ; + rdfs:label "subPropertyOf" ; + rdfs:range rdf:Property . + diff --git a/test-data/vocabs/rm-user-types.ttl b/test-data/vocabs/rm-user-types.ttl new file mode 100644 index 0000000..4bf8bd5 --- /dev/null +++ b/test-data/vocabs/rm-user-types.ttl @@ -0,0 +1,233 @@ +@prefix owl: . +@prefix dcterms: . +@prefix dc: . +@prefix rdf: . +@prefix rdfs: . +@prefix xsd: . + +@prefix oslc_rm: . +@prefix oslc_asset: . + +@prefix rm: . +@prefix rmUserTypes: . + +# in context https://agentlab.eu/ns/rm/user-types# + +##################################### +# Link Types +##################################### +rmUserTypes:UsedInModule + a rm:LinkClasses ; + rdfs:subClassOf rmUserTypes:UsedIn ; + rm:subjectToObjectLabel "Used by" ; + rm:objectToSubjectLabel "Uses" ; + dcterms:description "Connects Artifacts in Module." ; + dcterms:title "UsedInModule Link" . + +rmUserTypes:parentBinding + a rdf:Property . + +rmUserTypes:bookOrder + a rdf:Property . + +rmUserTypes:sectionNumber + a rdf:Property . + +rmUserTypes:isHeading + a rdf:Property . + +rmUserTypes:depth + a rdf:Property . + +rmUserTypes:UsedIn + a rm:LinkClasses ; + rdfs:subClassOf rm:Link ; + rm:subjectToObjectLabel "Used by" ; + rm:objectToSubjectLabel "Uses" ; + dcterms:description "Connects Artifacts in Collection." ; + dcterms:title "UsedIn Link" . + +rmUserTypes:_YxuBERmREemK5LEaKhoOow + a rm:LinkClasses ; + rdfs:subClassOf rm:Link ; + rm:subjectToObjectLabel "Clarified by" ; + rm:objectToSubjectLabel "Clarifies" ; + dcterms:description "Clarification Link" ; + dcterms:title "Clarification Link" . + +rmUserTypes:_Yy33oRmREemK5LEaKhoOow + a rm:LinkClasses ; + rdfs:subClassOf rm:Link ; + rm:subjectToObjectLabel "Included into" ; + rm:objectToSubjectLabel "Indludes" ; + dcterms:description "Collects information about parts of a whole." ; + dcterms:title "Decomposition Link" . + +rmUserTypes:_YyfdIRmREemK5LEaKhoOow + a rm:LinkClasses ; + rdfs:subClassOf rm:Link ; + rm:subjectToObjectLabel "Defined into" ; + rm:objectToSubjectLabel "Defines" ; + dcterms:description "" ; + dcterms:title "Definition Link" . + +rmUserTypes:_YxkQERmREemK5LEaKhoOow + a rm:LinkClasses ; + rdfs:subClassOf rm:Link ; + rm:subjectToObjectLabel "Referenced by" ; + rm:objectToSubjectLabel "References" ; + dcterms:description "Reference Link." ; + dcterms:title "Reference Link" . + +rmUserTypes:_YxTxYRmREemK5LEaKhoOow + a rm:LinkClasses ; + rdfs:subClassOf rm:Link ; + rm:subjectToObjectLabel "Synonimised by" ; + rm:objectToSubjectLabel "Synonimizes" ; + dcterms:description "Connects two Terms from a Glossary with the same meaning." ; + dcterms:title "Synonim Link" . + +rmUserTypes:_YxoPvRmREemK5LEaKhoOow + a rm:LinkClasses ; + rdfs:subClassOf rm:Link ; + rm:subjectToObjectLabel "Realized by" ; + rm:objectToSubjectLabel "Realizes" ; + dcterms:description "Realization Link" ; + dcterms:title "Realization Link" . + +rmUserTypes:_YyMnLRmREemK5LEaKhoOow + a rm:LinkClasses ; + rdfs:subClassOf rm:Link ; + rm:subjectToObjectLabel "Regulated by" ; + rm:objectToSubjectLabel "Regulates" ; + dcterms:description "Regulation Link" ; + dcterms:title "Regulation Link" . + +rmUserTypes:_YxzMuRmREemK5LEaKhoOow + a rm:LinkClasses ; + rdfs:subClassOf rm:Link ; + rm:subjectToObjectLabel "Generated by" ; + rm:objectToSubjectLabel "Generates" ; + dcterms:description "" ; + dcterms:title "Generation Link" . + +rmUserTypes:_YxgfTRmREemK5LEaKhoOow + a rm:LinkClasses ; + rdfs:subClassOf rm:Link ; + rm:subjectToObjectLabel "Clarified in" ; + rm:objectToSubjectLabel "Clarifies" ; + dcterms:description "Clarification Link" ; + dcterms:title "Clarification Link" . + +rmUserTypes:_YyDAsRmREemK5LEaKhoOow + a rm:LinkClasses ; + rdfs:subClassOf rm:Link ; + rm:subjectToObjectLabel "Influenced by" ; + rm:objectToSubjectLabel "Influences" ; + dcterms:description "Clarification Link" ; + dcterms:title "Inflience Link" . + + + +##################################### +# Enum Data types +##################################### + +rmUserTypes:EnumeratedDatatype + a rdfs:Class . + + +# Formats +rmUserTypes:_YwcOsRmREemK5LEaKhoOow + a rdfs:Class ; + rdfs:subClassOf rmUserTypes:EnumeratedDatatype ; + dcterms:title "Artifact Format" ; + dcterms:description "Artifact Format" ; + rm:valueType xsd:string . + +rmUserTypes:_YwcOsRmREemK5LEaKhoOow_Module + a rmUserTypes:_YwcOsRmREemK5LEaKhoOow ; + dcterms:title "Module" ; + dcterms:description "Ordered hierarchical collection of elements" ; + rdf:value "Module"^^xsd:string ; + owl:sameAs . + +rmUserTypes:_YwcOsRmREemK5LEaKhoOow_Collection + a rmUserTypes:_YwcOsRmREemK5LEaKhoOow ; + dcterms:title "Collection" ; + dcterms:description "Unrdered flat collection of elements" ; + rdf:value "Collection"^^xsd:string ; + owl:sameAs . + +rmUserTypes:_YwcOsRmREemK5LEaKhoOow_Text + a rmUserTypes:_YwcOsRmREemK5LEaKhoOow ; + dcterms:title "Text" ; + dcterms:description "Contains formatted text" ; + rdf:value "Text"^^xsd:string ; + owl:sameAs . + +# Not supported + +#rmUserTypes:_YwcOsRmREemK5LEaKhoOow_Document +# a rmUserTypes:_YwcOsRmREemK5LEaKhoOow ; +# dcterms:title "Document" ; +# dcterms:description "Contains Document" ; +# rdf:value "Document"^^xsd:string ; +# owl:sameAs . + +#rmUserTypes:_YwcOsRmREemK5LEaKhoOow_Name +# a rmUserTypes:_YwcOsRmREemK5LEaKhoOow ; +# dcterms:title "Name" ; +# dcterms:description "Contains Name without formatting" ; +# rdf:value "Name"^^xsd:string . + +#rmUserTypes:_YwcOsRmREemK5LEaKhoOow_File +# a rmUserTypes:_YwcOsRmREemK5LEaKhoOow ; +# dcterms:title "File" ; +# dcterms:description "Contains File" ; +# rdf:value "File"^^xsd:string . + +# Artifact Statuses + +rmUserTypes:_YwrbNRmREemK5LEaKhoOow + a rdfs:Class ; + rdfs:subClassOf rmUserTypes:EnumeratedDatatype ; + dcterms:title "Artifact Status" ; + dcterms:description "" ; + rm:valueType xsd:string . + +rmUserTypes:_YwrbNRmREemK5LEaKhoOow_Draft + a rmUserTypes:_YwrbNRmREemK5LEaKhoOow ; + dcterms:title "Draft" ; + dcterms:description "Draft" ; + rdf:value "Draft"^^xsd:string . + +rmUserTypes:_YwrbNRmREemK5LEaKhoOow_Processed + a rmUserTypes:_YwrbNRmREemK5LEaKhoOow ; + dcterms:title "Processed" ; + dcterms:description "Processed" ; + rdf:value "Processed"^^xsd:string . + +rmUserTypes:_YwrbNRmREemK5LEaKhoOow_Accepted + a rmUserTypes:_YwrbNRmREemK5LEaKhoOow ; + dcterms:title "Accepted" ; + dcterms:description "Accepted" ; + rdf:value "Accepted"^^xsd:string . + +rmUserTypes:_YwrbNRmREemK5LEaKhoOow_Outdated + a rmUserTypes:_YwrbNRmREemK5LEaKhoOow ; + dcterms:title "Outdated" ; + dcterms:description "Outdated" ; + rdf:value "Outdated"^^xsd:string . + +rmUserTypes:_YwrbNRmREemK5LEaKhoOow_Rejected + a rmUserTypes:_YwrbNRmREemK5LEaKhoOow ; + dcterms:title "Rejected" ; + dcterms:description "Rejected" ; + rdf:value "Rejected"^^xsd:string . + +rmUserTypes:_YwrbNRmREemK5LEaKhoOow_Replaying + a rmUserTypes:_YwrbNRmREemK5LEaKhoOow ; + dcterms:title "Replaying" ; + dcterms:description "Replaying" ; + rdf:value "Replaying"^^xsd:string . diff --git a/test-data/vocabs/rm.ttl b/test-data/vocabs/rm.ttl new file mode 100644 index 0000000..7cb5765 --- /dev/null +++ b/test-data/vocabs/rm.ttl @@ -0,0 +1,96 @@ +@prefix dcterms: . +@prefix owl: . +@prefix oslc: . +@prefix rdf: . +@prefix rdfs: . +@prefix vann: . +@prefix vs: . +@prefix xsd: . + +@prefix rm: . +@prefix nav: . + +# in context https://agentlab.eu/ns/rm/rdf# + +# The Requirements Management ontology +rm: + a owl:Ontology ; + dcterms:title "The Requirements Management(RM) Vocabulary Extension" ; + dcterms:description "All vocabulary URIs defined in the AL Requirements Management (RM) namespace."^^xsd:string ; + vann:preferredNamespacePrefix "rm" ; + rdfs:label "AL Requirements Management(RM)" . + +# ******** Classes of Classes (meta-classes) ******** +rm:ArtifactClasses + a rdfs:Class ; + rdfs:subClassOf rdfs:Class ; + rdfs:isDefinedBy rm: ; + dcterms:title "Artifact Types" ; + dcterms:description "Artifact Class of Classes." . + +rm:LinkClasses + a rdfs:Class ; + rdfs:subClassOf rdfs:Class ; + rdfs:isDefinedBy rm: ; + dcterms:title "Link Types" ; + dcterms:description "Link Class of Classes." . + +# ******** Classes ******** + +rm:Artifact + a rm:ArtifactClasses ; + rdfs:isDefinedBy rm: ; + dcterms:title "Artifact" ; + dcterms:description "Artifact." . + +rm:Link + a rm:LinkClasses ; + rdfs:isDefinedBy rm: ; + dcterms:title "Link" ; + dcterms:description "Link." ; + rm:subjectToObjectLabel "Smth. connected to" ; + rm:objectToSubjectLabel "Connected to smth." . + +# ******** Properties ******** + +rm:artifactFormat + a rdf:Property ; + rdfs:isDefinedBy rm: ; + rdfs:comment "Artifact Format." ; + rdfs:label "Format" . + +rm:defaultFormat + a rdf:Property ; + rdfs:isDefinedBy rm: ; + rdfs:comment "Default Artifact Format." ; + rdfs:label "Default Format" . + +rm:inCreationMenu + a rdf:Property ; + rdfs:isDefinedBy rm: ; + rdfs:comment "Show in menu Create." ; + rdfs:label "Show in menu Create" . + +rm:iconReference + a rdf:Property ; + rdfs:isDefinedBy rm: ; + rdfs:comment "Icon Reference." ; + rdfs:label "Icon" . + +rm:subjectToObjectLabel + a rdf:Property ; + rdfs:isDefinedBy rm: ; + rdfs:comment "Label of an Object of a Link." ; + rdfs:label "Object Label" . + +rm:objectToSubjectLabel + a rdf:Property ; + rdfs:isDefinedBy rm: ; + rdfs:comment "Label of a Subject of a Link." ; + rdfs:label "Subject Label" . + +rm:assetFolder + a rdf:Property ; + rdfs:isDefinedBy rm: ; + rdfs:comment "Asset Folder." ; + rdfs:label "Folder" . diff --git a/test-data/vocabs/shacl.ttl b/test-data/vocabs/shacl.ttl new file mode 100644 index 0000000..a6bc507 --- /dev/null +++ b/test-data/vocabs/shacl.ttl @@ -0,0 +1,1665 @@ +# W3C Shapes Constraint Language (SHACL) Vocabulary +# Version from 2017-07-20 + +@prefix owl: . +@prefix rdf: . +@prefix rdfs: . +@prefix xsd: . + +@prefix sh: . + +sh: + a owl:Ontology ; + rdfs:label "W3C Shapes Constraint Language (SHACL) Vocabulary"@en ; + rdfs:comment "This vocabulary defines terms used in SHACL, the W3C Shapes Constraint Language."@en ; + sh:declare [ + sh:prefix "sh" ; + sh:namespace "http://www.w3.org/ns/shacl#" ; + ] ; + sh:suggestedShapesGraph . + + +# Shapes vocabulary ----------------------------------------------------------- + +sh:Shape + a rdfs:Class ; + rdfs:label "Shape"@en ; + rdfs:comment "A shape is a collection of constraints that may be targeted for certain nodes."@en ; + rdfs:subClassOf rdfs:Resource ; + rdfs:isDefinedBy sh: . + +sh:NodeShape + a rdfs:Class ; + rdfs:label "Node shape"@en ; + rdfs:comment "A node shape is a shape that specifies constraint that need to be met with respect to focus nodes."@en ; + rdfs:subClassOf sh:Shape ; + rdfs:isDefinedBy sh: . + +sh:PropertyShape + a rdfs:Class ; + rdfs:label "Property shape"@en ; + rdfs:comment "A property shape is a shape that specifies constraints on the values of a focus node for a given property or path."@en ; + rdfs:subClassOf sh:Shape ; + rdfs:isDefinedBy sh: . + +sh:deactivated + a rdf:Property ; + rdfs:label "deactivated"@en ; + rdfs:comment "If set to true then all nodes conform to this."@en ; + # rdfs:domain sh:Shape or sh:SPARQLConstraint + rdfs:range xsd:boolean ; + rdfs:isDefinedBy sh: . + +sh:targetClass + a rdf:Property ; + rdfs:label "target class"@en ; + rdfs:comment "Links a shape to a class, indicating that all instances of the class must conform to the shape."@en ; + rdfs:domain sh:Shape ; + rdfs:range rdfs:Class ; + rdfs:isDefinedBy sh: . + +sh:targetNode + a rdf:Property ; + rdfs:label "target node"@en ; + rdfs:comment "Links a shape to individual nodes, indicating that these nodes must conform to the shape."@en ; + rdfs:domain sh:Shape ; + rdfs:isDefinedBy sh: . + +sh:targetObjectsOf + a rdf:Property ; + rdfs:label "target objects of"@en ; + rdfs:comment "Links a shape to a property, indicating that all all objects of triples that have the given property as their predicate must conform to the shape."@en ; + rdfs:domain sh:Shape ; + rdfs:range rdf:Property ; + rdfs:isDefinedBy sh: . + +sh:targetSubjectsOf + a rdf:Property ; + rdfs:label "target subjects of"@en ; + rdfs:comment "Links a shape to a property, indicating that all subjects of triples that have the given property as their predicate must conform to the shape."@en ; + rdfs:domain sh:Shape ; + rdfs:range rdf:Property ; + rdfs:isDefinedBy sh: . + +sh:message + a rdf:Property ; + # domain: sh:Shape or sh:SPARQLConstraint or sh:SPARQLSelectValidator or sh:SPARQLAskValidator + # range: xsd:string or rdf:langString + rdfs:label "message"@en ; + rdfs:comment "A human-readable message (possibly with placeholders for variables) explaining the cause of the result."@en ; + rdfs:isDefinedBy sh: . + +sh:severity + a rdf:Property ; + rdfs:label "severity"@en ; + rdfs:comment "Defines the severity that validation results produced by a shape must have. Defaults to sh:Violation."@en ; + rdfs:domain sh:Shape ; + rdfs:range sh:Severity ; + rdfs:isDefinedBy sh: . + + +# Node kind vocabulary -------------------------------------------------------- + +sh:NodeKind + a rdfs:Class ; + rdfs:label "Node kind"@en ; + rdfs:comment "The class of all node kinds, including sh:BlankNode, sh:IRI, sh:Literal or the combinations of these: sh:BlankNodeOrIRI, sh:BlankNodeOrLiteral, sh:IRIOrLiteral."@en ; + rdfs:subClassOf rdfs:Resource ; + rdfs:isDefinedBy sh: . + +sh:BlankNode + a sh:NodeKind ; + rdfs:label "Blank node"@en ; + rdfs:comment "The node kind of all blank nodes."@en ; + rdfs:isDefinedBy sh: . + +sh:BlankNodeOrIRI + a sh:NodeKind ; + rdfs:label "Blank node or IRI"@en ; + rdfs:comment "The node kind of all blank nodes or IRIs."@en ; + rdfs:isDefinedBy sh: . + +sh:BlankNodeOrLiteral + a sh:NodeKind ; + rdfs:label "Blank node or literal"@en ; + rdfs:comment "The node kind of all blank nodes or literals."@en ; + rdfs:isDefinedBy sh: . + +sh:IRI + a sh:NodeKind ; + rdfs:label "IRI"@en ; + rdfs:comment "The node kind of all IRIs."@en ; + rdfs:isDefinedBy sh: . + +sh:IRIOrLiteral + a sh:NodeKind ; + rdfs:label "IRI or literal"@en ; + rdfs:comment "The node kind of all IRIs or literals."@en ; + rdfs:isDefinedBy sh: . + +sh:Literal + a sh:NodeKind ; + rdfs:label "Literal"@en ; + rdfs:comment "The node kind of all literals."@en ; + rdfs:isDefinedBy sh: . + + +# Results vocabulary ---------------------------------------------------------- + +sh:ValidationReport + a rdfs:Class ; + rdfs:label "Validation report"@en ; + rdfs:comment "The class of SHACL validation reports."@en ; + rdfs:subClassOf rdfs:Resource ; + rdfs:isDefinedBy sh: . + +sh:conforms + a rdf:Property ; + rdfs:label "conforms"@en ; + rdfs:comment "True if the validation did not produce any validation results, and false otherwise."@en ; + rdfs:domain sh:ValidationReport ; + rdfs:range xsd:boolean ; + rdfs:isDefinedBy sh: . + +sh:result + a rdf:Property ; + rdfs:label "result"@en ; + rdfs:comment "The validation results contained in a validation report."@en ; + rdfs:domain sh:ValidationReport ; + rdfs:range sh:ValidationResult ; + rdfs:isDefinedBy sh: . + +sh:shapesGraphWellFormed + a rdf:Property ; + rdfs:label "shapes graph well-formed"@en ; + rdfs:comment "If true then the validation engine was certain that the shapes graph has passed all SHACL syntax requirements during the validation process."@en ; + rdfs:domain sh:ValidationReport ; + rdfs:range xsd:boolean ; + rdfs:isDefinedBy sh: . + +sh:AbstractResult + a rdfs:Class ; + rdfs:label "Abstract result"@en ; + rdfs:comment "The base class of validation results, typically not instantiated directly."@en ; + rdfs:subClassOf rdfs:Resource ; + rdfs:isDefinedBy sh: . + +sh:ValidationResult + a rdfs:Class ; + rdfs:label "Validation result"@en ; + rdfs:comment "The class of validation results."@en ; + rdfs:subClassOf sh:AbstractResult ; + rdfs:isDefinedBy sh: . + +sh:Severity + a rdfs:Class ; + rdfs:label "Severity"@en ; + rdfs:comment "The class of validation result severity levels, including violation and warning levels."@en ; + rdfs:subClassOf rdfs:Resource ; + rdfs:isDefinedBy sh: . + +sh:Info + a sh:Severity ; + rdfs:label "Info"@en ; + rdfs:comment "The severity for an informational validation result."@en ; + rdfs:isDefinedBy sh: . + +sh:Violation + a sh:Severity ; + rdfs:label "Violation"@en ; + rdfs:comment "The severity for a violation validation result."@en ; + rdfs:isDefinedBy sh: . + +sh:Warning + a sh:Severity ; + rdfs:label "Warning"@en ; + rdfs:comment "The severity for a warning validation result."@en ; + rdfs:isDefinedBy sh: . + +sh:detail + a rdf:Property ; + rdfs:label "detail"@en ; + rdfs:comment "Links a result with other results that provide more details, for example to describe violations against nested shapes."@en ; + rdfs:domain sh:AbstractResult ; + rdfs:range sh:AbstractResult ; + rdfs:isDefinedBy sh: . + +sh:focusNode + a rdf:Property ; + rdfs:label "focus node"@en ; + rdfs:comment "The focus node that was validated when the result was produced."@en ; + rdfs:domain sh:AbstractResult ; + rdfs:isDefinedBy sh: . + +sh:resultMessage + a rdf:Property ; + rdfs:label "result message"@en ; + rdfs:comment "Human-readable messages explaining the cause of the result."@en ; + rdfs:domain sh:AbstractResult ; + # range: xsd:string or rdf:langString + rdfs:isDefinedBy sh: . + +sh:resultPath + a rdf:Property ; + rdfs:label "result path"@en ; + rdfs:comment "The path of a validation result, based on the path of the validated property shape."@en ; + rdfs:domain sh:AbstractResult ; + rdfs:range rdfs:Resource ; + rdfs:isDefinedBy sh: . + +sh:resultSeverity + a rdf:Property ; + rdfs:label "result severity"@en ; + rdfs:comment "The severity of the result, e.g. warning."@en ; + rdfs:domain sh:AbstractResult ; + rdfs:range sh:Severity ; + rdfs:isDefinedBy sh: . + +sh:sourceConstraint + a rdf:Property ; + rdfs:label "source constraint"@en ; + rdfs:comment "The constraint that was validated when the result was produced."@en ; + rdfs:domain sh:AbstractResult ; + rdfs:isDefinedBy sh: . + +sh:sourceShape + a rdf:Property ; + rdfs:label "source shape"@en ; + rdfs:comment "The shape that is was validated when the result was produced."@en ; + rdfs:domain sh:AbstractResult ; + rdfs:range sh:Shape ; + rdfs:isDefinedBy sh: . + +sh:sourceConstraintComponent + a rdf:Property ; + rdfs:label "source constraint component"@en ; + rdfs:comment "The constraint component that is the source of the result."@en ; + rdfs:domain sh:AbstractResult ; + rdfs:range sh:ConstraintComponent ; + rdfs:isDefinedBy sh: . + +sh:value + a rdf:Property ; + rdfs:label "value"@en ; + rdfs:comment "An RDF node that has caused the result."@en ; + rdfs:domain sh:AbstractResult ; + rdfs:isDefinedBy sh: . + + +# Graph properties ------------------------------------------------------------ + +sh:shapesGraph + a rdf:Property ; + rdfs:label "shapes graph"@en ; + rdfs:comment "Shapes graphs that should be used when validating this data graph."@en ; + rdfs:domain owl:Ontology ; + rdfs:range owl:Ontology ; + rdfs:isDefinedBy sh: . + +sh:suggestedShapesGraph + a rdf:Property ; + rdfs:label "suggested shapes graph"@en ; + rdfs:comment "Suggested shapes graphs for this ontology. The values of this property may be used in the absence of specific sh:shapesGraph statements."@en ; + rdfs:domain owl:Ontology ; + rdfs:range owl:Ontology ; + rdfs:isDefinedBy sh: . + +sh:entailment + a rdf:Property ; + rdfs:label "entailment"@en ; + rdfs:comment "An entailment regime that indicates what kind of inferencing is required by a shapes graph."@en ; + rdfs:domain owl:Ontology ; + rdfs:range rdfs:Resource ; + rdfs:isDefinedBy sh: . + + +# Path vocabulary ------------------------------------------------------------- + +sh:path + a rdf:Property ; + rdfs:label "path"@en ; + rdfs:comment "Specifies the property path of a property shape."@en ; + rdfs:domain sh:PropertyShape ; + rdfs:range rdfs:Resource ; + rdfs:isDefinedBy sh: . + +sh:inversePath + a rdf:Property ; + rdfs:label "inverse path"@en ; + rdfs:comment "The (single) value of this property represents an inverse path (object to subject)."@en ; + rdfs:range rdfs:Resource ; + rdfs:isDefinedBy sh: . + +sh:alternativePath + a rdf:Property ; + rdfs:label "alternative path"@en ; + rdfs:comment "The (single) value of this property must be a list of path elements, representing the elements of alternative paths."@en ; + rdfs:range rdf:List ; + rdfs:isDefinedBy sh: . + +sh:zeroOrMorePath + a rdf:Property ; + rdfs:label "zero or more path"@en ; + rdfs:comment "The (single) value of this property represents a path that is matched zero or more times."@en ; + rdfs:range rdfs:Resource ; + rdfs:isDefinedBy sh: . + +sh:oneOrMorePath + a rdf:Property ; + rdfs:label "one or more path"@en ; + rdfs:comment "The (single) value of this property represents a path that is matched one or more times."@en ; + rdfs:range rdfs:Resource ; + rdfs:isDefinedBy sh: . + +sh:zeroOrOnePath + a rdf:Property ; + rdfs:label "zero or one path"@en ; + rdfs:comment "The (single) value of this property represents a path that is matched zero or one times."@en ; + rdfs:range rdfs:Resource ; + rdfs:isDefinedBy sh: . + + +# Parameters metamodel -------------------------------------------------------- + +sh:Parameterizable + a rdfs:Class ; + rdfs:label "Parameterizable"@en ; + rdfs:comment "Superclass of components that can take parameters, especially functions and constraint components."@en ; + rdfs:subClassOf rdfs:Resource ; + rdfs:isDefinedBy sh: . + +sh:parameter + a rdf:Property ; + rdfs:label "parameter"@en ; + rdfs:comment "The parameters of a function or constraint component."@en ; + rdfs:domain sh:Parameterizable ; + rdfs:range sh:Parameter ; + rdfs:isDefinedBy sh: . + +sh:labelTemplate + a rdf:Property ; + rdfs:label "label template"@en ; + rdfs:comment "Outlines how human-readable labels of instances of the associated Parameterizable shall be produced. The values can contain {?paramName} as placeholders for the actual values of the given parameter."@en ; + rdfs:domain sh:Parameterizable ; + # range: xsd:string or rdf:langString + rdfs:isDefinedBy sh: . + +sh:Parameter + a rdfs:Class ; + rdfs:label "Parameter"@en ; + rdfs:comment "The class of parameter declarations, consisting of a path predicate and (possibly) information about allowed value type, cardinality and other characteristics."@en ; + rdfs:subClassOf sh:PropertyShape ; + rdfs:isDefinedBy sh: . + +sh:optional + a rdf:Property ; + rdfs:label "optional"@en ; + rdfs:comment "Indicates whether a parameter is optional."@en ; + rdfs:domain sh:Parameter ; + rdfs:range xsd:boolean ; + rdfs:isDefinedBy sh: . + + +# Constraint components metamodel --------------------------------------------- + +sh:ConstraintComponent + a rdfs:Class ; + rdfs:label "Constraint component"@en ; + rdfs:comment "The class of constraint components."@en ; + rdfs:subClassOf sh:Parameterizable ; + rdfs:isDefinedBy sh: . + +sh:validator + a rdf:Property ; + rdfs:label "validator"@en ; + rdfs:comment "The validator(s) used to evaluate constraints of either node or property shapes."@en ; + rdfs:domain sh:ConstraintComponent ; + rdfs:range sh:Validator ; + rdfs:isDefinedBy sh: . + +sh:nodeValidator + a rdf:Property ; + rdfs:label "shape validator"@en ; + rdfs:comment "The validator(s) used to evaluate a constraint in the context of a node shape."@en ; + rdfs:domain sh:ConstraintComponent ; + rdfs:range sh:Validator ; + rdfs:isDefinedBy sh: . + +sh:propertyValidator + a rdf:Property ; + rdfs:label "property validator"@en ; + rdfs:comment "The validator(s) used to evaluate a constraint in the context of a property shape."@en ; + rdfs:domain sh:ConstraintComponent ; + rdfs:range sh:Validator ; + rdfs:isDefinedBy sh: . + +sh:Validator + a rdfs:Class ; + rdfs:label "Validator"@en ; + rdfs:comment "The class of validators, which provide instructions on how to process a constraint definition. This class serves as base class for the SPARQL-based validators and other possible implementations."@en ; + rdfs:subClassOf rdfs:Resource ; + rdfs:isDefinedBy sh: . + +sh:SPARQLAskValidator + a rdfs:Class ; + rdfs:label "SPARQL ASK validator"@en ; + rdfs:comment "The class of validators based on SPARQL ASK queries. The queries are evaluated for each value node and are supposed to return true if the given node conforms."@en ; + rdfs:subClassOf sh:Validator ; + rdfs:subClassOf sh:SPARQLAskExecutable ; + rdfs:isDefinedBy sh: . + +sh:SPARQLSelectValidator + a rdfs:Class ; + rdfs:label "SPARQL SELECT validator"@en ; + rdfs:comment "The class of validators based on SPARQL SELECT queries. The queries are evaluated for each focus node and are supposed to produce bindings for all focus nodes that do not conform."@en ; + rdfs:subClassOf sh:Validator ; + rdfs:subClassOf sh:SPARQLSelectExecutable ; + rdfs:isDefinedBy sh: . + + +# Library of Core Constraint Components and their properties ------------------ + +sh:AndConstraintComponent + a sh:ConstraintComponent ; + rdfs:label "And constraint component"@en ; + rdfs:comment "A constraint component that can be used to test whether a value node conforms to all members of a provided list of shapes."@en ; + sh:parameter sh:AndConstraintComponent-and ; + rdfs:isDefinedBy sh: . + +sh:AndConstraintComponent-and + a sh:Parameter ; + sh:path sh:and ; + rdfs:isDefinedBy sh: . + +sh:and + a rdf:Property ; + rdfs:label "and"@en ; + rdfs:comment "RDF list of shapes to validate the value nodes against."@en ; + rdfs:range rdf:List ; + rdfs:isDefinedBy sh: . + + +sh:ClassConstraintComponent + a sh:ConstraintComponent ; + rdfs:label "Class constraint component"@en ; + rdfs:comment "A constraint component that can be used to verify that each value node is an instance of a given type."@en ; + sh:parameter sh:ClassConstraintComponent-class ; + rdfs:isDefinedBy sh: . + +sh:ClassConstraintComponent-class + a sh:Parameter ; + sh:path sh:class ; + sh:nodeKind sh:IRI ; + rdfs:isDefinedBy sh: . + +sh:class + a rdf:Property ; + rdfs:label "class"@en ; + rdfs:comment "The type that all value nodes must have."@en ; + rdfs:range rdfs:Class ; + rdfs:isDefinedBy sh: . + + +sh:ClosedConstraintComponent + a sh:ConstraintComponent ; + rdfs:label "Closed constraint component"@en ; + rdfs:comment "A constraint component that can be used to indicate that focus nodes must only have values for those properties that have been explicitly enumerated via sh:property/sh:path."@en ; + sh:parameter sh:ClosedConstraintComponent-closed ; + sh:parameter sh:ClosedConstraintComponent-ignoredProperties ; + rdfs:isDefinedBy sh: . + +sh:ClosedConstraintComponent-closed + a sh:Parameter ; + sh:path sh:closed ; + sh:datatype xsd:boolean ; + rdfs:isDefinedBy sh: . + +sh:ClosedConstraintComponent-ignoredProperties + a sh:Parameter ; + sh:path sh:ignoredProperties ; + sh:optional true ; + rdfs:isDefinedBy sh: . + +sh:closed + a rdf:Property ; + rdfs:label "closed"@en ; + rdfs:comment "If set to true then the shape is closed."@en ; + rdfs:range xsd:boolean ; + rdfs:isDefinedBy sh: . + +sh:ignoredProperties + a rdf:Property ; + rdfs:label "ignored properties"@en ; + rdfs:comment "An optional RDF list of properties that are also permitted in addition to those explicitly enumerated via sh:property/sh:path."@en ; + rdfs:range rdf:List ; # members: rdf:Property + rdfs:isDefinedBy sh: . + + +sh:DatatypeConstraintComponent + a sh:ConstraintComponent ; + rdfs:label "Datatype constraint component"@en ; + rdfs:comment "A constraint component that can be used to restrict the datatype of all value nodes."@en ; + sh:parameter sh:DatatypeConstraintComponent-datatype ; + rdfs:isDefinedBy sh: . + +sh:DatatypeConstraintComponent-datatype + a sh:Parameter ; + sh:path sh:datatype ; + sh:nodeKind sh:IRI ; + sh:maxCount 1 ; + rdfs:isDefinedBy sh: . + +sh:datatype + a rdf:Property ; + rdfs:label "datatype"@en ; + rdfs:comment "Specifies an RDF datatype that all value nodes must have."@en ; + rdfs:range rdfs:Datatype ; + rdfs:isDefinedBy sh: . + + +sh:DisjointConstraintComponent + a sh:ConstraintComponent ; + rdfs:label "Disjoint constraint component"@en ; + rdfs:comment "A constraint component that can be used to verify that the set of value nodes is disjoint with the the set of nodes that have the focus node as subject and the value of a given property as predicate."@en ; + sh:parameter sh:DisjointConstraintComponent-disjoint ; + rdfs:isDefinedBy sh: . + +sh:DisjointConstraintComponent-disjoint + a sh:Parameter ; + sh:path sh:disjoint ; + sh:nodeKind sh:IRI ; + rdfs:isDefinedBy sh: . + +sh:disjoint + a rdf:Property ; + rdfs:label "disjoint"@en ; + rdfs:comment "Specifies a property where the set of values must be disjoint with the value nodes."@en ; + rdfs:range rdf:Property ; + rdfs:isDefinedBy sh: . + + +sh:EqualsConstraintComponent + a sh:ConstraintComponent ; + rdfs:label "Equals constraint component"@en ; + rdfs:comment "A constraint component that can be used to verify that the set of value nodes is equal to the set of nodes that have the focus node as subject and the value of a given property as predicate."@en ; + sh:parameter sh:EqualsConstraintComponent-equals ; + rdfs:isDefinedBy sh: . + +sh:EqualsConstraintComponent-equals + a sh:Parameter ; + sh:path sh:equals ; + sh:nodeKind sh:IRI ; + rdfs:isDefinedBy sh: . + +sh:equals + a rdf:Property ; + rdfs:label "equals"@en ; + rdfs:comment "Specifies a property that must have the same values as the value nodes."@en ; + rdfs:range rdf:Property ; + rdfs:isDefinedBy sh: . + + +sh:HasValueConstraintComponent + a sh:ConstraintComponent ; + rdfs:label "Has-value constraint component"@en ; + rdfs:comment "A constraint component that can be used to verify that one of the value nodes is a given RDF node."@en ; + sh:parameter sh:HasValueConstraintComponent-hasValue ; + rdfs:isDefinedBy sh: . + +sh:HasValueConstraintComponent-hasValue + a sh:Parameter ; + sh:path sh:hasValue ; + rdfs:isDefinedBy sh: . + +sh:hasValue + a rdf:Property ; + rdfs:label "has value"@en ; + rdfs:comment "Specifies a value that must be among the value nodes."@en ; + rdfs:isDefinedBy sh: . + + +sh:InConstraintComponent + a sh:ConstraintComponent ; + rdfs:label "In constraint component"@en ; + rdfs:comment "A constraint component that can be used to exclusively enumerate the permitted value nodes."@en ; + sh:parameter sh:InConstraintComponent-in ; + rdfs:isDefinedBy sh: . + +sh:InConstraintComponent-in + a sh:Parameter ; + sh:path sh:in ; + sh:maxCount 1 ; + rdfs:isDefinedBy sh: . + +sh:in + a rdf:Property ; + rdfs:label "in"@en ; + rdfs:comment "Specifies a list of allowed values so that each value node must be among the members of the given list."@en ; + rdfs:range rdf:List ; + rdfs:isDefinedBy sh: . + + +sh:LanguageInConstraintComponent + a sh:ConstraintComponent ; + rdfs:label "Language-in constraint component"@en ; + rdfs:comment "A constraint component that can be used to enumerate language tags that all value nodes must have."@en ; + sh:parameter sh:LanguageInConstraintComponent-languageIn ; + rdfs:isDefinedBy sh: . + +sh:LanguageInConstraintComponent-languageIn + a sh:Parameter ; + sh:path sh:languageIn ; + sh:maxCount 1 ; + rdfs:isDefinedBy sh: . + +sh:languageIn + a rdf:Property ; + rdfs:label "language in"@en ; + rdfs:comment "Specifies a list of language tags that all value nodes must have."@en ; + rdfs:range rdf:List ; # members: xsd:string + rdfs:isDefinedBy sh: . + + +sh:LessThanConstraintComponent + a sh:ConstraintComponent ; + rdfs:label "Less-than constraint component"@en ; + rdfs:comment "A constraint component that can be used to verify that each value node is smaller than all the nodes that have the focus node as subject and the value of a given property as predicate."@en ; + sh:parameter sh:LessThanConstraintComponent-lessThan ; + rdfs:isDefinedBy sh: . + +sh:LessThanConstraintComponent-lessThan + a sh:Parameter ; + sh:path sh:lessThan ; + sh:nodeKind sh:IRI ; + rdfs:isDefinedBy sh: . + +sh:lessThan + a rdf:Property ; + rdfs:label "less than"@en ; + rdfs:comment "Specifies a property that must have smaller values than the value nodes."@en ; + rdfs:range rdf:Property ; + rdfs:isDefinedBy sh: . + + +sh:LessThanOrEqualsConstraintComponent + a sh:ConstraintComponent ; + rdfs:label "less-than-or-equals constraint component"@en ; + rdfs:comment "A constraint component that can be used to verify that every value node is smaller than all the nodes that have the focus node as subject and the value of a given property as predicate."@en ; + sh:parameter sh:LessThanOrEqualsConstraintComponent-lessThanOrEquals ; + rdfs:isDefinedBy sh: . + +sh:LessThanOrEqualsConstraintComponent-lessThanOrEquals + a sh:Parameter ; + sh:path sh:lessThanOrEquals ; + sh:nodeKind sh:IRI ; + rdfs:isDefinedBy sh: . + +sh:lessThanOrEquals + a rdf:Property ; + rdfs:label "less than or equals"@en ; + rdfs:comment "Specifies a property that must have smaller or equal values than the value nodes."@en ; + rdfs:range rdf:Property ; + rdfs:isDefinedBy sh: . + + +sh:MaxCountConstraintComponent + a sh:ConstraintComponent ; + rdfs:label "Max-count constraint component"@en ; + rdfs:comment "A constraint component that can be used to restrict the maximum number of value nodes."@en ; + sh:parameter sh:MaxCountConstraintComponent-maxCount ; + rdfs:isDefinedBy sh: . + +sh:MaxCountConstraintComponent-maxCount + a sh:Parameter ; + sh:path sh:maxCount ; + sh:datatype xsd:integer ; + sh:maxCount 1 ; + rdfs:isDefinedBy sh: . + +sh:maxCount + a rdf:Property ; + rdfs:label "max count"@en ; + rdfs:comment "Specifies the maximum number of values in the set of value nodes."@en ; + rdfs:range xsd:integer ; + rdfs:isDefinedBy sh: . + + +sh:MaxExclusiveConstraintComponent + a sh:ConstraintComponent ; + rdfs:label "Max-exclusive constraint component"@en ; + rdfs:comment "A constraint component that can be used to restrict the range of value nodes with a maximum exclusive value."@en ; + sh:parameter sh:MaxExclusiveConstraintComponent-maxExclusive ; + rdfs:isDefinedBy sh: . + +sh:MaxExclusiveConstraintComponent-maxExclusive + a sh:Parameter ; + sh:path sh:maxExclusive ; + sh:maxCount 1 ; + sh:nodeKind sh:Literal ; + rdfs:isDefinedBy sh: . + +sh:maxExclusive + a rdf:Property ; + rdfs:label "max exclusive"@en ; + rdfs:comment "Specifies the maximum exclusive value of each value node."@en ; + rdfs:isDefinedBy sh: . + + +sh:MaxInclusiveConstraintComponent + a sh:ConstraintComponent ; + rdfs:label "Max-inclusive constraint component"@en ; + rdfs:comment "A constraint component that can be used to restrict the range of value nodes with a maximum inclusive value."@en ; + sh:parameter sh:MaxInclusiveConstraintComponent-maxInclusive ; + rdfs:isDefinedBy sh: . + +sh:MaxInclusiveConstraintComponent-maxInclusive + a sh:Parameter ; + sh:path sh:maxInclusive ; + sh:maxCount 1 ; + sh:nodeKind sh:Literal ; + rdfs:isDefinedBy sh: . + +sh:maxInclusive + a rdf:Property ; + rdfs:label "max inclusive"@en ; + rdfs:comment "Specifies the maximum inclusive value of each value node."@en ; + rdfs:isDefinedBy sh: . + + +sh:MaxLengthConstraintComponent + a sh:ConstraintComponent ; + rdfs:label "Max-length constraint component"@en ; + rdfs:comment "A constraint component that can be used to restrict the maximum string length of value nodes."@en ; + sh:parameter sh:MaxLengthConstraintComponent-maxLength ; + rdfs:isDefinedBy sh: . + +sh:MaxLengthConstraintComponent-maxLength + a sh:Parameter ; + sh:path sh:maxLength ; + sh:datatype xsd:integer ; + sh:maxCount 1 ; + rdfs:isDefinedBy sh: . + +sh:maxLength + a rdf:Property ; + rdfs:label "max length"@en ; + rdfs:comment "Specifies the maximum string length of each value node."@en ; + rdfs:range xsd:integer ; + rdfs:isDefinedBy sh: . + + +sh:MinCountConstraintComponent + a sh:ConstraintComponent ; + rdfs:label "Min-count constraint component"@en ; + rdfs:comment "A constraint component that can be used to restrict the minimum number of value nodes."@en ; + sh:parameter sh:MinCountConstraintComponent-minCount ; + rdfs:isDefinedBy sh: . + +sh:MinCountConstraintComponent-minCount + a sh:Parameter ; + sh:path sh:minCount ; + sh:datatype xsd:integer ; + sh:maxCount 1 ; + rdfs:isDefinedBy sh: . + +sh:minCount + a rdf:Property ; + rdfs:label "min count"@en ; + rdfs:comment "Specifies the minimum number of values in the set of value nodes."@en ; + rdfs:range xsd:integer ; + rdfs:isDefinedBy sh: . + + +sh:MinExclusiveConstraintComponent + a sh:ConstraintComponent ; + rdfs:label "Min-exclusive constraint component"@en ; + rdfs:comment "A constraint component that can be used to restrict the range of value nodes with a minimum exclusive value."@en ; + sh:parameter sh:MinExclusiveConstraintComponent-minExclusive ; + rdfs:isDefinedBy sh: . + +sh:MinExclusiveConstraintComponent-minExclusive + a sh:Parameter ; + sh:path sh:minExclusive ; + sh:maxCount 1 ; + sh:nodeKind sh:Literal ; + rdfs:isDefinedBy sh: . + +sh:minExclusive + a rdf:Property ; + rdfs:label "min exclusive"@en ; + rdfs:comment "Specifies the minimum exclusive value of each value node."@en ; + rdfs:isDefinedBy sh: . + + +sh:MinInclusiveConstraintComponent + a sh:ConstraintComponent ; + rdfs:label "Min-inclusive constraint component"@en ; + rdfs:comment "A constraint component that can be used to restrict the range of value nodes with a minimum inclusive value."@en ; + sh:parameter sh:MinInclusiveConstraintComponent-minInclusive ; + rdfs:isDefinedBy sh: . + +sh:MinInclusiveConstraintComponent-minInclusive + a sh:Parameter ; + sh:path sh:minInclusive ; + sh:maxCount 1 ; + sh:nodeKind sh:Literal ; + rdfs:isDefinedBy sh: . + +sh:minInclusive + a rdf:Property ; + rdfs:label "min inclusive"@en ; + rdfs:comment "Specifies the minimum inclusive value of each value node."@en ; + rdfs:isDefinedBy sh: . + + +sh:MinLengthConstraintComponent + a sh:ConstraintComponent ; + rdfs:label "Min-length constraint component"@en ; + rdfs:comment "A constraint component that can be used to restrict the minimum string length of value nodes."@en ; + sh:parameter sh:MinLengthConstraintComponent-minLength ; + rdfs:isDefinedBy sh: . + +sh:MinLengthConstraintComponent-minLength + a sh:Parameter ; + sh:path sh:minLength ; + sh:datatype xsd:integer ; + sh:maxCount 1 ; + rdfs:isDefinedBy sh: . + +sh:minLength + a rdf:Property ; + rdfs:label "min length"@en ; + rdfs:comment "Specifies the minimum string length of each value node."@en ; + rdfs:range xsd:integer ; + rdfs:isDefinedBy sh: . + + +sh:NodeConstraintComponent + a sh:ConstraintComponent ; + rdfs:label "Node constraint component"@en ; + rdfs:comment "A constraint component that can be used to verify that all value nodes conform to the given node shape."@en ; + sh:parameter sh:NodeConstraintComponent-node ; + rdfs:isDefinedBy sh: . + +sh:NodeConstraintComponent-node + a sh:Parameter ; + sh:path sh:node ; + rdfs:isDefinedBy sh: . + +sh:node + a rdf:Property ; + rdfs:label "node"@en ; + rdfs:comment "Specifies the node shape that all value nodes must conform to."@en ; + rdfs:range sh:NodeShape ; + rdfs:isDefinedBy sh: . + + +sh:NodeKindConstraintComponent + a sh:ConstraintComponent ; + rdfs:label "Node-kind constraint component"@en ; + rdfs:comment "A constraint component that can be used to restrict the RDF node kind of each value node."@en ; + sh:parameter sh:NodeKindConstraintComponent-nodeKind ; + rdfs:isDefinedBy sh: . + +sh:NodeKindConstraintComponent-nodeKind + a sh:Parameter ; + sh:path sh:nodeKind ; + sh:in ( sh:BlankNode sh:IRI sh:Literal sh:BlankNodeOrIRI sh:BlankNodeOrLiteral sh:IRIOrLiteral ) ; + sh:maxCount 1 ; + rdfs:isDefinedBy sh: . + +sh:nodeKind + a rdf:Property ; + rdfs:label "node kind"@en ; + rdfs:comment "Specifies the node kind (e.g. IRI or literal) each value node."@en ; + rdfs:range sh:NodeKind ; + rdfs:isDefinedBy sh: . + + +sh:NotConstraintComponent + a sh:ConstraintComponent ; + rdfs:label "Not constraint component"@en ; + rdfs:comment "A constraint component that can be used to verify that value nodes do not conform to a given shape."@en ; + sh:parameter sh:NotConstraintComponent-not ; + rdfs:isDefinedBy sh: . + +sh:NotConstraintComponent-not + a sh:Parameter ; + sh:path sh:not ; + rdfs:isDefinedBy sh: . + +sh:not + a rdf:Property ; + rdfs:label "not"@en ; + rdfs:comment "Specifies a shape that the value nodes must not conform to."@en ; + rdfs:range sh:Shape ; + rdfs:isDefinedBy sh: . + + +sh:OrConstraintComponent + a sh:ConstraintComponent ; + rdfs:label "Or constraint component"@en ; + rdfs:comment "A constraint component that can be used to restrict the value nodes so that they conform to at least one out of several provided shapes."@en ; + sh:parameter sh:OrConstraintComponent-or ; + rdfs:isDefinedBy sh: . + +sh:OrConstraintComponent-or + a sh:Parameter ; + sh:path sh:or ; + rdfs:isDefinedBy sh: . + +sh:or + a rdf:Property ; + rdfs:label "or"@en ; + rdfs:comment "Specifies a list of shapes so that the value nodes must conform to at least one of the shapes."@en ; + rdfs:range rdf:List ; # members: sh:Shape ; + rdfs:isDefinedBy sh: . + + +sh:PatternConstraintComponent + a sh:ConstraintComponent ; + rdfs:label "Pattern constraint component"@en ; + rdfs:comment "A constraint component that can be used to verify that every value node matches a given regular expression."@en ; + sh:parameter sh:PatternConstraintComponent-pattern ; + sh:parameter sh:PatternConstraintComponent-flags ; + rdfs:isDefinedBy sh: . + +sh:PatternConstraintComponent-pattern + a sh:Parameter ; + sh:path sh:pattern ; + sh:datatype xsd:string ; + rdfs:isDefinedBy sh: . + +sh:PatternConstraintComponent-flags + a sh:Parameter ; + sh:path sh:flags ; + sh:datatype xsd:string ; + sh:optional true ; + rdfs:isDefinedBy sh: . + +sh:flags + a rdf:Property ; + rdfs:label "flags"@en ; + rdfs:comment "An optional flag to be used with regular expression pattern matching."@en ; + rdfs:range xsd:string ; + rdfs:isDefinedBy sh: . + +sh:pattern + a rdf:Property ; + rdfs:label "pattern"@en ; + rdfs:comment "Specifies a regular expression pattern that the string representations of the value nodes must match."@en ; + rdfs:range xsd:string ; + rdfs:isDefinedBy sh: . + + +sh:PropertyConstraintComponent + a sh:ConstraintComponent ; + rdfs:label "Property constraint component"@en ; + rdfs:comment "A constraint component that can be used to verify that all value nodes conform to the given property shape."@en ; + sh:parameter sh:PropertyConstraintComponent-property ; + rdfs:isDefinedBy sh: . + +sh:PropertyConstraintComponent-property + a sh:Parameter ; + sh:path sh:property ; + rdfs:isDefinedBy sh: . + +sh:property + a rdf:Property ; + rdfs:label "property"@en ; + rdfs:comment "Links a shape to its property shapes."@en ; + rdfs:domain sh:Shape ; + rdfs:range sh:PropertyShape ; + rdfs:isDefinedBy sh: . + + +sh:QualifiedMaxCountConstraintComponent + a sh:ConstraintComponent ; + rdfs:label "Qualified-max-count constraint component"@en ; + rdfs:comment "A constraint component that can be used to verify that a specified maximum number of value nodes conforms to a given shape."@en ; + sh:parameter sh:QualifiedMaxCountConstraintComponent-qualifiedMaxCount ; + sh:parameter sh:QualifiedMaxCountConstraintComponent-qualifiedValueShape ; + sh:parameter sh:QualifiedMaxCountConstraintComponent-qualifiedValueShapesDisjoint ; + rdfs:isDefinedBy sh: . + +sh:QualifiedMaxCountConstraintComponent-qualifiedMaxCount + a sh:Parameter ; + sh:path sh:qualifiedMaxCount ; + sh:datatype xsd:integer ; + rdfs:isDefinedBy sh: . + +sh:QualifiedMaxCountConstraintComponent-qualifiedValueShape + a sh:Parameter ; + sh:path sh:qualifiedValueShape ; + rdfs:isDefinedBy sh: . + +sh:QualifiedMaxCountConstraintComponent-qualifiedValueShapesDisjoint + a sh:Parameter ; + sh:path sh:qualifiedValueShapesDisjoint ; + sh:datatype xsd:boolean ; + sh:optional true ; + rdfs:isDefinedBy sh: . + + +sh:QualifiedMinCountConstraintComponent + a sh:ConstraintComponent ; + rdfs:label "Qualified-min-count constraint component"@en ; + rdfs:comment "A constraint component that can be used to verify that a specified minimum number of value nodes conforms to a given shape."@en ; + sh:parameter sh:QualifiedMinCountConstraintComponent-qualifiedMinCount ; + sh:parameter sh:QualifiedMinCountConstraintComponent-qualifiedValueShape ; + sh:parameter sh:QualifiedMinCountConstraintComponent-qualifiedValueShapesDisjoint ; + rdfs:isDefinedBy sh: . + +sh:QualifiedMinCountConstraintComponent-qualifiedMinCount + a sh:Parameter ; + sh:path sh:qualifiedMinCount ; + sh:datatype xsd:integer ; + rdfs:isDefinedBy sh: . + +sh:QualifiedMinCountConstraintComponent-qualifiedValueShape + a sh:Parameter ; + sh:path sh:qualifiedValueShape ; + rdfs:isDefinedBy sh: . + +sh:QualifiedMinCountConstraintComponent-qualifiedValueShapesDisjoint + a sh:Parameter ; + sh:path sh:qualifiedValueShapesDisjoint ; + sh:datatype xsd:boolean ; + sh:optional true ; + rdfs:isDefinedBy sh: . + +sh:qualifiedMaxCount + a rdf:Property ; + rdfs:label "qualified max count"@en ; + rdfs:comment "The maximum number of value nodes that can conform to the shape."@en ; + rdfs:range xsd:integer ; + rdfs:isDefinedBy sh: . + +sh:qualifiedMinCount + a rdf:Property ; + rdfs:label "qualified min count"@en ; + rdfs:comment "The minimum number of value nodes that must conform to the shape."@en ; + rdfs:range xsd:integer ; + rdfs:isDefinedBy sh: . + +sh:qualifiedValueShape + a rdf:Property ; + rdfs:label "qualified value shape"@en ; + rdfs:comment "The shape that a specified number of values must conform to."@en ; + rdfs:range sh:Shape ; + rdfs:isDefinedBy sh: . + +sh:qualifiedValueShapesDisjoint + a rdf:Property ; + rdfs:label "qualified value shapes disjoint"@en ; + rdfs:comment "Can be used to mark the qualified value shape to be disjoint with its sibling shapes."@en ; + rdfs:range xsd:boolean ; + rdfs:isDefinedBy sh: . + + +sh:UniqueLangConstraintComponent + a sh:ConstraintComponent ; + rdfs:label "Unique-languages constraint component"@en ; + rdfs:comment "A constraint component that can be used to specify that no pair of value nodes may use the same language tag."@en ; + sh:parameter sh:UniqueLangConstraintComponent-uniqueLang ; + rdfs:isDefinedBy sh: . + +sh:UniqueLangConstraintComponent-uniqueLang + a sh:Parameter ; + sh:path sh:uniqueLang ; + sh:datatype xsd:boolean ; + sh:maxCount 1 ; + rdfs:isDefinedBy sh: . + +sh:uniqueLang + a rdf:Property ; + rdfs:label "unique languages"@en ; + rdfs:comment "Specifies whether all node values must have a unique (or no) language tag."@en ; + rdfs:range xsd:boolean ; + rdfs:isDefinedBy sh: . + + +sh:XoneConstraintComponent + a sh:ConstraintComponent ; + rdfs:label "Exactly one constraint component"@en ; + rdfs:comment "A constraint component that can be used to restrict the value nodes so that they conform to exactly one out of several provided shapes."@en ; + sh:parameter sh:XoneConstraintComponent-xone ; + rdfs:isDefinedBy sh: . + +sh:XoneConstraintComponent-xone + a sh:Parameter ; + sh:path sh:xone ; + rdfs:isDefinedBy sh: . + +sh:xone + a rdf:Property ; + rdfs:label "exactly one"@en ; + rdfs:comment "Specifies a list of shapes so that the value nodes must conform to exactly one of the shapes."@en ; + rdfs:range rdf:List ; # members: sh:Shape ; + rdfs:isDefinedBy sh: . + + +# General SPARQL execution support -------------------------------------------- + +sh:SPARQLExecutable + a rdfs:Class ; + rdfs:label "SPARQL executable"@en ; + rdfs:comment "The class of resources that encapsulate a SPARQL query."@en ; + rdfs:subClassOf rdfs:Resource ; + rdfs:isDefinedBy sh: . + +sh:SPARQLAskExecutable + a rdfs:Class ; + rdfs:label "SPARQL ASK executable"@en ; + rdfs:comment "The class of SPARQL executables that are based on an ASK query."@en ; + rdfs:subClassOf sh:SPARQLExecutable ; + rdfs:isDefinedBy sh: . + +sh:ask + a rdf:Property ; + rdfs:label "ask"@en ; + rdfs:comment "The SPARQL ASK query to execute."@en ; + rdfs:domain sh:SPARQLAskExecutable ; + rdfs:range xsd:string ; + rdfs:isDefinedBy sh: . + +sh:SPARQLConstructExecutable + a rdfs:Class ; + rdfs:label "SPARQL CONSTRUCT executable"@en ; + rdfs:comment "The class of SPARQL executables that are based on a CONSTRUCT query."@en ; + rdfs:subClassOf sh:SPARQLExecutable ; + rdfs:isDefinedBy sh: . + +sh:construct + a rdf:Property ; + rdfs:label "construct"@en ; + rdfs:comment "The SPARQL CONSTRUCT query to execute."@en ; + rdfs:domain sh:SPARQLConstructExecutable ; + rdfs:range xsd:string ; + rdfs:isDefinedBy sh: . + +sh:SPARQLSelectExecutable + a rdfs:Class ; + rdfs:label "SPARQL SELECT executable"@en ; + rdfs:comment "The class of SPARQL executables based on a SELECT query."@en ; + rdfs:subClassOf sh:SPARQLExecutable ; + rdfs:isDefinedBy sh: . + +sh:select + a rdf:Property ; + rdfs:label "select"@en ; + rdfs:comment "The SPARQL SELECT query to execute."@en ; + rdfs:range xsd:string ; + rdfs:domain sh:SPARQLSelectExecutable ; + rdfs:isDefinedBy sh: . + +sh:SPARQLUpdateExecutable + a rdfs:Class ; + rdfs:label "SPARQL UPDATE executable"@en ; + rdfs:comment "The class of SPARQL executables based on a SPARQL UPDATE."@en ; + rdfs:subClassOf sh:SPARQLExecutable ; + rdfs:isDefinedBy sh: . + +sh:update + a rdf:Property ; + rdfs:label "update"@en ; + rdfs:comment "The SPARQL UPDATE to execute."@en ; + rdfs:domain sh:SPARQLUpdateExecutable ; + rdfs:range xsd:string ; + rdfs:isDefinedBy sh: . + +sh:prefixes + a rdf:Property ; + rdfs:label "prefixes"@en ; + rdfs:comment "The prefixes that shall be applied before parsing the associated SPARQL query."@en ; + rdfs:domain sh:SPARQLExecutable ; + rdfs:range owl:Ontology ; + rdfs:isDefinedBy sh: . + +sh:PrefixDeclaration + a rdfs:Class ; + rdfs:label "Prefix declaration"@en ; + rdfs:comment "The class of prefix declarations, consisting of pairs of a prefix with a namespace."@en ; + rdfs:subClassOf rdfs:Resource ; + rdfs:isDefinedBy sh: . + +sh:declare + a rdf:Property ; + rdfs:label "declare"@en ; + rdfs:comment "Links a resource with its namespace prefix declarations."@en ; + rdfs:domain owl:Ontology ; + rdfs:range sh:PrefixDeclaration ; + rdfs:isDefinedBy sh: . + +sh:prefix + a rdf:Property ; + rdfs:label "prefix"@en ; + rdfs:comment "The prefix of a prefix declaration."@en ; + rdfs:domain sh:PrefixDeclaration ; + rdfs:range xsd:string ; + rdfs:isDefinedBy sh: . + +sh:namespace + a rdf:Property ; + rdfs:label "namespace"@en ; + rdfs:comment "The namespace associated with a prefix in a prefix declaration."@en ; + rdfs:domain sh:PrefixDeclaration ; + rdfs:range xsd:anyURI ; + rdfs:isDefinedBy sh: . + + +# SPARQL-based Constraints support -------------------------------------------- + +sh:SPARQLConstraintComponent + a sh:ConstraintComponent ; + rdfs:label "SPARQL constraint component"@en ; + rdfs:comment "A constraint component that can be used to define constraints based on SPARQL queries."@en ; + sh:parameter sh:SPARQLConstraintComponent-sparql ; + rdfs:isDefinedBy sh: . + +sh:SPARQLConstraintComponent-sparql + a sh:Parameter ; + sh:path sh:sparql ; + rdfs:isDefinedBy sh: . + +sh:sparql + a rdf:Property ; + rdfs:label "constraint (in SPARQL)"@en ; + rdfs:comment "Links a shape with SPARQL constraints."@en ; + rdfs:domain sh:Shape ; + rdfs:range sh:SPARQLConstraint ; + rdfs:isDefinedBy sh: . + +sh:SPARQLConstraint + a rdfs:Class ; + rdfs:label "SPARQL constraint"@en ; + rdfs:comment "The class of constraints based on SPARQL SELECT queries."@en ; + rdfs:subClassOf sh:SPARQLSelectExecutable ; + rdfs:isDefinedBy sh: . + + +# Non-validating constraint properties ---------------------------------------- + +sh:defaultValue + a rdf:Property ; + rdfs:label "default value"@en ; + rdfs:comment "A default value for a property, for example for user interface tools to pre-populate input fields."@en ; + rdfs:domain sh:PropertyShape ; + rdfs:isDefinedBy sh: . + +sh:description + a rdf:Property ; + rdfs:label "description"@en ; + rdfs:comment "Human-readable descriptions for the property in the context of the surrounding shape."@en ; + rdfs:domain sh:PropertyShape ; + # range: xsd:string or rdf:langString + rdfs:isDefinedBy sh: . + +sh:group + a rdf:Property ; + rdfs:label "group"@en ; + rdfs:comment "Can be used to link to a property group to indicate that a property shape belongs to a group of related property shapes."@en ; + rdfs:domain sh:PropertyShape ; + rdfs:range sh:PropertyGroup ; + rdfs:isDefinedBy sh: . + +sh:name + a rdf:Property ; + rdfs:label "name"@en ; + rdfs:comment "Human-readable labels for the property in the context of the surrounding shape."@en ; + rdfs:domain sh:PropertyShape ; + # range: xsd:string or rdf:langString + rdfs:isDefinedBy sh: . + +sh:order + a rdf:Property ; + rdfs:label "order"@en ; + rdfs:comment "Specifies the relative order of this compared to its siblings. For example use 0 for the first, 1 for the second."@en ; + # range: xsd:decimal or xsd:integer ; + rdfs:isDefinedBy sh: . + +sh:PropertyGroup + a rdfs:Class ; + rdfs:label "Property group"@en ; + rdfs:comment "Instances of this class represent groups of property shapes that belong together."@en ; + rdfs:subClassOf rdfs:Resource ; + rdfs:isDefinedBy sh: . + + +# ----------------------------------------------------------------------------- +# SHACL ADVANCED FEATURES ----------------------------------------------------- +# ----------------------------------------------------------------------------- + + +# Advanced Target vocabulary -------------------------------------------------- + +sh:target + a rdf:Property ; + rdfs:label "target"@en ; + rdfs:comment "Links a shape to a target specified by an extension language, for example instances of sh:SPARQLTarget."@en ; + rdfs:domain sh:Shape ; + rdfs:range sh:Target ; + rdfs:isDefinedBy sh: . + +sh:Target + a rdfs:Class ; + rdfs:label "Target"@en ; + rdfs:comment "The base class of targets such as those based on SPARQL queries."@en ; + rdfs:subClassOf rdfs:Resource ; + rdfs:isDefinedBy sh: . + +sh:TargetType + a rdfs:Class ; + rdfs:label "Target type"@en ; + rdfs:comment "The (meta) class for parameterizable targets. Instances of this are instantiated as values of the sh:target property."@en ; + rdfs:subClassOf rdfs:Class ; + rdfs:subClassOf sh:Parameterizable ; + rdfs:isDefinedBy sh: . + +sh:SPARQLTarget + a rdfs:Class ; + rdfs:label "SPARQL target"@en ; + rdfs:comment "The class of targets that are based on SPARQL queries."@en ; + rdfs:subClassOf sh:Target ; + rdfs:subClassOf sh:SPARQLAskExecutable ; + rdfs:subClassOf sh:SPARQLSelectExecutable ; + rdfs:isDefinedBy sh: . + +sh:SPARQLTargetType + a rdfs:Class ; + rdfs:label "SPARQL target type"@en ; + rdfs:comment "The (meta) class for parameterizable targets that are based on SPARQL queries."@en ; + rdfs:subClassOf sh:TargetType ; + rdfs:subClassOf sh:SPARQLAskExecutable ; + rdfs:subClassOf sh:SPARQLSelectExecutable ; + rdfs:isDefinedBy sh: . + + +# Functions Vocabulary -------------------------------------------------------- + +sh:Function + a rdfs:Class ; + rdfs:label "Function"@en ; + rdfs:comment "The class of SHACL functions."@en ; + rdfs:subClassOf sh:Parameterizable ; + rdfs:isDefinedBy sh: . + +sh:returnType + a rdf:Property ; + rdfs:label "return type"@en ; + rdfs:comment "The expected type of values returned by the associated function."@en ; + rdfs:domain sh:Function ; + rdfs:range rdfs:Class ; + rdfs:isDefinedBy sh: . + +sh:SPARQLFunction + a rdfs:Class ; + rdfs:label "SPARQL function"@en ; + rdfs:comment "A function backed by a SPARQL query - either ASK or SELECT."@en ; + rdfs:subClassOf sh:Function ; + rdfs:subClassOf sh:SPARQLAskExecutable ; + rdfs:subClassOf sh:SPARQLSelectExecutable ; + rdfs:isDefinedBy sh: . + + +# Result Annotations ---------------------------------------------------------- + +sh:resultAnnotation + a rdf:Property ; + rdfs:label "result annotation"@en ; + rdfs:comment "Links a SPARQL validator with zero or more sh:ResultAnnotation instances, defining how to derive additional result properties based on the variables of the SELECT query."@en ; + rdfs:domain sh:SPARQLSelectValidator ; + rdfs:range sh:ResultAnnotation ; + rdfs:isDefinedBy sh: . + +sh:ResultAnnotation + a rdfs:Class ; + rdfs:label "Result annotation"@en ; + rdfs:comment "A class of result annotations, which define the rules to derive the values of a given annotation property as extra values for a validation result."@en ; + rdfs:subClassOf rdfs:Resource ; + rdfs:isDefinedBy sh: . + +sh:annotationProperty + a rdf:Property ; + rdfs:label "annotation property"@en ; + rdfs:comment "The annotation property that shall be set."@en ; + rdfs:domain sh:ResultAnnotation ; + rdfs:range rdf:Property ; + rdfs:isDefinedBy sh: . + +sh:annotationValue + a rdf:Property ; + rdfs:label "annotation value"@en ; + rdfs:comment "The (default) values of the annotation property."@en ; + rdfs:domain sh:ResultAnnotation ; + rdfs:isDefinedBy sh: . + +sh:annotationVarName + a rdf:Property ; + rdfs:label "annotation variable name"@en ; + rdfs:comment "The name of the SPARQL variable from the SELECT clause that shall be used for the values."@en ; + rdfs:domain sh:ResultAnnotation ; + rdfs:range xsd:string ; + rdfs:isDefinedBy sh: . + + +# Node Expressions ------------------------------------------------------------ + +sh:this + a rdfs:Resource ; + rdfs:label "this"@en ; + rdfs:comment "A node expression that represents the current focus node."@en ; + rdfs:isDefinedBy sh: . + +sh:filterShape + a rdf:Property ; + rdfs:label "filter shape"@en ; + rdfs:comment "The shape that all input nodes of the expression need to conform to."@en ; + rdfs:range sh:Shape ; + rdfs:isDefinedBy sh: . + +sh:nodes + a rdf:Property ; + rdfs:label "nodes"@en ; + rdfs:comment "The node expression producing the input nodes of a filter shape expression."@en ; + rdfs:isDefinedBy sh: . + +sh:intersection + a rdf:Property ; + rdfs:label "intersection"@en ; + rdfs:comment "A list of node expressions that shall be intersected."@en ; + rdfs:isDefinedBy sh: . + +sh:union + a rdf:Property ; + rdfs:label "union"@en ; + rdfs:comment "A list of node expressions that shall be used together."@en ; + rdfs:isDefinedBy sh: . + + +# Expression Constraints ------------------------------------------------------ + +sh:ExpressionConstraintComponent + a sh:ConstraintComponent ; + rdfs:label "Expression constraint component"@en ; + rdfs:comment "A constraint component that can be used to verify that a given node expression produces true for all value nodes."@en ; + sh:parameter sh:ExpressionConstraintComponent-expression ; + rdfs:isDefinedBy sh: . + +sh:ExpressionConstraintComponent-expression + a sh:Parameter ; + sh:path sh:expression ; + rdfs:isDefinedBy sh: . + +sh:expression + a rdf:Property ; + rdfs:label "expression"@en ; + rdfs:comment "The node expression that must return true for the value nodes."@en ; + rdfs:isDefinedBy sh: . + + +# Rules ----------------------------------------------------------------------- + +sh:Rule + a rdfs:Class ; + rdfs:label "Rule"@en ; + rdfs:comment "The class of SHACL rules. Never instantiated directly."@en ; + rdfs:subClassOf rdfs:Resource ; + rdfs:isDefinedBy sh: . + +sh:rule + a rdf:Property ; + rdfs:label "rule"@en ; + rdfs:comment "The rules linked to a shape."@en ; + rdfs:domain sh:Shape ; + rdfs:range sh:Rule ; + rdfs:isDefinedBy sh: . + +sh:condition + a rdf:Property ; + rdfs:label "condition"@en ; + rdfs:comment "The shapes that the focus nodes need to conform to before a rule is executed on them."@en ; + rdfs:domain sh:Rule ; + rdfs:range sh:Shape ; + rdfs:isDefinedBy sh: . + +sh:TripleRule + a rdfs:Class ; + rdfs:label "A rule based on triple (subject, predicate, object) pattern."@en ; + rdfs:subClassOf sh:Rule ; + rdfs:isDefinedBy sh: . + +sh:subject + a rdf:Property ; + rdfs:label "subject"@en ; + rdfs:comment "An expression producing the resources that shall be inferred as subjects."@en ; + rdfs:domain sh:TripleRule ; + rdfs:isDefinedBy sh: . + +sh:predicate + a rdf:Property ; + rdfs:label "predicate"@en ; + rdfs:comment "An expression producing the properties that shall be inferred as predicates."@en ; + rdfs:domain sh:TripleRule ; + rdfs:isDefinedBy sh: . + +sh:object + a rdf:Property ; + rdfs:label "object"@en ; + rdfs:comment "An expression producing the nodes that shall be inferred as objects."@en ; + rdfs:domain sh:TripleRule ; + rdfs:isDefinedBy sh: . + +sh:SPARQLRule + a rdfs:Class ; + rdfs:label "SPARQL CONSTRUCT rule"@en ; + rdfs:comment "The class of SHACL rules based on SPARQL CONSTRUCT queries."@en ; + rdfs:subClassOf sh:Rule ; + rdfs:subClassOf sh:SPARQLConstructExecutable ; + rdfs:isDefinedBy sh: . + + +# SHACL-JS -------------------------------------------------------------------- + +sh:JSExecutable + a rdfs:Class ; + rdfs:label "JavaScript executable"@en ; + rdfs:comment "Abstract base class of resources that declare an executable JavaScript."@en ; + rdfs:subClassOf rdfs:Resource ; + rdfs:isDefinedBy sh: . + +sh:JSTarget + a rdfs:Class ; + rdfs:label "JavaScript target"@en ; + rdfs:comment "The class of targets that are based on JavaScript functions."@en ; + rdfs:subClassOf sh:Target ; + rdfs:subClassOf sh:JSExecutable ; + rdfs:isDefinedBy sh: . + +sh:JSTargetType + a rdfs:Class ; + rdfs:label "JavaScript target type"@en ; + rdfs:comment "The (meta) class for parameterizable targets that are based on JavaScript functions."@en ; + rdfs:subClassOf sh:TargetType ; + rdfs:subClassOf sh:JSExecutable ; + rdfs:isDefinedBy sh: . + +sh:JSConstraint + a rdfs:Class ; + rdfs:label "JavaScript-based constraint"@en ; + rdfs:comment "The class of constraints backed by a JavaScript function."@en ; + rdfs:subClassOf sh:JSExecutable ; + rdfs:isDefinedBy sh: . + +sh:JSConstraintComponent + a sh:ConstraintComponent ; + rdfs:label "JavaScript constraint component"@en ; + rdfs:comment "A constraint component with the parameter sh:js linking to a sh:JSConstraint containing a sh:script."@en ; + sh:parameter sh:JSConstraint-js ; + rdfs:isDefinedBy sh: . + +sh:JSConstraint-js + a sh:Parameter ; + sh:path sh:js ; + rdfs:isDefinedBy sh: . + +sh:js + a rdf:Property ; + rdfs:label "JavaScript constraint"@en ; + rdfs:comment "Constraints expressed in JavaScript." ; + rdfs:range sh:JSConstraint ; + rdfs:isDefinedBy sh: . + +sh:jsFunctionName + a rdf:Property ; + rdfs:label "JavaScript function name"@en ; + rdfs:comment "The name of the JavaScript function to execute."@en ; + rdfs:domain sh:JSExecutable ; + rdfs:range xsd:string ; + rdfs:isDefinedBy sh: . + +sh:jsLibrary + a rdf:Property ; + rdfs:label "JavaScript library"@en ; + rdfs:comment "Declares which JavaScript libraries are needed to execute this."@en ; + rdfs:range sh:JSLibrary ; + rdfs:isDefinedBy sh: . + +sh:jsLibraryURL + a rdf:Property ; + rdfs:label "JavaScript library URL"@en ; + rdfs:comment "Declares the URLs of a JavaScript library. This should be the absolute URL of a JavaScript file. Implementations may redirect those to local files."@en ; + rdfs:domain sh:JSLibrary ; + rdfs:range xsd:anyURI ; + rdfs:isDefinedBy sh: . + +sh:JSFunction + a rdfs:Class ; + rdfs:label "JavaScript function"@en ; + rdfs:comment "The class of SHACL functions that execute a JavaScript function when called."@en ; + rdfs:subClassOf sh:Function ; + rdfs:subClassOf sh:JSExecutable ; + rdfs:isDefinedBy sh: . + +sh:JSLibrary + a rdfs:Class ; + rdfs:label "JavaScript library"@en ; + rdfs:comment "Represents a JavaScript library, typically identified by one or more URLs of files to include."@en ; + rdfs:subClassOf rdfs:Resource ; + rdfs:isDefinedBy sh: . + +sh:JSRule + a rdfs:Class ; + rdfs:label "JavaScript rule"@en ; + rdfs:comment "The class of SHACL rules expressed using JavaScript."@en ; + rdfs:subClassOf sh:JSExecutable ; + rdfs:subClassOf sh:Rule ; + rdfs:isDefinedBy sh: . + +sh:JSValidator + a rdfs:Class ; + rdfs:label "JavaScript validator"@en ; + rdfs:comment "A SHACL validator based on JavaScript. This can be used to declare SHACL constraint components that perform JavaScript-based validation when used."@en ; + rdfs:subClassOf sh:JSExecutable ; + rdfs:subClassOf sh:Validator ; + rdfs:isDefinedBy sh: . diff --git a/test-data/vocabs/xsd.ttl b/test-data/vocabs/xsd.ttl new file mode 100644 index 0000000..4ddf427 --- /dev/null +++ b/test-data/vocabs/xsd.ttl @@ -0,0 +1,185 @@ +@prefix xsd: . +@prefix rdfs: . + +<> rdfs:label "XSD Namespace Document"; + ; + rdfs:comment """This file is a missing RDF description of the XML Schema datatypes used in RDF/OWL. + Please refer to http://www.w3.org/TR/owl-ref/#rdf-datatype for a list of valid datatypes.""". + +xsd:string a rdfs:Datatype; + rdfs:isDefinedBy ; + rdfs:comment "The string datatype represents character strings in XML. The ·value space· of string is the set of finite-length sequences of characters (as defined in [XML 1.0 (Second Edition)]) that ·match· the Char production from [XML 1.0 (Second Edition)]. A character is an atomic unit of communication; it is not further specified except to note that every character has a corresponding Universal Character Set code point, which is an integer."; + rdfs:label "string". + +xsd:normalizedString a rdfs:Datatype; + rdfs:isDefinedBy ; + rdfs:comment "normalizedString represents white space normalized strings. The ·value space· of normalizedString is the set of strings that do not contain the carriage return (#xD), line feed (#xA) nor tab (#x9) characters. The ·lexical space· of normalizedString is the set of strings that do not contain the carriage return (#xD), line feed (#xA) nor tab (#x9) characters. The ·base type· of normalizedString is string."; + rdfs:label "normalizedString". + +xsd:token a rdfs:Datatype; + rdfs:isDefinedBy ; + rdfs:comment "token represents tokenized strings. The ·value space· of token is the set of strings that do not contain the carriage return (#xD), line feed (#xA) nor tab (#x9) characters, that have no leading or trailing spaces (#x20) and that have no internal sequences of two or more spaces. The ·lexical space· of token is the set of strings that do not contain the carriage return (#xD), line feed (#xA) nor tab (#x9) characters, that have no leading or trailing spaces (#x20) and that have no internal sequences of two or more spaces. The ·base type· of token is normalizedString."; + rdfs:label "token". + +xsd:language a rdfs:Datatype; + rdfs:isDefinedBy ; + rdfs:comment "language represents natural language identifiers as defined by by [RFC 3066] . The ·value space· of language is the set of all strings that are valid language identifiers as defined [RFC 3066] . The ·lexical space· of language is the set of all strings that conform to the pattern [a-zA-Z]{1,8}(-[a-zA-Z0-9]{1,8})* . The ·base type· of language is token."; + rdfs:label "language". + +xsd:NMTOKEN a rdfs:Datatype; + rdfs:isDefinedBy ; + rdfs:comment "NMTOKEN represents the NMTOKEN attribute type from [XML 1.0 (Second Edition)]. The ·value space· of NMTOKEN is the set of tokens that ·match· the Nmtoken production in [XML 1.0 (Second Edition)]. The ·lexical space· of NMTOKEN is the set of strings that ·match· the Nmtoken production in [XML 1.0 (Second Edition)]. The ·base type· of NMTOKEN is token."; + rdfs:label "NMTOKEN". + +xsd:Name a rdfs:Datatype; + rdfs:isDefinedBy ; + rdfs:comment "Name represents XML Names. The ·value space· of Name is the set of all strings which ·match· the Name production of [XML 1.0 (Second Edition)]. The ·lexical space· of Name is the set of all strings which ·match· the Name production of [XML 1.0 (Second Edition)]. The ·base type· of Name is token."; + rdfs:label "Name". + +xsd:NCName a rdfs:Datatype; + rdfs:isDefinedBy ; + rdfs:comment "NCName represents XML 'non-colonized' Names. The ·value space· of NCName is the set of all strings which ·match· the NCName production of [Namespaces in XML]. The ·lexical space· of NCName is the set of all strings which ·match· the NCName production of [Namespaces in XML]. The ·base type· of NCName is Name."; + rdfs:label "NCName". + + +xsd:boolean a rdfs:Datatype; + rdfs:isDefinedBy ; + rdfs:comment "An instance of a datatype that is defined as ·boolean· can have the following legal literals {true, false, 1, 0}."; + rdfs:label "boolean". + +xsd:decimal a rdfs:Datatype; + rdfs:isDefinedBy ; + rdfs:comment "decimal has a lexical representation consisting of a finite-length sequence of decimal digits (#x30-#x39) separated by a period as a decimal indicator. An optional leading sign is allowed. If the sign is omitted, '+' is assumed. Leading and trailing zeroes are optional. If the fractional part is zero, the period and following zeroes can be omitted. For example: -1.23, 12678967.543233, +100000.00, 210."; + rdfs:label "decimal". + +xsd:float a rdfs:Datatype; + rdfs:isDefinedBy ; + rdfs:comment "float values have a lexical representation consisting of a mantissa followed, optionally, by the character 'E' or 'e', followed by an exponent. The exponent ·must· be an integer. The mantissa must be a decimal number. The representations for exponent and mantissa must follow the lexical rules for integer and decimal. If the 'E' or 'e' and the following exponent are omitted, an exponent value of 0 is assumed. The special values positive and negative infinity and not-a-number have lexical representations INF, -INF and NaN, respectively. Lexical representations for zero may take a positive or negative sign. For example, -1E4, 1267.43233E12, 12.78e-2, 12 , -0, 0 and INF are all legal literals for float."; + rdfs:label "float". + +xsd:double a rdfs:Datatype; + rdfs:isDefinedBy ; + rdfs:comment "double values have a lexical representation consisting of a mantissa followed, optionally, by the character 'E' or 'e', followed by an exponent. The exponent ·must· be an integer. The mantissa must be a decimal number. The representations for exponent and mantissa must follow the lexical rules for integer and decimal. If the 'E' or 'e' and the following exponent are omitted, an exponent value of 0 is assumed. The special values positive and negative infinity and not-a-number have lexical representations INF, -INF and NaN, respectively. Lexical representations for zero may take a positive or negative sign. For example, -1E4, 1267.43233E12, 12.78e-2, 12 , -0, 0 and INF are all legal literals for double."; + rdfs:label "double". + +xsd:integer a rdfs:Datatype; + rdfs:isDefinedBy ; + rdfs:comment "integer has a lexical representation consisting of a finite-length sequence of decimal digits (#x30-#x39) with an optional leading sign. If the sign is omitted, '+' is assumed. For example: -1, 0, 12678967543233, +100000."; + rdfs:label "integer". + +xsd:positiveInteger a rdfs:Datatype; + rdfs:isDefinedBy ; + rdfs:comment "positiveInteger has a lexical representation consisting of an optional positive sign ('+') followed by a finite-length sequence of decimal digits (#x30-#x39). For example: 1, 12678967543233, +100000."; + rdfs:label "positiveInteger". + +xsd:nonPositiveInteger a rdfs:Datatype; + rdfs:isDefinedBy ; + rdfs:comment "nonPositiveInteger has a lexical representation consisting of an optional preceding sign followed by a finite-length sequence of decimal digits (#x30-#x39). The sign may be '+' or may be omitted only for lexical forms denoting zero; in all other lexical forms, the negative sign ('-') must be present. For example: -1, 0, -12678967543233, -100000."; + rdfs:label "nonPositiveInteger". + +xsd:negativeInteger a rdfs:Datatype; + rdfs:isDefinedBy ; + rdfs:comment "negativeInteger has a lexical representation consisting of a negative sign ('-') followed by a finite-length sequence of decimal digits (#x30-#x39). For example: -1, -12678967543233, -100000."; + rdfs:label "negativeInteger". + +xsd:nonNegativeInteger a rdfs:Datatype; + rdfs:isDefinedBy ; + rdfs:comment "nonNegativeInteger has a lexical representation consisting of an optional sign followed by a finite-length sequence of decimal digits (#x30-#x39). If the sign is omitted, the positive sign ('+') is assumed. If the sign is present, it must be '+' except for lexical forms denoting zero, which may be preceded by a positive ('+') or a negative ('-') sign. For example: 1, 0, 12678967543233, +100000."; + rdfs:label "nonNegativeInteger". + +xsd:long a rdfs:Datatype; + rdfs:isDefinedBy ; + rdfs:comment "long is ·derived· from integer by setting the value of ·maxInclusive· to be 9223372036854775807 and ·minInclusive· to be -9223372036854775808. long has a lexical representation consisting of an optional sign followed by a finite-length sequence of decimal digits (#x30-#x39). If the sign is omitted, '+' is assumed. For example: -1, 0, 12678967543233, +100000."; + rdfs:label "long". + +xsd:int a rdfs:Datatype; + rdfs:isDefinedBy ; + rdfs:comment "int is ·derived· from long by setting the value of ·maxInclusive· to be 2147483647 and ·minInclusive· to be -2147483648. int has a lexical representation consisting of an optional sign followed by a finite-length sequence of decimal digits (#x30-#x39). If the sign is omitted, '+' is assumed. For example: -1, 0, 126789675, +100000."; + rdfs:label "int". + +xsd:short a rdfs:Datatype; + rdfs:isDefinedBy ; + rdfs:comment "short is ·derived· from int by setting the value of ·maxInclusive· to be 32767 and ·minInclusive· to be -32768. short has a lexical representation consisting of an optional sign followed by a finite-length sequence of decimal digits (#x30-#x39). If the sign is omitted, '+' is assumed. For example: -1, 0, 12678, +10000."; + rdfs:label "short". + +xsd:byte a rdfs:Datatype; + rdfs:isDefinedBy ; + rdfs:comment "byte is ·derived· from short by setting the value of ·maxInclusive· to be 127 and ·minInclusive· to be -128. byte has a lexical representation consisting of an optional sign followed by a finite-length sequence of decimal digits (#x30-#x39). If the sign is omitted, '+' is assumed. For example: -1, 0, 126, +100."; + rdfs:label "byte". + +xsd:unsignedLong a rdfs:Datatype; + rdfs:isDefinedBy ; + rdfs:comment "unsignedLong is ·derived· from nonNegativeInteger by setting the value of ·maxInclusive· to be 18446744073709551615. unsignedLong has a lexical representation consisting of a finite-length sequence of decimal digits (#x30-#x39). For example: 0, 12678967543233, 100000."; + rdfs:label "unsignedLong". + +xsd:unsignedInt a rdfs:Datatype; + rdfs:isDefinedBy ; + rdfs:comment "unsignedInt is ·derived· from unsignedLong by setting the value of ·maxInclusive· to be 4294967295. unsignedInt has a lexical representation consisting of a finite-length sequence of decimal digits (#x30-#x39). For example: 0, 1267896754, 100000."; + rdfs:label "unsignedInt". + +xsd:unsignedShort a rdfs:Datatype; + rdfs:isDefinedBy ; + rdfs:comment "unsignedShort is ·derived· from unsignedInt by setting the value of ·maxInclusive· to be 65535. unsignedShort has a lexical representation consisting of a finite-length sequence of decimal digits (#x30-#x39). For example: 0, 12678, 10000."; + rdfs:label "unsignedShort". + +xsd:unsignedByte a rdfs:Datatype; + rdfs:isDefinedBy ; + rdfs:comment "unsignedByte is ·derived· from unsignedShort by setting the value of ·maxInclusive· to be 255. unsignedByte has a lexical representation consisting of a finite-length sequence of decimal digits (#x30-#x39). For example: 0, 126, 100."; + rdfs:label "unsignedByte". + + +xsd:dateTime a rdfs:Datatype; + rdfs:isDefinedBy ; + rdfs:comment "The ·lexical space· of dateTime consists of finite-length sequences of characters of the form: '-'? yyyy '-' mm '-' dd 'T' hh ':' mm ':' ss ('.' s+)? (zzzzzz)? For example, 2002-10-10T12:00:00-05:00 (noon on 10 October 2002, Central Daylight Savings Time as well as Eastern Standard Time in the U.S.) is 2002-10-10T17:00:00Z, five hours later than 2002-10-10T12:00:00Z."; + rdfs:label "dateTime". + +xsd:time a rdfs:Datatype; + rdfs:isDefinedBy ; + rdfs:comment "The lexical representation for time is the left truncated lexical representation for dateTime: hh:mm:ss.sss with optional following time zone indicator. For example, to indicate 1:20 pm for Eastern Standard Time which is 5 hours behind Coordinated Universal Time (UTC), one would write: 13:20:00-05:00. See also ISO 8601 Date and Time Formats (¤D)."; + rdfs:label "time". + +xsd:date a rdfs:Datatype; + rdfs:isDefinedBy ; + rdfs:comment "The ·lexical space· of date consists of finite-length sequences of characters of the form: '-'? yyyy '-' mm '-' dd zzzzzz? where the date and optional timezone are represented exactly the same way as they are for dateTime. The first moment of the interval is that represented by: '-' yyyy '-' mm '-' dd 'T00:00:00' zzzzzz? and the least upper bound of the interval is the timeline point represented (noncanonically) by: '-' yyyy '-' mm '-' dd 'T24:00:00' zzzzzz?."; + rdfs:label "date". + +xsd:gYearMonth a rdfs:Datatype; + rdfs:isDefinedBy ; + rdfs:comment "The lexical representation for gYearMonth is the reduced (right truncated) lexical representation for dateTime: CCYY-MM. No left truncation is allowed. An optional following time zone qualifier is allowed. To accommodate year values outside the range from 0001 to 9999, additional digits can be added to the left of this representation and a preceding '-' sign is allowed. For example, to indicate the month of May 1999, one would write: 1999-05. See also ISO 8601 Date and Time Formats (¤D)."; + rdfs:label "gYearMonth". + +xsd:gYear a rdfs:Datatype; + rdfs:isDefinedBy ; + rdfs:comment "The lexical representation for gYear is the reduced (right truncated) lexical representation for dateTime: CCYY. No left truncation is allowed. An optional following time zone qualifier is allowed as for dateTime. To accommodate year values outside the range from 0001 to 9999, additional digits can be added to the left of this representation and a preceding '-' sign is allowed. For example, to indicate 1999, one would write: 1999. See also ISO 8601 Date and Time Formats (¤D)."; + rdfs:label "gYear". + +xsd:gMonthDay a rdfs:Datatype; + rdfs:isDefinedBy ; + rdfs:comment "The lexical representation for gMonthDay is the left truncated lexical representation for date: --MM-DD. An optional following time zone qualifier is allowed as for date. No preceding sign is allowed. No other formats are allowed. See also ISO 8601 Date and Time Formats (¤D). This datatype can be used to represent a specific day in a month. To say, for example, that my birthday occurs on the 14th of September ever year."; + rdfs:label "gMonthDay". + +xsd:gDay a rdfs:Datatype; + rdfs:isDefinedBy ; + rdfs:comment "The lexical representation for gDay is the left truncated lexical representation for date: ---DD . An optional following time zone qualifier is allowed as for date. No preceding sign is allowed. No other formats are allowed. See also ISO 8601 Date and Time Formats (¤D)."; + rdfs:label "gDay". + +xsd:gMonth a rdfs:Datatype; + rdfs:isDefinedBy ; + rdfs:comment "The lexical representation for gMonth is the left and right truncated lexical representation for date: --MM. An optional following time zone qualifier is allowed as for date. No preceding sign is allowed. No other formats are allowed. See also ISO 8601 Date and Time Formats (¤D)."; + rdfs:label "gMonth". + + +xsd:hexBinary a rdfs:Datatype; + rdfs:isDefinedBy ; + rdfs:comment "hexBinary has a lexical representation where each binary octet is encoded as a character tuple, consisting of two hexadecimal digits ([0-9a-fA-F]) representing the octet code. For example, '0FB7' is a hex encoding for the 16-bit integer 4023 (whose binary representation is 111110110111)."; + rdfs:label "hexBinary". + +xsd:base64Binary a rdfs:Datatype; + rdfs:isDefinedBy ; + rdfs:comment "The lexical forms of base64Binary values are limited to the 65 characters of the Base64 Alphabet defined in [RFC 2045], i.e., a-z, A-Z, 0-9, the plus sign (+), the forward slash (/) and the equal sign (=), together with the characters defined in [XML 1.0 (Second Edition)] as white space. No other characters are allowed."; + rdfs:label "base64Binary". + +xsd:anyURI a rdfs:Datatype; + rdfs:isDefinedBy ; + rdfs:comment "The ·lexical space· of anyURI is finite-length character sequences which, when the algorithm defined in Section 5.4 of [XML Linking Language] is applied to them, result in strings which are legal URIs according to [RFC 2396], as amended by [RFC 2732]. Note: Spaces are, in principle, allowed in the ·lexical space· of anyURI, however, their use is highly discouraged (unless they are encoded by %20)."; + rdfs:label "anyURI". diff --git a/test/Artifact.spec.ts b/test/Artifact.spec.ts index 3e82c16..f5225bf 100644 --- a/test/Artifact.spec.ts +++ b/test/Artifact.spec.ts @@ -63,8 +63,8 @@ afterAll(async () => { /*async function createRandomTextArtifact(schema: any, artifactFormat: string, assetFolder: string): Promise { const uuid = uuid62.v4(); const newArtifact = { - title: 'Требование ' + uuid, - description: 'Описание ' + uuid, + title: 'Requirement ' + uuid, + description: 'Description ' + uuid, assetFolder, artifactFormat, }; @@ -79,8 +79,8 @@ describe('create-artifact-scenario', () => { it(`should persist artifact in the store`, async () => { //await repository.schemas.loadSchemaByClassIri('rm:Artifact'); //const artifactSchema = repository.schemas.getOrLoadSchemaByClassIri('rm:Artifact'); - //await repository.schemas.loadSchemaByClassIri('cpgu:Группировка'); - //const classifierGroupSchema = repository.schemas.getOrLoadSchemaByClassIri('cpgu:Группировка'); + //await repository.schemas.loadSchemaByClassIri('clss:Grouping'); + //const classifierGroupSchema = repository.schemas.getOrLoadSchemaByClassIri('clss:Grouping'); const coll = repository.addColl('rm:ArtifactShape'); await coll.loadColl(); @@ -151,7 +151,7 @@ describe('create-artifact-scenario', () => { }); const afterDelList11 = await repository.selectObjectsWithTypeInfo({ schema: artifactSchema, - cinditions: { assetFolder }, + conditions: { assetFolder }, }); expect(afterDelList11.length).toBe(2); expect(afterDelList11.filter((req: any) => req.identifier === newArtifact2.identifier).length).toBe(0); @@ -205,7 +205,7 @@ describe('create-artifact-scenario', () => { //console.log('+++ Modify artifact'); const forUpdateArtifact4: JsObject = newArtifact4; - forUpdateArtifact4.title = 'Изменение заголовка требования'; + forUpdateArtifact4.title = 'Req Title Change'; //const updatedArtifact4 = await repository.updateObject({ @@ -216,7 +216,7 @@ describe('create-artifact-scenario', () => { }, }); //expect(updatedArtifact4.identifier).toBe(forUpdateArtifact4.identifier); - //xpect(updatedArtifact4.title).toBe(forUpdateArtifact4.title); + //expect(updatedArtifact4.title).toBe(forUpdateArtifact4.title); //expect(forUpdateArtifact4.modified).not.toBe(updatedArtifact4.modified); //forUpdateArtifact4.modified = updatedArtifact4.modified; //forUpdateArtifact4.modifiedBy = updatedArtifact4.modifiedBy; @@ -250,7 +250,7 @@ describe('Modify artifact', () => { it(`title should be modifiable`, async () => { let artifacts = await selectArtifacts({}, graphUri, apiUrl); const rec = artifacts[0]; - const newTitle = 'Изменение заголовка требования'; + const newTitle = 'Req Title Change'; await updateArtifact( rec, @@ -306,8 +306,8 @@ describe('Modify artifact', () => { it(`title and description should be modifiable`, async () => { let artifacts = await selectArtifacts({}, graphUri, apiUrl); const rec = artifacts[0]; - const newTitle = 'Изменение2 заголовка требования'; - const newDescription = 'Изменение2 описания требования'; + const newTitle = 'Req Title Change2'; + const newDescription = 'Req Description Change2'; await updateArtifact( rec, @@ -350,10 +350,10 @@ describe('ClearGraph', () => { // Creating artifacts for (let i = 0; i < 1; ++i) { const newArtifact = { - title: 'Требование ' + i, - description: 'Описание ' + i, + title: 'Requirement ' + i, + description: 'Description ' + i, assetFolder: listFolders[0]['@id], - type: 'http://cpgu.kbpm.ru/ns/rm/cpgu#Группировка', + type: 'https://agentlab.eu/ns/rm/classifier#Grouping', format: 'rmUserTypes:_YwcOsRmREemK5LEaKhoOow_Text', }; @@ -363,10 +363,10 @@ describe('ClearGraph', () => { // Creating module for (let i = 0; i < 1; ++i) { const newArtifact = { - title: 'Модуль ' + i, - description: 'Описание ' + i, + title: 'Module ' + i, + description: 'Description ' + i, assetFolder: listFolders[0]['@id'], - type: 'http://cpgu.kbpm.ru/ns/rm/cpgu#Classifier', + type: 'https://agentlab.eu/ns/rm/classifier#Classifier', format: 'rmUserTypes:_YwcOsRmREemK5LEaKhoOow_Module', }; @@ -377,30 +377,30 @@ describe('ClearGraph', () => { const insertData = async (assetFolder, index, prefix) => { const newArtifact = { - title: `Требование ${prefix}-${index}`, - description: 'Это требование содержится в директории ' + assetFolder.title, + title: `Requirement ${prefix}-${index}`, + description: 'This Requirement contains in the Folder ' + assetFolder.title, assetFolder: assetFolder['@id'], - type: 'http://cpgu.kbpm.ru/ns/rm/cpgu#Группировка', + type: 'https://agentlab.eu/ns/rm/classifier#Grouping', format: 'rmUserTypes:_YwcOsRmREemK5LEaKhoOow_Text', }; await createArtifact(newArtifact, graphUri, apiUrl); const newModule = { - title: `Модуль ${prefix}-${index}`, - description: 'Этот модуль содержится в директории ' + assetFolder.title, + title: `Module ${prefix}-${index}`, + description: 'This Module contains in the Folder ' + assetFolder.title, assetFolder: assetFolder['@id'], - type: 'http://cpgu.kbpm.ru/ns/rm/cpgu#Группировка', + type: 'https://agentlab.eu/ns/rm/classifier#Grouping', format: 'rmUserTypes:_YwcOsRmREemK5LEaKhoOow_Text', }; await createArtifact(newModule, graphUri, apiUrl); const newArtifactsCollection = { - title: `Набор требований ${prefix}-${index}`, - description: 'Этот набор требований содержится в директории ' + assetFolder.title, + title: `Collection ${prefix}-${index}`, + description: 'This Collection contains in the Folder ' + assetFolder.title, assetFolder: assetFolder['@id'], - type: 'http://cpgu.kbpm.ru/ns/rm/cpgu#Classifier', + type: 'https://agentlab.eu/ns/rm/classifier#Classifier', format: 'rmUserTypes:_YwcOsRmREemK5LEaKhoOow_Collection', }; diff --git a/test/ArtifactsInModule.spec.ts b/test/ArtifactsInModule.spec.ts index de93363..9866632 100644 --- a/test/ArtifactsInModule.spec.ts +++ b/test/ArtifactsInModule.spec.ts @@ -69,8 +69,8 @@ const SchemaWithHasChildProp: any = { properties: { ...artifactSchema.properties, hasChild: { - title: 'Имеет потомков', - description: 'Имеет потомков', + title: 'Has Child', + description: 'Has Child', type: 'boolean', shapeModifiability: 'system', }, @@ -95,7 +95,7 @@ const usedInModuleCollConstrJs: any = { '@type': 'aldkg:EntConstrCondition', // normally gets from schema @id //'@_id': //'@_type': - object: 'file:///urn-s2-iisvvt-infosystems-classifier-45950.xml', + object: 'file:///myfile.xml', subject: '?eIri1', }, //variables: {}, @@ -114,7 +114,7 @@ const usedInModuleCollConstrJs: any = { triples: [ factory.quad( factory.variable('eIri2'), - factory.namedNode('http://cpgu.kbpm.ru/ns/rm/user-types#parentBinding'), + factory.namedNode('https://agentlab.eu/ns/rm/user-types#parentBinding'), factory.variable('eIri1'), ), ], @@ -139,27 +139,27 @@ const moduleObject: any = { '@type': 'rmUserTypes:UsedInModule', bookOrder: 1, created: '2014-02-10T10:12:16.000Z', - creator: 'users:amivanoff', + creator: 'users:user1', depth: 1, modified: '2014-02-10T10:12:16.000Z', - modifiedBy: 'users:amivanoff', - object: 'file:///urn-s2-iisvvt-infosystems-classifier-45950.xml', - parentBinding: 'file:///urn-s2-iisvvt-infosystems-classifier-45950.xml', - processArea: 'projects:gishbbProject', + modifiedBy: 'users:user1', + object: 'file:///myfile.xml', + parentBinding: 'file:///myfile.xml', + processArea: 'projects:defaultProject', sectionNumber: '0-1', subject: { - '@id': 'cpgu:_tHAikozUEeOiy8owVBW5pQ', - '@type': 'cpgu:Группировка', + '@id': 'clss:_tHAikozUEeOiy8owVBW5pQ', + '@type': 'clss:Grouping', artifactFormat: 'rmUserTypes:_YwcOsRmREemK5LEaKhoOow_Text', assetFolder: 'folders:samples_module', created: '2014-02-10T10:12:16.000Z', - creator: 'users:amivanoff', + creator: 'users:user1', hasChild: true, identifier: 30001, modified: '2014-02-10T10:12:16.000Z', - modifiedBy: 'users:amivanoff', - processArea: 'projects:gishbbProject', - title: 'ТН ВЭД ТС', + modifiedBy: 'users:user1', + processArea: 'projects:defaultProject', + title: 'Requirement Module 30000 - Grouping 30001 Title', }, }; @@ -213,28 +213,28 @@ describe('ArtifactsInModules query should return Module UsedInModules with assoc expect(linksAndArtifacts[0]).toMatchObject({ '@id': 'reqs:_M1HusThYEem2Z_XixsC3pQ', '@type': 'rmUserTypes:UsedInModule', - processArea: 'projects:gishbbProject', + processArea: 'projects:defaultProject', bookOrder: 1, depth: 1, - parentBinding: 'file:///urn-s2-iisvvt-infosystems-classifier-45950.xml', + parentBinding: 'file:///myfile.xml', sectionNumber: '0-1', - modifiedBy: 'users:amivanoff', + modifiedBy: 'users:user1', created: '2014-02-10T10:12:16.000Z', - creator: 'users:amivanoff', + creator: 'users:user1', modified: '2014-02-10T10:12:16.000Z', - object: 'file:///urn-s2-iisvvt-infosystems-classifier-45950.xml', + object: 'file:///myfile.xml', subject: { - '@id': 'cpgu:_tHAikozUEeOiy8owVBW5pQ', - '@type': 'cpgu:Группировка', - processArea: 'projects:gishbbProject', + '@id': 'clss:_tHAikozUEeOiy8owVBW5pQ', + '@type': 'clss:Grouping', + processArea: 'projects:defaultProject', artifactFormat: 'rmUserTypes:_YwcOsRmREemK5LEaKhoOow_Text', assetFolder: 'folders:samples_module', - modifiedBy: 'users:amivanoff', + modifiedBy: 'users:user1', created: '2014-02-10T10:12:16.000Z', - creator: 'users:amivanoff', + creator: 'users:user1', identifier: 30001, modified: '2014-02-10T10:12:16.000Z', - title: 'ТН ВЭД ТС', + title: 'Requirement Module 30000 - Grouping 30001 Title', hasChild: true, }, }); @@ -247,7 +247,7 @@ describe('ArtifactsInModules query should return Module UsedInModules with assoc //TODO: sorting is not working /*it('sorted by DESC bookOrder', (done) => { - // not nessesary to add, it could be retrieved from server by type IRI + // not necessary to add, it could be retrieved from server by type IRI // used here to increase predictability //provider.addSchema(artifactSchema); //provider.addSchema(usedInSchema); @@ -269,7 +269,7 @@ describe('ArtifactsInModules query should return Module UsedInModules with assoc '@type': 'some conditions type', // normally gets from schema @id //'@_id': //'@_type': - object: 'file:///urn-s2-iisvvt-infosystems-classifier-45950.xml', + object: 'file:///myfile.xml', }, //variables: {}, }, @@ -288,19 +288,19 @@ describe('ArtifactsInModules query should return Module UsedInModules with assoc expect(linksAndArtifacts[0]).toMatchObject({ '@id': 'reqs:_N1HusThYEem2Z_XixsC3pQ', '@type': ['rmUserTypes:UsedInModule', 'rm:Artifact'], - object: 'file:///urn-s2-iisvvt-infosystems-classifier-45950.xml', - subject: 'cpgu:///_Ep8ocYzVEeOiy8owVBW5pQ', - parentBinding: 'cpgu:///_zYXy8ozUEeOiy8owVBW5pQ', + object: 'file:///myfile.xml', + subject: 'clss:///_Ep8ocYzVEeOiy8owVBW5pQ', + parentBinding: 'clss:///_zYXy8ozUEeOiy8owVBW5pQ', depth: 3, bookOrder: 10, - '@id1': 'cpgu:///_Ep8ocYzVEeOiy8owVBW5pQ', + '@id1': 'clss:///_Ep8ocYzVEeOiy8owVBW5pQ', identifier: 30010, - title: 'Наименование товарной позиции', - creator: 'users:amivanoff', + title: 'Requirement Module 30000 - Grouping 30010 Title', + creator: 'users:user1', created: '2014-02-10T10:12:16.000Z', - modifiedBy: 'users:amivanoff', + modifiedBy: 'users:user1', modified: '2014-02-10T10:12:16.000Z', - processArea: 'projects:gishbbProject', + processArea: 'projects:defaultProject', assetFolder: 'folders:samples_module', artifactFormat: 'rmUserTypes:_YwcOsRmREemK5LEaKhoOow_Text', hasChild: false, @@ -312,7 +312,7 @@ describe('ArtifactsInModules query should return Module UsedInModules with assoc }); it('sorted by two: ASC bookOrder and DESC depth', (done) => { - // not nessesary to add, it could be retrieved from server by type IRI + // not necessary to add, it could be retrieved from server by type IRI // used here to increase predictability //provider.addSchema(artifactSchema); //provider.addSchema(usedInSchema); @@ -379,7 +379,7 @@ const usedInModuleParentCollConstrJs: any = { triples: [ factory.quad( factory.variable('eIri2'), - factory.namedNode('http://cpgu.kbpm.ru/ns/rm/user-types#parentBinding'), + factory.namedNode('https://agentlab.eu/ns/rm/user-types#parentBinding'), factory.variable('eIri1'), ), ], @@ -410,7 +410,7 @@ const usedInModuleChildCollConstrJs: any = { conditions: { '@id': 'rm:UsedInModuleLink_Child_EntConstr0_Condition', '@type': 'aldkg:EntConstrCondition', - object: 'file:///urn-s2-iisvvt-infosystems-classifier-45950.xml', + object: 'file:///myfile.xml', }, }, ], diff --git a/test/MstModel.spec.ts b/test/MstModel.spec.ts index 13e0bc7..d0df296 100644 --- a/test/MstModel.spec.ts +++ b/test/MstModel.spec.ts @@ -46,28 +46,28 @@ describe('MstModel_Coll', () => { lazy: true, dataIntrnl: [ { - '@id': 'file:///urn-s2-iisvvt-infosystems-classifier-45950.xml', + '@id': 'file:///myfile.xml', '@type': 'rm:Artifact', identifier: 30000, - title: 'ТН ВЭД ТС', + title: 'Requirement Module 30000 Title', }, { - '@id': 'cpgu:_tHAikozUEeOiy8owVBW5pQ', + '@id': 'clss:_tHAikozUEeOiy8owVBW5pQ', '@type': 'rm:Artifact', identifier: 30001, - title: 'ТН ВЭД ТС', + title: 'Requirement Module 30000 - Grouping 30001 Title', }, { - '@id': 'cpgu:_zYXy8ozUEeOiy8owVBW5pQ', + '@id': 'clss:_zYXy8ozUEeOiy8owVBW5pQ', '@type': 'rm:Artifact', identifier: 30002, - title: 'Наименование раздела', + title: 'Requirement Module 30000 - Grouping 30002 Title', }, { - '@id': 'cpgu:_3AP4kYzUEeOiy8owVBW5pQ', + '@id': 'clss:_3AP4kYzUEeOiy8owVBW5pQ', '@type': 'rm:Artifact', identifier: 30003, - title: 'Код товарной группы', + title: 'Requirement Module 30000 - Grouping 30003 Title', }, ], lastSynced: 1723761063624, @@ -83,56 +83,56 @@ describe('MstModel_Coll', () => { expect(coll.dataIntrnl.length).toBe(4); // add el coll?.addElems({ - '@id': 'cpgu:_HmFCYozVEeOiy8owVBW5pQ', + '@id': 'clss:_HmFCYozVEeOiy8owVBW5pQ', '@type': 'rm:Artifact', identifier: 30004, - title: 'Код товарной позиции', + title: 'Requirement Module 30000 - Grouping 30004 Title', }); expect(coll.dataIntrnl.length).toBe(5); - const e1 = coll.dataByIri('cpgu:_HmFCYozVEeOiy8owVBW5pQ'); + const e1 = coll.dataByIri('clss:_HmFCYozVEeOiy8owVBW5pQ'); expectToBeDefined(e1); const e1Data: JsObject = getSnapshot(e1); - expect(e1Data.title).toBe('Код товарной позиции'); + expect(e1Data.title).toBe('Requirement Module 30000 - Grouping 30004 Title'); // add two same els and one new el coll.addElems([ // updated el { - '@id': 'cpgu:_tHAikozUEeOiy8owVBW5pQ', + '@id': 'clss:_tHAikozUEeOiy8owVBW5pQ', '@type': 'rm:Artifact', identifier: 30001, - title: 'ТН ВЭД ТС Changed', + title: 'Requirement Module 30000 - Grouping 30001 Title -- Changed', }, // same el { - '@id': 'cpgu:_HmFCYozVEeOiy8owVBW5pQ', + '@id': 'clss:_HmFCYozVEeOiy8owVBW5pQ', '@type': 'rm:Artifact', identifier: 30004, - title: 'Код товарной позиции', + title: 'Requirement Module 30000 - Grouping 30004 Title', }, // new el { - '@id': 'cpgu:_L8Lf8YzVEeOiy8owVBW5pQ', + '@id': 'clss:_L8Lf8YzVEeOiy8owVBW5pQ', '@type': 'rm:Artifact', identifier: 30005, - title: 'Код товарной субпозиции', + title: 'Requirement Module 30000 - Grouping 30005 Title', }, ]); //console.log(coll?.dataJs); expect(coll.dataIntrnl.length).toBe(6); // check updated el - const e2 = coll.dataByIri('cpgu:_tHAikozUEeOiy8owVBW5pQ'); + const e2 = coll.dataByIri('clss:_tHAikozUEeOiy8owVBW5pQ'); expectToBeDefined(e2); const e2Data: JsObject = getSnapshot(e2); - expect(e2Data.title).toBe('ТН ВЭД ТС Changed'); + expect(e2Data.title).toBe('Requirement Module 30000 - Grouping 30001 Title -- Changed'); // check same el - const e3 = coll.dataByIri('cpgu:_HmFCYozVEeOiy8owVBW5pQ'); + const e3 = coll.dataByIri('clss:_HmFCYozVEeOiy8owVBW5pQ'); expectToBeDefined(e3); const e3Data: JsObject = getSnapshot(e3); - expect(e3Data.title).toBe('Код товарной позиции'); + expect(e3Data.title).toBe('Requirement Module 30000 - Grouping 30004 Title'); // check new added el - const e4 = coll.dataByIri('cpgu:_L8Lf8YzVEeOiy8owVBW5pQ'); + const e4 = coll.dataByIri('clss:_L8Lf8YzVEeOiy8owVBW5pQ'); expectToBeDefined(e4); const e4Data: JsObject = getSnapshot(e4); - expect(e4Data.title).toBe('Код товарной субпозиции'); + expect(e4Data.title).toBe('Requirement Module 30000 - Grouping 30005 Title'); }); }); diff --git a/test/SimpleRetrieve.spec.ts b/test/SimpleRetrieve.spec.ts index 963c517..98f77aa 100644 --- a/test/SimpleRetrieve.spec.ts +++ b/test/SimpleRetrieve.spec.ts @@ -62,17 +62,17 @@ afterAll(async () => { }); const artifact30000Orig = { - '@id': 'file:///urn-s2-iisvvt-infosystems-classifier-45950.xml', - '@type': 'cpgu:Classifier', + '@id': 'file:///myfile.xml', + '@type': 'clss:Classifier', assetFolder: 'folders:samples_module', created: '2014-02-10T10:12:16.000Z', - creator: 'users:amivanoff', - description: 'ТН ВЭД ТС', + creator: 'users:user1', + description: 'Requirement Module 30000 Description', artifactFormat: 'rmUserTypes:_YwcOsRmREemK5LEaKhoOow_Module', identifier: 30000, - modifiedBy: 'users:amivanoff', + modifiedBy: 'users:user1', modified: '2014-02-10T10:12:16.000Z', - title: 'ТН ВЭД ТС', + title: 'Requirement Module 30000 Title', }; describe('SimpleRetrieve', () => { @@ -142,8 +142,8 @@ describe('SimpleRetrieve', () => { }); it('should return Specific Artifacts with expected schema', async () => { - await repository.schemas.loadSchemaByClassIri('cpgu:Группировка'); - const schema = repository.schemas.getOrLoadSchemaByClassIri('cpgu:Группировка'); + await repository.schemas.loadSchemaByClassIri('clss:Grouping'); + const schema = repository.schemas.getOrLoadSchemaByClassIri('clss:Grouping'); await selectHelper( repository, { @@ -154,8 +154,8 @@ describe('SimpleRetrieve', () => { }); it('should return Specific Artifacts with id=30001 with expected schema', async () => { - await repository.schemas.loadSchemaByClassIri('cpgu:Группировка'); - const schema = repository.schemas.getOrLoadSchemaByClassIri('cpgu:Группировка'); + await repository.schemas.loadSchemaByClassIri('clss:Grouping'); + const schema = repository.schemas.getOrLoadSchemaByClassIri('clss:Grouping'); await selectHelper( repository, { @@ -175,8 +175,8 @@ describe('SimpleRetrieve', () => { }); it('should return NO Specific Artifacts with non-existed values', async () => { - await repository.schemas.loadSchemaByClassIri('cpgu:Группировка'); - const schema = repository.schemas.getOrLoadSchemaByClassIri('cpgu:Группировка'); + await repository.schemas.loadSchemaByClassIri('clss:Grouping'); + const schema = repository.schemas.getOrLoadSchemaByClassIri('clss:Grouping'); await selectHelper( repository, { @@ -243,12 +243,12 @@ describe('SimpleRetrieve', () => { (data) => { artifactClasses0 = data; expect(data.length).toBeGreaterThan(0); - const classifierClass0 = data.find((e: any) => e['@id'] === 'cpgu:Classifier'); + const classifierClass0 = data.find((e: any) => e['@id'] === 'clss:Classifier'); expect(classifierClass0).toMatchObject({ - '@id': 'cpgu:Classifier', + '@id': 'clss:Classifier', '@type': 'rm:ArtifactClasses', - title: 'Классификатор', - description: 'Классификатор или справочник. Описывает структуру классификатора (не данные из него).', + title: 'RequirementClass Title Classifier', + description: 'RequirementClass Description Classifier', inCreationMenu: true, }); }, @@ -261,13 +261,13 @@ describe('SimpleRetrieve', () => { schema, }, (data) => { - expect(data.length).toBeGreaterThan(10); - const classifierClass = data.find((e: any) => e['@id'] === 'cpgu:Classifier'); + expect(data.length).toBeGreaterThan(7); + const classifierClass = data.find((e: any) => e['@id'] === 'clss:Classifier'); expect(classifierClass).toMatchObject({ - '@id': 'cpgu:Classifier', + '@id': 'clss:Classifier', '@type': 'rm:ArtifactClasses', - title: 'Классификатор', - description: 'Классификатор или справочник. Описывает структуру классификатора (не данные из него).', + title: 'RequirementClass Title Classifier', + description: 'RequirementClass Description Classifier', inCreationMenu: true, }); expect(data).toEqual(expect.arrayContaining(artifactClasses0)); @@ -373,7 +373,7 @@ describe('SimpleRetrieve', () => { }, ], }, - (data) => expect(data.length).toBe(56), + (data) => expect(data.length).toBe(8), ); await selectHelper( diff --git a/test/SparqlClient.spec.ts b/test/SparqlClient.spec.ts index dda5ac9..3323662 100644 --- a/test/SparqlClient.spec.ts +++ b/test/SparqlClient.spec.ts @@ -90,16 +90,16 @@ describe('SparqlClient', () => { }); it(`SparqlClient should select direct parent classes`, async () => { const query = `PREFIX rdfs: - PREFIX cpgu: - SELECT ?superClass WHERE { cpgu:Classifier rdfs:subClassOf ?superClass. }`; + PREFIX clss: + SELECT ?superClass WHERE { clss:Classifier rdfs:subClassOf ?superClass. }`; const results = await client.sparqlSelect(query, { infer: 'false' }); //console.log('results', json2str(results)); expect(results.bindings).toHaveLength(1); }); it(`SparqlClient should select one directSubClassOf with enabled inference`, async () => { const query = `PREFIX rdfs: - PREFIX cpgu: - SELECT ?superClass WHERE { cpgu:Classifier sesame:directSubClassOf ?superClass. }`; + PREFIX clss: + SELECT ?superClass WHERE { clss:Classifier sesame:directSubClassOf ?superClass. }`; const results = await client.sparqlSelect(query); //console.log('results', json2str(results)); expect(results.bindings).toHaveLength(1); @@ -109,7 +109,7 @@ describe('SparqlClient', () => { /*const query = `PREFIX rdfs: PREFIX sh: PREFIX dcterms: - PREFIX rm: + PREFIX rm: CONSTRUCT { ?eIri0 rdf:type sh:NodeShape; sh:targetClass rm:Artifact; @@ -161,7 +161,7 @@ describe('SparqlClient', () => { const query = `PREFIX rdf: PREFIX dcterms: PREFIX sh: - PREFIX rm: + PREFIX rm: CONSTRUCT { ?eIri0 rdf:type sh:NodeShape; sh:targetClass rm:Artifact; @@ -318,12 +318,12 @@ describe('SparqlClient', () => { }); it(`SparqlClient should construct Classifier shape with array props`, async () => { - const targetClass = 'cpgu:Classifier'; + const targetClass = 'clss:Classifier'; /*const query = `PREFIX rdf: PREFIX dcterms: PREFIX sh: - PREFIX rm: - PREFIX cpgu: + PREFIX rm: + PREFIX clss: CONSTRUCT { ?eIri0 rdf:type sh:NodeShape. ?eIri0 sh:targetClass ${targetClass}. @@ -379,8 +379,8 @@ describe('SparqlClient', () => { const query = `PREFIX rdf: PREFIX dcterms: PREFIX sh: - PREFIX rm: - PREFIX cpgu: + PREFIX rm: + PREFIX clss: CONSTRUCT { ?eIri0 rdf:type sh:NodeShape. ?eIri0 sh:targetClass ${targetClass}. @@ -543,7 +543,7 @@ describe('SparqlClient', () => { /* const query = `PREFIX rdf: - PREFIX nav: + PREFIX nav: PREFIX oslc: PREFIX dcterms: CONSTRUCT { @@ -572,7 +572,7 @@ describe('SparqlClient', () => { it(`SparqlClient should construct Folder`, async () => { const query = `PREFIX rdf: - PREFIX nav: + PREFIX nav: PREFIX oslc: PREFIX dcterms: CONSTRUCT { @@ -606,39 +606,39 @@ describe('SparqlClient', () => { // const client = new SparqlClientImpl(rdfServerUrl); // client.setRepositoryId('mktp-fed'); // const query = `PREFIX rdf: - // PREFIX hs: + // PREFIX iot: // CONSTRUCT { - // ?eIri0 rdf:type hs:HSObservation. - // ?eIri0 hs:product . - // ?eIri0 hs:parsedAt ?parsedAt0. - // ?eIri0 hs:categoryPopularity ?categoryPopularity0. - // ?eIri0 hs:commentsCount ?commentsCount0. - // ?eIri0 hs:price ?price0. - // ?eIri0 hs:questionsCount ?questionsCount0. - // ?eIri0 hs:saleValue ?saleValue0. - // ?eIri0 hs:salesAmountDiff ?salesAmountDiff0. - // ?eIri0 hs:stocksDiffOrders ?stocksDiffOrders0. - // ?eIri0 hs:stocksDiffReturns ?stocksDiffReturns0. - // ?eIri0 hs:stocks ?stocks0. - // ?eIri0 hs:totalSalesDiff ?totalSalesDiff0. - // ?eIri0 hs:totalSales ?totalSales0. + // ?eIri0 rdf:type iot:HSObservation. + // ?eIri0 iot:product . + // ?eIri0 iot:parsedAt ?parsedAt0. + // ?eIri0 iot:categoryPopularity ?categoryPopularity0. + // ?eIri0 iot:commentsCount ?commentsCount0. + // ?eIri0 iot:price ?price0. + // ?eIri0 iot:questionsCount ?questionsCount0. + // ?eIri0 iot:saleValue ?saleValue0. + // ?eIri0 iot:salesAmountDiff ?salesAmountDiff0. + // ?eIri0 iot:stocksDiffOrders ?stocksDiffOrders0. + // ?eIri0 iot:stocksDiffReturns ?stocksDiffReturns0. + // ?eIri0 iot:stocks ?stocks0. + // ?eIri0 iot:totalSalesDiff ?totalSalesDiff0. + // ?eIri0 iot:totalSales ?totalSales0. // } // WHERE { // SERVICE { - // ?eIri0 rdf:type hs:HSObservation; - // hs:product ; - // hs:parsedAt ?parsedAt0; - // hs:categoryPopularity ?categoryPopularity0; - // hs:commentsCount ?commentsCount0; - // hs:price ?price0; - // hs:questionsCount ?questionsCount0; - // hs:saleValue ?saleValue0; - // hs:salesAmountDiff ?salesAmountDiff0; - // hs:stocksDiffOrders ?stocksDiffOrders0; - // hs:stocksDiffReturns ?stocksDiffReturns0; - // hs:stocks ?stocks0; - // hs:totalSalesDiff ?totalSalesDiff0; - // hs:totalSales ?totalSales0. + // ?eIri0 rdf:type iot:HSObservation; + // iot:product ; + // iot:parsedAt ?parsedAt0; + // iot:categoryPopularity ?categoryPopularity0; + // iot:commentsCount ?commentsCount0; + // iot:price ?price0; + // iot:questionsCount ?questionsCount0; + // iot:saleValue ?saleValue0; + // iot:salesAmountDiff ?salesAmountDiff0; + // iot:stocksDiffOrders ?stocksDiffOrders0; + // iot:stocksDiffReturns ?stocksDiffReturns0; + // iot:stocks ?stocks0; + // iot:totalSalesDiff ?totalSalesDiff0; + // iot:totalSales ?totalSales0. // } // } // ORDER BY (?parsedAt)`; @@ -677,76 +677,76 @@ describe('SparqlClient', () => { // client.setRepositoryId('mktp-fed'); // /*const query = `PREFIX rdf: // PREFIX xsd: - // PREFIX hs: + // PREFIX iot: // CONSTRUCT { - // ?eIri0 rdf:type hs:ProductCard . - // ?eIri0 hs:name ?name0 . - // ?eIri0 hs:lastMonthSalesValue ?lastMonthSalesValue0 . - // ?eIri0 hs:saleValue ?saleValue0 . - // ?eIri0 hs:brand ?brand0 . - // ?eIri0 hs:seller ?seller0 . - // ?eIri0 hs:imageUrl ?imageUrl0 . - // ?eIri1 rdf:type hs:HSObservation . - // ?eIri1 hs:product ?eIri0 . - // ?eIri1 hs:parsedAt ?parsedAt1 . - // ?eIri1 hs:price ?price1 . + // ?eIri0 rdf:type iot:ProductCard . + // ?eIri0 iot:name ?name0 . + // ?eIri0 iot:lastMonthSalesValue ?lastMonthSalesValue0 . + // ?eIri0 iot:saleValue ?saleValue0 . + // ?eIri0 iot:brand ?brand0 . + // ?eIri0 iot:seller ?seller0 . + // ?eIri0 iot:imageUrl ?imageUrl0 . + // ?eIri1 rdf:type iot:HSObservation . + // ?eIri1 iot:product ?eIri0 . + // ?eIri1 iot:parsedAt ?parsedAt1 . + // ?eIri1 iot:price ?price1 . // } WHERE { // { // SELECT ?eIri0 ?name0 ?lastMonthSalesValue0 ?seller0 ?saleValue0 ?brand0 ?imageUrl0 WHERE { // { // SELECT ?eIri0 ?name0 ?lastMonthSalesValue0 ?seller0 ?saleValue0 ?brand0 WHERE { - // ?eIri0 rdf:type hs:ProductCard ; - // hs:name ?name0 ; - // hs:lastMonthSalesValue ?lastMonthSalesValue0 ; - // hs:seller ?seller0. - // OPTIONAL { ?eIri0 hs:saleValue ?saleValue0. } - // OPTIONAL { ?eIri0 hs:brand ?brand0. } + // ?eIri0 rdf:type iot:ProductCard ; + // iot:name ?name0 ; + // iot:lastMonthSalesValue ?lastMonthSalesValue0 ; + // iot:seller ?seller0. + // OPTIONAL { ?eIri0 iot:saleValue ?saleValue0. } + // OPTIONAL { ?eIri0 iot:brand ?brand0. } // } // ORDER BY DESC(?lastMonthSalesValue0) // LIMIT 2 // } - // OPTIONAL { ?eIri0 hs:imageUrl ?imageUrl } + // OPTIONAL { ?eIri0 iot:imageUrl ?imageUrl } // } // } { - // ?eIri1 rdf:type hs:HSObservation ; - // hs:product ?eIri0 ; - // hs:parsedAt ?parsedAt1 ; - // hs:price ?price1 . + // ?eIri1 rdf:type iot:HSObservation ; + // iot:product ?eIri0 ; + // iot:parsedAt ?parsedAt1 ; + // iot:price ?price1 . // filter(?parsedAt1 >= "2021-07-01T00:00:00"^^xsd:dateTime) // } // } // ORDER BY DESC(?lastMonthSalesValue0) ?parsedAt1`;*/ // const query = `PREFIX rdf: // PREFIX xsd: - // PREFIX hs: + // PREFIX iot: // CONSTRUCT { - // ?eIri0 rdf:type hs:ProductCard . - // ?eIri0 hs:name ?name0 . - // ?eIri0 hs:lastMonthSalesValue ?lastMonthSalesValue0 . - // ?eIri0 hs:imageUrl ?imageUrl0 . - // ?eIri1 rdf:type hs:HSObservation . - // ?eIri1 hs:product ?eIri0 . - // ?eIri1 hs:parsedAt ?parsedAt1 . - // ?eIri1 hs:price ?price1 . + // ?eIri0 rdf:type iot:ProductCard . + // ?eIri0 iot:name ?name0 . + // ?eIri0 iot:lastMonthSalesValue ?lastMonthSalesValue0 . + // ?eIri0 iot:imageUrl ?imageUrl0 . + // ?eIri1 rdf:type iot:HSObservation . + // ?eIri1 iot:product ?eIri0 . + // ?eIri1 iot:parsedAt ?parsedAt1 . + // ?eIri1 iot:price ?price1 . // } WHERE { // { // SELECT ?eIri0 ?name0 ?lastMonthSalesValue0 ?imageUrl0 WHERE { // { // SELECT ?eIri0 ?name0 ?lastMonthSalesValue0 WHERE { - // ?eIri0 rdf:type hs:ProductCard ; - // hs:name ?name0 ; - // hs:lastMonthSalesValue ?lastMonthSalesValue0 . + // ?eIri0 rdf:type iot:ProductCard ; + // iot:name ?name0 ; + // iot:lastMonthSalesValue ?lastMonthSalesValue0 . // } // ORDER BY DESC(?lastMonthSalesValue0) // LIMIT 2 // } - // OPTIONAL { ?eIri0 hs:imageUrl ?imageUrl } + // OPTIONAL { ?eIri0 iot:imageUrl ?imageUrl } // } // } { - // ?eIri1 rdf:type hs:HSObservation ; - // hs:product ?eIri0 ; - // hs:parsedAt ?parsedAt1 ; - // hs:price ?price1 . + // ?eIri1 rdf:type iot:HSObservation ; + // iot:product ?eIri0 ; + // iot:parsedAt ?parsedAt1 ; + // iot:price ?price1 . // filter(?parsedAt1 >= "2021-07-01T00:00:00"^^xsd:dateTime) // } // } diff --git a/test/SparqlClientImplMock.ts b/test/SparqlClientImplMock.ts index 9410e22..c2d90e4 100644 --- a/test/SparqlClientImplMock.ts +++ b/test/SparqlClientImplMock.ts @@ -125,10 +125,6 @@ export class SparqlClientImplMock implements SparqlClient { return this.sparqlUpdateReturn; } - /** - * Удаляет все триплы в графе с заданным graph - * @param graph - */ async clearGraph(graph = 'null') { this.clearGraphParams = { graph, diff --git a/test/SparqlClientUpload.spec.ts b/test/SparqlClientUpload.spec.ts index 2666d95..98c12a4 100644 --- a/test/SparqlClientUpload.spec.ts +++ b/test/SparqlClientUpload.spec.ts @@ -51,7 +51,7 @@ describe('SparqlClientUpload', () => { await uploadFiles(client, [vocabsFiles[0]], rootFolder); await client.deleteRepository(rmRepositoryID); }); - it(`SparqlClient should upload 1 cpgu vocab`, async () => { + it(`SparqlClient should upload 1 classifier vocab`, async () => { rmRepositoryID = genTimestampedName('test_SparqlClientUpload'); await client.createRepository( { diff --git a/test/SparqlGen.spec.ts b/test/SparqlGen.spec.ts index 0fdd568..5b6faa0 100644 --- a/test/SparqlGen.spec.ts +++ b/test/SparqlGen.spec.ts @@ -34,7 +34,7 @@ jest.setTimeout(500000); const SchemaWithoutArrayProperties: JSONSchema6forRdf = { $schema: 'http://json-schema.org/draft-07/schema#', - //$id: 'http://cpgu.kbpm.ru/ns/rm/rdf#PropertyShapeWithoutArrayProperties', + //$id: 'https://agentlab.eu/ns/rm/rdf#PropertyShapeWithoutArrayProperties', '@id': 'rm:PropertyShapeWithoutArrayProperties', '@type': 'sh:NodeShape', targetClass: 'sh:PropertyShape', @@ -50,15 +50,15 @@ const SchemaWithoutArrayProperties: JSONSchema6forRdf = { format: 'iri', }, path: { - title: 'Путь', + title: 'Path', type: 'object', }, name: { - title: 'Название', + title: 'Name', type: 'string', }, minCount: { - title: 'Минимальный предел', + title: 'Min Count', type: 'integer', }, }, @@ -88,8 +88,8 @@ describe('SchemaWithoutArrayProperties', () => { { schema: SchemaWithoutArrayProperties, conditions: { - path: 'cpgu:fileName', - name: 'Название', + path: 'clss:fileName', + name: 'File Name', minCount: 1, }, }, @@ -97,11 +97,11 @@ describe('SchemaWithoutArrayProperties', () => { }, `PREFIX rdf: PREFIX sh: - PREFIX cpgu: + PREFIX clss: SELECT ?eIri0 WHERE { ?eIri0 rdf:type sh:PropertyShape; - sh:path cpgu:fileName; - sh:name "Название"; + sh:path clss:fileName; + sh:name "File Name"; sh:minCount 1. }`, )); @@ -113,7 +113,7 @@ describe('SchemaWithoutArrayProperties', () => { { schema: SchemaWithoutArrayProperties, conditions: { - '@_id': 'file:///urn-s2-iisvvt-infosystems-classifier-45950.xml', + '@_id': 'file:///myfile.xml', }, }, ], @@ -121,10 +121,10 @@ describe('SchemaWithoutArrayProperties', () => { `PREFIX rdf: PREFIX sh: SELECT ?path0 ?name0 ?minCount0 WHERE { - rdf:type sh:PropertyShape; + rdf:type sh:PropertyShape; sh:path ?path0. - OPTIONAL { sh:name ?name0. } - OPTIONAL { sh:minCount ?minCount0. } + OPTIONAL { sh:name ?name0. } + OPTIONAL { sh:minCount ?minCount0. } }`, )); @@ -135,7 +135,7 @@ describe('SchemaWithoutArrayProperties', () => { { schema: SchemaWithoutArrayProperties, conditions: { - '@_id': 'file:///urn-s2-iisvvt-infosystems-classifier-45950.xml', + '@_id': 'file:///myfile.xml', }, variables: { path: null, @@ -147,9 +147,9 @@ describe('SchemaWithoutArrayProperties', () => { `PREFIX rdf: PREFIX sh: SELECT ?path0 ?name0 WHERE { - rdf:type sh:PropertyShape; + rdf:type sh:PropertyShape; sh:path ?path0. - sh:name ?name0. + sh:name ?name0. }`, )); @@ -169,7 +169,7 @@ describe('SchemaWithoutArrayProperties', () => { }, `PREFIX rdf: PREFIX dcterms: - PREFIX rm: + PREFIX rm: SELECT ?identifier0 WHERE { ?eIri0 rdf:type rm:Artifact. ?eIri0 dcterms:identifier ?identifier0. @@ -263,7 +263,7 @@ const usedInModuleCollConstrJs: any = { { schema: usedInModuleSchema, conditions: { - object: 'file:///urn-s2-iisvvt-infosystems-classifier-45950.xml', + object: 'file:///myfile.xml', subject: '?eIri1', }, }, @@ -318,12 +318,12 @@ describe('ArtifactsInModules', () => { PREFIX rdf: PREFIX dcterms: PREFIX oslc: - PREFIX nav: - PREFIX rm: - PREFIX rmUserTypes: + PREFIX nav: + PREFIX rm: + PREFIX rmUserTypes: SELECT ?eIri0 ?creator0 ?created0 ?modifiedBy0 ?modified0 ?processArea0 ?parentBinding0 ?depth0 ?bookOrder0 ?sectionNumber0 ?isHeading0 ?eIri1 ?identifier1 ?title1 ?description1 ?creator1 ?created1 ?modifiedBy1 ?modified1 ?processArea1 ?assetFolder1 ?artifactFormat1 ?hasChild1 ?type1 WHERE { ?eIri0 rdf:type rmUserTypes:UsedInModule; - rdf:object ; + rdf:object ; rdf:subject ?eIri1; rmUserTypes:parentBinding ?parentBinding0; rmUserTypes:depth ?depth0; @@ -379,8 +379,8 @@ describe('ArtifactSchema', () => { PREFIX rdf: PREFIX dcterms: PREFIX oslc: - PREFIX nav: - PREFIX rm: + PREFIX nav: + PREFIX rm: SELECT DISTINCT ?eIri0 ?identifier0 ?title0 ?description0 ?creator0 ?created0 ?modifiedBy0 ?modified0 ?processArea0 ?assetFolder0 ?artifactFormat0 ?type0 WHERE { ?eIri0 dcterms:title ?title0. ?eIri0 rdf:type ?type0. @@ -424,7 +424,7 @@ describe('ArtifactSchema', () => { `PREFIX rdfs: PREFIX rdf: PREFIX dcterms: - PREFIX rm: + PREFIX rm: SELECT DISTINCT ?identifier0 WHERE { ?eIri0 dcterms:identifier ?identifier0. ?eIri0 rdf:type ?type0. @@ -466,7 +466,7 @@ describe('constructObjectsQuery', () => { `PREFIX rdf: PREFIX dcterms: PREFIX sh: - PREFIX rm: + PREFIX rm: CONSTRUCT { ?eIri0 rdf:type sh:NodeShape. ?eIri0 sh:property ?eIri1. @@ -523,7 +523,7 @@ describe('constructObjectsQuery', () => { it('construct one Classifier schema should generate correctly', async () => { //repository.schemas.addSchema(SchemaWithArrayProperty); - const targetClass = 'cpgu:Classifier'; + const targetClass = 'clss:Classifier'; await constructTestHelper( { entConstrs: [ @@ -543,8 +543,8 @@ describe('constructObjectsQuery', () => { `PREFIX rdf: PREFIX dcterms: PREFIX sh: - PREFIX rm: - PREFIX cpgu: + PREFIX rm: + PREFIX clss: CONSTRUCT { ?eIri0 rdf:type sh:NodeShape. ?eIri0 sh:property ?eIri1. @@ -606,13 +606,13 @@ describe('constructObjectsQuery', () => { PREFIX rdf: PREFIX dcterms: PREFIX oslc: - PREFIX nav: - PREFIX rm: - PREFIX rmUserTypes: + PREFIX nav: + PREFIX rm: + PREFIX rmUserTypes: CONSTRUCT { ?eIri0 rdf:type rmUserTypes:UsedInModule. ?eIri0 rdf:subject ?eIri1. - ?eIri0 rdf:object . + ?eIri0 rdf:object . ?eIri0 dcterms:creator ?creator0. ?eIri0 dcterms:created ?created0. ?eIri0 oslc:modifiedBy ?modifiedBy0. @@ -639,7 +639,7 @@ describe('constructObjectsQuery', () => { } WHERE { ?eIri0 rdf:type rmUserTypes:UsedInModule; - rdf:object ; + rdf:object ; rmUserTypes:parentBinding ?parentBinding0; rmUserTypes:depth ?depth0; rmUserTypes:bookOrder ?bookOrder0; @@ -687,7 +687,7 @@ describe('constructObjectsQuery', () => { { schema: HSObservationShapeSchema, conditions: { - product: 'https://www.wildberries.ru/catalog/10322023/detail.aspx', + product: 'https://www.acme.com/catalog/10322023/detail.aspx', parsedAt: { relation: 'after', value: ['2021-07-01T00:00:00'], @@ -704,22 +704,22 @@ describe('constructObjectsQuery', () => { //console.log(genQueryStr); const correctQuery = `PREFIX rdf: PREFIX xsd: - PREFIX hs: + PREFIX iot: CONSTRUCT { - ?eIri0 rdf:type hs:HSObservation ; - hs:product ; - hs:parsedAt ?parsedAt0 ; - hs:price ?price0 ; - hs:totalSales ?totalSales0 ; - hs:categoryPopularity ?categoryPopularity0 . + ?eIri0 rdf:type iot:HSObservation ; + iot:product ; + iot:parsedAt ?parsedAt0 ; + iot:price ?price0 ; + iot:totalSales ?totalSales0 ; + iot:categoryPopularity ?categoryPopularity0 . } WHERE { - ?eIri0 rdf:type hs:HSObservation ; - hs:product ; - hs:parsedAt ?parsedAt0 ; - hs:totalSales ?totalSales0 . + ?eIri0 rdf:type iot:HSObservation ; + iot:product ; + iot:parsedAt ?parsedAt0 ; + iot:totalSales ?totalSales0 . filter(?parsedAt0 >= "2021-07-01T00:00:00"^^xsd:dateTime) - OPTIONAL { ?eIri0 hs:price ?price0. } - OPTIONAL { ?eIri0 hs:categoryPopularity ?categoryPopularity0. } + OPTIONAL { ?eIri0 iot:price ?price0. } + OPTIONAL { ?eIri0 iot:categoryPopularity ?categoryPopularity0. } } ORDER BY (?parsedAt0)`; const parser = new Parser(); @@ -734,7 +734,7 @@ describe('constructObjectsQuery', () => { { schema: HSObservationShapeSchema, conditions: { - product: 'https://www.wildberries.ru/catalog/10477067/detail.aspx', + product: 'https://www.acme.com/catalog/10477067/detail.aspx', parsedAt: { relation: 'before', value: ['2021-07-01T00:00:00'], @@ -752,23 +752,23 @@ describe('constructObjectsQuery', () => { //console.log(genQueryStr); const correctQuery = `PREFIX rdf: PREFIX xsd: - PREFIX hs: + PREFIX iot: CONSTRUCT { - ?eIri0 rdf:type hs:HSObservation ; - hs:product ; - hs:parsedAt ?parsedAt0 ; - hs:price ?price0 ; - hs:totalSales ?totalSales0 ; - hs:categoryPopularity ?categoryPopularity0 . + ?eIri0 rdf:type iot:HSObservation ; + iot:product ; + iot:parsedAt ?parsedAt0 ; + iot:price ?price0 ; + iot:totalSales ?totalSales0 ; + iot:categoryPopularity ?categoryPopularity0 . } WHERE { SERVICE { - ?eIri0 rdf:type hs:HSObservation ; - hs:product ; - hs:parsedAt ?parsedAt0 ; - hs:totalSales ?totalSales0 . + ?eIri0 rdf:type iot:HSObservation ; + iot:product ; + iot:parsedAt ?parsedAt0 ; + iot:totalSales ?totalSales0 . FILTER(?parsedAt0 <= "2021-07-01T00:00:00"^^xsd:dateTime) - OPTIONAL{ ?eIri0 hs:price ?price0 . } - OPTIONAL{ ?eIri0 hs:categoryPopularity ?categoryPopularity0 . } + OPTIONAL{ ?eIri0 iot:price ?price0 . } + OPTIONAL{ ?eIri0 iot:categoryPopularity ?categoryPopularity0 . } } } ORDER BY (?parsedAt0)`; @@ -785,7 +785,7 @@ describe('constructObjectsQuery', () => { schema: ProductCardShapeSchema, conditions: { '@id': 'mktp:ProductCards_in_Category_Coll_Ent0_con', - seller: 'https://www.example.ru', + seller: 'https://www.acme.com', }, orderBy: [{ expression: factory.variable('lastMonthSalesValue0'), descending: true }], limit: 2, @@ -798,32 +798,32 @@ describe('constructObjectsQuery', () => { const genQueryStr = client.sparqlConstructParams.query; //console.log(genQueryStr); const correctQuery = `PREFIX rdf: - PREFIX hs: + PREFIX iot: CONSTRUCT { - ?eIri0 rdf:type hs:ProductCard. - ?eIri0 hs:seller . - ?eIri0 hs:name ?name0. - ?eIri0 hs:lastMonthSalesValue ?lastMonthSalesValue0. - ?eIri0 hs:saleValue ?saleValue0. - ?eIri0 hs:brand ?brand0. - ?eIri0 hs:imageUrl ?imageUrl0. + ?eIri0 rdf:type iot:ProductCard. + ?eIri0 iot:seller . + ?eIri0 iot:name ?name0. + ?eIri0 iot:lastMonthSalesValue ?lastMonthSalesValue0. + ?eIri0 iot:saleValue ?saleValue0. + ?eIri0 iot:brand ?brand0. + ?eIri0 iot:imageUrl ?imageUrl0. } WHERE { { SELECT ?eIri0 ?name0 ?lastMonthSalesValue0 ?saleValue0 ?brand0 ?imageUrl0 WHERE { { SELECT ?eIri0 ?name0 ?lastMonthSalesValue0 ?saleValue0 ?brand0 WHERE { - ?eIri0 rdf:type hs:ProductCard; - hs:seller ; - hs:name ?name0; - hs:lastMonthSalesValue ?lastMonthSalesValue0 . - OPTIONAL { ?eIri0 hs:saleValue ?saleValue0. } - OPTIONAL { ?eIri0 hs:brand ?brand0. } + ?eIri0 rdf:type iot:ProductCard; + iot:seller ; + iot:name ?name0; + iot:lastMonthSalesValue ?lastMonthSalesValue0 . + OPTIONAL { ?eIri0 iot:saleValue ?saleValue0. } + OPTIONAL { ?eIri0 iot:brand ?brand0. } } ORDER BY DESC (?lastMonthSalesValue0) LIMIT 2 } - OPTIONAL { ?eIri0 hs:imageUrl ?imageUrl0. } + OPTIONAL { ?eIri0 iot:imageUrl ?imageUrl0. } } } }`; @@ -865,46 +865,46 @@ describe('constructObjectsQuery', () => { //console.log(genQueryStr); const correctQuery = `PREFIX rdf: PREFIX xsd: - PREFIX hs: + PREFIX iot: CONSTRUCT { - ?eIri0 rdf:type hs:ProductCard . - ?eIri0 hs:name ?name0 . - ?eIri0 hs:lastMonthSalesValue ?lastMonthSalesValue0 . - ?eIri0 hs:saleValue ?saleValue0 . - ?eIri0 hs:brand ?brand0 . - ?eIri0 hs:seller ?seller0 . - ?eIri0 hs:imageUrl ?imageUrl0 . - ?eIri1 rdf:type hs:HSObservation . - ?eIri1 hs:product ?eIri0 . - ?eIri1 hs:parsedAt ?parsedAt1 . - ?eIri1 hs:price ?price1 . - ?eIri1 hs:totalSales ?totalSales1. - ?eIri1 hs:categoryPopularity ?categoryPopularity1. + ?eIri0 rdf:type iot:ProductCard . + ?eIri0 iot:name ?name0 . + ?eIri0 iot:lastMonthSalesValue ?lastMonthSalesValue0 . + ?eIri0 iot:saleValue ?saleValue0 . + ?eIri0 iot:brand ?brand0 . + ?eIri0 iot:seller ?seller0 . + ?eIri0 iot:imageUrl ?imageUrl0 . + ?eIri1 rdf:type iot:HSObservation . + ?eIri1 iot:product ?eIri0 . + ?eIri1 iot:parsedAt ?parsedAt1 . + ?eIri1 iot:price ?price1 . + ?eIri1 iot:totalSales ?totalSales1. + ?eIri1 iot:categoryPopularity ?categoryPopularity1. } WHERE { { SELECT ?eIri0 ?name0 ?lastMonthSalesValue0 ?saleValue0 ?brand0 ?seller0 ?imageUrl0 WHERE { { SELECT ?eIri0 ?name0 ?lastMonthSalesValue0 ?saleValue0 ?brand0 ?seller0 WHERE { - ?eIri0 rdf:type hs:ProductCard ; - hs:name ?name0 ; - hs:lastMonthSalesValue ?lastMonthSalesValue0 ; - hs:seller ?seller0. - OPTIONAL { ?eIri0 hs:saleValue ?saleValue0. } - OPTIONAL { ?eIri0 hs:brand ?brand0. } + ?eIri0 rdf:type iot:ProductCard ; + iot:name ?name0 ; + iot:lastMonthSalesValue ?lastMonthSalesValue0 ; + iot:seller ?seller0. + OPTIONAL { ?eIri0 iot:saleValue ?saleValue0. } + OPTIONAL { ?eIri0 iot:brand ?brand0. } } ORDER BY DESC(?lastMonthSalesValue0) LIMIT 2 } - OPTIONAL { ?eIri0 hs:imageUrl ?imageUrl0. } + OPTIONAL { ?eIri0 iot:imageUrl ?imageUrl0. } } } . { - ?eIri1 rdf:type hs:HSObservation ; - hs:product ?eIri0 ; - hs:parsedAt ?parsedAt1 ; - hs:totalSales ?totalSales1 . + ?eIri1 rdf:type iot:HSObservation ; + iot:product ?eIri0 ; + iot:parsedAt ?parsedAt1 ; + iot:totalSales ?totalSales1 . FILTER(?parsedAt1 >= "2021-07-01T00:00:00"^^xsd:dateTime) - OPTIONAL { ?eIri1 hs:price ?price1. } - OPTIONAL { ?eIri1 hs:categoryPopularity ?categoryPopularity1. } + OPTIONAL { ?eIri1 iot:price ?price1. } + OPTIONAL { ?eIri1 iot:categoryPopularity ?categoryPopularity1. } } } ORDER BY DESC(?lastMonthSalesValue0) ?parsedAt1`; @@ -953,29 +953,29 @@ describe('constructObjectsQuery', () => { console.log(genQueryStr); const correctQuery = `PREFIX rdf: PREFIX xsd: - PREFIX hs: + PREFIX iot: CONSTRUCT { - ?eIri0 rdf:type hs:ProductCard . - ?eIri0 hs:name ?name0 . - ?eIri0 hs:lastMonthSalesValue ?lastMonthSalesValue0 . - ?eIri1 rdf:type hs:HSObservation . - ?eIri1 hs:product ?eIri0 . - ?eIri1 hs:parsedAt ?parsedAt1 . - ?eIri1 hs:price ?price1 . + ?eIri0 rdf:type iot:ProductCard . + ?eIri0 iot:name ?name0 . + ?eIri0 iot:lastMonthSalesValue ?lastMonthSalesValue0 . + ?eIri1 rdf:type iot:HSObservation . + ?eIri1 iot:product ?eIri0 . + ?eIri1 iot:parsedAt ?parsedAt1 . + ?eIri1 iot:price ?price1 . } WHERE { { SELECT ?eIri0 ?name0 ?lastMonthSalesValue0 WHERE { - ?eIri0 rdf:type hs:ProductCard ; - hs:name ?name0 ; - hs:lastMonthSalesValue ?lastMonthSalesValue0 . + ?eIri0 rdf:type iot:ProductCard ; + iot:name ?name0 ; + iot:lastMonthSalesValue ?lastMonthSalesValue0 . } ORDER BY DESC(?lastMonthSalesValue0) LIMIT 2 } . { - ?eIri1 rdf:type hs:HSObservation ; - hs:product ?eIri0 ; - hs:parsedAt ?parsedAt1 ; - hs:price ?price1 . + ?eIri1 rdf:type iot:HSObservation ; + iot:product ?eIri0 ; + iot:parsedAt ?parsedAt1 ; + iot:price ?price1 . filter(?parsedAt1 >= "2021-07-01T00:00:00"^^xsd:dateTime) } } @@ -998,13 +998,13 @@ describe('deleteObjectQuery', () => { ], }, { - '@_id': 'file:///urn-s2-iisvvt-infosystems-classifier-45950.xml', + '@_id': 'file:///myfile.xml', }, `PREFIX rdf: - PREFIX rm: - DELETE { ?p0 ?o0 } + PREFIX rm: + DELETE { ?p0 ?o0 } WHERE { - rdf:type rm:Artifact; + rdf:type rm:Artifact; ?p0 ?o0. }`, )); @@ -1024,7 +1024,7 @@ describe('deleteObjectQuery', () => { }, `PREFIX rdf: PREFIX dcterms: - PREFIX rm: + PREFIX rm: DELETE { ?eIri0 ?p0 ?o0 } WHERE { ?eIri0 rdf:type rm:Artifact; @@ -1045,7 +1045,7 @@ describe('deleteObjectQuery', () => { }, undefined, `PREFIX rdf: - PREFIX rm: + PREFIX rm: DELETE { ?eIri0 ?p0 ?o0 } WHERE { ?eIri0 rdf:type rm:Artifact; @@ -1067,17 +1067,17 @@ describe('insertObjectQuery', () => { { // screened with '_' to distinguish from Condition object @id '@_id': 'file:///urn-45952.xml', - creator: 'users:amivanoff', + creator: 'users:user1', created: '1970-01-01T00:00:00-02:00', }, `PREFIX rdf: PREFIX xsd: PREFIX dcterms: - PREFIX rm: - PREFIX users: + PREFIX rm: + PREFIX users: INSERT DATA { rdf:type rm:Artifact; - dcterms:creator users:amivanoff; + dcterms:creator users:user1; dcterms:created "1970-01-01T00:00:00-02:00"^^xsd:dateTime. }`, )); @@ -1099,14 +1099,14 @@ describe('updateObjectQuery', () => { { title: 'title', modified: '2019-08-07T05:21:43.581Z', - modifiedBy: 'users:amivanoff', + modifiedBy: 'users:user1', }, `PREFIX rdf: PREFIX xsd: PREFIX dcterms: PREFIX oslc: - PREFIX rm: - PREFIX users: + PREFIX rm: + PREFIX users: DELETE { ?eIri0 dcterms:title ?title0; dcterms:modified ?modified0; @@ -1115,7 +1115,7 @@ describe('updateObjectQuery', () => { INSERT { ?eIri0 dcterms:title "title"^^xsd:string; dcterms:modified "2019-08-07T05:21:43.581Z"^^xsd:dateTime; - oslc:modifiedBy users:amivanoff. + oslc:modifiedBy users:user1. } WHERE { ?eIri0 rdf:type rm:Artifact. @@ -1144,14 +1144,14 @@ describe('updateObjectQuery', () => { { title: 'title', modified: '2019-08-07T05:21:43.581Z', - modifiedBy: 'users:amivanoff', + modifiedBy: 'users:user1', }, `PREFIX rdf: PREFIX xsd: PREFIX dcterms: PREFIX oslc: - PREFIX rm: - PREFIX users: + PREFIX rm: + PREFIX users: DELETE { ${id} dcterms:title ?title0; dcterms:modified ?modified0; @@ -1160,7 +1160,7 @@ describe('updateObjectQuery', () => { INSERT { ${id} dcterms:title "title"^^xsd:string; dcterms:modified "2019-08-07T05:21:43.581Z"^^xsd:dateTime; - oslc:modifiedBy users:amivanoff. + oslc:modifiedBy users:user1. } WHERE { ${id} rdf:type rm:Artifact. diff --git a/test/SubQueries.spec.ts b/test/SubQueries.spec.ts index c6dc03c..d0cb0d6 100644 --- a/test/SubQueries.spec.ts +++ b/test/SubQueries.spec.ts @@ -34,19 +34,19 @@ import { expectToBeDefined, genTimestampedName } from './TestHelpers'; jest.setTimeout(50000); const client = new SparqlClientImpl( - 'https://rdf4j.agentlab.ru/rdf4j-server', - 'https://rdf4j.agentlab.ru/rdf4j-server/repositories/mktp-schema20/namespaces', + 'https://rdf4j.agentlab.eu/rdf4j-server', + 'https://rdf4j.agentlab.eu/rdf4j-server/repositories/mktp-schema20/namespaces', ); client.setRepositoryId('mktp-fed20'); describe.skip('SubQueries should work', () => { it('SubQueries ProductCards', async () => { const result = await client.sparqlSelect( - `PREFIX hs: + `PREFIX iot: SELECT ?card ?name ?lastMonthSalesValue WHERE { - ?card a hs:ProductCard ; - hs:name ?name ; - hs:lastMonthSalesValue ?lastMonthSalesValue . + ?card a iot:ProductCard ; + iot:name ?name ; + iot:lastMonthSalesValue ?lastMonthSalesValue . } ORDER BY DESC(?lastMonthSalesValue) LIMIT 20`, @@ -56,14 +56,14 @@ describe.skip('SubQueries should work', () => { }); it('SubQueries HSObservation1', async () => { const result = await client.sparqlSelect( - `PREFIX hs: + `PREFIX iot: SELECT DISTINCT ?obs ?parsedAt ?price ?saleValue ?totalSales WHERE { - ?obs a hs:HSObservation ; - hs:product ; - hs:parsedAt ?parsedAt ; - hs:price ?price ; - hs:saleValue ?saleValue ; - hs:totalSales ?totalSales . + ?obs a iot:HSObservation ; + iot:product ; + iot:parsedAt ?parsedAt ; + iot:price ?price ; + iot:saleValue ?saleValue ; + iot:totalSales ?totalSales . } ORDER BY ?parsedAt LIMIT 20`, @@ -73,14 +73,14 @@ describe.skip('SubQueries should work', () => { }); it('SubQueries HSObservation2', async () => { const result = await client.sparqlSelect( - `PREFIX hs: + `PREFIX iot: SELECT DISTINCT ?obs ?parsedAt ?price ?saleValue ?totalSales WHERE { - ?obs a hs:HSObservation ; - hs:product ; - hs:parsedAt ?parsedAt ; - hs:price ?price ; - hs:saleValue ?saleValue ; - hs:totalSales ?totalSales . + ?obs a iot:HSObservation ; + iot:product ; + iot:parsedAt ?parsedAt ; + iot:price ?price ; + iot:saleValue ?saleValue ; + iot:totalSales ?totalSales . filter(?parsedAt >= "2021-07-01T00:00:00"^^xsd:dateTime) } ORDER BY ?parsedAt @@ -91,20 +91,20 @@ describe.skip('SubQueries should work', () => { }); it('SubQueries HSObservation-of-ProductCards', async () => { const result = await client.sparqlSelect( - `PREFIX hs: + `PREFIX iot: PREFIX xsd: SELECT ?card ?name ?lastMonthSalesValue ?obs ?parsedAt ?price ?saleValue ?totalSales WHERE { - ?obs a hs:HSObservation ; - hs:product ?card ; - hs:parsedAt ?parsedAt ; - hs:price ?price ; - hs:saleValue ?saleValue ; - hs:totalSales ?totalSales . + ?obs a iot:HSObservation ; + iot:product ?card ; + iot:parsedAt ?parsedAt ; + iot:price ?price ; + iot:saleValue ?saleValue ; + iot:totalSales ?totalSales . { SELECT ?card ?name ?lastMonthSalesValue WHERE { - ?card a hs:ProductCard ; - hs:name ?name ; - hs:lastMonthSalesValue ?lastMonthSalesValue . + ?card a iot:ProductCard ; + iot:name ?name ; + iot:lastMonthSalesValue ?lastMonthSalesValue . } ORDER BY DESC(?lastMonthSalesValue) LIMIT 2 @@ -120,8 +120,8 @@ describe.skip('SubQueries should work', () => { describe.skip('Retrieve subqueries', () => { const client = new SparqlClientImpl( - 'https://rdf4j.agentlab.ru/rdf4j-server', - 'https://rdf4j.agentlab.ru/rdf4j-server/repositories/mktp-schema20/namespaces', + 'https://rdf4j.agentlab.eu/rdf4j-server', + 'https://rdf4j.agentlab.eu/rdf4j-server/repositories/mktp-schema20/namespaces', ); const repository = MstRepository.create({ ...rootModelInitialState, repId: 'mktp-fed20' }, { client }); @@ -172,7 +172,7 @@ describe.skip('Retrieve subqueries', () => { { schema: HSObservationShapeSchema, conditions: { - product: 'https://www.wildberries.ru/catalog/10322023/detail.aspx', + product: 'https://www.acme.com/catalog/10322023/detail.aspx', parsedAt: { relation: 'after', value: ['2021-07-01T00:00:00'], @@ -192,7 +192,7 @@ describe.skip('Retrieve subqueries', () => { }); it('should return ProductCardCardsListShape schema with reverse property', async () => { - let schema = await repository.schemas.loadSchemaByIri('hs:ProductCardCardsListShape'); + let schema = await repository.schemas.loadSchemaByIri('iot:ProductCardCardsListShape'); schema = getSnapshot(schema); expectToBeDefined(schema); }); @@ -202,7 +202,7 @@ describe.skip('Retrieve subqueries', () => { '@id': 'rm:collConstr1', entConstrs: [ { - schema: 'hs:ProductCardCardsListShape', + schema: 'iot:ProductCardCardsListShape', conditions: { hasObservations: '?eIri1', }, @@ -210,7 +210,7 @@ describe.skip('Retrieve subqueries', () => { limit: 2, }, { - schema: 'hs:HSObservationCardsListShape', + schema: 'iot:HSObservationCardsListShape', conditions: { parsedAt: { relation: 'after', diff --git a/test/config.ts b/test/config.ts index 743d09d..63b2b94 100644 --- a/test/config.ts +++ b/test/config.ts @@ -18,7 +18,7 @@ if (existsSync('.env.test.local')) { } /** - * Sparql Endpoint URL (адрес веб-сервиса) + * Sparql Endpoint URL */ export const rdfServerUrl = process.env.REACT_APP_SERVER_RDF_URL || 'http://localhost:8181/rdf4j-server'; export const rmRepositoryParam = JSON.parse(process.env.REACT_APP_RM_REPOSITORY_PARAM || '{}'); diff --git a/test/configTests.ts b/test/configTests.ts index 8a2324c..aace3e7 100644 --- a/test/configTests.ts +++ b/test/configTests.ts @@ -25,25 +25,25 @@ export const testNs: JsStrObj = { oslc_asset: 'http://open-services.net/ns/asset#', sh: 'http://www.w3.org/ns/shacl#', - acl: 'http://www.w3.org/ns/auth/acl#', + //acl: 'http://www.w3.org/ns/auth/acl#', ppo: 'http://vocab.deri.ie/ppo#', - pporoles: 'https://agentlab.ru/onto/ppo-roles#', - policies: 'http://cpgu.kbpm.ru/ns/rm/policies#', + pporoles: 'https://agentlab.eu/ns/rm/ppo-roles#', + //policies: 'https://agentlab.eu/ns/rm/policies#', - nav: 'http://cpgu.kbpm.ru/ns/rm/navigation#', - rm: 'http://cpgu.kbpm.ru/ns/rm/rdf#', - rmUserTypes: 'http://cpgu.kbpm.ru/ns/rm/user-types#', - cpgu: 'http://cpgu.kbpm.ru/ns/rm/cpgu#', + nav: 'https://agentlab.eu/ns/rm/navigation#', + rm: 'https://agentlab.eu/ns/rm/rdf#', + rmUserTypes: 'https://agentlab.eu/ns/rm/user-types#', + clss: 'https://agentlab.eu/ns/rm/classifier#', - users: 'http://cpgu.kbpm.ru/ns/rm/users#', - projects: 'http://cpgu.kbpm.ru/ns/rm/projects#', - folders: 'http://cpgu.kbpm.ru/ns/rm/folders#', - reqs: 'http://cpgu.kbpm.ru/ns/rm/reqs#', + users: 'https://agentlab.eu/ns/rm/users#', + projects: 'https://agentlab.eu/ns/rm/projects#', + folders: 'https://agentlab.eu/ns/rm/folders#', + reqs: 'https://agentlab.eu/ns/rm/reqs#', - hs: 'https://huntersales.ru/schema#', + iot: 'https://agentlab.eu/ns/iot#', }; -export const rootFolder = '../rdf-data-expert/'; +export const rootFolder = './test-data/'; export const vocabsFiles: FileUploadConfig[] = [ { @@ -58,10 +58,6 @@ export const vocabsFiles: FileUploadConfig[] = [ file: 'vocabs/xsd.ttl', baseURI: '', }, - { - file: 'vocabs/xsd-ru.ttl', - baseURI: '', - }, // deadlocks rdfs+dt //{ // file: 'vocabs/shacl.ttl', @@ -69,64 +65,64 @@ export const vocabsFiles: FileUploadConfig[] = [ //}, { file: 'vocabs/navigation.ttl', - baseURI: '', + baseURI: '', }, { file: 'vocabs/rm.ttl', - baseURI: '', + baseURI: '', }, { file: 'vocabs/rm-user-types.ttl', - baseURI: '', + baseURI: '', }, { - file: 'vocabs/cpgu.ttl', - baseURI: '', + file: 'vocabs/classifier.ttl', + baseURI: '', }, - { + /*{ file: 'vocabs/acl.ttl', baseURI: '', - }, + },*/ { file: 'vocabs/ppo.ttl', baseURI: '', }, { file: 'vocabs/ppo-roles.ttl', - baseURI: '', + baseURI: '', }, ]; export const shapesFiles: FileUploadConfig[] = [ { - file: 'shapes/shacl/ppo-roles-shapes.ttl', - baseURI: '', + file: 'shapes/ppo-roles-shapes.ttl', + baseURI: '', graph: '', }, // deadlocks rdfs+dt //{ - // file: 'shapes/shacl/shacl-shacl.ttl', + // file: 'shapes/shacl-shacl.ttl', // baseURI: '', // graph: '', //}, { - file: 'shapes/shacl/xsd-shapes.ttl', - baseURI: '', + file: 'shapes/xsd-shapes.ttl', + baseURI: '', graph: '', }, { - file: 'shapes/shacl/rm/rm-shapes.ttl', - baseURI: '', + file: 'shapes/rm-shapes.ttl', + baseURI: '', graph: '', }, { - file: 'shapes/shacl/rm/rm-user-types-shapes.ttl', - baseURI: '', + file: 'shapes/rm-user-types-shapes.ttl', + baseURI: '', graph: '', }, { - file: 'shapes/shacl/cpgu/cpgu-shapes.ttl', - baseURI: '', + file: 'shapes/classifier-shapes.ttl', + baseURI: '', graph: '', }, ]; @@ -134,32 +130,32 @@ export const shapesFiles: FileUploadConfig[] = [ export const usersFiles: FileUploadConfig[] = [ { file: 'data/users.ttl', - baseURI: '', + baseURI: '', }, - { + /*{ file: 'data/access-management.ttl', - baseURI: '', - }, + baseURI: '', + },*/ ]; export const projectsFoldersFiles: FileUploadConfig[] = [ { file: 'data/projects.ttl', - baseURI: '', + baseURI: '', }, { file: 'data/folders.ttl', - baseURI: '', + baseURI: '', }, ]; export const samplesFiles: FileUploadConfig[] = [ { - file: 'data/cpgu/sample-module.ttl', - baseURI: '', + file: 'data/sample-module.ttl', + baseURI: '', }, { - file: 'data/cpgu/sample-collection.ttl', - baseURI: '', + file: 'data/sample-collection.ttl', + baseURI: '', }, ]; diff --git a/test/schema/ArtifactShapeSchema.spec.ts b/test/schema/ArtifactShapeSchema.spec.ts index a4dd832..3ce4b6e 100644 --- a/test/schema/ArtifactShapeSchema.spec.ts +++ b/test/schema/ArtifactShapeSchema.spec.ts @@ -86,7 +86,7 @@ describe('classshape-scenario', () => { }); it('should retrieve 0 superclasses for root class from server', async () => { - const iri = 'rm:Artifact'; //'cpgu:Document'; + const iri = 'rm:Artifact'; //'clss:Document'; const collConstr = { entConstrs: [ { @@ -106,7 +106,7 @@ describe('classshape-scenario', () => { }); it('should retrieve 2 superclasses for sub-class from server', async () => { - const iri = 'cpgu:Document'; + const iri = 'clss:Document'; const collConstr = { entConstrs: [ { @@ -180,11 +180,11 @@ describe('classshape-scenario', () => { it('get all shape properties from 2 parent entConstrs with UTF-8', async () => { expect(repository.ns.current.size).toBeGreaterThan(4); // check first-time schema retrieving - await repository.schemas.loadSchemaByClassIri('cpgu:Группировка'); - const classifierSchema1 = repository.schemas.getOrLoadSchemaByClassIri('cpgu:Группировка'); + await repository.schemas.loadSchemaByClassIri('clss:Grouping'); + const classifierSchema1 = repository.schemas.getOrLoadSchemaByClassIri('clss:Grouping'); expect(classifierSchema1).toEqual(expect.anything()); // check cached schema retrieving - const classifierSchema2 = repository.schemas.getOrLoadSchemaByClassIri('cpgu:Группировка'); + const classifierSchema2 = repository.schemas.getOrLoadSchemaByClassIri('clss:Grouping'); expect(classifierSchema2).toEqual(expect.anything()); }); diff --git a/test/schema/TestSchemas.ts b/test/schema/TestSchemas.ts index 23b7bf9..840870e 100644 --- a/test/schema/TestSchemas.ts +++ b/test/schema/TestSchemas.ts @@ -15,11 +15,11 @@ export const moduleFormatUri = 'rmUserTypes:_YwcOsRmREemK5LEaKhoOow_Module'; export const artifactSchema: JSONSchema6forRdf = { $schema: 'http://json-schema.org/draft-07/schema#', - //$id: 'http://cpgu.kbpm.ru/ns/rm/rdf#ArtifactShape', + //$id: 'https://agentlab.eu/ns/rm/rdf#ArtifactShape', '@id': 'rm:ArtifactShape', '@type': 'sh:NodeShape', - title: 'Требование', - description: 'Тип ресурса', + title: 'Artifact', + description: 'Artifact', targetClass: 'rm:Artifact', type: 'object', '@context': { @@ -72,82 +72,82 @@ export const artifactSchema: JSONSchema6forRdf = { format: 'iri', }, '@type': { - title: 'Тип', + title: 'Class', type: 'string', format: 'iri', }, identifier: { - title: 'Идентификатор', - description: 'Числовой идентификатор требования, уникальный только в пределах этой системы', + title: 'Identifier', + description: 'Numeric identifier, unique within a system', type: 'integer', shapeModifiability: 'system', //valueModifiability: 'system', }, title: { - title: 'Название', - description: 'Краткое название требования', + title: 'Title', + description: 'Title', type: 'string', shapeModifiability: 'system', //valueModifiability: 'user', }, description: { - title: 'Описание', - description: 'Информация о требовании', + title: 'Description', + description: 'Description', type: 'string', shapeModifiability: 'system', //valueModifiability: 'user', }, creator: { - title: 'Кем создан', - description: 'Пользователь, создавший требование', + title: 'Creator', + description: 'An Agent, created an Artifact', type: 'string', format: 'iri', shapeModifiability: 'system', //valueModifiability: 'system', }, created: { - title: 'Когда создан', - description: 'Когда требование было создано', + title: 'Created', + description: 'When an Artifact was created', type: 'string', format: 'date-time', shapeModifiability: 'system', //valueModifiability: 'system', }, modifiedBy: { - title: 'Кем изменен', - description: 'Пользователь, изменивший требование', + title: 'Modified By', + description: 'An Agent, modified an Artifact', type: 'string', format: 'iri', shapeModifiability: 'system', //valueModifiability: 'system', }, modified: { - title: 'Когда изменен', - description: 'Когда требование было изменено', + title: 'Modified', + description: 'When an Artifact was modified', type: 'string', format: 'date-time', shapeModifiability: 'system', //valueModifiability: 'system', }, processArea: { - title: 'Проект', - description: 'Связано с проектной областью', + title: 'Process Area', + description: 'Process Area', type: 'string', format: 'iri', shapeModifiability: 'system', //valueModifiability: 'system', }, assetFolder: { - title: 'Папка', - description: 'Папка, содержащая требования', + title: 'Folder', + description: 'Asset folder', type: 'string', format: 'iri', shapeModifiability: 'system', //valueModifiability: 'user', }, artifactFormat: { - title: 'Формат', - description: 'Формат заполнения/отображения', + title: 'Format', + description: 'Artifact Format', type: 'string', format: 'iri', shapeModifiability: 'system', @@ -159,11 +159,11 @@ export const artifactSchema: JSONSchema6forRdf = { export const genericArtifactSchema: JSONSchema6forRdf = { $schema: 'http://json-schema.org/draft-07/schema#', - //$id: 'http://cpgu.kbpm.ru/ns/rm/cpgu#GenericArtifactShape', + //$id: 'https://agentlab.eu/ns/rm/classifier#GenericArtifactShape', allOf: [{ $ref: 'rm:ArtifactShape' }], - '@id': 'cpgu:GenericArtifactShape', + '@id': 'clss:GenericArtifactShape', '@type': 'sh:NodeShape', - targetClass: 'cpgu:GenericArtifact', + targetClass: 'clss:GenericArtifact', type: 'object', '@context': { alternative: { @@ -171,11 +171,11 @@ export const genericArtifactSchema: JSONSchema6forRdf = { '@type': 'xsd:string', }, uri: { - '@id': 'cpgu:uri', + '@id': 'clss:uri', '@type': '@id', }, status: { - '@id': 'cpgu:status', + '@id': 'clss:status', '@type': 'rmUserTypes:_YwrbNRmREemK5LEaKhoOow', }, abstract: { @@ -185,30 +185,29 @@ export const genericArtifactSchema: JSONSchema6forRdf = { }, properties: { alternative: { - title: 'alternative', + title: 'PropertyShape Alternative Name', type: 'string', shapeModifiability: 'user', //valueModifiability: 'user', }, uri: { - title: 'URI', - description: 'Задает идентификатор ресурса', + title: 'PropertyShape URI Name', + description: 'PropertyShape URI Description', type: 'string', format: 'iri', shapeModifiability: 'user', //valueModifiability: 'user', }, status: { - title: 'Статус', - description: - 'Определяет состояние ресурса в пакете. Позволяет, например, сообщить о том, что ресурс удален из системы', + title: 'PropertyShape Status Name', + description: 'PropertyShape Status Description', type: 'string', format: 'iri', shapeModifiability: 'user', //valueModifiability: 'user', }, abstract: { - title: 'abstract', + title: 'PropertyShape Abstract Name', type: 'string', shapeModifiability: 'user', //valueModifiability: 'user', @@ -218,18 +217,18 @@ export const genericArtifactSchema: JSONSchema6forRdf = { export const classifierSchema: JSONSchema6forRdf = { $schema: 'http://json-schema.org/draft-07/schema#', - //$id: 'http://cpgu.kbpm.ru/ns/rm/cpgu#ClassifierShape', - allOf: [{ $ref: 'cpgu:GenericArtifactShape' }], - '@id': 'cpgu:ClassifierShape', + //$id: 'https://agentlab.eu/ns/rm/classifier#ClassifierShape', + allOf: [{ $ref: 'clss:GenericArtifactShape' }], + '@id': 'clss:ClassifierShape', '@type': 'sh:NodeShape', - title: 'Классификатор', - description: 'Классификатор или справочник. Описывает структуру классификатора (не данные из него)', - targetClass: 'cpgu:Classifier', + title: 'RequirementClassShape Classifier Title', + description: 'RequirementClassShape Classifier Description', + targetClass: 'clss:Classifier', type: 'object', //inCreationMenu: true, - //defaultIndividNs: 'cpgu:', + //defaultIndividNs: 'clss:', //defaultFormat: 'rmUserTypes:_YwcOsRmREemK5LEaKhoOow_Module', - //iconReference: 'http://cpgu.kbpm.ru/ns/rm/images/use-case', + //iconReference: 'https://agentlab.eu/ns/rm/images/use-case', properties: {}, }; @@ -251,7 +250,7 @@ export const artifactShape: JsObject = { '@type': 'sh:NodeShape', //defaultFormat: undefined, //defaultIndividNs: undefined, - description: 'Тип ресурса', + description: 'Artifact', //iconReference: undefined, //inCreationMenu: undefined, property: [ @@ -260,10 +259,10 @@ export const artifactShape: JsObject = { '@type': 'sh:PropertyShape', //class: undefined, datatype: 'xsd:integer', - description: 'Числовой идентификатор требования, уникальный только в пределах этой системы', + description: 'Numeric identifier, unique within a system', maxCount: 1, //minCount: undefined, - name: 'Идентификатор', + name: 'Identifier', //nodeKind: undefined, order: 2, path: 'dcterms:identifier', @@ -275,10 +274,10 @@ export const artifactShape: JsObject = { '@type': 'sh:PropertyShape', //class: undefined, datatype: 'xsd:string', - description: 'Краткое название требования', + description: 'Title', maxCount: 1, minCount: 1, - name: 'Название', + name: 'Title', //nodeKind: undefined, order: 3, path: 'dcterms:title', @@ -290,10 +289,10 @@ export const artifactShape: JsObject = { '@type': 'sh:PropertyShape', //class: undefined, datatype: 'rdf:HTML', - description: 'Форматированный текст', + description: 'Formatted text', maxCount: 1, //minCount: undefined, - name: 'Форматированный текст', + name: 'Text', //nodeKind: undefined, order: 4, path: 'rm:xhtmlText', @@ -305,10 +304,10 @@ export const artifactShape: JsObject = { '@type': 'sh:PropertyShape', //class: undefined, datatype: 'xsd:string', - description: 'Информация о требовании', + description: 'Description', maxCount: 1, //minCount: undefined, - name: 'Описание', + name: 'Description', //nodeKind: undefined, order: 4, path: 'dcterms:description', @@ -320,10 +319,10 @@ export const artifactShape: JsObject = { '@type': 'sh:PropertyShape', class: 'pporoles:User', //datatype: undefined, - description: 'Пользователь, создавший требование', + description: 'An Agent, created an Artifact', maxCount: 1, //minCount: undefined, - name: 'Кем создан', + name: 'Creator', nodeKind: 'sh:BlankNodeOrIRI', order: 5, path: 'dcterms:creator', @@ -335,10 +334,10 @@ export const artifactShape: JsObject = { '@type': 'sh:PropertyShape', //class: undefined, datatype: 'xsd:dateTime', - description: 'Когда требование было создано', + description: 'When an Artifact was created', maxCount: 1, //minCount: undefined, - name: 'Когда создан', + name: 'Created', //nodeKind: undefined, order: 6, path: 'dcterms:created', @@ -350,10 +349,10 @@ export const artifactShape: JsObject = { '@type': 'sh:PropertyShape', class: 'pporoles:User', //datatype: undefined, - description: 'Пользователь, изменивший требование', + description: 'An Agent, modified an Artifact', maxCount: 1, //minCount: undefined, - name: 'Кем изменен', + name: 'Modified By', nodeKind: 'sh:BlankNodeOrIRI', order: 7, path: 'oslc:modifiedBy', @@ -365,10 +364,10 @@ export const artifactShape: JsObject = { '@type': 'sh:PropertyShape', //class: undefined, datatype: 'xsd:dateTime', - description: 'Когда требование было изменено', + description: 'When an Artifact was modified', maxCount: 1, //minCount: undefined, - name: 'Когда изменен', + name: 'Modified', //nodeKind: undefined, order: 8, path: 'dcterms:modified', @@ -380,10 +379,10 @@ export const artifactShape: JsObject = { '@type': 'sh:PropertyShape', class: 'nav:ProjectArea', //datatype: undefined, - description: 'Связано с проектной областью', + description: 'Process Area', maxCount: 1, minCount: 0, - name: 'Проект', + name: 'Process Area', nodeKind: 'sh:IRI', order: 9, path: 'nav:processArea', @@ -395,10 +394,10 @@ export const artifactShape: JsObject = { '@type': 'sh:PropertyShape', class: 'nav:folder', //datatype: undefined, - description: 'Папка, содержащая требования', + description: 'Asset folder', maxCount: 1, //minCount: undefined, - name: 'Папка', + name: 'Folder', nodeKind: 'sh:IRI', order: 10, path: 'rm:assetFolder', @@ -410,10 +409,10 @@ export const artifactShape: JsObject = { '@type': 'sh:PropertyShape', class: 'rmUserTypes:_YwcOsRmREemK5LEaKhoOow', //datatype: undefined, - description: 'Формат заполнения/отображения', + description: 'Artifact Format', maxCount: 1, //minCount: undefined, - name: 'Формат', + name: 'Format', nodeKind: 'sh:IRI', order: 11, path: 'rm:artifactFormat', @@ -422,17 +421,17 @@ export const artifactShape: JsObject = { }, ], targetClass: 'rm:Artifact', - title: 'Требование', + title: 'Artifact', }; export const linkSchema: JSONSchema6forRdf = { $schema: 'http://json-schema.org/draft-07/schema#', - //$id: 'http://cpgu.kbpm.ru/ns/rm/user-types#UsedInShape', + //$id: 'https://agentlab.eu/ns/rm/user-types#UsedInShape', '@id': 'rm:LinkShape', '@type': 'sh:NodeShape', type: 'object', - title: 'Тип связи', - description: 'Тип связи.', + title: 'Link', + description: 'Link.', targetClass: 'rm:Link', '@context': { '@type': 'rdf:type', @@ -472,43 +471,43 @@ export const linkSchema: JSONSchema6forRdf = { format: 'iri', }, '@type': { - title: 'Тип', + title: 'Class', type: 'string', format: 'iri', }, creator: { type: 'string', format: 'iri', - title: 'Кем создан', - description: 'Пользователь, создавший требование', + title: 'Creator', + description: 'An Agent, created an Artifact', shapeModifiability: 'system', }, created: { type: 'string', format: 'date-time', - title: 'Когда создан', - description: 'Когда требование было создано', + title: 'Created', + description: 'When an Artifact was created', shapeModifiability: 'system', }, modifiedBy: { type: 'string', format: 'iri', - title: 'Кем изменен', - description: 'Пользователь, изменивший требование', + title: 'Modified By', + description: 'An Agent, modified an Artifact', shapeModifiability: 'system', }, modified: { type: 'string', format: 'date-time', - title: 'Когда изменен', - description: 'Когда требование было изменено', + title: 'Modified', + description: 'When an Artifact was modified', shapeModifiability: 'system', }, processArea: { type: 'string', format: 'iri', - title: 'Проект', - description: 'Связано с проектной областью', + title: 'Process Area', + description: 'Process Area', shapeModifiability: 'system', }, object: { @@ -532,8 +531,8 @@ export const linkSchema: JSONSchema6forRdf = { export const usedInSchema: JSONSchema6forRdf = { ...linkSchema, '@id': 'rmUserTypes:UsedInShape', - title: 'Использование', - description: 'Собирает информацию о связях между требованиями.', + title: 'UsedIn Link', + description: 'Connects Artifacts in Collection.', targetClass: 'rmUserTypes:UsedIn', }; @@ -541,8 +540,8 @@ export const usedInModuleSchema: JSONSchema6forRdf = { ...usedInSchema, allOf: [{ $ref: 'rmUserTypes:UsedInShape' }], '@id': 'rmUserTypes:UsedInModuleShape', - title: 'Использование в модуле', - description: 'Собирает информацию о связях между требованиями в модуле.', + title: 'UsedInModule Link', + description: 'Connects Artifacts in Module.', targetClass: 'rmUserTypes:UsedInModule', '@context': { ...usedInSchema['@context'], @@ -578,26 +577,26 @@ export const usedInModuleSchema: JSONSchema6forRdf = { }, depth: { type: 'integer', - title: 'Вложенность', - description: 'Вложенность', + title: 'Depth', + description: 'Depth', shapeModifiability: 'system', }, bookOrder: { type: 'integer', - title: 'Порядок', - description: 'Порядок', + title: 'Book Order', + description: 'Book Order', shapeModifiability: 'system', }, sectionNumber: { type: 'string', - title: 'Номер раздела', - description: 'Номер раздела', + title: 'Section Number', + description: 'Section Number', shapeModifiability: 'system', }, isHeading: { type: 'boolean', - title: 'Это заголовок', - description: 'Это заголовок', + title: 'Is Heading', + description: 'Is Heading', shapeModifiability: 'system', }, }, @@ -608,36 +607,36 @@ export const { property: artifactShapeProperty, ...artifactShapeNoProperty } = a export const ProductCardShapeSchema: JSONSchema6forRdf = { $schema: 'http://json-schema.org/draft-07/schema#', - '@id': 'hs:ProductCardCardsShape', + '@id': 'iot:ProductCardCardsShape', '@type': 'sh:NodeShape', title: '', description: '', - targetClass: 'hs:ProductCard', + targetClass: 'iot:ProductCard', type: 'object', '@context': { '@type': 'rdf:type', name: { - '@id': 'hs:name', + '@id': 'iot:name', '@type': 'xsd:string', }, lastMonthSalesValue: { - '@id': 'hs:lastMonthSalesValue', + '@id': 'iot:lastMonthSalesValue', '@type': 'xsd:int', }, saleValue: { - '@id': 'hs:saleValue', + '@id': 'iot:saleValue', '@type': 'xsd:int', }, brand: { - '@id': 'hs:brand', - '@type': 'hs:Brand', + '@id': 'iot:brand', + '@type': 'iot:Brand', }, seller: { - '@id': 'hs:seller', - '@type': 'hs:Seller', + '@id': 'iot:seller', + '@type': 'iot:Seller', }, imageUrl: { - '@id': 'hs:imageUrl', + '@id': 'iot:imageUrl', '@type': '@id', }, }, @@ -648,7 +647,7 @@ export const ProductCardShapeSchema: JSONSchema6forRdf = { format: 'iri', }, '@type': { - title: 'Тип', + title: 'Class', type: 'string', format: 'iri', }, @@ -662,24 +661,24 @@ export const ProductCardShapeSchema: JSONSchema6forRdf = { }, // optional int saleValue: { - title: 'Размер скидки', + title: 'Sale Value', type: 'integer', }, // optional reference brand: { - title: 'Бренд товара', + title: 'Brand', type: 'string', format: 'iri', }, // mandatory ref seller: { - title: 'Продавец', + title: 'Seller', type: 'string', format: 'iri', }, // optional array imageUrl: { - title: 'Изображение товара', + title: 'Image URL', type: 'array', items: { type: 'string', @@ -692,31 +691,31 @@ export const ProductCardShapeSchema: JSONSchema6forRdf = { export const HSObservationShapeSchema: JSONSchema6forRdf = { $schema: 'http://json-schema.org/draft-07/schema#', - '@id': 'hs:HSObservationCardsShape', + '@id': 'iot:HSObservationCardsShape', '@type': 'sh:NodeShape', title: '', description: '', - targetClass: 'hs:HSObservation', + targetClass: 'iot:HSObservation', type: 'object', '@context': { '@type': 'rdf:type', product: { - '@id': 'hs:product', + '@id': 'iot:product', }, parsedAt: { - '@id': 'hs:parsedAt', + '@id': 'iot:parsedAt', '@type': 'xsd:dateTime', }, price: { - '@id': 'hs:price', + '@id': 'iot:price', '@type': 'xsd:int', }, totalSales: { - '@id': 'hs:totalSales', + '@id': 'iot:totalSales', '@type': 'xsd:int', }, categoryPopularity: { - '@id': 'hs:categoryPopularity', + '@id': 'iot:categoryPopularity', '@type': 'xsd:double', }, }, @@ -727,7 +726,7 @@ export const HSObservationShapeSchema: JSONSchema6forRdf = { format: 'iri', }, '@type': { - title: 'Тип', + title: 'Class', type: 'string', format: 'iri', }, @@ -756,35 +755,35 @@ export const HSObservationShapeSchema: JSONSchema6forRdf = { export const ProductCardShapeSchemaForCardsList: JSONSchema6forRdf = { $schema: 'http://json-schema.org/draft-07/schema#', - '@id': 'hs:ProductCardShapeForCardsList', + '@id': 'iot:ProductCardShapeForCardsList', '@type': 'sh:NodeShape', title: '', description: '', - targetClass: 'hs:ProductCard', + targetClass: 'iot:ProductCard', type: 'object', '@context': { '@type': 'rdf:type', name: { - '@id': 'hs:name', + '@id': 'iot:name', '@type': 'xsd:string', }, lastMonthSalesValue: { - '@id': 'hs:lastMonthSalesValue', + '@id': 'iot:lastMonthSalesValue', '@type': 'xsd:int', }, hasObservations: { - '@reverse': 'hs:product', + '@reverse': 'iot:product', }, saleValue: { - '@id': 'hs:saleValue', + '@id': 'iot:saleValue', '@type': 'xsd:int', }, seller: { - '@id': 'hs:seller', - '@type': 'hs:Seller', + '@id': 'iot:seller', + '@type': 'iot:Seller', }, imageUrl: { - '@id': 'hs:imageUrl', + '@id': 'iot:imageUrl', '@type': '@id', }, }, @@ -795,7 +794,7 @@ export const ProductCardShapeSchemaForCardsList: JSONSchema6forRdf = { format: 'iri', }, '@type': { - title: 'Тип', + title: 'Class', type: 'string', format: 'iri', }, @@ -814,18 +813,18 @@ export const ProductCardShapeSchemaForCardsList: JSONSchema6forRdf = { }, // optional int saleValue: { - title: 'Размер скидки', + title: 'Sale Value', type: 'integer', }, // optional reference seller: { - title: 'Продавец', + title: 'Seller', type: 'string', format: 'iri', }, // array imageUrl: { - title: 'Изображение товара', + title: 'Image URL', type: 'array', items: { type: 'string', @@ -838,20 +837,20 @@ export const ProductCardShapeSchemaForCardsList: JSONSchema6forRdf = { export const HSObservationShapeSchemaForCardsList: JSONSchema6forRdf = { $schema: 'http://json-schema.org/draft-07/schema#', - '@id': 'hs:HSObservationShapeForCardsList', + '@id': 'iot:HSObservationShapeForCardsList', '@type': 'sh:NodeShape', title: '', description: '', - targetClass: 'hs:HSObservation', + targetClass: 'iot:HSObservation', type: 'object', '@context': { '@type': 'rdf:type', parsedAt: { - '@id': 'hs:parsedAt', + '@id': 'iot:parsedAt', '@type': 'xsd:dateTime', }, price: { - '@id': 'hs:price', + '@id': 'iot:price', '@type': 'xsd:int', }, }, @@ -862,7 +861,7 @@ export const HSObservationShapeSchemaForCardsList: JSONSchema6forRdf = { format: 'iri', }, '@type': { - title: 'Тип', + title: 'Class', type: 'string', format: 'iri', },