Skip to content

Commit

Permalink
fix!: partOf and sequenceOf properties are not marked as isEditable (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
BalduinLandolt committed Oct 27, 2022
1 parent f2b2584 commit 68f19c3
Show file tree
Hide file tree
Showing 22 changed files with 5,065 additions and 4,997 deletions.
26 changes: 10 additions & 16 deletions docs/01-introduction/example-project.md
Expand Up @@ -176,22 +176,16 @@ relationship is expressed using the property `incunabula:partOf`:

The key things to notice here are:

* `rdfs:subPropertyOf knora-base:isPartOf`: The Knora base ontology
provides a generic `isPartOf` property to express part-whole
relationships. Like many properties defined in `knora-base`, a
project cannot use `knora-base:isPartOf` directly, but must make a
subproperty such as `incunabula:partOf`. It is important to note
that `knora-base:isPartOf` is a subproperty of
`knora-base:hasLinkTo`. Any property that points to a
`knora-base:Resource` must be a subproperty of
`knora-base:hasLinkTo`. In Knora terminology, such a property is
called a *link property*.
* `knora-base:objectClassConstraint :book`: The object of this
property must be a member of the class `incunabula:book`, which, as
we will see below, is a subclass of `knora-base:Resource`.
* `salsah-gui:guiElement salsah-gui:Searchbox`: When SALSAH prompts a
user to select the book that a page is part of, it should provide a
search box enabling the user to find the desired book.
* `rdfs:subPropertyOf knora-base:isPartOf`: The `knora-base` ontology provides a generic `isPartOf` property to express
part-whole relationships. A project may use `knora-base:isPartOf` directly, however creating a subproperty such as
`incunabula:partOf` will allow to customize the property further, e.g. by giving it a more descriptive label.
It is important to note that `knora-base:isPartOf` is a subproperty of `knora-base:hasLinkTo`. Any property that
points to a `knora-base:Resource` must be a subproperty of `knora-base:hasLinkTo`. Such a
property is called a *link property*.
* `knora-base:objectClassConstraint :book`: The object of this property must be a member of the class `incunabula:book`,
which, as we will see below, is a subclass of `knora-base:Resource`.
* `salsah-gui:guiElement salsah-gui:Searchbox`: When SALSAH prompts a user to select the book that a page is part of, it
should provide a search box enabling the user to find the desired book.

Because `incunabula:partOf` is a link property, it must always
accompanied by a *link value property*, which enables Knora to store
Expand Down
35 changes: 18 additions & 17 deletions docs/02-knora-ontologies/knora-base.md
Expand Up @@ -575,34 +575,35 @@ as the `kb:LinkValue`.

#### isPartOf

A special case of linked resources are _part-of related resources_, i.e. a resource consisting of several other resources.
In order to create a part-of relation between two resources, the resource that is part of another resource needs to have
a property that is a subproperty of `kb:isPartOf`. This property needs to point to the resource class it is part of via
its predicate `kb:objectType`.
A special case of linked resources are _part-of related resources_, i.e. a resource consisting of several other
resources. In order to create a part-of relation between two resources, the resource that is part of another resource
needs to have a property that is either `kb:isPartOf` or a subproperty thereof.
`kb:isPartOf` itself is a subproperty of `kb:hasLinkTo`. Same as described above for link properties, a corresponding
part-of value property is created automatically. This value property has the same name as the part-of property with
`Value` appended. For example, if in an ontology `data` a property `data:partOf` was defined, the corresponding value
property would be named `data:partOfValue`. This newly created property `data:partOfValue` is defined as a subproperty
of `kb:isPartOfValue`.

Part-of relations are recommended for resources of type `kb:StillImageRepresentation`. In that case, the resource that is
part of another resource needs to have a property that is a subproperty of `kb:seqnum` with an integer as value.
A 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](https://docs.dasch.swiss/DSP-API/01-introduction/example-project/#resource-classes) example).
Part-of relations are recommended for resources of type `kb:StillImageRepresentation`. In that case, the resource that
is part of another resource needs to have a property `kb:seqnum` or a subproperty thereof, with an integer as value. A
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](https://docs.dasch.swiss/DSP-API/01-introduction/example-project/#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`.
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).
A dedicated frontend behaviour is planned, if these properties are used in combination.
`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.
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

Expand Down
6 changes: 6 additions & 0 deletions knora-ontologies/knora-base.ttl
Expand Up @@ -561,6 +561,7 @@
rdfs:comment "Indicates that this resource is part of another resource"@en ;
:subjectClassConstraint :Resource ;
:objectClassConstraint :Resource ;
:isEditable true ;
rdfs:subPropertyOf :hasLinkTo .


Expand All @@ -570,6 +571,7 @@
rdf:type owl:ObjectProperty ;
:objectClassConstraint :LinkValue ;
:subjectClassConstraint :Resource ;
:isEditable true ;
rdfs:subPropertyOf :hasLinkToValue .


Expand All @@ -584,6 +586,7 @@
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 .


Expand All @@ -593,6 +596,7 @@
rdf:type owl:ObjectProperty ;
:objectClassConstraint :LinkValue ;
:subjectClassConstraint :Resource ;
:isEditable true ;
rdfs:subPropertyOf :hasLinkToValue .


Expand Down Expand Up @@ -641,6 +645,7 @@
:seqnum
rdf:type owl:ObjectProperty ;
:objectClassConstraint :IntValue ;
:isEditable true ;
rdfs:subPropertyOf :hasValue ;
rdfs:label "Sequenznummer"@de,
"Sequence number"@en,
Expand All @@ -654,6 +659,7 @@
:hasSequenceBounds
rdf:type owl:ObjectProperty ;
:objectClassConstraint :IntervalValue ;
:isEditable true ;
rdfs:subPropertyOf :hasValue ;
rdfs:label "Sequenz-Grenzen"@de,
"Sequence Bounds"@en;
Expand Down

0 comments on commit 68f19c3

Please sign in to comment.