Class GetPropertyNames

  • All Implemented Interfaces:
    AdditionalInformationHandler, ArrayProvider, CleanUpHandler, Destroyable, GlobalInfoSupporter, LoggingLevelHandler, LoggingSupporter, OptionHandler, QuickInfoSupporter, ShallowCopySupporter<Actor>, SizeOfHandler, Stoppable, StoppableWithFeedback, VariablesInspectionHandler, VariableChangeListener, Actor, ArrayProvider, ErrorHandler, InputConsumer, OutputProducer, Serializable, Comparable

    public class GetPropertyNames
    extends AbstractArrayProvider
    Outputs all the keys of the properties object passing through.

    Input/output:
    - accepts:
       java.util.Properties
    - generates:
       java.lang.String


    Valid options are:

    -logging-level <OFF|SEVERE|WARNING|INFO|CONFIG|FINE|FINER|FINEST> (property: loggingLevel)
        The logging level for outputting errors and debugging output.
        default: WARNING
     
    -name <java.lang.String> (property: name)
        The name of the actor.
        default: GetPropertyNames
     
    -annotation <adams.core.base.BaseText> (property: annotations)
        The annotations to attach to this actor.
        default: 
     
    -skip <boolean> (property: skip)
        If set to true, transformation is skipped and the input token is just forwarded 
        as it is.
        default: false
     
    -stop-flow-on-error <boolean> (property: stopFlowOnError)
        If set to true, the flow gets stopped in case this actor encounters an error;
         useful for critical actors.
        default: false
     
    -output-array <boolean> (property: outputArray)
        If enabled, the keys will get output as array rather than one-by-one.
        default: false
     
    -reg-exp <adams.core.base.BaseRegExp> (property: regExp)
        The regular expression that the property names must match in order to be 
        listed.
        default: .*
     
    -sort-keys <boolean> (property: sortKeys)
        If enabled, the keys will get sorted.
        default: false
     
    Version:
    $Revision$
    Author:
    fracpete (fracpete at waikato dot ac dot nz)
    See Also:
    Serialized Form
    • Field Detail

      • m_RegExp

        protected BaseRegExp m_RegExp
        the regular expression that the property names must match.
      • m_SortKeys

        protected boolean m_SortKeys
        whether to sort the keys.
    • Constructor Detail

      • GetPropertyNames

        public GetPropertyNames()
    • Method Detail

      • setRegExp

        public void setRegExp​(BaseRegExp value)
        Sets the regular expression that the property names must match.
        Parameters:
        value - the regular expression
      • getRegExp

        public BaseRegExp getRegExp()
        Returns the regular expression that the property names must match.
        Returns:
        the regular expression
      • regExpTipText

        public String regExpTipText()
        Returns the tip text for this property.
        Returns:
        tip text for this property suitable for displaying in the GUI or for listing the options.
      • setSortKeys

        public void setSortKeys​(boolean value)
        Sets whether to sort the keys.
        Parameters:
        value - if true then keys get sorted
      • getSortKeys

        public boolean getSortKeys()
        Returns whether to sort the keys.
        Returns:
        true if keys get sorted
      • sortKeysTipText

        public String sortKeysTipText()
        Returns the tip text for this property.
        Returns:
        tip text for this property suitable for displaying in the GUI or for listing the options.
      • accepts

        public Class[] accepts()
        Returns the class that the consumer accepts.
        Returns:
        the Class of objects that can be processed
      • doExecute

        protected String doExecute()
        Executes the flow item.
        Specified by:
        doExecute in class AbstractActor
        Returns:
        null if everything is fine, otherwise error message