60 |
60 |
Iterator it = nodeRecordList.iterator();
|
61 |
61 |
while (it.hasNext()) {
|
62 |
62 |
NodeRecord currentNode = (NodeRecord)it.next();
|
63 |
|
if (currentNode.nodeid == nodeid) {
|
64 |
|
logMetacat.info("Got Node ID: " + currentNode.nodeid +
|
65 |
|
" (" + currentNode.parentnodeid +
|
66 |
|
", " + currentNode.nodeindex +
|
67 |
|
", " + currentNode.nodetype + ")");
|
|
63 |
if (currentNode.getNodeId() == nodeid) {
|
|
64 |
logMetacat.info("Got Node ID: " + currentNode.getNodeId() +
|
|
65 |
" (" + currentNode.getParentNodeId() +
|
|
66 |
", " + currentNode.getNodeIndex() +
|
|
67 |
", " + currentNode.getNodeType() + ")");
|
68 |
68 |
// Process the current node
|
69 |
|
setNodeType(currentNode.nodetype);
|
70 |
|
setNodeID(currentNode.nodeid);
|
71 |
|
setParentID(currentNode.parentnodeid);
|
72 |
|
setTagName(currentNode.nodename);
|
|
69 |
setNodeType(currentNode.getNodeType());
|
|
70 |
setNodeID(currentNode.getNodeId());
|
|
71 |
setParentID(currentNode.getParentNodeId());
|
|
72 |
setTagName(currentNode.getNodeName());
|
73 |
73 |
} else {
|
74 |
74 |
// Process the children nodes
|
75 |
|
if (currentNode.parentnodeid == getNodeID()) {
|
76 |
|
logMetacat.info(" Processing child: " + currentNode.nodeid +
|
77 |
|
" (" + currentNode.parentnodeid +
|
78 |
|
", " + currentNode.nodeindex +
|
79 |
|
", " + currentNode.nodetype + ")");
|
|
75 |
if (currentNode.getParentNodeId() == getNodeID()) {
|
|
76 |
logMetacat.info(" Processing child: " + currentNode.getNodeId() +
|
|
77 |
" (" + currentNode.getParentNodeId() +
|
|
78 |
", " + currentNode.getNodeIndex() +
|
|
79 |
", " + currentNode.getNodeType() + ")");
|
80 |
80 |
|
81 |
|
if ((currentNode.nodetype).equals("ELEMENT")) {
|
82 |
|
logMetacat.info("Creating child node: " + currentNode.nodeid);
|
|
81 |
if ((currentNode.getNodeType()).equals("ELEMENT")) {
|
|
82 |
logMetacat.info("Creating child node: " + currentNode.getNodeId());
|
83 |
83 |
ElementNode child = new ElementNode(nodeRecordList,
|
84 |
|
currentNode.nodeid);
|
|
84 |
currentNode.getNodeId());
|
85 |
85 |
addChildNode(child);
|
86 |
|
} else if (currentNode.nodetype.equals("ATTRIBUTE")) {
|
87 |
|
setAttribute(currentNode.nodename,currentNode.nodedata);
|
88 |
|
} else if (currentNode.nodetype.equals("TEXT")) {
|
89 |
|
TextNode child = new TextNode(currentNode.nodeid,
|
90 |
|
currentNode.parentnodeid,
|
91 |
|
currentNode.nodedata);
|
|
86 |
} else if (currentNode.getNodeType().equals("ATTRIBUTE")) {
|
|
87 |
setAttribute(currentNode.getNodeName(),currentNode.getNodeData());
|
|
88 |
} else if (currentNode.getNodeType().equals("TEXT")) {
|
|
89 |
TextNode child = new TextNode(currentNode.getNodeId(),
|
|
90 |
currentNode.getParentNodeId(),
|
|
91 |
currentNode.getNodeData());
|
92 |
92 |
addChildNode(child);
|
93 |
|
} else if (currentNode.nodetype.equals("COMMENT")) {
|
94 |
|
CommentNode child = new CommentNode(currentNode.nodeid,
|
95 |
|
currentNode.parentnodeid,
|
96 |
|
currentNode.nodedata);
|
|
93 |
} else if (currentNode.getNodeType().equals("COMMENT")) {
|
|
94 |
CommentNode child = new CommentNode(currentNode.getNodeId(),
|
|
95 |
currentNode.getParentNodeId(),
|
|
96 |
currentNode.getNodeData());
|
97 |
97 |
addChildNode(child);
|
98 |
|
} else if (currentNode.nodetype.equals("PI")) {
|
99 |
|
PINode child = new PINode(currentNode.nodeid,
|
100 |
|
currentNode.parentnodeid,
|
101 |
|
currentNode.nodename,
|
102 |
|
currentNode.nodedata);
|
|
98 |
} else if (currentNode.getNodeType().equals("PI")) {
|
|
99 |
PINode child = new PINode(currentNode.getNodeId(),
|
|
100 |
currentNode.getParentNodeId(),
|
|
101 |
currentNode.getNodeName(),
|
|
102 |
currentNode.getNodeData());
|
103 |
103 |
addChildNode(child);
|
104 |
104 |
}
|
105 |
105 |
|
106 |
106 |
} else {
|
107 |
|
logMetacat.info(" Discarding child: " + currentNode.nodeid +
|
108 |
|
" (" + currentNode.parentnodeid +
|
109 |
|
", " + currentNode.nodeindex +
|
110 |
|
", " + currentNode.nodetype + ")");
|
|
107 |
logMetacat.info(" Discarding child: " + currentNode.getNodeId() +
|
|
108 |
" (" + currentNode.getParentNodeId() +
|
|
109 |
", " + currentNode.getNodeIndex() +
|
|
110 |
", " + currentNode.getNodeType() + ")");
|
111 |
111 |
}
|
112 |
112 |
}
|
113 |
113 |
}
|
Replaced access to NodeRecord.<variable> with NodeRecord.<getVariable>