org.fcrepo.server.security.xacml.util
Interface RelationshipResolver

All Known Implementing Classes:
RelationshipResolverBase, RelationshipResolverImpl, RELSRelationshipResolver, RIRelationshipResolver

public interface RelationshipResolver


Method Summary
 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.
 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.
 

Method Detail

getRelationships

Map<String,Set<String>> getRelationships(String subject)
                                         throws MelcoeXacmlException
Retrieves the relationships for this subject. Values for each relationship are placed in a map. Return empty map if none found

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

getRelationships

Map<String,Set<String>> getRelationships(String subject,
                                         String relationship)
                                         throws MelcoeXacmlException
Retrieves relationships for this subject, relationship and object. Return empty map if none found. Null means any.

Parameters:
subject -
relationship -
object -
Returns:
Throws:
MelcoeXacmlException

buildRESTParentHierarchy

String buildRESTParentHierarchy(String pid)
                                throws MelcoeXacmlException
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

Parameters:
pid - the pid whose parents we need to find
Returns:
the REST representation of the pid and its parents
Throws:
PEPException
MelcoeXacmlException

getAttributesFromQuery

Set<String> getAttributesFromQuery(String query,
                                   String queryLang,
                                   String variable)
                                   throws MelcoeXacmlException
Get attributes defined by a query. The values returned are defined by the variable defined in the query Only distinct values are returned.

Parameters:
query - The query to run
queryLang - Language of the query - itql, sparql, spo
variable - - the output variable to return (for spo, specify "s", "p" or "o")
Returns:
Throws:
MelcoeXacmlException


Copyright © 2012 DuraSpace. All Rights Reserved.