com.raritantechnologies.searchApp.sourceMap
Class CategorySourceMap

java.lang.Object
  extended bycom.raritantechnologies.searchApp.sourceMap.CategorySourceMap
All Implemented Interfaces:
IConfigurable, ISourceMap
Direct Known Subclasses:
DrugInfoSourceMap, FinancialSourceMap, JobSourceMap

public class CategorySourceMap
extends java.lang.Object
implements ISourceMap

Implements the source map using a "CategoryList" parameter. This parameter is added to the searchParameter map by the SearchBean/UserSession objects in an RTI "quickstart" application framework.

Maps the category parameter to one or more search sources.

XML Configuration Template:
   <Object type="category" name="[ name of category map ]"
              securityManager="[ name of security Manger ]" >

     <!-- One or more Category elements that define specific category- source mappings -->
     <Category ID="[ category ID ]" name="[ display name ]" >
       <Sources>
         <!-- one or more Source elements: -->
         <Source name="[ name of Search Source - must match name in SourceType element in main Config ]" />
         <Source name="[ another source name ]" />
         <!-- etc. . . -->
       </Sources>
     </Category>

     <!-- etc. . . -->

   </Object>
 

Developed by Raritan Technologies .

Author:
Ted Sullivan

Field Summary
static java.lang.String ALL
           
static java.lang.String CATEGORY
           
static java.lang.String CATEGORY_LIST
           
static java.lang.String CATEGORY_LIST_SHORT
           
 
Constructor Summary
CategorySourceMap()
           
 
Method Summary
 void addSourceInputs(java.lang.String sourceKey, SourceInput[] sourceInputs)
           
 java.lang.String[] getAllSourceKeys(ILoginInfo userInfo, boolean checkSecurity, java.util.Map searchParams)
          returns a list of all of the source names - links to SearchSource in the ISearchFieldMap
 java.lang.String getDescription(java.lang.String sourceName)
           
 java.lang.String getDisplayName(java.lang.String sourceKey)
           
 java.lang.String getObjectType()
          Returns the type of Source that the source map supports.
 int getPageCacheStyle(java.lang.String sourceKey)
           
 SourceInput[] getSourceInputs(ILoginInfo userInfo, IResult searchResult)
          Finds a set of source inputs based on a search result.
 SourceInput[] getSourceInputs(ILoginInfo userInfo, java.util.Map searchParams)
          Looks up the set of federated sources that are appropriate for the browse selections chosen by the user.
 SourceInput[] getSourceInputs(java.lang.String sourceKey)
           
 void initialize(org.w3c.dom.Element elem)
          Initializes the object from an XML tag or element.
 void setPageCacheStyle(java.lang.String sourceKey, int pagingStyle)
          Sets/gets the paging style used by a federated source.
 void setSecurityManager(java.lang.String securityManager)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CATEGORY_LIST

public static final java.lang.String CATEGORY_LIST
See Also:
Constant Field Values

CATEGORY_LIST_SHORT

public static final java.lang.String CATEGORY_LIST_SHORT
See Also:
Constant Field Values

ALL

public static final java.lang.String ALL
See Also:
Constant Field Values

CATEGORY

public static final java.lang.String CATEGORY
See Also:
Constant Field Values
Constructor Detail

CategorySourceMap

public CategorySourceMap()
Method Detail

initialize

public void initialize(org.w3c.dom.Element elem)
Description copied from interface: IConfigurable
Initializes the object from an XML tag or element. This method is called by the Framework as part of the application initializtion. see ConfigurationManager, XMLConfigurationManager, XMLSearchFieldMapFactory, XMLSearchSourceFactory. Configurable objects that are owned or contained by other configurable objects will be initialized in by the parent object.

Specified by:
initialize in interface IConfigurable

getObjectType

public java.lang.String getObjectType()
Description copied from interface: ISourceMap
Returns the type of Source that the source map supports.

Specified by:
getObjectType in interface ISourceMap

setSecurityManager

public void setSecurityManager(java.lang.String securityManager)

getAllSourceKeys

public java.lang.String[] getAllSourceKeys(ILoginInfo userInfo,
                                           boolean checkSecurity,
                                           java.util.Map searchParams)
returns a list of all of the source names - links to SearchSource in the ISearchFieldMap

Specified by:
getAllSourceKeys in interface ISourceMap

getSourceInputs

public SourceInput[] getSourceInputs(java.lang.String sourceKey)
Specified by:
getSourceInputs in interface ISourceMap

getDisplayName

public java.lang.String getDisplayName(java.lang.String sourceKey)
Specified by:
getDisplayName in interface ISourceMap

getSourceInputs

public SourceInput[] getSourceInputs(ILoginInfo userInfo,
                                     IResult searchResult)
Finds a set of source inputs based on a search result.

Specified by:
getSourceInputs in interface ISourceMap

getSourceInputs

public SourceInput[] getSourceInputs(ILoginInfo userInfo,
                                     java.util.Map searchParams)
Looks up the set of federated sources that are appropriate for the browse selections chosen by the user. SourceInput objects map a source name to a set of preset parameters that need to be loaded into the queryParams - this method effectively maps a set of browse selections to a set of federated sources which match the selections and then provides the configuration information needed to direct the source to the proper result type. That it, this method translates a set of browse parameters to specific input parameters needed for each site. This information is obtained from the SourceMap XML used to construct this ISourceMap object.

Specified by:
getSourceInputs in interface ISourceMap

getDescription

public java.lang.String getDescription(java.lang.String sourceName)
Specified by:
getDescription in interface ISourceMap

setPageCacheStyle

public void setPageCacheStyle(java.lang.String sourceKey,
                              int pagingStyle)
Description copied from interface: ISourceMap
Sets/gets the paging style used by a federated source. Constants defined in IFederatedSearchSource.

Specified by:
setPageCacheStyle in interface ISourceMap

getPageCacheStyle

public int getPageCacheStyle(java.lang.String sourceKey)
Specified by:
getPageCacheStyle in interface ISourceMap

addSourceInputs

public void addSourceInputs(java.lang.String sourceKey,
                            SourceInput[] sourceInputs)
Specified by:
addSourceInputs in interface ISourceMap