1
|
/**
|
2
|
* Name: ReaderElement.java
|
3
|
* Purpose: A Class that represents an XML element and its contents,
|
4
|
* and can build itself from a database connection
|
5
|
* Institution: National Center for Ecological Analysis and Synthesis
|
6
|
* Copyright: 2000
|
7
|
* Authors: Matt Jones
|
8
|
*
|
9
|
* Version: '$Id: ReaderElement.java 21 2000-04-11 20:26:43Z jones $'
|
10
|
*/
|
11
|
|
12
|
//package project;
|
13
|
|
14
|
import java.sql.*;
|
15
|
import java.io.IOException;
|
16
|
import java.util.Hashtable;
|
17
|
import java.util.Enumeration;
|
18
|
|
19
|
public class ReaderElement extends BasicElement {
|
20
|
|
21
|
private Connection conn;
|
22
|
|
23
|
public ReaderElement (Connection conn, long nodeid) {
|
24
|
|
25
|
this.conn = conn;
|
26
|
//Lookup data for self
|
27
|
String tagname = "foo";
|
28
|
long parent_id = 999;
|
29
|
super(tagname, parent_id);
|
30
|
|
31
|
//Lookup list of child nodes
|
32
|
//foreach childnode (childid,childtype)
|
33
|
// if (type.equals("ATTRIBUTE")) {
|
34
|
// add the att to attribute hash
|
35
|
// else (type.equals("ELEMENT")) {
|
36
|
// ReaderElement child = new ReaderElement(childid);
|
37
|
// add child to vector of children
|
38
|
// }
|
39
|
//}
|
40
|
|
41
|
}
|
42
|
}
|