de.iqser.service
Class PortletIQserService

java.lang.Object
  extended by de.iqser.service.PortletIQserService

public class PortletIQserService
extends Object


Constructor Summary
PortletIQserService()
           
 
Method Summary
static SortedSet<String> getAlltypes(List<ContentBean> contentList)
           
static com.iqser.core.model.Content getContent(String iqserWebserviceUrl, int contentId)
           
static FolderBean getIQSERToplevelCategories(String iqserWebserviceUrl, int maxLevel)
           
static List<ContentBean> getPartList(String iqserWebserviceUrl, List<ContentBean> contentList, int start, int stop)
           
static List<ContentBean> searchIQSER_Related(String iqserWebserviceUrl, int contentId, String minScoreStr)
           
static List<ContentBean> searchIQSER(String iqserWebserviceUrl, String searchInput, String maxResultsStr)
           
static int total(List<ContentBean> contentList)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PortletIQserService

public PortletIQserService()
Method Detail

searchIQSER

public static List<ContentBean> searchIQSER(String iqserWebserviceUrl,
                                            String searchInput,
                                            String maxResultsStr)
Parameters:
iqserWebserviceUrl - URL for the iQser web service
searchInput - search input from user
maxResultsStr - maximum number of results returned by iQser
Returns:
a list of ContentBean objects

searchIQSER_Related

public static List<ContentBean> searchIQSER_Related(String iqserWebserviceUrl,
                                                    int contentId,
                                                    String minScoreStr)
Parameters:
iqserWebserviceUrl - URL for the iQser web service
contentId - used to get its related contents
minScoreStr - minimum score needed to fetch related content (0.0 to 1.00)
Returns:
a list of ContentBean objects

getContent

public static com.iqser.core.model.Content getContent(String iqserWebserviceUrl,
                                                      int contentId)
Parameters:
iqserWebserviceUrl - URL for the iQser web service
contentId - used to get its related contents
Returns:
a Content object

getIQSERToplevelCategories

public static FolderBean getIQSERToplevelCategories(String iqserWebserviceUrl,
                                                    int maxLevel)
Parameters:
iqserWebserviceUrl - URL for the iQser web service
maxLevel - data up to this level are returned
Returns:
a root FolderBean which holds the complete tree structure

getPartList

public static List<ContentBean> getPartList(String iqserWebserviceUrl,
                                            List<ContentBean> contentList,
                                            int start,
                                            int stop)
Parameters:
iqserWebserviceUrl - URL for the iQser web service
contentList - a list of contentBean objects, the objects may contain only id, type and score data
start - index from the SearchContainer
stop - index from the SearchContainer
Returns:
a partial list of ContentBean objects which contain fully initialized bean

total

public static int total(List<ContentBean> contentList)
Parameters:
contentList - a list of contentBean objects
Returns:
number of content objects

getAlltypes

public static SortedSet<String> getAlltypes(List<ContentBean> contentList)
Parameters:
contentList - a list of contentBean objects
Returns:
SortedSet containing found content types (unique)


Copyright © 2011. All Rights Reserved.