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
    Modifier and Type
    Field
    Description
    protected VectorToRaster
     

    Fields inherited from class nz.org.riskscape.engine.data.BaseBookmarkResolver

    engine
  • Constructor Summary

    Constructors
    Constructor
    Description
    RelationBookmarkResolver(nz.org.riskscape.engine.Engine engine)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    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)
     
    protected nz.org.riskscape.problem.ResultOrProblems
    build(T params)
     
    protected abstract nz.org.riskscape.problem.ResultOrProblems<nz.org.riskscape.engine.relation.Relation>
    Construct the raw, unadulterated relation from the bookmark.
    protected Map<String,String>
     
     
    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 a GridCoverage using the options in the bookmark.
    void
     
    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

  • Constructor Details

    • RelationBookmarkResolver

      public RelationBookmarkResolver(nz.org.riskscape.engine.Engine engine)
  • Method Details

    • getAliasMapping

      protected Map<String,String> getAliasMapping()
      Overrides:
      getAliasMapping in class nz.org.riskscape.engine.data.BaseBookmarkResolver<T extends RelationBookmarkParams>
    • build

      protected nz.org.riskscape.problem.ResultOrProblems build(T params)
      Specified by:
      build in class nz.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 a GridCoverage using the options in the bookmark.

    • validateParameters

      protected void validateParameters(T params, nz.org.riskscape.engine.bind.BindingContext context)
      Overrides:
      validateParameters in class nz.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

      public VectorToRaster getV2r()
    • setV2r

      public void setV2r(VectorToRaster v2r)