Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test(v2-ontology-cache): add test for isEditable property on link val…
…ues (DSP-1840) (#1897) * test(v2-ontology-cache): add basic test * reproduce bug in e2e test * add temp test * add more temp tests * work on unit test * get unit test to work for now * add example test for adding properties to ontology * add books ontology for testing * add cache test for link values * improve cache test * remove freetest ontology from cache test * remove redundant test * fix R2R test for isEditable property * Update OntologyResponderV2.scala * cleanup code Co-authored-by: irinaschubert <irina.schubert@dasch.swiss> Co-authored-by: Balduin Landolt <balduin.landolt@hotmail.com>
- Loading branch information
1 parent
6caa18e
commit b1c22c0
Showing
6 changed files
with
567 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
@prefix xml: <http://www.w3.org/XML/1998/namespace> . | ||
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> . | ||
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> . | ||
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> . | ||
@prefix owl: <http://www.w3.org/2002/07/owl#> . | ||
@prefix foaf: <http://xmlns.com/foaf/0.1/> . | ||
@prefix knora-base: <http://www.knora.org/ontology/knora-base#> . | ||
@prefix knora-admin: <http://www.knora.org/ontology/knora-admin#> . | ||
@prefix salsah-gui: <http://www.knora.org/ontology/salsah-gui#> . | ||
@prefix books: <http://www.knora.org/ontology/0001/books#> . | ||
|
||
|
||
<http://rdfh.ch/0001/book-instance-01/values/has-title-value-01> | ||
a knora-base:TextValue ; | ||
knora-base:valueHasUUID "OTAzYmIzOTktYzA4Ni00NmM0LWFlZGItYzIyNzcyN2FkNjFk"^^xsd:string ; | ||
knora-base:isDeleted false ; | ||
knora-base:valueCreationDate "2018-05-28T15:52:03.897Z"^^xsd:dateTime ; | ||
knora-base:valueHasOrder 0 ; | ||
knora-base:valueHasString "Handbuch Projektmanagement" ; | ||
knora-base:hasPermissions | ||
"CR knora-admin:Creator|M knora-admin:ProjectMember|V knora-admin:KnownUser|RV knora-admin:UnknownUser" ; | ||
knora-base:attachedToUser <http://rdfh.ch/users/BhkfBc3hTeS_IDo-JgXRbQ> . | ||
|
||
|
||
<http://rdfh.ch/0001/book-instance-01> | ||
a books:Book ; | ||
knora-base:attachedToUser <http://rdfh.ch/users/9XBCrDV3SRa7kS1WwynB4Q> ; | ||
knora-base:attachedToProject <http://rdfh.ch/projects/0001> ; | ||
knora-base:hasPermissions "V knora-admin:UnknownUser|M knora-admin:ProjectMember" ; | ||
knora-base:creationDate "2019-11-29T10:00:00.673298Z"^^xsd:dateTime ; | ||
books:hasTitle <http://rdfh.ch/0001/book-instance-01/values/has-title-value-01> ; | ||
rdfs:label "instance of a book" ; | ||
knora-base:isDeleted false . | ||
|
||
|
||
<http://rdfh.ch/0001/page-instance-01/values/has-page-number-value-01> | ||
a knora-base:IntValue ; | ||
knora-base:valueHasUUID "MmI4YTg1YTctZjM4Yy00MzE2LTkwNTgtYzdjODk1NjcwZmFm"^^xsd:string ; | ||
knora-base:isDeleted false ; | ||
knora-base:valueCreationDate "2018-05-28T15:52:03.897Z"^^xsd:dateTime ; | ||
knora-base:valueHasInteger 1 ; | ||
knora-base:valueHasOrder 0 ; | ||
knora-base:valueHasString "1" ; | ||
knora-base:hasPermissions | ||
"CR knora-admin:Creator|M knora-admin:ProjectMember|V knora-admin:KnownUser|RV knora-admin:UnknownUser" ; | ||
knora-base:attachedToUser <http://rdfh.ch/users/BhkfBc3hTeS_IDo-JgXRbQ> . | ||
|
||
|
||
<http://rdfh.ch/0001/page-instance-01> | ||
a books:Page ; | ||
knora-base:attachedToUser <http://rdfh.ch/users/9XBCrDV3SRa7kS1WwynB4Q> ; | ||
knora-base:attachedToProject <http://rdfh.ch/projects/0001> ; | ||
knora-base:hasPermissions "V knora-admin:UnknownUser|M knora-admin:ProjectMember" ; | ||
knora-base:creationDate "2019-11-29T10:00:00.673298Z"^^xsd:dateTime ; | ||
books:hasPageNumber <http://rdfh.ch/0001/page-instance-01/values/has-page-number-value-01> ; | ||
rdfs:label "instance of a page" ; | ||
knora-base:isDeleted false . |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
@prefix xml: <http://www.w3.org/XML/1998/namespace> . | ||
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> . | ||
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> . | ||
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> . | ||
@prefix owl: <http://www.w3.org/2002/07/owl#> . | ||
@prefix foaf: <http://xmlns.com/foaf/0.1/> . | ||
@prefix knora-base: <http://www.knora.org/ontology/knora-base#> . | ||
@prefix salsah-gui: <http://www.knora.org/ontology/salsah-gui#> . | ||
@base <http://www.knora.org/ontology/0001/books#> . | ||
|
||
# A bookish ontology, used only for testing Knora. | ||
|
||
@prefix : <http://www.knora.org/ontology/0001/books#> . | ||
|
||
<http://www.knora.org/ontology/0001/books> | ||
rdf:type owl:Ontology ; | ||
rdfs:label "An ontology about books" ; | ||
knora-base:attachedToProject <http://rdfh.ch/projects/0001> ; | ||
knora-base:lastModificationDate "2012-12-12T12:12:12.12Z"^^xsd:dateTime . | ||
|
||
|
||
|
||
:hasTitle | ||
rdf:type owl:ObjectProperty ; | ||
rdfs:subPropertyOf knora-base:hasValue ; | ||
rdfs:label "Titel"@de, "title"@en ; | ||
knora-base:subjectClassConstraint :Book ; | ||
knora-base:objectClassConstraint knora-base:TextValue ; | ||
salsah-gui:guiElement salsah-gui:SimpleText ; | ||
salsah-gui:guiAttribute "size=80", "maxlength=255" . | ||
|
||
|
||
#:hasPage | ||
# rdf:type owl:ObjectProperty ; | ||
# rdfs:subPropertyOf knora-base:hasLinkTo ; | ||
# rdfs:label "Seite im Buch"@de, "Page in the book"@en ; | ||
# knora-base:subjectClassConstraint :Book ; | ||
# knora-base:objectClassConstraint :Page ; | ||
# salsah-gui:guiElement salsah-gui:Searchbox . | ||
# | ||
# | ||
#:hasPageValue | ||
# rdf:type owl:ObjectProperty ; | ||
# rdfs:subPropertyOf knora-base:hasLinkToValue ; | ||
# rdfs:label "Seite im Buch"@de, "Page in the book"@en ; | ||
# knora-base:objectClassConstraint knora-base:LinkValue . | ||
|
||
|
||
:Book | ||
rdf:type owl:Class ; | ||
rdfs:subClassOf knora-base:Resource; | ||
knora-base:resourceIcon "book.png" ; | ||
rdfs:label "Buch"@de, "Book"@en ; | ||
rdfs:comment """A resource describing a book."""@en . | ||
|
||
|
||
:hasPageNumber | ||
rdf:type owl:ObjectProperty ; | ||
rdfs:subPropertyOf knora-base:hasValue ; | ||
rdfs:label "Seitenzahl"@de, "Page number"@en ; | ||
knora-base:objectClassConstraint knora-base:IntValue ; | ||
salsah-gui:guiElement salsah-gui:Spinbox ; | ||
salsah-gui:guiAttribute "min=0", "max=-1" . | ||
|
||
|
||
:Page | ||
rdf:type owl:Class ; | ||
rdfs:subClassOf knora-base:Resource; | ||
knora-base:resourceIcon "page.png" ; | ||
rdfs:label "Seite"@de, "Page"@en ; | ||
rdfs:comment """A resource describing a page in a book."""@en . |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.