cs.arizona.util
Class SchemaPathEvaluator

java.lang.Object
  extended by cs.arizona.util.SchemaPathEvaluator

public class SchemaPathEvaluator
extends java.lang.Object

Author:
spjoshi TODO 1) Following element types are supported 2) Following element types are not yet supported. But could be supported easily with small changes. 3) More testing of function "getTopLevelElement" is needed. It returns the top level element (which has not been referred by any other element.) 4) Currently function getXMLSchemaName is not required. If not required, should be removed in future.

Constructor Summary
SchemaPathEvaluator(org.w3c.dom.Document schemaDoc)
           
 
Method Summary
 java.util.Hashtable getChildAttributes(java.lang.String path)
           
 java.util.ArrayList getChildElements(java.lang.String path)
           
 org.w3c.dom.Element getTopLevelElement()
          The function returns the top element in the document.
 java.lang.String printTable(char c)
           
 boolean validateField(org.w3c.dom.Element element, java.lang.String fieldPath)
           
 org.w3c.dom.Element validateSchemaPath(java.lang.String path)
          The function will validate the given SchemaPath using the sample document created internally for given Snapshot Schema
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SchemaPathEvaluator

public SchemaPathEvaluator(org.w3c.dom.Document schemaDoc)
Method Detail

validateSchemaPath

public org.w3c.dom.Element validateSchemaPath(java.lang.String path)
The function will validate the given SchemaPath using the sample document created internally for given Snapshot Schema

Parameters:
path -
Returns:

validateField

public boolean validateField(org.w3c.dom.Element element,
                             java.lang.String fieldPath)

getTopLevelElement

public org.w3c.dom.Element getTopLevelElement()
The function returns the top element in the document.

Returns:

getChildAttributes

public java.util.Hashtable getChildAttributes(java.lang.String path)

getChildElements

public java.util.ArrayList getChildElements(java.lang.String path)

printTable

public java.lang.String printTable(char c)