com.flickrrecsys.util
Class Customisation

java.lang.Object
  extended by com.flickrrecsys.util.Customisation

public class Customisation
extends java.lang.Object

This class deals with all customisation settings settings are also retrieved from the database and displayed in here.

Author:
Hossein Ghodsi

Constructor Summary
Customisation()
           
 
Method Summary
 boolean coacControlPanel(int limit, java.lang.String servletPath, java.lang.String nsid)
          Update the number of people should be return based on coac recommendation
 java.lang.String coacNumberOfUsers(java.lang.String nsid, java.lang.String servletPath)
          Retrieve number of users should be displayed for recommendation based on the contact of a contact and construct the dropdown list
 java.lang.String createDropdownList(int selectedIndex, java.lang.String id, int sizeOfDropDownList, java.lang.String functionName)
          This method creates dropdown list
 boolean deletegroup(int gid, java.lang.String servletPath, java.lang.String nsid)
          Deletes the group from the list of most frequently used
 boolean favoControlPanel(int limit, java.lang.String servletPath, java.lang.String nsid)
          Update the number of users should be returned for favourite users
 java.lang.String favoNumberOfUsers(java.lang.String nsid, java.lang.String servletPath)
          Retrieve number of users should be displayed for recommendation based on the favouite photos and construct the dropdown list
 java.lang.String getThreshold(java.lang.String nsid, java.lang.String servletPath)
          Get the value of the threshold
 java.lang.String listOfGroupsToChooseFrom(java.lang.String nsid, java.lang.String servletPath)
          List the groups which have not yet been selected as frequently used
 java.lang.String mostFreqUsedGroups(java.lang.String nsid, java.lang.String servletPath)
          Create the list of groups that have been flagged as the more frequently used
 java.lang.String numberOfGroups(java.lang.String nsid, java.lang.String servletPath)
          Get the number of groups selected as commonly used
 boolean tsControlPanel(int limit, java.lang.String servletPath, java.lang.String nsid)
          Update the number of user should be displayed based on tag similiarty recommendation
 java.lang.String tsNumberOfUsers(java.lang.String nsid, java.lang.String servletPath)
          Retrieve number of users should be displayed for recommendation based on the tag similarity and construct the dropdown list
 boolean tsThresholdControlPanel(float thresholdValue, java.lang.String servletPath, java.lang.String nsid)
          Update the value of the threshold
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Customisation

public Customisation()
Method Detail

createDropdownList

public java.lang.String createDropdownList(int selectedIndex,
                                           java.lang.String id,
                                           int sizeOfDropDownList,
                                           java.lang.String functionName)
This method creates dropdown list

Parameters:
selectedIndex - which includes should be selected
id - is the name and id of the dropdown list
sizeOfDropDownList - defines the size of the drop down list
functionName - is the value of onchange in the dropdown list
Returns:
created dropdown list in string

deletegroup

public boolean deletegroup(int gid,
                           java.lang.String servletPath,
                           java.lang.String nsid)
Deletes the group from the list of most frequently used

Parameters:
gid - group id
servletPath - where the property file is
nsid - user id of the user from Flickr website
Returns:
if the deletion was successful the method returns true

favoControlPanel

public boolean favoControlPanel(int limit,
                                java.lang.String servletPath,
                                java.lang.String nsid)
Update the number of users should be returned for favourite users

Parameters:
limit - the number of users only numbers
servletPath - where the database property file is located
nsid - user id from the flickr website
Returns:
if update was successful the method returns true

coacControlPanel

public boolean coacControlPanel(int limit,
                                java.lang.String servletPath,
                                java.lang.String nsid)
Update the number of people should be return based on coac recommendation

Parameters:
limit - number of users to be displayed
servletPath - where the database property file is located
nsid - user id from the flickr website
Returns:
if update was successful the method returns true

favoNumberOfUsers

public java.lang.String favoNumberOfUsers(java.lang.String nsid,
                                          java.lang.String servletPath)
Retrieve number of users should be displayed for recommendation based on the favouite photos and construct the dropdown list

Parameters:
nsid - user id from the flickr website
servletPath - where the database property file is located
Returns:
dropdown list with the limit favo being selected

coacNumberOfUsers

public java.lang.String coacNumberOfUsers(java.lang.String nsid,
                                          java.lang.String servletPath)
Retrieve number of users should be displayed for recommendation based on the contact of a contact and construct the dropdown list

Parameters:
nsid - user id from the flickr website
servletPath - where the database property file is located
Returns:
dropdown list with the limit coac being selected

tsNumberOfUsers

public java.lang.String tsNumberOfUsers(java.lang.String nsid,
                                        java.lang.String servletPath)
Retrieve number of users should be displayed for recommendation based on the tag similarity and construct the dropdown list

Parameters:
nsid - user id from the flickr website
servletPath - where the database property file is located
Returns:
dropdown list with the limit ts being selected

getThreshold

public java.lang.String getThreshold(java.lang.String nsid,
                                     java.lang.String servletPath)
Get the value of the threshold

Parameters:
nsid - user id from the flickr website
servletPath - where the database property file is located
Returns:
threshold value to be assigned the text box for customisation

mostFreqUsedGroups

public java.lang.String mostFreqUsedGroups(java.lang.String nsid,
                                           java.lang.String servletPath)
Create the list of groups that have been flagged as the more frequently used

Parameters:
nsid - user id from the Flickr website
servletPath - where the database property file is located
Returns:
return the list of all groups

numberOfGroups

public java.lang.String numberOfGroups(java.lang.String nsid,
                                       java.lang.String servletPath)
Get the number of groups selected as commonly used

Parameters:
nsid - user id from the flickr website
servletPath - where the database property file is located
Returns:
the number of groups already selected

listOfGroupsToChooseFrom

public java.lang.String listOfGroupsToChooseFrom(java.lang.String nsid,
                                                 java.lang.String servletPath)
List the groups which have not yet been selected as frequently used

Parameters:
nsid - user id from the flickr website
servletPath - where the database property fiel is located
Returns:
dropdown list of groups which have not already been selected

tsControlPanel

public boolean tsControlPanel(int limit,
                              java.lang.String servletPath,
                              java.lang.String nsid)
Update the number of user should be displayed based on tag similiarty recommendation

Parameters:
limit - the number users to be dislayed
servletPath - wher the database property file is located
nsid - user id from the flickr website
Returns:
if update was successful the method returns true

tsThresholdControlPanel

public boolean tsThresholdControlPanel(float thresholdValue,
                                       java.lang.String servletPath,
                                       java.lang.String nsid)
Update the value of the threshold

Parameters:
thresholdValue - the value of the threshold which is from 0 to 100 is taken in percentage
servletPath - where the database details file is located
nsid - user id from the Flickr account
Returns:
if update was successful the method returns true