|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectpl.edu.agh.cast.model.mapper.internal.AbstractSaver
pl.edu.agh.cast.model.mapper.internal.XMLSaver
public class XMLSaver
Limited version of base model saver - allows only saving of DataSets. The DataSets are stored as separate XML files in their project's directory. The saved structure is limited - any links which go beyond DataSet - Relation - Entity relationships are discarded. The identifiers of mappable elements are unique only within the DataSet.
| Field Summary | |
|---|---|
static DateFormat |
DATE_FORMAT
The format of the date. |
static String |
EXTENSION
The extension of the model file. |
static String |
ID
The name of the field which holds the id of the node. |
static String |
MODEL_PROPS
The name of the file where model properties are stored. |
static String |
ROOT
The name of the directory where the project is stored. |
static String |
SOURCE
The name of the field used to indicate the source of the relation. |
static String |
TARGET
The name of the field used to indicate the target of the relation. |
static String |
TYPE
The name of the field which holds the type of the node. |
| Fields inherited from class pl.edu.agh.cast.model.mapper.internal.AbstractSaver |
|---|
force, log, nodes, primaryObject, queue, stored, visited |
| Constructor Summary | |
|---|---|
XMLSaver(Mappable object,
boolean force,
org.eclipse.core.resources.IProject project)
The parameterized constructor. |
|
| Method Summary | |
|---|---|
static String |
dirFor(org.eclipse.core.resources.IProject project)
For given project returns the directory where the model is stored. |
static String |
fileFor(org.eclipse.core.resources.IProject project,
String id)
Returns the path to the file which holds data set with given id. |
boolean |
save()
Save the model. |
| Methods inherited from class pl.edu.agh.cast.model.mapper.internal.AbstractSaver |
|---|
getMapping |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String MODEL_PROPS
public static final String EXTENSION
public static final String ROOT
public static final String TYPE
public static final String ID
public static final DateFormat DATE_FORMAT
public static final String SOURCE
public static final String TARGET
| Constructor Detail |
|---|
public XMLSaver(Mappable object,
boolean force,
org.eclipse.core.resources.IProject project)
object - The object to save.force - The force flag.project - The project which is owner of the object.| Method Detail |
|---|
public boolean save()
Saver.save()public static String dirFor(org.eclipse.core.resources.IProject project)
project - The project name.
public static String fileFor(org.eclipse.core.resources.IProject project,
String id)
project - the project where the data set is stored.id - The id of the data set.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||