Class OutputEnableRulesSpecify

Object
org.anchoranalysis.bean.AnchorBean<OutputEnabledRules>
org.anchoranalysis.io.output.bean.rules.OutputEnabledRules
org.anchoranalysis.io.output.bean.rules.OutputEnableRulesSpecify
Direct Known Subclasses:
AddToDefaults, IgnoreUnderscorePrefixUnless, NoneExcept, PermissiveExcept

public abstract class OutputEnableRulesSpecify
extends OutputEnabledRules
Base class for an OutputEnabledRules that specifies particular output-names for first and second levels.
Author:
Owen Feehan
  • Constructor Summary

    Constructors 
    Modifier Constructor Description
    protected OutputEnableRulesSpecify()  
    protected OutputEnableRulesSpecify​(org.anchoranalysis.bean.primitive.StringSet first)
    Create with a specific set of first-level output names.
  • Method Summary

    Modifier and Type Method Description
    protected abstract SingleLevelOutputEnabled createSecondLevelFromSet​(org.anchoranalysis.bean.primitive.StringSet outputNames)
    Creates a new second-level SingleLevelOutputEnabled from the relevant set of strings.
    protected boolean firstLevelContains​(String outputName)
    Whether the first-level names contain a particular output (if defined)?
    org.anchoranalysis.bean.primitive.StringSet getFirst()
    Output-names in the first-level.
    List<org.anchoranalysis.bean.NamedBean<org.anchoranalysis.bean.primitive.StringSet>> getSecond()
    Output-names in the second-level (for all first level output-names).
    protected boolean isFirstDefined()
    Are output-names in the first-level defined?
    protected SingleLevelOutputEnabled secondLevelOutputs​(String outputName, OutputEnabled defaultValue)
    Retrieves a second-level SingleLevelOutputEnabled corresponding to a first-level output-name.
    void setFirst​(org.anchoranalysis.bean.primitive.StringSet first)
    Output-names in the first-level.
    void setSecond​(List<org.anchoranalysis.bean.NamedBean<org.anchoranalysis.bean.primitive.StringSet>> second)
    Output-names in the second-level (for all first level output-names).

    Methods inherited from class org.anchoranalysis.io.output.bean.rules.OutputEnabledRules

    create

    Methods inherited from class org.anchoranalysis.bean.AnchorBean

    checkMisconfigured, describeBean, describeChildren, duplicateBean, fields, findFieldsOfClass, getBeanName, getLocalPath, localise, toString

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • OutputEnableRulesSpecify

      protected OutputEnableRulesSpecify​(org.anchoranalysis.bean.primitive.StringSet first)
      Create with a specific set of first-level output names.
      Parameters:
      first - first-level output-names
    • OutputEnableRulesSpecify

      protected OutputEnableRulesSpecify()
  • Method Details

    • firstLevelContains

      protected boolean firstLevelContains​(String outputName)
      Whether the first-level names contain a particular output (if defined)?
      Parameters:
      outputName - the output-name to query.
      Returns:
      true iff the first-level names are defined and outputName is contained.
    • createSecondLevelFromSet

      protected abstract SingleLevelOutputEnabled createSecondLevelFromSet​(org.anchoranalysis.bean.primitive.StringSet outputNames)
      Creates a new second-level SingleLevelOutputEnabled from the relevant set of strings.
      Parameters:
      outputNames - a set of output-names that are used to create the SingleLevelOutputEnabled.
      Returns:
      the newly created SingleLevelOutputEnabled.
    • secondLevelOutputs

      protected SingleLevelOutputEnabled secondLevelOutputs​(String outputName, OutputEnabled defaultValue)
      Retrieves a second-level SingleLevelOutputEnabled corresponding to a first-level output-name.
      Parameters:
      outputName - the name of the first-level output.
      defaultValue - the default-value used if no existing second-level entry exists.
      Returns:
      an existing corresponding SingleLevelOutputEnabled or otherwise a newly created one.
    • isFirstDefined

      protected boolean isFirstDefined()
      Are output-names in the first-level defined?
      Returns:
      true iff they are defined.
    • getFirst

      public org.anchoranalysis.bean.primitive.StringSet getFirst()
      Output-names in the first-level.
    • setFirst

      public void setFirst​(org.anchoranalysis.bean.primitive.StringSet first)
      Output-names in the first-level.
    • getSecond

      public List<org.anchoranalysis.bean.NamedBean<org.anchoranalysis.bean.primitive.StringSet>> getSecond()
      Output-names in the second-level (for all first level output-names).

      If the list is empty, all second-level outputs are considered permissive.

    • setSecond

      public void setSecond​(List<org.anchoranalysis.bean.NamedBean<org.anchoranalysis.bean.primitive.StringSet>> second)
      Output-names in the second-level (for all first level output-names).

      If the list is empty, all second-level outputs are considered permissive.