|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcz.cuni.jagrlib.xml.InputOutputXML
public class InputOutputXML
Saving and loading of XML files.
Field Summary | |
---|---|
protected Node |
actualNode
Actual node for saving or loading. |
protected static String |
C_INTERFACE
|
protected static String |
C_MODULEFROM
|
protected static String |
C_MODULETO
|
protected static String |
C_PLUGFROM
|
protected static String |
C_PLUGTO
|
protected Document |
doc
XML document. |
protected String |
fileName
File name of comoposition. |
protected static String |
G_COMPOSITION
|
protected static String |
G_REGISTRY
|
protected static String |
G_SHOWMODULES
|
protected static String |
KEY
|
protected static String |
M_CLASS
|
protected static String |
M_EDITABLE
|
protected static String |
M_MAXIMIZABLE
|
protected static String |
M_MINIMIZABLE
|
protected static String |
M_MODESHOW
|
protected static String |
M_NAME
|
protected static String |
M_NEXTINFO
|
protected static String |
M_PACKAGE
|
protected static String |
M_PARAMS
|
protected static String |
M_PLUGS
|
protected static String |
M_SELECTED
|
protected static String |
M_SHAPE
|
protected static String |
M_TEMPLATE
|
protected static int |
maxBackupNumber
Number of backup files. |
protected static String |
PA_NAME
|
protected static String |
PA_VALUE
|
protected static String |
PA_VISIBLE
|
protected static String |
PL_NAME
|
protected static String |
PL_ORIENTATION
|
protected static String |
PL_VISIBLE
|
protected Node |
root
Root of data. |
protected static String |
SHAPE_HEIGHT
|
protected static String |
SHAPE_WIDTH
|
protected static String |
SHAPE_X
|
protected static String |
SHAPE_Y
|
Fields inherited from interface cz.cuni.jagrlib.reg.InputOutput |
---|
SAVE, SAVEAS |
Constructor Summary | |
---|---|
InputOutputXML()
|
Method Summary | |
---|---|
void |
backup(String fileName,
File oldFile,
int order)
Renaming of backup files. |
void |
load(InfoGroup _composition)
Main method for load Composition from XML file. |
InfoGroup |
loadComposition(InfoGroup _composition)
Loads composition. |
void |
loadFile(InfoGroup _composition,
String fileName)
Loads composition w/o asking for its file-name. |
InfoGroup |
loadGroup(InfoGroup _info)
Loads group. |
InfoChannel |
loadChannel(InfoChannel _info)
Loads channel. |
InfoModule |
loadModule(InfoModule _info)
Loads module. |
InfoModule |
loadModuleInfo(InfoModule _info)
Loads module or group info. |
InfoParam |
loadParam(InfoParam _info,
InfoModule _owner)
Loads parameter. |
InfoPlug |
loadPlug(InfoPlug _info,
InfoModule _owner)
Loads plug. |
void |
loadPlugsParams(InfoModule _info)
Loads plugs and params. |
void |
save(String type,
InfoGroup _composition)
Main method for save Composition to XML file. |
void |
saveComposition(InfoGroup _composition)
Saves composition. |
void |
saveGroup(InfoGroup _info)
Saves one group. |
void |
saveChannel(InfoChannel _info)
Saves one channel. |
void |
saveModule(Element sg,
InfoModule _info)
Saves module or group info. |
void |
saveModule(InfoModule _info)
Saves one module. |
Element |
saveNextInfo(Map<String,Object> _nextInfo)
Saves nextInfo. |
void |
saveParam(InfoParam _info,
String _key)
Saves one parameter. |
void |
savePlug(InfoPlug _info,
String _key)
Saves one plug. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected String fileName
protected Document doc
protected Node root
protected Node actualNode
protected static final int maxBackupNumber
protected static final String G_REGISTRY
protected static final String G_COMPOSITION
protected static final String G_SHOWMODULES
protected static final String KEY
protected static final String C_INTERFACE
protected static final String C_MODULEFROM
protected static final String C_PLUGFROM
protected static final String C_MODULETO
protected static final String C_PLUGTO
protected static final String PA_NAME
protected static final String PA_VALUE
protected static final String PA_VISIBLE
protected static final String PL_NAME
protected static final String PL_ORIENTATION
protected static final String PL_VISIBLE
protected static final String M_CLASS
protected static final String M_PACKAGE
protected static final String M_TEMPLATE
protected static final String M_NAME
protected static final String M_SHAPE
protected static final String M_MODESHOW
protected static final String M_EDITABLE
protected static final String M_MINIMIZABLE
protected static final String M_MAXIMIZABLE
protected static final String M_SELECTED
protected static final String M_PLUGS
protected static final String M_PARAMS
protected static final String M_NEXTINFO
protected static final String SHAPE_X
protected static final String SHAPE_Y
protected static final String SHAPE_HEIGHT
protected static final String SHAPE_WIDTH
Constructor Detail |
---|
public InputOutputXML()
Method Detail |
---|
public void save(String type, InfoGroup _composition) throws Exception
save
in interface InputOutput
_composition
- Composition info.type
- Save type (Save or SaveAs)
Exception
public void saveComposition(InfoGroup _composition)
saveComposition
in interface InputOutput
_composition
- Composition info.public void saveGroup(InfoGroup _info)
saveGroup
in interface InputOutput
_info
- Group info.public void saveChannel(InfoChannel _info)
saveChannel
in interface InputOutput
_info
- Channel info.public void saveParam(InfoParam _info, String _key)
saveParam
in interface InputOutput
_info
- Parameter info._key
- Key of parameter for module or group.public void saveModule(InfoModule _info)
saveModule
in interface InputOutput
_info
- Module info.public void saveModule(Element sg, InfoModule _info)
sg
- Node for saving._info
- Module info.public void savePlug(InfoPlug _info, String _key)
savePlug
in interface InputOutput
_info
- Plug info._key
- Key of plug for module or group.public Element saveNextInfo(Map<String,Object> _nextInfo)
_nextInfo
- Next information for anything.
public void loadFile(InfoGroup _composition, String fileName) throws Exception
null
).
loadFile
in interface InputOutput
fileName
- File-name to load.
Exception
public void load(InfoGroup _composition) throws Exception
load
in interface InputOutput
_composition
- Composition info.
Exception
public InfoGroup loadComposition(InfoGroup _composition) throws Exception
loadComposition
in interface InputOutput
_composition
- Composition info.
Exception
public InfoGroup loadGroup(InfoGroup _info) throws Exception
loadGroup
in interface InputOutput
_info
- Group info.
Exception
public InfoChannel loadChannel(InfoChannel _info) throws Exception
loadChannel
in interface InputOutput
_info
- Channel info.
Exception
public InfoParam loadParam(InfoParam _info, InfoModule _owner) throws Exception
loadParam
in interface InputOutput
_info
- Parameter info._owner
- Owner of parameter.
Exception
public InfoModule loadModuleInfo(InfoModule _info) throws Exception
_info
- Module info.
Exception
public void loadPlugsParams(InfoModule _info) throws Exception
_info
- Module info.
Exception
public InfoModule loadModule(InfoModule _info) throws Exception
loadModule
in interface InputOutput
_info
- Module info.
Exception
public InfoPlug loadPlug(InfoPlug _info, InfoModule _owner) throws Exception
loadPlug
in interface InputOutput
_info
- Plug info._owner
- Owner of plug.
Exception
public void backup(String fileName, File oldFile, int order)
fileName
- Name of new file.oldFile
- Name of old file.order
- Numerical order of backup file.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |