com.adactus.mpeg21.didl.xml
Class DigitalItemDeclarationsFactory<D extends DIDL>
java.lang.Object
com.adactus.mpeg21.didl.xml.DigitalItemDeclarationsFactory<D>
- Type Parameters:
D
- For read-only or write interface.
- All Implemented Interfaces:
- java.io.Serializable
public class DigitalItemDeclarationsFactory<D extends DIDL>
- extends java.lang.Object
- implements java.io.Serializable
Factory pattern for marshalling to and from XML.
- See Also:
- Serialized Form
Method Summary |
static DigitalItemDeclarationsFactory |
getInstance()
|
void |
marshall(D didl,
java.io.OutputStream out,
java.lang.String encoding)
Marshall an object into its XML representation. |
void |
marshall(D didl,
java.io.Writer writer)
|
D |
unmarshal(java.lang.String encoding,
java.io.InputStream in)
Unmarshall a digital item declaration instance from its XML representation to its object representation. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DigitalItemDeclarationsFactory
public DigitalItemDeclarationsFactory()
getInstance
public static DigitalItemDeclarationsFactory getInstance()
marshall
public void marshall(D didl,
java.io.OutputStream out,
java.lang.String encoding)
throws javolution.xml.stream.XMLStreamException
- Marshall an object into its XML representation.
- Parameters:
didl
-
- Throws:
javolution.xml.stream.XMLStreamException
marshall
public void marshall(D didl,
java.io.Writer writer)
throws javolution.xml.stream.XMLStreamException
- Throws:
javolution.xml.stream.XMLStreamException
unmarshal
public D unmarshal(java.lang.String encoding,
java.io.InputStream in)
throws javolution.xml.stream.XMLStreamException,
java.io.IOException
- Unmarshall a digital item declaration instance from its XML representation to its object representation.
- Parameters:
encoding
- character encoding (null allowed)in
- the inputstream containing the XML
- Returns:
- an unmarshalled digital item
- Throws:
SchemaException
- if invalid XML
javolution.xml.stream.XMLStreamException
- if problem parsing the XML
java.io.IOException
- if problem reading form the input