Class SpectrumFileChecker

  • All Implemented Interfaces:
    adams.core.AdditionalInformationHandler, adams.core.CleanUpHandler, adams.core.Destroyable, adams.core.GlobalInfoSupporter, adams.core.logging.LoggingLevelHandler, adams.core.logging.LoggingSupporter, adams.core.option.OptionHandler, adams.core.Pausable, adams.core.QuickInfoSupporter, adams.core.ShallowCopySupporter<adams.flow.core.Actor>, adams.core.SizeOfHandler, adams.core.Stoppable, adams.core.StoppableWithFeedback, adams.core.VariablesInspectionHandler, adams.event.FlowPauseStateListener, adams.event.VariableChangeListener, adams.flow.control.AtomicExecution, adams.flow.core.Actor, adams.flow.core.ActorHandler, adams.flow.core.ActorWithConditionalEquivalent, adams.flow.core.ActorWithTimedEquivalent, adams.flow.core.ControlActor, adams.flow.core.ErrorHandler, adams.flow.core.Flushable, adams.flow.core.InputConsumer, adams.flow.core.MutableActorHandler, adams.flow.core.OutputProducer, adams.flow.core.SubFlowWrapUp, Serializable, Comparable

    public class SpectrumFileChecker
    extends adams.flow.control.AbstractDataContainerFileChecker<Spectrum>
    Only passes on files/directories containing spectra that could be loaded successfully.

    Input/output:
    - accepts:
       java.lang.String
       java.lang.String[]
       java.io.File
       java.io.File[]
    - generates:
       java.lang.String
       java.lang.String[]
       java.io.File
       java.io.File[]


    Valid options are:

    -D <int> (property: debugLevel)
        The greater the number the more additional info the scheme may output to
        the console (0 = off).
        default: 0
        minimum: 0
     
    -name <java.lang.String> (property: name)
        The name of the actor.
        default: SpectrumFileChecker
     
    -annotation <adams.core.base.BaseText> (property: annotations)
        The annotations to attach to this actor.
        default:
     
    -skip (property: skip)
        If set to true, transformation is skipped and the input token is just forwarded
        as it is.
     
    -stop-flow-on-error (property: stopFlowOnError)
        If set to true, the flow gets stopped in case this actor encounters an error;
         useful for critical actors.
     
    -progress (property: showProgress)
        If set to true, progress information will be output to stdout ('.').
     
    -tee <adams.flow.core.AbstractActor [options]> (property: teeActor)
        The actor to siphon-off the tokens to.
        default: adams.flow.sink.Null
     
    -reader <adams.data.io.input.AbstractDataContainerReader [options]> (property: reader)
        The reader to use for reading the files being passed through.
        default: knir.data.input.SimpleSpectrumReader
     
    -expiry-interval <adams.core.base.BaseDateTime> (property: expiryInterval)
        The time interval before black-listed items are moved from the temporary
        list to the final list; requires the keyword 'START' in the expression.
        default: START +24 HOUR
     
    -check-interval <adams.core.base.BaseTime> (property: checkInterval)
        The time interval after which black-listed items in the temporary list are
        checked again whether they finally load correctly; requires the keyword '
        START' in the expression.
        default: START +15 MINUTE
     
    -log <adams.core.io.PlaceholderFile> (property: log)
        The log file to write the files to that expired from the final black-list,
         ie, never being loaded correctly; log gets ignored if pointing to a directory.
        default: .
     
    Version:
    $Revision: 2242 $
    Author:
    fracpete (fracpete at waikato dot ac dot nz)
    See Also:
    Serialized Form
    • Nested Class Summary

      • Nested classes/interfaces inherited from class adams.flow.control.AbstractDataContainerFileChecker

        adams.flow.control.AbstractDataContainerFileChecker.FileInfo
      • Nested classes/interfaces inherited from class adams.flow.control.AbstractTee

        adams.flow.control.AbstractTee.TeeSwingWorker
    • Field Summary

      • Fields inherited from class adams.flow.control.AbstractDataContainerFileChecker

        BACKUP_FINALLIST, BACKUP_TEMPLIST, m_ActualReader, m_BlackListFinal, m_BlackListTemp, m_CheckInterval, m_ExpiryInterval, m_Formatter, m_Log, m_Reader
      • Fields inherited from class adams.flow.control.AbstractTee

        BACKUP_INPUT, m_Actors, m_Asynchronous, m_AsynchronousWorker, m_InputToken, m_MinimumActiveActors, m_OutputToken
      • Fields inherited from class adams.flow.control.AbstractControlActor

        m_Compatibility, m_PauseStateManager, m_SetUpSubActors
      • Fields inherited from class adams.flow.core.AbstractActor

        m_Annotations, m_BackupState, m_DetectedObjectVariables, m_DetectedVariables, m_ErrorHandler, m_Executed, m_Executing, m_ExecutionListeningSupporter, m_FullName, m_LoggingPrefix, m_Name, m_Parent, m_ScopeHandler, m_Self, m_Silent, m_Skip, m_StopFlowOnError, m_StopMessage, m_Stopped, m_StorageHandler, m_VariablesUpdated
      • Fields inherited from class adams.core.option.AbstractOptionHandler

        m_OptionManager
      • Fields inherited from class adams.core.logging.LoggingObject

        m_Logger, m_LoggingIsEnabled, m_LoggingLevel
      • Fields inherited from interface adams.flow.core.Actor

        FILE_EXTENSION, FILE_EXTENSION_GZ
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected adams.data.io.input.AbstractDataContainerReader<Spectrum> getDefaultReader()
      Returns the default reader for loading the data.
      String globalInfo()
      Returns a string describing the object.
      • Methods inherited from class adams.flow.control.AbstractDataContainerFileChecker

        accepts, backupState, canProcessInput, checkIntervalTipText, cleanUp, defineOptions, doExecute, expiryIntervalTipText, generates, getCheckInterval, getExpiryInterval, getFormatter, getLog, getReader, initialize, isValid, logExpired, logTipText, pruneBackup, readerTipText, reset, restoreState, setCheckInterval, setExpiryInterval, setLog, setReader, setUpTeeActors
      • Methods inherited from class adams.flow.control.Tee

        checkTeeActor, checkTeeActors, getActorHandlerInfo, getConditionalEquivalent, getTimedEquivalent
      • Methods inherited from class adams.flow.control.AbstractTee

        actorsTipText, add, add, asynchronousTipText, check, createTeeToken, currentInput, execute, finishBeforeStoppingTipText, finishedAsynchronousExecution, flushExecution, forceVariables, get, getActors, getAsynchronous, getFinishBeforeStopping, getInternalActors, getMinimumActiveActors, getQuickInfo, getStoppingTimeout, hasInput, hasPendingOutput, indexOf, input, output, processInput, remove, removeAll, set, setActors, setAsynchronous, setFinishBeforeStopping, setLoggingLevel, setMinimumActiveActors, setSkip, setStoppingTimeout, setUpSubActors, size, stopExecution, stoppingTimeoutTipText, updateParent, waitForAsynchronousExecution, wrapUp
      • Methods inherited from class adams.flow.control.AbstractControlActor

        active, canInspectOptions, destroy, firstActive, firstInputConsumer, flowPauseStateChanged, isPaused, isSubFlowWrappedUp, lastActive, pauseExecution, preExecute, resumeExecution, setParent, setUp, wrapUpSubFlow
      • Methods inherited from class adams.flow.core.AbstractActor

        annotationsTipText, canPerformSetUpCheck, compareTo, configureLogger, equals, finalUpdateVariables, findVariables, findVariables, forCommandLine, forName, forName, getAdditionalInformation, getAnnotations, getDefaultName, getDetectedVariables, getErrorHandler, getFlowActors, getFlowExecutionListeningSupporter, getFullName, getName, getNextSibling, getParent, getParentComponent, getPreviousSibling, getRoot, getScopeHandler, getSilent, getSkip, getStopFlowOnError, getStopMessage, getStorageHandler, getVariables, handleError, handleException, hasErrorHandler, hasStopMessage, index, isBackedUp, isExecuted, isExecuting, isFinished, isHeadless, isStopped, nameTipText, performSetUpChecks, performVariableChecks, postExecute, pruneBackup, setAnnotations, setErrorHandler, setName, setSilent, setStopFlowOnError, setVariables, shallowCopy, shallowCopy, silentTipText, sizeOf, skipTipText, stopExecution, stopFlowOnErrorTipText, updateDetectedVariables, updatePrefix, updateVariables, variableChanged
      • Methods inherited from class adams.core.option.AbstractOptionHandler

        cleanUpOptions, finishInit, getDefaultLoggingLevel, getOptionManager, loggingLevelTipText, newOptionManager, toCommandLine, toString
      • Methods inherited from class adams.core.logging.LoggingObject

        getLogger, getLoggingLevel, initializeLogging, isLoggingEnabled
      • Methods inherited from interface adams.flow.core.Actor

        compareTo, destroy, equals, execute, findVariables, getAnnotations, getDefaultName, getDetectedVariables, getErrorHandler, getFlowExecutionListeningSupporter, getFullName, getName, getNextSibling, getParent, getParentComponent, getPreviousSibling, getQuickInfo, getRoot, getScopeHandler, getSilent, getSkip, getStopFlowOnError, getStopMessage, getStorageHandler, getVariables, handleError, hasErrorHandler, hasStopMessage, index, isExecuted, isFinished, isHeadless, isStopped, setAnnotations, setErrorHandler, setName, setParent, setSilent, setSkip, setStopFlowOnError, setUp, setVariables, shallowCopy, shallowCopy, sizeOf, stopExecution, stopExecution, toCommandLine, variableChanged, wrapUp
      • Methods inherited from interface adams.flow.core.ActorHandler

        firstActive, lastActive
      • Methods inherited from interface adams.core.AdditionalInformationHandler

        getAdditionalInformation
      • Methods inherited from interface adams.core.logging.LoggingLevelHandler

        getLoggingLevel, setLoggingLevel
      • Methods inherited from interface adams.core.logging.LoggingSupporter

        getLogger, isLoggingEnabled
      • Methods inherited from interface adams.core.option.OptionHandler

        cleanUpOptions, getOptionManager
      • Methods inherited from interface adams.core.VariablesInspectionHandler

        canInspectOptions
    • Constructor Detail

      • SpectrumFileChecker

        public SpectrumFileChecker()
    • Method Detail

      • globalInfo

        public String globalInfo()
        Returns a string describing the object.
        Specified by:
        globalInfo in interface adams.core.GlobalInfoSupporter
        Overrides:
        globalInfo in class adams.flow.control.Tee
        Returns:
        a description suitable for displaying in the gui
      • getDefaultReader

        protected adams.data.io.input.AbstractDataContainerReader<Spectrum> getDefaultReader()
        Returns the default reader for loading the data.
        Specified by:
        getDefaultReader in class adams.flow.control.AbstractDataContainerFileChecker<Spectrum>
        Returns:
        the default reader