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-27 19:36:26 -0700 (Tue, 27 Jun 2000) $'
|
11
|
* '$Revision: 219 $'
|
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) {
|
33
|
setNodeID(nodeid);
|
34
|
setParentID(parentnodeid);
|
35
|
setNodeData(nodedata);
|
36
|
setNodeType("TEXT");
|
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.7 2000/06/26 10:35:05 jones
|
60
|
* 'Merged in substantial changes to DBWriter and associated classes and to
|
61
|
* 'the MetaCatServlet in order to accomodate the new UPDATE and DELETE
|
62
|
* 'functions. The command line tools and the parameters for the
|
63
|
* 'servlet have changed substantially.
|
64
|
* '
|
65
|
* 'Revision 1.6.2.2 2000/06/25 23:38:17 jones
|
66
|
* 'Added RCSfile keyword
|
67
|
* '
|
68
|
* 'Revision 1.6.2.1 2000/06/25 23:34:18 jones
|
69
|
* 'Changed documentation formatting, added log entries at bottom of source files
|
70
|
* ''
|
71
|
*/
|