Package org.trellisldp.webac
Class Authorization
- java.lang.Object
-
- org.trellisldp.webac.Authorization
-
public class Authorization extends Object
This class provides access to data defined in an WebAC Authorization graph.Access to a resource can be controlled via WebAccessControl, an RDF-based access control system. A resource can define an ACL resource via the Link header, using rel=acl. It can also point to an ACL resource using a triple in the resource's own RDF graph via acl:accessControl. Absent an acl:accessControl triple, the parent resource is checked, up to the server's root resource.
An ACL resource may contain multiple acl:Authorization sections. In an LDP context, this may be represented with ldp:contains triples. Another common pattern is to refer to the acl:Authorization sections with blank nodes.
- See Also:
- W3C WebAccessControl and Solid WebAC specification
-
-
Constructor Summary
Constructors Constructor Description Authorization(BlankNodeOrIRI identifier, Graph graph)
Create an Authorization object from an RDF graph.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static Authorization
from(BlankNodeOrIRI identifier, Graph graph)
Create an Authorization object from a graph and an identifier.Set<IRI>
getAccessTo()
Retrieve the resource identifiers to which this Authorization applies.Set<IRI>
getAgent()
Retrieve the agents that are associated with this Authorization.Set<IRI>
getAgentClass()
Retrieve the agent classes that are associated with this Authorization.Set<IRI>
getAgentGroup()
Retrieve the agent groups that are associated with this Authorization.Set<IRI>
getDefault()
Retrieve the directories for which this authorization is used for new resources in the container.BlankNodeOrIRI
getIdentifier()
Retrieve the identifier for this Authorization.Set<IRI>
getMode()
Retrieve the access modes that are associated with this Authorization.
-
-
-
Constructor Detail
-
Authorization
public Authorization(BlankNodeOrIRI identifier, Graph graph)
Create an Authorization object from an RDF graph.- Parameters:
identifier
- the subject IRIgraph
- the RDF graph
-
-
Method Detail
-
from
public static Authorization from(BlankNodeOrIRI identifier, Graph graph)
Create an Authorization object from a graph and an identifier.- Parameters:
identifier
- the identifiergraph
- the graph- Returns:
- the Authorization object
-
getIdentifier
public BlankNodeOrIRI getIdentifier()
Retrieve the identifier for this Authorization.- Returns:
- the identifier
-
getAgent
public Set<IRI> getAgent()
Retrieve the agents that are associated with this Authorization.- Returns:
- the Agent values
-
getAgentClass
public Set<IRI> getAgentClass()
Retrieve the agent classes that are associated with this Authorization.- Returns:
- the Agent class values
-
getAgentGroup
public Set<IRI> getAgentGroup()
Retrieve the agent groups that are associated with this Authorization.- Returns:
- the Agent groups values
-
getMode
public Set<IRI> getMode()
Retrieve the access modes that are associated with this Authorization.- Returns:
- the access mode values
-
getAccessTo
public Set<IRI> getAccessTo()
Retrieve the resource identifiers to which this Authorization applies.- Returns:
- the accessTo values
-
-