Package org.eclipse.birt.chart.model
Interface Serializer
- All Known Implementing Classes:
SerializerImpl
public interface Serializer
This interface provides a means to serialize and/or de-serialize the chart
model instance into XML content. Serialization is internally implemented
using EMF tools using the Chart XSDs (XML schema definition(s)).
- Author:
- Actuate Corporation
-
Method Summary
Modifier and TypeMethodDescriptionWrite the chart described by the model to a ByteArrayOutputStream.fromXml
(ByteArrayInputStream byaIS, boolean bStripHeaders) Reads the chart model from the ByteArrayInputStream.Deprecated.only reserved for compatibilityread
(InputStream is) Reads the chart model from the given InputStreamread
(org.eclipse.emf.common.util.URI uri) Reads the chart model from the location defined by the URI provided.readEmbedded
(org.eclipse.emf.common.util.URI uri) Reads the chart model embedded inside other XML content defined by the URI provided.void
savePreferences
(ChartPreferences preferences, OutputStream os) Deprecated.only reserved for compatibilityvoid
write
(Chart cModel, OutputStream os) Write the chart described by the model to the OutputStream provided.void
Write the chart described by the model to the location defined by the URI provided.
-
Method Details
-
write
Write the chart described by the model to the OutputStream provided.- Parameters:
cModel
- The model to be serialized os The OutputStream to which the model is to be serialized- Throws:
IOException
-
write
Write the chart described by the model to the location defined by the URI provided.- Parameters:
cModel
- The model to be serialized uri The URI to which the model is to be serialized- Throws:
IOException
-
asXml
Write the chart described by the model to a ByteArrayOutputStream.- Parameters:
cModel
- The model to be serialized bStripHeaders Specifies whether or not the headers are to be removed while serializing the model- Returns:
- the ByteArrayOutputStream containing the serialized model
- Throws:
IOException
-
savePreferences
Deprecated.only reserved for compatibilitySaves the chart preferences to the specified OutputStream.- Parameters:
preferences
- The ChartPreferences object to be savedos
- The OutputStream to which the preferences are to be written- Throws:
IOException
-
read
Reads the chart model from the given InputStream- Returns:
- chart model read from the stream
- Throws:
IOException
-
read
Reads the chart model from the location defined by the URI provided.- Parameters:
uri
- URI of the location holding the chart model- Returns:
- chart model read from the source
- Throws:
IOException
-
readEmbedded
Reads the chart model embedded inside other XML content defined by the URI provided.- Parameters:
uri
- URI of the location holding the embedded chart model- Returns:
- chart model read from the source
- Throws:
IOException
-
fromXml
Reads the chart model from the ByteArrayInputStream.- Parameters:
byaIS
- The ByteArrayInputStream holding the chart modelbStripHeaders
- Specifies whether or not the headers were removed when the chart model was saved- Returns:
- chart model read from the stream
- Throws:
IOException
-
loadPreferences
Deprecated.only reserved for compatibilityLoads the chart preferences from the InputStream.- Parameters:
is
- InputStream from which the chart preferences are to be read- Returns:
- ChartPreferences instance read from the stream
- Throws:
IOException
-