org.gcube.application.framework.search.library.util
Class FindFieldsInfo

java.lang.Object
  extended by org.gcube.application.framework.search.library.util.FindFieldsInfo

public class FindFieldsInfo
extends Object

Author:
rena - NKUA (Nikolas also)

Field Summary
static String ALL
           
static String CATALINA_EXCLUDED_FIELDS_PROP_FILEPATH
           
static String DESCRIPTION
           
static DocumentBuilderFactory dfactory
          Document factory instance
static String EXCLUDED_BROWSABLE_FIELD_NAMES_PROP
           
static List<String> excludedBrowsableFieldNames
           
static String LOCAL_EXCLUDED_FIELDS_PROP_FILEPATH
           
static String NAME
           
 
Constructor Summary
FindFieldsInfo()
           
 
Method Summary
protected static List<gr.uoa.di.madgik.rr.element.search.Field> filterOutBrowsableFields(List<gr.uoa.di.madgik.rr.element.search.Field> initialList, List<String> notAllowedFieldNames)
           
static CollectionInfo findCollectionInfo(String colID, HashMap<CollectionInfo,ArrayList<CollectionInfo>> collections)
           
static String findCollectionName(String id, String scope)
           
protected static CollectionInfo getCollectionInfoById(String colId, List<CollectionInfo> collections)
          Finds the collection info object of the collection with the given id.
static ArrayList<Field> getCollectionPresentationFields(String colId, org.gcube.application.framework.core.session.ASLSession session)
           
static HashMap<CollectionInfo,ArrayList<CollectionInfo>> joinDynamicAndStaticConfiguration(String scope, boolean refresh)
           
protected static HashMap<CollectionInfo,ArrayList<CollectionInfo>> retrieveCollectionHierarchy(String VREname, Document doc, List<CollectionInfo> collections)
          Retrieves the hierarchical structure of the available collections.
protected static void retrieveCollections(Document doc, List<CollectionInfo> collections)
          Retrieves the collections by joining information from static and dynamic configuration.
static ArrayList<CollectionInfo> retrieveCollectionsFieldsInfos(String scope)
           
protected static HashMap<CollectionInfo,ArrayList<CollectionInfo>> retrieveCollectionsInformation(String vre, List<CollectionInfo> collections, boolean refresh)
           
static List<CollectionInfo> searchCollectionInfo(String term, String whereToSearch, HashMap<CollectionInfo,ArrayList<CollectionInfo>> collections)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ALL

public static final String ALL
See Also:
Constant Field Values

NAME

public static final String NAME
See Also:
Constant Field Values

DESCRIPTION

public static final String DESCRIPTION
See Also:
Constant Field Values

LOCAL_EXCLUDED_FIELDS_PROP_FILEPATH

public static final String LOCAL_EXCLUDED_FIELDS_PROP_FILEPATH
See Also:
Constant Field Values

CATALINA_EXCLUDED_FIELDS_PROP_FILEPATH

public static final String CATALINA_EXCLUDED_FIELDS_PROP_FILEPATH

EXCLUDED_BROWSABLE_FIELD_NAMES_PROP

public static final String EXCLUDED_BROWSABLE_FIELD_NAMES_PROP
See Also:
Constant Field Values

dfactory

public static final DocumentBuilderFactory dfactory
Document factory instance


excludedBrowsableFieldNames

public static List<String> excludedBrowsableFieldNames
Constructor Detail

FindFieldsInfo

public FindFieldsInfo()
Method Detail

joinDynamicAndStaticConfiguration

public static HashMap<CollectionInfo,ArrayList<CollectionInfo>> joinDynamicAndStaticConfiguration(String scope,
                                                                                                  boolean refresh)
                                                                                           throws InitialBridgingNotCompleteException,
                                                                                                  InternalErrorException
Throws:
InitialBridgingNotCompleteException
InternalErrorException

retrieveCollectionsFieldsInfos

public static ArrayList<CollectionInfo> retrieveCollectionsFieldsInfos(String scope)
                                                                throws InitialBridgingNotCompleteException,
                                                                       InternalErrorException
Throws:
InitialBridgingNotCompleteException
InternalErrorException

filterOutBrowsableFields

protected static List<gr.uoa.di.madgik.rr.element.search.Field> filterOutBrowsableFields(List<gr.uoa.di.madgik.rr.element.search.Field> initialList,
                                                                                         List<String> notAllowedFieldNames)

retrieveCollectionsInformation

protected static HashMap<CollectionInfo,ArrayList<CollectionInfo>> retrieveCollectionsInformation(String vre,
                                                                                                  List<CollectionInfo> collections,
                                                                                                  boolean refresh)
                                                                                           throws Exception
Throws:
Exception

findCollectionName

public static String findCollectionName(String id,
                                        String scope)

retrieveCollections

protected static void retrieveCollections(Document doc,
                                          List<CollectionInfo> collections)
Retrieves the collections by joining information from static and dynamic configuration.

Parameters:
doc - document which holds the collections
collections - the list containing the collections

retrieveCollectionHierarchy

protected static HashMap<CollectionInfo,ArrayList<CollectionInfo>> retrieveCollectionHierarchy(String VREname,
                                                                                               Document doc,
                                                                                               List<CollectionInfo> collections)
                                                                                        throws Exception
Retrieves the hierarchical structure of the available collections. Joins the static and the dynamic search configuration and produces a hierarchical structure containing information about each collection.

Parameters:
VREname - the VRE name of the active VRE
doc - document which holds the collections
collections - the available collections
Returns:
A HashMap containing the Collection Groups as keys the list of the collections belonging to each group as values
Throws:
Exception - an Exception occurred during processing

getCollectionInfoById

protected static CollectionInfo getCollectionInfoById(String colId,
                                                      List<CollectionInfo> collections)
Finds the collection info object of the collection with the given id.

Parameters:
collectionId - the id of the collection
collections - a list containing all the collections
Returns:
the CollectionInfo of the collection with the corresponding id

getCollectionPresentationFields

public static ArrayList<Field> getCollectionPresentationFields(String colId,
                                                               org.gcube.application.framework.core.session.ASLSession session)
                                                        throws InitialBridgingNotCompleteException,
                                                               InternalErrorException
Throws:
InitialBridgingNotCompleteException
InternalErrorException

findCollectionInfo

public static CollectionInfo findCollectionInfo(String colID,
                                                HashMap<CollectionInfo,ArrayList<CollectionInfo>> collections)
Parameters:
colID -
collections -
Returns:

searchCollectionInfo

public static List<CollectionInfo> searchCollectionInfo(String term,
                                                        String whereToSearch,
                                                        HashMap<CollectionInfo,ArrayList<CollectionInfo>> collections)
Parameters:
term -
whereToSearch -
collections -
Returns:


Copyright © 2013. All Rights Reserved.