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

Field Summary
static String ALL
           
static String DESCRIPTION
           
static DocumentBuilderFactory dfactory
          Document factory instance
protected static org.gcube.common.core.utils.logging.GCUBELog logger
          Object logger.
static String NAME
           
 
Constructor Summary
FindFieldsInfo()
           
 
Method Summary
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

logger

protected static final org.gcube.common.core.utils.logging.GCUBELog logger
Object logger.


dfactory

public static final DocumentBuilderFactory dfactory
Document factory instance

Constructor Detail

FindFieldsInfo

public FindFieldsInfo()
Method Detail

joinDynamicAndStaticConfiguration

public static HashMap<CollectionInfo,ArrayList<CollectionInfo>> joinDynamicAndStaticConfiguration(String scope,
                                                                                                  boolean refresh)
Parameters:
collectionID - The id of the collection
Returns:
an ArrayList of the presentable Fields

retrieveCollectionsFieldsInfos

public static ArrayList<CollectionInfo> retrieveCollectionsFieldsInfos(String scope)

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)

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.