NXvalidate  1
 All Classes Namespaces Files Functions Variables
Classes | Public Member Functions
org.nexusformat.nxvalidate.NXNodeMapper Class Reference
Inheritance diagram for org.nexusformat.nxvalidate.NXNodeMapper:
Inheritance graph
Collaboration diagram for org.nexusformat.nxvalidate.NXNodeMapper:
Collaboration graph

List of all members.

Classes

class  children
 A class that represents the child nodes of a node from a reduced document.

Public Member Functions

 NXNodeMapper (Node node, boolean isDocument, File nxsFile)
 NXNodeMapper (Node node, boolean isDocument, String nodeName)
 NXNodeMapper (String nodeName)
boolean isRoot ()
 Check to see if this node is the root node.
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.
void setDocument (boolean isDocument)
 Set the flag that says that this node is a documents node i.e.
void setRoot (NXNodeMapper root)
 Set the root node that this node belongs to.
File getNXSFile ()
 Get the NXS file belonging to the root node.
File getNXDLFile ()
 Get the NXDL file belonging to the root node.
void setNXDLFile (File nxdlFile)
 Set the NXDL file belonging to the root node.
File getReducedFile ()
 Get the resultant file produced after NXConvert has been run on the NXS file (reduced to XML).
void setReducedFile (File reducedFile)
 Set the resultant file produced after NXConvert has been run on the NXS file.
File getResultsFile ()
 Get the resultant file produced after the validation procedure has been performed.
void setResultsFile (File resultsFile)
 Get the resultant file produced after the validation procedure has been performed.
Document getResultsDoc ()
 Get the resultant DOM document produced after the validation procedure has been performed.
void setResultsDoc (Document resultsDoc)
 Get the resultant DOM document produced after the validation procedure has been performed.
Document getReducedDoc ()
 Initially the Nexus file is converted to a reduced (all data removed) XML document via the Nexus convert command.
void setReducedDoc (Document reducedDoc)
 Initially the Nexus file is converted to a reduced (all data removed) XML document via the Nexus convert command.
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.
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.
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.
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.
void setValidatedNode (boolean validatedNode)
 If a node has been validated then we can indicate the fact with a boolean flag.
boolean getValidatedNode ()
 If a node has been validated then we can indicate the fact with a boolean flag.
Node getDomNode ()
 Get the W3C DOM node corresponding to this tree node.
void checkBadNode ()
 A convenience method to force the checking if a node is bad (failed schematron tests).
void checkWarnNode ()
 A convenience method to force the checking if a node has warnings
void checkValidatedNode ()
 A convenience method to force the checking if a node has been validated
boolean checkBadChildren ()
 A method to check to see if any of a nodes children are bad.
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.
ArrayList< String > getNodeTexts ()
 This is a list of text strings which correspond to the error message results of the schematron tests.
ArrayList< String > getNodeTests ()
 This is a list of text strings which correspond to the schematron test descriptions.
ArrayList< String > getNodeDiags ()
 This is a list of text strings which correspond to the schematron diagnostic errors.
ArrayList< String > getNodeDiagAtts ()
String toString ()
int getIndex (TreeNode child1)
NXNodeMapper getChildAt (int searchIndex)
int getChildCount ()
Enumeration children ()
boolean isLeaf ()
boolean getAllowsChildren ()
TreeNode getParent ()
NXNodeMapper getRoot ()
String[] getAttributeList ()
 Each node of the reduced XML document may have attributes associated with it, this method provides a list of the attributes.
String getValue ()
 Each node of the reduced XML document may have a value associated with it.
ArrayList< NXNodeMappergetOpenNodes ()
 Returns a list of nodes that represent the Nexus documents that are open i.e.
void removeAllNodes ()
 Removes the list of nodes that represent the Nexus documents that are open i.e.
boolean hasBadChildren ()
 Check to see if the node has any vary bad kids, return true if it has.
void insert (MutableTreeNode child, int index)
void remove (int index)
void remove (MutableTreeNode node)
void removeFromParent ()
void setParent (MutableTreeNode newParent)
void setUserObject (Object object)

Detailed Description

Author:
Stephen Rankin

Definition at line 44 of file NXNodeMapper.java.


Constructor & Destructor Documentation

org.nexusformat.nxvalidate.NXNodeMapper.NXNodeMapper ( Node  node,
boolean  isDocument,
File  nxsFile 
)
org.nexusformat.nxvalidate.NXNodeMapper.NXNodeMapper ( Node  node,
boolean  isDocument,
String  nodeName 
)
org.nexusformat.nxvalidate.NXNodeMapper.NXNodeMapper ( String  nodeName)

Definition at line 99 of file NXNodeMapper.java.

References org.nexusformat.nxvalidate.NXNodeMapper.isRoot().

Here is the call graph for this function:


Member Function Documentation

boolean org.nexusformat.nxvalidate.NXNodeMapper.checkBadChildren ( )

A method to check to see if any of a nodes children are bad.

Returns:
true if there are any bad children

Definition at line 358 of file NXNodeMapper.java.

References org.nexusformat.nxvalidate.NXNodeMapper.isRoot().

Here is the call graph for this function:

void org.nexusformat.nxvalidate.NXNodeMapper.checkBadNode ( )

A convenience method to force the checking if a node is bad (failed schematron tests).

Sets the flag to indicate the node is bad.

Definition at line 318 of file NXNodeMapper.java.

References org.nexusformat.nxvalidate.NXNodeMapper.isRoot().

Referenced by org.nexusformat.nxvalidate.NXNodeMapper.getBadNode(), and org.nexusformat.nxvalidate.TreeUtils.hideGoodNodes().

Here is the call graph for this function:

void org.nexusformat.nxvalidate.NXNodeMapper.checkValidatedNode ( )

A convenience method to force the checking if a node has been validated

Sets the flag to indicate the node has warnings.

Definition at line 344 of file NXNodeMapper.java.

References org.nexusformat.nxvalidate.NXNodeMapper.isRoot().

Referenced by org.nexusformat.nxvalidate.NXNodeMapper.getValidatedNode().

Here is the call graph for this function:

void org.nexusformat.nxvalidate.NXNodeMapper.checkWarnNode ( )

A convenience method to force the checking if a node has warnings

Sets the flag to indicate the node has warnings.

Definition at line 331 of file NXNodeMapper.java.

References org.nexusformat.nxvalidate.NXNodeMapper.isRoot().

Referenced by org.nexusformat.nxvalidate.NXNodeMapper.getWarnNode().

Here is the call graph for this function:

Enumeration org.nexusformat.nxvalidate.NXNodeMapper.children ( )
boolean org.nexusformat.nxvalidate.NXNodeMapper.getAllowsChildren ( )

Definition at line 552 of file NXNodeMapper.java.

String [] org.nexusformat.nxvalidate.NXNodeMapper.getAttributeList ( )

Each node of the reduced XML document may have attributes associated with it, this method provides a list of the attributes.

Each string contains the attribute name and the value.

Returns:
a list of the attributes and their values.

Definition at line 632 of file NXNodeMapper.java.

References org.nexusformat.nxvalidate.NXNodeMapper.isRoot().

Referenced by org.nexusformat.nxvalidate.TextPaneStyle.updateTextPane().

Here is the call graph for this function:

boolean org.nexusformat.nxvalidate.NXNodeMapper.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.

The flag is set to true if the node failed one of the tests.

Returns:
true if the node failed one of the schematron tests.

Definition at line 259 of file NXNodeMapper.java.

References org.nexusformat.nxvalidate.NXNodeMapper.checkBadNode().

Referenced by org.nexusformat.nxvalidate.XMLTreeRenderer.getTreeCellRendererComponent(), and org.nexusformat.nxvalidate.TextPaneStyle.updateTextPane().

Here is the call graph for this function:

NXNodeMapper org.nexusformat.nxvalidate.NXNodeMapper.getChildAt ( int  searchIndex)
int org.nexusformat.nxvalidate.NXNodeMapper.getChildCount ( )
Node org.nexusformat.nxvalidate.NXNodeMapper.getDomNode ( )

Get the W3C DOM node corresponding to this tree node.

Returns:
the W3C DOM node corresponding to this tree node.

Definition at line 310 of file NXNodeMapper.java.

int org.nexusformat.nxvalidate.NXNodeMapper.getIndex ( TreeNode  child1)
ArrayList<String> org.nexusformat.nxvalidate.NXNodeMapper.getNodeDiagAtts ( )

Definition at line 460 of file NXNodeMapper.java.

References org.nexusformat.nxvalidate.NXNodeMapper.isRoot().

Here is the call graph for this function:

ArrayList<String> org.nexusformat.nxvalidate.NXNodeMapper.getNodeDiags ( )

This is a list of text strings which correspond to the schematron diagnostic errors.

Returns:
list of text strings corresponding to the schematron diagnostic errors.

Definition at line 452 of file NXNodeMapper.java.

References org.nexusformat.nxvalidate.NXNodeMapper.isRoot().

Here is the call graph for this function:

ArrayList<String> org.nexusformat.nxvalidate.NXNodeMapper.getNodeTests ( )

This is a list of text strings which correspond to the schematron test descriptions.

Returns:
list of text strings corresponding to the schematron test descriptions.

Definition at line 438 of file NXNodeMapper.java.

References org.nexusformat.nxvalidate.NXNodeMapper.isRoot().

Here is the call graph for this function:

ArrayList<String> org.nexusformat.nxvalidate.NXNodeMapper.getNodeTexts ( )

This is a list of text strings which correspond to the error message results of the schematron tests.

Returns:
list of text strings corresponding to the schematron test results.

Definition at line 424 of file NXNodeMapper.java.

References org.nexusformat.nxvalidate.NXNodeMapper.isRoot().

Here is the call graph for this function:

File org.nexusformat.nxvalidate.NXNodeMapper.getNXDLFile ( )

Get the NXDL file belonging to the root node.

Any other node should return null

Returns:
the NXDL file as a File object.

Definition at line 155 of file NXNodeMapper.java.

Referenced by org.nexusformat.nxvalidate.TreeUtils.getNXDLFile().

File org.nexusformat.nxvalidate.NXNodeMapper.getNXSFile ( )

Get the NXS file belonging to the root node.

Any other node should return null

Returns:
the NXS file as a File object.

Definition at line 146 of file NXNodeMapper.java.

ArrayList<NXNodeMapper> org.nexusformat.nxvalidate.NXNodeMapper.getOpenNodes ( )

Returns a list of nodes that represent the Nexus documents that are open i.e.

that have been reduced.

Returns:
a list of Nexus document nodes.

Definition at line 752 of file NXNodeMapper.java.

TreeNode org.nexusformat.nxvalidate.NXNodeMapper.getParent ( )
Document org.nexusformat.nxvalidate.NXNodeMapper.getReducedDoc ( )

Initially the Nexus file is converted to a reduced (all data removed) XML document via the Nexus convert command.

This method gets the W3C DOM document of the reduced XML file.

Returns:
the W3C DOM document of the reduced XML file.

Definition at line 228 of file NXNodeMapper.java.

Referenced by org.nexusformat.nxvalidate.TreeUtils.getReducedDoc().

File org.nexusformat.nxvalidate.NXNodeMapper.getReducedFile ( )

Get the resultant file produced after NXConvert has been run on the NXS file (reduced to XML).

Returns:
the NXConvert reduced file.

Definition at line 173 of file NXNodeMapper.java.

Referenced by org.nexusformat.nxvalidate.TreeUtils.getReducedFile(), and org.nexusformat.nxvalidate.FileActions.saveResults().

Document org.nexusformat.nxvalidate.NXNodeMapper.getResultsDoc ( )

Get the resultant DOM document produced after the validation procedure has been performed.

Returns:
the validation results DOM document.

Definition at line 209 of file NXNodeMapper.java.

Referenced by org.nexusformat.nxvalidate.TreeUtils.getResultsDoc().

File org.nexusformat.nxvalidate.NXNodeMapper.getResultsFile ( )

Get the resultant file produced after the validation procedure has been performed.

Returns:
the validation results file.

Definition at line 191 of file NXNodeMapper.java.

Referenced by org.nexusformat.nxvalidate.TreeUtils.getResultsFile(), org.nexusformat.nxvalidate.FileActions.saveResults(), and org.nexusformat.nxvalidate.TreeUtils.setValidated().

NXNodeMapper org.nexusformat.nxvalidate.NXNodeMapper.getRoot ( )
boolean org.nexusformat.nxvalidate.NXNodeMapper.getValidatedNode ( )

If a node has been validated then we can indicate the fact with a boolean flag.

The flag is set to true if the node has been validated.

Returns:
true if the node failed one of the schematron tests.

Definition at line 301 of file NXNodeMapper.java.

References org.nexusformat.nxvalidate.NXNodeMapper.checkValidatedNode().

Referenced by org.nexusformat.nxvalidate.XMLTreeRenderer.getTreeCellRendererComponent().

Here is the call graph for this function:

String org.nexusformat.nxvalidate.NXNodeMapper.getValue ( )

Each node of the reduced XML document may have a value associated with it.

This method returns that value as a string.

Returns:
the value of the XML node.

Definition at line 671 of file NXNodeMapper.java.

References org.nexusformat.nxvalidate.NXNodeMapper.isRoot().

Referenced by org.nexusformat.nxvalidate.TextPaneStyle.updateTextPane().

Here is the call graph for this function:

boolean org.nexusformat.nxvalidate.NXNodeMapper.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.

The flag is set to true if the node failed one of the tests.

Returns:
true if the node failed one of the schematron tests.

Definition at line 281 of file NXNodeMapper.java.

References org.nexusformat.nxvalidate.NXNodeMapper.checkWarnNode().

Referenced by org.nexusformat.nxvalidate.XMLTreeRenderer.getTreeCellRendererComponent(), and org.nexusformat.nxvalidate.TextPaneStyle.updateTextPane().

Here is the call graph for this function:

boolean org.nexusformat.nxvalidate.NXNodeMapper.hasBadChildren ( )

Check to see if the node has any vary bad kids, return true if it has.

Returns:
true if the kids are bad.

Definition at line 769 of file NXNodeMapper.java.

References org.nexusformat.nxvalidate.TreeUtils.hasBadChildren().

Referenced by org.nexusformat.nxvalidate.XMLTreeRenderer.getTreeCellRendererComponent().

Here is the call graph for this function:

void org.nexusformat.nxvalidate.NXNodeMapper.insert ( MutableTreeNode  child,
int  index 
)
boolean org.nexusformat.nxvalidate.NXNodeMapper.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.

Returns:
true if the node is a document node.

Definition at line 120 of file NXNodeMapper.java.

Referenced by org.nexusformat.nxvalidate.NXNodeMapper.getParent(), org.nexusformat.nxvalidate.NXNodeMapper.getRoot(), org.nexusformat.nxvalidate.NXNodeMapper.NXNodeMapper(), and org.nexusformat.nxvalidate.NXNodeMapper.setDocument().

boolean org.nexusformat.nxvalidate.NXNodeMapper.isLeaf ( )
boolean org.nexusformat.nxvalidate.NXNodeMapper.isRoot ( )
void org.nexusformat.nxvalidate.NXNodeMapper.remove ( int  index)

Definition at line 870 of file NXNodeMapper.java.

References org.nexusformat.nxvalidate.NXNodeMapper.isRoot().

Referenced by org.nexusformat.nxvalidate.NXNodeMapper.removeFromParent().

Here is the call graph for this function:

void org.nexusformat.nxvalidate.NXNodeMapper.remove ( MutableTreeNode  node)

Definition at line 896 of file NXNodeMapper.java.

References org.nexusformat.nxvalidate.NXNodeMapper.isRoot(), and org.nexusformat.nxvalidate.NXNodeMapper.NXNodeMapper().

Here is the call graph for this function:

void org.nexusformat.nxvalidate.NXNodeMapper.removeAllNodes ( )

Removes the list of nodes that represent the Nexus documents that are open i.e.

that have been reduced.

Definition at line 760 of file NXNodeMapper.java.

void org.nexusformat.nxvalidate.NXNodeMapper.removeFromParent ( )
void org.nexusformat.nxvalidate.NXNodeMapper.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.

Definition at line 409 of file NXNodeMapper.java.

void org.nexusformat.nxvalidate.NXNodeMapper.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.

The flag is set to true if the node failed one of the tests.

Parameters:
badNodetrue if the node failed one of the schematron tests.

Definition at line 248 of file NXNodeMapper.java.

void org.nexusformat.nxvalidate.NXNodeMapper.setDocument ( boolean  isDocument)

Set the flag that says that this node is a documents node i.e.

one of the list of nodes directly under the root node that are the open NXS documents.

Parameters:
isDocumenta flag which is true if the node is a document node.

Definition at line 129 of file NXNodeMapper.java.

References org.nexusformat.nxvalidate.NXNodeMapper.isDocument().

Here is the call graph for this function:

void org.nexusformat.nxvalidate.NXNodeMapper.setNXDLFile ( File  nxdlFile)

Set the NXDL file belonging to the root node.

Should not be set.

Parameters:
nxdlFilethe NXDL file as a File object.

Definition at line 163 of file NXNodeMapper.java.

Referenced by org.nexusformat.nxvalidate.FileActions.loadFile(), and org.nexusformat.nxvalidate.TreeUtils.setNXDLFile().

void org.nexusformat.nxvalidate.NXNodeMapper.setParent ( MutableTreeNode  newParent)

Definition at line 936 of file NXNodeMapper.java.

void org.nexusformat.nxvalidate.NXNodeMapper.setReducedDoc ( Document  reducedDoc)

Initially the Nexus file is converted to a reduced (all data removed) XML document via the Nexus convert command.

This method sets the W3C DOM document of the reduced XML file.

Parameters:
reducedDocthe W3C DOM document of the reduced XML file.

Definition at line 238 of file NXNodeMapper.java.

Referenced by org.nexusformat.nxvalidate.FileActions.loadFile(), and org.nexusformat.nxvalidate.TreeUtils.setReducedDoc().

void org.nexusformat.nxvalidate.NXNodeMapper.setReducedFile ( File  reducedFile)

Set the resultant file produced after NXConvert has been run on the NXS file.

Parameters:
reducedFilethe NXConvert reduced file.

Definition at line 182 of file NXNodeMapper.java.

Referenced by org.nexusformat.nxvalidate.FileActions.loadFile(), and org.nexusformat.nxvalidate.TreeUtils.setReducedFile().

void org.nexusformat.nxvalidate.NXNodeMapper.setResultsDoc ( Document  resultsDoc)

Get the resultant DOM document produced after the validation procedure has been performed.

Parameters:
resultsDocthe validation results DOM document.

Definition at line 218 of file NXNodeMapper.java.

Referenced by org.nexusformat.nxvalidate.TreeUtils.setResultsDoc().

void org.nexusformat.nxvalidate.NXNodeMapper.setResultsFile ( File  resultsFile)

Get the resultant file produced after the validation procedure has been performed.

Parameters:
resultsFilethe validation results file.

Definition at line 200 of file NXNodeMapper.java.

Referenced by org.nexusformat.nxvalidate.TreeUtils.setResultsFile().

void org.nexusformat.nxvalidate.NXNodeMapper.setRoot ( NXNodeMapper  root)

Set the root node that this node belongs to.

Parameters:
rootthe root node.

Definition at line 137 of file NXNodeMapper.java.

Referenced by org.nexusformat.nxvalidate.FileActions.loadFile().

void org.nexusformat.nxvalidate.NXNodeMapper.setUserObject ( Object  object)

Definition at line 939 of file NXNodeMapper.java.

void org.nexusformat.nxvalidate.NXNodeMapper.setValidatedNode ( boolean  validatedNode)

If a node has been validated then we can indicate the fact with a boolean flag.

The flag is set to true if the node has been validated.

Parameters:
validatedNodetrue if the node has been validated.

Definition at line 291 of file NXNodeMapper.java.

Referenced by org.nexusformat.nxvalidate.TreeUtils.setValidated().

void org.nexusformat.nxvalidate.NXNodeMapper.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.

The flag is set to true if the node failed one of the tests.

Parameters:
warnNodetrue if the node failed one of the schematron tests.

Definition at line 270 of file NXNodeMapper.java.

String org.nexusformat.nxvalidate.NXNodeMapper.toString ( )

The documentation for this class was generated from the following file: