org.LexGrid.LexBIG.Impl.Extensions.Sort
Class AbstractSort

java.lang.Object
  extended by org.LexGrid.LexBIG.Impl.Extensions.AbstractExtendable
      extended by org.LexGrid.LexBIG.Impl.Extensions.Sort.AbstractSort
All Implemented Interfaces:
java.io.Serializable, Extendable, Sort
Direct Known Subclasses:
CodeSort, CodeSystemSort, ConceptStatusSort, EntityDescriptionSort, isActiveSort, MatchToQuerySort, NumberOfChildrenSort

public abstract class AbstractSort
extends AbstractExtendable
implements Sort

The Class AbstractSort.

Author:
Kevin Peterson
See Also:
Serialized Form

Constructor Summary
AbstractSort()
          Instantiates a new abstract sort.
 
Method Summary
protected  ExtensionDescription buildExtensionDescription()
          Builds the extension description.
protected abstract  SortDescription buildSortDescription()
          Builds the sort description.
<T> java.util.Comparator<T>
getComparatorForSearchClass(java.lang.Class<T> searchClass)
          Gets the comparator for search class.
 java.util.Set<java.lang.Class> getSupportedClassComparators()
          Gets the supported class comparators.
 boolean isSortValidForClass(java.lang.Class clazz)
          Checks if this sort is valid for the class.
 void register()
          Register.
abstract  void registerComparators(java.util.Map<java.lang.Class,java.util.Comparator> classToComparatorsMap)
          Register comparators.
 
Methods inherited from class org.LexGrid.LexBIG.Impl.Extensions.AbstractExtendable
getDescription, getExtensionDescription, getName, getProvider, getVersion
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.LexGrid.LexBIG.Extensions.Extendable
getDescription, getName, getProvider, getVersion
 

Constructor Detail

AbstractSort

public AbstractSort()
             throws LBParameterException,
                    LBException
Instantiates a new abstract sort.

Throws:
LBParameterException - the LB parameter exception
LBException - the LB exception
Method Detail

register

public void register()
              throws LBParameterException,
                     LBException
Register.

Throws:
LBParameterException - the LB parameter exception
LBException - the LB exception

buildSortDescription

protected abstract SortDescription buildSortDescription()
Builds the sort description.

Returns:
the sort description

buildExtensionDescription

protected ExtensionDescription buildExtensionDescription()
Description copied from class: AbstractExtendable
Builds the extension description.

Specified by:
buildExtensionDescription in class AbstractExtendable
Returns:
the extension description

registerComparators

public abstract void registerComparators(java.util.Map<java.lang.Class,java.util.Comparator> classToComparatorsMap)
Register comparators.

Parameters:
classToComparatorsMap - the class to comparators map

getComparatorForSearchClass

public <T> java.util.Comparator<T> getComparatorForSearchClass(java.lang.Class<T> searchClass)
                                                    throws LBParameterException
Description copied from interface: Sort
Gets the comparator for search class.

Specified by:
getComparatorForSearchClass in interface Sort
Parameters:
searchClass - the search class
Returns:
the comparator for search class
Throws:
LBParameterException - the LB parameter exception

isSortValidForClass

public boolean isSortValidForClass(java.lang.Class clazz)
Description copied from interface: Sort
Checks if this sort is valid for the class.

Specified by:
isSortValidForClass in interface Sort
Parameters:
clazz - the clazz
Returns:
true, if this sort is valid for the class

getSupportedClassComparators

public java.util.Set<java.lang.Class> getSupportedClassComparators()
Gets the supported class comparators.

Returns:
the supported class comparators

Copyright: (c) 2004-2006 Mayo Foundation for Medical Education and Research (MFMER). All rights reserved. MAYO, MAYO CLINIC, and the triple-shield Mayo logo are trademarks and service marks of MFMER.