Class InstanceResource

java.lang.Object
com.janeirodigital.shapetrees.core.resources.InstanceResource
Direct Known Subclasses:
ManageableResource, ManagerResource

public class InstanceResource extends Object
InstanceResource is a base class which may represent either a ManageableResource (a resource that can be managed by a shape tree), or a ManagerResource (a resource which assigns shape trees to a ManageableResource). This class is only meant to be extended by ManageableResource and ManagerResource, or used to indicate either of the two.
  • Method Details

    • getGraph

      public org.apache.jena.graph.Graph getGraph(URL baseUrl) throws ShapeTreeException
      Get an RDF graph of the body of the InstanceResource. If baseUrl is not provided, the URL of the InstanceResource will be used. An exception is thrown if the body cannot be processed (e.g. if it isn't a valid RDF resource).
      Parameters:
      baseUrl - Base URL to use for the graph
      Returns:
      RDF graph of the InstanceResource body
      Throws:
      ShapeTreeException
    • getUrl

      public URL getUrl()
    • getResourceType

      public ShapeTreeResourceType getResourceType()
    • getAttributes

      public ResourceAttributes getAttributes()
    • getBody

      public String getBody()
    • getName

      public String getName()
    • isExists

      public boolean isExists()