Package | Description |
---|---|
javolution.xml |
Support for the encoding of objects, and the objects reachable from them,
into
XML ; and the complementary reconstruction of the
object graph from XML . |
javolution.xml.stream |
StAX-like XML readers/writers which do not require object
creation (such as String) and are consequently faster than standard StAX.
|
javolution.xml.ws |
Classes and interfaces to create and handle web services.
|
Modifier and Type | Method and Description |
---|---|
void |
XMLFormat.OutputElement.add(Object obj)
Adds the specified object or
null as an anonymous
nested element of unknown type. |
void |
XMLFormat.OutputElement.add(Object obj,
String name)
Adds the specified object as a named nested element of unknown type
(
null objects are ignored). |
void |
XMLFormat.OutputElement.add(Object obj,
String localName,
String uri)
Adds the specified object as a fully qualified nested element of
unknown type (
null objects are ignored). |
<T> void |
XMLFormat.OutputElement.add(T obj,
String name,
Class<T> cls)
Adds the specified object as a named nested element of specified
actual type (
null objects are ignored). |
<T> void |
XMLFormat.OutputElement.add(T obj,
String localName,
String uri,
Class<T> cls)
Adds the specified object as a fully qualified nested element of
specified actual type (
null objects are ignored). |
void |
XMLFormat.OutputElement.addText(CharSequence text)
Adds the content of a text-only element (equivalent to
getStreamWriter().writeCharacters(text) ). |
void |
XMLFormat.OutputElement.addText(String text)
Equivalent to
XMLFormat.OutputElement.addText(CharSequence)
(for J2ME compatibility). |
void |
XMLObjectReader.close()
Closes this reader and its underlying input then
reset
this reader for potential reuse. |
void |
XMLObjectWriter.close()
Ends document writting, closes this writer and its underlying
output then
reset this Writer for potential reuse. |
void |
XMLReferenceResolver.createReference(Object obj,
XMLFormat.InputElement xml)
Creates a reference for the specified object (the identifier
being specified by the input XML element).
|
void |
XMLObjectWriter.flush()
Flushes the output stream of this writer (automatically done
when
closing ). |
<T> T |
XMLFormat.InputElement.get(String name)
Returns the object whose type is identified by a XML class attribute
only if the XML element has the specified local name.
|
<T> T |
XMLFormat.InputElement.get(String name,
Class<T> cls)
Returns the object of specified type only if the XML element has the
specified local name.
|
<T> T |
XMLFormat.InputElement.get(String localName,
String uri)
Returns the object whose type is identified by a XML class attribute
only if the XML element has the specified local name and URI.
|
<T> T |
XMLFormat.InputElement.get(String localName,
String uri,
Class<T> cls)
Returns the object of specified type only if the
XML element has the specified local name and namespace URI.
|
CharArray |
XMLFormat.InputElement.getAttribute(String name)
Searches for the attribute having the specified name.
|
boolean |
XMLFormat.InputElement.getAttribute(String name,
boolean defaultValue)
Returns the specified
boolean attribute. |
byte |
XMLFormat.InputElement.getAttribute(String name,
byte defaultValue)
Returns the specified
byte attribute. |
char |
XMLFormat.InputElement.getAttribute(String name,
char defaultValue)
Returns the specified
char attribute. |
double |
XMLFormat.InputElement.getAttribute(String name,
double defaultValue)
Returns the specified
double attribute. |
float |
XMLFormat.InputElement.getAttribute(String name,
float defaultValue)
Returns the specified
float attribute. |
int |
XMLFormat.InputElement.getAttribute(String name,
int defaultValue)
Returns the specified
int attribute. |
long |
XMLFormat.InputElement.getAttribute(String name,
long defaultValue)
Returns the specified
long attribute. |
short |
XMLFormat.InputElement.getAttribute(String name,
short defaultValue)
Returns the specified
short attribute. |
String |
XMLFormat.InputElement.getAttribute(String name,
String defaultValue)
Returns the specified
String attribute. |
<T> T |
XMLFormat.InputElement.getAttribute(String name,
T defaultValue)
Returns the attribute of same type as the specified
default value.
|
Attributes |
XMLFormat.InputElement.getAttributes()
Returns the attributes for this XML input element.
|
protected XMLFormat<?> |
XMLBinding.getFormat(Class<?> forClass)
Returns the XML format for the specified class/interface.
|
<T> T |
XMLFormat.InputElement.getNext()
Returns the next object whose type is identified by the local name
and URI of the current XML element.
|
CharArray |
XMLFormat.InputElement.getText()
Returns the content of a text-only element (equivalent to
getStreamReader().getElementText() ). |
boolean |
XMLFormat.InputElement.hasNext()
Indicates if more nested XML element can be read.
|
boolean |
XMLObjectReader.hasNext()
Indicates if more elements can be read.
|
Object |
XMLFormat.Default.newInstance(Class<?> cls,
XMLFormat.InputElement xml) |
T |
XMLFormat.newInstance(Class<? extends T> cls,
XMLFormat.InputElement xml)
Allocates a new object of the specified class from the specified
XML input element.
|
static XMLObjectReader |
XMLObjectReader.newInstance(InputStream in)
Returns a XML object reader having the specified
input stream as input.
|
static XMLObjectReader |
XMLObjectReader.newInstance(InputStream in,
String encoding)
Returns a XML object reader (potentially recycled) having the specified
input stream/encoding as input.
|
static XMLObjectWriter |
XMLObjectWriter.newInstance(OutputStream out)
Returns a XML object writer (potentially recycled) having the specified
output stream as output.
|
static XMLObjectWriter |
XMLObjectWriter.newInstance(OutputStream out,
String encoding)
Returns a XML object writer (potentially recycled) having the specified
output stream/encoding as output.
|
static XMLObjectReader |
XMLObjectReader.newInstance(Reader in)
Returns a XML object reader (potentially recycled) having the specified
reader as input.
|
static XMLObjectWriter |
XMLObjectWriter.newInstance(Writer out)
Returns a XML object writer (potentially recycled) having the specified
writer as output.
|
<T> T |
XMLObjectReader.read()
Returns the object corresponding to the next element/data.
|
<T> T |
XMLObjectReader.read(String name)
Returns the object corresponding to the next nested element only
if it has the specified local name.
|
<T> T |
XMLObjectReader.read(String name,
Class<T> cls)
Returns the object corresponding to the next nested element only
if it has the specified local name; the actual object type is identified
by the specified class parameter.
|
<T> T |
XMLObjectReader.read(String localName,
String uri)
Returns the object corresponding to the next nested element only
if it has the specified local name and namespace URI.
|
<T> T |
XMLObjectReader.read(String localName,
String uri,
Class<T> cls)
Returns the object corresponding to the next nested element only
if it has the specified local name and namespace URI; the
actual object type is identified by the specified class parameter.
|
void |
XMLFormat.Default.read(XMLFormat.InputElement xml,
Object obj) |
abstract void |
XMLFormat.read(XMLFormat.InputElement xml,
T obj)
Parses an XML input element into the specified object.
|
protected Class<?> |
XMLBinding.readClass(XMLStreamReader reader,
boolean useAttributes)
Reads the class corresponding to the current XML element.
|
Object |
XMLReferenceResolver.readReference(XMLFormat.InputElement xml)
Reads the object referenced by the specified xml input element if any.
|
void |
XMLFormat.OutputElement.setAttribute(String name,
boolean value)
Sets the specified
boolean attribute. |
void |
XMLFormat.OutputElement.setAttribute(String name,
byte value)
Sets the specified
byte attribute. |
void |
XMLFormat.OutputElement.setAttribute(String name,
char value)
Sets the specified
char attribute. |
void |
XMLFormat.OutputElement.setAttribute(String name,
CharSequence value)
Sets the specified
CharSequence attribute
(null values are ignored). |
void |
XMLFormat.OutputElement.setAttribute(String name,
double value)
Sets the specified
double attribute. |
void |
XMLFormat.OutputElement.setAttribute(String name,
float value)
Sets the specified
float attribute. |
void |
XMLFormat.OutputElement.setAttribute(String name,
int value)
Sets the specified
int attribute. |
void |
XMLFormat.OutputElement.setAttribute(String name,
long value)
Sets the specified
long attribute. |
void |
XMLFormat.OutputElement.setAttribute(String name,
Object value)
Sets the specified attribute using its associated
TextFormat . |
void |
XMLFormat.OutputElement.setAttribute(String name,
short value)
Sets the specified
short attribute. |
void |
XMLFormat.OutputElement.setAttribute(String name,
String value)
Sets the specified
String attribute
(null values are ignored). |
XMLObjectReader |
XMLObjectReader.setInput(InputStream in)
Sets the input stream source for this XML object reader
(encoding retrieved from XML prolog if any).
|
XMLObjectReader |
XMLObjectReader.setInput(InputStream in,
String encoding)
Sets the input stream source and encoding for this XML object reader.
|
XMLObjectReader |
XMLObjectReader.setInput(Reader in)
Sets the reader input source for this XML stream reader.
|
XMLObjectWriter |
XMLObjectWriter.setOutput(OutputStream out)
Sets the output stream for this XML object writer.
|
XMLObjectWriter |
XMLObjectWriter.setOutput(OutputStream out,
String encoding)
Sets the output stream and encoding for this XML object writer.
|
XMLObjectWriter |
XMLObjectWriter.setOutput(Writer out)
Sets the output writer for this XML object writer.
|
void |
XMLObjectWriter.write(Object obj)
Writes the specified object as an anonymous nested element of
unknown type.
|
void |
XMLObjectWriter.write(Object obj,
String name)
Writes the specified object as a named nested element of unknown type
(
null objects are ignored). |
void |
XMLObjectWriter.write(Object obj,
String localName,
String uri)
Writes the specified object as a fully qualified nested element of
unknown type (
null objects are ignored). |
void |
XMLFormat.Default.write(Object obj,
XMLFormat.OutputElement xml) |
<T> void |
XMLObjectWriter.write(T obj,
String name,
Class<T> cls)
Writes the specified object as a named nested element of actual type
known (
null objects are ignored). |
<T> void |
XMLObjectWriter.write(T obj,
String localName,
String uri,
Class<T> cls)
Writes the specified object as a fully qualified nested element of
actual type known (
null objects are ignored). |
abstract void |
XMLFormat.write(T obj,
XMLFormat.OutputElement xml)
Formats an object into the specified XML output element.
|
protected void |
XMLBinding.writeClass(Class<?> cls,
XMLStreamWriter writer,
boolean useAttributes)
Writes the specified class to the current XML element attributes or to
a new element if the element attributes cannot be used.
|
boolean |
XMLReferenceResolver.writeReference(Object obj,
XMLFormat.OutputElement xml)
Writes a reference to the specified object into the specified XML
element.
|
Modifier and Type | Method and Description |
---|---|
void |
XMLStreamReader.close()
Frees any resources associated with this Reader.
|
void |
XMLStreamWriter.close()
Close this writer and free any resources associated with the writer.
|
XMLStreamReader |
XMLInputFactory.createXMLStreamReader(InputStream stream)
Returns a XML stream reader for the specified input stream
(encoding autodetected).
|
XMLStreamReader |
XMLInputFactory.createXMLStreamReader(InputStream stream,
String encoding)
Returns a XML stream reader for the specified input stream using the
specified encoding.
|
XMLStreamReader |
XMLInputFactory.createXMLStreamReader(Reader reader)
Returns a XML stream reader for the specified I/O reader.
|
XMLStreamWriter |
XMLOutputFactory.createXMLStreamWriter(OutputStream stream)
Returns a XML stream writer to the specified output stream (UTF-8
encoding).
|
XMLStreamWriter |
XMLOutputFactory.createXMLStreamWriter(OutputStream stream,
String encoding)
Returns a XML stream writer to the specified output stream using the
specified encoding.
|
XMLStreamWriter |
XMLOutputFactory.createXMLStreamWriter(Writer writer)
Returns a XML stream writer to the specified i/o writer.
|
void |
XMLStreamWriter.flush()
Write any cached data to the underlying output mechanism.
|
CharArray |
XMLStreamReader.getElementText()
Reads the content of a text-only element, an exception is thrown if this
is not a text-only element.
|
CharSequence |
XMLStreamWriter.getPrefix(CharSequence uri)
Gets the prefix the specified uri is bound to.
|
int |
XMLStreamReader.getTextCharacters(int sourceStart,
char[] target,
int targetStart,
int length)
Gets the the text associated with a CHARACTERS, SPACE or CDATA event.
|
boolean |
XMLStreamReader.hasNext()
Returns true if there are more parsing events and false if there are no
more events.
|
int |
XMLStreamReader.next()
Gets next parsing event - contiguous character data is returned into a
single chunk.
|
int |
XMLStreamReader.nextTag()
Skips any white space (isWhiteSpace() returns true), COMMENT, or
PROCESSING_INSTRUCTION, until a START_ELEMENT or END_ELEMENT is reached.
|
void |
XMLStreamReader.require(int type,
CharSequence namespaceURI,
CharSequence localName)
Tests if the current event is of the given type and if the namespace and
name match the current namespace and name of the current event.
|
void |
XMLStreamWriter.setDefaultNamespace(CharSequence uri)
Binds a URI to the default namespace.
|
void |
XMLStreamWriter.setPrefix(CharSequence prefix,
CharSequence uri)
Sets the prefix the uri is bound to.
|
void |
XMLStreamWriter.writeAttribute(CharSequence localName,
CharSequence value)
Writes an attribute to the output stream without a prefix.
|
void |
XMLStreamWriter.writeAttribute(CharSequence namespaceURI,
CharSequence localName,
CharSequence value)
Writes an attribute to the output stream.
|
void |
XMLStreamWriter.writeAttribute(CharSequence prefix,
CharSequence namespaceURI,
CharSequence localName,
CharSequence value)
Writes an attribute to the output stream.
|
void |
XMLStreamWriter.writeCData(CharSequence data)
Writes a CData section.
|
void |
XMLStreamWriter.writeCharacters(char[] text,
int start,
int length)
Writes text to the output.
|
void |
XMLStreamWriter.writeCharacters(CharSequence text)
Writes text to the output.
|
void |
XMLStreamWriter.writeComment(CharSequence data)
Writes an xml comment with the data enclosed.
|
void |
XMLStreamWriter.writeDefaultNamespace(CharSequence namespaceURI)
Writes the default namespace to the stream.
|
void |
XMLStreamWriter.writeDTD(CharSequence dtd)
Writes a DTD section (representing the entire doctypedecl
production from the XML 1.0 specification).
|
void |
XMLStreamWriter.writeEmptyElement(CharSequence localName)
Writes an empty element tag to the output.
|
void |
XMLStreamWriter.writeEmptyElement(CharSequence namespaceURI,
CharSequence localName)
Writes an empty element tag to the output.
|
void |
XMLStreamWriter.writeEmptyElement(CharSequence prefix,
CharSequence localName,
CharSequence namespaceURI)
Writes an empty element tag to the output.
|
void |
XMLStreamWriter.writeEndDocument()
Closes any start tags and writes corresponding end tags.
|
void |
XMLStreamWriter.writeEndElement()
Writes an end tag to the output relying on the internal state of the
writer to determine the prefix and local name of the event.
|
void |
XMLStreamWriter.writeEntityRef(CharSequence name)
Writes an entity reference
|
void |
XMLStreamWriter.writeNamespace(CharSequence prefix,
CharSequence namespaceURI)
Writes a namespace to the output stream.
|
void |
XMLStreamWriter.writeProcessingInstruction(CharSequence target)
Writes a processing instruction.
|
void |
XMLStreamWriter.writeProcessingInstruction(CharSequence target,
CharSequence data)
Writes a processing instruction
|
void |
XMLStreamWriter.writeStartDocument()
Writes the XML Declaration.
|
void |
XMLStreamWriter.writeStartDocument(CharSequence version)
Writes the XML Declaration.
|
void |
XMLStreamWriter.writeStartDocument(CharSequence encoding,
CharSequence version)
Writes the XML Declaration.
|
void |
XMLStreamWriter.writeStartElement(CharSequence localName)
Writes a start tag to the output.
|
void |
XMLStreamWriter.writeStartElement(CharSequence namespaceURI,
CharSequence localName)
Writes a start tag to the output.
|
void |
XMLStreamWriter.writeStartElement(CharSequence prefix,
CharSequence localName,
CharSequence namespaceURI)
Writes a start tag to the output.
|
Modifier and Type | Method and Description |
---|---|
void |
WebServiceClient.invoke()
Invokes the web service.
|
protected void |
WebServiceClient.readResponse(XMLObjectReader in)
Reads the web service response (SOAP body).
|
protected abstract void |
WebServiceClient.writeRequest(XMLObjectWriter out)
Writes the web service request (SOAP body).
|
Copyright © 2005-2013 Javolution. All Rights Reserved.