-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
David/search profiles bugfixes (#103)
* Fixes #93, solution and general framework for #5 * Fixes #93, solution and general framework for #5 * Update VocPub profile to support vocabulary and collection listings to show dcterms:publisher, reg:status and derivation info * Support multiple sh:sequencePath in listing construct query. Support include predicate statement in listing construct query. Fix pagination in listing construct query. * Integrate search changes to use subquery * only include properties of objects when calling "generate_listing_construct" for a listing, and not when calling for an object. Update tests to new profiles * Default to Jena FT serach; include geo data in search results * Add documentation on how to identify namespaces for prefixing * Search bugfixes * Update readmes --------- Co-authored-by: Edmond Chuc <edmond@kurrawong.ai>
- Loading branch information
1 parent
fc82562
commit 8a50fbf
Showing
28 changed files
with
453 additions
and
273 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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
from rdflib import URIRef | ||
|
||
|
||
class ClassNotFoundException(Exception): | ||
""" | ||
Raised when no classes can be found for a given URI. | ||
If the URI is also not found, a URINotFoundException is raised instead. | ||
""" | ||
|
||
def __init__(self, uri: URIRef): | ||
self.message = f"No classes found for {uri}. Prez can only display information for instances of classes" | ||
super().__init__(self.message) | ||
|
||
|
||
class URINotFoundException(Exception): | ||
""" | ||
Raised when a URI is not found in a given prez backend. | ||
""" | ||
|
||
def __init__(self, uri: URIRef, prez): | ||
self.message = f"URI {uri} not found in {prez}." | ||
super().__init__(self.message) | ||
|
||
|
||
class NoProfilesException(Exception): | ||
""" | ||
Raised when no profiles can be found for a resource. | ||
""" | ||
|
||
def __init__(self, classes: list): | ||
self.message = ( | ||
f"No profiles and/or mediatypes could be found to render the resource. The resource class(es) " | ||
f"for which a profile was searched was/were: {', '.join(klass for klass in classes)}" | ||
) | ||
super().__init__(self.message) |
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.