cs.arizona.tau.xml
Class LogicalAnnotationValidator

java.lang.Object
  extended by cs.arizona.tau.xml.GenericValidator
      extended by cs.arizona.tau.xml.LogicalAnnotationValidator
All Implemented Interfaces:
ILogicalAnnotationValidator

public class LogicalAnnotationValidator
extends GenericValidator
implements ILogicalAnnotationValidator

Author:
spjoshi TODO : 1) Exception handling. 2) Need to verify whether function createItemPrototypes handles all the conditions.

Constructor Summary
LogicalAnnotationValidator(org.w3c.dom.Document annotationDocument, org.w3c.dom.Document snapshotSchemaDocument, TargetIdentifier ti, boolean createItemPrototypes)
           
LogicalAnnotationValidator(java.lang.String temporalAnnotation, java.lang.String snapshotSchema, boolean createItemPrototypes)
           
 
Method Summary
 boolean containsTarget(java.lang.String target)
           
 void createItemPrototypes()
          The function creates the item prototypes for all the items from temporal annotation.
 Item getItemPrototype(java.lang.String target)
           
 java.lang.String getNextItemID(java.lang.String target)
           
 java.util.Iterator getTargetIterator()
           
 java.lang.String getTopTarget()
          The function returns the name of topmost element which has been timestamped in Temporal Annotation.
 void resetItemCounters()
           
 boolean validateLogicalAnnotation()
          Given snapshot Schema and Temporal Annotations, checks the consistency between them.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LogicalAnnotationValidator

public LogicalAnnotationValidator(java.lang.String temporalAnnotation,
                                  java.lang.String snapshotSchema,
                                  boolean createItemPrototypes)

LogicalAnnotationValidator

public LogicalAnnotationValidator(org.w3c.dom.Document annotationDocument,
                                  org.w3c.dom.Document snapshotSchemaDocument,
                                  TargetIdentifier ti,
                                  boolean createItemPrototypes)
Method Detail

validateLogicalAnnotation

public boolean validateLogicalAnnotation()
Description copied from interface: ILogicalAnnotationValidator
Given snapshot Schema and Temporal Annotations, checks the consistency between them. The consistency could be checked from various point of views 1) Temporal Annotation should be a valid instance of TXSchema which could be checked using conventional validator. 2) Whether the targets in given Physical Annotation are consistent with given snapshot schema.

Specified by:
validateLogicalAnnotation in interface ILogicalAnnotationValidator

getTopTarget

public java.lang.String getTopTarget()
The function returns the name of topmost element which has been timestamped in Temporal Annotation.

Returns:

containsTarget

public boolean containsTarget(java.lang.String target)

createItemPrototypes

public void createItemPrototypes()
The function creates the item prototypes for all the items from temporal annotation.


resetItemCounters

public void resetItemCounters()

getItemPrototype

public Item getItemPrototype(java.lang.String target)

getNextItemID

public java.lang.String getNextItemID(java.lang.String target)

getTargetIterator

public java.util.Iterator getTargetIterator()