|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
This interface is used to represent the data that is known about the current CD and to fill this data on a cover.
The framework is meant to work together in the following way: the Data object is independant from eventual data sources and does only store, well, the data about the particular type of CD. The user can fill in parts of the data or the whole data himself, and this data can be used together with a DataSource implementation to fill in the rest of the data automatically (by querying a database or whatever).
A data object could also support a different style of data retrieval. If one has burned a normal CD-R with some files, a Data object could let the user specify the path to the CD-R, while a corresponding DataSource object would read the directories/files from the path and fill the information into the Data object.
There exist no standard ways to fill data into a Data object. Since the DataSource objects are always bound to a specific Data object it is up to the implementors to provide useful methods for this purpose.
Another important method is the getSupportedVersion()
method. It would be
quite bad, if the user uses a CDox/whatever that supports only version 1 of the file
format and downloads a plugin that uses features from version 2 of the file
format... Remember that the store data method fills in the data into the XML file, so
the wrong version would be bad. We'll try to keep the file format backwords compatible
of course.
Method Summary | |
void |
fillBack(Cover c)
This method should fill the given cover with elements that are created from the data which is stored here. |
void |
fillBooklet(Cover c)
This method should fill the given cover with elements that are created from the data which is stored here. |
void |
fillFront(Cover c)
This method should fill the given cover with elements that are created from the data which is stored here. |
java.lang.String |
getDescription()
Returns a descriptive string of the CD type that this Data object represents. |
int |
getSupportedVersion()
Must return the version of the CDox file format that supports this data type. |
void |
reconstruct(org.w3c.dom.Element desc)
Reads its data from the DOM subtree beginning with the given Element. |
void |
storeData(org.w3c.dom.Element desc)
This method stores the data of this element in a DOM tree. |
boolean |
userFillData(java.awt.Frame parent)
This method should let the user fill in appropriate values as data. |
Method Detail |
public boolean userFillData(java.awt.Frame parent)
parent
- the parent frame.
public int getSupportedVersion()
public void storeData(org.w3c.dom.Element desc)
<description>
. The type attribute of this
element must be set, and the child elements must be created according to the XML
Schema from the CDox format.
desc
- the <description>
element.public java.lang.String getDescription()
public void reconstruct(org.w3c.dom.Element desc)
desc
- the top node of the DOM subtree.public void fillFront(Cover c) throws java.lang.IllegalArgumentException
c
- the cover where to add new elements.
java.lang.IllegalArgumentException
- if the cover is no front side.public void fillBack(Cover c) throws java.lang.IllegalArgumentException
c
- the cover where to add new elements.
java.lang.IllegalArgumentException
- if the cover is no back side.public void fillBooklet(Cover c) throws java.lang.IllegalArgumentException
c
- the cover where to add new elements.
java.lang.IllegalArgumentException
- if the cover is no booklet.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |