DLESE Tools
v1.6.0

org.dlese.dpc.index.writer
Class DleseCollectionFileIndexingWriter.CollectionAccessionStatusComparator

java.lang.Object
  extended by org.dlese.dpc.index.writer.DleseCollectionFileIndexingWriter.CollectionAccessionStatusComparator
All Implemented Interfaces:
Comparator
Enclosing class:
DleseCollectionFileIndexingWriter

public static class DleseCollectionFileIndexingWriter.CollectionAccessionStatusComparator
extends Object
implements Comparator

Allows sorting of a Collection accession status XML Node, by date giving precedence to status = accessioned if dates are equal.

Author:
John Weatherley

Constructor Summary
DleseCollectionFileIndexingWriter.CollectionAccessionStatusComparator()
           
 
Method Summary
 int compare(Object O1, Object O2)
          Compares two collection accession XML nodes for sorting.
 
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

DleseCollectionFileIndexingWriter.CollectionAccessionStatusComparator

public DleseCollectionFileIndexingWriter.CollectionAccessionStatusComparator()
Method Detail

compare

public int compare(Object O1,
                   Object O2)
            throws ClassCastException
Compares two collection accession XML nodes for sorting.

Specified by:
compare in interface Comparator
Parameters:
O1 - A collectionStatus dom4j XML Node from a dlese_collect XML Document.
O2 - A collectionStatus dom4j XML Node from a dlese_collect XML Document.
Returns:
Returns a negative integer, zero, or a positive integer as the first argument is less than, equal to, or greater than the second.
Throws:
ClassCastException - If error.

DLESE Tools
v1.6.0