|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.sourceforge.ifx.utils.IFXDocumentHandler
The IFXDocumentHandler provides methods for formatting and validating IFX XML Documents.
Field Summary | |
static java.lang.String |
DEFAULT_LINE_SEPARATOR
System default Line separator string. |
Constructor Summary | |
IFXDocumentHandler()
|
Method Summary | |
static org.jdom.Document |
build(IFXObject obj,
java.lang.String namespacePrefix,
java.lang.String namespaceURI)
Builds a JDOM Document object from an IFXObject. |
static IFXObject |
parse(org.jdom.Document doc)
Parses a Document object into an IFXObject. |
static org.jdom.Document |
read(java.io.InputStream istream,
boolean validate,
java.util.Map validationProperties)
Reads an XML stream from the specified InputStream and returns a JDOM Document object. |
static void |
write(org.jdom.Document doc,
int indentSize,
java.lang.String lineSeparator,
java.io.OutputStream ostream)
Writes a Document object to the specified output stream. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final java.lang.String DEFAULT_LINE_SEPARATOR
Constructor Detail |
public IFXDocumentHandler()
Method Detail |
public static org.jdom.Document build(IFXObject obj, java.lang.String namespacePrefix, java.lang.String namespaceURI) throws IFXException
obj
- the IFXObject object to format.namespacePrefix
- the namespace prefix to use in the output. A
value of null implies no prefix. If the namespaceURI is specified it
will be treated as the default namespace.namespaceURI
- the namespace URI to use in the output. If specified
an xmlns declaration will be prepended to the output.
IFXException
- if there was a problem building the document.public static void write(org.jdom.Document doc, int indentSize, java.lang.String lineSeparator, java.io.OutputStream ostream) throws IFXException
doc
- a JDOM Document object.indentSize
- the size of the indent in the output. A value of
zero implies no indentation.lineSeparator
- the line separator for the output. A value of
null implies no line separators and no newlines in the output. To use
the system default, use DEFAULT_LINE_SEPARATOR.ostream
- the OutputStream to write the formatted output to.
IFXException
- if there was a problem writing the Document.public static IFXObject parse(org.jdom.Document doc) throws IFXException
doc
- the JDOM Document object to parse.
IFXException
- if any problems were encountered in parsing.public static org.jdom.Document read(java.io.InputStream istream, boolean validate, java.util.Map validationProperties) throws IFXException
istream
- the InputStream to read from.validate
- XML is validated against schema if true.validationProperties
- a Map of name value pairs specifying
the schema and the namespaces to validate against.
IFXExveption
- if there was a problem reading the document.
IFXException
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |