org.owasp.orizon.xml
Class Reader
java.lang.Object
org.owasp.orizon.O
org.owasp.orizon.xml.Reader
- Direct Known Subclasses:
- CookBook, Library_to_remove, Recipe, SourceReader
public abstract class Reader
- extends O
This is an abstract for classes reading XML files
- Author:
- sp0nge
Constructor Summary |
Reader(java.lang.String xmlFileName)
Creates a new Reader object |
Reader(java.lang.String xmlFileName,
boolean outSideJar)
Creates a new Reader object
Only used by Source class... |
Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
xmlFilename
protected java.lang.String xmlFilename
result_ready
protected boolean result_ready
docBuilderFactory
protected javax.xml.parsers.DocumentBuilderFactory docBuilderFactory
docBuilder
protected javax.xml.parsers.DocumentBuilder docBuilder
doc
protected org.w3c.dom.Document doc
readFlag
protected boolean readFlag
Reader
public Reader(java.lang.String xmlFileName)
- Creates a new Reader object
- Parameters:
xmlFileName
- the name of the XML file being read.
Reader
public Reader(java.lang.String xmlFileName,
boolean outSideJar)
- Creates a new Reader object
Only used by Source class... it tells the Reader not trying to extract
the XML file from orizon JAR.
- Parameters:
xmlFileName
- the name of the XML file being read.
readCalled
public boolean readCalled()
clean
public boolean clean()
getXmlFilename
public java.lang.String getXmlFilename()
getDocumentRoot
protected org.w3c.dom.Document getDocumentRoot()
read
public abstract boolean read()
areResultsReady
public boolean areResultsReady()
isSupported
protected boolean isSupported(java.lang.String version)
- Check if this version of Orizon supports this file XML
- Parameters:
version
-
- Returns:
isGoodDocumentRoot
protected final boolean isGoodDocumentRoot(java.lang.String expectedTag)
dispose
public final boolean dispose()
readXmlNode
public boolean readXmlNode(org.w3c.dom.Node n)
- Description copied from class:
O
- As far from version 0.62 all items must be responsible for XML Node
reading routine. Source class must be able to instantiate an object
passing XML Node as parameter and having that code read
- Specified by:
readXmlNode
in class O
- Parameters:
n
- the node being read
- Returns:
- true if xml node is well formed and correctly read, or
false otherwise.