uk.ac.starlink.ast.xml
Class XAstReader

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

public class XAstReader
extends Object

Provides convenience methods for reading an AstObject from an XML source. The hard work is done by XmlChan.

Author:
Mark Taylor (Starlink)

Constructor Summary
XAstReader()
           
 
Method Summary
 AstObject makeAst(Element el)
          Constructs an AstObject from an Element.
 AstObject makeAst(Source xsrc)
          Constructs an AstObject from an XML Source.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XAstReader

public XAstReader()
Method Detail

makeAst

public AstObject makeAst(Element el)
                  throws IOException
Constructs an AstObject from an Element.

Parameters:
el - the Element to transform
Returns:
the AstObject constructed from el
Throws:
IOException - if el does not have the correct structure to be an AstObject

makeAst

public AstObject makeAst(Source xsrc)
                  throws IOException
Constructs an AstObject from an XML Source.

Parameters:
xsrc - the XML Source to transform
Returns:
the AstObject constructed from xsrc
Throws:
IOException - if xsrc does not have the right structure to be an AstObject


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