Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
feat(api-v2): Allow querying for rdfs:label in Gravsearch (#1649)
* feat(api-v2): Make the inferring type inspector know the object type of rdfs:label. * feat(api-v2): Support Gravsearch queries using rdfs:label (ongoing). * feat(api-v2): Support wildcard searches in resource labels. * feat(api-v2): Support Lucene searches in rdfs:label (ongoing). * test(gravsearch): Add tests for wildcard searches with rdfs:label. * feat(gravsearch): Support the regex function with rdfs:label. - Add tests. - Add docs. * test(gravsearch): Fix tests. * style(gravsearch): Use apply() instead of newInstance().
- Loading branch information
Benjamin Geer
committed
Jun 3, 2020
1 parent
bd08f2c
commit d56004b
Showing
12 changed files
with
1,579 additions
and
672 deletions.
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
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
390 changes: 245 additions & 145 deletions
390
...org/knora/webapi/responders/v2/search/gravsearch/prequery/AbstractPrequeryGenerator.scala
Large diffs are not rendered by default.
Oops, something went wrong.
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
58 changes: 58 additions & 0 deletions
58
webapi/src/test/resources/test-data/searchR2RV2/ZeitglöckleinViaLabel.jsonld
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,58 @@ | ||
{ | ||
"@graph" : [ { | ||
"@id" : "http://rdfh.ch/0803/c5058f3a", | ||
"@type" : "incunabula:book", | ||
"knora-api:arkUrl" : { | ||
"@type" : "xsd:anyURI", | ||
"@value" : "http://0.0.0.0:3336/ark:/72163/1/0803/c5058f3a5" | ||
}, | ||
"knora-api:attachedToProject" : { | ||
"@id" : "http://rdfh.ch/projects/0803" | ||
}, | ||
"knora-api:attachedToUser" : { | ||
"@id" : "http://rdfh.ch/users/91e19f1e01" | ||
}, | ||
"knora-api:creationDate" : { | ||
"@type" : "xsd:dateTimeStamp", | ||
"@value" : "2016-03-02T15:05:10Z" | ||
}, | ||
"knora-api:hasPermissions" : "CR knora-admin:Creator|M knora-admin:ProjectMember|V knora-admin:KnownUser|RV knora-admin:UnknownUser", | ||
"knora-api:userHasPermission" : "RV", | ||
"knora-api:versionArkUrl" : { | ||
"@type" : "xsd:anyURI", | ||
"@value" : "http://0.0.0.0:3336/ark:/72163/1/0803/c5058f3a5.20160302T150510Z" | ||
}, | ||
"rdfs:label" : "Zeitglöcklein des Lebens und Leidens Christi" | ||
}, { | ||
"@id" : "http://rdfh.ch/0803/ff17e5ef9601", | ||
"@type" : "incunabula:book", | ||
"knora-api:arkUrl" : { | ||
"@type" : "xsd:anyURI", | ||
"@value" : "http://0.0.0.0:3336/ark:/72163/1/0803/ff17e5ef9601j" | ||
}, | ||
"knora-api:attachedToProject" : { | ||
"@id" : "http://rdfh.ch/projects/0803" | ||
}, | ||
"knora-api:attachedToUser" : { | ||
"@id" : "http://rdfh.ch/users/91e19f1e01" | ||
}, | ||
"knora-api:creationDate" : { | ||
"@type" : "xsd:dateTimeStamp", | ||
"@value" : "2016-03-02T15:05:23Z" | ||
}, | ||
"knora-api:hasPermissions" : "CR knora-admin:Creator|M knora-admin:ProjectMember|V knora-admin:KnownUser|RV knora-admin:UnknownUser", | ||
"knora-api:userHasPermission" : "RV", | ||
"knora-api:versionArkUrl" : { | ||
"@type" : "xsd:anyURI", | ||
"@value" : "http://0.0.0.0:3336/ark:/72163/1/0803/ff17e5ef9601j.20160302T150523Z" | ||
}, | ||
"rdfs:label" : "Zeitglöcklein des Lebens und Leidens Christi" | ||
} ], | ||
"@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#", | ||
"incunabula" : "http://0.0.0.0:3333/ontology/0803/incunabula/v2#", | ||
"xsd" : "http://www.w3.org/2001/XMLSchema#" | ||
} | ||
} |
Oops, something went wrong.