Skip to content

Commit

Permalink
feat: Add license and copyright attribution to ontologies (DEV-4347) (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
seakayone authored Nov 15, 2024
1 parent 3330dbf commit 2d62dcb
Show file tree
Hide file tree
Showing 7 changed files with 326 additions and 77 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -902,6 +902,22 @@
{
"@id": "knora-api:StillImageAbstractFileValue",
"@type": "owl:Class",
"rdfs:subClassOf": [
{
"@type": "owl:Restriction",
"owl:onProperty": {
"@id": "knora-api:hasCopyrightAttribution"
},
"owl:maxCardinality": 1
},
{
"@type": "owl:Restriction",
"owl:onProperty": {
"@id": "knora-api:hasLicense"
},
"owl:maxCardinality": 1
}
],
"rdfs:comment": "A file containing a two-dimensional still image"
},
{
Expand Down Expand Up @@ -1267,6 +1283,14 @@
},
"@id": "knora-api:hasComment"
},
{
"@id": "knora-api:hasCopyrightAttribution",
"@type": "owl:DatatypeProperty",
"knora-api:objectType": {
"@id": "xsd:string"
},
"rdfs:comment": "The copyright statement that gives credit to the original author."
},
{
"rdfs:label": "has 3D-file",
"rdfs:subPropertyOf": {
Expand Down Expand Up @@ -1394,6 +1418,14 @@
},
"@id": "knora-api:hasKeyword"
},
{
"@id": "knora-api:hasLicense",
"@type": "owl:DatatypeProperty",
"knora-api:objectType": {
"@id": "xsd:string"
},
"rdfs:comment": "Specifies the terms under which a work can be used. This statement may be a reference to a well-known license, such as Creative Commons (e.g. 'CC BY-SA') or a custom license."
},
{
"rdfs:label": "has Link to",
"rdfs:subPropertyOf": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -234,6 +234,22 @@
"owl:cardinality": 1,
"knora-api:isInherited": true
},
{
"@type": "owl:Restriction",
"owl:onProperty": {
"@id": "knora-api:hasCopyrightAttribution"
},
"owl:maxCardinality": 1,
"knora-api:isInherited": true
},
{
"@type": "owl:Restriction",
"owl:onProperty": {
"@id": "knora-api:hasLicense"
},
"owl:maxCardinality": 1,
"knora-api:isInherited": true
},
{
"@type": "owl:Restriction",
"owl:onProperty": {
Expand Down Expand Up @@ -517,6 +533,22 @@
"owl:cardinality": 1,
"knora-api:isInherited": true
},
{
"@type": "owl:Restriction",
"owl:onProperty": {
"@id": "knora-api:hasCopyrightAttribution"
},
"owl:maxCardinality": 1,
"knora-api:isInherited": true
},
{
"@type": "owl:Restriction",
"owl:onProperty": {
"@id": "knora-api:hasLicense"
},
"owl:maxCardinality": 1,
"knora-api:isInherited": true
},
{
"@type": "owl:Restriction",
"owl:onProperty": {
Expand Down Expand Up @@ -1315,6 +1347,22 @@
"owl:cardinality": 1,
"knora-api:isInherited": true
},
{
"@type": "owl:Restriction",
"owl:onProperty": {
"@id": "knora-api:hasCopyrightAttribution"
},
"owl:maxCardinality": 1,
"knora-api:isInherited": true
},
{
"@type": "owl:Restriction",
"owl:onProperty": {
"@id": "knora-api:hasLicense"
},
"owl:maxCardinality": 1,
"knora-api:isInherited": true
},
{
"@type": "owl:Restriction",
"owl:onProperty": {
Expand Down Expand Up @@ -2270,6 +2318,22 @@
"owl:cardinality": 1,
"knora-api:isInherited": true
},
{
"@type": "owl:Restriction",
"owl:onProperty": {
"@id": "knora-api:hasCopyrightAttribution"
},
"owl:maxCardinality": 1,
"knora-api:isInherited": true
},
{
"@type": "owl:Restriction",
"owl:onProperty": {
"@id": "knora-api:hasLicense"
},
"owl:maxCardinality": 1,
"knora-api:isInherited": true
},
{
"@type": "owl:Restriction",
"owl:onProperty": {
Expand Down Expand Up @@ -2559,6 +2623,20 @@
},
"owl:cardinality": 1
},
{
"@type": "owl:Restriction",
"owl:onProperty": {
"@id": "knora-api:hasCopyrightAttribution"
},
"owl:maxCardinality": 1
},
{
"@type": "owl:Restriction",
"owl:onProperty": {
"@id": "knora-api:hasLicense"
},
"owl:maxCardinality": 1
},
{
"@type": "owl:Restriction",
"owl:onProperty": {
Expand Down Expand Up @@ -3695,6 +3773,22 @@
"owl:cardinality": 1,
"knora-api:isInherited": true
},
{
"@type": "owl:Restriction",
"owl:onProperty": {
"@id": "knora-api:hasCopyrightAttribution"
},
"owl:maxCardinality": 1,
"knora-api:isInherited": true
},
{
"@type": "owl:Restriction",
"owl:onProperty": {
"@id": "knora-api:hasLicense"
},
"owl:maxCardinality": 1,
"knora-api:isInherited": true
},
{
"@type": "owl:Restriction",
"owl:onProperty": {
Expand Down Expand Up @@ -5925,6 +6019,22 @@
"owl:cardinality": 1,
"knora-api:isInherited": true
},
{
"@type": "owl:Restriction",
"owl:onProperty": {
"@id": "knora-api:hasCopyrightAttribution"
},
"owl:maxCardinality": 1,
"knora-api:isInherited": true
},
{
"@type": "owl:Restriction",
"owl:onProperty": {
"@id": "knora-api:hasLicense"
},
"owl:maxCardinality": 1,
"knora-api:isInherited": true
},
{
"@type": "owl:Restriction",
"owl:onProperty": {
Expand Down Expand Up @@ -6063,6 +6173,22 @@
"owl:cardinality": 1,
"knora-api:isInherited": true
},
{
"@type": "owl:Restriction",
"owl:onProperty": {
"@id": "knora-api:hasCopyrightAttribution"
},
"owl:maxCardinality": 1,
"knora-api:isInherited": true
},
{
"@type": "owl:Restriction",
"owl:onProperty": {
"@id": "knora-api:hasLicense"
},
"owl:maxCardinality": 1,
"knora-api:isInherited": true
},
{
"@type": "owl:Restriction",
"owl:onProperty": {
Expand Down Expand Up @@ -6208,6 +6334,22 @@
"owl:cardinality": 1,
"knora-api:isInherited": true
},
{
"@type": "owl:Restriction",
"owl:onProperty": {
"@id": "knora-api:hasCopyrightAttribution"
},
"owl:maxCardinality": 1,
"knora-api:isInherited": true
},
{
"@type": "owl:Restriction",
"owl:onProperty": {
"@id": "knora-api:hasLicense"
},
"owl:maxCardinality": 1,
"knora-api:isInherited": true
},
{
"@type": "owl:Restriction",
"owl:onProperty": {
Expand Down Expand Up @@ -6518,6 +6660,22 @@
"owl:cardinality": 1,
"knora-api:isInherited": true
},
{
"@type": "owl:Restriction",
"owl:onProperty": {
"@id": "knora-api:hasCopyrightAttribution"
},
"owl:maxCardinality": 1,
"knora-api:isInherited": true
},
{
"@type": "owl:Restriction",
"owl:onProperty": {
"@id": "knora-api:hasLicense"
},
"owl:maxCardinality": 1,
"knora-api:isInherited": true
},
{
"@type": "owl:Restriction",
"owl:onProperty": {
Expand Down Expand Up @@ -8129,6 +8287,15 @@
},
"rdfs:comment": "Represents a comment on a resource as a knora-base:TextValue"
},
{
"rdfs:label": "has copyright attribution",
"rdfs:comment": "The copyright statement that gives credit to the original author.",
"@type": "owl:DatatypeProperty",
"knora-api:objectType": {
"@id": "xsd:string"
},
"@id": "knora-api:hasCopyrightAttribution"
},
{
"rdfs:label": "has 3D-file",
"rdfs:subPropertyOf": {
Expand Down Expand Up @@ -8287,6 +8454,15 @@
},
"rdfs:comment": "Indicates a keyword of a resource"
},
{
"rdfs:label": "has copyright attribution",
"rdfs:comment": "Specifies the terms under which a work can be used. This statement may be a reference to a well-known license, such as Creative Commons (e.g. CC BY-SA) or a custom license.",
"@type": "owl:DatatypeProperty",
"knora-api:objectType": {
"@id": "xsd:string"
},
"@id": "knora-api:hasLicense"
},
{
"rdfs:label": "has Link to",
"rdfs:subPropertyOf": {
Expand Down
18 changes: 12 additions & 6 deletions webapi/src/main/resources/knora-ontologies/knora-admin.ttl
Original file line number Diff line number Diff line change
Expand Up @@ -377,12 +377,18 @@
[ rdf:type owl:Restriction ;
owl:onProperty :projectRestrictedViewWatermark ;
owl:maxCardinality "1"^^xsd:nonNegativeInteger ],
[ rdf:type owl:Restriction ;
owl:onProperty :status ;
owl:cardinality "1"^^xsd:nonNegativeInteger ],
[ rdf:type owl:Restriction ;
owl:onProperty :hasSelfJoinEnabled ;
owl:cardinality "1"^^xsd:nonNegativeInteger ] ;
[ rdf:type owl:Restriction ;
owl:onProperty :status ;
owl:cardinality "1"^^xsd:nonNegativeInteger ],
[ rdf:type owl:Restriction ;
owl:onProperty :hasSelfJoinEnabled ;
owl:cardinality "1"^^xsd:nonNegativeInteger ],
[ rdf:type owl:Restriction ;
owl:onProperty knora-base:hasCopyrightAttribution ;
owl:maxCardinality "1"^^xsd:nonNegativeInteger ],
[ rdf:type owl:Restriction ;
owl:onProperty knora-base:hasLicense ;
owl:maxCardinality "1"^^xsd:nonNegativeInteger ];
rdfs:comment "Represents a project that uses Knora."@en .


Expand Down
23 changes: 21 additions & 2 deletions webapi/src/main/resources/knora-ontologies/knora-base.ttl
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
rdf:type owl:Ontology ;
rdfs:label "The Knora base ontology"@en ;
:attachedToProject knora-admin:SystemProject ;
:ontologyVersion "knora-base v41" .
:ontologyVersion "knora-base v42" .


#################################################################
Expand Down Expand Up @@ -527,6 +527,19 @@
:subjectClassConstraint :Resource ;
:objectClassConstraint :Value .

### http://www.knora.org/ontology/knora-base#hasCopyrightAttribution

:hasCopyrightAttribution
rdf:type owl:DatatypeProperty ;
rdfs:comment "The copyright statement that gives credit to the original author."@en ;
:objectDatatypeConstraint xsd:string .

### http://www.knora.org/ontology/knora-base#hasLicense

:hasLicense
rdf:type owl:DatatypeProperty ;
rdfs:comment "Specifies the terms under which a work can be used. This statement may be a reference to a well-known license, such as Creative Commons (e.g. 'CC BY-SA') or a custom license."@en ;
:objectDatatypeConstraint xsd:string .

### http://www.knora.org/ontology/knora-base#isAnnotationOf

Expand Down Expand Up @@ -1479,7 +1492,13 @@
owl:maxCardinality "1"^^xsd:nonNegativeInteger ],
[ rdf:type owl:Restriction ;
owl:onProperty :originalMimeType ;
owl:maxCardinality "1"^^xsd:nonNegativeInteger ] .
owl:maxCardinality "1"^^xsd:nonNegativeInteger ],
[ rdf:type owl:Restriction ;
owl:onProperty :hasCopyrightAttribution ;
owl:maxCardinality "1"^^xsd:nonNegativeInteger ],
[ rdf:type owl:Restriction ;
owl:onProperty :hasLicense ;
owl:maxCardinality "1"^^xsd:nonNegativeInteger ].


### http://www.knora.org/ontology/knora-base#DecimalBase
Expand Down
Loading

0 comments on commit 2d62dcb

Please sign in to comment.