|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objecttemplates.io.TemplateFileIO
public class TemplateFileIO
Provides IO for TemplateModels. Also stores and loads the graphical
layout information needed for the associated TemplateDiagrams, as
well as manages the storing and loading of the separate files with the models
of the TemplateComponents in TemplateModels.
| Field Summary | |
|---|---|
protected static java.lang.String |
ATTRIBUTE_COLOR
"COLOR" attribute of the XML structure used to save a TemplateModel and the associated TemplateDiagram. |
protected static java.lang.String |
ATTRIBUTE_COMPONENT
"COMPONENT" attribute of the XML structure used to save a TemplateModel and the associated TemplateDiagram. |
protected static java.lang.String |
ATTRIBUTE_FLAG
"FLAG" attribute of the XML structure used to save a TemplateModel and the associated TemplateDiagram. |
protected static java.lang.String |
ATTRIBUTE_FSA
"MODEL" attribute of the XML structure used to save a TemplateModel and the associated TemplateDiagram. |
protected static java.lang.String |
ATTRIBUTE_ICON
"ICON" attribute of the XML structure used to save a TemplateModel and the associated TemplateDiagram. |
protected static java.lang.String |
ATTRIBUTE_ID
"ID" attribute of the XML structure used to save a TemplateModel
and the associated TemplateDiagram. |
protected static java.lang.String |
ATTRIBUTE_LABEL
"LABEL" attribute of the XML structure used to save a TemplateModel and the associated TemplateDiagram. |
protected static java.lang.String |
ATTRIBUTE_LEFT
"COMPONENT1" attribute of the XML structure used to save a TemplateModel and the associated TemplateDiagram. |
protected static java.lang.String |
ATTRIBUTE_LEFTEVENT
"EVENT1" attribute of the XML structure used to save a TemplateModel and the associated TemplateDiagram. |
protected static java.lang.String |
ATTRIBUTE_RIGHT
"COMPONENT2" attribute of the XML structure used to save a TemplateModel and the associated TemplateDiagram. |
protected static java.lang.String |
ATTRIBUTE_RIGHTEVENT
"EVENT2" attribute of the XML structure used to save a TemplateModel and the associated TemplateDiagram. |
protected static java.lang.String |
ATTRIBUTE_TAG
"TAG" attribute of the XML structure used to save a TemplateModel
and the associated TemplateDiagram. |
protected static java.lang.String |
ATTRIBUTE_TYPE
"TYPE" attribute of the XML structure used to save a TemplateModel and the associated TemplateDiagram. |
protected static java.lang.String |
ATTRIBUTE_X
"X" attribute of the XML structure used to save a TemplateModel
and the associated TemplateDiagram. |
protected static java.lang.String |
ATTRIBUTE_Y
"Y" attribute of the XML structure used to save a TemplateModel
and the associated TemplateDiagram. |
protected static java.lang.String |
ELEMENT_COMPONENT
"COMPONENT" element of the XML structure used to save a TemplateModel and the associated TemplateDiagram. |
protected static java.lang.String |
ELEMENT_CONNECTOR
"CONNECTOR" element of the XML structure used to save a TemplateModel and the associated TemplateDiagram. |
protected static java.lang.String |
ELEMENT_DATA
"DATA" element of the XML structure used to save a TemplateModel
and the associated TemplateDiagram. |
protected static java.lang.String |
ELEMENT_ENTITY
"ENTITY" element of the XML structure used to save a TemplateModel and the associated TemplateDiagram. |
protected static java.lang.String |
ELEMENT_LINK
"LINK" element of the XML structure used to save a TemplateModel
and the associated TemplateDiagram. |
protected static java.lang.String |
FILE
Key for the annotation of a FSAModel component of a
TemplateModel with information about the location of the file
where the component is saved. |
protected static java.lang.String |
LAST_SAVE_FILE
Key for the annotation of a TemplateModel with information about
the location of the last file to which the model was saved. |
protected static java.lang.String |
META
The meta tag for the layout information of TemplateDiagrams. |
protected static java.lang.String |
TYPE
The string description of TemplateModels. |
protected static java.lang.String |
VERSION
The version of the file format supported by this class. |
| Constructor Summary | |
|---|---|
TemplateFileIO()
|
|
| Method Summary | |
|---|---|
protected java.lang.String |
component2File(java.io.File parentFile,
TemplateComponent component)
Derive a name for the file where the model of a TemplateComponent
will be saved, from the name of the model of the
TemplateComponent. |
protected java.lang.String |
file2Component(java.io.File parentFile,
java.io.File file)
Derive a name for the model of a TemplateComponent, from the name
of the file where the model of the TemplateComponent is saved. |
java.lang.String |
getIOTypeDescriptor()
|
java.util.Set<java.lang.String> |
getMetaTags()
|
java.lang.String |
getSaveDataVersion()
|
java.lang.String |
getSaveMetaVersion(java.lang.String arg0)
|
ides.api.plugin.model.DESModel |
loadData(java.lang.String arg0,
java.io.InputStream arg1,
java.lang.String file)
|
void |
loadMeta(java.lang.String arg0,
java.io.InputStream arg1,
ides.api.plugin.model.DESModel model,
java.lang.String arg3)
|
void |
saveData(java.io.PrintStream stream,
ides.api.plugin.model.DESModel model,
java.lang.String file)
|
void |
saveMeta(java.io.PrintStream stream,
ides.api.plugin.model.DESModel arg1,
java.lang.String arg2)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected static final java.lang.String TYPE
TemplateModels.
protected static final java.lang.String META
TemplateDiagrams.
protected static final java.lang.String VERSION
protected static final java.lang.String FILE
FSAModel component of a
TemplateModel with information about the location of the file
where the component is saved.
protected static final java.lang.String LAST_SAVE_FILE
TemplateModel with information about
the location of the last file to which the model was saved.
protected static final java.lang.String ELEMENT_DATA
TemplateModel
and the associated TemplateDiagram. Denotes the element which
contains the description of the TemplateModel.
protected static final java.lang.String ELEMENT_COMPONENT
TemplateModel and the associated TemplateDiagram. Denotes
the element which describes a TemplateComponent (module or
channel) of a TemplateModel.
protected static final java.lang.String ELEMENT_LINK
TemplateModel
and the associated TemplateDiagram. Denotes the element which
describes a TemplateLink between components of a
TemplateModel.
protected static final java.lang.String ELEMENT_ENTITY
TemplateModel and the associated TemplateDiagram. Denotes
the element which describes an Entity in a
TemplateDiagram.
protected static final java.lang.String ELEMENT_CONNECTOR
TemplateModel and the associated TemplateDiagram. Denotes
the element which describes a Connector in a
TemplateDiagram.
protected static final java.lang.String ATTRIBUTE_ID
TemplateModel
and the associated TemplateDiagram. Contains the ID of an element
in a TemplateModel.
protected static final java.lang.String ATTRIBUTE_TYPE
TemplateModel and the associated TemplateDiagram.
Contains the type (module or channel) of a
TemplateComponent.
protected static final java.lang.String ATTRIBUTE_FSA
TemplateModel and the associated TemplateDiagram.
Contains the name of the file where the FSAModel of
TemplateComponent is saved.
protected static final java.lang.String ATTRIBUTE_LEFT
TemplateModel and the associated TemplateDiagram.
Contains the ID of the "left" TemplateComponent in a
TemplateLink.
protected static final java.lang.String ATTRIBUTE_RIGHT
TemplateModel and the associated TemplateDiagram.
Contains the ID of the "right" TemplateComponent in a
TemplateLink.
protected static final java.lang.String ATTRIBUTE_LEFTEVENT
TemplateModel and the associated TemplateDiagram.
Contains the name of the event from the "left" TemplateComponent
linked by a TemplateLink.
protected static final java.lang.String ATTRIBUTE_RIGHTEVENT
TemplateModel and the associated TemplateDiagram.
Contains the name of the event from the "right" TemplateComponent
linked by a TemplateLink.
protected static final java.lang.String ATTRIBUTE_COMPONENT
TemplateModel and the associated TemplateDiagram.
Contains the ID of the TemplateComponent whose layout information
is maintained by the Entity.
protected static final java.lang.String ATTRIBUTE_X
TemplateModel
and the associated TemplateDiagram. Contains the x-axis location
of an Entity.
protected static final java.lang.String ATTRIBUTE_Y
TemplateModel
and the associated TemplateDiagram. Contains the y-axis location
of an Entity.
protected static final java.lang.String ATTRIBUTE_LABEL
TemplateModel and the associated TemplateDiagram.
Contains the label of an Entity.
protected static final java.lang.String ATTRIBUTE_COLOR
TemplateModel and the associated TemplateDiagram.
Contains the color of the icon representing an Entity.
protected static final java.lang.String ATTRIBUTE_TAG
TemplateModel
and the associated TemplateDiagram. Contains the text inside the
icon representing an Entity.
protected static final java.lang.String ATTRIBUTE_FLAG
TemplateModel and the associated TemplateDiagram.
Contains information if the icon of an Entity is "flagged"
protected static final java.lang.String ATTRIBUTE_ICON
TemplateModel and the associated TemplateDiagram.
Reserved attribute.
| Constructor Detail |
|---|
public TemplateFileIO()
| Method Detail |
|---|
public java.lang.String getIOTypeDescriptor()
getIOTypeDescriptor in interface ides.api.plugin.io.FileIOPluginpublic java.util.Set<java.lang.String> getMetaTags()
getMetaTags in interface ides.api.plugin.io.FileIOPlugin
protected java.lang.String component2File(java.io.File parentFile,
TemplateComponent component)
TemplateComponent
will be saved, from the name of the model of the
TemplateComponent.
parentFile - name of the file where the TemplateModel is savedcomponent - the TemplateComponent for which to derive a file name
TemplateComponent
protected java.lang.String file2Component(java.io.File parentFile,
java.io.File file)
TemplateComponent, from the name
of the file where the model of the TemplateComponent is saved.
parentFile - name of the file where the TemplateModel is savedfile - the file where the model of the TemplateComponent is
saved
TemplateComponent
public void saveData(java.io.PrintStream stream,
ides.api.plugin.model.DESModel model,
java.lang.String file)
throws ides.api.plugin.io.FileSaveException
saveData in interface ides.api.plugin.io.FileIOPluginides.api.plugin.io.FileSaveException
public void saveMeta(java.io.PrintStream stream,
ides.api.plugin.model.DESModel arg1,
java.lang.String arg2)
throws ides.api.plugin.io.FileSaveException
saveMeta in interface ides.api.plugin.io.FileIOPluginides.api.plugin.io.FileSaveExceptionpublic java.lang.String getSaveDataVersion()
getSaveDataVersion in interface ides.api.plugin.io.FileIOPluginpublic java.lang.String getSaveMetaVersion(java.lang.String arg0)
getSaveMetaVersion in interface ides.api.plugin.io.FileIOPlugin
public ides.api.plugin.model.DESModel loadData(java.lang.String arg0,
java.io.InputStream arg1,
java.lang.String file)
throws ides.api.plugin.io.FileLoadException
loadData in interface ides.api.plugin.io.FileIOPluginides.api.plugin.io.FileLoadException
public void loadMeta(java.lang.String arg0,
java.io.InputStream arg1,
ides.api.plugin.model.DESModel model,
java.lang.String arg3)
throws ides.api.plugin.io.FileLoadException
loadMeta in interface ides.api.plugin.io.FileIOPluginides.api.plugin.io.FileLoadException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||