# Class ServiceCeaWriter

java.lang.Object
uk.ac.starlink.util.XmlWriter
uk.ac.starlink.ttools.cea.CeaWriter
uk.ac.starlink.ttools.cea.ServiceCeaWriter

public class ServiceCeaWriter extends CeaWriter
CeaWriter implementation which writes a registry record document describing a CEA Service instance. This is what is submitted to the registry to define the service.

Since:
  2 Nov 2007
Author:
  Mark Taylor

## Field Summary

Fields
Modifier and Type
Field
Description
`static final String`
`SCHEMA_LOCATION`

## Constructor Summary

Constructors
Constructor
Description
`ServiceCeaWriter(PrintStream out, CeaTask[] tasks, CeaMetadata meta, boolean redirects, String cmdline)`
Constructor.

## Method Summary

Modifier and Type
Method
Description
`int`
`configure(String[] args)`
Hook for additional configuration of concrete subclasses using command-line flags.
`String`
`getSchemaLocation()`
Returns the URL of the schema to which the output of this object conforms.
`static String`
`getUsage()`
`protected void`
`writeContent()`
Performs the implementation-specific output of XML elements.

### Methods inherited from class CeaWriter

`endElement, main, startElement, startElement, writeDocument, writeInterfaces, writeParameters`

### Methods inherited from class uk.ac.starlink.util.XmlWriter

`addElement, endElement, formatAttribute, formatText, getIndent, getLevel, print, println, setOut, startElement, startElement, writeDeclaration`

### Methods inherited from class Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Field Details

### SCHEMA_LOCATION

public static final String SCHEMA_LOCATION

See Also:
  - Constant Field Values

## Constructor Details

### ServiceCeaWriter

public ServiceCeaWriter(PrintStream out, CeaTask[] tasks, CeaMetadata meta, boolean redirects, String cmdline)
Constructor.

Parameters:
  `out` - output stream for XML
  `tasks` - list of tasks to be described by the output
  `meta` - application description metadata object
  `redirects` - true iff you want stdout/stderr parameters for standard output/error redirection
  `cmdline` - command line string, used for logging within the output only

## Method Details

### getUsage

public static String getUsage()

### configure

public int configure(String[] args)
Description copied from class: `CeaWriter`
Hook for additional configuration of concrete subclasses using command-line flags.

Specified by:
  `configure` in class `CeaWriter`
Parameters:
  `args` - array of command-line arguments all of which are directed at this object (any generic ones will have been removed)
Returns:
  0 for success, otherwise an error status

### writeContent

protected void writeContent() throws SAXException
Description copied from class: `CeaWriter`
Performs the implementation-specific output of XML elements. Invoked by `CeaWriter.writeDocument()`; presumably invokes `CeaWriter.writeParameters()` and `CeaWriter.writeInterfaces()`.

Specified by:
  `writeContent` in class `CeaWriter`
Throws:
  `SAXException`

### getSchemaLocation

public String getSchemaLocation()
Description copied from class: `CeaWriter`
Returns the URL of the schema to which the output of this object conforms.

Specified by:
  `getSchemaLocation` in class `CeaWriter`
Returns:
  validation schema location