Package uk.ac.starlink.ttools.plot2.data
Class InputMeta
java.lang.Object
uk.ac.starlink.ttools.plot2.data.InputMeta
Contains user-directed metadata to describe
user-supplied input data coordinate values used for plots.
A number of the setter methods return this object, to facilitate declarations where method invocations are chained so that the configured metadata object can be returned in a single expression rather than multiple statements (cf StringBuffer).
- Since:
- 12 Sep 2014
- Author:
- Mark Taylor
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns a potentially more descriptive name suitable for use in a GUI.Returns a short description string.Returns the basic one-word name, not case-sensitive, for use in command-line interfaces.Returns a a short usage fragment that describes the form of the data values represented by this coordinate.Returns an XML string suitable for insertion into a user document.setShortDescription
(String shortDescription) Sets a short description string.setValueUsage
(String usage) Sets a usage string which should give some clue how to specify this key from a string.setXmlDescription
(String xmlDescription) Sets a documentation string.setXmlDescription
(String[] lines) Convenience method to set the XML description from an array of text lines.
-
Constructor Details
-
InputMeta
Constructor.- Parameters:
shortName
- basic name, no spaces, not case-sensitive, to be used in command-line interfacelongName
- name for use in GUI
-
-
Method Details
-
getShortName
Returns the basic one-word name, not case-sensitive, for use in command-line interfaces.- Returns:
- short name
-
getLongName
Returns a potentially more descriptive name suitable for use in a GUI.- Returns:
- long name
-
getValueUsage
Returns a a short usage fragment that describes the form of the data values represented by this coordinate.Examples might be something like "
deg
" or "boolean
";- Returns:
- usage fragment
-
getShortDescription
Returns a short description string.- Returns:
- one-line description
-
getXmlDescription
Returns an XML string suitable for insertion into a user document. It should be a sequence of one or more <p> elements. If null, the short description can be used instead.- Returns:
- XML string, or null
-
setValueUsage
Sets a usage string which should give some clue how to specify this key from a string.Examples might be something like "
float
" or "boolean
";- Parameters:
usage
- usage string- Returns:
- this object, as a convenience
-
setShortDescription
Sets a short description string. This may be used as a prompt on the command line or a tooltip in a GUI. It should preferably be no longer than about 40 characters.- Parameters:
shortDescription
- one-line description- Returns:
- this object, as a convenience
-
setXmlDescription
Sets a documentation string. This is written in XML, intended for presentation as user documentation. The whole thing should be one or more <p> elements.Permissible elements include p, ul, li, dl, dt, dd, em, code, strong. Lists go inside paragraphs.
- Parameters:
xmlDescription
- documentation string- Returns:
- this object, as a convenience
-
setXmlDescription
Convenience method to set the XML description from an array of text lines.setXmlDescription
is called on the result of joining the lines with newline characters.- Parameters:
lines
- lines of documentation string- Returns:
- this object, as a convenience
-