|
Hello, I am
a student at I would like to know if I am going about this in the
right way if not, can you suggests a easer or better way, oh and have I
correctly understood the syntax that I am suppose to be using in the mapping.xml file. Lisa |
GraphCollection.java
Description: Binary data
Node.java
Description: Binary data
Graph.java
Description: Binary data
Edge.java
Description: Binary data
<?xml version="1.0"?> <!DOCTYPE mapping PUBLIC "-//EXOLAB/Castor Object Mapping DTD Version 1.0//EN" "http://Castor.exolab.org/mapping.dtd"> <mapping> <description>Description of the mapping</description>
<include href="other_mapping_file.xml"/>
<class name="API.Edge">
<map-to xml = "Edge"/>
<field name = "edgeID"
type = "integer"
requied = "true"
direct = "true"
lazy = "false"
transient = "false"
get-method = "getEdgeID()"
set-method = "setEdgeID(int id)">
<bind-xml name="edgeID" node="element"/>
</field>
<field name = "sourceNode"
type = "API.Node"
requied = "true"
direct = "false"
lazy = "false"
transient = "false"
get-method = "getSourceNode()"
set-method = "setSourceNode(Node sn)">
<bind-xml name="souceNode"/>
</field>
<field name = "destNode"
type = "Node"
requied = "true"
direct = "false"
lazy = "false"
transient = "false"
get-method = "getDestNode()"
set-method = "setdestNode(Node dn)">
<bind-xml name="destNode"/>
</field>
</class>
<class name="API.Graph">
<map-to xml = "Graph"/>
<field name = "graphID"
type = "integer"
requied = "true"
direct = "true"
lazy = "false"
transient = "false"
get-method = "getGraphID()"
set-method = "setGraphID(int id)">
<bind-xml name="GraphID" node="element"/>
</field>
<field name = "edgeSet"
type = "API.Edge"
requied = "true"
direct = "false"
lazy = "false"
transient = "false"
get-method = "getEdgeSet()"
set-method = "setEdgeSet(Vector e)"
collection = "vector">
<bind-xml name="edgeSet"/>
</field>
<field name = "nodeSet"
type = "Node"
requied = "true"
direct = "false"
lazy = "false"
transient = "false"
get-method = "getDestNode()"
set-method = "setdestNode(Node n)"
collection = "vector">
<bind-xml name="destNode"/>
</field>
</class>
<class name="API.GraphCollection">
<map-to xml = "GraphCollection"/>
<field name = "noOfGraphs"
type = "integer"
requied = "true"
direct = "true"
lazy = "false"
transient = "false"
get-method = "getNoOfGraphs()"
set-method = "setNoOfGraphs(int n)">
<bind-xml name="noOfGraphs" node="element"/>
</field>
<field name = "GraphList"
type = "API.Graph"
requied = "true"
direct = "false"
lazy = "false"
transient = "false"
get-method = "getGraphList()"
set-method = "setGraphList()"
collection = "vector">
<bind-xml name="GraphList"/>
</field>
</class>
<class name="API.Node">
<field name= "NodeID"
type = "integer"
requied = "true"
direct = "true"
lazy = "false"
transient = "false"
get-method = "getNodeID()"
set-method = "setNodeID(int id)">
<bind-xml name="NodeID" node="element"/>
</field>
<field name= "edges"
type = "API.Edge"
requied = "true"
direct = "false"
lazy = "false"
transient = "false"
get-method = "getEdges()"
set-method = "setEdges(Vector e)"
collection = "vector">
<bind-xml name="edges"/>
</field>
<field name= "neighbours"
type = "API.Node"
requied = "true"
direct = "false"
lazy = "false"
transient = "false"
get-method = "getNeighbours()"
set-method = "setNeighbours(Vector e)"
collection = "vector">
<bind-xml name="neighbours"/>
</field>
</class>
<class name="GUI.AllGraphDisplays">
.........
</class>
<class name="GUI.EdgeDisplay">
.........
</class>
<class name="GUI.GraphDisplay">
.........
</class>
<class name="GUI.LabelDisplay">
.........
</class>
<class name="GUI.NodeDisplay">
.........
</class>
<class name="GUI.Position">
.........
</class>
</mapping>
