Update of /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model
In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv26457/src/net/sourceforge/bprocessor/model
Modified Files:
Persistence.java
Log Message:
made changes to the schema so that subtypes get a type attribute that tell which type it represents so that several types can be stored as the same tag, require update of build.xml and Persistence.java as well
Index: Persistence.java
===================================================================
RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/Persistence.java,v
retrieving revision 1.9
retrieving revision 1.10
diff -C2 -d -r1.9 -r1.10
*** Persistence.java 26 Sep 2006 09:52:24 -0000 1.9
--- Persistence.java 9 Oct 2006 08:49:21 -0000 1.10
***************
*** 189,210 ****
}
{
! Iterator iter = xml.getPoint().iterator();
! while (iter.hasNext()) {
! PointType current = (PointType) iter.next();
! space.add(internalizePoint(current, mapper, xmls));
! }
! }
! {
! Iterator iter = xml.getLine().iterator();
! while (iter.hasNext()) {
! LineType current = (LineType) iter.next();
! space.add(internalizeLine(current, mapper, xmls));
! }
! }
! {
! Iterator iter = xml.getCoordinatesystem().iterator();
while (iter.hasNext()) {
! CoordinateSystemType current = (CoordinateSystemType) iter.next();
! space.add(internalizeCoordinateSystem(current, mapper, xmls));
}
}
--- 189,204 ----
}
{
! Iterator iter = xml.getConstructor().iterator();
while (iter.hasNext()) {
! Object current = iter.next();
! if (current instanceof CoordinateSystemType) {
! space.add(internalizeCoordinateSystem((CoordinateSystemType)current, mapper, xmls));
! } else if (current instanceof PointType) {
! space.add(internalizePoint((PointType)current, mapper, xmls));
! } else if (current instanceof LineType) {
! space.add(internalizeLine((LineType)current, mapper, xmls));
! } else {
! log.info("Const were " + current.getClass());
! }
}
}
***************
*** 606,610 ****
VertexType orig = externalizeVertex(constructor.getOrigin(), new HashMap());
xml.setVertex(orig);
! to.getPoint().add(xml);
map.put(constructor, xml);
} else if (constructor instanceof Line) {
--- 600,604 ----
VertexType orig = externalizeVertex(constructor.getOrigin(), new HashMap());
xml.setVertex(orig);
! to.getConstructor().add(xml);
map.put(constructor, xml);
} else if (constructor instanceof Line) {
***************
*** 620,624 ****
VertexType orig = externalizeVertex(constructor.getOrigin(), new HashMap());
xml.setVertex(orig);
! to.getLine().add(xml);
map.put(constructor, xml);
} else if (constructor instanceof CoordinateSystem) {
--- 614,618 ----
VertexType orig = externalizeVertex(constructor.getOrigin(), new HashMap());
xml.setVertex(orig);
! to.getConstructor().add(xml);
map.put(constructor, xml);
} else if (constructor instanceof CoordinateSystem) {
***************
*** 638,642 ****
VertexType orig = externalizeVertex(constructor.getOrigin(), new HashMap());
xml.setVertex(orig);
! to.getCoordinatesystem().add(xml);
map.put(constructor, xml);
} else {
--- 632,636 ----
VertexType orig = externalizeVertex(constructor.getOrigin(), new HashMap());
xml.setVertex(orig);
! to.getConstructor().add(xml);
map.put(constructor, xml);
} else {
|