Class ShapeTreeResource

java.lang.Object
com.janeirodigital.shapetrees.core.validation.ShapeTreeResource

public class ShapeTreeResource extends Object
Represents a resource that contains one or more shape tree definitions. Provides a factory to lookup, initialize, and cache them.
  • Constructor Details

    • ShapeTreeResource

      public ShapeTreeResource(URL url, String body, String contentType, org.apache.jena.rdf.model.Model model)
  • Method Details

    • getShapeTreeResource

      public static ShapeTreeResource getShapeTreeResource(URL resourceUrl) throws ShapeTreeException
      Looks up and caches the shape tree resource at resourceUrl. Will used cached verion if it exists. Throws exceptions if the resource doesn't exist, or isn't a valid RDF document.
      Parameters:
      resourceUrl - URL of shape tree resource
      Returns:
      Shape tree resource at provided resourceUrl
      Throws:
      ShapeTreeException
    • clearCache

      public static void clearCache()
      Clears the local shape tree resource cache
    • getUrl

      public URL getUrl()
    • getBody

      public String getBody()
    • getContentType

      public String getContentType()
    • getModel

      public org.apache.jena.rdf.model.Model getModel()
    • getLocalResourceCache

      public static Map<URI,ShapeTreeResource> getLocalResourceCache()