edu.umich.eecs.tac.props
Class QueryReport.QueryReportEntry

java.lang.Object
  extended by edu.umich.eecs.tac.props.AbstractKeyedEntry<T>
      extended by edu.umich.eecs.tac.props.AbstractTransportableEntry<Query>
          extended by edu.umich.eecs.tac.props.AbstractQueryEntry
              extended by edu.umich.eecs.tac.props.QueryReport.QueryReportEntry
All Implemented Interfaces:
KeyedEntry<Query>, QueryEntry, java.io.Serializable, se.sics.isl.transport.Transportable
Enclosing class:
QueryReport

public static class QueryReport.QueryReportEntry
extends AbstractQueryEntry

Query report entry holds the impressions, clicks, cost, average position, and ad displayed by the advertiser for each query class during the period as well as the positions and displayed ads of all advertisers during the period.

Author:
Patrick Jordan, Lee Callender
See Also:
Serialized Form

Constructor Summary
QueryReport.QueryReportEntry()
          Creates an empty report entry.
 
Method Summary
 java.util.Set<java.lang.String> advertisers()
          Returns the set of displayed advertisers.
 Ad getAd()
          Returns the shown ad.
 Ad getAd(java.lang.String advertiser)
          Returns the ad shown by an advertiser.
 int getClicks()
          Returns the number of clicks.
 double getCost()
          Returns the total cost.
 double getCPC()
          Returns the average CPC.
 int getImpressions()
          Returns the total number of impressions.
 double getPosition()
          Returns the average position.
 double getPosition(java.lang.String advertiser)
          Returns the average position of an advertiser.
 int getPromotedImpressions()
          Returns the total number of promoted impressions.
 int getRegularImpressions()
          Returns the total number of regular impressions.
protected  void readEntry(se.sics.isl.transport.TransportReader reader)
          Reads the query report entry information.
 void setAd(Ad ad)
          Sets the shown ad.
 void setAd(java.lang.String advertiser, Ad ad)
          Sets the ad shown by an advertiser.
 void setAdAndPosition(java.lang.String advertiser, Ad ad, double position)
          Sets the average position and the ad shown by an advertiser.
 void setPosition(java.lang.String advertiser, double position)
          Sets the average position of an advertiser.
 void setPromotedImpressions(int promotedImpressions)
          Sets the total number of promoted impressions.
 void setRegularImpressions(int regularImpressions)
          Sets the total number of regular impressions.
 java.lang.String toString()
          Returns the string representation of the query report entry.
protected  void writeEntry(se.sics.isl.transport.TransportWriter writer)
          Writes the query report entry information to the writer.
 
Methods inherited from class edu.umich.eecs.tac.props.AbstractQueryEntry
getQuery, keyNodeName, setQuery
 
Methods inherited from class edu.umich.eecs.tac.props.AbstractTransportableEntry
readKey, writeKey
 
Methods inherited from class edu.umich.eecs.tac.props.AbstractKeyedEntry
getKey, getTransportName, read, setKey, write
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface edu.umich.eecs.tac.props.KeyedEntry
getKey
 
Methods inherited from interface se.sics.isl.transport.Transportable
getTransportName, read, write
 

Constructor Detail

QueryReport.QueryReportEntry

public QueryReport.QueryReportEntry()
Creates an empty report entry.

Method Detail

getImpressions

public final int getImpressions()
Returns the total number of impressions.

Returns:
the total number of impressions.

getPromotedImpressions

public final int getPromotedImpressions()
Returns the total number of promoted impressions.

Returns:
the total number of promoted impressions.

setPromotedImpressions

public final void setPromotedImpressions(int promotedImpressions)
Sets the total number of promoted impressions.

Parameters:
promotedImpressions - the total number of promoted impressions.

getRegularImpressions

public final int getRegularImpressions()
Returns the total number of regular impressions.

Returns:
the total number of regular impressions.

setRegularImpressions

public final void setRegularImpressions(int regularImpressions)
Sets the total number of regular impressions.

Parameters:
regularImpressions - the total number of regular impressions.

getClicks

public final int getClicks()
Returns the number of clicks.

Returns:
the number of clicks.

getPosition

public final double getPosition()
Returns the average position.

Returns:
the average position.

getCost

public final double getCost()
Returns the total cost.

Returns:
the total cost.

getCPC

public final double getCPC()
Returns the average CPC.

Returns:
the average CPC

getAd

public final Ad getAd()
Returns the shown ad.

Returns:
the shown ad

setAd

public final void setAd(Ad ad)
Sets the shown ad.

Parameters:
ad - the shown ad

getPosition

public final double getPosition(java.lang.String advertiser)
Returns the average position of an advertiser.

Parameters:
advertiser - the advertiser.
Returns:
the average position of an advertiser

setPosition

public final void setPosition(java.lang.String advertiser,
                              double position)
Sets the average position of an advertiser.

Parameters:
advertiser - the advertiser.
position - the average position of an advertiser

getAd

public final Ad getAd(java.lang.String advertiser)
Returns the ad shown by an advertiser.

Parameters:
advertiser - the advertiser
Returns:
the ad shown by an advertiser

setAd

public final void setAd(java.lang.String advertiser,
                        Ad ad)
Sets the ad shown by an advertiser.

Parameters:
advertiser - the advertiser
ad - the ad shown by an advertiser

setAdAndPosition

public final void setAdAndPosition(java.lang.String advertiser,
                                   Ad ad,
                                   double position)
Sets the average position and the ad shown by an advertiser.

Parameters:
advertiser - the advertiser
ad - the ad shown by an advertiser
position - the average position

advertisers

public final java.util.Set<java.lang.String> advertisers()
Returns the set of displayed advertisers.

Returns:
the set of displayed advertisers.

readEntry

protected final void readEntry(se.sics.isl.transport.TransportReader reader)
                        throws java.text.ParseException
Reads the query report entry information.

Specified by:
readEntry in class AbstractKeyedEntry<Query>
Parameters:
reader - the reader to read the state in from.
Throws:
java.text.ParseException - if an exception occured the query report entry information.

writeEntry

protected final void writeEntry(se.sics.isl.transport.TransportWriter writer)
Writes the query report entry information to the writer.

Specified by:
writeEntry in class AbstractKeyedEntry<Query>
Parameters:
writer - the writer to write the entry state to

toString

public final java.lang.String toString()
Returns the string representation of the query report entry.

Overrides:
toString in class java.lang.Object
Returns:
the string representation of the query report entry.


Copyright © 2007-2009 Association for Trading Agent Research. All Rights Reserved.