|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectnet.sundog.hoople.BaseParser
net.sundog.hoople.BaseXMLGeneratingParser
A convenient super class for HooperParsers that take the XML in the URL Config file and insert it into a new XML file.
| Constructor Summary | |
protected |
BaseXMLGeneratingParser(java.lang.String configSectionParentTagName)
|
| Method Summary | |
protected void |
addElementToBase(org.w3c.dom.Element element)
|
void |
endElement(java.lang.String uri,
java.lang.String localName,
java.lang.String qName,
java.lang.String elementText,
java.io.File file,
java.io.File documentRoot)
Override this method with things to do when the URLConfigParser finds the end of an element and isActive() returns true. |
protected void |
finalizeElement(org.w3c.dom.Element element)
Called after the element has been copied from the URL Configuration. |
java.io.File |
getBaseFile()
The orginal XML file that will have elements added to it. |
org.w3c.dom.Document |
getBaseFileDOM()
Returns the baseFile's DOM tree. |
java.io.File |
getFinalFile()
The final XML file with elements from the URL Confings. |
protected abstract org.w3c.dom.Element |
getParentConfigElement(org.w3c.dom.Document baseAsDOM)
Return the element for which all generated Elements should be appended to. |
boolean |
isCheckVCSIgnore()
|
boolean |
isVCSIgnoreSet()
Most of the time, you don't want your generated final file to be checked into your source control system. |
void |
setActive(java.lang.String uri,
java.lang.String localName,
java.lang.String qName,
org.xml.sax.Attributes attributes)
Called at the start and end of all tags to let this parser opt-in or out of having its startElelment and endElement methods called. |
void |
setBaseFile(java.io.File baseFile)
|
void |
setCheckVCSIgnore(boolean checkVCSIgnore)
|
void |
setFinalFile(java.io.File finalFile)
|
void |
startElement(java.lang.String uri,
java.lang.String localName,
java.lang.String qName,
org.xml.sax.Attributes attributes,
java.io.File urlConfigFile,
java.io.File documentRoot)
Override this method with things to do when the URLConfigParser finds the start of an element and isActive() returns true. |
void |
writeFinalFile()
Write the final file to the file system. |
| Methods inherited from class net.sundog.hoople.BaseParser |
convertToAbsolutePath, getDocumentBuilder, getUrlConfigurationParser, isActive, setActive, setDocumentBuilder, setUrlConfigurationParser |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
protected BaseXMLGeneratingParser(java.lang.String configSectionParentTagName)
| Method Detail |
public java.io.File getBaseFile()
public void setBaseFile(java.io.File baseFile)
public java.io.File getFinalFile()
public void setFinalFile(java.io.File finalFile)
public org.w3c.dom.Document getBaseFileDOM()
throws org.xml.sax.SAXException,
java.io.IOException
org.xml.sax.SAXException
java.io.IOException
public void writeFinalFile()
throws java.io.IOException,
org.xml.sax.SAXException
java.io.IOException
org.xml.sax.SAXExceptionpublic boolean isCheckVCSIgnore()
public void setCheckVCSIgnore(boolean checkVCSIgnore)
public boolean isVCSIgnoreSet()
throws java.io.IOException
java.io.IOException
public void startElement(java.lang.String uri,
java.lang.String localName,
java.lang.String qName,
org.xml.sax.Attributes attributes,
java.io.File urlConfigFile,
java.io.File documentRoot)
throws org.xml.sax.SAXException,
java.io.IOException
BaseParser
startElement in class BaseParserorg.xml.sax.SAXException
java.io.IOException
public void endElement(java.lang.String uri,
java.lang.String localName,
java.lang.String qName,
java.lang.String elementText,
java.io.File file,
java.io.File documentRoot)
throws org.xml.sax.SAXException
BaseParser
endElement in class BaseParserorg.xml.sax.SAXException
protected void addElementToBase(org.w3c.dom.Element element)
throws org.xml.sax.SAXException
org.xml.sax.SAXException
public void setActive(java.lang.String uri,
java.lang.String localName,
java.lang.String qName,
org.xml.sax.Attributes attributes)
throws org.xml.sax.SAXException
BaseParser
setActive in class BaseParserorg.xml.sax.SAXException
protected void finalizeElement(org.w3c.dom.Element element)
throws java.io.IOException,
org.xml.sax.SAXException
java.io.IOException
org.xml.sax.SAXExceptionprotected abstract org.w3c.dom.Element getParentConfigElement(org.w3c.dom.Document baseAsDOM)
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||