Package org.brapi.schematools.analyse
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
Options for the
BrAPISpecificationAnalyserFactory.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanisAnalysingCreateForEntity(String entityName) Determines if the Analyser should analyse the get API for an Entity.booleanisAnalysingDeleteForEntity(String entityName) Determines if the Analyser should analyse the Delete API for an Entity.booleanDetermines if the Analyser should analyse depreciated endpointsbooleanisAnalysingGetForEntity(String entityName) Determines if the Analyser should analyse the get API for an Entity.booleanisAnalysingListForEntity(String entityName) Determines if the Analyser should analyse the list API for an Entity.booleanisAnalysingSearchForEntity(String entityName) Determines if the Analyser should analyse the Search API for an Entity.booleanisAnalysingSearchResultForEntity(String entityName) Determines if the Analyser should analyse the result from Search API for an Entity.booleanisAnalysingTableForEntity(String entityName) Determines if the Analyser should analyse the get or post table API for an Entity.booleanisAnalysingUpdateForEntity(String entityName) Determines if the Analyser should analyse the Update API for an Entity.booleanDetermines if the request is partition by crop, so that queries are not across cropsstatic AnalysisOptionsload()Load the default optionsstatic AnalysisOptionsload(InputStream inputStream) Load the options from an options input stream in YAML or Json.static AnalysisOptionsLoad the options from an options file in YAML or Json.override(AnalysisOptions overrideOptions) Overrides the values in this Options Object from the provided Options Object if they are non-nullorg.brapi.schematools.core.validiation.Validationvalidate()
-
Constructor Details
-
AnalysisOptions
public AnalysisOptions()
-
-
Method Details
-
load
Load the default options- Returns:
- The default options
-
load
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. Seeload()- 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
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. Seeload()- 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
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:
validatein interfaceorg.brapi.schematools.core.validiation.Validatable
-
isAnalysingDepreciated
public boolean isAnalysingDepreciated()Determines if the Analyser should analyse depreciated endpoints- Returns:
trueif the Analyser should analyse depreciated endpoints,falseotherwise
-
isAnalysingGetForEntity
Determines if the Analyser should analyse the get API for an Entity.- Parameters:
entityName- the name of the entity- Returns:
trueif the Analyser should analyse the get API for an Entity,falseotherwise
-
isAnalysingListForEntity
Determines if the Analyser should analyse the list API for an Entity.- Parameters:
entityName- the name of the entity- Returns:
trueif the Analyser should analyse the list API for an Entity,falseotherwise
-
isAnalysingCreateForEntity
Determines if the Analyser should analyse the get API for an Entity.- Parameters:
entityName- the name of the entity- Returns:
trueif the Analyser should analyse the get API for an Entity,falseotherwise
-
isAnalysingUpdateForEntity
Determines if the Analyser should analyse the Update API for an Entity.- Parameters:
entityName- the name of the entity- Returns:
trueif the Analyser should analyse the list API for an Entity,falseotherwise
-
isAnalysingDeleteForEntity
Determines if the Analyser should analyse the Delete API for an Entity.- Parameters:
entityName- the name of the entity- Returns:
trueif the Analyser should analyse the get API for an Entity,falseotherwise
-
isAnalysingSearchForEntity
Determines if the Analyser should analyse the Search API for an Entity.- Parameters:
entityName- the name of the entity- Returns:
trueif the Analyser should analyse the list API for an Entity,falseotherwise
-
isAnalysingSearchResultForEntity
Determines if the Analyser should analyse the result from Search API for an Entity.- Parameters:
entityName- the name of the entity- Returns:
trueif the Analyser should analyse the list API for an Entity,falseotherwise
-
isAnalysingTableForEntity
Determines if the Analyser should analyse the get or post table API for an Entity.- Parameters:
entityName- the name of the entity- Returns:
trueif the Analyser should analyse the get or post table API for an Entity,falseotherwise
-
isPartitionedByCrop
public boolean isPartitionedByCrop()Determines if the request is partition by crop, so that queries are not across crops- Returns:
trueif the request is partition by crop, so that requests are not across crops,falseotherwise
-