org.owasp.orizon.xml
Class Reader

java.lang.Object
  extended by org.owasp.orizon.O
      extended by 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

Field Summary
protected  org.w3c.dom.Document doc
           
protected  javax.xml.parsers.DocumentBuilder docBuilder
           
protected  javax.xml.parsers.DocumentBuilderFactory docBuilderFactory
           
protected  boolean readFlag
           
protected  boolean result_ready
           
protected  java.lang.String xmlFilename
           
 
Fields inherited from class org.owasp.orizon.O
base64, hasName, initialized, line_start, line_stop, log, reduced, what
 
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...
 
Method Summary
 boolean areResultsReady()
           
 boolean clean()
           
 boolean dispose()
           
protected  org.w3c.dom.Document getDocumentRoot()
           
 java.lang.String getXmlFilename()
           
protected  boolean isGoodDocumentRoot(java.lang.String expectedTag)
           
protected  boolean isSupported(java.lang.String version)
          Check if this version of Orizon supports this file XML
abstract  boolean read()
           
 boolean readCalled()
           
 boolean readXmlNode(org.w3c.dom.Node n)
          As far from version 0.62 all items must be responsible for XML Node reading routine.
 
Methods inherited from class org.owasp.orizon.O
clone, getStartLine, getStopLine, isCompatible, isInitialized, setStartLine, setStopLine, trackThis
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

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
Constructor Detail

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.
Method Detail

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.