public class QSEFromXML
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
protected org.w3c.dom.Document |
doc |
protected org.xml.sax.InputSource |
inputSource |
protected java.io.InputStream |
inputStream |
protected java.lang.String |
uri |
protected java.io.File |
xmlFile |
Constructor and Description |
---|
QSEFromXML(java.io.File file)
Get the structure from an xml file defined in a file.
|
QSEFromXML(org.xml.sax.InputSource source)
Get the structure from an input source.
|
QSEFromXML(java.io.InputStream stream)
Get the structure from an input stream.
|
QSEFromXML(java.lang.String uri)
Get the structure from an input source.
|
Modifier and Type | Method and Description |
---|---|
protected void |
executeTest(AoSession aoSession) |
AoSession |
getAoSession()
Get the session.
|
org.w3c.dom.Element |
getFirstNodeOf(java.lang.String name)
Get the first named node from DOM.
|
QueryStructureExt |
getQueryStructureExt(ApplicationStructure asObj)
Get the query structure.
|
static void |
main(java.lang.String[] args)
The main testing method.
|
protected org.w3c.dom.Document |
parse()
Parse the file.
|
void |
resetOutputStreams()
Reset output streams.
|
void |
setOutputStreams()
Set output streams.
|
static void |
test(AoSession aoSession,
java.io.InputStream stream)
Test the methods.
|
static void |
test(java.io.InputStream stream)
Test the methods.
|
protected java.io.File xmlFile
protected java.io.InputStream inputStream
protected org.xml.sax.InputSource inputSource
protected java.lang.String uri
protected org.w3c.dom.Document doc
public QSEFromXML(java.lang.String uri) throws javax.xml.parsers.ParserConfigurationException, org.xml.sax.SAXException, java.io.FileNotFoundException, java.io.IOException
stream
- the input sourcejavax.xml.parsers.ParserConfigurationException
org.xml.sax.SAXException
java.io.FileNotFoundException
java.io.IOException
DocumentBuilder.parse(java.lang.String)
public QSEFromXML(org.xml.sax.InputSource source) throws javax.xml.parsers.ParserConfigurationException, org.xml.sax.SAXException, java.io.FileNotFoundException, java.io.IOException
stream
- the input sourcejavax.xml.parsers.ParserConfigurationException
org.xml.sax.SAXException
java.io.FileNotFoundException
java.io.IOException
DocumentBuilder.parse(org.xml.sax.InputSource)
public QSEFromXML(java.io.InputStream stream) throws javax.xml.parsers.ParserConfigurationException, org.xml.sax.SAXException, java.io.FileNotFoundException, java.io.IOException
stream
- the input streamjavax.xml.parsers.ParserConfigurationException
org.xml.sax.SAXException
java.io.FileNotFoundException
java.io.IOException
DocumentBuilder.parse(java.io.InputStream)
public QSEFromXML(java.io.File file) throws javax.xml.parsers.ParserConfigurationException, org.xml.sax.SAXException, java.io.FileNotFoundException, java.io.IOException
file
- the filejavax.xml.parsers.ParserConfigurationException
org.xml.sax.SAXException
java.io.FileNotFoundException
java.io.IOException
DocumentBuilder.parse(java.io.File)
protected org.w3c.dom.Document parse() throws javax.xml.parsers.ParserConfigurationException, org.xml.sax.SAXException, java.io.FileNotFoundException, java.io.IOException
javax.xml.parsers.ParserConfigurationException
org.xml.sax.SAXException
java.io.FileNotFoundException
java.io.IOException
public org.w3c.dom.Element getFirstNodeOf(java.lang.String name)
public QueryStructureExt getQueryStructureExt(ApplicationStructure asObj) throws QueryStructureGeneratorException
asObj
- the application structure.QueryStructureGeneratorException
public AoSession getAoSession() throws QueryStructureGeneratorException
QueryStructureGeneratorException
public void resetOutputStreams()
public void setOutputStreams() throws java.lang.Exception
java.lang.Exception
public static void test(java.io.InputStream stream) throws java.lang.Exception
java.lang.Exception
public static void test(AoSession aoSession, java.io.InputStream stream) throws java.lang.Exception
java.lang.Exception
protected void executeTest(AoSession aoSession) throws AoException, QueryStructureGeneratorException
public static void main(java.lang.String[] args)
This method understand a filename as argument and tries to use it as an XML input file.