gov.usda.gdpc.xml
Class AbstractXMLDocument

java.lang.Object
  extended bygov.usda.gdpc.xml.AbstractXMLDocument
All Implemented Interfaces:
XMLDocument
Direct Known Subclasses:
XMLDBElementGroup, XMLGenericTable

public class AbstractXMLDocument
extends java.lang.Object
implements XMLDocument

Author:
terryc

Field Summary
static java.lang.String EMPTY_STRING
           
protected  java.util.List myColumnList
           
protected  int myCount
           
protected  java.util.Map myDBElementsMap
           
protected  org.w3c.dom.Document myDocument
           
protected  java.util.Map myIDs
           
protected  java.lang.String myPoundString
           
protected  java.util.List myRowList
           
static java.lang.String POUND_SIGN
           
 
Constructor Summary
AbstractXMLDocument()
          AbstractXMLDocument Constructor.
AbstractXMLDocument(boolean usePoundSign)
          AbstractXMLDocument Constructor.
AbstractXMLDocument(java.io.File file)
          AbstractXMLDocument Constructor.
AbstractXMLDocument(java.lang.String filename)
          AbstractXMLDocument Constructor.
 
Method Summary
protected  org.w3c.dom.Element createDBElement(DBElement element)
           
protected  void createProperties(java.lang.String subType, java.lang.Object value, org.w3c.dom.Element properties)
           
protected  org.w3c.dom.Element createTableDBElement(DBElement element)
           
protected  AlleleList getAlleleList(org.w3c.dom.Node node)
           
protected  DBElement getDBElement(org.w3c.dom.Element node)
           
protected  java.util.List getDBElements(org.w3c.dom.Element groupNode, GDPCTag groupTag)
           
 org.w3c.dom.Document getDocument()
          Returns the DOM document.
protected  Identifier getIdentifier(org.w3c.dom.Node node)
           
protected  java.util.Map getProperties(org.w3c.dom.Node node, GDPCTag parentTag)
           
static java.lang.String getTextFromNode(org.w3c.dom.Node node)
           
 void write(java.lang.String filename)
          Writes this XML document to the specified file.
 void write(java.io.Writer writer)
          Writes this XML document to the specified writer.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

EMPTY_STRING

public static final java.lang.String EMPTY_STRING
See Also:
Constant Field Values

POUND_SIGN

public static final java.lang.String POUND_SIGN
See Also:
Constant Field Values

myDocument

protected org.w3c.dom.Document myDocument

myCount

protected int myCount

myIDs

protected java.util.Map myIDs

myRowList

protected java.util.List myRowList

myColumnList

protected java.util.List myColumnList

myDBElementsMap

protected java.util.Map myDBElementsMap

myPoundString

protected java.lang.String myPoundString
Constructor Detail

AbstractXMLDocument

public AbstractXMLDocument(java.lang.String filename)
AbstractXMLDocument Constructor.


AbstractXMLDocument

public AbstractXMLDocument(java.io.File file)
AbstractXMLDocument Constructor.


AbstractXMLDocument

public AbstractXMLDocument(boolean usePoundSign)
AbstractXMLDocument Constructor.


AbstractXMLDocument

public AbstractXMLDocument()
AbstractXMLDocument Constructor.

Method Detail

createTableDBElement

protected org.w3c.dom.Element createTableDBElement(DBElement element)

createProperties

protected void createProperties(java.lang.String subType,
                                java.lang.Object value,
                                org.w3c.dom.Element properties)

createDBElement

protected org.w3c.dom.Element createDBElement(DBElement element)

getDBElements

protected java.util.List getDBElements(org.w3c.dom.Element groupNode,
                                       GDPCTag groupTag)

getDBElement

protected DBElement getDBElement(org.w3c.dom.Element node)

getProperties

protected java.util.Map getProperties(org.w3c.dom.Node node,
                                      GDPCTag parentTag)

getAlleleList

protected AlleleList getAlleleList(org.w3c.dom.Node node)

getIdentifier

protected Identifier getIdentifier(org.w3c.dom.Node node)

getTextFromNode

public static java.lang.String getTextFromNode(org.w3c.dom.Node node)

write

public void write(java.lang.String filename)
Writes this XML document to the specified file.

Specified by:
write in interface XMLDocument
Parameters:
filename - name of file

getDocument

public org.w3c.dom.Document getDocument()
Returns the DOM document.

Specified by:
getDocument in interface XMLDocument
Returns:
document

write

public void write(java.io.Writer writer)
Writes this XML document to the specified writer.

Specified by:
write in interface XMLDocument
Parameters:
writer - writer