|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectpivot.wtkx.WTKXSerializer
public class WTKXSerializer
Loads an object hierarchy from an XML document.
Nested Class Summary | |
---|---|
class |
WTKXSerializer.NamedObjectDictionary
Dictionary used for named object lookup. |
Field Summary | |
---|---|
static String |
ID_ATTRIBUTE
|
static String |
INCLUDE_RESOURCES_ATTRIBUTE
|
static String |
INCLUDE_SRC_ATTRIBUTE
|
static String |
INCLUDE_TAG
|
static String |
MIME_TYPE
|
static char |
OBJECT_REFERENCE_PREFIX
|
static char |
RESOURCE_KEY_PREFIX
|
static String |
SCRIPT_SRC_ATTRIBUTE
|
static String |
SCRIPT_TAG
|
static char |
URL_PREFIX
|
static String |
WTKX_PREFIX
|
Constructor Summary | |
---|---|
WTKXSerializer()
|
|
WTKXSerializer(Resources resources)
|
Method Summary | ||
---|---|---|
String |
getMIMEType(Object object)
Returns the MIME type of the data read and written by this serializer. |
|
WTKXSerializer.NamedObjectDictionary |
getNamedObjects()
Retrieves the named objects dictionary. |
|
|
getObjectByID(String id)
Retrieves a named object. |
|
Resources |
getResources()
|
|
|
getRootObject()
Retrieves the root object of the WTKX hierarchy. |
|
WTKXSerializer |
getSerializerByID(String id)
Retrieves a included serializer by its ID. |
|
Object |
readObject(InputStream inputStream)
Reads an object from an input stream. |
|
Object |
readObject(String resourceName)
|
|
Object |
readObject(URL location)
|
|
void |
writeObject(Object object,
OutputStream outputStream)
Writes an object to an 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 char URL_PREFIX
public static final char RESOURCE_KEY_PREFIX
public static final char OBJECT_REFERENCE_PREFIX
public static final String WTKX_PREFIX
public static final String ID_ATTRIBUTE
public static final String INCLUDE_TAG
public static final String INCLUDE_SRC_ATTRIBUTE
public static final String INCLUDE_RESOURCES_ATTRIBUTE
public static final String SCRIPT_TAG
public static final String SCRIPT_SRC_ATTRIBUTE
public static final String MIME_TYPE
Constructor Detail |
---|
public WTKXSerializer()
public WTKXSerializer(Resources resources)
Method Detail |
---|
public Resources getResources()
public Object readObject(String resourceName) throws IOException, SerializationException
IOException
SerializationException
public Object readObject(URL location) throws IOException, SerializationException
IOException
SerializationException
public Object readObject(InputStream inputStream) throws IOException, SerializationException
Serializer
readObject
in interface Serializer<Object>
inputStream
- The data stream from which the object will be read.
IOException
SerializationException
public void writeObject(Object object, OutputStream outputStream) throws IOException, SerializationException
Serializer
writeObject
in interface Serializer<Object>
object
- The object to serialize.outputStream
- The data stream to which the object will be written.
IOException
SerializationException
public String getMIMEType(Object object)
Serializer
getMIMEType
in interface Serializer<Object>
object
- If provided, allows the serializer to attach parameters to the returned
MIME type containing more detailed information about the data. If
null, the base MIME type is returned.public WTKXSerializer getSerializerByID(String id)
id
- The ID of the serializer, relative to this loader. The serializer's ID
is the concatentation of its parent IDs and its ID, separated by periods
(e.g. "foo.bar.baz").
public <T> T getRootObject()
getRootObject
in interface Bindable.ObjectHierarchy
T
- The type of the object to return.
public <T> T getObjectByID(String id)
getObjectByID
in interface Bindable.ObjectHierarchy
T
- The type of the object to return.id
- The ID of the object, relative to this loader. The object's ID is the
concatentation of its parent IDs and its ID, separated by periods
(e.g. "foo.bar.baz").
public WTKXSerializer.NamedObjectDictionary getNamedObjects()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |