|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectealet.XMLer
public class XMLer
This class is responsible in transforming the calendar, which is in linked list form, to XML. It does so, manually; that is, the structure and elements are hard-coded. If there is any change in the calendar data structure, it will be affected; may be rendering it non-functional.
Constructor Summary | |
---|---|
XMLer()
|
Method Summary | |
---|---|
void |
elementContent(int indentLevel,
java.lang.String content)
Places the contents with proper indentation and appends it to the XML document. |
void |
endElement(int indentLevel,
java.lang.String elem)
Creates the end tag for an element with proper indentation and appends it to the XML document. |
java.lang.String |
makeIndent(int indentLevel)
Makes concatinated blank space for indentation |
void |
startElement(int indentLevel,
java.lang.String elem)
Builds the begin element including attributes if the element has any and appends it to the XML document. |
void |
startElement(int indentLevel,
java.lang.String elem,
java.lang.String att,
java.lang.String attValue)
Builds the begin element including attributes if the element has any and appends it to the XML document. |
void |
to(java.lang.String fileName)
Writes the document to a file |
void |
transform(java.util.LinkedList[] calendarYear,
java.lang.String propertyFolder)
Transforms calendar to XML document. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public XMLer()
Method Detail |
---|
public void transform(java.util.LinkedList[] calendarYear, java.lang.String propertyFolder)
calendarYear
- A linked list consisting of Ethiopian calendarpropertyFolder
- A context pathpublic java.lang.String makeIndent(int indentLevel)
indentLevel
- How deep the indent should be
public void startElement(int indentLevel, java.lang.String elem)
indentLevel
- How deep the indent should beelem
- The name of the elementpublic void startElement(int indentLevel, java.lang.String elem, java.lang.String att, java.lang.String attValue)
indentLevel
- How deep the indent should beelem
- The name of the elementatt
- The name of the attributeattValue
- The value assigned to the attributepublic void elementContent(int indentLevel, java.lang.String content)
indentLevel
- How deep the indent should becontent
- The actual datapublic void endElement(int indentLevel, java.lang.String elem)
indentLevel
- How deep the indent should beelem
- The name of the elementpublic void to(java.lang.String fileName) throws java.io.IOException
fileName
- A target file in which content is written
java.io.IOException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |