uk.ac.starlink.ast.xml
Class XAstWriter

java.lang.Object
  extended by uk.ac.starlink.ast.xml.XAstWriter

public class XAstWriter
extends Object

Provides convenience methods for serializing AstObjects to XML. The hard work is done by XmlChan.

Author:
Mark Taylor (Starlink)

Constructor Summary
XAstWriter()
           
 
Method Summary
 XmlChan getXmlChan()
          Returns the XmlChan used by this writer.
 Element makeElement(AstObject obj)
          Turns an AstObject into an Element.
 Source makeSource(AstObject obj)
          Turns an AstObject into an XML Source.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XAstWriter

public XAstWriter()
Method Detail

getXmlChan

public XmlChan getXmlChan()
Returns the XmlChan used by this writer. Its attributes may be modified to affect the details of the XML that is written.

Returns:
channel object

makeElement

public Element makeElement(AstObject obj)
Turns an AstObject into an Element.

Parameters:
obj - the AstObject to be serialised
Returns:
an Element representing obj

makeSource

public Source makeSource(AstObject obj)
Turns an AstObject into an XML Source.

Parameters:
obj - the AstObject to be serialised
Returns:
a Source representing obj


Copyright © 2017 Central Laboratory of the Research Councils. All Rights Reserved.