Class AnalysisOptions

java.lang.Object
org.brapi.schematools.analyse.AnalysisOptions
All Implemented Interfaces:
org.brapi.schematools.core.options.Options, org.brapi.schematools.core.validiation.Validatable

public class AnalysisOptions extends Object implements org.brapi.schematools.core.options.Options
  • Constructor Details

    • AnalysisOptions

      public AnalysisOptions()
  • Method Details

    • load

      public static AnalysisOptions load()
      Load the default options
      Returns:
      The default options
    • load

      public static AnalysisOptions load(Path optionsFile) throws IOException
      Load the options from an options file in YAML or Json. The options file may have missing (defined) values, in these cases the default values are loaded. See load()
      Parameters:
      optionsFile - The path to the options file in YAML or Json.
      Returns:
      The options loaded from the YAML or Json file.
      Throws:
      IOException - if the options file can not be found or is incorrectly formatted.
    • load

      public static AnalysisOptions load(InputStream inputStream) throws IOException
      Load the options from an options input stream in YAML or Json. The options file may have missing (defined) values, in these cases the default values are loaded. See load()
      Parameters:
      inputStream - The input stream in YAML or Json.
      Returns:
      The options loaded from input stream.
      Throws:
      IOException - if the input stream is not valid or the content is incorrectly formatted.
    • override

      public AnalysisOptions override(AnalysisOptions overrideOptions)
      Overrides the values in this Options Object from the provided Options Object if they are non-null
      Parameters:
      overrideOptions - the options which will be used to override this Options Object
      Returns:
      this object for method chaining
    • validate

      public org.brapi.schematools.core.validiation.Validation validate()
      Specified by:
      validate in interface org.brapi.schematools.core.validiation.Validatable
    • isAnalysingDepreciated

      public boolean isAnalysingDepreciated()
      Determines if the Analyser should analyse depreciated endpoints
      Returns:
      true if the Analyser should analyse depreciated endpoints, false otherwise
    • isAnalysingGetForEntity

      public boolean isAnalysingGetForEntity(String entityName)
      Determines if the Analyser should analyse the get API for an Entity.
      Parameters:
      entityName - the name of the entity
      Returns:
      true if the Analyser should analyse the get API for an Entity, false otherwise
    • isAnalysingListForEntity

      public boolean isAnalysingListForEntity(String entityName)
      Determines if the Analyser should analyse the list API for an Entity.
      Parameters:
      entityName - the name of the entity
      Returns:
      true if the Analyser should analyse the list API for an Entity, false otherwise
    • isAnalysingCreateForEntity

      public boolean isAnalysingCreateForEntity(String entityName)
      Determines if the Analyser should analyse the get API for an Entity.
      Parameters:
      entityName - the name of the entity
      Returns:
      true if the Analyser should analyse the get API for an Entity, false otherwise
    • isAnalysingUpdateForEntity

      public boolean isAnalysingUpdateForEntity(String entityName)
      Determines if the Analyser should analyse the Update API for an Entity.
      Parameters:
      entityName - the name of the entity
      Returns:
      true if the Analyser should analyse the list API for an Entity, false otherwise
    • isAnalysingDeleteForEntity

      public boolean isAnalysingDeleteForEntity(String entityName)
      Determines if the Analyser should analyse the Delete API for an Entity.
      Parameters:
      entityName - the name of the entity
      Returns:
      true if the Analyser should analyse the get API for an Entity, false otherwise
    • isAnalysingSearchForEntity

      public boolean isAnalysingSearchForEntity(String entityName)
      Determines if the Analyser should analyse the Search API for an Entity.
      Parameters:
      entityName - the name of the entity
      Returns:
      true if the Analyser should analyse the list API for an Entity, false otherwise
    • isAnalysingSearchResultForEntity

      public boolean isAnalysingSearchResultForEntity(String entityName)
      Determines if the Analyser should analyse the result from Search API for an Entity.
      Parameters:
      entityName - the name of the entity
      Returns:
      true if the Analyser should analyse the list API for an Entity, false otherwise
    • isAnalysingTableForEntity

      public boolean isAnalysingTableForEntity(String entityName)
      Determines if the Analyser should analyse the get or post table API for an Entity.
      Parameters:
      entityName - the name of the entity
      Returns:
      true if the Analyser should analyse the get or post table API for an Entity, false otherwise
    • isPartitionedByCrop

      public boolean isPartitionedByCrop()
      Determines if the request is partition by crop, so that queries are not across crops
      Returns:
      true if the request is partition by crop, so that requests are not across crops, false otherwise