Class BrAPISpecificationAnalyserFactory.Analyser

java.lang.Object
org.brapi.schematools.analyse.BrAPISpecificationAnalyserFactory.Analyser
Enclosing class:
BrAPISpecificationAnalyserFactory

public class BrAPISpecificationAnalyserFactory.Analyser extends Object
Analyser provides direct access to the analysis functions.
  • Method Details

    • getEntityNames

      public List<String> getEntityNames()
      Get the list of entities available on the server
      Returns:
      list of entities available on the server
    • getEndpoints

      public List<Endpoint> getEndpoints()
      Gets a list of endpoints that are to be tested.
      Returns:
      a list of endpoints that are to be tested.
    • getUnmatchedEndpoints

      public List<Endpoint> getUnmatchedEndpoints()
      Gets a list of endpoints that are not tested under any situation.
      Returns:
      a list of endpoints that are not tested under any situation
    • getSkippedEndpoints

      public List<Endpoint> getSkippedEndpoints()
      Gets a list of endpoints that will not be tested under due to the current option settings.
      Returns:
      a list of endpoints that will not be tested under due to the current option settings
    • getDeprecatedEndpoints

      public List<Endpoint> getDeprecatedEndpoints()
      Gets a list of deprecated endpoints that will be skipped.
      Returns:
      a list of deprecated endpoints that will be skipped.
    • analyseAll

      public org.brapi.schematools.core.response.Response<List<AnalysisReport>> analyseAll()
      Analyse all the endpoints in the specification. Does not call AnalysisOptions.validate() or analyseSpecial().
      Returns:
      A response containing a list of AnalysisReports or failure explaining why it failed.
    • analyseEntities

      public org.brapi.schematools.core.response.Response<List<AnalysisReport>> analyseEntities(List<String> entityNames)
      Analyse the endpoints for specific entities in the specification. Does not call AnalysisOptions.validate() or analyseSpecial().
      Parameters:
      entityNames - a list of entities to be analysed
      Returns:
      A response containing a list of AnalysisReports or failure explaining why it failed.
    • analyseEntity

      public org.brapi.schematools.core.response.Response<List<AnalysisReport>> analyseEntity(String entityName)
      Analyse the endpoints for specific entity in the specification. Does not call analyseSpecial().
      Parameters:
      entityName - an entity to be analysed
      Returns:
      A response containing a list of AnalysisReports or failure explaining why it failed.
    • analyseSpecial

      public org.brapi.schematools.core.response.Response<List<AnalysisReport>> analyseSpecial()
      Analyse the special endpoints that do not fit the regular entity endpoints. For example the /commoncropnames endpoint.
      Returns:
      A response containing a list of AnalysisReports or failure explaining why it failed.
    • validate

      public org.brapi.schematools.core.response.Response<BrAPISpecificationAnalyserFactory.Analyser> validate()
      Validates the options against the specification.
      Returns:
      A response containing this Analyser or failure explaining why it failed.
    • getErrors

      public org.brapi.schematools.core.response.Response<List<APIRequest>> getErrors()
      Get any errors found in the specification
      Returns:
      any errors found in the specification