templates.library
Class TemplateMetaIO

java.lang.Object
  extended by templates.library.TemplateMetaIO
All Implemented Interfaces:
ides.api.plugin.io.FileIOPlugin

public class TemplateMetaIO
extends java.lang.Object
implements ides.api.plugin.io.FileIOPlugin

Stores and loads the descriptions of Templates when the models of the templates are stored and loaded.

Author:
Lenko Grigorov

Field Summary
protected static java.lang.String ATTRIBUTE_COLOR
          The "color" XML attribute.
protected static java.lang.String ATTRIBUTE_TAG
          The "tag" XML attribute.
protected static java.lang.String ELEMENT_DESC
          The "description" XML element.
protected static java.lang.String ELEMENT_INFO
          The "template" XML element.
protected static java.lang.String ELEMENT_META
          The "meta" XML element.
protected static java.lang.String META_TAG
          The "tag" for the meta-data associated with templates.
protected static java.lang.String VERSION
          The version of the meta-data format.
 
Constructor Summary
TemplateMetaIO()
           
 
Method Summary
 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 arg2)
           
 void loadMeta(java.lang.String version, java.io.InputStream stream, ides.api.plugin.model.DESModel model, java.lang.String tag)
           
 void saveData(java.io.PrintStream arg0, ides.api.plugin.model.DESModel arg1, java.lang.String arg2)
           
 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

META_TAG

protected static final java.lang.String META_TAG
The "tag" for the meta-data associated with templates.

See Also:
Constant Field Values

VERSION

protected static final java.lang.String VERSION
The version of the meta-data format.

See Also:
Constant Field Values

ELEMENT_META

protected static final java.lang.String ELEMENT_META
The "meta" XML element. It is used to encapsulate the meta-data.

See Also:
Constant Field Values

ELEMENT_INFO

protected static final java.lang.String ELEMENT_INFO
The "template" XML element. It is used to store the information pertaining to a template.

See Also:
Constant Field Values

ELEMENT_DESC

protected static final java.lang.String ELEMENT_DESC
The "description" XML element. It is used to store the description of a template.

See Also:
Constant Field Values

ATTRIBUTE_COLOR

protected static final java.lang.String ATTRIBUTE_COLOR
The "color" XML attribute. It is used to store the color of the icon of a template.

See Also:
Constant Field Values

ATTRIBUTE_TAG

protected static final java.lang.String ATTRIBUTE_TAG
The "tag" XML attribute. It is used to store the "ID" of a template.

See Also:
Constant Field Values
Constructor Detail

TemplateMetaIO

public TemplateMetaIO()
Method Detail

getIOTypeDescriptor

public java.lang.String getIOTypeDescriptor()
Specified by:
getIOTypeDescriptor in interface ides.api.plugin.io.FileIOPlugin
Throws:
java.lang.UnsupportedOperationException - this method is not supported

getMetaTags

public java.util.Set<java.lang.String> getMetaTags()
Specified by:
getMetaTags in interface ides.api.plugin.io.FileIOPlugin

getSaveDataVersion

public java.lang.String getSaveDataVersion()
Specified by:
getSaveDataVersion in interface ides.api.plugin.io.FileIOPlugin
Throws:
java.lang.UnsupportedOperationException - this method is not supported

getSaveMetaVersion

public java.lang.String getSaveMetaVersion(java.lang.String arg0)
Specified by:
getSaveMetaVersion in interface ides.api.plugin.io.FileIOPlugin

loadData

public ides.api.plugin.model.DESModel loadData(java.lang.String arg0,
                                               java.io.InputStream arg1,
                                               java.lang.String arg2)
                                        throws ides.api.plugin.io.FileLoadException
Specified by:
loadData in interface ides.api.plugin.io.FileIOPlugin
Throws:
java.lang.UnsupportedOperationException - this method is not supported
ides.api.plugin.io.FileLoadException

loadMeta

public void loadMeta(java.lang.String version,
                     java.io.InputStream stream,
                     ides.api.plugin.model.DESModel model,
                     java.lang.String tag)
              throws ides.api.plugin.io.FileLoadException
Specified by:
loadMeta in interface ides.api.plugin.io.FileIOPlugin
Throws:
ides.api.plugin.io.FileLoadException

saveData

public void saveData(java.io.PrintStream arg0,
                     ides.api.plugin.model.DESModel arg1,
                     java.lang.String arg2)
              throws ides.api.plugin.io.FileSaveException
Specified by:
saveData in interface ides.api.plugin.io.FileIOPlugin
Throws:
java.lang.UnsupportedOperationException - this method is not supported
ides.api.plugin.io.FileSaveException

saveMeta

public void saveMeta(java.io.PrintStream stream,
                     ides.api.plugin.model.DESModel arg1,
                     java.lang.String arg2)
              throws ides.api.plugin.io.FileSaveException
Specified by:
saveMeta in interface ides.api.plugin.io.FileIOPlugin
Throws:
ides.api.plugin.io.FileSaveException