Class AnalyzerContext


  • public class AnalyzerContext
    extends Object
    Definition of the Context for running an Analysis.
    • Constructor Summary

      Constructors 
      Constructor Description
      AnalyzerContext​(String streamName, com.cobber.fta.dates.DateTimeParser.DateResolutionMode dateResolutionMode, String compositeName, String[] compositeStreamNames)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean equals​(Object obj)  
      String getCompositeName()
      Retrieve the composite name (the enclosing object - for example, table or filename) from the Context.
      String[] getCompositeStreamNames()
      Retrieve the names of all the fields on the enclosing object (for example, table columns or file headers) from the Context.
      com.cobber.fta.dates.DateTimeParser.DateResolutionMode getDateResolutionMode()
      Retrieve the DateResolutionMode from the Context.
      String[] getSemanticTypes()
      Retrieve the Semantic Types of all the streams.
      int getStreamIndex()
      Retrieve the index of the stream name from the list of all stream names.
      String getStreamName()
      Retrieve the stream name from the Context.
      boolean isNextSemanticType​(String... searching)  
      boolean isPreviousSemanticType​(String... searching)  
      void setDateResolutionMode​(com.cobber.fta.dates.DateTimeParser.DateResolutionMode dateResolutionMode)
      Set the DateResolutionMode on the Context.
      AnalyzerContext withSemanticTypes​(String[] semanticTypes)
      Set the 'known' Semantic Type for each field.
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • AnalyzerContext

        public AnalyzerContext​(String streamName,
                               com.cobber.fta.dates.DateTimeParser.DateResolutionMode dateResolutionMode,
                               String compositeName,
                               String[] compositeStreamNames)
    • Method Detail

      • getStreamName

        public String getStreamName()
        Retrieve the stream name from the Context.
        Returns:
        The String name of this data stream.
      • getStreamIndex

        public int getStreamIndex()
        Retrieve the index of the stream name from the list of all stream names.
        Returns:
        The index of this data stream (or -1 if not found).
      • getDateResolutionMode

        public com.cobber.fta.dates.DateTimeParser.DateResolutionMode getDateResolutionMode()
        Retrieve the DateResolutionMode from the Context.
        Returns:
        The DateResolution mode of this analysis.
      • setDateResolutionMode

        public void setDateResolutionMode​(com.cobber.fta.dates.DateTimeParser.DateResolutionMode dateResolutionMode)
        Set the DateResolutionMode on the Context.
        Parameters:
        dateResolutionMode - The new DateResolutionMode.
      • getCompositeName

        public String getCompositeName()
        Retrieve the composite name (the enclosing object - for example, table or filename) from the Context.
        Returns:
        The String name of this composite stream.
      • getCompositeStreamNames

        public String[] getCompositeStreamNames()
        Retrieve the names of all the fields on the enclosing object (for example, table columns or file headers) from the Context.
        Returns:
        The String array with the names of all the elements on this composite.
      • withSemanticTypes

        public AnalyzerContext withSemanticTypes​(String[] semanticTypes)
        Set the 'known' Semantic Type for each field.
        Parameters:
        semanticTypes - The 'known' set of Semantic Types - null implies unknown.
        Returns:
        The AnalyzerContext
      • getSemanticTypes

        public String[] getSemanticTypes()
        Retrieve the Semantic Types of all the streams.
        Returns:
        The String array with the Semantic Type or null if not known.
      • isNextSemanticType

        public boolean isNextSemanticType​(String... searching)
      • isPreviousSemanticType

        public boolean isPreviousSemanticType​(String... searching)
      • equals

        public boolean equals​(Object obj)
        Overrides:
        equals in class Object