Class BaseResource

java.lang.Object
nz.org.riskscape.engine.resource.BaseResource
All Implemented Interfaces:
Resource

public abstract class BaseResource extends Object implements Resource

Base class for Resources.

  • Field Details

    • location

      protected final URI location
  • Constructor Details

    • BaseResource

      public BaseResource(URI location)
  • Method Details

    • ensureLocal

      public ResultOrProblems<Path> ensureLocal(Resource.Options options)
      Description copied from interface: Resource

      Returns a Path to a local representation of the resource if the resource loader supports this and is allowable given the options. Otherwise problems preventing this operation from succeeding.

      Specified by:
      ensureLocal in interface Resource
    • localFilename

      protected String localFilename(URI uri)
    • getLocation

      public URI getLocation()
      Specified by:
      getLocation in interface Resource
      Returns:
      a URI identifying where this resource is located