|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectmodel.XMLFactory
public class XMLFactory
Helper class for XMLFile
Constructor Summary | |
---|---|
XMLFactory()
|
Method Summary | |
---|---|
protected static org.w3c.dom.Element |
createDiscountElement(org.w3c.dom.Document doc,
Discount discount)
Creates an XML element with subelements that can be used to store data from a Discount object |
protected static org.w3c.dom.Element |
createEntryElement(org.w3c.dom.Document doc,
Entry entry)
Creates an XML element with subelements that can be used to store data from an Entry object |
protected static org.w3c.dom.Document |
createXMLDataDocument()
Creates an empty XML data document with the correct element structure |
protected static org.w3c.dom.Document |
createXMLDataDocument(java.io.File xml_file)
Creates an XML document based on a XML document file |
protected static org.w3c.dom.Element[] |
getSubElements(org.w3c.dom.Element element,
java.lang.String... sub_element_names)
Returns a descendant of the parameter 'element'. |
protected static java.lang.String |
getSubElementText(org.w3c.dom.Element element,
java.lang.String... sub_element_names)
Returns the sub element text content of a descendant of the parameter 'element'. |
protected static Entry |
parseEntry(org.w3c.dom.Element entry_elem,
EntryInitializer initializer)
Creates a new Entry object from the entry XML element |
protected static org.w3c.dom.Element |
removeElement(org.w3c.dom.Element element)
Removes an XML element from a document. |
protected static java.lang.String |
setSubElementText(org.w3c.dom.Element element,
java.lang.String new_text,
java.lang.String... sub_element_names)
Sets the sub element text content of a descendant of the parameter 'element'. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public XMLFactory()
Method Detail |
---|
protected static org.w3c.dom.Element createEntryElement(org.w3c.dom.Document doc, Entry entry)
doc
- parent documententry
- the entry to be stored
protected static org.w3c.dom.Element createDiscountElement(org.w3c.dom.Document doc, Discount discount)
doc
- parent documentdiscount
- the discount to be stored
protected static Entry parseEntry(org.w3c.dom.Element entry_elem, EntryInitializer initializer) throws GoException
entry_elem
- XML elementinitializer
- used to set the data of the new entry
GoException
- throw if the initializer can't be readprotected static org.w3c.dom.Document createXMLDataDocument(java.io.File xml_file) throws XMLParsingException
xml_file
- XML data file
XMLParsingException
protected static org.w3c.dom.Document createXMLDataDocument() throws GoException
GoException
protected static java.lang.String getSubElementText(org.w3c.dom.Element element, java.lang.String... sub_element_names)
protected static java.lang.String setSubElementText(org.w3c.dom.Element element, java.lang.String new_text, java.lang.String... sub_element_names)
protected static org.w3c.dom.Element[] getSubElements(org.w3c.dom.Element element, java.lang.String... sub_element_names)
protected static org.w3c.dom.Element removeElement(org.w3c.dom.Element element)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |