|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.cayenne.xml.XMLDecoder
public class XMLDecoder
XMLDecoder is used to decode XML into objects.
| Constructor Summary | |
|---|---|
XMLDecoder()
Default constructor. |
|
XMLDecoder(ObjectContext objectContext)
Creates an XMLDecoder that will register decoded DataObjects with the specified context. |
|
| Method Summary | |
|---|---|
Object |
decode(Reader xml)
Decodes XML wrapped by a Reader into an object. |
Object |
decode(Reader xml,
String mappingUrl)
Decodes XML wrapped by a Reader into an object, using the supplied mapping file to guide the decoding process. |
Boolean |
decodeBoolean(String xmlTag)
Decodes an XML element to a Boolean. |
Double |
decodeDouble(String xmlTag)
Decodes an XML element to a Double. |
Float |
decodeFloat(String xmlTag)
Decodes an XML element to a Float. |
Integer |
decodeInteger(String xmlTag)
Decodes an XML element to an Integer. |
static List |
decodeList(Reader xml)
Decodes a list of DataObjects. |
static List |
decodeList(Reader xml,
ObjectContext objectContext)
Decodes a list of DataObjects, registering them the supplied context. |
static List |
decodeList(Reader xml,
String mappingUrl)
Decodes a list of DataObjects using the supplied mapping file to guide the decoding process. |
static List |
decodeList(Reader xml,
String mappingUrl,
ObjectContext objectContext)
Decodes a list of DataObjects using the supplied mapping file to guide the decoding process, registering them the supplied context. |
Object |
decodeObject(String xmlTag)
Decodes an object from XML. |
String |
decodeString(String xmlTag)
Decodes an XML element to a String. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public XMLDecoder()
XMLDecoder(ObjectContext)public XMLDecoder(ObjectContext objectContext)
objectContext - The context to register decoded DataObjects with.| Method Detail |
|---|
public Boolean decodeBoolean(String xmlTag)
xmlTag - The tag identifying the element.
public Double decodeDouble(String xmlTag)
xmlTag - The tag identifying the element.
public Float decodeFloat(String xmlTag)
xmlTag - The tag identifying the element.
public Integer decodeInteger(String xmlTag)
xmlTag - The tag identifying the element.
public Object decodeObject(String xmlTag)
xmlTag - The XML tag corresponding to the root of the encoded object.
public String decodeString(String xmlTag)
xmlTag - The tag identifying the element.
public Object decode(Reader xml)
throws CayenneRuntimeException
xml - Wrapped XML.
CayenneRuntimeException
public Object decode(Reader xml,
String mappingUrl)
throws CayenneRuntimeException
xml - Wrapped XML.mappingUrl - Mapping file describing how the XML elements and object
properties correlate.
CayenneRuntimeException
public static List decodeList(Reader xml)
throws CayenneRuntimeException
xml - The wrapped XML encoding of the list of DataObjects.
CayenneRuntimeException
public static List decodeList(Reader xml,
ObjectContext objectContext)
throws CayenneRuntimeException
xml - The wrapped XML encoding of the list of DataObjects.objectContext - The context to register the decode DataObjects with.
CayenneRuntimeException
public static List decodeList(Reader xml,
String mappingUrl)
throws CayenneRuntimeException
xml - The wrapped XML encoding of the list of DataObjects.mappingUrl - Mapping file describing how the XML elements and object
properties correlate.
CayenneRuntimeException
public static List decodeList(Reader xml,
String mappingUrl,
ObjectContext objectContext)
throws CayenneRuntimeException
xml - The wrapped XML encoding of the list of objects.mappingUrl - Mapping file describing how the XML elements and object
properties correlate.objectContext - The context to register the decode DataObjects with.
CayenneRuntimeException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||