Class CeaParameter


  • public class CeaParameter
    extends java.lang.Object
    Represents a parameter of a CEA task.
    Since:
    17 Mar 2006
    Author:
    Mark Taylor
    • Constructor Summary

      Constructors 
      Constructor Description
      CeaParameter​(uk.ac.starlink.task.Parameter<?> taskParam)
      Constructor.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String getDefault()
      Returns the default value of this parameter if there is one.
      java.lang.String getDescription()
      Returns this parameter's description.
      java.lang.String getName()
      Returns this parameter's name.
      java.lang.String[] getOptions()
      Returns an array of permitted options if there is one.
      java.lang.String getSummary()
      Returns a one-line summary of this parameter's purpose.
      java.lang.String getType()
      Returns the CEA type (CmdLineParameterDef/type) of this parameter.
      boolean isMulti()
      Returns whether this parameter can be specified multiple times on the command line.
      boolean isNullPermitted()
      Returns whether null is a permitted value for this parameter.
      boolean isOutput()
      Returns whether this parameter is an output parameter in the CEA sense.
      boolean isRef()
      Returns whether this parameter is a CEA 'reference' parameter (points to a file).
      void setOutput​(boolean isOutput)  
      void setRef​(boolean isRef)  
      void truncateDescription()
      Truncates this parameter's description to its first sentence.
      • Methods inherited from class java.lang.Object

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

      • CeaParameter

        public CeaParameter​(uk.ac.starlink.task.Parameter<?> taskParam)
        Constructor.
        Parameters:
        taskParam - parameter within the ttools/task parameter system
    • Method Detail

      • getName

        public java.lang.String getName()
        Returns this parameter's name.
        Returns:
        parameter name
      • getDescription

        public java.lang.String getDescription()
        Returns this parameter's description.
        Returns:
        parameter description
      • getSummary

        public java.lang.String getSummary()
        Returns a one-line summary of this parameter's purpose.
        Returns:
        summary
      • getType

        public java.lang.String getType()
        Returns the CEA type (CmdLineParameterDef/type) of this parameter.
        Returns:
        CEA type
      • isOutput

        public boolean isOutput()
        Returns whether this parameter is an output parameter in the CEA sense.
        Returns:
        true iff this parameter is for output
      • setOutput

        public void setOutput​(boolean isOutput)
      • setRef

        public void setRef​(boolean isRef)
      • isRef

        public boolean isRef()
        Returns whether this parameter is a CEA 'reference' parameter (points to a file).
        Returns:
        true iff this is a file reference parameter
      • isMulti

        public boolean isMulti()
        Returns whether this parameter can be specified multiple times on the command line.
        Returns:
        true iff this parameter is multiple
      • isNullPermitted

        public boolean isNullPermitted()
        Returns whether null is a permitted value for this parameter.
        Returns:
        true iff null is legal
      • getDefault

        public java.lang.String getDefault()
        Returns the default value of this parameter if there is one.
        Returns:
        default value, or null
      • getOptions

        public java.lang.String[] getOptions()
        Returns an array of permitted options if there is one.
        Returns:
        array of sole permitted values, or null
      • truncateDescription

        public void truncateDescription()
        Truncates this parameter's description to its first sentence. This is a hack which (with luck) has the effect of cutting out bits of the parameter description which are not relevant to CEA use.