From 1beb19234241d09318f2a8400c63461ac422b5ca Mon Sep 17 00:00:00 2001 From: Balduin Landolt <33053745+BalduinLandolt@users.noreply.github.com> Date: Tue, 2 Apr 2024 15:50:38 +0200 Subject: [PATCH] feat!: Remove isSequenceOf and instead add Segment to DSP-API (DEV-3326) (#3083) --- docs/01-introduction/example-project.md | 3 - docs/02-dsp-ontologies/knora-base.md | 17 +- docs/03-endpoints/api-admin/projects.md | 6 +- .../domain/class-and-property-hierarchies.md | 8 - .../scala/org/knora/webapi/E2EZSpec.scala | 18 +- .../e2e/v2/OntologyFormatsE2ESpec.scala | 20 +- .../webapi/e2e/v2/OntologyV2R2RSpec.scala | 302 - .../e2e/v2/ResourcesRouteV2E2ESpec.scala | 191 - .../webapi/e2ez/KnoraBaseJsonModels.scala | 151 + .../knora/webapi/e2ez/SegmentE2EZSpec.scala | 422 ++ .../v2/OntologyResponderV2Spec.scala | 170 - .../anythingOntologySimple.jsonld | 120 - .../anythingOntologyWithValueObjects.jsonld | 346 -- .../anythingOntologyWithValueObjects.ttl | 5120 ++++++++++------- .../knoraApiOntologySimple.jsonld | 269 +- .../knoraApiOntologyWithValueObjects.jsonld | 660 ++- test_data/project_data/anything-data.ttl | 88 - test_data/project_data/sequences-data.ttl | 96 - .../project_ontologies/anything-onto.ttl | 37 - .../project_ontologies/sequences-onto.ttl | 118 - webapi/scripts/fuseki-init-knora-test.sh | 2 - .../resources/knora-ontologies/knora-base.ttl | 184 +- .../webapi/messages/OntologyConstants.scala | 43 +- .../main/scala/org/knora/webapi/package.scala | 2 +- .../v2/ontology/OntologyHelpers.scala | 8 +- .../upgrade/RepositoryUpdatePlan.scala | 1 + 26 files changed, 4842 insertions(+), 3560 deletions(-) create mode 100644 integration/src/test/scala/org/knora/webapi/e2ez/KnoraBaseJsonModels.scala create mode 100644 integration/src/test/scala/org/knora/webapi/e2ez/SegmentE2EZSpec.scala delete mode 100644 test_data/project_data/sequences-data.ttl delete mode 100644 test_data/project_ontologies/sequences-onto.ttl diff --git a/docs/01-introduction/example-project.md b/docs/01-introduction/example-project.md index 656df199cf..97b250a5e7 100644 --- a/docs/01-introduction/example-project.md +++ b/docs/01-introduction/example-project.md @@ -28,9 +28,6 @@ project from scratch, you can adapt these scripts to import your ontology (and any existing RDF data) into your triplestore for use with DSP-API. -The syntax of Turtle is fairly simple: it is basically a sequence of -triples. We will consider some details of Turtle syntax as we go along. - ## The Incunabula Ontology Here we will just focus on some of the main aspects of the ontology. An diff --git a/docs/02-dsp-ontologies/knora-base.md b/docs/02-dsp-ontologies/knora-base.md index 5ff7188a55..acbaff7921 100644 --- a/docs/02-dsp-ontologies/knora-base.md +++ b/docs/02-dsp-ontologies/knora-base.md @@ -451,7 +451,7 @@ would refer to that property in general, not to any particular instance in which particular resources. To attach metadata to a specific link in RDF, it is necessary to create an RDF "reification". A reification makes statements about a particular triple (subject, predicate, object), in this case the triple that expresses the link between the resources. DSP-API uses reifications of type `kb:LinkValue` (described in -[LinkValue](#linkvalue) to store metadata about links. +[LinkValue](#linkvalue)) to store metadata about links. For example, suppose a project describes paintings that belong to collections. The project can define an ontology as follows (expressed here in [Turtle](http://www.w3.org/TR/turtle/) format, and simplified for the purposes of @@ -587,21 +587,6 @@ is part of another resource needs to have a property `kb:seqnum` or a subpropert client can then use this information to leaf through the parts of the compound resource (p.ex. to leaf through the pages of a book like in [this](../01-introduction/example-project.md#resource-classes) example). -#### isSequenceOf - -Similar to `kb:isPartOf` for `kb:StillImageRepresentations`, part-whole-relations can be defined for resources that have -a time dimension by using `kb:isSequenceOf`. You can use it for video or audio resources that are subtypes of -`kb:MovingImageRepresentation` and `kb:AudioRepresentation`. - -`kb:isSequenceOf` is intended to be used in combination with the property `kb:hasSequenceBounds` which points to a -`kb:IntervalValue`. This defines the start and end point of the subseqence in relation to the entire audio/video -resource as an [interval](#intervalvalue). When the properties are used in this combination, a dedicated behavior in the -frontend allows to display the sequences alongside the main resource. - -There is an important difference between `kb:isSequenceOf` and `kb:isPartOf`: For `kb:isPartOf`, each part *is a* -`kb:StillImageRepresentation` and the whole consists of multiple such parts. In `kb:isSequenceOf` on the other hand, the -whole is one `kb:MovingImageRepresentation` or `kb:AudioRepresentation`. The parts only define which sub-sequence of -this representation they are. ### Text with Standoff Markup diff --git a/docs/03-endpoints/api-admin/projects.md b/docs/03-endpoints/api-admin/projects.md index 466db4bdda..ea66de571a 100644 --- a/docs/03-endpoints/api-admin/projects.md +++ b/docs/03-endpoints/api-admin/projects.md @@ -6,7 +6,7 @@ # Projects Endpoint | Scope | Route | Operations | Explanation | -| --------------- | -------------------------------------------------------------- |------------|-----------------------------------------------------------------------------| +| --------------- | -------------------------------------------------------------- | ---------- | --------------------------------------------------------------------------- | | projects | `/admin/projects` | `GET` | [get all projects](#get-all-projects) | | projects | `/admin/projects` | `POST` | [create a project](#create-a-new-project) | | projects | `/admin/projects/shortname/{shortname}` | `GET` | [get a single project](#get-project-by-id) | @@ -239,7 +239,6 @@ Example response: "longname": "Anything Project", "ontologies": [ "http://0.0.0.0:3333/ontology/0001/something/v2", - "http://0.0.0.0:3333/ontology/0001/sequences/v2", "http://0.0.0.0:3333/ontology/0001/freetest/v2", "http://0.0.0.0:3333/ontology/0001/minimal/v2", "http://0.0.0.0:3333/ontology/0001/anything/v2" @@ -310,7 +309,6 @@ Example response: "longname": "other longname", "ontologies": [ "http://api.knora.org/ontology/0001/something/v2", - "http://api.knora.org/ontology/0001/sequences/v2", "http://api.knora.org/ontology/0001/freetest/v2", "http://api.knora.org/ontology/0001/minimal/v2", "http://api.knora.org/ontology/0001/anything/v2" @@ -365,7 +363,6 @@ Example response: "longname": "other longname", "ontologies": [ "http://api.knora.org/ontology/0001/something/v2", - "http://api.knora.org/ontology/0001/sequences/v2", "http://api.knora.org/ontology/0001/freetest/v2", "http://api.knora.org/ontology/0001/minimal/v2", "http://api.knora.org/ontology/0001/anything/v2" @@ -641,7 +638,6 @@ Example response: "longname": "Anything Project", "ontologies": [ "http://0.0.0.0:3333/ontology/0001/something/v2", - "http://0.0.0.0:3333/ontology/0001/sequences/v2", "http://0.0.0.0:3333/ontology/0001/freetest/v2", "http://0.0.0.0:3333/ontology/0001/minimal/v2", "http://0.0.0.0:3333/ontology/0001/anything/v2" diff --git a/docs/05-internals/design/domain/class-and-property-hierarchies.md b/docs/05-internals/design/domain/class-and-property-hierarchies.md index b57c08c23a..d9913be998 100644 --- a/docs/05-internals/design/domain/class-and-property-hierarchies.md +++ b/docs/05-internals/design/domain/class-and-property-hierarchies.md @@ -346,7 +346,6 @@ flowchart BT hasColor ---> hasValue hasGeometry ---> hasValue hasComment ---> hasValue - hasSequenceBounds ---> hasValue seqnum ---> hasValue hasExtResValue ---> hasValue hasLinkToValue ----> hasValue @@ -363,14 +362,12 @@ flowchart BT hasAnnotationOfValue ---> hasLinkToValue hasRepresentationValue ---> hasLinkToValue hasStandoffLinkToValue ---> hasLinkToValue - isSequenceOfValue ---> hasLinkToValue isRegionOfValue ---> hasLinkToValue isPartOf ---> hasLinkTo isAnnotationOf ---> hasLinkTo hasRepresentation ---> hasLinkTo hasStandoffLinkTo ---> hasLinkTo - isSequenceOf ---> hasLinkTo isRegionOf ---> hasLinkTo ``` @@ -565,7 +562,6 @@ flowchart LR subgraph Links hasRepresentation hasLinkTo - isSequenceOf hasStandoffLinkTo isPartOf end @@ -573,7 +569,6 @@ flowchart LR subgraph LinkValues hasRepresentationValue hasLinkToValue - isSequenceOfValue hasStandoffLinkToValue isPartOfValue end @@ -593,12 +588,10 @@ flowchart LR Resource --> hasRepresentation --> _Representation Resource --> hasLinkTo --> _Resource - Resource --> isSequenceOf --> _Resource Resource --> hasStandoffLinkTo --> _Resource Resource --> isPartOf --> _Resource Resource --> hasLinkToValue --> LinkValue - Resource --> isSequenceOfValue --> LinkValue Resource --> hasStandoffLinkToValue --> LinkValue Resource --> hasRepresentationValue --> LinkValue Resource --> isPartOfValue --> LinkValue @@ -638,7 +631,6 @@ flowchart LR %% Relations na --> deletedBy --> User na --> seqnum --> IntValue - na --> hasSequenceBounds --> IntervalValue na --> deleteDate --> date na --> isDeleted --> boolean ``` diff --git a/integration/src/test/scala/org/knora/webapi/E2EZSpec.scala b/integration/src/test/scala/org/knora/webapi/E2EZSpec.scala index 56d0201492..6f63173197 100644 --- a/integration/src/test/scala/org/knora/webapi/E2EZSpec.scala +++ b/integration/src/test/scala/org/knora/webapi/E2EZSpec.scala @@ -8,6 +8,8 @@ package org.knora.webapi import zio._ import zio.http._ import zio.json._ +import zio.json.ast.Json +import zio.json.ast.JsonCursor import zio.test._ import org.knora.webapi.core.AppServer @@ -49,7 +51,7 @@ abstract class E2EZSpec extends ZIOSpecDefault with TestStartupUtils { urlFull <- ZIO.fromEither(URL.decode(urlStr)).orDie _ <- ZIO.logDebug(s"GET ${urlFull.encode}") bearer = token.map(Header.Authorization.Bearer(_)).toList - response <- client.url(urlFull).addHeaders(Headers(bearer)).get("/").orDie + response <- client.url(urlFull).addHeaders(Headers(bearer)).get("").orDie } yield response def sendGetRequestStringOrFail(url: String, token: Option[String] = None): ZIO[env, String, String] = @@ -106,4 +108,18 @@ abstract class E2EZSpec extends ZIOSpecDefault with TestStartupUtils { token <- ZIO.fromOption(result.get("token")).orElseFail("No token in response") } yield token + def getRootToken: ZIO[env, String, String] = + getToken("root@example.com", "test") + + def urlEncode(s: String): String = java.net.URLEncoder.encode(s, "UTF-8") + + def getOntologyLastModificationDate(ontlogyIri: String): ZIO[env, String, String] = { + val cursor = JsonCursor.field("knora-api:lastModificationDate").isObject.field("@value").isString + for { + responseStr <- sendGetRequestStringOrFail(s"/v2/ontologies/allentities/${urlEncode(ontlogyIri)}") + responseAst <- ZIO.fromEither(responseStr.fromJson[Json]) + lmd <- ZIO.fromEither(responseAst.get(cursor)) + } yield lmd.value + } + } diff --git a/integration/src/test/scala/org/knora/webapi/e2e/v2/OntologyFormatsE2ESpec.scala b/integration/src/test/scala/org/knora/webapi/e2e/v2/OntologyFormatsE2ESpec.scala index 04edd6917a..75d1df4eaf 100644 --- a/integration/src/test/scala/org/knora/webapi/e2e/v2/OntologyFormatsE2ESpec.scala +++ b/integration/src/test/scala/org/knora/webapi/e2e/v2/OntologyFormatsE2ESpec.scala @@ -21,6 +21,8 @@ import org.knora.webapi.e2e.TestDataFilePath import org.knora.webapi.messages.OntologyConstants.KnoraApiV2Complex import org.knora.webapi.messages.OntologyConstants.KnoraApiV2Simple import org.knora.webapi.messages.store.triplestoremessages.RdfDataObject +import org.knora.webapi.messages.util.rdf.RdfFormatUtil +import org.knora.webapi.messages.util.rdf.Turtle import org.knora.webapi.sharedtestdata.SharedOntologyTestDataADM import org.knora.webapi.sharedtestdata.SharedTestDataADM import org.knora.webapi.util._ @@ -45,9 +47,10 @@ class OntologyFormatsE2ESpec extends E2ESpec { urlPath: String, fileBasename: String, clientTestDataBasename: Option[String] = None, + persistTtl: Boolean = false, ) { - private def makeFile(): Path = - Paths.get("..", "test_data", "generated_test_data", "ontologyR2RV2", s"$fileBasename.jsonld") + private def makeFile(fileEnding: String = "jsonld"): Path = + Paths.get("..", "test_data", "generated_test_data", "ontologyR2RV2", s"$fileBasename.$fileEnding") /** * If `maybeClientTestDataBasename` is defined, stores the response string in [[org.knora.webapi.e2e.ClientTestDataCollector]]. @@ -58,6 +61,15 @@ class OntologyFormatsE2ESpec extends E2ESpec { case None => () } + def storeAsTtl = { + val jsonStr = readFile() + val model = parseJsonLd(jsonStr) + val ttlStr = RdfFormatUtil.format(model, Turtle) + val newFile = makeFile("ttl") + Files.createDirectories(newFile.getParent) + FileUtil.writeTextFile(newFile, ttlStr) + } + /** * Reads the expected response file. * @@ -75,6 +87,9 @@ class OntologyFormatsE2ESpec extends E2ESpec { Files.createDirectories(newOutputFile.getParent) FileUtil.writeTextFile(newOutputFile, responseStr) + + if (persistTtl) storeAsTtl + () } } @@ -208,6 +223,7 @@ class OntologyFormatsE2ESpec extends E2ESpec { s"/v2/ontologies/allentities/${urlEncodeIri(SharedOntologyTestDataADM.ANYTHING_ONTOLOGY_IRI_LocalHost)}", fileBasename = "anythingOntologyWithValueObjects", clientTestDataBasename = Some("anything-ontology"), + persistTtl = true, ) private val anythingThingWithAllLanguages = diff --git a/integration/src/test/scala/org/knora/webapi/e2e/v2/OntologyV2R2RSpec.scala b/integration/src/test/scala/org/knora/webapi/e2e/v2/OntologyV2R2RSpec.scala index 18aa6f1319..db7ff73c3a 100644 --- a/integration/src/test/scala/org/knora/webapi/e2e/v2/OntologyV2R2RSpec.scala +++ b/integration/src/test/scala/org/knora/webapi/e2e/v2/OntologyV2R2RSpec.scala @@ -6,7 +6,6 @@ package org.knora.webapi.e2e.v2 import org.apache.pekko -import zio._ import java.net.URLEncoder import java.time.Instant @@ -33,12 +32,10 @@ import org.knora.webapi.messages.util.rdf._ import org.knora.webapi.messages.v2.responder.ontologymessages.InputOntologyV2 import org.knora.webapi.messages.v2.responder.ontologymessages.TestResponseParsingModeV2 import org.knora.webapi.models._ -import org.knora.webapi.routing.UnsafeZioRun import org.knora.webapi.routing.v2.OntologiesRouteV2 import org.knora.webapi.routing.v2.ResourcesRouteV2 import org.knora.webapi.sharedtestdata.SharedOntologyTestDataADM import org.knora.webapi.sharedtestdata.SharedTestDataADM -import org.knora.webapi.slice.ontology.domain.model.Cardinality._ import org.knora.webapi.util._ import pekko.http.scaladsl.model._ @@ -3366,305 +3363,6 @@ class OntologyV2R2RSpec extends R2RSpec { } } - "create a class that is a sequence of a video resource" in { - - val videoResourceIri = "http://0.0.0.0:3333/ontology/0001/freetest/v2#VideoResource".toSmartIri - val videoSequenceIri = "http://0.0.0.0:3333/ontology/0001/freetest/v2#VideoSequence".toSmartIri - val isSequenceOfVideoPropertyIri = "http://0.0.0.0:3333/ontology/0001/freetest/v2#isSequenceOfVideo".toSmartIri - - // create VideoResource class - val createVideoClassRequest = CreateClassRequest - .make( - ontologyName = "freetest", - lastModificationDate = freetestLastModDate, - className = "VideoResource", - subClassOf = Some("knora-api:MovingImageRepresentation"), - ) - .value - - Post( - "/v2/ontologies/classes", - HttpEntity(RdfMediaTypes.`application/ld+json`, createVideoClassRequest), - ) ~> addCredentials(BasicHttpCredentials(anythingUsername, password)) ~> ontologiesPath ~> check { - assert(status == StatusCodes.OK, response.toString) - - val responseJsonDoc = responseToJsonLDDocument(response) - val responseAsInput: InputOntologyV2 = - InputOntologyV2.fromJsonLD(responseJsonDoc, parsingMode = TestResponseParsingModeV2).unescape - assert(responseAsInput.classes.keySet.contains(videoResourceIri)) - freetestLastModDate = responseAsInput.ontologyMetadata.lastModificationDate.get - } - - // create VideoSequence class - val createSequenceClassRequest = CreateClassRequest - .make( - ontologyName = "freetest", - lastModificationDate = freetestLastModDate, - className = "VideoSequence", - ) - .value - - Post( - "/v2/ontologies/classes", - HttpEntity(RdfMediaTypes.`application/ld+json`, createSequenceClassRequest), - ) ~> addCredentials(BasicHttpCredentials(anythingUsername, password)) ~> ontologiesPath ~> check { - assert(status == StatusCodes.OK, response.toString) - - val responseJsonDoc = responseToJsonLDDocument(response) - val responseAsInput: InputOntologyV2 = - InputOntologyV2.fromJsonLD(responseJsonDoc, parsingMode = TestResponseParsingModeV2).unescape - assert(responseAsInput.classes.keySet.contains(videoSequenceIri)) - freetestLastModDate = responseAsInput.ontologyMetadata.lastModificationDate.get - } - - // create isSequenceOfVideo property - val sequenceOfPropertyRequest = CreatePropertyRequest - .make( - ontologyName = "freetest", - lastModificationDate = freetestLastModDate, - propertyName = "isSequenceOfVideo", - subjectClassName = None, - propertyType = PropertyValueType.Resource, - subPropertyOf = Some("knora-api:isSequenceOf"), - ) - .value - - Post( - "/v2/ontologies/properties", - HttpEntity(RdfMediaTypes.`application/ld+json`, sequenceOfPropertyRequest), - ) ~> addCredentials(BasicHttpCredentials(anythingUsername, password)) ~> ontologiesPath ~> check { - - val response = responseAs[String] - assert(status == StatusCodes.OK, response) - val responseJsonDoc = JsonLDUtil.parseJsonLD(response) - val responseAsInput: InputOntologyV2 = - InputOntologyV2.fromJsonLD(responseJsonDoc, parsingMode = TestResponseParsingModeV2).unescape - - freetestLastModDate = responseAsInput.ontologyMetadata.lastModificationDate.get - } - - // add cardinality to class - val addCardinalitiesRequestJson = AddCardinalitiesRequest - .make( - ontologyName = "freetest", - lastModificationDate = freetestLastModDate, - className = "VideoSequence", - restrictions = List( - Restriction( - CardinalityRestriction.CardinalityOne, - onProperty = Property(ontology = "freetest", property = "isSequenceOfVideo"), - ), - Restriction( - CardinalityRestriction.CardinalityOne, - onProperty = Property(ontology = "knora-api", property = "hasSequenceBounds"), - ), - ), - ) - .value - - Post( - "/v2/ontologies/cardinalities", - HttpEntity(RdfMediaTypes.`application/ld+json`, addCardinalitiesRequestJson), - ) ~> addCredentials(BasicHttpCredentials(anythingUsername, password)) ~> ontologiesPath ~> check { - val responseStr = responseAs[String] - assert(status == StatusCodes.OK, responseStr) - val responseJsonDoc = JsonLDUtil.parseJsonLD(responseStr) - - val responseAsInput: InputOntologyV2 = - InputOntologyV2.fromJsonLD(responseJsonDoc, parsingMode = TestResponseParsingModeV2).unescape - freetestLastModDate = responseAsInput.ontologyMetadata.lastModificationDate.get - } - - // check the ontology to see if all worked as it should - val url = URLEncoder.encode(s"http://0.0.0.0:3333/ontology/0001/freetest/v2", "UTF-8") - Get( - s"/v2/ontologies/allentities/$url", - ) ~> ontologiesPath ~> check { - val responseStr: String = responseAs[String] - assert(status == StatusCodes.OK, response.toString) - val responseJsonDoc = JsonLDUtil.parseJsonLD(responseStr) - - val responseAsInput: InputOntologyV2 = - InputOntologyV2.fromJsonLD(responseJsonDoc, parsingMode = TestResponseParsingModeV2).unescape - - assert(responseAsInput.classes.keySet.contains(videoResourceIri)) - assert(responseAsInput.classes.keySet.contains(videoSequenceIri)) - val videoSequenceCardinalities = responseAsInput.classes - .getOrElse(videoSequenceIri, throw new AssertionError(s"Class $videoSequenceIri not found")) - .directCardinalities - assert(videoSequenceCardinalities.keySet.contains(isSequenceOfVideoPropertyIri)) - val cardinality = videoSequenceCardinalities.get(isSequenceOfVideoPropertyIri).get.cardinality - assert(cardinality == ExactlyOne) - } - - } - - "create a class that is a sequence of an audio resource" in { - - val audioResourceIri = "http://0.0.0.0:3333/ontology/0001/freetest/v2#AudioResource".toSmartIri - val audioSequenceIri = "http://0.0.0.0:3333/ontology/0001/freetest/v2#AudioSequence".toSmartIri - val isSequenceOfAudioPropertyIri = "http://0.0.0.0:3333/ontology/0001/freetest/v2#isSequenceOfAudio".toSmartIri - - // create AudioResource class - val createAudioClassRequest = CreateClassRequest - .make( - ontologyName = "freetest", - lastModificationDate = freetestLastModDate, - className = "AudioResource", - subClassOf = Some("knora-api:AudioRepresentation"), - ) - .value - - Post( - "/v2/ontologies/classes", - HttpEntity(RdfMediaTypes.`application/ld+json`, createAudioClassRequest), - ) ~> addCredentials(BasicHttpCredentials(anythingUsername, password)) ~> ontologiesPath ~> check { - assert(status == StatusCodes.OK, response.toString) - - val responseJsonDoc = responseToJsonLDDocument(response) - val responseAsInput: InputOntologyV2 = - InputOntologyV2.fromJsonLD(responseJsonDoc, parsingMode = TestResponseParsingModeV2).unescape - assert(responseAsInput.classes.keySet.contains(audioResourceIri)) - freetestLastModDate = responseAsInput.ontologyMetadata.lastModificationDate.get - } - - // create AudioSequence class - val createSequenceClassRequest = CreateClassRequest - .make( - ontologyName = "freetest", - lastModificationDate = freetestLastModDate, - className = "AudioSequence", - ) - .value - - Post( - "/v2/ontologies/classes", - HttpEntity(RdfMediaTypes.`application/ld+json`, createSequenceClassRequest), - ) ~> addCredentials(BasicHttpCredentials(anythingUsername, password)) ~> ontologiesPath ~> check { - assert(status == StatusCodes.OK, response.toString) - - val responseJsonDoc = responseToJsonLDDocument(response) - val responseAsInput: InputOntologyV2 = - InputOntologyV2.fromJsonLD(responseJsonDoc, parsingMode = TestResponseParsingModeV2).unescape - assert(responseAsInput.classes.keySet.contains(audioSequenceIri)) - freetestLastModDate = responseAsInput.ontologyMetadata.lastModificationDate.get - } - - // create isSequenceOfAudio property - val sequenceOfPropertyRequest = CreatePropertyRequest - .make( - ontologyName = "freetest", - lastModificationDate = freetestLastModDate, - propertyName = "isSequenceOfAudio", - subjectClassName = None, - propertyType = PropertyValueType.Resource, - subPropertyOf = Some("knora-api:isSequenceOf"), - ) - .value - - Post( - "/v2/ontologies/properties", - HttpEntity(RdfMediaTypes.`application/ld+json`, sequenceOfPropertyRequest), - ) ~> addCredentials(BasicHttpCredentials(anythingUsername, password)) ~> ontologiesPath ~> check { - - val response = responseAs[String] - assert(status == StatusCodes.OK, response) - val responseJsonDoc = JsonLDUtil.parseJsonLD(response) - val responseAsInput: InputOntologyV2 = - InputOntologyV2.fromJsonLD(responseJsonDoc, parsingMode = TestResponseParsingModeV2).unescape - - freetestLastModDate = responseAsInput.ontologyMetadata.lastModificationDate.get - } - - // add cardinality to class - val addCardinalitiesRequestJson = AddCardinalitiesRequest - .make( - ontologyName = "freetest", - lastModificationDate = freetestLastModDate, - className = "AudioSequence", - restrictions = List( - Restriction( - CardinalityRestriction.CardinalityOne, - onProperty = Property(ontology = "freetest", property = "isSequenceOfAudio"), - ), - Restriction( - CardinalityRestriction.CardinalityOne, - onProperty = Property(ontology = "knora-api", property = "hasSequenceBounds"), - ), - ), - ) - .value - - Post( - "/v2/ontologies/cardinalities", - HttpEntity(RdfMediaTypes.`application/ld+json`, addCardinalitiesRequestJson), - ) ~> addCredentials(BasicHttpCredentials(anythingUsername, password)) ~> ontologiesPath ~> check { - val responseStr = responseAs[String] - assert(status == StatusCodes.OK, responseStr) - val responseJsonDoc = JsonLDUtil.parseJsonLD(responseStr) - - val responseAsInput: InputOntologyV2 = - InputOntologyV2.fromJsonLD(responseJsonDoc, parsingMode = TestResponseParsingModeV2).unescape - freetestLastModDate = responseAsInput.ontologyMetadata.lastModificationDate.get - } - - // check the ontology to see if all worked as it should - val url = URLEncoder.encode(s"http://0.0.0.0:3333/ontology/0001/freetest/v2", "UTF-8") - Get( - s"/v2/ontologies/allentities/$url", - ) ~> ontologiesPath ~> check { - val responseStr: String = responseAs[String] - assert(status == StatusCodes.OK, response.toString) - val responseJsonDoc = JsonLDUtil.parseJsonLD(responseStr) - - val responseAsInput: InputOntologyV2 = - InputOntologyV2.fromJsonLD(responseJsonDoc, parsingMode = TestResponseParsingModeV2).unescape - - assert(responseAsInput.classes.keySet.contains(audioResourceIri)) - assert(responseAsInput.classes.keySet.contains(audioSequenceIri)) - val audioSequenceCardinalities = responseAsInput.classes - .getOrElse(audioSequenceIri, throw new AssertionError(s"Class $audioSequenceIri not found")) - .directCardinalities - assert(audioSequenceCardinalities.keySet.contains(isSequenceOfAudioPropertyIri)) - val cardinality = audioSequenceCardinalities.get(isSequenceOfAudioPropertyIri).get.cardinality - assert(cardinality == ExactlyOne) - } - } - - "return isSequenceOf and isPartOf properties from knora-base marked as isEditable" in { - val onto = URLEncoder.encode(KnoraApiV2Complex.KnoraApiOntologyIri, "UTF-8") - val requestUrl = s"/v2/ontologies/allentities/$onto" - Get(requestUrl) ~> ontologiesPath ~> check { - val responseStr: String = responseAs[String] - assert(status == StatusCodes.OK, response.toString) - - val responseJsonDoc = JsonLDUtil.parseJsonLD(responseStr) - val graph = responseJsonDoc.body - .getRequiredArray(JsonLDKeywords.GRAPH) - .fold(e => throw BadRequestException(e), identity) - .value - .map(_.asInstanceOf[JsonLDObject]) - def isEditable(property: String): Boolean = UnsafeZioRun.runOrThrow { - ZIO - .fromOption( - graph.find( - _.getRequiredString(JsonLDKeywords.ID).fold(msg => throw BadRequestException(msg), identity) == property, - ), - ) - .flatMap(it => - ZIO.fromEither(it.getRequiredBoolean(KnoraApiV2Complex.IsEditable)).mapError(BadRequestException(_)), - ) - } - - assert(isEditable(KnoraApiV2Complex.IsSequenceOf)) - assert(isEditable(KnoraApiV2Complex.IsSequenceOfValue)) - assert(isEditable(KnoraApiV2Complex.HasSequenceBounds)) - assert(isEditable(KnoraApiV2Complex.IsPartOf)) - assert(isEditable(KnoraApiV2Complex.IsPartOfValue)) - assert(isEditable(KnoraApiV2Complex.Seqnum)) - } - } - "not create a property with invalid gui attribute" in { val params = s"""{ diff --git a/integration/src/test/scala/org/knora/webapi/e2e/v2/ResourcesRouteV2E2ESpec.scala b/integration/src/test/scala/org/knora/webapi/e2e/v2/ResourcesRouteV2E2ESpec.scala index 6effad31de..cb9c6c4e07 100644 --- a/integration/src/test/scala/org/knora/webapi/e2e/v2/ResourcesRouteV2E2ESpec.scala +++ b/integration/src/test/scala/org/knora/webapi/e2e/v2/ResourcesRouteV2E2ESpec.scala @@ -85,14 +85,6 @@ class ResourcesRouteV2E2ESpec extends E2ESpec { path = "test_data/project_ontologies/freetest-onto.ttl", name = "http://www.knora.org/ontology/0001/freetest", ), - RdfDataObject( - path = "test_data/project_ontologies/sequences-onto.ttl", - name = "http://www.knora.org/ontology/0001/sequences", - ), - RdfDataObject( - path = "test_data/project_data/sequences-data.ttl", - name = "http://www.knora.org/data/0001/sequences", - ), ) private val instanceChecker: InstanceChecker = InstanceChecker.getJsonLDChecker @@ -2099,189 +2091,6 @@ class ResourcesRouteV2E2ESpec extends E2ESpec { assert(editValueResponse.status == StatusCodes.OK, responseToString(editValueResponse)) } - "correctly load and request resources that have a isSequenceOf relation to a video resource" in { - val cred = BasicHttpCredentials(anythingUserEmail, password) - val valUrl = s"$baseApiUrl/v2/values" - val resUrl = s"$baseApiUrl/v2/resources" - - // get the video resource - val videoResourceIri = URLEncoder.encode("http://rdfh.ch/0001/video-01", "UTF-8") - val videoGetRequest = Get(s"$resUrl/$videoResourceIri") ~> addCredentials(cred) - val videoResponse = singleAwaitingRequest(videoGetRequest) - assert(videoResponse.status == StatusCodes.OK) - - // get the sequence reource pointing to the video resource - val sequenceResourceIri = URLEncoder.encode("http://rdfh.ch/0001/video-sequence-01", "UTF-8") - val sequenceGetRequest = Get(s"$resUrl/$sequenceResourceIri") ~> addCredentials(cred) - val sequenceResponse = singleAwaitingRequest(sequenceGetRequest) - assert(sequenceResponse.status == StatusCodes.OK) - - // get the isSequenceOfValue property on the sequence resource - val sequenceOfUuid = "6CKp1AmZT1SRHYeSOUaJjA" - val sequenceOfRequest = Get(s"$valUrl/$sequenceResourceIri/$sequenceOfUuid") ~> addCredentials(cred) - val sequenceOfResponse = singleAwaitingRequest(sequenceOfRequest) - assert(sequenceOfResponse.status == StatusCodes.OK) - - // get the hasSequenceBounds property on the sequence resource - val sequenceBoundsUuid = "vEDim4wvSfGnhSvX6fXcaA" - val sequenceBoundsRequest = Get(s"$valUrl/$sequenceResourceIri/$sequenceBoundsUuid") ~> addCredentials(cred) - val sequenceBoundsResponse = singleAwaitingRequest(sequenceBoundsRequest) - assert(sequenceBoundsResponse.status == StatusCodes.OK) - } - - "correctly create and request additional resources that have a isSequenceOf relation to a video resource" in { - val cred = BasicHttpCredentials(anythingUserEmail, password) - val valUrl = s"$baseApiUrl/v2/values" - val resUrl = s"$baseApiUrl/v2/resources" - - // create another sequence of the video resource - val createSequenceJson: String = - """{ - | "@type" : "sequences:VideoSequence", - | "knora-api:isSequenceOfValue" : { - | "@type" : "knora-api:LinkValue", - | "knora-api:linkValueHasTargetIri" : { - | "@id" : "http://rdfh.ch/0001/video-01" - | } - | }, - | "knora-api:hasSequenceBounds" : { - | "@type" : "knora-api:IntervalValue", - | "knora-api:intervalValueHasEnd" : { - | "@type" : "xsd:decimal", - | "@value" : "3.4" - | }, - | "knora-api:intervalValueHasStart" : { - | "@type" : "xsd:decimal", - | "@value" : "1.2" - | } - | }, - | "knora-api:attachedToProject" : { - | "@id" : "http://rdfh.ch/projects/0001" - | }, - | "rdfs:label" : "second sequence", - | "@context" : { - | "rdf" : "http://www.w3.org/1999/02/22-rdf-syntax-ns#", - | "knora-api" : "http://api.knora.org/ontology/knora-api/v2#", - | "rdfs" : "http://www.w3.org/2000/01/rdf-schema#", - | "xsd" : "http://www.w3.org/2001/XMLSchema#", - | "sequences" : "http://0.0.0.0:3333/ontology/0001/sequences/v2#" - | } - |}""".stripMargin - - val createSequenceRequest = - Post(resUrl, HttpEntity(RdfMediaTypes.`application/ld+json`, createSequenceJson)) ~> addCredentials(cred) - val createSequenceResponse = singleAwaitingRequest(createSequenceRequest) - assert(createSequenceResponse.status == StatusCodes.OK, createSequenceResponse.toString) - val createSequenceResponseBody = responseToJsonLDDocument(createSequenceResponse).body - val sequenceResourceIri = - URLEncoder.encode( - createSequenceResponseBody - .getRequiredString(JsonLDKeywords.ID) - .fold(msg => throw BadRequestException(msg), identity), - "UTF-8", - ) - - // get the newly created sequence resource - val sequenceGetRequest = Get(s"$resUrl/$sequenceResourceIri") ~> addCredentials(cred) - val sequenceResponse = singleAwaitingRequest(sequenceGetRequest) - assert(sequenceResponse.status == StatusCodes.OK) - val getSequenceResponseBody = responseToJsonLDDocument(sequenceResponse).body - val sequenceOfUuid = getSequenceResponseBody - .getRequiredObject(KnoraApiV2Complex.IsSequenceOfValue) - .flatMap(_.getRequiredString(KnoraApiV2Complex.ValueHasUUID)) - .fold(e => throw BadRequestException(e), identity) - val sequenceBoundsUuid = getSequenceResponseBody - .getRequiredObject(KnoraApiV2Complex.HasSequenceBounds) - .flatMap(_.getRequiredString(KnoraApiV2Complex.ValueHasUUID)) - .fold(e => throw BadRequestException(e), identity) - - // get the isSequenceOfValue property on the sequence resource - val sequenceOfRequest = Get(s"$valUrl/$sequenceResourceIri/$sequenceOfUuid") ~> addCredentials(cred) - val sequenceOfResponse = singleAwaitingRequest(sequenceOfRequest) - assert(sequenceOfResponse.status == StatusCodes.OK) - - // get the hasSequenceBounds property on the sequence resource - val sequenceBoundsRequest = Get(s"$valUrl/$sequenceResourceIri/$sequenceBoundsUuid") ~> addCredentials(cred) - val sequenceBoundsResponse = singleAwaitingRequest(sequenceBoundsRequest) - assert(sequenceBoundsResponse.status == StatusCodes.OK) - } - - "correctly create and request resources that have a isSequenceOf-subproperty relation to an audio resource" in { - val cred = BasicHttpCredentials(anythingUserEmail, password) - val valUrl = s"$baseApiUrl/v2/values" - val resUrl = s"$baseApiUrl/v2/resources" - - // create another sequence of the video resource - val createSequenceJson: String = - """{ - | "@type" : "sequences:AudioSequence", - | "sequences:isAnnotatedSequenceOfAudioValue" : { - | "@type" : "knora-api:LinkValue", - | "knora-api:linkValueHasTargetIri" : { - | "@id" : "http://rdfh.ch/0001/audio-01" - | } - | }, - | "sequences:hasCustomSequenceBounds" : { - | "@type" : "knora-api:IntervalValue", - | "knora-api:intervalValueHasEnd" : { - | "@type" : "xsd:decimal", - | "@value" : "14.2" - | }, - | "knora-api:intervalValueHasStart" : { - | "@type" : "xsd:decimal", - | "@value" : "9.9" - | } - | }, - | "knora-api:attachedToProject" : { - | "@id" : "http://rdfh.ch/projects/0001" - | }, - | "rdfs:label" : "custom audio sequence", - | "@context" : { - | "rdf" : "http://www.w3.org/1999/02/22-rdf-syntax-ns#", - | "knora-api" : "http://api.knora.org/ontology/knora-api/v2#", - | "rdfs" : "http://www.w3.org/2000/01/rdf-schema#", - | "xsd" : "http://www.w3.org/2001/XMLSchema#", - | "sequences" : "http://0.0.0.0:3333/ontology/0001/sequences/v2#" - | } - |}""".stripMargin - - val createSequenceRequest = - Post(resUrl, HttpEntity(RdfMediaTypes.`application/ld+json`, createSequenceJson)) ~> addCredentials(cred) - val createSequenceResponse = singleAwaitingRequest(createSequenceRequest) - assert(createSequenceResponse.status == StatusCodes.OK, createSequenceResponse.toString) - val createSequenceResponseBody = responseToJsonLDDocument(createSequenceResponse).body - val sequenceResourceIri = - URLEncoder.encode( - createSequenceResponseBody - .getRequiredString(JsonLDKeywords.ID) - .fold(msg => throw BadRequestException(msg), identity), - "UTF-8", - ) - - // get the newly created sequence reource - val sequenceGetRequest = Get(s"$resUrl/$sequenceResourceIri") ~> addCredentials(cred) - val sequenceResponse = singleAwaitingRequest(sequenceGetRequest) - assert(sequenceResponse.status == StatusCodes.OK) - val getSequenceResponseBody = responseToJsonLDDocument(sequenceResponse).body - val sequenceOfUuid = getSequenceResponseBody - .getRequiredObject("http://0.0.0.0:3333/ontology/0001/sequences/v2#isAnnotatedSequenceOfAudioValue") - .flatMap(_.getRequiredString(KnoraApiV2Complex.ValueHasUUID)) - .fold(msg => throw BadRequestException(msg), identity) - val sequenceBoundsUuid = getSequenceResponseBody - .getRequiredObject("http://0.0.0.0:3333/ontology/0001/sequences/v2#hasCustomSequenceBounds") - .flatMap(_.getRequiredString(KnoraApiV2Complex.ValueHasUUID)) - .fold(msg => throw BadRequestException(msg), identity) - - // get the isSequenceOfValue property on the sequence resource - val sequenceOfRequest = Get(s"$valUrl/$sequenceResourceIri/$sequenceOfUuid") ~> addCredentials(cred) - val sequenceOfResponse = singleAwaitingRequest(sequenceOfRequest) - assert(sequenceOfResponse.status == StatusCodes.OK) - - // get the hasSequenceBounds property on the sequence resource - val sequenceBoundsRequest = Get(s"$valUrl/$sequenceResourceIri/$sequenceBoundsUuid") ~> addCredentials(cred) - val sequenceBoundsResponse = singleAwaitingRequest(sequenceBoundsRequest) - assert(sequenceBoundsResponse.status == StatusCodes.OK) - } } } diff --git a/integration/src/test/scala/org/knora/webapi/e2ez/KnoraBaseJsonModels.scala b/integration/src/test/scala/org/knora/webapi/e2ez/KnoraBaseJsonModels.scala new file mode 100644 index 0000000000..a205a14c58 --- /dev/null +++ b/integration/src/test/scala/org/knora/webapi/e2ez/KnoraBaseJsonModels.scala @@ -0,0 +1,151 @@ +package org.knora.webapi.e2ez + +import zio.json._ + +import KnoraBaseJsonModels.ValuePrimitives._ +import KnoraBaseJsonModels.ValueObjects._ + +object KnoraBaseJsonModels { + + object ValuePrimitives { + + final case class InternalIri(`@id`: String) + object InternalIri { implicit val codec: JsonCodec[InternalIri] = DeriveJsonCodec.gen[InternalIri] } + + final case class AnyUri( + `@value`: String, + `@type`: String = "xsd:anyURI", + ) + object AnyUri { implicit val codec: JsonCodec[AnyUri] = DeriveJsonCodec.gen[AnyUri] } + + final case class DateTimeStamp( + `@value`: String, + `@type`: String = "xsd:dateTimeStamp", + ) + object DateTimeStamp { implicit val codec: JsonCodec[DateTimeStamp] = DeriveJsonCodec.gen[DateTimeStamp] } + + final case class Decimal( + `@value`: String, + `@type`: String = "xsd:decimal", + ) + object Decimal { implicit val codec: JsonCodec[Decimal] = DeriveJsonCodec.gen[Decimal] } + + final case class Link( + `@id`: String, + `@type`: String, + `rdfs:label`: String, + `knora-api:attachedToProject`: InternalIri, + `knora-api:attachedToUser`: InternalIri, + `knora-api:hasPermissions`: String, + `knora-api:userHasPermission`: String, + `knora-api:arkUrl`: AnyUri, + `knora-api:versionArkUrl`: AnyUri, + ) + object Link { implicit val codec: JsonCodec[Link] = DeriveJsonCodec.gen[Link] } + + } + + object ValueObjects { + + final case class IntervalValue( + `@id`: String, + `@type`: String = "knora-api:IntervalValue", + `knora-api:valueHasUUID`: String, + `knora-api:intervalValueHasStart`: Decimal, + `knora-api:intervalValueHasEnd`: Decimal, + `knora-api:attachedToUser`: InternalIri, + `knora-api:valueCreationDate`: DateTimeStamp, + `knora-api:hasPermissions`: String, + `knora-api:userHasPermission`: String, + `knora-api:arkUrl`: AnyUri, + `knora-api:versionArkUrl`: AnyUri, + ) + object IntervalValue { implicit val codec: JsonCodec[IntervalValue] = DeriveJsonCodec.gen[IntervalValue] } + + final case class LinkValue( + `@id`: String, + `@type`: String = "knora-api:LinkValue", + `knora-api:valueHasUUID`: String, + `knora-api:linkValueHasTarget`: InternalIri, + `knora-api:attachedToUser`: InternalIri, + `knora-api:valueCreationDate`: DateTimeStamp, + `knora-api:hasPermissions`: String, + `knora-api:userHasPermission`: String, + `knora-api:arkUrl`: AnyUri, + `knora-api:versionArkUrl`: AnyUri, + ) + object LinkValue { implicit val codec: JsonCodec[LinkValue] = DeriveJsonCodec.gen[LinkValue] } + + final case class TextValue( + `@id`: String, + `@type`: String = "knora-api:TextValue", + `knora-api:valueHasUUID`: String, + `knora-api:valueAsString`: String, // Note: not yet complete, could also be XML, HTML, etc. + `knora-api:attachedToUser`: InternalIri, + `knora-api:valueCreationDate`: DateTimeStamp, + `knora-api:hasPermissions`: String, + `knora-api:userHasPermission`: String, + `knora-api:arkUrl`: AnyUri, + `knora-api:versionArkUrl`: AnyUri, + ) + object TextValue { implicit val codec: JsonCodec[TextValue] = DeriveJsonCodec.gen[TextValue] } + + } + + object ResourceResponses { + + final case class ResourcePreviewResponse( + `@id`: String, + `@type`: String, + `rdfs:label`: String, + `knora-api:attachedToProject`: InternalIri, + `knora-api:attachedToUser`: InternalIri, + `knora-api:hasPermissions`: String, + `knora-api:userHasPermission`: String, + `knora-api:arkUrl`: AnyUri, + `knora-api:versionArkUrl`: AnyUri, + `@context`: Map[String, String], + ) + object ResourcePreviewResponse { + implicit val codec: JsonCodec[ResourcePreviewResponse] = DeriveJsonCodec.gen[ResourcePreviewResponse] + } + + final case class VideoSegmentResourceResponse( + `@id`: String, + `@type`: String, + `rdfs:label`: String, + `knora-api:isVideoSegmentOfValue`: LinkValue, + `knora-api:hasSegmentBounds`: IntervalValue, + `knora-api:hasComment`: TextValue, + `knora-api:attachedToProject`: InternalIri, + `knora-api:attachedToUser`: InternalIri, + `knora-api:hasPermissions`: String, + `knora-api:userHasPermission`: String, + `knora-api:arkUrl`: AnyUri, + `knora-api:versionArkUrl`: AnyUri, + `@context`: Map[String, String], + ) + object VideoSegmentResourceResponse { + implicit val codec: JsonCodec[VideoSegmentResourceResponse] = DeriveJsonCodec.gen[VideoSegmentResourceResponse] + } + + final case class AudioSegmentResourceResponse( + `@id`: String, + `@type`: String, + `rdfs:label`: String, + `knora-api:isAudioSegmentOfValue`: LinkValue, + `knora-api:hasSegmentBounds`: IntervalValue, + `knora-api:hasComment`: TextValue, + `knora-api:attachedToProject`: InternalIri, + `knora-api:attachedToUser`: InternalIri, + `knora-api:hasPermissions`: String, + `knora-api:userHasPermission`: String, + `knora-api:arkUrl`: AnyUri, + `knora-api:versionArkUrl`: AnyUri, + `@context`: Map[String, String], + ) + object AudioSegmentResourceResponse { + implicit val codec: JsonCodec[AudioSegmentResourceResponse] = DeriveJsonCodec.gen[AudioSegmentResourceResponse] + } + } +} diff --git a/integration/src/test/scala/org/knora/webapi/e2ez/SegmentE2EZSpec.scala b/integration/src/test/scala/org/knora/webapi/e2ez/SegmentE2EZSpec.scala new file mode 100644 index 0000000000..4b64405572 --- /dev/null +++ b/integration/src/test/scala/org/knora/webapi/e2ez/SegmentE2EZSpec.scala @@ -0,0 +1,422 @@ +/* + * Copyright © 2021 - 2024 Swiss National Data and Service Center for the Humanities and/or DaSCH Service Platform contributors. + * SPDX-License-Identifier: Apache-2.0 + */ + +package org.knora.webapi.e2ez + +import zio._ +import zio.json._ +import zio.test._ + +import org.knora.webapi.E2EZSpec +import org.knora.webapi.messages.store.triplestoremessages.RdfDataObject + +object SegmentE2EZSpec extends E2EZSpec { + + override def rdfDataObjects: List[RdfDataObject] = List( + RdfDataObject( + path = "test_data/project_data/anything-data.ttl", + name = "http://www.knora.org/data/0001/anything", + ), + ) + + private val videoSegmentWithoutSubclasses = + suiteAll("Create a Video Segment using knora-base classes directly") { + var videoSegmentIri: String = "" + + test("Create an instance of `knora-base:VideoSegment`") { + val createPayload = + """|{ + | "@type": "knora-api:VideoSegment", + | "knora-api:hasComment": { + | "@type": "knora-api:TextValue", + | "knora-api:valueAsString": "This is a test video segment." + | }, + | "knora-api:hasSegmentBounds": { + | "@type": "knora-api:IntervalValue", + | "knora-api:intervalValueHasStart" : { + | "@type" : "xsd:decimal", + | "@value" : "1.0" + | }, + | "knora-api:intervalValueHasEnd" : { + | "@type" : "xsd:decimal", + | "@value" : "3.0" + | } + | }, + | "knora-api:isVideoSegmentOfValue": { + | "@type": "knora-api:LinkValue", + | "knora-api:linkValueHasTargetIri": { + | "@id": "http://rdfh.ch/0001/zUelKon-SdmuL9iiHMgnGw" + | } + | }, + | "rdfs:label": "Test Video Segment", + | "knora-api:attachedToProject": { + | "@id": "http://rdfh.ch/projects/0001" + | }, + | "@context": { + | "rdf" : "http://www.w3.org/1999/02/22-rdf-syntax-ns#", + | "knora-api" : "http://api.knora.org/ontology/knora-api/v2#", + | "rdfs" : "http://www.w3.org/2000/01/rdf-schema#", + | "xsd" : "http://www.w3.org/2001/XMLSchema#", + | "anything" : "http://0.0.0.0:3333/ontology/0001/anything/v2#" + | } + |} + |""".stripMargin + for { + token <- getRootToken + responseStr <- sendPostRequestStringOrFail("/v2/resources", createPayload, Some(token)) + response <- + ZIO.fromEither(responseStr.fromJson[KnoraBaseJsonModels.ResourceResponses.ResourcePreviewResponse]) + _ = videoSegmentIri = response.`@id` + } yield assertTrue( + response.`@type` == "knora-api:VideoSegment", + response.`rdfs:label` == "Test Video Segment", + response.`knora-api:attachedToProject`.`@id` == "http://rdfh.ch/projects/0001", + response.`knora-api:attachedToUser`.`@id` == "http://rdfh.ch/users/root", + ) + } + + test("Get the created instance of `knora-base:VideoSegment`") { + for { + token <- getRootToken + responseStr <- sendGetRequestStringOrFail(s"/v2/resources/${urlEncode(videoSegmentIri)}", Some(token)) + response <- + ZIO.fromEither(responseStr.fromJson[KnoraBaseJsonModels.ResourceResponses.VideoSegmentResourceResponse]) + } yield assertTrue( + response.`@type` == "knora-api:VideoSegment", + response.`rdfs:label` == "Test Video Segment", + response.`knora-api:attachedToProject`.`@id` == "http://rdfh.ch/projects/0001", + response.`knora-api:attachedToUser`.`@id` == "http://rdfh.ch/users/root", + response.`knora-api:hasComment`.`knora-api:valueAsString` == "This is a test video segment.", + BigDecimal(response.`knora-api:hasSegmentBounds`.`knora-api:intervalValueHasStart`.`@value`) == 1.0, + BigDecimal(response.`knora-api:hasSegmentBounds`.`knora-api:intervalValueHasEnd`.`@value`) == 3.0, + response.`knora-api:isVideoSegmentOfValue`.`knora-api:linkValueHasTarget`.`@id` == "http://rdfh.ch/0001/zUelKon-SdmuL9iiHMgnGw", + ) + } + } + + private val videoSegmentWithSubclasses = + suiteAll("Create a Video Segment using subclasses of knora-base classes") { + var videoSegmentIri: String = "" + + test("Define a subclass of `knora-api:VideoSegment` in the anything ontology") { + def createPayload(lmd: String) = + s"""|{ + | "@id" : "http://0.0.0.0:3333/ontology/0001/anything/v2", + | "@type" : "owl:Ontology", + | "knora-api:lastModificationDate" : { + | "@type" : "xsd:dateTimeStamp", + | "@value" : "$lmd" + | }, + | "@graph" : [ + | { + | "@id": "anything:VideoSegment", + | "@type": "owl:Class", + | "rdfs:label": { + | "@language": "en", + | "@value": "Subclass of knora-api:VideoSegment" + | }, + | "rdfs:comment": { + | "@language": "en", + | "@value": "For testing purposes" + | }, + | "rdfs:subClassOf": [ + | { + | "@id": "knora-api:VideoSegment" + | } + | ] + | } + | ], + | "@context" : { + | "knora-api" : "http://api.knora.org/ontology/knora-api/v2#", + | "owl" : "http://www.w3.org/2002/07/owl#", + | "rdfs" : "http://www.w3.org/2000/01/rdf-schema#", + | "xsd" : "http://www.w3.org/2001/XMLSchema#", + | "anything" : "http://0.0.0.0:3333/ontology/0001/anything/v2#" + | } + |}""".stripMargin + for { + lmd <- getOntologyLastModificationDate("http://0.0.0.0:3333/ontology/0001/anything/v2") + token <- getRootToken + payload = createPayload(lmd) + res <- sendPostRequestStringOrFail("/v2/ontologies/classes", payload, Some(token)) + } yield assertTrue(res.contains("anything:VideoSegment")) + } + + test("Create an instance of `anything:VideoSegment`") { + val createPayload = + """|{ + | "@type": "anything:VideoSegment", + | "knora-api:hasComment": { + | "@type": "knora-api:TextValue", + | "knora-api:valueAsString": "This is a test video segment." + | }, + | "knora-api:hasSegmentBounds": { + | "@type": "knora-api:IntervalValue", + | "knora-api:intervalValueHasStart" : { + | "@type" : "xsd:decimal", + | "@value" : "1.0" + | }, + | "knora-api:intervalValueHasEnd" : { + | "@type" : "xsd:decimal", + | "@value" : "3.0" + | } + | }, + | "knora-api:isVideoSegmentOfValue": { + | "@type": "knora-api:LinkValue", + | "knora-api:linkValueHasTargetIri": { + | "@id": "http://rdfh.ch/0001/zUelKon-SdmuL9iiHMgnGw" + | } + | }, + | "rdfs:label": "Test Video Segment Subclass", + | "knora-api:attachedToProject": { + | "@id": "http://rdfh.ch/projects/0001" + | }, + | "@context": { + | "rdf" : "http://www.w3.org/1999/02/22-rdf-syntax-ns#", + | "knora-api" : "http://api.knora.org/ontology/knora-api/v2#", + | "rdfs" : "http://www.w3.org/2000/01/rdf-schema#", + | "xsd" : "http://www.w3.org/2001/XMLSchema#", + | "anything" : "http://0.0.0.0:3333/ontology/0001/anything/v2#" + | } + |}""".stripMargin + for { + token <- getRootToken + responseStr <- sendPostRequestStringOrFail("/v2/resources", createPayload, Some(token)) + response <- + ZIO.fromEither(responseStr.fromJson[KnoraBaseJsonModels.ResourceResponses.ResourcePreviewResponse]) + _ = videoSegmentIri = response.`@id` + } yield assertTrue( + response.`@type` == "anything:VideoSegment", + response.`rdfs:label` == "Test Video Segment Subclass", + response.`knora-api:attachedToProject`.`@id` == "http://rdfh.ch/projects/0001", + response.`knora-api:attachedToUser`.`@id` == "http://rdfh.ch/users/root", + ) + } + + test("Get the created instance of `anything:VideoSegment`") { + for { + token <- getRootToken + responseStr <- sendGetRequestStringOrFail(s"/v2/resources/${urlEncode(videoSegmentIri)}", Some(token)) + response <- + ZIO.fromEither(responseStr.fromJson[KnoraBaseJsonModels.ResourceResponses.VideoSegmentResourceResponse]) + } yield assertTrue( + response.`@type` == "anything:VideoSegment", + response.`rdfs:label` == "Test Video Segment Subclass", + response.`knora-api:attachedToProject`.`@id` == "http://rdfh.ch/projects/0001", + response.`knora-api:attachedToUser`.`@id` == "http://rdfh.ch/users/root", + response.`knora-api:hasComment`.`knora-api:valueAsString` == "This is a test video segment.", + BigDecimal(response.`knora-api:hasSegmentBounds`.`knora-api:intervalValueHasStart`.`@value`) == 1.0, + BigDecimal(response.`knora-api:hasSegmentBounds`.`knora-api:intervalValueHasEnd`.`@value`) == 3.0, + response.`knora-api:isVideoSegmentOfValue`.`knora-api:linkValueHasTarget`.`@id` == "http://rdfh.ch/0001/zUelKon-SdmuL9iiHMgnGw", + ) + } + + } + + private val audioSegmentWithoutSubclasses = + suiteAll("Create an Audio Segment using knora-base classes directly") { + var audioSegmentIri: String = "" + + test("Create an instance of `knora-base:AudioSegment`") { + val createPayload = + """|{ + | "@type": "knora-api:AudioSegment", + | "knora-api:hasComment": { + | "@type": "knora-api:TextValue", + | "knora-api:valueAsString": "This is a test audio segment." + | }, + | "knora-api:hasSegmentBounds": { + | "@type": "knora-api:IntervalValue", + | "knora-api:intervalValueHasStart" : { + | "@type" : "xsd:decimal", + | "@value" : "1.0" + | }, + | "knora-api:intervalValueHasEnd" : { + | "@type" : "xsd:decimal", + | "@value" : "3.0" + | } + | }, + | "knora-api:isAudioSegmentOfValue": { + | "@type": "knora-api:LinkValue", + | "knora-api:linkValueHasTargetIri": { + | "@id": "http://rdfh.ch/0001/gT2msR9wS-CeLWXaj3N2aA" + | } + | }, + | "rdfs:label": "Test Audio Segment", + | "knora-api:attachedToProject": { + | "@id": "http://rdfh.ch/projects/0001" + | }, + | "@context": { + | "rdf" : "http://www.w3.org/1999/02/22-rdf-syntax-ns#", + | "knora-api" : "http://api.knora.org/ontology/knora-api/v2#", + | "rdfs" : "http://www.w3.org/2000/01/rdf-schema#", + | "xsd" : "http://www.w3.org/2001/XMLSchema#", + | "anything" : "http://0.0.0.0:3333/ontology/0001/anything/v2#" + | } + |} + |""".stripMargin + for { + token <- getRootToken + responseStr <- sendPostRequestStringOrFail("/v2/resources", createPayload, Some(token)) + response <- + ZIO.fromEither(responseStr.fromJson[KnoraBaseJsonModels.ResourceResponses.ResourcePreviewResponse]) + _ = audioSegmentIri = response.`@id` + } yield assertTrue( + response.`@type` == "knora-api:AudioSegment", + response.`rdfs:label` == "Test Audio Segment", + response.`knora-api:attachedToProject`.`@id` == "http://rdfh.ch/projects/0001", + response.`knora-api:attachedToUser`.`@id` == "http://rdfh.ch/users/root", + ) + } + + test("Get the created instance of `knora-base:AudioSegment`") { + for { + token <- getRootToken + responseStr <- sendGetRequestStringOrFail(s"/v2/resources/${urlEncode(audioSegmentIri)}", Some(token)) + response <- + ZIO.fromEither(responseStr.fromJson[KnoraBaseJsonModels.ResourceResponses.AudioSegmentResourceResponse]) + } yield assertTrue( + response.`@type` == "knora-api:AudioSegment", + response.`rdfs:label` == "Test Audio Segment", + response.`knora-api:attachedToProject`.`@id` == "http://rdfh.ch/projects/0001", + response.`knora-api:attachedToUser`.`@id` == "http://rdfh.ch/users/root", + response.`knora-api:hasComment`.`knora-api:valueAsString` == "This is a test audio segment.", + BigDecimal(response.`knora-api:hasSegmentBounds`.`knora-api:intervalValueHasStart`.`@value`) == 1.0, + BigDecimal(response.`knora-api:hasSegmentBounds`.`knora-api:intervalValueHasEnd`.`@value`) == 3.0, + response.`knora-api:isAudioSegmentOfValue`.`knora-api:linkValueHasTarget`.`@id` == "http://rdfh.ch/0001/gT2msR9wS-CeLWXaj3N2aA", + ) + } + } + + private val audioSegmentWithSubclasses = + suiteAll("Create an Audio Segment using subclasses of knora-base classes") { + var audioSegmentIri: String = "" + + test("Define a subclass of `knora-api:AudioSegment` in the anything ontology") { + def createPayload(lmd: String) = + s"""|{ + | "@id" : "http://0.0.0.0:3333/ontology/0001/anything/v2", + | "@type" : "owl:Ontology", + | "knora-api:lastModificationDate" : { + | "@type" : "xsd:dateTimeStamp", + | "@value" : "$lmd" + | }, + | "@graph" : [ + | { + | "@id": "anything:AudioSegment", + | "@type": "owl:Class", + | "rdfs:label": { + | "@language": "en", + | "@value": "Subclass of knora-api:AudioSegment" + | }, + | "rdfs:comment": { + | "@language": "en", + | "@value": "For testing purposes" + | }, + | "rdfs:subClassOf": [ + | { + | "@id": "knora-api:AudioSegment" + | } + | ] + | } + | ], + | "@context" : { + | "knora-api" : "http://api.knora.org/ontology/knora-api/v2#", + | "owl" : "http://www.w3.org/2002/07/owl#", + | "rdfs" : "http://www.w3.org/2000/01/rdf-schema#", + | "xsd" : "http://www.w3.org/2001/XMLSchema#", + | "anything" : "http://0.0.0.0:3333/ontology/0001/anything/v2#" + | } + |}""".stripMargin + for { + lmd <- getOntologyLastModificationDate("http://0.0.0.0:3333/ontology/0001/anything/v2") + token <- getRootToken + payload = createPayload(lmd) + res <- sendPostRequestStringOrFail("/v2/ontologies/classes", payload, Some(token)) + } yield assertTrue(res.contains("anything:AudioSegment")) + } + + test("Create an instance of `anything:AudioSegment`") { + val createPayload = + """|{ + | "@type": "anything:AudioSegment", + | "knora-api:hasComment": { + | "@type": "knora-api:TextValue", + | "knora-api:valueAsString": "This is a test audio segment." + | }, + | "knora-api:hasSegmentBounds": { + | "@type": "knora-api:IntervalValue", + | "knora-api:intervalValueHasStart" : { + | "@type" : "xsd:decimal", + | "@value" : "1.0" + | }, + | "knora-api:intervalValueHasEnd" : { + | "@type" : "xsd:decimal", + | "@value" : "3.0" + | } + | }, + | "knora-api:isAudioSegmentOfValue": { + | "@type": "knora-api:LinkValue", + | "knora-api:linkValueHasTargetIri": { + | "@id": "http://rdfh.ch/0001/gT2msR9wS-CeLWXaj3N2aA" + | } + | }, + | "rdfs:label": "Test Audio Segment Subclass", + | "knora-api:attachedToProject": { + | "@id": "http://rdfh.ch/projects/0001" + | }, + | "@context": { + | "rdf" : "http://www.w3.org/1999/02/22-rdf-syntax-ns#", + | "knora-api" : "http://api.knora.org/ontology/knora-api/v2#", + | "rdfs" : "http://www.w3.org/2000/01/rdf-schema#", + | "xsd" : "http://www.w3.org/2001/XMLSchema#", + | "anything" : "http://0.0.0.0:3333/ontology/0001/anything/v2#" + | } + |}""".stripMargin + for { + token <- getRootToken + responseStr <- sendPostRequestStringOrFail("/v2/resources", createPayload, Some(token)) + response <- + ZIO.fromEither(responseStr.fromJson[KnoraBaseJsonModels.ResourceResponses.ResourcePreviewResponse]) + _ = audioSegmentIri = response.`@id` + } yield assertTrue( + response.`@type` == "anything:AudioSegment", + response.`rdfs:label` == "Test Audio Segment Subclass", + response.`knora-api:attachedToProject`.`@id` == "http://rdfh.ch/projects/0001", + response.`knora-api:attachedToUser`.`@id` == "http://rdfh.ch/users/root", + ) + } + + test("Get the created instance of `knora-base:AudioSegment`") { + for { + token <- getRootToken + responseStr <- sendGetRequestStringOrFail(s"/v2/resources/${urlEncode(audioSegmentIri)}", Some(token)) + response <- + ZIO.fromEither(responseStr.fromJson[KnoraBaseJsonModels.ResourceResponses.AudioSegmentResourceResponse]) + } yield assertTrue( + response.`@type` == "anything:AudioSegment", + response.`rdfs:label` == "Test Audio Segment Subclass", + response.`knora-api:attachedToProject`.`@id` == "http://rdfh.ch/projects/0001", + response.`knora-api:attachedToUser`.`@id` == "http://rdfh.ch/users/root", + response.`knora-api:hasComment`.`knora-api:valueAsString` == "This is a test audio segment.", + BigDecimal(response.`knora-api:hasSegmentBounds`.`knora-api:intervalValueHasStart`.`@value`) == 1.0, + BigDecimal(response.`knora-api:hasSegmentBounds`.`knora-api:intervalValueHasEnd`.`@value`) == 3.0, + response.`knora-api:isAudioSegmentOfValue`.`knora-api:linkValueHasTarget`.`@id` == "http://rdfh.ch/0001/gT2msR9wS-CeLWXaj3N2aA", + ) + } + } + + override def e2eSpec: Spec[env, Any] = + suite("SegmentE2EZSpec")( + suite("Video Segments")( + videoSegmentWithoutSubclasses, + videoSegmentWithSubclasses, + ), + suite("Audio Segments")( + audioSegmentWithoutSubclasses, + audioSegmentWithSubclasses, + ), + ) +} diff --git a/integration/src/test/scala/org/knora/webapi/responders/v2/OntologyResponderV2Spec.scala b/integration/src/test/scala/org/knora/webapi/responders/v2/OntologyResponderV2Spec.scala index 8e1d798964..d180d3763d 100644 --- a/integration/src/test/scala/org/knora/webapi/responders/v2/OntologyResponderV2Spec.scala +++ b/integration/src/test/scala/org/knora/webapi/responders/v2/OntologyResponderV2Spec.scala @@ -6439,175 +6439,5 @@ class OntologyResponderV2Spec extends CoreSpec with ImplicitSender { assert(readClassInfo.inheritedCardinalities(AnythingOntologyIri.makeEntityIri("hasText")) == newCardinality) } } - - "create the class anything:DifferentVideoSequenceThing with a isSequenceOf relation to anything:VideoThing" in { - - val videoThingIri = AnythingOntologyIri.makeEntityIri("VideoThing") - - // Create sequence class - val sequenceClassIri = AnythingOntologyIri.makeEntityIri("DifferentVideoSequenceThing") - val sequenceClassInfoContent = ClassInfoContentV2( - classIri = sequenceClassIri, - predicates = Map( - OntologyConstants.Rdf.Type.toSmartIri -> PredicateInfoV2( - predicateIri = OntologyConstants.Rdf.Type.toSmartIri, - objects = Seq(SmartIriLiteralV2(OntologyConstants.Owl.Class.toSmartIri)), - ), - OntologyConstants.Rdfs.Label.toSmartIri -> PredicateInfoV2( - predicateIri = OntologyConstants.Rdfs.Label.toSmartIri, - objects = Seq(StringLiteralV2.from("Different Video Sequence Thing", Some("en"))), - ), - ), - subClassOf = Set(OntologyConstants.KnoraApiV2Complex.Resource.toSmartIri), - ontologySchema = ApiV2Complex, - ) - - appActor ! CreateClassRequestV2( - classInfoContent = sequenceClassInfoContent, - lastModificationDate = anythingLastModDate, - apiRequestID = UUID.randomUUID, - requestingUser = anythingAdminUser, - ) - - expectMsgPF(timeout) { case msg: ReadOntologyV2 => - val externalOntology = msg.toOntologySchema(ApiV2Complex) - val metadata = externalOntology.ontologyMetadata - val newAnythingLastModDate = metadata.lastModificationDate.getOrElse( - throw AssertionException(s"${metadata.ontologyIri} has no last modification date"), - ) - anythingLastModDate = newAnythingLastModDate - } - - // Create property sequenceOf - val sequenceOfPropertyIri = AnythingOntologyIri.makeEntityIri("sequenceOf") - val sequenceOfPropertyInfoContent = PropertyInfoContentV2( - propertyIri = sequenceOfPropertyIri, - predicates = Map( - OntologyConstants.Rdf.Type.toSmartIri -> PredicateInfoV2( - predicateIri = OntologyConstants.Rdf.Type.toSmartIri, - objects = Seq(SmartIriLiteralV2(OntologyConstants.Owl.ObjectProperty.toSmartIri)), - ), - OntologyConstants.KnoraApiV2Complex.SubjectType.toSmartIri -> PredicateInfoV2( - predicateIri = OntologyConstants.KnoraApiV2Complex.SubjectType.toSmartIri, - objects = Seq(SmartIriLiteralV2(sequenceClassIri)), - ), - OntologyConstants.KnoraApiV2Complex.ObjectType.toSmartIri -> PredicateInfoV2( - predicateIri = OntologyConstants.KnoraApiV2Complex.ObjectType.toSmartIri, - objects = Seq(SmartIriLiteralV2(videoThingIri)), - ), - OntologyConstants.Rdfs.Label.toSmartIri -> PredicateInfoV2( - predicateIri = OntologyConstants.Rdfs.Label.toSmartIri, - objects = Seq(StringLiteralV2.from("is sequence of", Some("en"))), - ), - SalsahGui.External.GuiElementProp.toSmartIri -> PredicateInfoV2( - predicateIri = SalsahGui.External.GuiElementProp.toSmartIri, - objects = Seq(SmartIriLiteralV2("http://api.knora.org/ontology/salsah-gui/v2#Searchbox".toSmartIri)), - ), - ), - subPropertyOf = Set(OntologyConstants.KnoraBase.IsSequenceOf.toSmartIri), - ontologySchema = ApiV2Complex, - ) - - appActor ! CreatePropertyRequestV2( - propertyInfoContent = sequenceOfPropertyInfoContent, - lastModificationDate = anythingLastModDate, - apiRequestID = UUID.randomUUID, - requestingUser = anythingAdminUser, - ) - - expectMsgPF(timeout) { case msg: ReadOntologyV2 => - val externalOntology = msg.toOntologySchema(ApiV2Complex) - assert(externalOntology.properties.size == 1) - val property = externalOntology.properties(sequenceOfPropertyIri) - // check that sequenceOf is a subproperty of knora-api:isSequenceOf - property.entityInfoContent.subPropertyOf.contains( - OntologyConstants.KnoraApiV2Complex.IsSequenceOf.toSmartIri, - ) should ===(true) - val metadata = externalOntology.ontologyMetadata - val newAnythingLastModDate = metadata.lastModificationDate.getOrElse( - throw AssertionException(s"${metadata.ontologyIri} has no last modification date"), - ) - assert(newAnythingLastModDate.isAfter(anythingLastModDate)) - anythingLastModDate = newAnythingLastModDate - } - - // Check that the corresponding sequenceOfValue was created - val sequenceOfValuePropertyIri = AnythingOntologyIri.makeEntityIri("sequenceOfValue") - val sequenceOfValuePropGetRequest = PropertiesGetRequestV2( - propertyIris = Set(sequenceOfValuePropertyIri), - allLanguages = true, - requestingUser = anythingAdminUser, - ) - appActor ! sequenceOfValuePropGetRequest - - expectMsgPF(timeout) { case msg: ReadOntologyV2 => - val externalOntology = msg.toOntologySchema(ApiV2Complex) - assert(externalOntology.properties.size == 1) - val property = externalOntology.properties(sequenceOfValuePropertyIri) - // check that sequenceOfValue is a subproperty of knora-api:isSequenceOfValue - property.entityInfoContent.subPropertyOf.contains( - OntologyConstants.KnoraApiV2Complex.IsSequenceOfValue.toSmartIri, - ) should ===(true) - val metadata = externalOntology.ontologyMetadata - val newAnythingLastModDate = metadata.lastModificationDate.getOrElse( - throw AssertionException(s"${metadata.ontologyIri} has no last modification date"), - ) - anythingLastModDate = newAnythingLastModDate - } - - // Create property sequenceBounds - val sequenceBoundsPropertyIri = AnythingOntologyIri.makeEntityIri("sequenceBounds") - val sequenceBoundsPropertyInfoContent = PropertyInfoContentV2( - propertyIri = sequenceBoundsPropertyIri, - predicates = Map( - OntologyConstants.Rdf.Type.toSmartIri -> PredicateInfoV2( - predicateIri = OntologyConstants.Rdf.Type.toSmartIri, - objects = Seq(SmartIriLiteralV2(OntologyConstants.Owl.ObjectProperty.toSmartIri)), - ), - OntologyConstants.KnoraApiV2Complex.SubjectType.toSmartIri -> PredicateInfoV2( - predicateIri = OntologyConstants.KnoraApiV2Complex.SubjectType.toSmartIri, - objects = Seq(SmartIriLiteralV2(sequenceClassIri)), - ), - OntologyConstants.KnoraApiV2Complex.ObjectType.toSmartIri -> PredicateInfoV2( - predicateIri = OntologyConstants.KnoraApiV2Complex.ObjectType.toSmartIri, - objects = Seq(SmartIriLiteralV2(OntologyConstants.KnoraBase.IntervalValue.toSmartIri)), - ), - OntologyConstants.Rdfs.Label.toSmartIri -> PredicateInfoV2( - predicateIri = OntologyConstants.Rdfs.Label.toSmartIri, - objects = Seq(StringLiteralV2.from("has sequence bounds", Some("en"))), - ), - SalsahGui.External.GuiElementProp.toSmartIri -> PredicateInfoV2( - predicateIri = SalsahGui.External.GuiElementProp.toSmartIri, - objects = Seq(SmartIriLiteralV2("http://api.knora.org/ontology/salsah-gui/v2#Interval".toSmartIri)), - ), - ), - subPropertyOf = Set(OntologyConstants.KnoraBase.HasSequenceBounds.toSmartIri), - ontologySchema = ApiV2Complex, - ) - - appActor ! CreatePropertyRequestV2( - propertyInfoContent = sequenceBoundsPropertyInfoContent, - lastModificationDate = anythingLastModDate, - apiRequestID = UUID.randomUUID, - requestingUser = anythingAdminUser, - ) - - expectMsgPF(timeout) { case msg: ReadOntologyV2 => - val externalOntology = msg.toOntologySchema(ApiV2Complex) - assert(externalOntology.properties.size == 1) - val property = externalOntology.properties(sequenceBoundsPropertyIri) - // check that sequenceBounds is a subproperty of knora-api:hasSequenceBounds - property.entityInfoContent.subPropertyOf.contains( - OntologyConstants.KnoraApiV2Complex.HasSequenceBounds.toSmartIri, - ) should ===(true) - val metadata = externalOntology.ontologyMetadata - val newAnythingLastModDate = metadata.lastModificationDate.getOrElse( - throw AssertionException(s"${metadata.ontologyIri} has no last modification date"), - ) - assert(newAnythingLastModDate.isAfter(anythingLastModDate)) - anythingLastModDate = newAnythingLastModDate - } - } - } } diff --git a/test_data/generated_test_data/ontologyR2RV2/anythingOntologySimple.jsonld b/test_data/generated_test_data/ontologyR2RV2/anythingOntologySimple.jsonld index 62a6c2d4a6..ae6d8e2d84 100644 --- a/test_data/generated_test_data/ontologyR2RV2/anythingOntologySimple.jsonld +++ b/test_data/generated_test_data/ontologyR2RV2/anythingOntologySimple.jsonld @@ -3,66 +3,6 @@ "@type": "owl:Ontology", "rdfs:label": "The anything ontology", "@graph": [ - { - "rdfs:label": "Audio Sequence Thing", - "rdfs:subClassOf": [ - { - "@id": "knora-api:Resource" - }, - { - "@type": "owl:Restriction", - "owl:onProperty": { - "@id": "knora-api:arkUrl" - }, - "owl:cardinality": 1 - }, - { - "@type": "owl:Restriction", - "owl:onProperty": { - "@id": "knora-api:hasIncomingLink" - }, - "owl:minCardinality": 0 - }, - { - "@type": "owl:Restriction", - "owl:onProperty": { - "@id": "knora-api:hasStandoffLinkTo" - }, - "owl:minCardinality": 0 - }, - { - "@type": "owl:Restriction", - "owl:onProperty": { - "@id": "knora-api:versionArkUrl" - }, - "owl:cardinality": 1 - }, - { - "@type": "owl:Restriction", - "owl:onProperty": { - "@id": "rdfs:label" - }, - "owl:cardinality": 1 - }, - { - "@type": "owl:Restriction", - "owl:onProperty": { - "@id": "knora-api:hasSequenceBounds" - }, - "owl:cardinality": 1 - }, - { - "@type": "owl:Restriction", - "owl:onProperty": { - "@id": "knora-api:isSequenceOf" - }, - "owl:cardinality": 1 - } - ], - "rdfs:comment": "A Resource representing a subsequence of an audio", - "@type": "owl:Class", - "@id": "anything:AudioSequenceThing" - }, { "rdfs:label": "Audio Thing", "rdfs:subClassOf": [ @@ -940,66 +880,6 @@ "knora-api:resourceIcon": "thing.png", "@id": "anything:TrivialThing" }, - { - "rdfs:label": "Video Sequence Thing", - "rdfs:subClassOf": [ - { - "@id": "knora-api:Resource" - }, - { - "@type": "owl:Restriction", - "owl:onProperty": { - "@id": "knora-api:arkUrl" - }, - "owl:cardinality": 1 - }, - { - "@type": "owl:Restriction", - "owl:onProperty": { - "@id": "knora-api:hasIncomingLink" - }, - "owl:minCardinality": 0 - }, - { - "@type": "owl:Restriction", - "owl:onProperty": { - "@id": "knora-api:hasStandoffLinkTo" - }, - "owl:minCardinality": 0 - }, - { - "@type": "owl:Restriction", - "owl:onProperty": { - "@id": "knora-api:versionArkUrl" - }, - "owl:cardinality": 1 - }, - { - "@type": "owl:Restriction", - "owl:onProperty": { - "@id": "rdfs:label" - }, - "owl:cardinality": 1 - }, - { - "@type": "owl:Restriction", - "owl:onProperty": { - "@id": "knora-api:hasSequenceBounds" - }, - "owl:cardinality": 1 - }, - { - "@type": "owl:Restriction", - "owl:onProperty": { - "@id": "knora-api:isSequenceOf" - }, - "owl:cardinality": 1 - } - ], - "rdfs:comment": "A Resource representing a subsequence of a video", - "@type": "owl:Class", - "@id": "anything:VideoSequenceThing" - }, { "rdfs:label": "Video Thing", "rdfs:subClassOf": [ diff --git a/test_data/generated_test_data/ontologyR2RV2/anythingOntologyWithValueObjects.jsonld b/test_data/generated_test_data/ontologyR2RV2/anythingOntologyWithValueObjects.jsonld index 5c00fd2800..a7dc109b56 100644 --- a/test_data/generated_test_data/ontologyR2RV2/anythingOntologyWithValueObjects.jsonld +++ b/test_data/generated_test_data/ontologyR2RV2/anythingOntologyWithValueObjects.jsonld @@ -5,179 +5,6 @@ }, "rdfs:label": "The anything ontology", "@graph": [ - { - "knora-api:isResourceClass": true, - "rdfs:label": "Audio Sequence Thing", - "knora-api:canBeInstantiated": true, - "rdfs:subClassOf": [ - { - "@id": "knora-api:Resource" - }, - { - "@type": "owl:Restriction", - "owl:onProperty": { - "@id": "knora-api:arkUrl" - }, - "owl:cardinality": 1, - "knora-api:isInherited": true - }, - { - "@type": "owl:Restriction", - "owl:onProperty": { - "@id": "knora-api:attachedToProject" - }, - "owl:cardinality": 1, - "knora-api:isInherited": true - }, - { - "@type": "owl:Restriction", - "owl:onProperty": { - "@id": "knora-api:attachedToUser" - }, - "owl:cardinality": 1, - "knora-api:isInherited": true - }, - { - "@type": "owl:Restriction", - "owl:onProperty": { - "@id": "knora-api:creationDate" - }, - "owl:cardinality": 1, - "knora-api:isInherited": true - }, - { - "@type": "owl:Restriction", - "owl:onProperty": { - "@id": "knora-api:deleteComment" - }, - "owl:maxCardinality": 1, - "knora-api:isInherited": true - }, - { - "@type": "owl:Restriction", - "owl:onProperty": { - "@id": "knora-api:deleteDate" - }, - "owl:maxCardinality": 1, - "knora-api:isInherited": true - }, - { - "@type": "owl:Restriction", - "owl:onProperty": { - "@id": "knora-api:deletedBy" - }, - "owl:maxCardinality": 1, - "knora-api:isInherited": true - }, - { - "@type": "owl:Restriction", - "owl:onProperty": { - "@id": "knora-api:hasIncomingLinkValue" - }, - "owl:minCardinality": 0, - "knora-api:isInherited": true - }, - { - "@type": "owl:Restriction", - "owl:onProperty": { - "@id": "knora-api:hasPermissions" - }, - "owl:cardinality": 1, - "knora-api:isInherited": true - }, - { - "@type": "owl:Restriction", - "owl:onProperty": { - "@id": "knora-api:hasStandoffLinkTo" - }, - "owl:minCardinality": 0, - "knora-api:isInherited": true - }, - { - "@type": "owl:Restriction", - "owl:onProperty": { - "@id": "knora-api:hasStandoffLinkToValue" - }, - "owl:minCardinality": 0, - "knora-api:isInherited": true - }, - { - "@type": "owl:Restriction", - "owl:onProperty": { - "@id": "knora-api:isDeleted" - }, - "owl:maxCardinality": 1, - "knora-api:isInherited": true - }, - { - "@type": "owl:Restriction", - "owl:onProperty": { - "@id": "knora-api:lastModificationDate" - }, - "owl:maxCardinality": 1, - "knora-api:isInherited": true - }, - { - "@type": "owl:Restriction", - "owl:onProperty": { - "@id": "knora-api:userHasPermission" - }, - "owl:cardinality": 1, - "knora-api:isInherited": true - }, - { - "@type": "owl:Restriction", - "owl:onProperty": { - "@id": "knora-api:versionArkUrl" - }, - "owl:cardinality": 1, - "knora-api:isInherited": true - }, - { - "@type": "owl:Restriction", - "owl:onProperty": { - "@id": "knora-api:versionDate" - }, - "owl:maxCardinality": 1, - "knora-api:isInherited": true - }, - { - "@type": "owl:Restriction", - "owl:onProperty": { - "@id": "rdfs:label" - }, - "owl:cardinality": 1, - "knora-api:isInherited": true - }, - { - "@type": "owl:Restriction", - "owl:onProperty": { - "@id": "knora-api:hasSequenceBounds" - }, - "owl:cardinality": 1, - "salsah-gui:guiOrder": 0 - }, - { - "@type": "owl:Restriction", - "owl:onProperty": { - "@id": "knora-api:isSequenceOf" - }, - "owl:cardinality": 1, - "salsah-gui:guiOrder": 0 - }, - { - "@type": "owl:Restriction", - "owl:onProperty": { - "@id": "knora-api:isSequenceOfValue" - }, - "owl:cardinality": 1, - "salsah-gui:guiOrder": 0 - } - ], - "rdfs:comment": "A Resource representing a subsequence of an audio", - "@type": "owl:Class", - "@id": "anything:AudioSequenceThing" - }, { "knora-api:isResourceClass": true, "rdfs:label": "Audio Thing", @@ -2345,179 +2172,6 @@ "@type": "owl:Class", "@id": "anything:TrivialThing" }, - { - "knora-api:isResourceClass": true, - "rdfs:label": "Video Sequence Thing", - "knora-api:canBeInstantiated": true, - "rdfs:subClassOf": [ - { - "@id": "knora-api:Resource" - }, - { - "@type": "owl:Restriction", - "owl:onProperty": { - "@id": "knora-api:arkUrl" - }, - "owl:cardinality": 1, - "knora-api:isInherited": true - }, - { - "@type": "owl:Restriction", - "owl:onProperty": { - "@id": "knora-api:attachedToProject" - }, - "owl:cardinality": 1, - "knora-api:isInherited": true - }, - { - "@type": "owl:Restriction", - "owl:onProperty": { - "@id": "knora-api:attachedToUser" - }, - "owl:cardinality": 1, - "knora-api:isInherited": true - }, - { - "@type": "owl:Restriction", - "owl:onProperty": { - "@id": "knora-api:creationDate" - }, - "owl:cardinality": 1, - "knora-api:isInherited": true - }, - { - "@type": "owl:Restriction", - "owl:onProperty": { - "@id": "knora-api:deleteComment" - }, - "owl:maxCardinality": 1, - "knora-api:isInherited": true - }, - { - "@type": "owl:Restriction", - "owl:onProperty": { - "@id": "knora-api:deleteDate" - }, - "owl:maxCardinality": 1, - "knora-api:isInherited": true - }, - { - "@type": "owl:Restriction", - "owl:onProperty": { - "@id": "knora-api:deletedBy" - }, - "owl:maxCardinality": 1, - "knora-api:isInherited": true - }, - { - "@type": "owl:Restriction", - "owl:onProperty": { - "@id": "knora-api:hasIncomingLinkValue" - }, - "owl:minCardinality": 0, - "knora-api:isInherited": true - }, - { - "@type": "owl:Restriction", - "owl:onProperty": { - "@id": "knora-api:hasPermissions" - }, - "owl:cardinality": 1, - "knora-api:isInherited": true - }, - { - "@type": "owl:Restriction", - "owl:onProperty": { - "@id": "knora-api:hasStandoffLinkTo" - }, - "owl:minCardinality": 0, - "knora-api:isInherited": true - }, - { - "@type": "owl:Restriction", - "owl:onProperty": { - "@id": "knora-api:hasStandoffLinkToValue" - }, - "owl:minCardinality": 0, - "knora-api:isInherited": true - }, - { - "@type": "owl:Restriction", - "owl:onProperty": { - "@id": "knora-api:isDeleted" - }, - "owl:maxCardinality": 1, - "knora-api:isInherited": true - }, - { - "@type": "owl:Restriction", - "owl:onProperty": { - "@id": "knora-api:lastModificationDate" - }, - "owl:maxCardinality": 1, - "knora-api:isInherited": true - }, - { - "@type": "owl:Restriction", - "owl:onProperty": { - "@id": "knora-api:userHasPermission" - }, - "owl:cardinality": 1, - "knora-api:isInherited": true - }, - { - "@type": "owl:Restriction", - "owl:onProperty": { - "@id": "knora-api:versionArkUrl" - }, - "owl:cardinality": 1, - "knora-api:isInherited": true - }, - { - "@type": "owl:Restriction", - "owl:onProperty": { - "@id": "knora-api:versionDate" - }, - "owl:maxCardinality": 1, - "knora-api:isInherited": true - }, - { - "@type": "owl:Restriction", - "owl:onProperty": { - "@id": "rdfs:label" - }, - "owl:cardinality": 1, - "knora-api:isInherited": true - }, - { - "@type": "owl:Restriction", - "owl:onProperty": { - "@id": "knora-api:hasSequenceBounds" - }, - "owl:cardinality": 1, - "salsah-gui:guiOrder": 0 - }, - { - "@type": "owl:Restriction", - "owl:onProperty": { - "@id": "knora-api:isSequenceOf" - }, - "owl:cardinality": 1, - "salsah-gui:guiOrder": 0 - }, - { - "@type": "owl:Restriction", - "owl:onProperty": { - "@id": "knora-api:isSequenceOfValue" - }, - "owl:cardinality": 1, - "salsah-gui:guiOrder": 0 - } - ], - "rdfs:comment": "A Resource representing a subsequence of a video", - "@type": "owl:Class", - "@id": "anything:VideoSequenceThing" - }, { "knora-api:isResourceClass": true, "rdfs:label": "Video Thing", diff --git a/test_data/generated_test_data/ontologyR2RV2/anythingOntologyWithValueObjects.ttl b/test_data/generated_test_data/ontologyR2RV2/anythingOntologyWithValueObjects.ttl index f224ad04fd..1b96b384b0 100644 --- a/test_data/generated_test_data/ontologyR2RV2/anythingOntologyWithValueObjects.ttl +++ b/test_data/generated_test_data/ontologyR2RV2/anythingOntologyWithValueObjects.ttl @@ -1,2005 +1,3199 @@ -@prefix anything: . -@prefix knora-api: . -@prefix owl: . -@prefix rdf: . -@prefix rdfs: . -@prefix salsah-gui: . -@prefix xsd: . + + a ; + + "Title"; + + ; + + true; + + true; + + ; + + ; + + "maxlength=255" , "size=80"; + + . -anything:isPartOfOtherThingValue - rdf:type owl:ObjectProperty ; - rdfs:label "is part of" ; - rdfs:subPropertyOf knora-api:isPartOfValue ; - knora-api:isEditable true ; - knora-api:isLinkValueProperty true ; - knora-api:isResourceProperty true ; - knora-api:objectType knora-api:LinkValue ; - knora-api:subjectType anything:Thing ; - salsah-gui:guiElement salsah-gui:Searchbox . + + a ; + + "A thing with a representation"; + + "Thing with representation"; + + ; + + [ a ; + + true; + + 1; + + + ]; + + [ a ; + + true; + + 1; + + + ]; + + [ a ; + + 0; + + + ]; + + [ a ; + + true; + + 1; + + + ]; + + [ a ; + + true; + + 1; + + + ]; + + [ a ; + + true; + + 1; + + + ]; + + [ a ; + + true; + + 1; + + + ]; + + [ a ; + + true; + + 0; + + + ]; + + [ a ; + + true; + + 1; + + + ]; + + [ a ; + + true; + + 1; + + + ]; + + [ a ; + + true; + + 1; + + + ]; + + [ a ; + + true; + + 0; + + + ]; + + [ a ; + + true; + + 1; + + + ]; + + [ a ; + + 0; + + + ]; + + [ a ; + + true; + + 0; + + + ]; + + [ a ; + + true; + + 1; + + + ]; + + [ a ; + + true; + + 1; + + + ]; + + [ a ; + + true; + + 1; + + + ]; + + [ a ; + + true; + + 1; + + + ]; + + true; + + true . -anything:hasOtherThingValue - rdf:type owl:ObjectProperty ; - rdfs:label "Another thing" ; - rdfs:subPropertyOf knora-api:hasLinkToValue ; - knora-api:isEditable true ; - knora-api:isLinkValueProperty true ; - knora-api:isResourceProperty true ; - knora-api:objectType knora-api:LinkValue ; - knora-api:subjectType anything:Thing ; - salsah-gui:guiElement salsah-gui:Searchbox . + + a ; + + "A thing with a region"; + + "Thing with region"; + + ; + + [ a ; + + true; + + 1; + + + ]; + + [ a ; + + true; + + 1; + + + ]; + + [ a ; + + true; + + 1; + + + ]; + + [ a ; + + true; + + 0; + + + ]; + + [ a ; + + true; + + 0; + + + ]; + + [ a ; + + true; + + 0; + + + ]; + + [ a ; + + true; + + 1; + + + ]; + + [ a ; + + 0; + + + ]; + + [ a ; + + true; + + 1; + + + ]; + + [ a ; + + true; + + 1; + + + ]; + + [ a ; + + true; + + 1; + + + ]; + + [ a ; + + 0; + + + ]; + + [ a ; + + true; + + 1; + + + ]; + + [ a ; + + true; + + 1; + + + ]; + + [ a ; + + true; + + 1; + + + ]; + + [ a ; + + true; + + 1; + + + ]; + + [ a ; + + true; + + 1; + + + ]; + + [ a ; + + true; + + 1; + + + ]; + + [ a ; + + true; + + 1; + + + ]; + + true; + + true . -anything:ThingDocument - rdf:type owl:Class ; - rdfs:comment "A document about a thing" ; - rdfs:label "Document" ; - rdfs:subClassOf knora-api:DocumentRepresentation ; - rdfs:subClassOf [ rdf:type owl:Restriction ; - knora-api:isInherited true ; - owl:maxCardinality 1 ; - owl:onProperty knora-api:deletedBy - ] ; - rdfs:subClassOf [ rdf:type owl:Restriction ; - knora-api:isInherited true ; - owl:cardinality 1 ; - owl:onProperty rdfs:label - ] ; - rdfs:subClassOf [ rdf:type owl:Restriction ; - knora-api:isInherited true ; - owl:maxCardinality 1 ; - owl:onProperty knora-api:deleteComment - ] ; - rdfs:subClassOf [ rdf:type owl:Restriction ; - knora-api:isInherited true ; - owl:maxCardinality 1 ; - owl:onProperty knora-api:lastModificationDate - ] ; - rdfs:subClassOf [ rdf:type owl:Restriction ; - knora-api:isInherited true ; - owl:maxCardinality 1 ; - owl:onProperty knora-api:isDeleted - ] ; - rdfs:subClassOf [ rdf:type owl:Restriction ; - owl:minCardinality 0 ; - owl:onProperty anything:hasDocumentTitle - ] ; - rdfs:subClassOf [ rdf:type owl:Restriction ; - knora-api:isInherited true ; - owl:minCardinality 0 ; - owl:onProperty knora-api:hasStandoffLinkTo - ] ; - rdfs:subClassOf [ rdf:type owl:Restriction ; - knora-api:isInherited true ; - owl:cardinality 1 ; - owl:onProperty knora-api:hasDocumentFileValue - ] ; - rdfs:subClassOf [ rdf:type owl:Restriction ; - knora-api:isInherited true ; - owl:cardinality 1 ; - owl:onProperty knora-api:hasPermissions - ] ; - rdfs:subClassOf [ rdf:type owl:Restriction ; - knora-api:isInherited true ; - owl:maxCardinality 1 ; - owl:onProperty knora-api:versionDate - ] ; - rdfs:subClassOf [ rdf:type owl:Restriction ; - knora-api:isInherited true ; - owl:cardinality 1 ; - owl:onProperty knora-api:attachedToProject - ] ; - rdfs:subClassOf [ rdf:type owl:Restriction ; - knora-api:isInherited true ; - owl:cardinality 1 ; - owl:onProperty knora-api:arkUrl - ] ; - rdfs:subClassOf [ rdf:type owl:Restriction ; - knora-api:isInherited true ; - owl:minCardinality 0 ; - owl:onProperty knora-api:hasIncomingLinkValue - ] ; - rdfs:subClassOf [ rdf:type owl:Restriction ; - knora-api:isInherited true ; - owl:cardinality 1 ; - owl:onProperty knora-api:attachedToUser - ] ; - rdfs:subClassOf [ rdf:type owl:Restriction ; - knora-api:isInherited true ; - owl:minCardinality 0 ; - owl:onProperty knora-api:hasStandoffLinkToValue - ] ; - rdfs:subClassOf [ rdf:type owl:Restriction ; - knora-api:isInherited true ; - owl:cardinality 1 ; - owl:onProperty knora-api:creationDate - ] ; - rdfs:subClassOf [ rdf:type owl:Restriction ; - knora-api:isInherited true ; - owl:maxCardinality 1 ; - owl:onProperty knora-api:deleteDate - ] ; - rdfs:subClassOf [ rdf:type owl:Restriction ; - knora-api:isInherited true ; - owl:cardinality 1 ; - owl:onProperty knora-api:userHasPermission - ] ; - rdfs:subClassOf [ rdf:type owl:Restriction ; - knora-api:isInherited true ; - owl:cardinality 1 ; - owl:onProperty knora-api:versionArkUrl - ] ; - knora-api:canBeInstantiated true ; - knora-api:isResourceClass true ; - knora-api:resourceIcon "thing.png" . + + a ; + + "Another thing"; + + ; + + true; + + true; + + true; + + ; + + ; + + . -anything:VideoSequenceThing - rdf:type owl:Class ; - rdfs:comment "A Resource representing a subsequence of a video" ; - rdfs:label "Video Sequence Thing" ; - rdfs:subClassOf knora-api:Resource ; - rdfs:subClassOf [ rdf:type owl:Restriction ; - knora-api:isInherited true ; - owl:minCardinality 0 ; - owl:onProperty knora-api:hasStandoffLinkToValue - ] ; - rdfs:subClassOf [ rdf:type owl:Restriction ; - knora-api:isInherited true ; - owl:cardinality 1 ; - owl:onProperty knora-api:attachedToProject - ] ; - rdfs:subClassOf [ rdf:type owl:Restriction ; - knora-api:isInherited true ; - owl:minCardinality 0 ; - owl:onProperty knora-api:hasIncomingLinkValue - ] ; - rdfs:subClassOf [ rdf:type owl:Restriction ; - salsah-gui:guiOrder 0 ; - owl:cardinality 1 ; - owl:onProperty knora-api:isSequenceOfValue - ] ; - rdfs:subClassOf [ rdf:type owl:Restriction ; - knora-api:isInherited true ; - owl:maxCardinality 1 ; - owl:onProperty knora-api:versionDate - ] ; - rdfs:subClassOf [ rdf:type owl:Restriction ; - knora-api:isInherited true ; - owl:cardinality 1 ; - owl:onProperty knora-api:versionArkUrl - ] ; - rdfs:subClassOf [ rdf:type owl:Restriction ; - knora-api:isInherited true ; - owl:maxCardinality 1 ; - owl:onProperty knora-api:lastModificationDate - ] ; - rdfs:subClassOf [ rdf:type owl:Restriction ; - knora-api:isInherited true ; - owl:cardinality 1 ; - owl:onProperty knora-api:hasPermissions - ] ; - rdfs:subClassOf [ rdf:type owl:Restriction ; - salsah-gui:guiOrder 0 ; - owl:cardinality 1 ; - owl:onProperty knora-api:isSequenceOf - ] ; - rdfs:subClassOf [ rdf:type owl:Restriction ; - knora-api:isInherited true ; - owl:cardinality 1 ; - owl:onProperty knora-api:attachedToUser - ] ; - rdfs:subClassOf [ rdf:type owl:Restriction ; - knora-api:isInherited true ; - owl:maxCardinality 1 ; - owl:onProperty knora-api:deleteDate - ] ; - rdfs:subClassOf [ rdf:type owl:Restriction ; - knora-api:isInherited true ; - owl:cardinality 1 ; - owl:onProperty knora-api:creationDate - ] ; - rdfs:subClassOf [ rdf:type owl:Restriction ; - knora-api:isInherited true ; - owl:minCardinality 0 ; - owl:onProperty knora-api:hasStandoffLinkTo - ] ; - rdfs:subClassOf [ rdf:type owl:Restriction ; - knora-api:isInherited true ; - owl:maxCardinality 1 ; - owl:onProperty knora-api:deletedBy - ] ; - rdfs:subClassOf [ rdf:type owl:Restriction ; - knora-api:isInherited true ; - owl:cardinality 1 ; - owl:onProperty knora-api:userHasPermission - ] ; - rdfs:subClassOf [ rdf:type owl:Restriction ; - knora-api:isInherited true ; - owl:cardinality 1 ; - owl:onProperty knora-api:arkUrl - ] ; - rdfs:subClassOf [ rdf:type owl:Restriction ; - salsah-gui:guiOrder 0 ; - owl:cardinality 1 ; - owl:onProperty knora-api:hasSequenceBounds - ] ; - rdfs:subClassOf [ rdf:type owl:Restriction ; - knora-api:isInherited true ; - owl:maxCardinality 1 ; - owl:onProperty knora-api:deleteComment - ] ; - rdfs:subClassOf [ rdf:type owl:Restriction ; - knora-api:isInherited true ; - owl:cardinality 1 ; - owl:onProperty rdfs:label - ] ; - rdfs:subClassOf [ rdf:type owl:Restriction ; - knora-api:isInherited true ; - owl:maxCardinality 1 ; - owl:onProperty knora-api:isDeleted - ] ; - knora-api:canBeInstantiated true ; - knora-api:isResourceClass true . + + a ; + + "has region"; + + ; + + true; + + true; + + true; + + ; + + . -anything:ThingWithSeqnum - rdf:type owl:Class ; - rdfs:comment "Diese Resource-Klasse beschreibt ein Ding mit einer Sequenznummer" ; - rdfs:label "Thing with sequence number" ; - rdfs:subClassOf anything:Thing ; - rdfs:subClassOf [ rdf:type owl:Restriction ; - knora-api:isInherited true ; - owl:cardinality 1 ; - owl:onProperty knora-api:arkUrl - ] ; - rdfs:subClassOf [ rdf:type owl:Restriction ; - knora-api:isInherited true ; - salsah-gui:guiOrder 6 ; - owl:maxCardinality 1 ; - owl:onProperty anything:hasBoolean - ] ; - rdfs:subClassOf [ rdf:type owl:Restriction ; - knora-api:isInherited true ; - salsah-gui:guiOrder 5 ; - owl:minCardinality 0 ; - owl:onProperty anything:hasDecimal - ] ; - rdfs:subClassOf [ rdf:type owl:Restriction ; - knora-api:isInherited true ; - owl:cardinality 1 ; - owl:onProperty knora-api:creationDate - ] ; - rdfs:subClassOf [ rdf:type owl:Restriction ; - knora-api:isInherited true ; - salsah-gui:guiOrder 13 ; - owl:minCardinality 0 ; - owl:onProperty anything:hasThingDocumentValue - ] ; - rdfs:subClassOf [ rdf:type owl:Restriction ; - knora-api:isInherited true ; - owl:cardinality 1 ; - owl:onProperty knora-api:attachedToUser - ] ; - rdfs:subClassOf [ rdf:type owl:Restriction ; - knora-api:isInherited true ; - salsah-gui:guiOrder 11 ; - owl:minCardinality 0 ; - owl:onProperty anything:hasGeometry - ] ; - rdfs:subClassOf [ rdf:type owl:Restriction ; - knora-api:isInherited true ; - salsah-gui:guiOrder 15 ; - owl:minCardinality 0 ; - owl:onProperty anything:isPartOfOtherThing - ] ; - rdfs:subClassOf [ rdf:type owl:Restriction ; - knora-api:isInherited true ; - owl:maxCardinality 1 ; - owl:onProperty knora-api:lastModificationDate - ] ; - rdfs:subClassOf [ rdf:type owl:Restriction ; - knora-api:isInherited true ; - salsah-gui:guiOrder 15 ; - owl:minCardinality 0 ; - owl:onProperty anything:isPartOfOtherThingValue - ] ; - rdfs:subClassOf [ rdf:type owl:Restriction ; - knora-api:isInherited true ; - salsah-gui:guiOrder 3 ; - owl:minCardinality 0 ; - owl:onProperty anything:hasDate - ] ; - rdfs:subClassOf [ rdf:type owl:Restriction ; - knora-api:isInherited true ; - salsah-gui:guiOrder 13 ; - owl:minCardinality 0 ; - owl:onProperty anything:hasThingPicture - ] ; - rdfs:subClassOf [ rdf:type owl:Restriction ; - knora-api:isInherited true ; - salsah-gui:guiOrder 9 ; - owl:minCardinality 0 ; - owl:onProperty anything:hasInterval - ] ; - rdfs:subClassOf [ rdf:type owl:Restriction ; - knora-api:isInherited true ; - owl:maxCardinality 1 ; - owl:onProperty knora-api:versionDate - ] ; - rdfs:subClassOf [ rdf:type owl:Restriction ; - knora-api:isInherited true ; - salsah-gui:guiOrder 10 ; - owl:minCardinality 0 ; - owl:onProperty anything:hasColor - ] ; - rdfs:subClassOf [ rdf:type owl:Restriction ; - knora-api:isInherited true ; - owl:cardinality 1 ; - owl:onProperty knora-api:attachedToProject - ] ; - rdfs:subClassOf [ rdf:type owl:Restriction ; - knora-api:isInherited true ; - owl:maxCardinality 1 ; - owl:onProperty knora-api:deleteComment - ] ; - rdfs:subClassOf [ rdf:type owl:Restriction ; - knora-api:isInherited true ; - owl:minCardinality 0 ; - owl:onProperty knora-api:hasIncomingLinkValue - ] ; - rdfs:subClassOf [ rdf:type owl:Restriction ; - salsah-gui:guiOrder 100 ; - owl:minCardinality 0 ; - owl:onProperty knora-api:seqnum - ] ; - rdfs:subClassOf [ rdf:type owl:Restriction ; - knora-api:isInherited true ; - owl:cardinality 1 ; - owl:onProperty knora-api:hasPermissions - ] ; - rdfs:subClassOf [ rdf:type owl:Restriction ; - knora-api:isInherited true ; - salsah-gui:guiOrder 13 ; - owl:minCardinality 0 ; - owl:onProperty anything:hasThingDocument - ] ; - rdfs:subClassOf [ rdf:type owl:Restriction ; - knora-api:isInherited true ; - owl:minCardinality 0 ; - owl:onProperty knora-api:hasStandoffLinkToValue - ] ; - rdfs:subClassOf [ rdf:type owl:Restriction ; - knora-api:isInherited true ; - salsah-gui:guiOrder 12 ; - owl:minCardinality 0 ; - owl:onProperty anything:hasGeoname - ] ; - rdfs:subClassOf [ rdf:type owl:Restriction ; - knora-api:isInherited true ; - salsah-gui:guiOrder 7 ; - owl:minCardinality 0 ; - owl:onProperty anything:hasUri - ] ; - rdfs:subClassOf [ rdf:type owl:Restriction ; - knora-api:isInherited true ; - salsah-gui:guiOrder 0 ; - owl:minCardinality 0 ; - owl:onProperty anything:hasOtherListItem - ] ; - rdfs:subClassOf [ rdf:type owl:Restriction ; - knora-api:isInherited true ; - salsah-gui:guiOrder 0 ; - owl:minCardinality 0 ; - owl:onProperty anything:hasListItem - ] ; - rdfs:subClassOf [ rdf:type owl:Restriction ; - knora-api:isInherited true ; - owl:maxCardinality 1 ; - owl:onProperty knora-api:deleteDate - ] ; - rdfs:subClassOf [ rdf:type owl:Restriction ; - knora-api:isInherited true ; - owl:cardinality 1 ; - owl:onProperty knora-api:versionArkUrl - ] ; - rdfs:subClassOf [ rdf:type owl:Restriction ; - knora-api:isInherited true ; - salsah-gui:guiOrder 13 ; - owl:minCardinality 0 ; - owl:onProperty anything:hasThingPictureValue - ] ; - rdfs:subClassOf [ rdf:type owl:Restriction ; - knora-api:isInherited true ; - salsah-gui:guiOrder 1 ; - owl:minCardinality 0 ; - owl:onProperty anything:hasOtherThingValue - ] ; - rdfs:subClassOf [ rdf:type owl:Restriction ; - knora-api:isInherited true ; - owl:cardinality 1 ; - owl:onProperty rdfs:label - ] ; - rdfs:subClassOf [ rdf:type owl:Restriction ; - knora-api:isInherited true ; - owl:cardinality 1 ; - owl:onProperty knora-api:userHasPermission - ] ; - rdfs:subClassOf [ rdf:type owl:Restriction ; - knora-api:isInherited true ; - salsah-gui:guiOrder 1 ; - owl:minCardinality 0 ; - owl:onProperty anything:hasOtherThing - ] ; - rdfs:subClassOf [ rdf:type owl:Restriction ; - knora-api:isInherited true ; - owl:maxCardinality 1 ; - owl:onProperty knora-api:deletedBy - ] ; - rdfs:subClassOf [ rdf:type owl:Restriction ; - knora-api:isInherited true ; - salsah-gui:guiOrder 13 ; - owl:minCardinality 0 ; - owl:onProperty anything:hasTimeStamp - ] ; - rdfs:subClassOf [ rdf:type owl:Restriction ; - knora-api:isInherited true ; - salsah-gui:guiOrder 2 ; - owl:minCardinality 0 ; - owl:onProperty anything:hasText - ] ; - rdfs:subClassOf [ rdf:type owl:Restriction ; - knora-api:isInherited true ; - owl:minCardinality 0 ; - owl:onProperty knora-api:hasStandoffLinkTo - ] ; - rdfs:subClassOf [ rdf:type owl:Restriction ; - knora-api:isInherited true ; - salsah-gui:guiOrder 4 ; - owl:minCardinality 0 ; - owl:onProperty anything:hasInteger - ] ; - rdfs:subClassOf [ rdf:type owl:Restriction ; - knora-api:isInherited true ; - salsah-gui:guiOrder 2 ; - owl:minCardinality 0 ; - owl:onProperty anything:hasRichtext - ] ; - rdfs:subClassOf [ rdf:type owl:Restriction ; - knora-api:isInherited true ; - owl:maxCardinality 1 ; - owl:onProperty knora-api:isDeleted - ] ; - knora-api:canBeInstantiated true ; - knora-api:isResourceClass true . + + a ; + + "Decimal number"; + + ; + + true; + + true; + + ; + + ; + + "maxlength=255" , "size=80"; + + . -anything:StandoffEventTag - rdf:type owl:Class ; - rdfs:comment "Represents an event in a TextValue" ; - rdfs:label "Represents an event in a TextValue" ; - rdfs:subClassOf knora-api:StandoffDateTag ; - rdfs:subClassOf [ rdf:type owl:Restriction ; - knora-api:isInherited true ; - owl:cardinality 1 ; - owl:onProperty knora-api:standoffTagHasEnd - ] ; - rdfs:subClassOf [ rdf:type owl:Restriction ; - knora-api:isInherited true ; - owl:maxCardinality 1 ; - owl:onProperty knora-api:dateValueHasEndMonth - ] ; - rdfs:subClassOf [ rdf:type owl:Restriction ; - knora-api:isInherited true ; - owl:cardinality 1 ; - owl:onProperty knora-api:standoffTagHasStart - ] ; - rdfs:subClassOf [ rdf:type owl:Restriction ; - knora-api:isInherited true ; - owl:maxCardinality 1 ; - owl:onProperty knora-api:standoffTagHasStartParentIndex - ] ; - rdfs:subClassOf [ rdf:type owl:Restriction ; - knora-api:isInherited true ; - owl:cardinality 1 ; - owl:onProperty knora-api:dateValueHasStartEra - ] ; - rdfs:subClassOf [ rdf:type owl:Restriction ; - knora-api:isInherited true ; - owl:cardinality 1 ; - owl:onProperty knora-api:dateValueHasEndEra - ] ; - rdfs:subClassOf [ rdf:type owl:Restriction ; - knora-api:isInherited true ; - owl:maxCardinality 1 ; - owl:onProperty knora-api:standoffTagHasEndParent - ] ; - rdfs:subClassOf [ rdf:type owl:Restriction ; - knora-api:isInherited true ; - owl:maxCardinality 1 ; - owl:onProperty knora-api:standoffTagHasOriginalXMLID - ] ; - rdfs:subClassOf [ rdf:type owl:Restriction ; - knora-api:isInherited true ; - owl:cardinality 1 ; - owl:onProperty knora-api:dateValueHasStartYear - ] ; - rdfs:subClassOf [ rdf:type owl:Restriction ; - knora-api:isInherited true ; - owl:cardinality 1 ; - owl:onProperty knora-api:standoffTagHasStartIndex - ] ; - rdfs:subClassOf [ rdf:type owl:Restriction ; - knora-api:isInherited true ; - owl:maxCardinality 1 ; - owl:onProperty knora-api:standoffTagHasStartParent - ] ; - rdfs:subClassOf [ rdf:type owl:Restriction ; - knora-api:isInherited true ; - owl:maxCardinality 1 ; - owl:onProperty knora-api:dateValueHasStartMonth - ] ; - rdfs:subClassOf [ rdf:type owl:Restriction ; - knora-api:isInherited true ; - owl:maxCardinality 1 ; - owl:onProperty knora-api:dateValueHasStartDay - ] ; - rdfs:subClassOf [ rdf:type owl:Restriction ; - knora-api:isInherited true ; - owl:cardinality 1 ; - owl:onProperty knora-api:standoffTagHasUUID - ] ; - rdfs:subClassOf [ rdf:type owl:Restriction ; - knora-api:isInherited true ; - owl:cardinality 1 ; - owl:onProperty knora-api:dateValueHasCalendar - ] ; - rdfs:subClassOf [ rdf:type owl:Restriction ; - owl:cardinality 1 ; - owl:onProperty anything:standoffEventTagHasDescription - ] ; - rdfs:subClassOf [ rdf:type owl:Restriction ; - knora-api:isInherited true ; - owl:maxCardinality 1 ; - owl:onProperty knora-api:standoffTagHasEndIndex - ] ; - rdfs:subClassOf [ rdf:type owl:Restriction ; - knora-api:isInherited true ; - owl:cardinality 1 ; - owl:onProperty knora-api:dateValueHasEndYear - ] ; - rdfs:subClassOf [ rdf:type owl:Restriction ; - knora-api:isInherited true ; - owl:maxCardinality 1 ; - owl:onProperty knora-api:standoffTagHasEndParentIndex - ] ; - rdfs:subClassOf [ rdf:type owl:Restriction ; - knora-api:isInherited true ; - owl:maxCardinality 1 ; - owl:onProperty knora-api:dateValueHasEndDay - ] ; - knora-api:isStandoffClass true . + + a ; + + "is part of"; + + ; + + true; + + true; + + true; + + ; + + ; + + . -anything:hasThingPicture - rdf:type owl:ObjectProperty ; - rdfs:label "Picture of a thing" ; - rdfs:subPropertyOf knora-api:hasRepresentation ; - knora-api:isEditable true ; - knora-api:isLinkProperty true ; - knora-api:isResourceProperty true ; - knora-api:objectType anything:ThingPicture ; - knora-api:subjectType anything:Thing ; - salsah-gui:guiElement salsah-gui:Searchbox . + + a ; + + "Boolean value"; + + ; + + true; + + true; + + ; + + ; + + . -anything:hasTimeStamp - rdf:type owl:ObjectProperty ; - rdfs:label "Timestamp" ; - rdfs:subPropertyOf knora-api:hasValue ; - knora-api:isEditable true ; - knora-api:isResourceProperty true ; - knora-api:objectType knora-api:TimeValue ; - knora-api:subjectType anything:Thing ; - salsah-gui:guiElement salsah-gui:TimeStamp . + + a ; + + "Text"; + + ; + + true; + + true; + + ; + + ; + + "maxlength=255" , "size=80"; + + . -anything:hasListItem rdf:type owl:ObjectProperty ; - rdfs:label "List element" ; - rdfs:subPropertyOf knora-api:hasValue ; - knora-api:isEditable true ; - knora-api:isResourceProperty true ; - knora-api:objectType knora-api:ListValue ; - knora-api:subjectType anything:Thing ; - salsah-gui:guiAttribute "hlist=" ; - salsah-gui:guiElement salsah-gui:List . + + a ; + + "A blue thing"; + + ; + + true; + + true; + + true; + + ; + + ; + + . -anything:BlueThing rdf:type owl:Class ; - rdfs:comment "Diese Resource-Klasse beschreibt ein blaues Ding" ; - rdfs:label "Blue thing" ; - rdfs:subClassOf anything:Thing ; - rdfs:subClassOf [ rdf:type owl:Restriction ; - knora-api:isInherited true ; - salsah-gui:guiOrder 5 ; - owl:minCardinality 0 ; - owl:onProperty anything:hasDecimal - ] ; - rdfs:subClassOf [ rdf:type owl:Restriction ; - knora-api:isInherited true ; - owl:maxCardinality 1 ; - owl:onProperty knora-api:versionDate - ] ; - rdfs:subClassOf [ rdf:type owl:Restriction ; - knora-api:isInherited true ; - owl:minCardinality 0 ; - owl:onProperty knora-api:hasStandoffLinkTo - ] ; - rdfs:subClassOf [ rdf:type owl:Restriction ; - salsah-gui:guiOrder 63 ; - owl:minCardinality 0 ; - owl:onProperty anything:hasBlueThing - ] ; - rdfs:subClassOf [ rdf:type owl:Restriction ; - knora-api:isInherited true ; - owl:cardinality 1 ; - owl:onProperty rdfs:label - ] ; - rdfs:subClassOf [ rdf:type owl:Restriction ; - knora-api:isInherited true ; - salsah-gui:guiOrder 0 ; - owl:minCardinality 0 ; - owl:onProperty anything:hasOtherListItem - ] ; - rdfs:subClassOf [ rdf:type owl:Restriction ; - knora-api:isInherited true ; - salsah-gui:guiOrder 2 ; - owl:minCardinality 0 ; - owl:onProperty anything:hasText - ] ; - rdfs:subClassOf [ rdf:type owl:Restriction ; - knora-api:isInherited true ; - owl:maxCardinality 1 ; - owl:onProperty knora-api:deleteDate - ] ; - rdfs:subClassOf [ rdf:type owl:Restriction ; - knora-api:isInherited true ; - owl:cardinality 1 ; - owl:onProperty knora-api:userHasPermission - ] ; - rdfs:subClassOf [ rdf:type owl:Restriction ; - knora-api:isInherited true ; - salsah-gui:guiOrder 9 ; - owl:minCardinality 0 ; - owl:onProperty anything:hasInterval - ] ; - rdfs:subClassOf [ rdf:type owl:Restriction ; - knora-api:isInherited true ; - salsah-gui:guiOrder 12 ; - owl:minCardinality 0 ; - owl:onProperty anything:hasGeoname - ] ; - rdfs:subClassOf [ rdf:type owl:Restriction ; - knora-api:isInherited true ; - owl:maxCardinality 1 ; - owl:onProperty knora-api:lastModificationDate - ] ; - rdfs:subClassOf [ rdf:type owl:Restriction ; - knora-api:isInherited true ; - owl:maxCardinality 1 ; - owl:onProperty knora-api:deletedBy - ] ; - rdfs:subClassOf [ rdf:type owl:Restriction ; - knora-api:isInherited true ; - salsah-gui:guiOrder 15 ; - owl:minCardinality 0 ; - owl:onProperty anything:isPartOfOtherThingValue - ] ; - rdfs:subClassOf [ rdf:type owl:Restriction ; - knora-api:isInherited true ; - owl:minCardinality 0 ; - owl:onProperty knora-api:hasStandoffLinkToValue - ] ; - rdfs:subClassOf [ rdf:type owl:Restriction ; - knora-api:isInherited true ; - owl:cardinality 1 ; - owl:onProperty knora-api:arkUrl - ] ; - rdfs:subClassOf [ rdf:type owl:Restriction ; - knora-api:isInherited true ; - salsah-gui:guiOrder 15 ; - owl:minCardinality 0 ; - owl:onProperty anything:isPartOfOtherThing - ] ; - rdfs:subClassOf [ rdf:type owl:Restriction ; - knora-api:isInherited true ; - salsah-gui:guiOrder 6 ; - owl:maxCardinality 1 ; - owl:onProperty anything:hasBoolean - ] ; - rdfs:subClassOf [ rdf:type owl:Restriction ; - knora-api:isInherited true ; - owl:maxCardinality 1 ; - owl:onProperty knora-api:deleteComment - ] ; - rdfs:subClassOf [ rdf:type owl:Restriction ; - knora-api:isInherited true ; - salsah-gui:guiOrder 11 ; - owl:minCardinality 0 ; - owl:onProperty anything:hasGeometry - ] ; - rdfs:subClassOf [ rdf:type owl:Restriction ; - knora-api:isInherited true ; - salsah-gui:guiOrder 13 ; - owl:minCardinality 0 ; - owl:onProperty anything:hasThingDocument - ] ; - rdfs:subClassOf [ rdf:type owl:Restriction ; - knora-api:isInherited true ; - owl:maxCardinality 1 ; - owl:onProperty knora-api:isDeleted - ] ; - rdfs:subClassOf [ rdf:type owl:Restriction ; - knora-api:isInherited true ; - salsah-gui:guiOrder 13 ; - owl:minCardinality 0 ; - owl:onProperty anything:hasThingPictureValue - ] ; - rdfs:subClassOf [ rdf:type owl:Restriction ; - knora-api:isInherited true ; - owl:cardinality 1 ; - owl:onProperty knora-api:versionArkUrl - ] ; - rdfs:subClassOf [ rdf:type owl:Restriction ; - salsah-gui:guiOrder 63 ; - owl:minCardinality 0 ; - owl:onProperty anything:hasBlueThingValue - ] ; - rdfs:subClassOf [ rdf:type owl:Restriction ; - knora-api:isInherited true ; - salsah-gui:guiOrder 13 ; - owl:minCardinality 0 ; - owl:onProperty anything:hasThingDocumentValue - ] ; - rdfs:subClassOf [ rdf:type owl:Restriction ; - knora-api:isInherited true ; - salsah-gui:guiOrder 2 ; - owl:minCardinality 0 ; - owl:onProperty anything:hasRichtext - ] ; - rdfs:subClassOf [ rdf:type owl:Restriction ; - knora-api:isInherited true ; - salsah-gui:guiOrder 13 ; - owl:minCardinality 0 ; - owl:onProperty anything:hasTimeStamp - ] ; - rdfs:subClassOf [ rdf:type owl:Restriction ; - knora-api:isInherited true ; - owl:minCardinality 0 ; - owl:onProperty knora-api:hasIncomingLinkValue - ] ; - rdfs:subClassOf [ rdf:type owl:Restriction ; - knora-api:isInherited true ; - salsah-gui:guiOrder 4 ; - owl:minCardinality 0 ; - owl:onProperty anything:hasInteger - ] ; - rdfs:subClassOf [ rdf:type owl:Restriction ; - knora-api:isInherited true ; - salsah-gui:guiOrder 0 ; - owl:minCardinality 0 ; - owl:onProperty anything:hasListItem - ] ; - rdfs:subClassOf [ rdf:type owl:Restriction ; - knora-api:isInherited true ; - owl:cardinality 1 ; - owl:onProperty knora-api:attachedToUser - ] ; - rdfs:subClassOf [ rdf:type owl:Restriction ; - knora-api:isInherited true ; - salsah-gui:guiOrder 13 ; - owl:minCardinality 0 ; - owl:onProperty anything:hasThingPicture - ] ; - rdfs:subClassOf [ rdf:type owl:Restriction ; - knora-api:isInherited true ; - owl:cardinality 1 ; - owl:onProperty knora-api:hasPermissions - ] ; - rdfs:subClassOf [ rdf:type owl:Restriction ; - knora-api:isInherited true ; - owl:cardinality 1 ; - owl:onProperty knora-api:creationDate - ] ; - rdfs:subClassOf [ rdf:type owl:Restriction ; - knora-api:isInherited true ; - salsah-gui:guiOrder 7 ; - owl:minCardinality 0 ; - owl:onProperty anything:hasUri - ] ; - rdfs:subClassOf [ rdf:type owl:Restriction ; - knora-api:isInherited true ; - owl:cardinality 1 ; - owl:onProperty knora-api:attachedToProject - ] ; - rdfs:subClassOf [ rdf:type owl:Restriction ; - knora-api:isInherited true ; - salsah-gui:guiOrder 10 ; - owl:minCardinality 0 ; - owl:onProperty anything:hasColor - ] ; - rdfs:subClassOf [ rdf:type owl:Restriction ; - knora-api:isInherited true ; - salsah-gui:guiOrder 3 ; - owl:minCardinality 0 ; - owl:onProperty anything:hasDate - ] ; - knora-api:canBeInstantiated true ; - knora-api:isResourceClass true . + + a ; + + "Text"; + + ; + + true; + + true; + + ; + + ; + + . -anything:hasThingDocument - rdf:type owl:ObjectProperty ; - rdfs:label "document about a thing" ; - rdfs:subPropertyOf knora-api:hasRepresentation ; - knora-api:isEditable true ; - knora-api:isLinkProperty true ; - knora-api:isResourceProperty true ; - knora-api:objectType anything:ThingDocument ; - knora-api:subjectType anything:Thing ; - salsah-gui:guiElement salsah-gui:Searchbox . + + a ; + + "Date"; + + ; + + true; + + true; + + ; + + ; + + . -anything:thingHasRegion - rdf:type owl:ObjectProperty ; - rdfs:label "has region" ; - rdfs:subPropertyOf knora-api:hasLinkTo ; - knora-api:isEditable true ; - knora-api:isLinkProperty true ; - knora-api:isResourceProperty true ; - knora-api:objectType knora-api:Region ; - knora-api:subjectType anything:ThingWithRegion ; - salsah-gui:guiElement salsah-gui:Searchbox . + + a ; + + "Color"; + + ; + + true; + + true; + + ; + + ; + + . -anything:hasThingPictureValue - rdf:type owl:ObjectProperty ; - rdfs:label "Picture of a thing" ; - rdfs:subPropertyOf knora-api:hasRepresentationValue ; - knora-api:isEditable true ; - knora-api:isLinkValueProperty true ; - knora-api:isResourceProperty true ; - knora-api:objectType knora-api:LinkValue ; - knora-api:subjectType anything:Thing ; - salsah-gui:guiElement salsah-gui:Searchbox . + + a ; + + "A Resource representing an audio"; + + "Audio Thing"; + + ; + + [ a ; + + true; + + 1; + + + ]; + + [ a ; + + true; + + 1; + + + ]; + + [ a ; + + true; + + 1; + + + ]; + + [ a ; + + true; + + 1; + + + ]; + + [ a ; + + true; + + 0; + + + ]; + + [ a ; + + true; + + 1; + + + ]; + + [ a ; + + true; + + 1; + + + ]; + + [ a ; + + true; + + 1; + + + ]; + + [ a ; + + true; + + 1; + + + ]; + + [ a ; + + true; + + 1; + + + ]; + + [ a ; + + true; + + 1; + + + ]; + + [ a ; + + true; + + 0; + + + ]; + + [ a ; + + true; + + 1; + + + ]; + + [ a ; + + true; + + 1; + + + ]; + + [ a ; + + true; + + 0; + + + ]; + + [ a ; + + true; + + 1; + + + ]; + + [ a ; + + true; + + 1; + + + ]; + + [ a ; + + 1; + + + ]; + + [ a ; + + true; + + 1; + + + ]; + + true; + + true . -anything:hasTitle rdf:type owl:ObjectProperty ; - rdfs:label "Title" ; - rdfs:subPropertyOf knora-api:hasValue ; - knora-api:isEditable true ; - knora-api:isResourceProperty true ; - knora-api:objectType knora-api:TextValue ; - knora-api:subjectType knora-api:Resource ; - salsah-gui:guiAttribute "size=80" , "maxlength=255" ; - salsah-gui:guiElement salsah-gui:SimpleText . + + a ; + + "Geometry"; + + ; + + true; + + true; + + ; + + ; + + . -anything:hasOtherListItem - rdf:type owl:ObjectProperty ; - rdfs:label "Other list element" ; - rdfs:subPropertyOf knora-api:hasValue ; - knora-api:isEditable true ; - knora-api:isResourceProperty true ; - knora-api:objectType knora-api:ListValue ; - knora-api:subjectType anything:Thing ; - salsah-gui:guiAttribute "hlist=" ; - salsah-gui:guiElement salsah-gui:List . + + a ; + + "'The whole world is full of things, which means there's a real need for someone to go searching for them. And that's exactly what a thing-searcher does.' --Pippi Longstocking"; + + "Thing"; + + ; + + [ a ; + + 2; + + 0; + + + ]; + + [ a ; + + true; + + 1; + + + ]; + + [ a ; + + 13; + + 0; + + + ]; + + [ a ; + + 10; + + 0; + + + ]; + + [ a ; + + true; + + 0; + + + ]; + + [ a ; + + true; + + 1; + + + ]; + + [ a ; + + 7; + + 0; + + + ]; + + [ a ; + + true; + + 1; + + + ]; + + [ a ; + + 3; + + 0; + + + ]; + + [ a ; + + 15; + + 0; + + + ]; + + [ a ; + + 13; + + 0; + + + ]; + + [ a ; + + true; + + 1; + + + ]; + + [ a ; + + 13; + + 0; + + + ]; + + [ a ; + + true; + + 1; + + + ]; + + [ a ; + + true; + + 1; + + + ]; + + [ a ; + + 13; + + 0; + + + ]; + + [ a ; + + 5; + + 0; + + + ]; + + [ a ; + + 2; + + 0; + + + ]; + + [ a ; + + true; + + 1; + + + ]; + + [ a ; + + true; + + 0; + + + ]; + + [ a ; + + true; + + 1; + + + ]; + + [ a ; + + true; + + 1; + + + ]; + + [ a ; + + 0; + + 0; + + + ]; + + [ a ; + + 13; + + 0; + + + ]; + + [ a ; + + 15; + + 0; + + + ]; + + [ a ; + + true; + + 0; + + + ]; + + [ a ; + + true; + + 1; + + + ]; + + [ a ; + + 12; + + 0; + + + ]; + + [ a ; + + 11; + + 0; + + + ]; + + [ a ; + + 9; + + 0; + + + ]; + + [ a ; + + true; + + 1; + + + ]; + + [ a ; + + true; + + 1; + + + ]; + + [ a ; + + 6; + + 1; + + + ]; + + [ a ; + + 1; + + 0; + + + ]; + + [ a ; + + true; + + 1; + + + ]; + + [ a ; + + true; + + 1; + + + ]; + + [ a ; + + 0; + + 0; + + + ]; + + [ a ; + + 1; + + 0; + + + ]; + + [ a ; + + 4; + + 0; + + + ]; + + true; + + true; + + "thing.png" . - - rdf:type owl:Ontology ; - rdfs:label "The anything ontology" ; - knora-api:attachedToProject ; - knora-api:lastModificationDate "2017-12-19T15:23:42.166Z"^^xsd:dateTimeStamp . - -anything:TrivialThing - rdf:type owl:Class ; - rdfs:comment "Diese Resource-Klasse beschreibt ein unbedeutendes Ding" ; - rdfs:label "Trivial thing" ; - rdfs:subClassOf knora-api:Resource ; - rdfs:subClassOf [ rdf:type owl:Restriction ; - knora-api:isInherited true ; - owl:maxCardinality 1 ; - owl:onProperty knora-api:versionDate - ] ; - rdfs:subClassOf [ rdf:type owl:Restriction ; - knora-api:isInherited true ; - owl:cardinality 1 ; - owl:onProperty knora-api:versionArkUrl - ] ; - rdfs:subClassOf [ rdf:type owl:Restriction ; - knora-api:isInherited true ; - owl:cardinality 1 ; - owl:onProperty rdfs:label - ] ; - rdfs:subClassOf [ rdf:type owl:Restriction ; - knora-api:isInherited true ; - owl:cardinality 1 ; - owl:onProperty knora-api:userHasPermission - ] ; - rdfs:subClassOf [ rdf:type owl:Restriction ; - knora-api:isInherited true ; - owl:maxCardinality 1 ; - owl:onProperty knora-api:deleteComment - ] ; - rdfs:subClassOf [ rdf:type owl:Restriction ; - knora-api:isInherited true ; - owl:minCardinality 0 ; - owl:onProperty knora-api:hasStandoffLinkTo - ] ; - rdfs:subClassOf [ rdf:type owl:Restriction ; - knora-api:isInherited true ; - owl:maxCardinality 1 ; - owl:onProperty knora-api:lastModificationDate - ] ; - rdfs:subClassOf [ rdf:type owl:Restriction ; - knora-api:isInherited true ; - owl:maxCardinality 1 ; - owl:onProperty knora-api:isDeleted - ] ; - rdfs:subClassOf [ rdf:type owl:Restriction ; - knora-api:isInherited true ; - owl:minCardinality 0 ; - owl:onProperty knora-api:hasStandoffLinkToValue - ] ; - rdfs:subClassOf [ rdf:type owl:Restriction ; - knora-api:isInherited true ; - owl:maxCardinality 1 ; - owl:onProperty knora-api:deleteDate - ] ; - rdfs:subClassOf [ rdf:type owl:Restriction ; - knora-api:isInherited true ; - owl:cardinality 1 ; - owl:onProperty knora-api:arkUrl - ] ; - rdfs:subClassOf [ rdf:type owl:Restriction ; - knora-api:isInherited true ; - owl:cardinality 1 ; - owl:onProperty knora-api:hasPermissions - ] ; - rdfs:subClassOf [ rdf:type owl:Restriction ; - knora-api:isInherited true ; - owl:minCardinality 0 ; - owl:onProperty knora-api:hasIncomingLinkValue - ] ; - rdfs:subClassOf [ rdf:type owl:Restriction ; - knora-api:isInherited true ; - owl:cardinality 1 ; - owl:onProperty knora-api:creationDate - ] ; - rdfs:subClassOf [ rdf:type owl:Restriction ; - knora-api:isInherited true ; - owl:cardinality 1 ; - owl:onProperty knora-api:attachedToUser - ] ; - rdfs:subClassOf [ rdf:type owl:Restriction ; - knora-api:isInherited true ; - owl:maxCardinality 1 ; - owl:onProperty knora-api:deletedBy - ] ; - rdfs:subClassOf [ rdf:type owl:Restriction ; - knora-api:isInherited true ; - owl:cardinality 1 ; - owl:onProperty knora-api:attachedToProject - ] ; - knora-api:canBeInstantiated true ; - knora-api:isResourceClass true ; - knora-api:resourceIcon "thing.png" . - -anything:hasUri rdf:type owl:ObjectProperty ; - rdfs:label "URI" ; - rdfs:subPropertyOf knora-api:hasValue ; - knora-api:isEditable true ; - knora-api:isResourceProperty true ; - knora-api:objectType knora-api:UriValue ; - knora-api:subjectType anything:Thing ; - salsah-gui:guiAttribute "size=80" , "maxlength=255" ; - salsah-gui:guiElement salsah-gui:SimpleText . + + a ; + + "document title"; + + ; + + true; + + true; + + ; + + ; + + "maxlength=255" , "size=80"; + + . -anything:standoffEventTagHasDescription - rdf:type owl:DatatypeProperty ; - knora-api:objectType xsd:string ; - knora-api:subjectType anything:StandoffEventTag . + + a ; + + "Integer"; + + ; + + true; + + true; + + ; + + "min=0" , "max=-1"; + + . -anything:hasThingDocumentValue - rdf:type owl:ObjectProperty ; - rdfs:label "document about a thing" ; - rdfs:subPropertyOf knora-api:hasRepresentationValue ; - knora-api:isEditable true ; - knora-api:isLinkValueProperty true ; - knora-api:isResourceProperty true ; - knora-api:objectType knora-api:LinkValue ; - knora-api:subjectType anything:Thing ; - salsah-gui:guiElement salsah-gui:Searchbox . + + a ; + + "A blue thing"; + + ; + + true; + + true; + + true; + + ; + + . -anything:VideoThing rdf:type owl:Class ; - rdfs:comment "A Resource representing a video" ; - rdfs:label "Video Thing" ; - rdfs:subClassOf knora-api:MovingImageRepresentation ; - rdfs:subClassOf [ rdf:type owl:Restriction ; - knora-api:isInherited true ; - owl:cardinality 1 ; - owl:onProperty knora-api:hasPermissions - ] ; - rdfs:subClassOf [ rdf:type owl:Restriction ; - knora-api:isInherited true ; - owl:cardinality 1 ; - owl:onProperty knora-api:creationDate - ] ; - rdfs:subClassOf [ rdf:type owl:Restriction ; - knora-api:isInherited true ; - owl:cardinality 1 ; - owl:onProperty knora-api:attachedToUser - ] ; - rdfs:subClassOf [ rdf:type owl:Restriction ; - knora-api:isInherited true ; - owl:maxCardinality 1 ; - owl:onProperty knora-api:versionDate - ] ; - rdfs:subClassOf [ rdf:type owl:Restriction ; - knora-api:isInherited true ; - owl:cardinality 1 ; - owl:onProperty knora-api:arkUrl - ] ; - rdfs:subClassOf [ rdf:type owl:Restriction ; - knora-api:isInherited true ; - owl:minCardinality 0 ; - owl:onProperty knora-api:hasStandoffLinkToValue - ] ; - rdfs:subClassOf [ rdf:type owl:Restriction ; - knora-api:isInherited true ; - owl:maxCardinality 1 ; - owl:onProperty knora-api:deleteComment - ] ; - rdfs:subClassOf [ rdf:type owl:Restriction ; - knora-api:isInherited true ; - owl:maxCardinality 1 ; - owl:onProperty knora-api:deleteDate - ] ; - rdfs:subClassOf [ rdf:type owl:Restriction ; - knora-api:isInherited true ; - owl:cardinality 1 ; - owl:onProperty rdfs:label - ] ; - rdfs:subClassOf [ rdf:type owl:Restriction ; - owl:maxCardinality 1 ; - owl:onProperty anything:hasTitle - ] ; - rdfs:subClassOf [ rdf:type owl:Restriction ; - knora-api:isInherited true ; - owl:cardinality 1 ; - owl:onProperty knora-api:attachedToProject - ] ; - rdfs:subClassOf [ rdf:type owl:Restriction ; - knora-api:isInherited true ; - owl:cardinality 1 ; - owl:onProperty knora-api:hasMovingImageFileValue - ] ; - rdfs:subClassOf [ rdf:type owl:Restriction ; - knora-api:isInherited true ; - owl:maxCardinality 1 ; - owl:onProperty knora-api:deletedBy - ] ; - rdfs:subClassOf [ rdf:type owl:Restriction ; - knora-api:isInherited true ; - owl:minCardinality 0 ; - owl:onProperty knora-api:hasStandoffLinkTo - ] ; - rdfs:subClassOf [ rdf:type owl:Restriction ; - knora-api:isInherited true ; - owl:cardinality 1 ; - owl:onProperty knora-api:userHasPermission - ] ; - rdfs:subClassOf [ rdf:type owl:Restriction ; - knora-api:isInherited true ; - owl:minCardinality 0 ; - owl:onProperty knora-api:hasIncomingLinkValue - ] ; - rdfs:subClassOf [ rdf:type owl:Restriction ; - knora-api:isInherited true ; - owl:maxCardinality 1 ; - owl:onProperty knora-api:isDeleted - ] ; - rdfs:subClassOf [ rdf:type owl:Restriction ; - knora-api:isInherited true ; - owl:cardinality 1 ; - owl:onProperty knora-api:versionArkUrl - ] ; - rdfs:subClassOf [ rdf:type owl:Restriction ; - knora-api:isInherited true ; - owl:maxCardinality 1 ; - owl:onProperty knora-api:lastModificationDate - ] ; - knora-api:canBeInstantiated true ; - knora-api:isResourceClass true . + + a ; + + "Time interval"; + + ; + + true; + + true; + + ; + + ; + + . -anything:hasInteger rdf:type owl:ObjectProperty ; - rdfs:label "Integer" ; - rdfs:subPropertyOf knora-api:hasValue ; - knora-api:isEditable true ; - knora-api:isResourceProperty true ; - knora-api:objectType knora-api:IntValue ; - knora-api:subjectType anything:Thing ; - salsah-gui:guiAttribute "max=-1" , "min=0" ; - salsah-gui:guiElement salsah-gui:Spinbox . + + a ; + + "Diese Resource-Klasse beschreibt ein Bild eines Dinges"; + + "Picture of a thing"; + + ; + + [ a ; + + 0; + + + ]; + + [ a ; + + true; + + 1; + + + ]; + + [ a ; + + true; + + 1; + + + ]; + + [ a ; + + true; + + 1; + + + ]; + + [ a ; + + true; + + 1; + + + ]; + + [ a ; + + true; + + 1; + + + ]; + + [ a ; + + true; + + 1; + + + ]; + + [ a ; + + true; + + 1; + + + ]; + + [ a ; + + true; + + 1; + + + ]; + + [ a ; + + true; + + 1; + + + ]; + + [ a ; + + true; + + 1; + + + ]; + + [ a ; + + true; + + 1; + + + ]; + + [ a ; + + true; + + 1; + + + ]; + + [ a ; + + true; + + 0; + + + ]; + + [ a ; + + true; + + 1; + + + ]; + + [ a ; + + true; + + 1; + + + ]; + + [ a ; + + true; + + 0; + + + ]; + + [ a ; + + true; + + 0; + + + ]; + + [ a ; + + true; + + 1; + + + ]; + + true; + + true; + + "thing.png" . -anything:hasGeoname rdf:type owl:ObjectProperty ; - rdfs:label "Geoname" ; - rdfs:subPropertyOf knora-api:hasValue ; - knora-api:isEditable true ; - knora-api:isResourceProperty true ; - knora-api:objectType knora-api:GeonameValue ; - knora-api:subjectType anything:Thing ; - salsah-gui:guiElement salsah-gui:Geonames . + + a ; + + "Geoname"; + + ; + + true; + + true; + + ; + + ; + + . -anything:ThingPicture - rdf:type owl:Class ; - rdfs:comment "Diese Resource-Klasse beschreibt ein Bild eines Dinges" ; - rdfs:label "Picture of a thing" ; - rdfs:subClassOf knora-api:StillImageRepresentation ; - rdfs:subClassOf [ rdf:type owl:Restriction ; - owl:minCardinality 0 ; - owl:onProperty anything:hasPictureTitle - ] ; - rdfs:subClassOf [ rdf:type owl:Restriction ; - knora-api:isInherited true ; - owl:cardinality 1 ; - owl:onProperty knora-api:creationDate - ] ; - rdfs:subClassOf [ rdf:type owl:Restriction ; - knora-api:isInherited true ; - owl:minCardinality 0 ; - owl:onProperty knora-api:hasStandoffLinkTo - ] ; - rdfs:subClassOf [ rdf:type owl:Restriction ; - knora-api:isInherited true ; - owl:minCardinality 0 ; - owl:onProperty knora-api:hasStandoffLinkToValue - ] ; - rdfs:subClassOf [ rdf:type owl:Restriction ; - knora-api:isInherited true ; - owl:cardinality 1 ; - owl:onProperty knora-api:userHasPermission - ] ; - rdfs:subClassOf [ rdf:type owl:Restriction ; - knora-api:isInherited true ; - owl:maxCardinality 1 ; - owl:onProperty knora-api:versionDate - ] ; - rdfs:subClassOf [ rdf:type owl:Restriction ; - knora-api:isInherited true ; - owl:maxCardinality 1 ; - owl:onProperty knora-api:deleteComment - ] ; - rdfs:subClassOf [ rdf:type owl:Restriction ; - knora-api:isInherited true ; - owl:maxCardinality 1 ; - owl:onProperty knora-api:deleteDate - ] ; - rdfs:subClassOf [ rdf:type owl:Restriction ; - knora-api:isInherited true ; - owl:maxCardinality 1 ; - owl:onProperty knora-api:isDeleted - ] ; - rdfs:subClassOf [ rdf:type owl:Restriction ; - knora-api:isInherited true ; - owl:maxCardinality 1 ; - owl:onProperty knora-api:lastModificationDate - ] ; - rdfs:subClassOf [ rdf:type owl:Restriction ; - knora-api:isInherited true ; - owl:cardinality 1 ; - owl:onProperty knora-api:versionArkUrl - ] ; - rdfs:subClassOf [ rdf:type owl:Restriction ; - knora-api:isInherited true ; - owl:cardinality 1 ; - owl:onProperty knora-api:hasStillImageFileValue - ] ; - rdfs:subClassOf [ rdf:type owl:Restriction ; - knora-api:isInherited true ; - owl:minCardinality 0 ; - owl:onProperty knora-api:hasIncomingLinkValue - ] ; - rdfs:subClassOf [ rdf:type owl:Restriction ; - knora-api:isInherited true ; - owl:cardinality 1 ; - owl:onProperty knora-api:hasPermissions - ] ; - rdfs:subClassOf [ rdf:type owl:Restriction ; - knora-api:isInherited true ; - owl:cardinality 1 ; - owl:onProperty knora-api:arkUrl - ] ; - rdfs:subClassOf [ rdf:type owl:Restriction ; - knora-api:isInherited true ; - owl:cardinality 1 ; - owl:onProperty rdfs:label - ] ; - rdfs:subClassOf [ rdf:type owl:Restriction ; - knora-api:isInherited true ; - owl:maxCardinality 1 ; - owl:onProperty knora-api:deletedBy - ] ; - rdfs:subClassOf [ rdf:type owl:Restriction ; - knora-api:isInherited true ; - owl:cardinality 1 ; - owl:onProperty knora-api:attachedToProject - ] ; - rdfs:subClassOf [ rdf:type owl:Restriction ; - knora-api:isInherited true ; - owl:cardinality 1 ; - owl:onProperty knora-api:attachedToUser - ] ; - knora-api:canBeInstantiated true ; - knora-api:isResourceClass true ; - knora-api:resourceIcon "thing.png" . + + a ; + + "Integer"; + + ; + + true; + + true; + + ; + + ; + + "min=0" , "max=-1"; + + . -anything:hasInterval rdf:type owl:ObjectProperty ; - rdfs:label "Time interval" ; - rdfs:subPropertyOf knora-api:hasValue ; - knora-api:isEditable true ; - knora-api:isResourceProperty true ; - knora-api:objectType knora-api:IntervalValue ; - knora-api:subjectType anything:Thing ; - salsah-gui:guiElement salsah-gui:Interval . + + a ; + + "A Resource representing a video"; + + "Video Thing"; + + ; + + [ a ; + + true; + + 1; + + + ]; + + [ a ; + + true; + + 1; + + + ]; + + [ a ; + + true; + + 1; + + + ]; + + [ a ; + + 1; + + + ]; + + [ a ; + + true; + + 1; + + + ]; + + [ a ; + + true; + + 1; + + + ]; + + [ a ; + + true; + + 1; + + + ]; + + [ a ; + + true; + + 1; + + + ]; + + [ a ; + + true; + + 1; + + + ]; + + [ a ; + + true; + + 1; + + + ]; + + [ a ; + + true; + + 0; + + + ]; + + [ a ; + + true; + + 1; + + + ]; + + [ a ; + + true; + + 0; + + + ]; + + [ a ; + + true; + + 1; + + + ]; + + [ a ; + + true; + + 1; + + + ]; + + [ a ; + + true; + + 1; + + + ]; + + [ a ; + + true; + + 1; + + + ]; + + [ a ; + + true; + + 1; + + + ]; + + [ a ; + + true; + + 0; + + + ]; + + true; + + true . -anything:hasBlueThingValue - rdf:type owl:ObjectProperty ; - rdfs:label "A blue thing" ; - rdfs:subPropertyOf anything:hasOtherThingValue ; - knora-api:isEditable true ; - knora-api:isLinkValueProperty true ; - knora-api:isResourceProperty true ; - knora-api:objectType knora-api:LinkValue ; - knora-api:subjectType anything:Thing . + + a ; + + "document about a thing"; + + ; + + true; + + true; + + true; + + ; + + ; + + . -anything:hasIntegerUsedByOtherOntologies - rdf:type owl:ObjectProperty ; - rdfs:label "Integer" ; - rdfs:subPropertyOf knora-api:hasValue ; - knora-api:isEditable true ; - knora-api:isResourceProperty true ; - knora-api:objectType knora-api:IntValue ; - salsah-gui:guiAttribute "min=0" , "max=-1" ; - salsah-gui:guiElement salsah-gui:Spinbox . + + a ; + + ; + + . -anything:hasDocumentTitle - rdf:type owl:ObjectProperty ; - rdfs:label "document title" ; - rdfs:subPropertyOf knora-api:hasValue ; - knora-api:isEditable true ; - knora-api:isResourceProperty true ; - knora-api:objectType knora-api:TextValue ; - knora-api:subjectType anything:ThingDocument ; - salsah-gui:guiAttribute "size=80" , "maxlength=255" ; - salsah-gui:guiElement salsah-gui:SimpleText . + + a ; + + "URI"; + + ; + + true; + + true; + + ; + + ; + + "maxlength=255" , "size=80"; + + . -anything:Thing rdf:type owl:Class ; - rdfs:comment "'The whole world is full of things, which means there's a real need for someone to go searching for them. And that's exactly what a thing-searcher does.' --Pippi Longstocking" ; - rdfs:label "Thing" ; - rdfs:subClassOf knora-api:Resource ; - rdfs:subClassOf [ rdf:type owl:Restriction ; - salsah-gui:guiOrder 12 ; - owl:minCardinality 0 ; - owl:onProperty anything:hasGeoname - ] ; - rdfs:subClassOf [ rdf:type owl:Restriction ; - knora-api:isInherited true ; - owl:cardinality 1 ; - owl:onProperty knora-api:userHasPermission - ] ; - rdfs:subClassOf [ rdf:type owl:Restriction ; - salsah-gui:guiOrder 4 ; - owl:minCardinality 0 ; - owl:onProperty anything:hasInteger - ] ; - rdfs:subClassOf [ rdf:type owl:Restriction ; - salsah-gui:guiOrder 10 ; - owl:minCardinality 0 ; - owl:onProperty anything:hasColor - ] ; - rdfs:subClassOf [ rdf:type owl:Restriction ; - salsah-gui:guiOrder 1 ; - owl:minCardinality 0 ; - owl:onProperty anything:hasOtherThing - ] ; - rdfs:subClassOf [ rdf:type owl:Restriction ; - salsah-gui:guiOrder 13 ; - owl:minCardinality 0 ; - owl:onProperty anything:hasThingPictureValue - ] ; - rdfs:subClassOf [ rdf:type owl:Restriction ; - knora-api:isInherited true ; - owl:maxCardinality 1 ; - owl:onProperty knora-api:deleteDate - ] ; - rdfs:subClassOf [ rdf:type owl:Restriction ; - salsah-gui:guiOrder 1 ; - owl:minCardinality 0 ; - owl:onProperty anything:hasOtherThingValue - ] ; - rdfs:subClassOf [ rdf:type owl:Restriction ; - knora-api:isInherited true ; - owl:maxCardinality 1 ; - owl:onProperty knora-api:versionDate - ] ; - rdfs:subClassOf [ rdf:type owl:Restriction ; - knora-api:isInherited true ; - owl:minCardinality 0 ; - owl:onProperty knora-api:hasStandoffLinkToValue - ] ; - rdfs:subClassOf [ rdf:type owl:Restriction ; - salsah-gui:guiOrder 0 ; - owl:minCardinality 0 ; - owl:onProperty anything:hasOtherListItem - ] ; - rdfs:subClassOf [ rdf:type owl:Restriction ; - salsah-gui:guiOrder 13 ; - owl:minCardinality 0 ; - owl:onProperty anything:hasThingPicture - ] ; - rdfs:subClassOf [ rdf:type owl:Restriction ; - knora-api:isInherited true ; - owl:cardinality 1 ; - owl:onProperty knora-api:attachedToUser - ] ; - rdfs:subClassOf [ rdf:type owl:Restriction ; - knora-api:isInherited true ; - owl:maxCardinality 1 ; - owl:onProperty knora-api:deletedBy - ] ; - rdfs:subClassOf [ rdf:type owl:Restriction ; - knora-api:isInherited true ; - owl:cardinality 1 ; - owl:onProperty rdfs:label - ] ; - rdfs:subClassOf [ rdf:type owl:Restriction ; - knora-api:isInherited true ; - owl:cardinality 1 ; - owl:onProperty knora-api:arkUrl - ] ; - rdfs:subClassOf [ rdf:type owl:Restriction ; - salsah-gui:guiOrder 0 ; - owl:minCardinality 0 ; - owl:onProperty anything:hasListItem - ] ; - rdfs:subClassOf [ rdf:type owl:Restriction ; - knora-api:isInherited true ; - owl:maxCardinality 1 ; - owl:onProperty knora-api:lastModificationDate - ] ; - rdfs:subClassOf [ rdf:type owl:Restriction ; - salsah-gui:guiOrder 15 ; - owl:minCardinality 0 ; - owl:onProperty anything:isPartOfOtherThing - ] ; - rdfs:subClassOf [ rdf:type owl:Restriction ; - salsah-gui:guiOrder 3 ; - owl:minCardinality 0 ; - owl:onProperty anything:hasDate - ] ; - rdfs:subClassOf [ rdf:type owl:Restriction ; - knora-api:isInherited true ; - owl:cardinality 1 ; - owl:onProperty knora-api:attachedToProject - ] ; - rdfs:subClassOf [ rdf:type owl:Restriction ; - salsah-gui:guiOrder 11 ; - owl:minCardinality 0 ; - owl:onProperty anything:hasGeometry - ] ; - rdfs:subClassOf [ rdf:type owl:Restriction ; - knora-api:isInherited true ; - owl:cardinality 1 ; - owl:onProperty knora-api:versionArkUrl - ] ; - rdfs:subClassOf [ rdf:type owl:Restriction ; - salsah-gui:guiOrder 13 ; - owl:minCardinality 0 ; - owl:onProperty anything:hasThingDocument - ] ; - rdfs:subClassOf [ rdf:type owl:Restriction ; - knora-api:isInherited true ; - owl:minCardinality 0 ; - owl:onProperty knora-api:hasStandoffLinkTo - ] ; - rdfs:subClassOf [ rdf:type owl:Restriction ; - knora-api:isInherited true ; - owl:cardinality 1 ; - owl:onProperty knora-api:creationDate - ] ; - rdfs:subClassOf [ rdf:type owl:Restriction ; - knora-api:isInherited true ; - owl:cardinality 1 ; - owl:onProperty knora-api:hasPermissions - ] ; - rdfs:subClassOf [ rdf:type owl:Restriction ; - salsah-gui:guiOrder 6 ; - owl:maxCardinality 1 ; - owl:onProperty anything:hasBoolean - ] ; - rdfs:subClassOf [ rdf:type owl:Restriction ; - salsah-gui:guiOrder 13 ; - owl:minCardinality 0 ; - owl:onProperty anything:hasTimeStamp - ] ; - rdfs:subClassOf [ rdf:type owl:Restriction ; - knora-api:isInherited true ; - owl:maxCardinality 1 ; - owl:onProperty knora-api:isDeleted - ] ; - rdfs:subClassOf [ rdf:type owl:Restriction ; - salsah-gui:guiOrder 2 ; - owl:minCardinality 0 ; - owl:onProperty anything:hasRichtext - ] ; - rdfs:subClassOf [ rdf:type owl:Restriction ; - salsah-gui:guiOrder 2 ; - owl:minCardinality 0 ; - owl:onProperty anything:hasText - ] ; - rdfs:subClassOf [ rdf:type owl:Restriction ; - knora-api:isInherited true ; - owl:minCardinality 0 ; - owl:onProperty knora-api:hasIncomingLinkValue - ] ; - rdfs:subClassOf [ rdf:type owl:Restriction ; - knora-api:isInherited true ; - owl:maxCardinality 1 ; - owl:onProperty knora-api:deleteComment - ] ; - rdfs:subClassOf [ rdf:type owl:Restriction ; - salsah-gui:guiOrder 7 ; - owl:minCardinality 0 ; - owl:onProperty anything:hasUri - ] ; - rdfs:subClassOf [ rdf:type owl:Restriction ; - salsah-gui:guiOrder 13 ; - owl:minCardinality 0 ; - owl:onProperty anything:hasThingDocumentValue - ] ; - rdfs:subClassOf [ rdf:type owl:Restriction ; - salsah-gui:guiOrder 9 ; - owl:minCardinality 0 ; - owl:onProperty anything:hasInterval - ] ; - rdfs:subClassOf [ rdf:type owl:Restriction ; - salsah-gui:guiOrder 15 ; - owl:minCardinality 0 ; - owl:onProperty anything:isPartOfOtherThingValue - ] ; - rdfs:subClassOf [ rdf:type owl:Restriction ; - salsah-gui:guiOrder 5 ; - owl:minCardinality 0 ; - owl:onProperty anything:hasDecimal - ] ; - knora-api:canBeInstantiated true ; - knora-api:isResourceClass true ; - knora-api:resourceIcon "thing.png" . + + a ; + + "Diese Resource-Klasse beschreibt ein unbedeutendes Ding"; + + "Trivial thing"; + + ; + + [ a ; + + true; + + 1; + + + ]; + + [ a ; + + true; + + 1; + + + ]; + + [ a ; + + true; + + 0; + + + ]; + + [ a ; + + true; + + 1; + + + ]; + + [ a ; + + true; + + 1; + + + ]; + + [ a ; + + true; + + 1; + + + ]; + + [ a ; + + true; + + 1; + + + ]; + + [ a ; + + true; + + 0; + + + ]; + + [ a ; + + true; + + 1; + + + ]; + + [ a ; + + true; + + 1; + + + ]; + + [ a ; + + true; + + 0; + + + ]; + + [ a ; + + true; + + 1; + + + ]; + + [ a ; + + true; + + 1; + + + ]; + + [ a ; + + true; + + 1; + + + ]; + + [ a ; + + true; + + 1; + + + ]; + + [ a ; + + true; + + 1; + + + ]; + + [ a ; + + true; + + 1; + + + ]; + + true; + + true; + + "thing.png" . -anything:hasGeometry rdf:type owl:ObjectProperty ; - rdfs:label "Geometry" ; - rdfs:subPropertyOf knora-api:hasValue ; - knora-api:isEditable true ; - knora-api:isResourceProperty true ; - knora-api:objectType knora-api:GeomValue ; - knora-api:subjectType anything:Thing ; - salsah-gui:guiElement salsah-gui:Geometry . - -anything:AudioThing rdf:type owl:Class ; - rdfs:comment "A Resource representing an audio" ; - rdfs:label "Audio Thing" ; - rdfs:subClassOf knora-api:AudioRepresentation ; - rdfs:subClassOf [ rdf:type owl:Restriction ; - knora-api:isInherited true ; - owl:cardinality 1 ; - owl:onProperty rdfs:label - ] ; - rdfs:subClassOf [ rdf:type owl:Restriction ; - knora-api:isInherited true ; - owl:maxCardinality 1 ; - owl:onProperty knora-api:deleteComment - ] ; - rdfs:subClassOf [ rdf:type owl:Restriction ; - knora-api:isInherited true ; - owl:maxCardinality 1 ; - owl:onProperty knora-api:versionDate - ] ; - rdfs:subClassOf [ rdf:type owl:Restriction ; - knora-api:isInherited true ; - owl:cardinality 1 ; - owl:onProperty knora-api:attachedToUser - ] ; - rdfs:subClassOf [ rdf:type owl:Restriction ; - knora-api:isInherited true ; - owl:minCardinality 0 ; - owl:onProperty knora-api:hasStandoffLinkTo - ] ; - rdfs:subClassOf [ rdf:type owl:Restriction ; - knora-api:isInherited true ; - owl:cardinality 1 ; - owl:onProperty knora-api:creationDate - ] ; - rdfs:subClassOf [ rdf:type owl:Restriction ; - knora-api:isInherited true ; - owl:minCardinality 0 ; - owl:onProperty knora-api:hasIncomingLinkValue - ] ; - rdfs:subClassOf [ rdf:type owl:Restriction ; - knora-api:isInherited true ; - owl:maxCardinality 1 ; - owl:onProperty knora-api:lastModificationDate - ] ; - rdfs:subClassOf [ rdf:type owl:Restriction ; - knora-api:isInherited true ; - owl:cardinality 1 ; - owl:onProperty knora-api:versionArkUrl - ] ; - rdfs:subClassOf [ rdf:type owl:Restriction ; - knora-api:isInherited true ; - owl:cardinality 1 ; - owl:onProperty knora-api:hasPermissions - ] ; - rdfs:subClassOf [ rdf:type owl:Restriction ; - knora-api:isInherited true ; - owl:maxCardinality 1 ; - owl:onProperty knora-api:deleteDate - ] ; - rdfs:subClassOf [ rdf:type owl:Restriction ; - owl:maxCardinality 1 ; - owl:onProperty anything:hasTitle - ] ; - rdfs:subClassOf [ rdf:type owl:Restriction ; - knora-api:isInherited true ; - owl:cardinality 1 ; - owl:onProperty knora-api:hasAudioFileValue - ] ; - rdfs:subClassOf [ rdf:type owl:Restriction ; - knora-api:isInherited true ; - owl:minCardinality 0 ; - owl:onProperty knora-api:hasStandoffLinkToValue - ] ; - rdfs:subClassOf [ rdf:type owl:Restriction ; - knora-api:isInherited true ; - owl:maxCardinality 1 ; - owl:onProperty knora-api:isDeleted - ] ; - rdfs:subClassOf [ rdf:type owl:Restriction ; - knora-api:isInherited true ; - owl:cardinality 1 ; - owl:onProperty knora-api:attachedToProject - ] ; - rdfs:subClassOf [ rdf:type owl:Restriction ; - knora-api:isInherited true ; - owl:cardinality 1 ; - owl:onProperty knora-api:arkUrl - ] ; - rdfs:subClassOf [ rdf:type owl:Restriction ; - knora-api:isInherited true ; - owl:cardinality 1 ; - owl:onProperty knora-api:userHasPermission - ] ; - rdfs:subClassOf [ rdf:type owl:Restriction ; - knora-api:isInherited true ; - owl:maxCardinality 1 ; - owl:onProperty knora-api:deletedBy - ] ; - knora-api:canBeInstantiated true ; - knora-api:isResourceClass true . + + a ; + + "The anything ontology"; + + ; + + "2017-12-19T15:23:42.166Z"^^ . -anything:hasColor rdf:type owl:ObjectProperty ; - rdfs:label "Color" ; - rdfs:subPropertyOf knora-api:hasValue ; - knora-api:isEditable true ; - knora-api:isResourceProperty true ; - knora-api:objectType knora-api:ColorValue ; - knora-api:subjectType anything:Thing ; - salsah-gui:guiElement salsah-gui:Colorpicker . + + a ; + + "Other list element"; + + ; + + true; + + true; + + ; + + ; + + "hlist="; + + . -anything:hasDate rdf:type owl:ObjectProperty ; - rdfs:label "Date" ; - rdfs:subPropertyOf knora-api:hasValue ; - knora-api:isEditable true ; - knora-api:isResourceProperty true ; - knora-api:objectType knora-api:DateValue ; - knora-api:subjectType anything:Thing ; - salsah-gui:guiElement salsah-gui:Date . + + a ; + + "Title"; + + ; + + true; + + true; + + ; + + ; + + "maxlength=255" , "size=80"; + + . -anything:hasRichtext rdf:type owl:ObjectProperty ; - rdfs:label "Text" ; - rdfs:subPropertyOf knora-api:hasValue ; - knora-api:isEditable true ; - knora-api:isResourceProperty true ; - knora-api:objectType knora-api:TextValue ; - knora-api:subjectType anything:Thing ; - salsah-gui:guiElement salsah-gui:Richtext . + + a ; + + "Picture of a thing"; + + ; + + true; + + true; + + true; + + ; + + ; + + . -anything:hasBlueThing - rdf:type owl:ObjectProperty ; - rdfs:label "A blue thing" ; - rdfs:subPropertyOf anything:hasOtherThing ; - knora-api:isEditable true ; - knora-api:isLinkProperty true ; - knora-api:isResourceProperty true ; - knora-api:objectType anything:BlueThing ; - knora-api:subjectType anything:Thing ; - salsah-gui:guiElement salsah-gui:Searchbox . + + a ; + + "has region"; + + ; + + true; + + true; + + true; + + ; + + ; + + . -anything:hasText rdf:type owl:ObjectProperty ; - rdfs:label "Text" ; - rdfs:subPropertyOf knora-api:hasValue ; - knora-api:isEditable true ; - knora-api:isResourceProperty true ; - knora-api:objectType knora-api:TextValue ; - knora-api:subjectType anything:Thing ; - salsah-gui:guiAttribute "size=80" , "maxlength=255" ; - salsah-gui:guiElement salsah-gui:SimpleText . + + a ; + + "document about a thing"; + + ; + + true; + + true; + + true; + + ; + + ; + + . -anything:hasBoolean rdf:type owl:ObjectProperty ; - rdfs:label "Boolean value" ; - rdfs:subPropertyOf knora-api:hasValue ; - knora-api:isEditable true ; - knora-api:isResourceProperty true ; - knora-api:objectType knora-api:BooleanValue ; - knora-api:subjectType anything:Thing ; - salsah-gui:guiElement salsah-gui:Checkbox . + + a ; + + "Diese Resource-Klasse beschreibt ein blaues Ding"; + + "Blue thing"; + + ; + + [ a ; + + true; + + 1; + + + ]; + + [ a ; + + true; + + 13; + + 0; + + + ]; + + [ a ; + + true; + + 1; + + + ]; + + [ a ; + + 63; + + 0; + + + ]; + + [ a ; + + true; + + 1; + + + ]; + + [ a ; + + true; + + 5; + + 0; + + + ]; + + [ a ; + + true; + + 10; + + 0; + + + ]; + + [ a ; + + true; + + 0; + + + ]; + + [ a ; + + true; + + 15; + + 0; + + + ]; + + [ a ; + + true; + + 13; + + 0; + + + ]; + + [ a ; + + true; + + 1; + + + ]; + + [ a ; + + true; + + 9; + + 0; + + + ]; + + [ a ; + + true; + + 13; + + 0; + + + ]; + + [ a ; + + true; + + 13; + + 0; + + + ]; + + [ a ; + + true; + + 1; + + + ]; + + [ a ; + + true; + + 1; + + + ]; + + [ a ; + + true; + + 0; + + 0; + + + ]; + + [ a ; + + 63; + + 0; + + + ]; + + [ a ; + + true; + + 0; + + + ]; + + [ a ; + + true; + + 6; + + 1; + + + ]; + + [ a ; + + true; + + 1; + + + ]; + + [ a ; + + true; + + 15; + + 0; + + + ]; + + [ a ; + + true; + + 1; + + + ]; + + [ a ; + + true; + + 1; + + + ]; + + [ a ; + + true; + + 1; + + + ]; + + [ a ; + + true; + + 1; + + + ]; + + [ a ; + + true; + + 7; + + 0; + + + ]; + + [ a ; + + true; + + 1; + + + ]; + + [ a ; + + true; + + 1; + + + ]; + + [ a ; + + true; + + 12; + + 0; + + + ]; + + [ a ; + + true; + + 2; + + 0; + + + ]; + + [ a ; + + true; + + 13; + + 0; + + + ]; + + [ a ; + + true; + + 2; + + 0; + + + ]; + + [ a ; + + true; + + 1; + + + ]; + + [ a ; + + true; + + 4; + + 0; + + + ]; + + [ a ; + + true; + + 3; + + 0; + + + ]; + + [ a ; + + true; + + 0; + + 0; + + + ]; + + [ a ; + + true; + + 0; + + + ]; + + [ a ; + + true; + + 11; + + 0; + + + ]; + + true; + + true . -anything:isPartOfOtherThing - rdf:type owl:ObjectProperty ; - rdfs:label "is part of" ; - rdfs:subPropertyOf knora-api:isPartOf ; - knora-api:isEditable true ; - knora-api:isLinkProperty true ; - knora-api:isResourceProperty true ; - knora-api:objectType anything:Thing ; - knora-api:subjectType anything:Thing ; - salsah-gui:guiElement salsah-gui:Searchbox . + + a ; + + "List element"; + + ; + + true; + + true; + + ; + + ; + + "hlist="; + + . -anything:hasDecimal rdf:type owl:ObjectProperty ; - rdfs:label "Decimal number" ; - rdfs:subPropertyOf knora-api:hasValue ; - knora-api:isEditable true ; - knora-api:isResourceProperty true ; - knora-api:objectType knora-api:DecimalValue ; - knora-api:subjectType anything:Thing ; - salsah-gui:guiAttribute "size=80" , "maxlength=255" ; - salsah-gui:guiElement salsah-gui:SimpleText . + + a ; + + "Timestamp"; + + ; + + true; + + true; + + ; + + ; + + . -anything:thingHasRegionValue - rdf:type owl:ObjectProperty ; - rdfs:label "has region" ; - rdfs:subPropertyOf knora-api:hasLinkToValue ; - knora-api:isEditable true ; - knora-api:isLinkValueProperty true ; - knora-api:isResourceProperty true ; - knora-api:objectType knora-api:LinkValue ; - knora-api:subjectType anything:ThingWithRegion . + + a ; + + "Picture of a thing"; + + ; + + true; + + true; + + true; + + ; + + ; + + . -anything:hasOtherThing - rdf:type owl:ObjectProperty ; - rdfs:label "Another thing" ; - rdfs:subPropertyOf knora-api:hasLinkTo ; - knora-api:isEditable true ; - knora-api:isLinkProperty true ; - knora-api:isResourceProperty true ; - knora-api:objectType anything:Thing ; - knora-api:subjectType anything:Thing ; - salsah-gui:guiElement salsah-gui:Searchbox . + + a ; + + "Represents an event in a TextValue"; + + "Represents an event in a TextValue"; + + ; + + [ a ; + + true; + + 1; + + + ]; + + [ a ; + + true; + + 1; + + + ]; + + [ a ; + + true; + + 1; + + + ]; + + [ a ; + + true; + + 1; + + + ]; + + [ a ; + + true; + + 1; + + + ]; + + [ a ; + + true; + + 1; + + + ]; + + [ a ; + + true; + + 1; + + + ]; + + [ a ; + + true; + + 1; + + + ]; + + [ a ; + + true; + + 1; + + + ]; + + [ a ; + + true; + + 1; + + + ]; + + [ a ; + + true; + + 1; + + + ]; + + [ a ; + + true; + + 1; + + + ]; + + [ a ; + + true; + + 1; + + + ]; + + [ a ; + + true; + + 1; + + + ]; + + [ a ; + + true; + + 1; + + + ]; + + [ a ; + + true; + + 1; + + + ]; + + [ a ; + + true; + + 1; + + + ]; + + [ a ; + + true; + + 1; + + + ]; + + [ a ; + + true; + + 1; + + + ]; + + [ a ; + + 1; + + + ]; + + true . -anything:ThingWithRegion - rdf:type owl:Class ; - rdfs:comment "A thing with a region" ; - rdfs:label "Thing with region" ; - rdfs:subClassOf knora-api:Resource ; - rdfs:subClassOf [ rdf:type owl:Restriction ; - knora-api:isInherited true ; - owl:cardinality 1 ; - owl:onProperty knora-api:attachedToProject - ] ; - rdfs:subClassOf [ rdf:type owl:Restriction ; - owl:minCardinality 0 ; - owl:onProperty anything:thingHasRegionValue - ] ; - rdfs:subClassOf [ rdf:type owl:Restriction ; - knora-api:isInherited true ; - owl:maxCardinality 1 ; - owl:onProperty knora-api:deletedBy - ] ; - rdfs:subClassOf [ rdf:type owl:Restriction ; - knora-api:isInherited true ; - owl:maxCardinality 1 ; - owl:onProperty knora-api:lastModificationDate - ] ; - rdfs:subClassOf [ rdf:type owl:Restriction ; - knora-api:isInherited true ; - owl:minCardinality 0 ; - owl:onProperty knora-api:hasStandoffLinkToValue - ] ; - rdfs:subClassOf [ rdf:type owl:Restriction ; - knora-api:isInherited true ; - owl:minCardinality 0 ; - owl:onProperty knora-api:hasStandoffLinkTo - ] ; - rdfs:subClassOf [ rdf:type owl:Restriction ; - knora-api:isInherited true ; - owl:cardinality 1 ; - owl:onProperty knora-api:hasPermissions - ] ; - rdfs:subClassOf [ rdf:type owl:Restriction ; - knora-api:isInherited true ; - owl:maxCardinality 1 ; - owl:onProperty knora-api:versionDate - ] ; - rdfs:subClassOf [ rdf:type owl:Restriction ; - knora-api:isInherited true ; - owl:maxCardinality 1 ; - owl:onProperty knora-api:isDeleted - ] ; - rdfs:subClassOf [ rdf:type owl:Restriction ; - knora-api:isInherited true ; - owl:cardinality 1 ; - owl:onProperty knora-api:arkUrl - ] ; - rdfs:subClassOf [ rdf:type owl:Restriction ; - knora-api:isInherited true ; - owl:minCardinality 0 ; - owl:onProperty knora-api:hasIncomingLinkValue - ] ; - rdfs:subClassOf [ rdf:type owl:Restriction ; - knora-api:isInherited true ; - owl:cardinality 1 ; - owl:onProperty knora-api:creationDate - ] ; - rdfs:subClassOf [ rdf:type owl:Restriction ; - knora-api:isInherited true ; - owl:cardinality 1 ; - owl:onProperty rdfs:label - ] ; - rdfs:subClassOf [ rdf:type owl:Restriction ; - knora-api:isInherited true ; - owl:cardinality 1 ; - owl:onProperty knora-api:userHasPermission - ] ; - rdfs:subClassOf [ rdf:type owl:Restriction ; - knora-api:isInherited true ; - owl:cardinality 1 ; - owl:onProperty knora-api:attachedToUser - ] ; - rdfs:subClassOf [ rdf:type owl:Restriction ; - knora-api:isInherited true ; - owl:maxCardinality 1 ; - owl:onProperty knora-api:deleteDate - ] ; - rdfs:subClassOf [ rdf:type owl:Restriction ; - knora-api:isInherited true ; - owl:cardinality 1 ; - owl:onProperty knora-api:versionArkUrl - ] ; - rdfs:subClassOf [ rdf:type owl:Restriction ; - owl:minCardinality 0 ; - owl:onProperty anything:thingHasRegion - ] ; - rdfs:subClassOf [ rdf:type owl:Restriction ; - knora-api:isInherited true ; - owl:maxCardinality 1 ; - owl:onProperty knora-api:deleteComment - ] ; - knora-api:canBeInstantiated true ; - knora-api:isResourceClass true . + + a ; + + "Diese Resource-Klasse beschreibt ein Ding mit einer Sequenznummer"; + + "Thing with sequence number"; + + ; + + [ a ; + + true; + + 1; + + + ]; + + [ a ; + + true; + + 1; + + + ]; + + [ a ; + + true; + + 2; + + 0; + + + ]; + + [ a ; + + true; + + 5; + + 0; + + + ]; + + [ a ; + + true; + + 10; + + 0; + + + ]; + + [ a ; + + true; + + 15; + + 0; + + + ]; + + [ a ; + + true; + + 0; + + + ]; + + [ a ; + + 100; + + 0; + + + ]; + + [ a ; + + true; + + 1; + + + ]; + + [ a ; + + true; + + 0; + + 0; + + + ]; + + [ a ; + + true; + + 4; + + 0; + + + ]; + + [ a ; + + true; + + 1; + + 0; + + + ]; + + [ a ; + + true; + + 1; + + + ]; + + [ a ; + + true; + + 15; + + 0; + + + ]; + + [ a ; + + true; + + 13; + + 0; + + + ]; + + [ a ; + + true; + + 0; + + 0; + + + ]; + + [ a ; + + true; + + 13; + + 0; + + + ]; + + [ a ; + + true; + + 12; + + 0; + + + ]; + + [ a ; + + true; + + 1; + + + ]; + + [ a ; + + true; + + 1; + + + ]; + + [ a ; + + true; + + 0; + + + ]; + + [ a ; + + true; + + 1; + + + ]; + + [ a ; + + true; + + 0; + + + ]; + + [ a ; + + true; + + 13; + + 0; + + + ]; + + [ a ; + + true; + + 2; + + 0; + + + ]; + + [ a ; + + true; + + 7; + + 0; + + + ]; + + [ a ; + + true; + + 1; + + + ]; + + [ a ; + + true; + + 3; + + 0; + + + ]; + + [ a ; + + true; + + 1; + + + ]; + + [ a ; + + true; + + 1; + + + ]; + + [ a ; + + true; + + 1; + + + ]; + + [ a ; + + true; + + 9; + + 0; + + + ]; + + [ a ; + + true; + + 11; + + 0; + + + ]; + + [ a ; + + true; + + 6; + + 1; + + + ]; + + [ a ; + + true; + + 1; + + + ]; + + [ a ; + + true; + + 1; + + + ]; + + [ a ; + + true; + + 13; + + 0; + + + ]; + + [ a ; + + true; + + 1; + + + ]; + + [ a ; + + true; + + 1; + + 0; + + + ]; + + [ a ; + + true; + + 13; + + 0; + + + ]; + + true; + + true . -anything:AudioSequenceThing - rdf:type owl:Class ; - rdfs:comment "A Resource representing a subsequence of an audio" ; - rdfs:label "Audio Sequence Thing" ; - rdfs:subClassOf knora-api:Resource ; - rdfs:subClassOf [ rdf:type owl:Restriction ; - knora-api:isInherited true ; - owl:cardinality 1 ; - owl:onProperty rdfs:label - ] ; - rdfs:subClassOf [ rdf:type owl:Restriction ; - knora-api:isInherited true ; - owl:minCardinality 0 ; - owl:onProperty knora-api:hasStandoffLinkTo - ] ; - rdfs:subClassOf [ rdf:type owl:Restriction ; - salsah-gui:guiOrder 0 ; - owl:cardinality 1 ; - owl:onProperty knora-api:isSequenceOfValue - ] ; - rdfs:subClassOf [ rdf:type owl:Restriction ; - knora-api:isInherited true ; - owl:cardinality 1 ; - owl:onProperty knora-api:attachedToProject - ] ; - rdfs:subClassOf [ rdf:type owl:Restriction ; - knora-api:isInherited true ; - owl:maxCardinality 1 ; - owl:onProperty knora-api:isDeleted - ] ; - rdfs:subClassOf [ rdf:type owl:Restriction ; - knora-api:isInherited true ; - owl:maxCardinality 1 ; - owl:onProperty knora-api:deletedBy - ] ; - rdfs:subClassOf [ rdf:type owl:Restriction ; - knora-api:isInherited true ; - owl:cardinality 1 ; - owl:onProperty knora-api:creationDate - ] ; - rdfs:subClassOf [ rdf:type owl:Restriction ; - knora-api:isInherited true ; - owl:minCardinality 0 ; - owl:onProperty knora-api:hasStandoffLinkToValue - ] ; - rdfs:subClassOf [ rdf:type owl:Restriction ; - knora-api:isInherited true ; - owl:cardinality 1 ; - owl:onProperty knora-api:attachedToUser - ] ; - rdfs:subClassOf [ rdf:type owl:Restriction ; - salsah-gui:guiOrder 0 ; - owl:cardinality 1 ; - owl:onProperty knora-api:hasSequenceBounds - ] ; - rdfs:subClassOf [ rdf:type owl:Restriction ; - knora-api:isInherited true ; - owl:maxCardinality 1 ; - owl:onProperty knora-api:versionDate - ] ; - rdfs:subClassOf [ rdf:type owl:Restriction ; - knora-api:isInherited true ; - owl:cardinality 1 ; - owl:onProperty knora-api:userHasPermission - ] ; - rdfs:subClassOf [ rdf:type owl:Restriction ; - knora-api:isInherited true ; - owl:maxCardinality 1 ; - owl:onProperty knora-api:deleteComment - ] ; - rdfs:subClassOf [ rdf:type owl:Restriction ; - salsah-gui:guiOrder 0 ; - owl:cardinality 1 ; - owl:onProperty knora-api:isSequenceOf - ] ; - rdfs:subClassOf [ rdf:type owl:Restriction ; - knora-api:isInherited true ; - owl:cardinality 1 ; - owl:onProperty knora-api:versionArkUrl - ] ; - rdfs:subClassOf [ rdf:type owl:Restriction ; - knora-api:isInherited true ; - owl:cardinality 1 ; - owl:onProperty knora-api:arkUrl - ] ; - rdfs:subClassOf [ rdf:type owl:Restriction ; - knora-api:isInherited true ; - owl:maxCardinality 1 ; - owl:onProperty knora-api:lastModificationDate - ] ; - rdfs:subClassOf [ rdf:type owl:Restriction ; - knora-api:isInherited true ; - owl:cardinality 1 ; - owl:onProperty knora-api:hasPermissions - ] ; - rdfs:subClassOf [ rdf:type owl:Restriction ; - knora-api:isInherited true ; - owl:maxCardinality 1 ; - owl:onProperty knora-api:deleteDate - ] ; - rdfs:subClassOf [ rdf:type owl:Restriction ; - knora-api:isInherited true ; - owl:minCardinality 0 ; - owl:onProperty knora-api:hasIncomingLinkValue - ] ; - knora-api:canBeInstantiated true ; - knora-api:isResourceClass true . + + a ; + + "Another thing"; + + ; + + true; + + true; + + true; + + ; + + ; + + . -anything:ThingWithRepresentation - rdf:type owl:Class ; - rdfs:comment "A thing with a representation" ; - rdfs:label "Thing with representation" ; - rdfs:subClassOf knora-api:Resource ; - rdfs:subClassOf [ rdf:type owl:Restriction ; - owl:minCardinality 0 ; - owl:onProperty knora-api:hasRepresentationValue - ] ; - rdfs:subClassOf [ rdf:type owl:Restriction ; - knora-api:isInherited true ; - owl:cardinality 1 ; - owl:onProperty knora-api:versionArkUrl - ] ; - rdfs:subClassOf [ rdf:type owl:Restriction ; - knora-api:isInherited true ; - owl:maxCardinality 1 ; - owl:onProperty knora-api:deletedBy - ] ; - rdfs:subClassOf [ rdf:type owl:Restriction ; - knora-api:isInherited true ; - owl:cardinality 1 ; - owl:onProperty knora-api:creationDate - ] ; - rdfs:subClassOf [ rdf:type owl:Restriction ; - knora-api:isInherited true ; - owl:maxCardinality 1 ; - owl:onProperty knora-api:lastModificationDate - ] ; - rdfs:subClassOf [ rdf:type owl:Restriction ; - knora-api:isInherited true ; - owl:maxCardinality 1 ; - owl:onProperty knora-api:deleteComment - ] ; - rdfs:subClassOf [ rdf:type owl:Restriction ; - knora-api:isInherited true ; - owl:cardinality 1 ; - owl:onProperty knora-api:attachedToProject - ] ; - rdfs:subClassOf [ rdf:type owl:Restriction ; - owl:minCardinality 0 ; - owl:onProperty knora-api:hasRepresentation - ] ; - rdfs:subClassOf [ rdf:type owl:Restriction ; - knora-api:isInherited true ; - owl:cardinality 1 ; - owl:onProperty rdfs:label - ] ; - rdfs:subClassOf [ rdf:type owl:Restriction ; - knora-api:isInherited true ; - owl:cardinality 1 ; - owl:onProperty knora-api:attachedToUser - ] ; - rdfs:subClassOf [ rdf:type owl:Restriction ; - knora-api:isInherited true ; - owl:minCardinality 0 ; - owl:onProperty knora-api:hasIncomingLinkValue - ] ; - rdfs:subClassOf [ rdf:type owl:Restriction ; - knora-api:isInherited true ; - owl:cardinality 1 ; - owl:onProperty knora-api:arkUrl - ] ; - rdfs:subClassOf [ rdf:type owl:Restriction ; - knora-api:isInherited true ; - owl:maxCardinality 1 ; - owl:onProperty knora-api:isDeleted - ] ; - rdfs:subClassOf [ rdf:type owl:Restriction ; - knora-api:isInherited true ; - owl:cardinality 1 ; - owl:onProperty knora-api:userHasPermission - ] ; - rdfs:subClassOf [ rdf:type owl:Restriction ; - knora-api:isInherited true ; - owl:cardinality 1 ; - owl:onProperty knora-api:hasPermissions - ] ; - rdfs:subClassOf [ rdf:type owl:Restriction ; - knora-api:isInherited true ; - owl:maxCardinality 1 ; - owl:onProperty knora-api:deleteDate - ] ; - rdfs:subClassOf [ rdf:type owl:Restriction ; - knora-api:isInherited true ; - owl:minCardinality 0 ; - owl:onProperty knora-api:hasStandoffLinkToValue - ] ; - rdfs:subClassOf [ rdf:type owl:Restriction ; - knora-api:isInherited true ; - owl:maxCardinality 1 ; - owl:onProperty knora-api:versionDate - ] ; - rdfs:subClassOf [ rdf:type owl:Restriction ; - knora-api:isInherited true ; - owl:minCardinality 0 ; - owl:onProperty knora-api:hasStandoffLinkTo - ] ; - knora-api:canBeInstantiated true ; - knora-api:isResourceClass true . + + a ; + + "is part of"; + + ; + + true; + + true; + + true; + + ; + + ; + + . -anything:hasPictureTitle - rdf:type owl:ObjectProperty ; - rdfs:label "Title" ; - rdfs:subPropertyOf knora-api:hasValue ; - knora-api:isEditable true ; - knora-api:isResourceProperty true ; - knora-api:objectType knora-api:TextValue ; - knora-api:subjectType anything:ThingPicture ; - salsah-gui:guiAttribute "size=80" , "maxlength=255" ; - salsah-gui:guiElement salsah-gui:SimpleText . + + a ; + + "A document about a thing"; + + "Document"; + + ; + + [ a ; + + true; + + 1; + + + ]; + + [ a ; + + true; + + 1; + + + ]; + + [ a ; + + true; + + 1; + + + ]; + + [ a ; + + true; + + 1; + + + ]; + + [ a ; + + true; + + 0; + + + ]; + + [ a ; + + true; + + 1; + + + ]; + + [ a ; + + true; + + 1; + + + ]; + + [ a ; + + true; + + 0; + + + ]; + + [ a ; + + 0; + + + ]; + + [ a ; + + true; + + 1; + + + ]; + + [ a ; + + true; + + 1; + + + ]; + + [ a ; + + true; + + 1; + + + ]; + + [ a ; + + true; + + 1; + + + ]; + + [ a ; + + true; + + 1; + + + ]; + + [ a ; + + true; + + 1; + + + ]; + + [ a ; + + true; + + 1; + + + ]; + + [ a ; + + true; + + 1; + + + ]; + + [ a ; + + true; + + 0; + + + ]; + + [ a ; + + true; + + 1; + + + ]; + + true; + + true; + + "thing.png" . diff --git a/test_data/generated_test_data/ontologyR2RV2/knoraApiOntologySimple.jsonld b/test_data/generated_test_data/ontologyR2RV2/knoraApiOntologySimple.jsonld index ea81f83a24..35be7da34c 100644 --- a/test_data/generated_test_data/ontologyR2RV2/knoraApiOntologySimple.jsonld +++ b/test_data/generated_test_data/ontologyR2RV2/knoraApiOntologySimple.jsonld @@ -121,6 +121,9 @@ { "@id": "knora-api:Representation" }, + { + "@id": "http://www.w3.org/ns/ma-ont#AudioTrack" + }, { "@type": "owl:Restriction", "owl:onProperty": { @@ -168,6 +171,73 @@ "@type": "owl:Class", "@id": "knora-api:AudioRepresentation" }, + { + "rdfs:label": "Audio Segment", + "rdfs:subClassOf": [ + { + "@id": "knora-api:Segment" + }, + { + "@type": "owl:Restriction", + "owl:onProperty": { + "@id": "knora-api:arkUrl" + }, + "owl:cardinality": 1 + }, + { + "@type": "owl:Restriction", + "owl:onProperty": { + "@id": "knora-api:hasComment" + }, + "owl:minCardinality": 0 + }, + { + "@type": "owl:Restriction", + "owl:onProperty": { + "@id": "knora-api:hasIncomingLink" + }, + "owl:minCardinality": 0 + }, + { + "@type": "owl:Restriction", + "owl:onProperty": { + "@id": "knora-api:hasSegmentBounds" + }, + "owl:cardinality": 1 + }, + { + "@type": "owl:Restriction", + "owl:onProperty": { + "@id": "knora-api:hasStandoffLinkTo" + }, + "owl:minCardinality": 0 + }, + { + "@type": "owl:Restriction", + "owl:onProperty": { + "@id": "knora-api:isAudioSegmentOf" + }, + "owl:cardinality": 1 + }, + { + "@type": "owl:Restriction", + "owl:onProperty": { + "@id": "knora-api:versionArkUrl" + }, + "owl:cardinality": 1 + }, + { + "@type": "owl:Restriction", + "owl:onProperty": { + "@id": "rdfs:label" + }, + "owl:cardinality": 1 + } + ], + "rdfs:comment": "A segment of an audio resource", + "@type": "owl:Class", + "@id": "knora-api:AudioSegment" + }, { "rdfs:label": "Color literal", "rdfs:comment": "Represents a color.", @@ -467,6 +537,9 @@ { "@id": "knora-api:Representation" }, + { + "@id": "http://www.w3.org/ns/ma-ont#VideoTrack" + }, { "@type": "owl:Restriction", "owl:onProperty": { @@ -685,6 +758,76 @@ "@type": "owl:Class", "@id": "knora-api:Resource" }, + { + "rdfs:label": "Segment", + "rdfs:subClassOf": [ + { + "@id": "knora-api:Resource" + }, + { + "@id": "http://www.w3.org/ns/ma-ont#Track" + }, + { + "@type": "owl:Restriction", + "owl:onProperty": { + "@id": "knora-api:arkUrl" + }, + "owl:cardinality": 1 + }, + { + "@type": "owl:Restriction", + "owl:onProperty": { + "@id": "knora-api:hasComment" + }, + "owl:minCardinality": 0 + }, + { + "@type": "owl:Restriction", + "owl:onProperty": { + "@id": "knora-api:hasIncomingLink" + }, + "owl:minCardinality": 0 + }, + { + "@type": "owl:Restriction", + "owl:onProperty": { + "@id": "knora-api:hasSegmentBounds" + }, + "owl:cardinality": 1 + }, + { + "@type": "owl:Restriction", + "owl:onProperty": { + "@id": "knora-api:hasStandoffLinkTo" + }, + "owl:minCardinality": 0 + }, + { + "@type": "owl:Restriction", + "owl:onProperty": { + "@id": "knora-api:isSegmentOf" + }, + "owl:cardinality": 1 + }, + { + "@type": "owl:Restriction", + "owl:onProperty": { + "@id": "knora-api:versionArkUrl" + }, + "owl:cardinality": 1 + }, + { + "@type": "owl:Restriction", + "owl:onProperty": { + "@id": "rdfs:label" + }, + "owl:cardinality": 1 + } + ], + "rdfs:comment": "A resource representing a sub-segment of another resource", + "@type": "owl:Class", + "@id": "knora-api:Segment" + }, { "@id": "knora-api:StillImageAbstractFileValue", "@type": "owl:Class", @@ -696,6 +839,9 @@ { "@id": "knora-api:Representation" }, + { + "@id": "http://www.w3.org/ns/ma-ont#Image" + }, { "@type": "owl:Restriction", "owl:onProperty": { @@ -796,6 +942,73 @@ "@type": "owl:Class", "@id": "knora-api:TextRepresentation" }, + { + "rdfs:label": "Video Segment", + "rdfs:subClassOf": [ + { + "@id": "knora-api:Segment" + }, + { + "@type": "owl:Restriction", + "owl:onProperty": { + "@id": "knora-api:arkUrl" + }, + "owl:cardinality": 1 + }, + { + "@type": "owl:Restriction", + "owl:onProperty": { + "@id": "knora-api:hasComment" + }, + "owl:minCardinality": 0 + }, + { + "@type": "owl:Restriction", + "owl:onProperty": { + "@id": "knora-api:hasIncomingLink" + }, + "owl:minCardinality": 0 + }, + { + "@type": "owl:Restriction", + "owl:onProperty": { + "@id": "knora-api:hasSegmentBounds" + }, + "owl:cardinality": 1 + }, + { + "@type": "owl:Restriction", + "owl:onProperty": { + "@id": "knora-api:hasStandoffLinkTo" + }, + "owl:minCardinality": 0 + }, + { + "@type": "owl:Restriction", + "owl:onProperty": { + "@id": "knora-api:isVideoSegmentOf" + }, + "owl:cardinality": 1 + }, + { + "@type": "owl:Restriction", + "owl:onProperty": { + "@id": "knora-api:versionArkUrl" + }, + "owl:cardinality": 1 + }, + { + "@type": "owl:Restriction", + "owl:onProperty": { + "@id": "rdfs:label" + }, + "owl:cardinality": 1 + } + ], + "rdfs:comment": "A segment of a video resource", + "@type": "owl:Class", + "@id": "knora-api:VideoSegment" + }, { "rdfs:label": "a TextRepresentation representing an XSL transformation that can be applied to an XML created from standoff. The transformation's result is ecptected to be HTML.", "rdfs:subClassOf": [ @@ -1058,16 +1271,19 @@ "@id": "knora-api:hasRepresentation" }, { - "rdfs:label": "Sequence Bounds", + "rdfs:label": "Segment Bounds", "rdfs:subPropertyOf": { "@id": "knora-api:hasValue" }, - "rdfs:comment": "Indicates the bounds of a sequence, i.e. the start and end point in the containing resource.", + "rdfs:comment": "Indicates the bounds of a segment, i.e. the start and end point in the containing resource.", "@type": "owl:DatatypeProperty", + "knora-api:subjectType": { + "@id": "knora-api:Segment" + }, "knora-api:objectType": { "@id": "knora-api:Interval" }, - "@id": "knora-api:hasSequenceBounds" + "@id": "knora-api:hasSegmentBounds" }, { "rdfs:label": "has Standoff Link to", @@ -1140,6 +1356,21 @@ }, "@id": "knora-api:isAnnotationOf" }, + { + "rdfs:label": "is audio segment of", + "rdfs:subPropertyOf": { + "@id": "knora-api:isSegmentOf" + }, + "rdfs:comment": "Indicates that this resource is a segment of an audio resource", + "@type": "owl:ObjectProperty", + "knora-api:subjectType": { + "@id": "knora-api:AudioSegment" + }, + "knora-api:objectType": { + "@id": "knora-api:AudioRepresentation" + }, + "@id": "knora-api:isAudioSegmentOf" + }, { "rdfs:comment": "Indicates if the given resource is the main resource of a request or a resource referred to by a link property.", "@type": "owl:DatatypeProperty", @@ -1182,19 +1413,39 @@ "@id": "knora-api:isRegionOf" }, { - "rdfs:label": "is sequence of", + "rdfs:label": "is segment of", + "rdfs:subPropertyOf": [ + { + "@id": "knora-api:hasLinkTo" + }, + { + "@id": "http://www.w3.org/ns/ma-ont#isFragmentOf" + } + ], + "rdfs:comment": "Indicates that this resource is a segment of a video or audio resource", + "@type": "owl:ObjectProperty", + "knora-api:subjectType": { + "@id": "knora-api:Segment" + }, + "knora-api:objectType": { + "@id": "knora-api:Representation" + }, + "@id": "knora-api:isSegmentOf" + }, + { + "rdfs:label": "is video segment of", "rdfs:subPropertyOf": { - "@id": "knora-api:hasLinkTo" + "@id": "knora-api:isSegmentOf" }, - "rdfs:comment": "Indicates that this resource is a sequence of a video or audio resource", + "rdfs:comment": "Indicates that this resource is a segment of a video resource", "@type": "owl:ObjectProperty", "knora-api:subjectType": { - "@id": "knora-api:Resource" + "@id": "knora-api:VideoSegment" }, "knora-api:objectType": { - "@id": "knora-api:Resource" + "@id": "knora-api:MovingImageRepresentation" }, - "@id": "knora-api:isSequenceOf" + "@id": "knora-api:isVideoSegmentOf" }, { "rdfs:label": "May have more results", diff --git a/test_data/generated_test_data/ontologyR2RV2/knoraApiOntologyWithValueObjects.jsonld b/test_data/generated_test_data/ontologyR2RV2/knoraApiOntologyWithValueObjects.jsonld index 87a785f50d..1605a7d542 100644 --- a/test_data/generated_test_data/ontologyR2RV2/knoraApiOntologyWithValueObjects.jsonld +++ b/test_data/generated_test_data/ontologyR2RV2/knoraApiOntologyWithValueObjects.jsonld @@ -593,6 +593,9 @@ { "@id": "knora-api:Representation" }, + { + "@id": "http://www.w3.org/ns/ma-ont#AudioTrack" + }, { "@type": "owl:Restriction", "owl:onProperty": { @@ -741,6 +744,185 @@ "@type": "owl:Class", "@id": "knora-api:AudioRepresentation" }, + { + "knora-api:isResourceClass": true, + "rdfs:label": "Audio Segment", + "knora-api:canBeInstantiated": true, + "rdfs:subClassOf": [ + { + "@id": "knora-api:Segment" + }, + { + "@type": "owl:Restriction", + "owl:onProperty": { + "@id": "knora-api:arkUrl" + }, + "owl:cardinality": 1, + "knora-api:isInherited": true + }, + { + "@type": "owl:Restriction", + "owl:onProperty": { + "@id": "knora-api:attachedToProject" + }, + "owl:cardinality": 1, + "knora-api:isInherited": true + }, + { + "@type": "owl:Restriction", + "owl:onProperty": { + "@id": "knora-api:attachedToUser" + }, + "owl:cardinality": 1, + "knora-api:isInherited": true + }, + { + "@type": "owl:Restriction", + "owl:onProperty": { + "@id": "knora-api:creationDate" + }, + "owl:cardinality": 1, + "knora-api:isInherited": true + }, + { + "@type": "owl:Restriction", + "owl:onProperty": { + "@id": "knora-api:deleteComment" + }, + "owl:maxCardinality": 1, + "knora-api:isInherited": true + }, + { + "@type": "owl:Restriction", + "owl:onProperty": { + "@id": "knora-api:deleteDate" + }, + "owl:maxCardinality": 1, + "knora-api:isInherited": true + }, + { + "@type": "owl:Restriction", + "owl:onProperty": { + "@id": "knora-api:deletedBy" + }, + "owl:maxCardinality": 1, + "knora-api:isInherited": true + }, + { + "@type": "owl:Restriction", + "owl:onProperty": { + "@id": "knora-api:hasComment" + }, + "owl:minCardinality": 0, + "knora-api:isInherited": true + }, + { + "@type": "owl:Restriction", + "owl:onProperty": { + "@id": "knora-api:hasIncomingLinkValue" + }, + "owl:minCardinality": 0, + "knora-api:isInherited": true + }, + { + "@type": "owl:Restriction", + "owl:onProperty": { + "@id": "knora-api:hasPermissions" + }, + "owl:cardinality": 1, + "knora-api:isInherited": true + }, + { + "@type": "owl:Restriction", + "owl:onProperty": { + "@id": "knora-api:hasSegmentBounds" + }, + "owl:cardinality": 1, + "knora-api:isInherited": true + }, + { + "@type": "owl:Restriction", + "owl:onProperty": { + "@id": "knora-api:hasStandoffLinkTo" + }, + "owl:minCardinality": 0, + "knora-api:isInherited": true + }, + { + "@type": "owl:Restriction", + "owl:onProperty": { + "@id": "knora-api:hasStandoffLinkToValue" + }, + "owl:minCardinality": 0, + "knora-api:isInherited": true + }, + { + "@type": "owl:Restriction", + "owl:onProperty": { + "@id": "knora-api:isAudioSegmentOf" + }, + "owl:cardinality": 1 + }, + { + "@type": "owl:Restriction", + "owl:onProperty": { + "@id": "knora-api:isAudioSegmentOfValue" + }, + "owl:cardinality": 1 + }, + { + "@type": "owl:Restriction", + "owl:onProperty": { + "@id": "knora-api:isDeleted" + }, + "owl:maxCardinality": 1, + "knora-api:isInherited": true + }, + { + "@type": "owl:Restriction", + "owl:onProperty": { + "@id": "knora-api:lastModificationDate" + }, + "owl:maxCardinality": 1, + "knora-api:isInherited": true + }, + { + "@type": "owl:Restriction", + "owl:onProperty": { + "@id": "knora-api:userHasPermission" + }, + "owl:cardinality": 1, + "knora-api:isInherited": true + }, + { + "@type": "owl:Restriction", + "owl:onProperty": { + "@id": "knora-api:versionArkUrl" + }, + "owl:cardinality": 1, + "knora-api:isInherited": true + }, + { + "@type": "owl:Restriction", + "owl:onProperty": { + "@id": "knora-api:versionDate" + }, + "owl:maxCardinality": 1, + "knora-api:isInherited": true + }, + { + "@type": "owl:Restriction", + "owl:onProperty": { + "@id": "rdfs:label" + }, + "owl:cardinality": 1, + "knora-api:isInherited": true + } + ], + "rdfs:comment": "A segment of an audio resource", + "@type": "owl:Class", + "@id": "knora-api:AudioSegment" + }, { "@id": "knora-api:BooleanBase", "@type": "owl:Class", @@ -3537,6 +3719,9 @@ { "@id": "knora-api:Representation" }, + { + "@id": "http://www.w3.org/ns/ma-ont#VideoTrack" + }, { "@type": "owl:Restriction", "owl:onProperty": { @@ -4125,33 +4310,212 @@ "owl:onProperty": { "@id": "knora-api:userHasPermission" }, - "owl:cardinality": 1 + "owl:cardinality": 1 + }, + { + "@type": "owl:Restriction", + "owl:onProperty": { + "@id": "knora-api:versionArkUrl" + }, + "owl:cardinality": 1 + }, + { + "@type": "owl:Restriction", + "owl:onProperty": { + "@id": "knora-api:versionDate" + }, + "owl:maxCardinality": 1 + }, + { + "@type": "owl:Restriction", + "owl:onProperty": { + "@id": "rdfs:label" + }, + "owl:cardinality": 1 + } + ], + "rdfs:comment": "Represents something in the world, or an abstract thing", + "@type": "owl:Class", + "@id": "knora-api:Resource" + }, + { + "knora-api:isResourceClass": true, + "rdfs:label": "Segment", + "rdfs:subClassOf": [ + { + "@id": "knora-api:Resource" + }, + { + "@id": "http://www.w3.org/ns/ma-ont#Track" + }, + { + "@type": "owl:Restriction", + "owl:onProperty": { + "@id": "knora-api:arkUrl" + }, + "owl:cardinality": 1, + "knora-api:isInherited": true + }, + { + "@type": "owl:Restriction", + "owl:onProperty": { + "@id": "knora-api:attachedToProject" + }, + "owl:cardinality": 1, + "knora-api:isInherited": true + }, + { + "@type": "owl:Restriction", + "owl:onProperty": { + "@id": "knora-api:attachedToUser" + }, + "owl:cardinality": 1, + "knora-api:isInherited": true + }, + { + "@type": "owl:Restriction", + "owl:onProperty": { + "@id": "knora-api:creationDate" + }, + "owl:cardinality": 1, + "knora-api:isInherited": true + }, + { + "@type": "owl:Restriction", + "owl:onProperty": { + "@id": "knora-api:deleteComment" + }, + "owl:maxCardinality": 1, + "knora-api:isInherited": true + }, + { + "@type": "owl:Restriction", + "owl:onProperty": { + "@id": "knora-api:deleteDate" + }, + "owl:maxCardinality": 1, + "knora-api:isInherited": true + }, + { + "@type": "owl:Restriction", + "owl:onProperty": { + "@id": "knora-api:deletedBy" + }, + "owl:maxCardinality": 1, + "knora-api:isInherited": true + }, + { + "@type": "owl:Restriction", + "owl:onProperty": { + "@id": "knora-api:hasComment" + }, + "owl:minCardinality": 0 + }, + { + "@type": "owl:Restriction", + "owl:onProperty": { + "@id": "knora-api:hasIncomingLinkValue" + }, + "owl:minCardinality": 0, + "knora-api:isInherited": true + }, + { + "@type": "owl:Restriction", + "owl:onProperty": { + "@id": "knora-api:hasPermissions" + }, + "owl:cardinality": 1, + "knora-api:isInherited": true + }, + { + "@type": "owl:Restriction", + "owl:onProperty": { + "@id": "knora-api:hasSegmentBounds" + }, + "owl:cardinality": 1 + }, + { + "@type": "owl:Restriction", + "owl:onProperty": { + "@id": "knora-api:hasStandoffLinkTo" + }, + "owl:minCardinality": 0, + "knora-api:isInherited": true + }, + { + "@type": "owl:Restriction", + "owl:onProperty": { + "@id": "knora-api:hasStandoffLinkToValue" + }, + "owl:minCardinality": 0, + "knora-api:isInherited": true + }, + { + "@type": "owl:Restriction", + "owl:onProperty": { + "@id": "knora-api:isDeleted" + }, + "owl:maxCardinality": 1, + "knora-api:isInherited": true + }, + { + "@type": "owl:Restriction", + "owl:onProperty": { + "@id": "knora-api:isSegmentOf" + }, + "owl:cardinality": 1 + }, + { + "@type": "owl:Restriction", + "owl:onProperty": { + "@id": "knora-api:isSegmentOfValue" + }, + "owl:cardinality": 1 + }, + { + "@type": "owl:Restriction", + "owl:onProperty": { + "@id": "knora-api:lastModificationDate" + }, + "owl:maxCardinality": 1, + "knora-api:isInherited": true + }, + { + "@type": "owl:Restriction", + "owl:onProperty": { + "@id": "knora-api:userHasPermission" + }, + "owl:cardinality": 1, + "knora-api:isInherited": true }, { "@type": "owl:Restriction", "owl:onProperty": { "@id": "knora-api:versionArkUrl" }, - "owl:cardinality": 1 + "owl:cardinality": 1, + "knora-api:isInherited": true }, { "@type": "owl:Restriction", "owl:onProperty": { "@id": "knora-api:versionDate" }, - "owl:maxCardinality": 1 + "owl:maxCardinality": 1, + "knora-api:isInherited": true }, { "@type": "owl:Restriction", "owl:onProperty": { "@id": "rdfs:label" }, - "owl:cardinality": 1 + "owl:cardinality": 1, + "knora-api:isInherited": true } ], - "rdfs:comment": "Represents something in the world, or an abstract thing", + "rdfs:comment": "A resource representing a sub-segment of another resource", "@type": "owl:Class", - "@id": "knora-api:Resource" + "@id": "knora-api:Segment" }, { "knora-api:isStandoffClass": true, @@ -5851,6 +6215,9 @@ { "@id": "knora-api:Representation" }, + { + "@id": "http://www.w3.org/ns/ma-ont#Image" + }, { "@type": "owl:Restriction", "owl:onProperty": { @@ -6838,6 +7205,185 @@ "@id": "knora-api:ValueBase", "@type": "owl:Class" }, + { + "knora-api:isResourceClass": true, + "rdfs:label": "Video Segment", + "knora-api:canBeInstantiated": true, + "rdfs:subClassOf": [ + { + "@id": "knora-api:Segment" + }, + { + "@type": "owl:Restriction", + "owl:onProperty": { + "@id": "knora-api:arkUrl" + }, + "owl:cardinality": 1, + "knora-api:isInherited": true + }, + { + "@type": "owl:Restriction", + "owl:onProperty": { + "@id": "knora-api:attachedToProject" + }, + "owl:cardinality": 1, + "knora-api:isInherited": true + }, + { + "@type": "owl:Restriction", + "owl:onProperty": { + "@id": "knora-api:attachedToUser" + }, + "owl:cardinality": 1, + "knora-api:isInherited": true + }, + { + "@type": "owl:Restriction", + "owl:onProperty": { + "@id": "knora-api:creationDate" + }, + "owl:cardinality": 1, + "knora-api:isInherited": true + }, + { + "@type": "owl:Restriction", + "owl:onProperty": { + "@id": "knora-api:deleteComment" + }, + "owl:maxCardinality": 1, + "knora-api:isInherited": true + }, + { + "@type": "owl:Restriction", + "owl:onProperty": { + "@id": "knora-api:deleteDate" + }, + "owl:maxCardinality": 1, + "knora-api:isInherited": true + }, + { + "@type": "owl:Restriction", + "owl:onProperty": { + "@id": "knora-api:deletedBy" + }, + "owl:maxCardinality": 1, + "knora-api:isInherited": true + }, + { + "@type": "owl:Restriction", + "owl:onProperty": { + "@id": "knora-api:hasComment" + }, + "owl:minCardinality": 0, + "knora-api:isInherited": true + }, + { + "@type": "owl:Restriction", + "owl:onProperty": { + "@id": "knora-api:hasIncomingLinkValue" + }, + "owl:minCardinality": 0, + "knora-api:isInherited": true + }, + { + "@type": "owl:Restriction", + "owl:onProperty": { + "@id": "knora-api:hasPermissions" + }, + "owl:cardinality": 1, + "knora-api:isInherited": true + }, + { + "@type": "owl:Restriction", + "owl:onProperty": { + "@id": "knora-api:hasSegmentBounds" + }, + "owl:cardinality": 1, + "knora-api:isInherited": true + }, + { + "@type": "owl:Restriction", + "owl:onProperty": { + "@id": "knora-api:hasStandoffLinkTo" + }, + "owl:minCardinality": 0, + "knora-api:isInherited": true + }, + { + "@type": "owl:Restriction", + "owl:onProperty": { + "@id": "knora-api:hasStandoffLinkToValue" + }, + "owl:minCardinality": 0, + "knora-api:isInherited": true + }, + { + "@type": "owl:Restriction", + "owl:onProperty": { + "@id": "knora-api:isDeleted" + }, + "owl:maxCardinality": 1, + "knora-api:isInherited": true + }, + { + "@type": "owl:Restriction", + "owl:onProperty": { + "@id": "knora-api:isVideoSegmentOf" + }, + "owl:cardinality": 1 + }, + { + "@type": "owl:Restriction", + "owl:onProperty": { + "@id": "knora-api:isVideoSegmentOfValue" + }, + "owl:cardinality": 1 + }, + { + "@type": "owl:Restriction", + "owl:onProperty": { + "@id": "knora-api:lastModificationDate" + }, + "owl:maxCardinality": 1, + "knora-api:isInherited": true + }, + { + "@type": "owl:Restriction", + "owl:onProperty": { + "@id": "knora-api:userHasPermission" + }, + "owl:cardinality": 1, + "knora-api:isInherited": true + }, + { + "@type": "owl:Restriction", + "owl:onProperty": { + "@id": "knora-api:versionArkUrl" + }, + "owl:cardinality": 1, + "knora-api:isInherited": true + }, + { + "@type": "owl:Restriction", + "owl:onProperty": { + "@id": "knora-api:versionDate" + }, + "owl:maxCardinality": 1, + "knora-api:isInherited": true + }, + { + "@type": "owl:Restriction", + "owl:onProperty": { + "@id": "rdfs:label" + }, + "owl:cardinality": 1, + "knora-api:isInherited": true + } + ], + "rdfs:comment": "A segment of a video resource", + "@type": "owl:Class", + "@id": "knora-api:VideoSegment" + }, { "knora-api:isResourceClass": true, "rdfs:label": "a TextRepresentation representing an XSL transformation that can be applied to an XML created from standoff. The transformation's result is ecptected to be HTML.", @@ -7622,18 +8168,21 @@ "@id": "knora-api:hasRepresentationValue" }, { - "rdfs:label": "Sequence Bounds", + "rdfs:label": "Segment Bounds", "rdfs:subPropertyOf": { "@id": "knora-api:hasValue" }, "knora-api:isEditable": true, "knora-api:isResourceProperty": true, - "rdfs:comment": "Indicates the bounds of a sequence, i.e. the start and end point in the containing resource.", "@type": "owl:ObjectProperty", "knora-api:objectType": { "@id": "knora-api:IntervalValue" }, - "@id": "knora-api:hasSequenceBounds" + "@id": "knora-api:hasSegmentBounds", + "knora-api:subjectType": { + "@id": "knora-api:Segment" + }, + "rdfs:comment": "Indicates the bounds of a segment, i.e. the start and end point in the containing resource." }, { "rdfs:label": "has Standoff Link to", @@ -7801,6 +8350,40 @@ }, "@id": "knora-api:isAnnotationOfValue" }, + { + "rdfs:label": "is audio segment of", + "rdfs:subPropertyOf": { + "@id": "knora-api:isSegmentOf" + }, + "knora-api:isEditable": true, + "knora-api:isResourceProperty": true, + "@type": "owl:ObjectProperty", + "knora-api:objectType": { + "@id": "knora-api:AudioRepresentation" + }, + "@id": "knora-api:isAudioSegmentOf", + "knora-api:subjectType": { + "@id": "knora-api:AudioSegment" + }, + "knora-api:isLinkProperty": true, + "rdfs:comment": "Indicates that this resource is a segment of an audio resource" + }, + { + "knora-api:isLinkValueProperty": true, + "rdfs:subPropertyOf": { + "@id": "knora-api:isSegmentOfValue" + }, + "knora-api:isEditable": true, + "knora-api:isResourceProperty": true, + "knora-api:subjectType": { + "@id": "knora-api:AudioSegment" + }, + "@type": "owl:ObjectProperty", + "knora-api:objectType": { + "@id": "knora-api:LinkValue" + }, + "@id": "knora-api:isAudioSegmentOfValue" + }, { "rdfs:label": "is shared", "rdfs:comment": "Indicates whether an ontology is built into Knora", @@ -7960,22 +8543,27 @@ "rdfs:comment": "Indicates whether class is a subclass of Resource." }, { - "rdfs:label": "is sequence of", - "rdfs:subPropertyOf": { - "@id": "knora-api:hasLinkTo" - }, + "rdfs:label": "is segment of", + "rdfs:subPropertyOf": [ + { + "@id": "knora-api:hasLinkTo" + }, + { + "@id": "http://www.w3.org/ns/ma-ont#isFragmentOf" + } + ], "knora-api:isEditable": true, "knora-api:isResourceProperty": true, "@type": "owl:ObjectProperty", "knora-api:objectType": { - "@id": "knora-api:Resource" + "@id": "knora-api:Representation" }, - "@id": "knora-api:isSequenceOf", + "@id": "knora-api:isSegmentOf", "knora-api:subjectType": { - "@id": "knora-api:Resource" + "@id": "knora-api:Segment" }, "knora-api:isLinkProperty": true, - "rdfs:comment": "Indicates that this resource is a sequence of a video or audio resource" + "rdfs:comment": "Indicates that this resource is a segment of a video or audio resource" }, { "knora-api:isLinkValueProperty": true, @@ -7985,13 +8573,13 @@ "knora-api:isEditable": true, "knora-api:isResourceProperty": true, "knora-api:subjectType": { - "@id": "knora-api:Resource" + "@id": "knora-api:Segment" }, "@type": "owl:ObjectProperty", "knora-api:objectType": { "@id": "knora-api:LinkValue" }, - "@id": "knora-api:isSequenceOfValue" + "@id": "knora-api:isSegmentOfValue" }, { "rdfs:label": "is shared", @@ -8026,6 +8614,40 @@ }, "rdfs:comment": "Indicates whether class is a subclass of Value." }, + { + "rdfs:label": "is video segment of", + "rdfs:subPropertyOf": { + "@id": "knora-api:isSegmentOf" + }, + "knora-api:isEditable": true, + "knora-api:isResourceProperty": true, + "@type": "owl:ObjectProperty", + "knora-api:objectType": { + "@id": "knora-api:MovingImageRepresentation" + }, + "@id": "knora-api:isVideoSegmentOf", + "knora-api:subjectType": { + "@id": "knora-api:VideoSegment" + }, + "knora-api:isLinkProperty": true, + "rdfs:comment": "Indicates that this resource is a segment of a video resource" + }, + { + "knora-api:isLinkValueProperty": true, + "rdfs:subPropertyOf": { + "@id": "knora-api:isSegmentOfValue" + }, + "knora-api:isEditable": true, + "knora-api:isResourceProperty": true, + "knora-api:subjectType": { + "@id": "knora-api:VideoSegment" + }, + "@type": "owl:ObjectProperty", + "knora-api:objectType": { + "@id": "knora-api:LinkValue" + }, + "@id": "knora-api:isVideoSegmentOfValue" + }, { "@id": "knora-api:lastModificationDate", "@type": "owl:DatatypeProperty", diff --git a/test_data/project_data/anything-data.ttl b/test_data/project_data/anything-data.ttl index 09c8f3e8d1..31bcc85fff 100644 --- a/test_data/project_data/anything-data.ttl +++ b/test_data/project_data/anything-data.ttl @@ -2272,51 +2272,6 @@ knora-base:valueCreationDate "2019-11-29T10:00:00.673298Z"^^xsd:dateTime ; knora-base:isDeleted false . -# Video Sequence Resource - - a anything:VideoSequenceThing ; - knora-base:isSequenceOf ; - knora-base:isSequenceOfValue ; - knora-base:hasSequenceBounds ; - rdfs:label "video sequence resource instance" ; - knora-base:attachedToUser ; - knora-base:attachedToProject ; - knora-base:hasPermissions "V knora-admin:UnknownUser|M knora-admin:ProjectMember" ; - knora-base:creationDate "2019-11-29T10:00:00.673298Z"^^xsd:dateTime ; - knora-base:isDeleted false . - -# Video Sequence Interval Value - - a knora-base:IntervalValue ; - knora-base:valueHasIntervalStart "0"^^xsd:decimal ; - knora-base:valueHasIntervalEnd "10"^^xsd:decimal ; - knora-base:valueHasString "0 - 10" ; - knora-base:valueHasUUID "8QR16dqWSLiatmna1a0-HA"^^xsd:string ; - knora-base:attachedToUser ; - knora-base:attachedToProject ; - knora-base:hasPermissions "V knora-admin:UnknownUser|M knora-admin:ProjectMember" ; - knora-base:valueCreationDate "2019-11-29T10:00:00.673298Z"^^xsd:dateTime ; - knora-base:valueHasOrder 0 ; - knora-base:isDeleted false . - -# Video Sequence Link Value - - a knora-base:LinkValue ; - rdf:subject ; - rdf:predicate knora-base:isSequenceOf ; - rdf:object ; - knora-base:valueHasString "http://rdfh.ch/0001/zUelKon-SdmuL9iiHMgnGw" ; - knora-base:valueHasUUID "VPDWlq3dSH-FNKIL9CX3vw"^^xsd:string ; - knora-base:attachedToUser ; - knora-base:attachedToProject ; - knora-base:hasPermissions "V knora-admin:UnknownUser|M knora-admin:ProjectMember" ; - knora-base:valueCreationDate "2019-11-29T10:00:00.673298Z"^^xsd:dateTime ; - knora-base:valueHasOrder 0 ; - knora-base:valueHasRefCount "1"^^xsd:int ; - knora-base:isDeleted false . - - - # Audio Resource @@ -2357,46 +2312,3 @@ knora-base:hasPermissions "V knora-admin:UnknownUser|M knora-admin:ProjectMember" ; knora-base:valueCreationDate "2019-11-29T10:00:00.673298Z"^^xsd:dateTime ; knora-base:isDeleted false . - -# Audio Sequence Resource - - a anything:AudioSequenceThing ; - knora-base:isSequenceOf ; - knora-base:isSequenceOfValue ; - knora-base:hasSequenceBounds ; - rdfs:label "audio sequence resource instance" ; - knora-base:attachedToUser ; - knora-base:attachedToProject ; - knora-base:hasPermissions "V knora-admin:UnknownUser|M knora-admin:ProjectMember" ; - knora-base:creationDate "2019-11-29T10:00:00.673298Z"^^xsd:dateTime ; - knora-base:isDeleted false . - -# Audio Sequence Interval Value - - a knora-base:IntervalValue ; - knora-base:valueHasIntervalStart "0"^^xsd:decimal ; - knora-base:valueHasIntervalEnd "10"^^xsd:decimal ; - knora-base:valueHasString "0 - 10" ; - knora-base:valueHasUUID "tbK4Yom-Smq24USjY6RgEw"^^xsd:string ; - knora-base:attachedToUser ; - knora-base:attachedToProject ; - knora-base:hasPermissions "V knora-admin:UnknownUser|M knora-admin:ProjectMember" ; - knora-base:valueCreationDate "2019-11-29T10:00:00.673298Z"^^xsd:dateTime ; - knora-base:valueHasOrder 0 ; - knora-base:isDeleted false . - -# Audio Sequence Link Value - - a knora-base:LinkValue ; - rdf:subject ; - rdf:predicate knora-base:isSequenceOf ; - rdf:object ; - knora-base:valueHasString "http://rdfh.ch/0001/gT2msR9wS-CeLWXaj3N2aA" ; - knora-base:valueHasUUID "4ug_4NNNReygjjzOm8R7Cw"^^xsd:string ; - knora-base:attachedToUser ; - knora-base:attachedToProject ; - knora-base:hasPermissions "V knora-admin:UnknownUser|M knora-admin:ProjectMember" ; - knora-base:valueCreationDate "2019-11-29T10:00:00.673298Z"^^xsd:dateTime ; - knora-base:valueHasOrder 0 ; - knora-base:valueHasRefCount "1"^^xsd:int ; - knora-base:isDeleted false . diff --git a/test_data/project_data/sequences-data.ttl b/test_data/project_data/sequences-data.ttl deleted file mode 100644 index b3c4ca17eb..0000000000 --- a/test_data/project_data/sequences-data.ttl +++ /dev/null @@ -1,96 +0,0 @@ -@prefix s: . -@prefix xml: . -@prefix xsd: . -@prefix rdf: . -@prefix rdfs: . -@prefix owl: . -@prefix foaf: . -@prefix knora-base: . -@prefix salsah-gui: . - - -# audio-01 resource - - a s:Audio ; - knora-base:attachedToUser ; - knora-base:attachedToProject ; - knora-base:hasPermissions "V knora-admin:UnknownUser|M knora-admin:ProjectMember" ; - knora-base:creationDate "2022-07-13T16:21:34Z"^^xsd:dateTime ; - rdfs:label "an audio instance" ; - s:hasTitle ; - knora-base:isDeleted false . - -# title value of audio-01 resource - - a knora-base:TextValue ; - knora-base:valueHasUUID "ZHGLzD0rSfyVzfUG0ck4aw"^^xsd:string ; - knora-base:valueCreationDate "2022-07-13T16:21:34Z"^^xsd:dateTime ; - knora-base:valueHasOrder 0 ; - knora-base:valueHasString "Audio Title" ; - knora-base:hasPermissions "V knora-admin:UnknownUser|M knora-admin:ProjectMember" ; - knora-base:attachedToUser ; - knora-base:isDeleted false . - - -# video-01 resource - - a s:Video ; - knora-base:attachedToUser ; - knora-base:attachedToProject ; - knora-base:hasPermissions "V knora-admin:UnknownUser|M knora-admin:ProjectMember" ; - knora-base:creationDate "2022-07-13T16:21:34Z"^^xsd:dateTime ; - rdfs:label "a video instance" ; - s:hasTitle ; - knora-base:isDeleted false . - -# title value of video-01 resource - - a knora-base:TextValue ; - knora-base:valueHasUUID "BKkJutVSTK-EU8fkc2tgLg"^^xsd:string ; - knora-base:valueCreationDate "2022-07-13T16:21:34Z"^^xsd:dateTime ; - knora-base:valueHasOrder 0 ; - knora-base:valueHasString "Video Title" ; - knora-base:hasPermissions "V knora-admin:UnknownUser|M knora-admin:ProjectMember" ; - knora-base:attachedToUser ; - knora-base:isDeleted false . - - -# sequence of video-01 - - a s:VideoSequence ; - knora-base:attachedToUser ; - knora-base:attachedToProject ; - knora-base:hasPermissions "V knora-admin:UnknownUser|M knora-admin:ProjectMember" ; - knora-base:creationDate "2022-07-13T16:21:34Z"^^xsd:dateTime ; - rdfs:label "a video sequence instance" ; - knora-base:isSequenceOf ; - knora-base:isSequenceOfValue ; - knora-base:hasSequenceBounds ; - knora-base:isDeleted false . - -# reification of the isSequenceOf link from video-sequence-01 to video-01 - - a knora-base:LinkValue ; - knora-base:valueHasUUID "6CKp1AmZT1SRHYeSOUaJjA"^^xsd:string ; - rdf:subject ; - rdf:predicate s:isSequenceOf ; - rdf:object ; - knora-base:attachedToUser ; - knora-base:hasPermissions "V knora-admin:UnknownUser|M knora-admin:ProjectMember" ; - knora-base:valueCreationDate "2022-07-13T16:21:34Z"^^xsd:dateTime ; - knora-base:valueHasString "http://rdfh.ch/0001/video-01" ; - knora-base:valueHasRefCount "1"^^xsd:int ; - knora-base:isDeleted false . - -# sequence bounds interval of video-sequence-01 - - a knora-base:IntervalValue ; - knora-base:valueHasUUID "vEDim4wvSfGnhSvX6fXcaA"^^xsd:string ; - knora-base:valueCreationDate "2022-07-13T16:21:34Z"^^xsd:dateTime ; - knora-base:valueHasIntervalEnd "100"^^xsd:decimal ; - knora-base:valueHasIntervalStart "0"^^xsd:decimal ; - knora-base:valueHasOrder 0 ; - knora-base:valueHasString "0 - 100" ; - knora-base:hasPermissions "V knora-admin:UnknownUser|M knora-admin:ProjectMember" ; - knora-base:attachedToUser ; - knora-base:isDeleted false . diff --git a/test_data/project_ontologies/anything-onto.ttl b/test_data/project_ontologies/anything-onto.ttl index f7ff1b2b79..d4fcad2778 100644 --- a/test_data/project_ontologies/anything-onto.ttl +++ b/test_data/project_ontologies/anything-onto.ttl @@ -605,24 +605,6 @@ owl:onProperty :hasTitle ; owl:maxCardinality "1"^^xsd:nonNegativeInteger ] . -:VideoSequenceThing - rdf:type owl:Class ; - rdfs:label "Video Sequence Thing"@en ; - rdfs:comment "A Resource representing a subsequence of a video"@en ; - rdfs:subClassOf knora-base:Resource , - [ rdf:type owl:Restriction ; - owl:onProperty knora-base:isSequenceOf ; - owl:cardinality "1"^^xsd:nonNegativeInteger ; - salsah-gui:guiOrder "0"^^xsd:nonNegativeInteger ], - [ rdf:type owl:Restriction ; - owl:onProperty knora-base:isSequenceOfValue ; - owl:cardinality "1"^^xsd:nonNegativeInteger ; - salsah-gui:guiOrder "0"^^xsd:nonNegativeInteger ], - [ rdf:type owl:Restriction ; - owl:onProperty knora-base:hasSequenceBounds ; - owl:cardinality "1"^^xsd:nonNegativeInteger ; - salsah-gui:guiOrder "0"^^xsd:nonNegativeInteger ] . - :AudioThing rdf:type owl:Class ; rdfs:label "Audio Thing"@en ; @@ -632,25 +614,6 @@ owl:onProperty :hasTitle ; owl:maxCardinality "1"^^xsd:nonNegativeInteger ] . -:AudioSequenceThing - rdf:type owl:Class ; - rdfs:label "Audio Sequence Thing"@en ; - rdfs:comment "A Resource representing a subsequence of an audio"@en ; - rdfs:subClassOf knora-base:Resource , - [ rdf:type owl:Restriction ; - owl:onProperty knora-base:isSequenceOf ; - owl:cardinality "1"^^xsd:nonNegativeInteger ; - salsah-gui:guiOrder "0"^^xsd:nonNegativeInteger ], - [ rdf:type owl:Restriction ; - owl:onProperty knora-base:isSequenceOfValue ; - owl:cardinality "1"^^xsd:nonNegativeInteger ; - salsah-gui:guiOrder "0"^^xsd:nonNegativeInteger ], - [ rdf:type owl:Restriction ; - owl:onProperty knora-base:hasSequenceBounds ; - owl:cardinality "1"^^xsd:nonNegativeInteger ; - salsah-gui:guiOrder "0"^^xsd:nonNegativeInteger ] . - - ################################################################# # diff --git a/test_data/project_ontologies/sequences-onto.ttl b/test_data/project_ontologies/sequences-onto.ttl deleted file mode 100644 index 64d598e271..0000000000 --- a/test_data/project_ontologies/sequences-onto.ttl +++ /dev/null @@ -1,118 +0,0 @@ -@prefix : . -@prefix xml: . -@prefix xsd: . -@prefix rdf: . -@prefix rdfs: . -@prefix owl: . -@prefix foaf: . -@prefix knora-base: . -@prefix salsah-gui: . -@base . - -# A trivial ontology to test isSequenceOf relations - - - rdf:type owl:Ontology ; - rdfs:label "The sequences ontology" ; - knora-base:attachedToProject ; - knora-base:lastModificationDate "2022-07-13T16:21:34Z"^^xsd:dateTime . - -:Video - rdf:type owl:Class ; - rdfs:subClassOf knora-base:MovingImageRepresentation, - [ rdf:type owl:Restriction ; - owl:onProperty :hasTitle ; - owl:cardinality "1"^^xsd:nonNegativeInteger ; - salsah-gui:guiOrder "0"^^xsd:nonNegativeInteger ] ; - rdfs:label "Video"@en ; - rdfs:comment "A video resource."@en . - -:Audio - rdf:type owl:Class ; - rdfs:subClassOf knora-base:AudioRepresentation, - [ rdf:type owl:Restriction ; - owl:onProperty :hasTitle ; - owl:cardinality "1"^^xsd:nonNegativeInteger ; - salsah-gui:guiOrder "0"^^xsd:nonNegativeInteger ] ; - rdfs:label "Audio"@en ; - rdfs:comment "An audio resource."@en . - - -:VideoSequence - rdf:type owl:Class ; - rdfs:subClassOf knora-base:Resource, - [ rdf:type owl:Restriction ; - owl:onProperty knora-base:isSequenceOf ; - owl:cardinality "1"^^xsd:nonNegativeInteger ; - salsah-gui:guiOrder "0"^^xsd:nonNegativeInteger ], - [ rdf:type owl:Restriction ; - owl:onProperty knora-base:isSequenceOfValue ; - owl:cardinality "1"^^xsd:nonNegativeInteger ; - salsah-gui:guiOrder "0"^^xsd:nonNegativeInteger ], - [ rdf:type owl:Restriction ; - owl:onProperty knora-base:hasSequenceBounds ; - owl:cardinality "1"^^xsd:nonNegativeInteger ; - salsah-gui:guiOrder "0"^^xsd:nonNegativeInteger ] ; - rdfs:label "Sequence"@en ; - rdfs:comment "Sequence of a Video."@en . - -:AudioSequence - rdf:type owl:Class ; - rdfs:subClassOf knora-base:Resource, - [ rdf:type owl:Restriction ; - owl:onProperty :isAnnotatedSequenceOfAudio ; - owl:cardinality "1"^^xsd:nonNegativeInteger ; - salsah-gui:guiOrder "0"^^xsd:nonNegativeInteger ], - [ rdf:type owl:Restriction ; - owl:onProperty :isAnnotatedSequenceOfAudioValue ; - owl:cardinality "1"^^xsd:nonNegativeInteger ; - salsah-gui:guiOrder "0"^^xsd:nonNegativeInteger ], - [ rdf:type owl:Restriction ; - owl:onProperty :hasCustomSequenceBounds ; - owl:cardinality "1"^^xsd:nonNegativeInteger ; - salsah-gui:guiOrder "0"^^xsd:nonNegativeInteger ] ; - rdfs:label "Sequence"@en ; - rdfs:comment "Sequence of a Video."@en . - - -:hasTitle - rdf:type owl:ObjectProperty ; - rdfs:label "has title"@en ; - rdfs:comment "has a title"@en ; - rdfs:subPropertyOf knora-base:hasValue ; - knora-base:subjectClassConstraint knora-base:Resource ; - knora-base:objectClassConstraint knora-base:TextValue ; - salsah-gui:guiElement salsah-gui:SimpleText ; - salsah-gui:guiAttribute "size=80", - "maxlength=255" . - - -:isAnnotatedSequenceOfAudio - rdf:type owl:ObjectProperty ; - rdfs:label "isAnnotatedSequenceOfAudio"@en ; - rdfs:comment "annotated sub-sequence of an audio resource"@en ; - rdfs:subPropertyOf knora-base:isSequenceOf ; - knora-base:subjectClassConstraint :AudioSequence ; - knora-base:objectClassConstraint :Audio ; - salsah-gui:guiElement salsah-gui:Searchbox . - - -:isAnnotatedSequenceOfAudioValue - rdf:type owl:ObjectProperty ; - rdfs:label "isAnnotatedSequenceOfAudio"@en ; - rdfs:comment "annotated sub-sequence of an audio resource"@en ; - rdfs:subPropertyOf knora-base:isSequenceOfValue ; - knora-base:subjectClassConstraint :AudioSequence ; - knora-base:objectClassConstraint knora-base:LinkValue ; - salsah-gui:guiElement salsah-gui:Searchbox . - - -:hasCustomSequenceBounds - rdf:type owl:ObjectProperty ; - rdfs:label "hasCustomSequenceBounds"@en ; - rdfs:comment "custom subclass of sequence bounds"@en ; - rdfs:subPropertyOf knora-base:hasSequenceBounds ; - knora-base:subjectClassConstraint :AudioSequence ; - knora-base:objectClassConstraint knora-base:IntervalValue ; - salsah-gui:guiElement salsah-gui:Interval . - diff --git a/webapi/scripts/fuseki-init-knora-test.sh b/webapi/scripts/fuseki-init-knora-test.sh index 14cf863da4..d3c10029a5 100755 --- a/webapi/scripts/fuseki-init-knora-test.sh +++ b/webapi/scripts/fuseki-init-knora-test.sh @@ -35,5 +35,3 @@ upload-graph ../../test_data/project_ontologies/webern-onto.ttl http://www.knora upload-graph ../../test_data/project_data/webern-data.ttl http://www.knora.org/data/0806/webern upload-graph ../../test_data/project_ontologies/freetest-onto.ttl http://www.knora.org/ontology/0001/freetest upload-graph ../../test_data/project_data/freetest-data.ttl http://www.knora.org/data/0001/freetest -upload-graph ../../test_data/project_ontologies/sequences-onto.ttl http://www.knora.org/ontology/0001/sequences -upload-graph ../../test_data/project_data/sequences-data.ttl http://www.knora.org/data/0001/sequences diff --git a/webapi/src/main/resources/knora-ontologies/knora-base.ttl b/webapi/src/main/resources/knora-ontologies/knora-base.ttl index b8428acfa8..f36ca234ab 100644 --- a/webapi/src/main/resources/knora-ontologies/knora-base.ttl +++ b/webapi/src/main/resources/knora-ontologies/knora-base.ttl @@ -9,6 +9,7 @@ @prefix rdfs: . @prefix xml: . @prefix xsd: . +@prefix ma: . @prefix foaf: . @prefix dcterms: . @prefix salsah-gui: . @@ -19,7 +20,7 @@ rdf:type owl:Ontology ; rdfs:label "The Knora base ontology"@en ; :attachedToProject knora-admin:SystemProject ; - :ontologyVersion "knora-base v32" . + :ontologyVersion "knora-base v33" . ################################################################# @@ -575,31 +576,6 @@ rdfs:subPropertyOf :hasLinkToValue . -### http://www.knora.org/ontology/knora-base#isSequenceOf - -:isSequenceOf - rdf:type owl:ObjectProperty ; - rdfs:label "ist Sequenz von"@de, - "is sequence of"@en, - "fait partie de"@fr, - "fa parte di"@it ; - rdfs:comment "Indicates that this resource is a sequence of a video or audio resource"@en ; - :subjectClassConstraint :Resource ; - :objectClassConstraint :Resource ; - :isEditable true ; - rdfs:subPropertyOf :hasLinkTo . - - -### http://www.knora.org/ontology/knora-base#isSequenceOfValue - -:isSequenceOfValue - rdf:type owl:ObjectProperty ; - :objectClassConstraint :LinkValue ; - :subjectClassConstraint :Resource ; - :isEditable true ; - rdfs:subPropertyOf :hasLinkToValue . - - ### http://www.knora.org/ontology/knora-base#isRegionOf :isRegionOf @@ -654,18 +630,6 @@ rdfs:comment "Indicates the position of a resource within a compound object. Typically used to indicate the order of pages within a book or similar resource."@en . -### http://www.knora.org/ontology/knora-base#hasSequenceBounds - -:hasSequenceBounds - rdf:type owl:ObjectProperty ; - :objectClassConstraint :IntervalValue ; - :isEditable true ; - rdfs:subPropertyOf :hasValue ; - rdfs:label "Sequenz-Grenzen"@de, - "Sequence Bounds"@en ; - rdfs:comment "Indicates the bounds of a sequence, i.e. the start and end point in the containing resource."@en . - - ### http://www.knora.org/ontology/knora-base#standoffTagHasOriginalXMLID :standoffTagHasOriginalXMLID @@ -1330,6 +1294,7 @@ :AudioRepresentation rdf:type owl:Class ; rdfs:subClassOf :Representation, + ma:AudioTrack, [ rdf:type owl:Restriction ; owl:onProperty :hasAudioFileValue ; owl:cardinality "1"^^xsd:nonNegativeInteger ] ; @@ -1745,6 +1710,7 @@ :MovingImageRepresentation rdf:type owl:Class ; rdfs:subClassOf :Representation, + ma:VideoTrack, [ rdf:type owl:Restriction ; owl:onProperty :hasMovingImageFileValue ; owl:cardinality "1"^^xsd:nonNegativeInteger ] ; @@ -2045,6 +2011,7 @@ :StillImageRepresentation rdf:type owl:Class ; rdfs:subClassOf :Representation, + ma:Image, [ rdf:type owl:Restriction ; owl:onProperty :hasStillImageFileValue ; owl:cardinality "1"^^xsd:nonNegativeInteger ] ; @@ -2258,3 +2225,144 @@ rdfs:subClassOf :Value ; rdfs:label "Deleted Value"@en ; rdfs:comment "Generic representation of a deleted value that can therefore not be displayed"@en . + + +### http://www.knora.org/ontology/knora-base#isSegmentOf + +:isSegmentOf + rdf:type owl:ObjectProperty ; + rdfs:label "ist Segment von"@de, + "is segment of"@en ; + rdfs:comment "Indicates that this resource is a segment of a video or audio resource"@en ; + :subjectClassConstraint :Segment ; + :objectClassConstraint :Representation ; + :isEditable true ; + rdfs:subPropertyOf :hasLinkTo, + ma:isFragmentOf . + + +### http://www.knora.org/ontology/knora-base#isSegmentOfValue + +:isSegmentOfValue + rdf:type owl:ObjectProperty ; + :objectClassConstraint :LinkValue ; + :subjectClassConstraint :Segment ; + :isEditable true ; + rdfs:subPropertyOf :hasLinkToValue . + + +### http://www.knora.org/ontology/knora-base#isAudioSegmentOf + +:isAudioSegmentOf + rdf:type owl:ObjectProperty ; + rdfs:label "ist Audio-Segment von"@de, + "is audio segment of"@en ; + rdfs:comment "Indicates that this resource is a segment of an audio resource"@en ; + :subjectClassConstraint :AudioSegment ; + :objectClassConstraint :AudioRepresentation ; + :isEditable true ; + rdfs:subPropertyOf :isSegmentOf . + + +### http://www.knora.org/ontology/knora-base#isAudioSegmentOfValue + +:isAudioSegmentOfValue + rdf:type owl:ObjectProperty ; + :objectClassConstraint :LinkValue ; + :subjectClassConstraint :AudioSegment ; + :isEditable true ; + rdfs:subPropertyOf :isSegmentOfValue . + + +### http://www.knora.org/ontology/knora-base#isVideoSegmentOf + +:isVideoSegmentOf + rdf:type owl:ObjectProperty ; + rdfs:label "ist Video-Segment von"@de, + "is video segment of"@en ; + rdfs:comment "Indicates that this resource is a segment of a video resource"@en ; + :subjectClassConstraint :VideoSegment ; + :objectClassConstraint :MovingImageRepresentation ; + :isEditable true ; + rdfs:subPropertyOf :isSegmentOf . + +### http://www.knora.org/ontology/knora-base#isVideoSegmentOfValue + +:isVideoSegmentOfValue + rdf:type owl:ObjectProperty ; + :objectClassConstraint :LinkValue ; + :subjectClassConstraint :VideoSegment ; + :isEditable true ; + rdfs:subPropertyOf :isSegmentOfValue . + + + +### http://www.knora.org/ontology/knora-base#hasSegmentBounds + +:hasSegmentBounds + rdf:type owl:ObjectProperty ; + :objectClassConstraint :IntervalValue ; + :subjectClassConstraint :Segment ; + :isEditable true ; + rdfs:subPropertyOf :hasValue ; + rdfs:label "Segment-Grenzen"@de, + "Segment Bounds"@en ; + rdfs:comment "Indicates the bounds of a segment, i.e. the start and end point in the containing resource."@en . + + +### http://www.knora.org/ontology/knora-base#Segment + +:Segment + rdf:type owl:Class ; + rdfs:subClassOf :Resource, + ma:Track, + [ rdf:type owl:Restriction ; + owl:onProperty :hasComment ; + owl:minCardinality "0"^^xsd:nonNegativeInteger ], + [ rdf:type owl:Restriction ; + owl:onProperty :isSegmentOf ; + owl:cardinality "1"^^xsd:nonNegativeInteger ], + [ rdf:type owl:Restriction ; + owl:onProperty :isSegmentOfValue ; + owl:cardinality "1"^^xsd:nonNegativeInteger ] , + [ rdf:type owl:Restriction ; + owl:onProperty :hasSegmentBounds ; + owl:cardinality "1"^^xsd:nonNegativeInteger ] ; + rdfs:label "Segment"@de, + "Segment"@en ; + :canBeInstantiated false ; + rdfs:comment "A resource representing a sub-segment of another resource"@en . + + +### http://www.knora.org/ontology/knora-base#AudioSegment + +:AudioSegment + rdf:type owl:Class ; + rdfs:subClassOf :Segment, + [ rdf:type owl:Restriction ; + owl:onProperty :isAudioSegmentOf ; + owl:cardinality "1"^^xsd:nonNegativeInteger ] , + [ rdf:type owl:Restriction ; + owl:onProperty :isAudioSegmentOfValue ; + owl:cardinality "1"^^xsd:nonNegativeInteger ] ; + rdfs:label "Audio-Segment"@de, + "Audio Segment"@en ; + :canBeInstantiated true ; + rdfs:comment "A segment of an audio resource"@en . + + +### http://www.knora.org/ontology/knora-base#VideoSegment + +:VideoSegment + rdf:type owl:Class ; + rdfs:subClassOf :Segment, + [ rdf:type owl:Restriction ; + owl:onProperty :isVideoSegmentOf ; + owl:cardinality "1"^^xsd:nonNegativeInteger ] , + [ rdf:type owl:Restriction ; + owl:onProperty :isVideoSegmentOfValue ; + owl:cardinality "1"^^xsd:nonNegativeInteger ] ; + rdfs:label "Video-Segment"@de, + "Video Segment"@en ; + :canBeInstantiated true ; + rdfs:comment "A segment of a video resource"@en . diff --git a/webapi/src/main/scala/org/knora/webapi/messages/OntologyConstants.scala b/webapi/src/main/scala/org/knora/webapi/messages/OntologyConstants.scala index 8484aad13f..1a1ca02b4f 100644 --- a/webapi/src/main/scala/org/knora/webapi/messages/OntologyConstants.scala +++ b/webapi/src/main/scala/org/knora/webapi/messages/OntologyConstants.scala @@ -204,17 +204,20 @@ object OntologyConstants { val ObjectDatatypeConstraint: IRI = KnoraBasePrefixExpansion + "objectDatatypeConstraint" val StandoffParentClassConstraint: IRI = KnoraBasePrefixExpansion + "standoffParentClassConstraint" - val LinkObj: IRI = KnoraBasePrefixExpansion + "LinkObj" - val HasLinkTo: IRI = KnoraBasePrefixExpansion + "hasLinkTo" - val HasLinkToValue: IRI = KnoraBasePrefixExpansion + "hasLinkToValue" - val IsPartOf: IRI = KnoraBasePrefixExpansion + "isPartOf" - val IsPartOfValue: IRI = KnoraBasePrefixExpansion + "isPartOfValue" - val Seqnum: IRI = KnoraBasePrefixExpansion + "seqnum" - val IsSequenceOf: IRI = KnoraBasePrefixExpansion + "isSequenceOf" - val IsSequenceOfValue: IRI = KnoraBasePrefixExpansion + "isSequenceOfValue" - val HasSequenceBounds: IRI = KnoraBasePrefixExpansion + "hasSequenceBounds" - val Region: IRI = KnoraBasePrefixExpansion + "Region" - val IsRegionOf: IRI = KnoraBasePrefixExpansion + "isRegionOf" + val LinkObj: IRI = KnoraBasePrefixExpansion + "LinkObj" + val HasLinkTo: IRI = KnoraBasePrefixExpansion + "hasLinkTo" + val HasLinkToValue: IRI = KnoraBasePrefixExpansion + "hasLinkToValue" + val IsPartOf: IRI = KnoraBasePrefixExpansion + "isPartOf" + val IsPartOfValue: IRI = KnoraBasePrefixExpansion + "isPartOfValue" + val Seqnum: IRI = KnoraBasePrefixExpansion + "seqnum" + val Region: IRI = KnoraBasePrefixExpansion + "Region" + val IsRegionOf: IRI = KnoraBasePrefixExpansion + "isRegionOf" + val IsSegmentOf: IRI = KnoraBasePrefixExpansion + "isSegmentOf" + val IsSegmentOfValue: IRI = KnoraBasePrefixExpansion + "isSegmentOfValue" + val IsAudioSegmentOf: IRI = KnoraBasePrefixExpansion + "isAudioSegmentOf" + val IsAudioSegmentOfValue: IRI = KnoraBasePrefixExpansion + "isAudioSegmentOfValue" + val IsVideoSegmentOf: IRI = KnoraBasePrefixExpansion + "isVideoSegmentOf" + val IsVideoSegmentOfValue: IRI = KnoraBasePrefixExpansion + "isVideoSegmentOfValue" val Value: IRI = KnoraBasePrefixExpansion + "Value" val ValueHas: IRI = KnoraBasePrefixExpansion + "valueHas" @@ -775,9 +778,6 @@ object OntologyConstants { val IsPartOf: IRI = KnoraApiV2PrefixExpansion + "isPartOf" val IsPartOfValue: IRI = KnoraApiV2PrefixExpansion + "isPartOfValue" val Seqnum: IRI = KnoraApiV2PrefixExpansion + "seqnum" - val IsSequenceOf: IRI = KnoraApiV2PrefixExpansion + "isSequenceOf" - val IsSequenceOfValue: IRI = KnoraApiV2PrefixExpansion + "isSequenceOfValue" - val HasSequenceBounds: IRI = KnoraApiV2PrefixExpansion + "hasSequenceBounds" val IsRegionOf: IRI = KnoraApiV2PrefixExpansion + "isRegionOf" val IsRegionOfValue: IRI = KnoraApiV2PrefixExpansion + "isRegionOfValue" val HasGeometry: IRI = KnoraApiV2PrefixExpansion + "hasGeometry" @@ -926,15 +926,12 @@ object OntologyConstants { val HasLinkTo: IRI = KnoraApiV2PrefixExpansion + "hasLinkTo" val HasIncomingLink: IRI = KnoraApiV2PrefixExpansion + "hasIncomingLink" - val IsPartOf: IRI = KnoraApiV2PrefixExpansion + "isPartOf" - val IsRegionOf: IRI = KnoraApiV2PrefixExpansion + "isRegionOf" - val Seqnum: IRI = KnoraApiV2PrefixExpansion + "seqnum" - val IsSequenceOf: IRI = KnoraApiV2PrefixExpansion + "isSequenceOf" - val IsSequenceOfValue: IRI = KnoraApiV2PrefixExpansion + "isSequenceOfValue" - val HasSequenceBounds: IRI = KnoraApiV2PrefixExpansion + "hasSequenceBounds" - val HasGeometry: IRI = KnoraApiV2PrefixExpansion + "hasGeometry" - val HasColor: IRI = KnoraApiV2PrefixExpansion + "hasColor" - val HasComment: IRI = KnoraApiV2PrefixExpansion + "hasComment" + val IsPartOf: IRI = KnoraApiV2PrefixExpansion + "isPartOf" + val IsRegionOf: IRI = KnoraApiV2PrefixExpansion + "isRegionOf" + val Seqnum: IRI = KnoraApiV2PrefixExpansion + "seqnum" + val HasGeometry: IRI = KnoraApiV2PrefixExpansion + "hasGeometry" + val HasColor: IRI = KnoraApiV2PrefixExpansion + "hasColor" + val HasComment: IRI = KnoraApiV2PrefixExpansion + "hasComment" val HasFile: IRI = KnoraApiV2PrefixExpansion + "hasFile" diff --git a/webapi/src/main/scala/org/knora/webapi/package.scala b/webapi/src/main/scala/org/knora/webapi/package.scala index 4ba4a74c88..9d5c9b6169 100644 --- a/webapi/src/main/scala/org/knora/webapi/package.scala +++ b/webapi/src/main/scala/org/knora/webapi/package.scala @@ -11,7 +11,7 @@ package object webapi { * The version of `knora-base` and of the other built-in ontologies that this version of Knora requires. * Must be the same as the object of `knora-base:ontologyVersion` in the `knora-base` ontology being used. */ - val KnoraBaseVersion: String = "knora-base v32" + val KnoraBaseVersion: String = "knora-base v33" /** * `IRI` is a synonym for `String`, used to improve code readability. diff --git a/webapi/src/main/scala/org/knora/webapi/responders/v2/ontology/OntologyHelpers.scala b/webapi/src/main/scala/org/knora/webapi/responders/v2/ontology/OntologyHelpers.scala index ce908de234..d7530b58f6 100644 --- a/webapi/src/main/scala/org/knora/webapi/responders/v2/ontology/OntologyHelpers.scala +++ b/webapi/src/main/scala/org/knora/webapi/responders/v2/ontology/OntologyHelpers.scala @@ -873,10 +873,14 @@ object OntologyHelpers { val subPropertyOf: SmartIri = internalPropertyDef.subPropertyOf match { case subProps if subProps.contains(OntologyConstants.KnoraBase.IsPartOf.toSmartIri) => OntologyConstants.KnoraBase.IsPartOfValue.toSmartIri - case subProps if subProps.contains(OntologyConstants.KnoraBase.IsSequenceOf.toSmartIri) => - OntologyConstants.KnoraBase.IsSequenceOfValue.toSmartIri case subProps if subProps.contains(OntologyConstants.KnoraBase.HasLinkTo.toSmartIri) => OntologyConstants.KnoraBase.HasLinkToValue.toSmartIri + case subProps if subProps.contains(OntologyConstants.KnoraBase.IsSegmentOf.toSmartIri) => + OntologyConstants.KnoraBase.IsSegmentOfValue.toSmartIri + case subProps if subProps.contains(OntologyConstants.KnoraBase.IsAudioSegmentOf.toSmartIri) => + OntologyConstants.KnoraBase.IsAudioSegmentOfValue.toSmartIri + case subProps if subProps.contains(OntologyConstants.KnoraBase.IsVideoSegmentOf.toSmartIri) => + OntologyConstants.KnoraBase.IsVideoSegmentOfValue.toSmartIri case subProps if subProps.size == 1 => // if subPropertyOf is neither isPartOf nor HasLinkTo it inherits from a custom link property internalPropertyDef.subPropertyOf.head.fromLinkPropToLinkValueProp diff --git a/webapi/src/main/scala/org/knora/webapi/store/triplestore/upgrade/RepositoryUpdatePlan.scala b/webapi/src/main/scala/org/knora/webapi/store/triplestore/upgrade/RepositoryUpdatePlan.scala index c6a01f3a4c..317fa82ef2 100644 --- a/webapi/src/main/scala/org/knora/webapi/store/triplestore/upgrade/RepositoryUpdatePlan.scala +++ b/webapi/src/main/scala/org/knora/webapi/store/triplestore/upgrade/RepositoryUpdatePlan.scala @@ -48,6 +48,7 @@ object RepositoryUpdatePlan { PluginForKnoraBaseVersion(versionNumber = 30, plugin = new UpgradePluginPR3111()), PluginForKnoraBaseVersion(versionNumber = 31, plugin = new UpgradePluginPR3112()), PluginForKnoraBaseVersion(versionNumber = 32, plugin = new MigrateOnlyBuiltInGraphs()), + PluginForKnoraBaseVersion(versionNumber = 33, plugin = new MigrateOnlyBuiltInGraphs()), ) /**