public class RelationshipResolverImpl extends Object implements RelationshipResolver
Management.getRelationships(org.fcrepo.server.Context, String, String).| Constructor and Description |
|---|
RelationshipResolverImpl() |
RelationshipResolverImpl(Map<String,String> options)
Constructor that takes a map of parent-child predicates (relationships).
|
| Modifier and Type | Method and Description |
|---|---|
String |
buildRESTParentHierarchy(String pid)
Generates a REST based representation of an object and its parents.
|
Set<String> |
getAttributesFromQuery(String query,
String queryLang,
String variable)
Get attributes defined by a query.
|
protected PID |
getNormalizedPID(String pid)
Returns a PID object for the requested String.
|
Set<String> |
getParents(String pid) |
Map<String,Set<String>> |
getRelationships(String subject)
Retrieves the relationships for this subject.
|
Map<String,Set<String>> |
getRelationships(String subject,
String relationship)
Retrieves relationships for this subject, relationship and object.
|
protected String |
getSubjectURI(String subject) |
public RelationshipResolverImpl()
public RelationshipResolverImpl(Map<String,String> options)
ContextHandlerImpl builds the map from the relationship-resolver
section of config-melcoe-pep.xml (in WEB-INF/classes).options - MelcoePDPExceptionpublic String buildRESTParentHierarchy(String pid) throws MelcoeXacmlException
RelationshipResolverbuildRESTParentHierarchy in interface RelationshipResolverpid - the pid whose parents we need to findMelcoeXacmlExceptionpublic Set<String> getParents(String pid) throws MelcoeXacmlException
MelcoeXacmlExceptionprotected String getSubjectURI(String subject) throws MalformedPIDException
MalformedPIDExceptionpublic Map<String,Set<String>> getRelationships(String subject) throws MelcoeXacmlException
RelationshipResolvergetRelationships in interface RelationshipResolversubject - the subject to return relationships for - either ns:pid,
ns:pid/datastream or the info:fedora/ formsMelcoeXacmlExceptionpublic Map<String,Set<String>> getRelationships(String subject, String relationship) throws MelcoeXacmlException
RelationshipResolvergetRelationships in interface RelationshipResolverMelcoeXacmlExceptionprotected PID getNormalizedPID(String pid)
pid - public Set<String> getAttributesFromQuery(String query, String queryLang, String variable) throws MelcoeXacmlException
RelationshipResolvergetAttributesFromQuery in interface RelationshipResolverquery - The query to runqueryLang - Language of the query - itql, sparql, spovariable - - the output variable to return (for spo, specify "s", "p" or "o")MelcoeXacmlExceptionCopyright © 2013 DuraSpace. All Rights Reserved.