public class NXNodeMapper
extends java.lang.Object
implements javax.swing.tree.MutableTreeNode
| Constructor and Description |
|---|
NXNodeMapper(org.w3c.dom.Node node,
boolean isDocument,
java.io.File nxsFile) |
NXNodeMapper(org.w3c.dom.Node node,
boolean isDocument,
java.lang.String nodeName) |
NXNodeMapper(java.lang.String nodeName) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
checkBadChildren()
A method to check to see if any of a nodes children are bad.
|
void |
checkBadNode()
A convenience method to force the checking if a node is bad
(failed schematron tests).
|
void |
checkValidatedNode()
A convenience method to force the checking if a node has been validated
.
|
void |
checkWarnNode()
A convenience method to force the checking if a node has warnings
.
|
java.util.Enumeration |
children() |
boolean |
getAllowsChildren() |
java.lang.String[] |
getAttributeList()
Each node of the reduced XML document may have attributes associated
with it, this method provides a list of the attributes.
|
boolean |
getBadNode()
If a node in the reduced XML document fails one of the schematron tests
then the node can be marked as a bad node with a boolean flag.
|
NXNodeMapper |
getChildAt(int searchIndex) |
int |
getChildCount() |
org.w3c.dom.Node |
getDomNode()
Get the W3C DOM node corresponding to this tree node.
|
int |
getIndex(javax.swing.tree.TreeNode child1) |
java.util.ArrayList<java.lang.String> |
getNodeDiagAtts() |
java.util.ArrayList<java.lang.String> |
getNodeDiags()
This is a list of text strings which correspond to the schematron
diagnostic errors.
|
java.util.ArrayList<java.lang.String> |
getNodeTests()
This is a list of text strings which correspond to the schematron
test descriptions.
|
java.util.ArrayList<java.lang.String> |
getNodeTexts()
This is a list of text strings which correspond to the error message
results of the schematron tests.
|
java.io.File |
getNXDLFile()
Get the NXDL file belonging to the root node.
|
java.io.File |
getNXSFile()
Get the NXS file belonging to the root node.
|
java.util.ArrayList<NXNodeMapper> |
getOpenNodes()
Returns a list of nodes that represent the Nexus documents that are open
i.e.
|
javax.swing.tree.TreeNode |
getParent() |
org.w3c.dom.Document |
getReducedDoc()
Initially the Nexus file is converted to a reduced (all data removed)
XML document via the Nexus convert command.
|
java.io.File |
getReducedFile()
Get the resultant file produced after NXConvert has been run on the
NXS file
(reduced to XML).
|
org.w3c.dom.Document |
getResultsDoc()
Get the resultant DOM document produced after the validation procedure
has been performed.
|
java.io.File |
getResultsFile()
Get the resultant file produced after the validation procedure has been
performed.
|
NXNodeMapper |
getRoot() |
boolean |
getValidatedNode()
If a node has been validated then we can indicate the fact with a boolean flag.
|
java.lang.String |
getValue()
Each node of the reduced XML document may have a value associated with it.
|
boolean |
getWarnNode()
If a node in the reduced XML document fails one of the schematron report tests
then the node can be marked as a warning node with a boolean flag.
|
boolean |
hasBadChildren()
Check to see if the node has any vary bad kids, return true if it has.
|
void |
insert(javax.swing.tree.MutableTreeNode child,
int index) |
boolean |
isDocument()
Check to see if this node is a document, i.e the list of nodes directly
under the root node that are the open NXS documents.
|
boolean |
isLeaf() |
boolean |
isRoot()
Check to see if this node is the root node.
|
void |
remove(int index) |
void |
remove(javax.swing.tree.MutableTreeNode node) |
void |
removeAllNodes()
Removes the list of nodes that represent the Nexus documents that are
open i.e.
|
void |
removeFromParent() |
void |
resetNode()
Resets the various properties of a node, i.e flag to indicate that it
is a bad node, the text for the tests that failed etc.
|
void |
setBadNode(boolean badNode)
If a node in the reduced XML document fails one of the schematron tests
then the node can be marked as a bad node with a boolean flag.
|
void |
setDocument(boolean isDocument)
Set the flag that says that this node is a documents node i.e.
|
void |
setNXDLFile(java.io.File nxdlFile)
Set the NXDL file belonging to the root node.
|
void |
setParent(javax.swing.tree.MutableTreeNode newParent) |
void |
setReducedDoc(org.w3c.dom.Document reducedDoc)
Initially the Nexus file is converted to a reduced (all data removed)
XML document via the Nexus convert command.
|
void |
setReducedFile(java.io.File reducedFile)
Set the resultant file produced after NXConvert has been run on the
NXS file.
|
void |
setResultsDoc(org.w3c.dom.Document resultsDoc)
Get the resultant DOM document produced after the validation procedure
has been performed.
|
void |
setResultsFile(java.io.File resultsFile)
Get the resultant file produced after the validation procedure has been
performed.
|
void |
setRoot(NXNodeMapper root)
Set the root node that this node belongs to.
|
void |
setUserObject(java.lang.Object object) |
void |
setValidatedNode(boolean validatedNode)
If a node has been validated then we can indicate the fact with a boolean flag.
|
void |
setWarnNode(boolean warnNode)
If a node in the reduced XML document fails one of the schematron report tests
then the node can be marked as a warning node with a boolean flag.
|
java.lang.String |
toString() |
public NXNodeMapper(org.w3c.dom.Node node,
boolean isDocument,
java.io.File nxsFile)
public NXNodeMapper(org.w3c.dom.Node node,
boolean isDocument,
java.lang.String nodeName)
public NXNodeMapper(java.lang.String nodeName)
public boolean isRoot()
public boolean isDocument()
public void setDocument(boolean isDocument)
isDocument - a flag which is true if the node is a document node.public void setRoot(NXNodeMapper root)
root - the root node.public java.io.File getNXSFile()
public java.io.File getNXDLFile()
public void setNXDLFile(java.io.File nxdlFile)
nxdlFile - the NXDL file as a File object.public java.io.File getReducedFile()
public void setReducedFile(java.io.File reducedFile)
reducedFile - the NXConvert reduced file.public java.io.File getResultsFile()
public void setResultsFile(java.io.File resultsFile)
resultsFile - the validation results file.public org.w3c.dom.Document getResultsDoc()
public void setResultsDoc(org.w3c.dom.Document resultsDoc)
resultsDoc - the validation results DOM document.public org.w3c.dom.Document getReducedDoc()
public void setReducedDoc(org.w3c.dom.Document reducedDoc)
reducedDoc - the W3C DOM document of the reduced XML file.public void setBadNode(boolean badNode)
badNode - true if the node failed one of the schematron tests.public boolean getBadNode()
public void setWarnNode(boolean warnNode)
warnNode - true if the node failed one of the schematron tests.public boolean getWarnNode()
public void setValidatedNode(boolean validatedNode)
validatedNode - true if the node has been validated.public boolean getValidatedNode()
public org.w3c.dom.Node getDomNode()
public void checkBadNode()
public void checkWarnNode()
public void checkValidatedNode()
public boolean checkBadChildren()
public void resetNode()
public java.util.ArrayList<java.lang.String> getNodeTexts()
public java.util.ArrayList<java.lang.String> getNodeTests()
public java.util.ArrayList<java.lang.String> getNodeDiags()
public java.util.ArrayList<java.lang.String> getNodeDiagAtts()
public java.lang.String toString()
toString in class java.lang.Objectpublic int getIndex(javax.swing.tree.TreeNode child1)
getIndex in interface javax.swing.tree.TreeNodepublic NXNodeMapper getChildAt(int searchIndex)
getChildAt in interface javax.swing.tree.TreeNodepublic int getChildCount()
getChildCount in interface javax.swing.tree.TreeNodepublic java.util.Enumeration children()
children in interface javax.swing.tree.TreeNodepublic boolean isLeaf()
isLeaf in interface javax.swing.tree.TreeNodepublic boolean getAllowsChildren()
getAllowsChildren in interface javax.swing.tree.TreeNodepublic javax.swing.tree.TreeNode getParent()
getParent in interface javax.swing.tree.TreeNodepublic NXNodeMapper getRoot()
public java.lang.String[] getAttributeList()
public java.lang.String getValue()
public java.util.ArrayList<NXNodeMapper> getOpenNodes()
public void removeAllNodes()
public boolean hasBadChildren()
public void insert(javax.swing.tree.MutableTreeNode child,
int index)
insert in interface javax.swing.tree.MutableTreeNodepublic void remove(int index)
remove in interface javax.swing.tree.MutableTreeNodepublic void remove(javax.swing.tree.MutableTreeNode node)
remove in interface javax.swing.tree.MutableTreeNodepublic void removeFromParent()
removeFromParent in interface javax.swing.tree.MutableTreeNodepublic void setParent(javax.swing.tree.MutableTreeNode newParent)
setParent in interface javax.swing.tree.MutableTreeNodepublic void setUserObject(java.lang.Object object)
setUserObject in interface javax.swing.tree.MutableTreeNode