Project

General

Profile

« Previous | Next » 

Revision 157

Added by Matt Jones over 24 years ago

minor changes to TextNode

View differences:

src/edu/ucsb/nceas/metacat/ElementNode.java
182 182
                } else if (nodetype.equals("ATTRIBUTE")) {
183 183
                  setAttribute(nodename,nodedata);
184 184
                } else if (nodetype.equals("TEXT")) {
185
                  TextNode child = new TextNode(conn,
186
                                element_id,parentnodeid,nodedata,nodetype);
185
                  TextNode child = new TextNode(element_id,parentnodeid,
186
                                                nodedata,nodetype);
187 187
                  addChildNode(child);
188 188
                } 
189 189

  
src/edu/ucsb/nceas/metacat/TextNode.java
11 11

  
12 12
package edu.ucsb.nceas.metacat;
13 13

  
14
import java.sql.*;
15

  
16 14
/**
17 15
 * A Class that represents an XML Text node and its contents,
18
 * and can build itself from a database connection
19 16
 */
20 17
public class TextNode extends BasicNode {
21 18

  
22
    private Connection	conn;
23 19
    private String      nodeData = null;
24 20

  
25 21
    /** 
26 22
     * Construct a new TextNode instance
27 23
     *
28
     * @param conn the database connection to use to initialize 
29 24
     * @param nodeid the element_id for the node to be created
30 25
     * @param parentnodeid the id of the parent node
31 26
     * @param nodedata the text of the node
32 27
     * @param nodetype the type of the node
33 28
     */
34
    public TextNode (Connection conn, long nodeid, long parentnodeid,
29
    public TextNode (long nodeid, long parentnodeid,
35 30
                          String nodedata, String nodetype) {
36
      this.conn = conn;
37 31
      setNodeID(nodeid);
38 32
      setParentID(parentnodeid);
39 33
      setNodeData(nodedata);

Also available in: Unified diff