public class RelationshipResolverImpl extends java.lang.Object implements RelationshipResolver
Management.getRelationships(org.fcrepo.server.Context, String, String).| Constructor and Description |
|---|
RelationshipResolverImpl() |
RelationshipResolverImpl(java.util.Map<java.lang.String,java.lang.String> options)
Constructor that takes a map of parent-child predicates (relationships).
|
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
buildRESTParentHierarchy(java.lang.String pid)
Generates a REST based representation of an object and its parents.
|
java.util.Set<java.lang.String> |
getAttributesFromQuery(java.lang.String query,
java.lang.String queryLang,
java.lang.String variable)
Get attributes defined by a query.
|
protected PID |
getNormalizedPID(java.lang.String pid)
Returns a PID object for the requested String.
|
java.util.Set<java.lang.String> |
getParents(java.lang.String pid) |
java.util.Map<java.lang.String,java.util.Set<java.lang.String>> |
getRelationships(java.lang.String subject)
Retrieves the relationships for this subject.
|
java.util.Map<java.lang.String,java.util.Set<java.lang.String>> |
getRelationships(java.lang.String subject,
java.lang.String relationship)
Retrieves relationships for this subject, relationship and object.
|
protected java.lang.String |
getSubjectURI(java.lang.String subject) |
public RelationshipResolverImpl()
public RelationshipResolverImpl(java.util.Map<java.lang.String,java.lang.String> options)
ContextHandlerImpl builds the map from the relationship-resolver
section of config-melcoe-pep.xml (in WEB-INF/classes).options - MelcoePDPExceptionpublic java.lang.String buildRESTParentHierarchy(java.lang.String pid)
throws MelcoeXacmlException
RelationshipResolverbuildRESTParentHierarchy in interface RelationshipResolverpid - the pid whose parents we need to findMelcoeXacmlExceptionpublic java.util.Set<java.lang.String> getParents(java.lang.String pid)
throws MelcoeXacmlException
MelcoeXacmlExceptionprotected java.lang.String getSubjectURI(java.lang.String subject)
throws MalformedPIDException
MalformedPIDExceptionpublic java.util.Map<java.lang.String,java.util.Set<java.lang.String>> getRelationships(java.lang.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 java.util.Map<java.lang.String,java.util.Set<java.lang.String>> getRelationships(java.lang.String subject,
java.lang.String relationship)
throws MelcoeXacmlException
RelationshipResolvergetRelationships in interface RelationshipResolverMelcoeXacmlExceptionprotected PID getNormalizedPID(java.lang.String pid)
pid - public java.util.Set<java.lang.String> getAttributesFromQuery(java.lang.String query,
java.lang.String queryLang,
java.lang.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 © 2014 DuraSpace. All Rights Reserved.