com.sugestio.client.call
Class RecommendationFilter

java.lang.Object
  extended by com.sugestio.client.call.RecommendationFilter

public class RecommendationFilter
extends java.lang.Object


Nested Class Summary
static class RecommendationFilter.TimeUnit
           
 
Constructor Summary
RecommendationFilter()
          Creates an empty RecommendationFilter
 
Method Summary
 void hasTag(java.lang.String tag, boolean value)
          Retrieved items must (not) have this tag
 void inCategory(java.lang.String category, boolean belongs)
          Retrieved items must (not) belong to this category
 void inLocation_city(java.lang.String location, boolean value)
          Retrieved items must (not) be in this location
 void inLocation_simple(java.lang.String location, boolean value)
          Retrieved items must (not) be in this location
 void inSegment(java.lang.String segment, boolean belongs)
          Retrieved items must (not) belong to this segment
 void setLimit(int limit)
          Maximum number of recommendations to be retrieved.
 void setTime(long milliseconds)
          Recommended items must be available at this precise point in time.
 void setTime(long milliseconds, java.lang.Integer radius, RecommendationFilter.TimeUnit unit)
          Recommended items must be available at any time in the given time window.
 void setTime(java.lang.String time)
          Recommended items must be available at this precise point in time.
 void setTime(java.lang.String time, java.lang.Integer radius, RecommendationFilter.TimeUnit unit)
          Recommended items must be available at any time in the given time window.
protected  javax.ws.rs.core.MultivaluedMap<java.lang.String,java.lang.String> toQueryParams()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RecommendationFilter

public RecommendationFilter()
Creates an empty RecommendationFilter

Method Detail

inCategory

public void inCategory(java.lang.String category,
                       boolean belongs)
Retrieved items must (not) belong to this category

Parameters:
category -
belongs -

inSegment

public void inSegment(java.lang.String segment,
                      boolean belongs)
Retrieved items must (not) belong to this segment

Parameters:
segment -
belongs -

hasTag

public void hasTag(java.lang.String tag,
                   boolean value)
Retrieved items must (not) have this tag

Parameters:
tag -
value -

inLocation_simple

public void inLocation_simple(java.lang.String location,
                              boolean value)
Retrieved items must (not) be in this location

Parameters:
location -
value -

inLocation_city

public void inLocation_city(java.lang.String location,
                            boolean value)
Retrieved items must (not) be in this location

Parameters:
location -
value -

setLimit

public void setLimit(int limit)
Maximum number of recommendations to be retrieved.

Parameters:
limit -

setTime

public void setTime(java.lang.String time)
Recommended items must be available at this precise point in time.

Parameters:
time - a timestamp in a supported format.

setTime

public void setTime(long milliseconds)
Recommended items must be available at this precise point in time.

Parameters:
milliseconds - number of milliseconds that have passed since the UNIX epoch

setTime

public void setTime(long milliseconds,
                    java.lang.Integer radius,
                    RecommendationFilter.TimeUnit unit)
Recommended items must be available at any time in the given time window.

Parameters:
milliseconds - number of milliseconds that have passed since the UNIX epoch
radius - a time window.
unit - unit of the radius parameter (minutes, hours, days).

setTime

public void setTime(java.lang.String time,
                    java.lang.Integer radius,
                    RecommendationFilter.TimeUnit unit)
Recommended items must be available at any time in the given time window.

Parameters:
time - a timestamp in a supported format.
radius - a time window.
unit - unit of the radius parameter (minutes, hours, days).

toQueryParams

protected javax.ws.rs.core.MultivaluedMap<java.lang.String,java.lang.String> toQueryParams()