org.LexGrid.LexBIG.Impl.Extensions
Class ExtensionRegistryImpl

java.lang.Object
  extended by org.LexGrid.LexBIG.Impl.Extensions.ExtensionRegistryImpl
All Implemented Interfaces:
java.io.Serializable, ExtensionRegistry

public class ExtensionRegistryImpl
extends java.lang.Object
implements ExtensionRegistry

Implementation of the LexGrid Extension Registry.

Version:
subversion $Revision: $ checked in on $Date: $
Author:
Dan Armbrust, Jesse Erdmann
See Also:
Serialized Form

Method Summary
 ExtensionDescription getExportExtension(java.lang.String name)
          Returns the description of a registered extension matching the given name.
 ExtensionDescriptionList getExportExtensions()
          Returns a description of all registered extensions used to export information loaded to a LexBIGService.
 Filter getFilter(java.lang.String name)
           
 ExtensionDescription getFilterExtension(java.lang.String name)
          Returns the description of a registered extension matching the given name.
 ExtensionDescriptionList getFilterExtensions()
          Returns a description of all registered extensions used to provide additional filtering of query results.
 ExtensionDescription getGenericExtension(java.lang.String name)
          Returns the description of a registered extension matching the given name.
<T extends Extendable>
T
getGenericExtension(java.lang.String extensionName, java.lang.Class<T> extensionClass)
           
 ExtensionDescriptionList getGenericExtensions()
          Returns a description of all registered extensions used to implement application-specific behavior that is centrally accessible from a LexBIGService.
 ExtensionDescription getIndexExtension(java.lang.String name)
          Returns the description of a registered extension matching the given name.
 ExtensionDescriptionList getIndexExtensions()
          Returns a description of all registered extensions used to index information that has been previously loaded to a LexBIGService.
 ExtensionDescription getLoadExtension(java.lang.String name)
          Returns the description of a registered extension matching the given name.
 ExtensionDescriptionList getLoadExtensions()
          Returns a description of all registered extensions used to load information for access by a LexBIGService.
protected  LgLoggerIF getLogger()
           
 Search getSearchAlgorithm(java.lang.String name)
           
 ExtensionDescription getSearchExtension(java.lang.String name)
          Returns the description of a registered extension matching the given name.
 ExtensionDescriptionList getSearchExtensions()
          Returns a description of all registered extensions used to provide additional sorting of query results.
 Sort getSortAlgorithm(java.lang.String name)
           
 SortDescription getSortExtension(java.lang.String name)
          Returns the description of a registered extension matching the given name.
 SortDescriptionList getSortExtensions()
          Returns a description of all registered extensions used to provide additional sorting of query results.
static ExtensionRegistryImpl instance()
           
 void registerExportExtension(ExtensionDescription description)
          Registers a class of extension used to export existing content from the LexGrid repository.
 void registerFilterExtension(ExtensionDescription description)
          Registers a class of extension used to filter query content.
 void registerGenericExtension(ExtensionDescription description)
          Registers a class of extension used to implement application-specific behavior that is centrally accessible from a LexBIGService.
 void registerIndexExtension(ExtensionDescription description)
          Registers a class of extension used to index information that has been previously loaded to a LexBIGService.
 void registerLoadExtension(ExtensionDescription description)
          Registers a class of extension used to load information for access by a LexBIGService.
 void registerSearchExtension(ExtensionDescription description)
           
 void registerSortExtension(SortDescription description)
          Registers a class of extension used to provide additional sorting of query results.
 void unregisterExportExtension(java.lang.String name)
          Removes registration for the given named extension.
 void unregisterFilterExtension(java.lang.String name)
          Removes registration for the given named extension.
 void unregisterGenericExtension(java.lang.String name)
          Removes registration for the given named extension.
 void unregisterIndexExtension(java.lang.String name)
          Removes registration for the given named extension.
 void unregisterLoadExtension(java.lang.String name)
          Removes registration for the given named extension.
 void unregisterSearchExtension(java.lang.String name)
           
 void unregisterSortExtension(java.lang.String name)
          Removes registration for the given named extension.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getLogger

protected LgLoggerIF getLogger()

instance

public static ExtensionRegistryImpl instance()

getExportExtension

public ExtensionDescription getExportExtension(java.lang.String name)
Description copied from interface: ExtensionRegistry
Returns the description of a registered extension matching the given name.

Specified by:
getExportExtension in interface ExtensionRegistry
Parameters:
name - The extension name; not null.
Returns:
A matching extension description; null if no match is found. If not null, the description identifies a class of item implementing org.LexGrid.LexBIG.Extensions.Export.Exporter and providing a public parameterless constructor.

getExportExtensions

public ExtensionDescriptionList getExportExtensions()
Description copied from interface: ExtensionRegistry
Returns a description of all registered extensions used to export information loaded to a LexBIGService.

Specified by:
getExportExtensions in interface ExtensionRegistry
Returns:
The list containing the description of extensions registered for this category. Each description identifies a class of item implementing org.LexGrid.LexBIG.Extensions.Export.Exporter and providing a public parameterless constructor.

getFilterExtension

public ExtensionDescription getFilterExtension(java.lang.String name)
Description copied from interface: ExtensionRegistry
Returns the description of a registered extension matching the given name.

Specified by:
getFilterExtension in interface ExtensionRegistry
Parameters:
name - The extension name; not null.
Returns:
A matching extension description; null if no match is found. If not null, the description identifies a class of item implementing org.LexGrid.LexBIG.Extensions.Query.Filter and providing a public parameterless constructor.

getFilter

public Filter getFilter(java.lang.String name)
                 throws LBParameterException
Throws:
LBParameterException

getFilterExtensions

public ExtensionDescriptionList getFilterExtensions()
Description copied from interface: ExtensionRegistry
Returns a description of all registered extensions used to provide additional filtering of query results. Filters should _NOT_ be used for search criteria that can be done with built in restrictions. Filters are very inefficient.

Specified by:
getFilterExtensions in interface ExtensionRegistry
Returns:
The list containing the description of extensions registered for this category. Each description identifies a class of item implementing org.LexGrid.LexBIG.Extensions.Query.Filter and providing a public parameterless constructor.

getSearchExtensions

public ExtensionDescriptionList getSearchExtensions()
Description copied from interface: ExtensionRegistry
Returns a description of all registered extensions used to provide additional sorting of query results.

Specified by:
getSearchExtensions in interface ExtensionRegistry
Returns:
The list containing the description of extensions registered for this category. Each description identifies a class of item implementing org.LexGrid.LexBIG.Extensions.Query.Search and providing a public parameterless constructor.

getSearchExtension

public ExtensionDescription getSearchExtension(java.lang.String name)
Description copied from interface: ExtensionRegistry
Returns the description of a registered extension matching the given name.

Specified by:
getSearchExtension in interface ExtensionRegistry
Parameters:
name - The extension name; not null.
Returns:
A matching extension description; null if no match is found. If not null, the description identifies a class of item implementing org.LexGrid.LexBIG.Extensions.Query.Search and providing a public parameterless constructor.

getSearchAlgorithm

public Search getSearchAlgorithm(java.lang.String name)
                          throws LBParameterException
Throws:
LBParameterException

getGenericExtension

public ExtensionDescription getGenericExtension(java.lang.String name)
Description copied from interface: ExtensionRegistry
Returns the description of a registered extension matching the given name.

Specified by:
getGenericExtension in interface ExtensionRegistry
Parameters:
name - The extension name; not null.
Returns:
A matching extension description; null if no match is found. If not null, the description identifies a class of item implementing org.LexGrid.LexBIG.Extensions.Generic.GenericExtension and providing a public parameterless constructor.

getGenericExtensions

public ExtensionDescriptionList getGenericExtensions()
Description copied from interface: ExtensionRegistry
Returns a description of all registered extensions used to implement application-specific behavior that is centrally accessible from a LexBIGService.

Note that only generic extensions (base class GenericExtension) will be listed here. All other classes are retrievable at the appropriate interface point (filter, sort, etc).

Specified by:
getGenericExtensions in interface ExtensionRegistry
Returns:
The list containing the description of extensions registered for this category. Each description identifies a class of item implementing org.LexGrid.LexBIG.Extensions.Generic.GenericExtension and providing a public parameterless constructor.

getGenericExtension

public <T extends Extendable> T getGenericExtension(java.lang.String extensionName,
                                                    java.lang.Class<T> extensionClass)
                                         throws LBParameterException
Specified by:
getGenericExtension in interface ExtensionRegistry
Throws:
LBParameterException

getIndexExtension

public ExtensionDescription getIndexExtension(java.lang.String name)
Description copied from interface: ExtensionRegistry
Returns the description of a registered extension matching the given name.

Specified by:
getIndexExtension in interface ExtensionRegistry
Parameters:
name - The extension name; not null.
Returns:
A matching extension description; null if no match is found. If not null, the description identifies a class of item implementing org.LexGrid.LexBIG.Extensions.Index.Index and providing a public parameterless constructor.

getIndexExtensions

public ExtensionDescriptionList getIndexExtensions()
Description copied from interface: ExtensionRegistry
Returns a description of all registered extensions used to index information that has been previously loaded to a LexBIGService.

Specified by:
getIndexExtensions in interface ExtensionRegistry
Returns:
The list containing the description of extensions registered for this category. Each description identifies a class of item implementing org.LexGrid.LexBIG.Extensions.Index.Index and providing a public parameterless constructor.

getLoadExtension

public ExtensionDescription getLoadExtension(java.lang.String name)
Description copied from interface: ExtensionRegistry
Returns the description of a registered extension matching the given name.

Specified by:
getLoadExtension in interface ExtensionRegistry
Parameters:
name - The extension name; not null.
Returns:
A matching extension description; null if no match is found. If not null, the description identifies a class of item implementing org.LexGrid.LexBIG.Extensions.Load.Loader and providing a public parameterless constructor.

getLoadExtensions

public ExtensionDescriptionList getLoadExtensions()
Description copied from interface: ExtensionRegistry
Returns a description of all registered extensions used to load information for access by a LexBIGService.

Specified by:
getLoadExtensions in interface ExtensionRegistry
Returns:
The list containing the description of extensions registered for this category. Each description identifies a class of item implementing org.LexGrid.LexBIG.Extensions.Load.Loader and providing a public parameterless constructor.

getSortExtension

public SortDescription getSortExtension(java.lang.String name)
Description copied from interface: ExtensionRegistry
Returns the description of a registered extension matching the given name.

Specified by:
getSortExtension in interface ExtensionRegistry
Parameters:
name - The extension name; not null.
Returns:
A matching extension description; null if no match is found. If not null, the description identifies a class of item implementing org.LexGrid.LexBIG.Extensions.Query.Sort and providing a public parameterless constructor.

getSortExtensions

public SortDescriptionList getSortExtensions()
Description copied from interface: ExtensionRegistry
Returns a description of all registered extensions used to provide additional sorting of query results.

Specified by:
getSortExtensions in interface ExtensionRegistry
Returns:
The list containing the description of extensions registered for this category. Each description identifies a class of item implementing org.LexGrid.LexBIG.Extensions.Query.Sort and providing a public parameterless constructor.

getSortAlgorithm

public Sort getSortAlgorithm(java.lang.String name)
                      throws LBParameterException
Throws:
LBParameterException

registerExportExtension

public void registerExportExtension(ExtensionDescription description)
                             throws LBParameterException
Description copied from interface: ExtensionRegistry
Registers a class of extension used to export existing content from the LexGrid repository.

Specified by:
registerExportExtension in interface ExtensionRegistry
Parameters:
description - The description of the extension to register, which must provide a unique name for this type of extension and identify a class of item implementing org.LexGrid.LexBIG.Extensions.Export.Exporter with a public parameterless constructor.
Throws:
LBParameterException - If the given description does not meet the specified criteria.

registerFilterExtension

public void registerFilterExtension(ExtensionDescription description)
                             throws LBParameterException
Description copied from interface: ExtensionRegistry
Registers a class of extension used to filter query content. Filters should _NOT_ be used for search criteria that can be done with built in restrictions. Filters are very inefficient.

Specified by:
registerFilterExtension in interface ExtensionRegistry
Parameters:
description - The description of the extension to register, which must provide a unique name for this type of extension and identify a class of item implementing org.LexGrid.LexBIG.Extensions.Query.Filter with a public parameterless constructor.
Throws:
LBParameterException - If the given description does not meet the specified criteria.

registerGenericExtension

public void registerGenericExtension(ExtensionDescription description)
                              throws LBParameterException
Description copied from interface: ExtensionRegistry
Registers a class of extension used to implement application-specific behavior that is centrally accessible from a LexBIGService.

Specified by:
registerGenericExtension in interface ExtensionRegistry
Parameters:
description - The description of the extension to register, which must provide a unique name for this type of extension and identify a class of item implementing org.LexGrid.LexBIG.Extensions.Generic.GenericExtension with a public parameterless constructor.
Throws:
LBParameterException - If the given description does not meet the specified criteria.

registerIndexExtension

public void registerIndexExtension(ExtensionDescription description)
                            throws LBParameterException
Description copied from interface: ExtensionRegistry
Registers a class of extension used to index information that has been previously loaded to a LexBIGService.

Specified by:
registerIndexExtension in interface ExtensionRegistry
Parameters:
description - The description of the extension to register, which must provide a unique name for this type of extension and identify a class of item implementing org.LexGrid.LexBIG.Extensions.Index.Index with a public parameterless constructor.
Throws:
LBParameterException - If the given description does not meet the specified criteria.

registerLoadExtension

public void registerLoadExtension(ExtensionDescription description)
                           throws LBParameterException
Description copied from interface: ExtensionRegistry
Registers a class of extension used to load information for access by a LexBIGService.

Specified by:
registerLoadExtension in interface ExtensionRegistry
Parameters:
description - The description of the extension to register, which must provide a unique name for this type of extension and identify a class of item implementing org.LexGrid.LexBIG.Extensions.Load.Loader with a public parameterless constructor.
Throws:
LBParameterException - If the given description does not meet the specified criteria.

registerSortExtension

public void registerSortExtension(SortDescription description)
                           throws LBParameterException
Description copied from interface: ExtensionRegistry
Registers a class of extension used to provide additional sorting of query results.

NOTE: Sort extensions can only be applied when resolving standard node set representations. Therefore the provided description MUST be restricted only to a sort context of SortContext.SET.

Specified by:
registerSortExtension in interface ExtensionRegistry
Parameters:
description - The description of the extension to register, which must provide a unique name for this type of extension and identify a class of item implementing org.LexGrid.LexBIG.Extensions.Query.Sort with a public parameterless constructor.
Throws:
LBParameterException - If the given description does not meet the specified criteria.

registerSearchExtension

public void registerSearchExtension(ExtensionDescription description)
                             throws LBParameterException
Specified by:
registerSearchExtension in interface ExtensionRegistry
Throws:
LBParameterException

unregisterExportExtension

public void unregisterExportExtension(java.lang.String name)
                               throws LBParameterException
Description copied from interface: ExtensionRegistry
Removes registration for the given named extension. Upon completion, the extension will no longer be available for lookup from the LexBIG service.

Specified by:
unregisterExportExtension in interface ExtensionRegistry
Parameters:
name - The extension name; not null. The extension version; null to match all versions.
Throws:
LBParameterException - If the given name does not match a registered extension.

unregisterFilterExtension

public void unregisterFilterExtension(java.lang.String name)
                               throws LBParameterException
Description copied from interface: ExtensionRegistry
Removes registration for the given named extension. Upon completion, the extension will no longer be available for lookup from the LexBIG service.

Specified by:
unregisterFilterExtension in interface ExtensionRegistry
Parameters:
name - The extension name; not null.
Throws:
LBParameterException - If the given name does not match a registered extension.

unregisterGenericExtension

public void unregisterGenericExtension(java.lang.String name)
                                throws LBParameterException
Description copied from interface: ExtensionRegistry
Removes registration for the given named extension. Upon completion, the extension will no longer be available for lookup from the LexBIG service.

Specified by:
unregisterGenericExtension in interface ExtensionRegistry
Parameters:
name - The extension name; not null.
Throws:
LBParameterException - If the given name does not match a registered extension.

unregisterIndexExtension

public void unregisterIndexExtension(java.lang.String name)
                              throws LBParameterException
Description copied from interface: ExtensionRegistry
Removes registration for the given named extension. Upon completion, the extension will no longer be available for lookup from the LexBIG service.

Specified by:
unregisterIndexExtension in interface ExtensionRegistry
Parameters:
name - The extension name; not null.
Throws:
LBParameterException - If the given name does not match a registered extension.

unregisterLoadExtension

public void unregisterLoadExtension(java.lang.String name)
                             throws LBParameterException
Description copied from interface: ExtensionRegistry
Removes registration for the given named extension. Upon completion, the extension will no longer be available for lookup from the LexBIG service.

Specified by:
unregisterLoadExtension in interface ExtensionRegistry
Parameters:
name - The extension name; not null.
Throws:
LBParameterException - If the given name does not match a registered extension.

unregisterSortExtension

public void unregisterSortExtension(java.lang.String name)
                             throws LBParameterException
Description copied from interface: ExtensionRegistry
Removes registration for the given named extension. Upon completion, the extension will no longer be available for lookup from the LexBIG service.

Specified by:
unregisterSortExtension in interface ExtensionRegistry
Parameters:
name - The extension name; not null.
Throws:
LBParameterException - If the given name does not match a registered extension.

unregisterSearchExtension

public void unregisterSearchExtension(java.lang.String name)
                               throws LBParameterException
Specified by:
unregisterSearchExtension in interface ExtensionRegistry
Throws:
LBParameterException

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.