Package nz.org.riskscape.engine.resource
Class BaseResource
java.lang.Object
nz.org.riskscape.engine.resource.BaseResource
- All Implemented Interfaces:
Resource
Base class for Resource
s.
-
Nested Class Summary
Nested classes/interfaces inherited from interface nz.org.riskscape.engine.resource.Resource
Resource.Options, Resource.PseudoResource
-
Field Summary
Fields inherited from interface nz.org.riskscape.engine.resource.Resource
NO_BYTES, SECURE_OPTIONS, UNKNOWN, UNKNOWN_URI
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionensureLocal
(Resource.Options options) Returns aPath
to a local representation of the resource if the resource loader supports this and is allowable given the options.protected String
localFilename
(URI uri) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface nz.org.riskscape.engine.resource.Resource
getContentAsString, getContentReader, getContentStream, getMediaType
-
Field Details
-
location
-
-
Constructor Details
-
BaseResource
-
-
Method Details
-
ensureLocal
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 interfaceResource
-
localFilename
-
getLocation
- Specified by:
getLocation
in interfaceResource
- Returns:
- a
URI
identifying where this resource is located
-