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
|
*
|
9
|
* '$Author: jones $'
|
10
|
* '$Date: 2000-06-26 03:35:05 -0700 (Mon, 26 Jun 2000) $'
|
11
|
* '$Revision: 203 $'
|
12
|
*/
|
13
|
|
14
|
package edu.ucsb.nceas.metacat;
|
15
|
|
16
|
/**
|
17
|
* A Class that represents an XML Text node and its contents,
|
18
|
*/
|
19
|
public class TextNode extends BasicNode {
|
20
|
|
21
|
private String nodeData = null;
|
22
|
|
23
|
/**
|
24
|
* Construct a new TextNode instance
|
25
|
*
|
26
|
* @param nodeid the element_id for the node to be created
|
27
|
* @param parentnodeid the id of the parent node
|
28
|
* @param nodedata the text of the node
|
29
|
* @param nodetype the type of the node
|
30
|
*/
|
31
|
public TextNode (long nodeid, long parentnodeid,
|
32
|
String nodedata, String nodetype) {
|
33
|
setNodeID(nodeid);
|
34
|
setParentID(parentnodeid);
|
35
|
setNodeData(nodedata);
|
36
|
setNodeType(nodetype);
|
37
|
}
|
38
|
|
39
|
/** Set the node data to the given string */
|
40
|
public void setNodeData(String nodedata) {
|
41
|
this.nodeData = nodedata;
|
42
|
}
|
43
|
|
44
|
/** Get the node data as a string value */
|
45
|
public String getNodeData() {
|
46
|
return nodeData;
|
47
|
}
|
48
|
|
49
|
/**
|
50
|
* String representation of this text node
|
51
|
*/
|
52
|
public String toString () {
|
53
|
return nodeData;
|
54
|
}
|
55
|
}
|
56
|
|
57
|
/**
|
58
|
* '$Log$
|
59
|
* 'Revision 1.6.2.2 2000/06/25 23:38:17 jones
|
60
|
* 'Added RCSfile keyword
|
61
|
* '
|
62
|
* 'Revision 1.6.2.1 2000/06/25 23:34:18 jones
|
63
|
* 'Changed documentation formatting, added log entries at bottom of source files
|
64
|
* ''
|
65
|
*/
|