Class RelationBookmarkResolver<T extends RelationBookmarkParams>
java.lang.Object
nz.org.riskscape.engine.data.BaseBookmarkResolver<T>
nz.org.riskscape.engine.data.relation.RelationBookmarkResolver<T>
- All Implemented Interfaces:
nz.org.riskscape.engine.data.BookmarkResolver
,nz.org.riskscape.engine.Identified
- Direct Known Subclasses:
FeatureSourceBookmarkResolver
public abstract class RelationBookmarkResolver<T extends RelationBookmarkParams>
extends nz.org.riskscape.engine.data.BaseBookmarkResolver<T>
Base class for a thing that returns relations from a bookmark. Shares the logic of applying various relation-specific features and validations to any relation return from some format-specific source.
TODO i18n all the various error messages in here
-
Nested Class Summary
Nested classes/interfaces inherited from class nz.org.riskscape.engine.data.BaseBookmarkResolver
nz.org.riskscape.engine.data.BaseBookmarkResolver.ProblemCodes
-
Field Summary
Fields inherited from class nz.org.riskscape.engine.data.BaseBookmarkResolver
engine
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected nz.org.riskscape.problem.ResultOrProblems<nz.org.riskscape.engine.relation.Relation>
applyFilter
(nz.org.riskscape.rl.ast.Expression filter, nz.org.riskscape.engine.relation.Relation relation, T params) protected nz.org.riskscape.problem.ResultOrProblems
protected abstract nz.org.riskscape.problem.ResultOrProblems<nz.org.riskscape.engine.relation.Relation>
createRawRelationFromBookmark
(T params) Construct the raw, unadulterated relation from the bookmark.getV2r()
protected nz.org.riskscape.problem.ResultOrProblems<nz.org.riskscape.engine.coverage.TypedCoverage>
Converts the givenRelation
in to aGridCoverage
using the options in the bookmark.void
setV2r
(VectorToRaster v2r) protected void
validateParameters
(T params, nz.org.riskscape.engine.bind.BindingContext context) Methods inherited from class nz.org.riskscape.engine.data.BaseBookmarkResolver
attemptPrjParse, attemptPrjParse, bindAndValidate, buildParameterSet, checkFile, getBookmarkedPath, getBookmarkedPathOr, getEngine, getExtensions, getExtensionsToFormats, getFormat, getFormats, getParameterSet, getParamsClass, newResolved, resolve, setCrs
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.data.BookmarkResolver
getId, getName, supportedParameters
Methods inherited from interface nz.org.riskscape.engine.Identified
getIdentifiedClass
-
Field Details
-
v2r
-
-
Constructor Details
-
RelationBookmarkResolver
public RelationBookmarkResolver(nz.org.riskscape.engine.Engine engine)
-
-
Method Details
-
getAliasMapping
- Overrides:
getAliasMapping
in classnz.org.riskscape.engine.data.BaseBookmarkResolver<T extends RelationBookmarkParams>
-
build
- Specified by:
build
in classnz.org.riskscape.engine.data.BaseBookmarkResolver<T extends RelationBookmarkParams>
-
applyFilter
protected nz.org.riskscape.problem.ResultOrProblems<nz.org.riskscape.engine.relation.Relation> applyFilter(nz.org.riskscape.rl.ast.Expression filter, nz.org.riskscape.engine.relation.Relation relation, T params) -
rasterize
protected nz.org.riskscape.problem.ResultOrProblems<nz.org.riskscape.engine.coverage.TypedCoverage> rasterize(T params, nz.org.riskscape.engine.relation.Relation relation) Converts the given
Relation
in to aGridCoverage
using the options in the bookmark. -
validateParameters
- Overrides:
validateParameters
in classnz.org.riskscape.engine.data.BaseBookmarkResolver<T extends RelationBookmarkParams>
-
createRawRelationFromBookmark
protected abstract nz.org.riskscape.problem.ResultOrProblems<nz.org.riskscape.engine.relation.Relation> createRawRelationFromBookmark(T params) Construct the raw, unadulterated relation from the bookmark. Won't be called if validation includes errors.
- Returns:
- the
Relation
that returns data from some specific format and location
-
getV2r
-
setV2r
-