Class DefaultProject

All Implemented Interfaces:
nz.org.riskscape.engine.IdentifiedLocator, nz.org.riskscape.engine.Project

public class DefaultProject extends DefaultIdentifiedLocator implements nz.org.riskscape.engine.Project
  • Constructor Details

    • DefaultProject

      public DefaultProject(nz.org.riskscape.engine.Engine engine, nz.org.riskscape.config.Config config)
  • Method Details

    • validate

      public void validate(Consumer<nz.org.riskscape.problem.Problem> problemConsumer)
      Specified by:
      validate in interface nz.org.riskscape.engine.Project
    • newBindingContext

      public nz.org.riskscape.engine.bind.BindingContext newBindingContext()
      Specified by:
      newBindingContext in interface nz.org.riskscape.engine.Project
    • newBindingContext

      public nz.org.riskscape.engine.bind.BindingContext newBindingContext(nz.org.riskscape.engine.rl.RealizationContext realizationContext)
      Specified by:
      newBindingContext in interface nz.org.riskscape.engine.Project
    • add

      public void add(nz.org.riskscape.engine.data.Bookmark bookmark)
      Specified by:
      add in interface nz.org.riskscape.engine.Project
    • add

      public void add(nz.org.riskscape.engine.function.IdentifiedFunction function)
      Specified by:
      add in interface nz.org.riskscape.engine.Project
    • getOutputBaseLocation

      public URI getOutputBaseLocation()
      Specified by:
      getOutputBaseLocation in interface nz.org.riskscape.engine.Project
    • getTypeBuilder

      public nz.org.riskscape.engine.typexp.TypeBuilder getTypeBuilder()
      Specified by:
      getTypeBuilder in interface nz.org.riskscape.engine.Project
    • newRealizationContext

      public nz.org.riskscape.engine.rl.RealizationContext newRealizationContext()
      Specified by:
      newRealizationContext in interface nz.org.riskscape.engine.Project
    • getRelativeTo

      public URI getRelativeTo()

      Maintains a mapping of normalized structs, to avoid object proliferation. When two different structs are equal (i.e. Object#equals), then when normalized they end up as the exact same object (i.e. Object ==). The first struct normalized populates the map, then subsequent key lookups of equivalent structs (Object#equals) will return the first canonical struct.

      Specified by:
      getRelativeTo in interface nz.org.riskscape.engine.Project
    • hasCollectionOf

      public boolean hasCollectionOf(Class<? extends nz.org.riskscape.engine.Identified> identifiedClass)
      Specified by:
      hasCollectionOf in interface nz.org.riskscape.engine.IdentifiedLocator
      Overrides:
      hasCollectionOf in class DefaultIdentifiedLocator
    • getCollectionByClass

      public <T extends nz.org.riskscape.engine.Identified> nz.org.riskscape.engine.IdentifiedCollection<T> getCollectionByClass(Class<T> collectionClass)
      Specified by:
      getCollectionByClass in interface nz.org.riskscape.engine.IdentifiedLocator
      Overrides:
      getCollectionByClass in class DefaultIdentifiedLocator
    • getCollectionClasses

      public Set<Class<? extends nz.org.riskscape.engine.Identified>> getCollectionClasses()
      Specified by:
      getCollectionClasses in interface nz.org.riskscape.engine.IdentifiedLocator
      Overrides:
      getCollectionClasses in class DefaultIdentifiedLocator
    • getProblemSink

      public final nz.org.riskscape.problem.ProblemSink getProblemSink()
      Specified by:
      getProblemSink in interface nz.org.riskscape.engine.Project
    • setGeometryValidation

      public void setGeometryValidation(nz.org.riskscape.engine.geo.GeometryValidation mode)
      Specified by:
      setGeometryValidation in interface nz.org.riskscape.engine.Project
    • getEngine

      public nz.org.riskscape.engine.Engine getEngine()
      Specified by:
      getEngine in interface nz.org.riskscape.engine.Project
    • getSridSet

      public nz.org.riskscape.engine.SRIDSet getSridSet()
      Specified by:
      getSridSet in interface nz.org.riskscape.engine.Project
    • getConfig

      public nz.org.riskscape.config.Config getConfig()
      Specified by:
      getConfig in interface nz.org.riskscape.engine.Project
    • getDefaultCrs

      public org.geotools.api.referencing.crs.CoordinateReferenceSystem getDefaultCrs()
      Specified by:
      getDefaultCrs in interface nz.org.riskscape.engine.Project
    • setDefaultCrs

      public void setDefaultCrs(org.geotools.api.referencing.crs.CoordinateReferenceSystem defaultCrs)
    • setRelativeTo

      public void setRelativeTo(URI relativeTo)
      Specified by:
      setRelativeTo in interface nz.org.riskscape.engine.Project
    • setOutputBaseLocation

      public void setOutputBaseLocation(URI outputBaseLocation)
      Specified by:
      setOutputBaseLocation in interface nz.org.riskscape.engine.Project
    • getGeometryValidation

      public nz.org.riskscape.engine.geo.GeometryValidation getGeometryValidation()
      Specified by:
      getGeometryValidation in interface nz.org.riskscape.engine.Project
    • getBookmarks

      public nz.org.riskscape.engine.data.Bookmarks getBookmarks()
      Specified by:
      getBookmarks in interface nz.org.riskscape.engine.Project
    • getFunctionSet

      public nz.org.riskscape.engine.FunctionSet getFunctionSet()
      Specified by:
      getFunctionSet in interface nz.org.riskscape.engine.Project
    • getTypeSet

      public nz.org.riskscape.engine.typeset.TypeSet getTypeSet()
      Specified by:
      getTypeSet in interface nz.org.riskscape.engine.Project
    • getIdentifiedModels

      public nz.org.riskscape.engine.IdentifiedCollection<nz.org.riskscape.engine.model.IdentifiedModel> getIdentifiedModels()
      Specified by:
      getIdentifiedModels in interface nz.org.riskscape.engine.Project
    • getParameterTemplates

      public nz.org.riskscape.engine.IdentifiedCollection<nz.org.riskscape.engine.bind.UserDefinedParameter> getParameterTemplates()
      Specified by:
      getParameterTemplates in interface nz.org.riskscape.engine.Project