public class IlvGanttXMLDataSource extends IlvGanttDataSource
An XML data source implements reading and writing a Gantt data model
from/to an XML data file conforming to the Gantt SDXL format, using the
IlvGeneral*Reader/Writer
.
Constructor and Description |
---|
IlvGanttXMLDataSource()
Creates an instance of a
IlvGanttXMLDataSource . |
Modifier and Type | Method and Description |
---|---|
protected void |
deserializeImpl(Element element)
This method must be implemented by subclasses to read their parameters
from an XML configuration file.
|
URL |
getDataURL()
Returns the URL of the XML data file.
|
IlvGanttDocumentReader |
getGanttDocumentReader()
Gets the reader used to read Gantt data model from an XML file.
|
IlvGanttDocumentWriter |
getGanttDocumentWriter()
Gets the writer used to write the Gantt data model to an XML file.
|
void |
read(IlvGanttModel ganttModel)
Reads data from this data source into an
IlvGanttModel |
protected void |
serializeImpl(Element element)
This method must be implemented by subclasses to save their parameters
to the XML configuration file.
|
void |
setDataURL(URL dataURL)
Sets the URL of the XML data file.
|
void |
setGanttDocumentReader(IlvGanttDocumentReader reader)
Sets the reader that will be used to read the XML file.
|
void |
setGanttDocumentWriter(IlvGanttDocumentWriter writer)
Sets the writer that will be used to write the Gantt data model to an
XML file.
|
boolean |
supportsWrite()
Returns if this data source supports writing.
|
void |
write(IlvGanttModel ganttModel)
Write data from an
IlvGanttModel to this data source. |
areActivitiesConfigured, areConstraintsConfigured, areReservationsConfigured, areResourcesConfigured, deserialize, getBaseURL, getDescription, serialize
public IlvGanttXMLDataSource()
IlvGanttXMLDataSource
.public void setGanttDocumentReader(IlvGanttDocumentReader reader)
reader
- The IlvGanttDocumentReader
public IlvGanttDocumentReader getGanttDocumentReader()
IlvGeneral*
Gantt objects.IlvGanttDocumentReader
used to read the Gantt
data model from an XML file.public void setGanttDocumentWriter(IlvGanttDocumentWriter writer)
writer
- The IlvGanttDocumentWriter
.public IlvGanttDocumentWriter getGanttDocumentWriter()
IlvGeneral*
Gantt objects.IlvGanttDocumentWriter
used to write the
Gantt data model to an XML file.public URL getDataURL()
public void setDataURL(URL dataURL)
dataURL
- the URL of the XML data file.public void read(IlvGanttModel ganttModel) throws Exception
IlvGanttModel
read
in class IlvGanttDataSource
ganttModel
- The Gantt model that will contain the data read from
this data source.Exception
- If an exception occurs while reading data.public boolean supportsWrite()
false
.
This default implementation returns true
. This method
must be overridden by subclasses that support writing.
supportsWrite
in class IlvGanttDataSource
true
if this data source supports writing.public void write(IlvGanttModel ganttModel) throws Exception
IlvGanttModel
to this data source.
This method may have an empty implementation if the data source is
read-only. Read-only data sources must return false
from the supportsWrite()
method.
write
in class IlvGanttDataSource
ganttModel
- The Gantt model that contains the data to be saved
to the data source.Exception
- If an exception occurs while writing data.protected void serializeImpl(Element element) throws Exception
serializeImpl
in class IlvGanttDataSource
element
- The DOM element to which the data source parameters are
written.Exception
- If an exception occurs while serializing
the data source.protected void deserializeImpl(Element element) throws Exception
deserializeImpl
in class IlvGanttDataSource
element
- The DOM element to which the data source parameters are
written.Exception
- If an exception occurs while deserializing
the data source.© Copyright 2024 Rogue Wave Software, Inc., a Perforce company.. All Rights Reserved.