DLESE Tools
v1.6.0

org.dlese.dpc.xml.schema
Class SchemaNodeMap.DocOrderComparator

java.lang.Object
  extended by org.dlese.dpc.xml.schema.SchemaNodeMap.DocOrderComparator
All Implemented Interfaces:
Comparator
Enclosing class:
SchemaNodeMap

public class SchemaNodeMap.DocOrderComparator
extends Object
implements Comparator

Comparator to sort the keyMap in document order. Element paths are processed in doc order, so we map the paths to an incrementing counter, and then maintain the map's order using the counter values.

Author:
Jonathan Ostwald

Constructor Summary
SchemaNodeMap.DocOrderComparator()
           
 
Method Summary
 int compare(Object o1, Object o2)
          sorts by order in which paths are processed by StructureWalker (and therefore are added to the SchemaNodeMap)
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface java.util.Comparator
equals
 

Constructor Detail

SchemaNodeMap.DocOrderComparator

public SchemaNodeMap.DocOrderComparator()
Method Detail

compare

public int compare(Object o1,
                   Object o2)
sorts by order in which paths are processed by StructureWalker (and therefore are added to the SchemaNodeMap)

Specified by:
compare in interface Comparator
Parameters:
o1 - NOT YET DOCUMENTED
o2 - NOT YET DOCUMENTED
Returns:
NOT YET DOCUMENTED

DLESE Tools
v1.6.0