Class 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 Detail

      • Authorization

        public Authorization​(BlankNodeOrIRI identifier,
                             Graph graph)
        Create an Authorization object from an RDF graph.
        Parameters:
        identifier - the subject IRI
        graph - 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 identifier
        graph - 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
      • getDefault

        public Set<IRI> getDefault()
        Retrieve the directories for which this authorization is used for new resources in the container.
        Returns:
        the resource identifiers