Revision 1414
Added by Jing Tao almost 22 years ago
src/edu/ucsb/nceas/metacat/SubTree.java | ||
---|---|---|
1 |
/** |
|
2 |
* '$RCSfile$' |
|
3 |
* Purpose: A Class that represents an XML Text node and its contents, |
|
4 |
* and can build itself from a database connection |
|
5 |
* Copyright: 2000 Regents of the University of California and the |
|
6 |
* National Center for Ecological Analysis and Synthesis |
|
7 |
* Authors: Matt Jones |
|
8 |
* Release: @release@ |
|
9 |
* |
|
10 |
* '$Author$' |
|
11 |
* '$Date$' |
|
12 |
* '$Revision$' |
|
13 |
* |
|
14 |
* This program is free software; you can redistribute it and/or modify |
|
15 |
* it under the terms of the GNU General Public License as published by |
|
16 |
* the Free Software Foundation; either version 2 of the License, or |
|
17 |
* (at your option) any later version. |
|
18 |
* |
|
19 |
* This program is distributed in the hope that it will be useful, |
|
20 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
21 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
22 |
* GNU General Public License for more details. |
|
23 |
* |
|
24 |
* You should have received a copy of the GNU General Public License |
|
25 |
* along with this program; if not, write to the Free Software |
|
26 |
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
|
27 |
*/ |
|
28 |
|
|
29 |
package edu.ucsb.nceas.metacat; |
|
30 |
|
|
31 |
/** |
|
32 |
* A Class that represents an XML Subtree |
|
33 |
*/ |
|
34 |
public class SubTree |
|
35 |
{ |
|
36 |
private String subTreeId = null; |
|
37 |
private String startElementName = null; |
|
38 |
private long startNodeId = -1; |
|
39 |
private long endNodeId = -1; |
|
40 |
|
|
41 |
/** Set the a subtreeId */ |
|
42 |
public void setSubTreeId(String myId) |
|
43 |
{ |
|
44 |
MetaCatUtil.debugMessage("set sub tree id: "+myId); |
|
45 |
this.subTreeId = myId; |
|
46 |
} |
|
47 |
|
|
48 |
/** Get the subTreeId */ |
|
49 |
public String getSubTreeId() |
|
50 |
{ |
|
51 |
return this.subTreeId; |
|
52 |
} |
|
53 |
|
|
54 |
/** |
|
55 |
* Set a startElementName |
|
56 |
*/ |
|
57 |
public void setStartElementName(String elementName) |
|
58 |
{ |
|
59 |
MetaCatUtil.debugMessage("set start elementname: "+elementName); |
|
60 |
this.startElementName = elementName; |
|
61 |
} |
|
62 |
|
|
63 |
/** |
|
64 |
* Get startElementName |
|
65 |
*/ |
|
66 |
public String getStartElementName() |
|
67 |
{ |
|
68 |
return this.startElementName; |
|
69 |
} |
|
70 |
|
|
71 |
/** Set a start node id */ |
|
72 |
public void setStartNodeId(long nodeId) |
|
73 |
{ |
|
74 |
MetaCatUtil.debugMessage("set start node id: "+nodeId); |
|
75 |
this.startNodeId = nodeId; |
|
76 |
} |
|
77 |
|
|
78 |
/** Get start node id */ |
|
79 |
public long getStartNodeId() |
|
80 |
{ |
|
81 |
return this.startNodeId; |
|
82 |
} |
|
83 |
|
|
84 |
/** Set a end node id */ |
|
85 |
public void setEndNodeId(long nodeId) |
|
86 |
{ |
|
87 |
MetaCatUtil.debugMessage("set end node id: "+nodeId); |
|
88 |
this.endNodeId = nodeId; |
|
89 |
} |
|
90 |
|
|
91 |
/** Get end node id */ |
|
92 |
public long getEndNodeId() |
|
93 |
{ |
|
94 |
return this.endNodeId; |
|
95 |
} |
|
96 |
|
|
97 |
} |
|
0 | 98 |
Also available in: Unified diff
A new class to store info about sub tree.