Class InputDataPhase

java.lang.Object
nz.org.riskscape.wizard.survey2.BasePhase
nz.org.riskscape.wizard.model2.input.InputDataPhase
All Implemented Interfaces:
Phase

public class InputDataPhase extends BasePhase
  • Field Details

    • EXPOSURE_ATTRIBUTE

      public static final String EXPOSURE_ATTRIBUTE
    • HAZARD_ATTRIBUTE

      public static final String HAZARD_ATTRIBUTE
    • RESOURCE_ATTRIBUTE

      public static final String RESOURCE_ATTRIBUTE
    • MAIN_BRANCH

      public static final ChangeLocation MAIN_BRANCH

      The 'main' branch of the pipeline that subsequent phases should hang off. This differentiates the branch containing the exposures from the various other input layers we add to the pipeline.

  • Constructor Details

    • InputDataPhase

      public InputDataPhase(Survey survey)
  • Method Details

    • getAttributeName

      public static String getAttributeName(String dataset)

      We refer to the input-data layer in the plural form, but the pipeline attribute in the singular. Generally the user will only ever see the singular form, i.e. when they select attributes or view the final results. The singular form will make more sense in this case, as each row of output represents a single exposure. The plural form makes more sense to us devs as we build the pipeline

    • getDatasetName

      public static String getDatasetName(nz.org.riskscape.engine.pipeline.RealizedStep inputStep)
    • isMultiHazard

      public static boolean isMultiHazard(IncrementalBuildState buildState)
    • getDatasetsToSample

      public static List<String> getDatasetsToSample(IncrementalBuildState buildState)
      Returns:
      a list of the datasets that need to be sampled
    • getAvailableQuestionSets

      public List<QuestionSet> getAvailableQuestionSets(IncrementalBuildState buildState)
      Description copied from class: BasePhase

      Default implementation of Phase.getAvailableQuestionSets(IncrementalBuildState) that builds a static list of question sets the first time it sees a build state and then filters them based on what's already been answered

      Specified by:
      getAvailableQuestionSets in interface Phase
      Overrides:
      getAvailableQuestionSets in class BasePhase
    • canSkip

      public boolean canSkip(IncrementalBuildState buildState)
      Specified by:
      canSkip in interface Phase
      Overrides:
      canSkip in class BasePhase
      Returns:
      true if the remaining question sets in this phase can be skipped, or false if they must be answered to move on to the next phase
    • createInputDataQuestionSet

      public QuestionSet createInputDataQuestionSet(String datasetName)
    • createInputDataQuestionSet

      public QuestionSet createInputDataQuestionSet(String originalDatasetName, int multiHazardIndex)
    • isHazardDataset

      public static boolean isHazardDataset(String datasetName)