|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.gcube.data.trees.io.XMLBindings
public class XMLBindings
Static facilities for converting Trees to and from XML representations.
| Field Summary | |
|---|---|
static QName |
ID
|
static QName |
SOURCE
|
static QName |
STATE
|
| Constructor Summary | |
|---|---|
XMLBindings()
|
|
| Method Summary | |
|---|---|
static String |
_fromElement(Element element)
|
static Tree |
fromElement(Element element)
Parses a Tree from its XML representation. |
static Tree |
fromStream(InputStream stream)
Parses a Tree from its XML representation. |
static Tree |
fromStream(Reader stream)
Parses a Tree from its XML representation. |
static Tree |
fromString(String xml)
Parses a Tree from its XML representation. |
static Node |
nodeFromElement(Element element)
Parses a Node from its XML representation. |
static Node |
nodeFromStream(InputStream stream)
Parses a Node from its XML representation. |
static Node |
nodeFromStream(Reader stream)
Parses a Node from its XML representation. |
static Node |
nodeFromString(String xml)
Parses a Node from its XML representation. |
static Element |
nodeToElement(Node node)
Converts a Node to its XML representation. |
static Element |
nodeToElement(Node node,
WriteOptions options)
Converts a Node to its XML representation. |
static void |
nodetoStream(Node node,
OutputStream stream)
Converts a Node to its XML representation. |
static void |
nodeToStream(Node node,
OutputStream stream,
WriteOptions options)
Converts a Node to its XML representation. |
static void |
nodeToStream(Node node,
Writer stream)
Converts a Node to its XML representation. |
static void |
nodeToStream(Node node,
Writer stream,
WriteOptions options)
Converts a Node to its XML representation. |
static String |
nodeToString(Node node)
Converts a Node to its XML representation. |
static String |
nodeToString(Node node,
WriteOptions options)
Converts a Node to its XML representation. |
static Element |
toElement(Tree tree)
Converts a Tree to its XML representation. |
static Element |
toElement(Tree tree,
WriteOptions options)
Converts a Tree to its XML representation. |
static void |
toStream(Tree tree,
OutputStream stream)
Converts a Tree to its XML representation. |
static void |
toStream(Tree tree,
OutputStream stream,
WriteOptions options)
Converts a Tree to its XML representation. |
static void |
toStream(Tree tree,
Writer stream)
Converts a Tree to its XML representation. |
static void |
toStream(Tree tree,
Writer stream,
WriteOptions options)
Converts a Tree to its XML representation. |
static String |
toString(Tree tree)
Converts a Tree to its XML representation. |
static String |
toString(Tree tree,
WriteOptions options)
Converts a Tree to its XML representation. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final QName ID
public static final QName STATE
public static final QName SOURCE
| Constructor Detail |
|---|
public XMLBindings()
| Method Detail |
|---|
public static String toString(Tree tree)
Tree to its XML representation.
tree - the tree
RuntimeException - if the conversion failspublic static String nodeToString(Node node)
Node to its XML representation.
node - the node
RuntimeException - if the conversion fails
public static String toString(Tree tree,
WriteOptions options)
Tree to its XML representation.
tree - the treecustom - options for the conversion
RuntimeException - if the conversion fails
public static String nodeToString(Node node,
WriteOptions options)
Node to its XML representation.
node - the nodecustom - options for the conversion
RuntimeException - if the conversion failspublic static Tree fromString(String xml)
Tree from its XML representation.
xml - the XML representation
RuntimeException - if the representation cannot be parsedpublic static Node nodeFromString(String xml)
Node from its XML representation.
xml - the XML representation
RuntimeException - if the representation cannot be parsed
public static void toStream(Tree tree,
Writer stream)
Tree to its XML representation.
tree - the treestream - a stream where to write out the tree representation
RuntimeException - if the conversion fails
public static void nodeToStream(Node node,
Writer stream)
Node to its XML representation.
node - the nodestream - a stream where to write out the node representation
RuntimeException - if the conversion fails
public static void toStream(Tree tree,
Writer stream,
WriteOptions options)
Tree to its XML representation.
tree - the treestream - a stream where to write out the tree representationcustom - options for the conversion
RuntimeException - if the conversion fails
public static void nodeToStream(Node node,
Writer stream,
WriteOptions options)
Node to its XML representation.
node - the nodestream - a stream where to write out the node representationcustom - options for the conversion
RuntimeException - if the conversion failspublic static Tree fromStream(Reader stream)
Tree from its XML representation.
stream - a stream with the XML representation of the tree
RuntimeException - if the representation cannot be parsedpublic static Node nodeFromStream(Reader stream)
Node from its XML representation.
stream - a stream with the XML representation of the node
RuntimeException - if the representation cannot be parsed
public static void toStream(Tree tree,
OutputStream stream)
Tree to its XML representation.
tree - the treestream - a stream where to write out the tree representation
RuntimeException - if the conversion fails
public static void nodetoStream(Node node,
OutputStream stream)
Node to its XML representation.
node - the nodestream - a stream where to write out the node representation
RuntimeException - if the conversion fails
public static void toStream(Tree tree,
OutputStream stream,
WriteOptions options)
Tree to its XML representation.
tree - the treestream - a stream where to write out the tree representationcustom - options for the conversion
RuntimeException - if the conversion fails
public static void nodeToStream(Node node,
OutputStream stream,
WriteOptions options)
Node to its XML representation.
node - the nodestream - a stream where to write out the node representationcustom - options for the conversion
RuntimeException - if the conversion failspublic static Tree fromStream(InputStream stream)
Tree from its XML representation.
stream - a stream with the XML representation of the tree
RuntimeException - if the representation cannot be parsedpublic static Node nodeFromStream(InputStream stream)
Node from its XML representation.
stream - a stream with the XML representation of the node
RuntimeException - if the representation cannot be parsedpublic static Element toElement(Tree tree)
Tree to its XML representation.
Note that this is a derived thus unoptimised conversion, the tree is first converted to an in-memory string-based
tree - the tree
Element of a DOM model of the XML representation
RuntimeException - if the conversion fails
public static Element toElement(Tree tree,
WriteOptions options)
Tree to its XML representation. *
Note that this is a derived thus unoptimised conversion, the tree is first converted to an in-memory string-based
tree - the treecustom - options for the conversion
Element of a DOM model of the XML representation
RuntimeException - if the conversion fails
public static Element nodeToElement(Node node,
WriteOptions options)
Node to its XML representation.
Note that this is a derived thus unoptimised conversion, the node is first converted to an in-memory string-based
node - the nodecustom - options for the conversion
Element of a DOM model of the XML representation
RuntimeException - if the conversion failspublic static Element nodeToElement(Node node)
Node to its XML representation.
Note that this is a derived thus unoptimised conversion, the node is first converted to an in-memory string-based
node - the node
Element of a DOM model of the XML representation
RuntimeException - if the conversion failspublic static Tree fromElement(Element element)
Tree from its XML representation.
Note that this is a derived thus unoptimised conversion, the representation is first converted to a string.
element - the root Element of a DOM model of the XML representation
RuntimeException - if the representation cannot be parsedpublic static Node nodeFromElement(Element element)
Node from its XML representation.
Note that this is a derived thus unoptimised conversion, the representation is first converted to a string.
element - the root Element of a DOM model of the XML representation
RuntimeException - if the representation cannot be parsedpublic static String _fromElement(Element element)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||