1
|
/**
|
2
|
* '$RCSfile$'
|
3
|
* Purpose: A Class that represents an XML PI 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 PI node and its contents,
|
18
|
*/
|
19
|
public class PINode extends BasicNode {
|
20
|
|
21
|
private String nodeData = null;
|
22
|
|
23
|
/**
|
24
|
* Construct a new PINode instance
|
25
|
*
|
26
|
* @param nodeid the id for the node to be created
|
27
|
* @param parentnodeid the id of the parent node
|
28
|
* @param nodename the name of the PI node
|
29
|
* @param nodedata the contents of the PI node
|
30
|
*/
|
31
|
public PINode (long nodeid, long parentnodeid, String nodename,
|
32
|
String nodedata) {
|
33
|
setNodeID(nodeid);
|
34
|
setParentID(parentnodeid);
|
35
|
setTagName(nodename);
|
36
|
setNodeData(nodedata);
|
37
|
setNodeType("PI");
|
38
|
}
|
39
|
|
40
|
/** Set the node data to the given string */
|
41
|
public void setNodeData(String nodedata) {
|
42
|
this.nodeData = nodedata;
|
43
|
}
|
44
|
|
45
|
/** Get the node data as a string value */
|
46
|
public String getNodeData() {
|
47
|
return nodeData;
|
48
|
}
|
49
|
|
50
|
/**
|
51
|
* String representation of this text node
|
52
|
*/
|
53
|
public String toString () {
|
54
|
return ("<?" + getTagName() + " " + nodeData + " ?>");
|
55
|
}
|
56
|
}
|
57
|
|
58
|
/**
|
59
|
* '$Log$
|
60
|
*/
|