public class IlvXMLDataWriter extends Object
IlvXMLDataReader
.Constructor and Description |
---|
IlvXMLDataWriter()
Deprecated.
Please use the constructor that takes a
Locale
argument. |
IlvXMLDataWriter(Locale locale)
Creates a new
IlvXMLDataWriter . |
Modifier and Type | Method and Description |
---|---|
String |
generateId(IlvDataSet dataSet,
boolean xSeries)
Generates the XML ID for the specified series of the specified data set.
|
String |
getDateFormat()
Returns the document date format.
|
char |
getDelimiter()
Returns the delimiter used for valuesList element.
|
protected Document |
getDocument()
Returns the document being populated by this writer.
|
Locale |
getLocale()
Returns the locale used to convert dates to a textual representation.
|
char |
getTrimChar()
Returns the space replacement character.
|
String |
getVersion()
Returns the DTD version.
|
void |
setDateFormat(String format)
Sets the document date format.
|
void |
setDelimiter(char delimiter)
Sets the delimiter for
valuesList element. |
void |
setLocale(Locale locale)
Sets the locale used to convert dates to a textual representation.
|
void |
setStyleSheets(String[] ssheets)
Sets the style sheets associated with this XML file.
|
void |
setTrimChar(char c)
Sets the space replacement character.
|
void |
setVersion(String version)
Sets the DTD version.
|
void |
write(Document document,
IlvDataSet[] dataSets)
Writes in the specified XML document the contents of the specified
data set arrays.
|
void |
write(OutputStream output,
IlvDataSet[] dataSets)
Writes in the specified output stream the contents of the specified data
set arrays as an XML document.
|
protected void |
writeProperties(Element srcElt,
IlvDataSet ds)
Writes the
property elements for the specified data set. |
@Deprecated public IlvXMLDataWriter()
Locale
argument.IlvXMLDataWriter
that doesn't write a locale
designator into the XML file.public IlvXMLDataWriter(Locale locale)
IlvXMLDataWriter
.locale
- The locale used to convert dates to a textual representation,
see setLocale(java.util.Locale)
. Usually the value passed here is
Locale.getDefault()
.setLocale(java.util.Locale)
public final String getVersion()
public void setVersion(String version)
null
,
then the original DTD version is used.public Locale getLocale()
null
setLocale(java.util.Locale)
public void setLocale(Locale locale)
If the given locale is non-null
, it is used to convert dates
to a textual representation, and is designated through an
xml:lang
attribute. Such XML files can then be read in any
locale.
If the given locale is null
, the current locale is used to
convert dates to a textual representation, and no locale designator is
written into the XML file. Such XML files can only be read is the same
locale as the one in which they were written.
locale
- A locale, or null
.getLocale()
public String getDateFormat()
setDateFormat(java.lang.String)
public final void setDateFormat(String format)
null
,
then a default date format ("dd-MMMM-yy"
or
"dd-MMMM-yyTHH:mm:ss"
or
"dd-MMMM-yyTHH:mm:ss.SSS"
, as appropriate) is used.
The IlvDataSetProperty.isXTimeSeries(ilog.views.chart.data.IlvDataSet)
and IlvDataSetProperty.isYTimeSeries(ilog.views.chart.data.IlvDataSet)
methods are used to check whether this format must be used to serialize values.format
- A date format string in the syntax described in the class
SimpleDateFormat
or
com.ibm.icu.text.SimpleDateFormat
,
not containing whitespace nor commas.setDateFormat(java.lang.String)
public final char getTrimChar()
setTrimChar(char)
public void setTrimChar(char c)
public void setDelimiter(char delimiter)
valuesList
element. The default value is ','.public char getDelimiter()
setDelimiter(char)
public String generateId(IlvDataSet dataSet, boolean xSeries)
setTrimChar(char)
protected void writeProperties(Element srcElt, IlvDataSet ds)
property
elements for the specified data set.srcElt
- The parent Element
of the
property
elements.ds
- The data set.public void setStyleSheets(String[] ssheets)
xml-stylesheet
processing instructions.ssheets
- An array of the style sheets URLs.public void write(Document document, IlvDataSet[] dataSets)
public void write(OutputStream output, IlvDataSet[] dataSets) throws IOException
IOException
- An error occurred while writing the document to
the specified output stream.protected Document getDocument()
© Copyright Rogue Wave Software, Inc. 1997, 2018. All Rights Reserved.