Class UsageWriter


  • public class UsageWriter
    extends java.lang.Object
    Write usage paragraphs specific to the STILTS tasks. This class is designed to be used from its main method.
    Since:
    17 Aug 2005
    Author:
    Mark Taylor
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static void main​(java.lang.String[] args)
      Writes a file called taskname-summary.xml for each of the tasks in STILTS.
      static java.lang.String xmlItem​(uk.ac.starlink.task.Parameter<?> param, java.lang.String baseId, boolean isBasic)
      Returns a list item (dt/dd pair) for a parameter giving its usage and description.
      • Methods inherited from class java.lang.Object

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

      • xmlItem

        public static java.lang.String xmlItem​(uk.ac.starlink.task.Parameter<?> param,
                                               java.lang.String baseId,
                                               boolean isBasic)
        Returns a list item (dt/dd pair) for a parameter giving its usage and description.

        If a non-null baseId is supplied, the output dt element is written with an id attribute of the form baseId-paramName.

        Parameters:
        param - parameter
        baseId - prefix to parameter name for use in generating id attribute, or null for no id
        isBasic - if true, avoid adding XML constructs which won't be evident (and may cause parsing trouble) in plain text output
        Returns:
        XML snippet for param
      • main

        public static void main​(java.lang.String[] args)
                         throws java.io.IOException,
                                uk.ac.starlink.util.LoadException
        Writes a file called taskname-summary.xml for each of the tasks in STILTS. This contains a basic usage summary with some surrounding XML boilerplate.
        Throws:
        java.io.IOException
        uk.ac.starlink.util.LoadException