org.fcrepo.server.security.xacml.util
Class RELSRelationshipResolver
java.lang.Object
org.fcrepo.server.security.xacml.util.RelationshipResolverBase
org.fcrepo.server.security.xacml.util.RELSRelationshipResolver
- All Implemented Interfaces:
- RelationshipResolver
public class RELSRelationshipResolver
- extends RelationshipResolverBase
- implements RelationshipResolver
A RelationshipResolver that resolves relationships via
Management.getRelationships(org.fcrepo.server.Context, String, String).
- Author:
- Edwin Shin
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
RELSRelationshipResolver
public RELSRelationshipResolver()
RELSRelationshipResolver
public RELSRelationshipResolver(Map<String,String> options)
getRelationships
public Map<String,Set<String>> getRelationships(String subject,
String relationship)
throws MelcoeXacmlException
- Description copied from interface:
RelationshipResolver
- Retrieves relationships for this subject, relationship and object. Return
empty map if none found. Null means any.
- Specified by:
getRelationships in interface RelationshipResolver
- Returns:
-
- Throws:
MelcoeXacmlException
getRelationships
public Map<String,Set<String>> getRelationships(String subject)
throws MelcoeXacmlException
- Description copied from interface:
RelationshipResolver
- Retrieves the relationships for this subject. Values for each relationship
are placed in a map. Return empty map if none found
- Specified by:
getRelationships in interface RelationshipResolver
- Parameters:
subject - the subject to return relationships for - either ns:pid,
ns:pid/datastream or the info:fedora/ forms
- Returns:
- The map of relationships and values.
- Throws:
MelcoeXacmlException
buildRESTParentHierarchy
public String buildRESTParentHierarchy(String pid)
throws MelcoeXacmlException
- Description copied from interface:
RelationshipResolver
- Generates a REST based representation of an object and its parents. For
example, given the parameter b, and if b belongs to collection a, then we
will end up with /a/b
- Specified by:
buildRESTParentHierarchy in interface RelationshipResolver
- Parameters:
pid - the pid whose parents we need to find
- Returns:
- the REST representation of the pid and its parents
- Throws:
MelcoeXacmlException
getParents
protected Set<String> getParents(String pid)
throws MelcoeXacmlException
- Throws:
MelcoeXacmlException
getAttributesFromQuery
public Set<String> getAttributesFromQuery(String query,
String queryLang,
String variable)
throws MelcoeXacmlException
- Description copied from interface:
RelationshipResolver
- Get attributes defined by a query.
The values returned are defined by the variable defined in the query
Only distinct values are returned.
- Specified by:
getAttributesFromQuery in interface RelationshipResolver
- Parameters:
query - The query to runqueryLang - Language of the query - itql, sparql, spovariable - - the output variable to return (for spo, specify "s", "p" or "o")
- Returns:
-
- Throws:
MelcoeXacmlException
Copyright © 2012 DuraSpace. All Rights Reserved.