|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.text.Format
net.sf.fikin.pojostate.StateFormat
net.sf.fikin.pojostate.format.PropertiesStateFormat
net.sf.fikin.pojostate.format.XmlStateFormat
public class XmlStateFormat
Print a State object in an XML format.
XML schema is located at TODO created on Mar 7, 2007
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class java.text.Format |
|---|
java.text.Format.Field |
| Field Summary | |
|---|---|
static java.lang.String |
NS_PS_URI
namespace of pojo-state XSD |
| Constructor Summary | |
|---|---|
XmlStateFormat()
|
|
| Method Summary | |
|---|---|
void |
format(java.lang.Object obj,
java.lang.Object out)
format the object as an XML output. |
void |
format(State state,
org.xml.sax.ContentHandler out)
TODO Output stream is not closed! |
void |
format(State state,
java.io.PrintWriter out)
TODO Output stream is not closed! |
java.lang.String |
getXmlStylesheetType()
|
java.lang.String |
getXmlStylesheetURI()
|
boolean |
isPrintStartEndDoc()
if set to true it will call ContentHandler.startDocument()
and ContentHandler.endDocument() prior and after printing. |
boolean |
isPrintXmlStylesheet()
|
void |
printFooter(State state,
org.xml.sax.ContentHandler out)
TODO |
void |
printHeader(State state,
org.xml.sax.ContentHandler out)
TODO |
void |
printProperty(Property property,
org.xml.sax.ContentHandler out)
TODO |
protected void |
printTag(java.lang.String uri,
java.lang.String localName,
java.lang.String qName,
org.xml.sax.Attributes attrs,
java.lang.String data,
org.xml.sax.ContentHandler out)
TODO |
void |
setPrintStartEndDoc(boolean printStartEndDoc)
|
void |
setPrintXmlStylesheet(boolean printXsltInstruction)
if set to true it will print "xslt" xml-instruction at the beginning of printing. |
void |
setXmlStylesheetType(java.lang.String xmlStylesheetType)
set the xml stylesheet type it requires isPrintXmlStylesheet() to be true. |
void |
setXmlStylesheetURI(java.lang.String xmlStylesheetURI)
set the xml stylesheet URI it requires isPrintXmlStylesheet() to be true. |
| Methods inherited from class net.sf.fikin.pojostate.format.PropertiesStateFormat |
|---|
format, parseObject, printFooter, printHeader, printProperty |
| Methods inherited from class java.text.Format |
|---|
clone, format, formatToCharacterIterator, parseObject |
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final java.lang.String NS_PS_URI
| Constructor Detail |
|---|
public XmlStateFormat()
| Method Detail |
|---|
public java.lang.String getXmlStylesheetType()
setXmlStylesheetType(String)public void setXmlStylesheetType(java.lang.String xmlStylesheetType)
it requires isPrintXmlStylesheet() to be true.
xmlStylesheetType - The xmlStylesheetType to set.public java.lang.String getXmlStylesheetURI()
setXmlStylesheetURI(String)public void setXmlStylesheetURI(java.lang.String xmlStylesheetURI)
it requires isPrintXmlStylesheet() to be true.
xmlStylesheetURI - The xmlStylesheetURI to set.public boolean isPrintStartEndDoc()
ContentHandler.startDocument()
and ContentHandler.endDocument() prior and after printing.
public void setPrintStartEndDoc(boolean printStartEndDoc)
printStartEndDoc - The printStartEndDoc to set.setPrintStartEndDoc(boolean)public boolean isPrintXmlStylesheet()
setPrintXmlStylesheet(boolean)public void setPrintXmlStylesheet(boolean printXsltInstruction)
it requires isPrintStartEndDoc() to be true as well.
printXsltInstruction - The printXsltInstruction to set.
public void format(java.lang.Object obj,
java.lang.Object out)
throws java.lang.IllegalArgumentException,
java.io.IOException
If output is not of type org.xml.sax.ContentHandler it
fails to default implementation provided by
PropertiesStateFormat.format(Object, Object).
Some of the printed XML properties (like directives, start-end document and such) can be influenced by th setter methods of this class.
format in class PropertiesStateFormatobj - to formatout - to print to
java.lang.IllegalArgumentException
java.io.IOException - in case when writting to output object failed
public void format(State state,
java.io.PrintWriter out)
throws java.io.IOException
Output stream is not closed!
format in class PropertiesStateFormatstate - out -
java.io.IOException
public void format(State state,
org.xml.sax.ContentHandler out)
throws java.io.IOException
Output stream is not closed!
state - out -
java.io.IOException
public void printHeader(State state,
org.xml.sax.ContentHandler out)
throws org.xml.sax.SAXException
state - out -
org.xml.sax.SAXException
public void printFooter(State state,
org.xml.sax.ContentHandler out)
throws org.xml.sax.SAXException
state - out -
org.xml.sax.SAXException
public void printProperty(Property property,
org.xml.sax.ContentHandler out)
throws org.xml.sax.SAXException
property - out -
org.xml.sax.SAXException
protected void printTag(java.lang.String uri,
java.lang.String localName,
java.lang.String qName,
org.xml.sax.Attributes attrs,
java.lang.String data,
org.xml.sax.ContentHandler out)
throws org.xml.sax.SAXException
uri - localName - qName - attrs - data - out -
org.xml.sax.SAXException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||