cbr.agent
Class CCVGathererAgent

java.lang.Object
  extended byde.fhg.igd.semoa.agent.RoundtripAgent
      extended bycbr.agent.CCVGathererAgent
All Implemented Interfaces:
Runnable, Serializable

public class CCVGathererAgent
extends RoundtripAgent

This gatherer agent hops to a number of agent servers and collects index information of pictures provided by the visited servers. Indexing is done according to the 'Color Coherence Vector' scheme published by Pass et al.

The agent needs to be configured in a certain way. In particular its itinerary must be specified by means of the agent's properties.

pics = <string>
The path to the PicsSource service.
idx = <string>
The path to the PicsIndex service.
hop.<num> = <URL>
The URL string of the <num>'th hop, starting with 0.
hop.final = <URL>
The URL string of the final hop where the index is going to be updated.
thumbs = <boolean>
"true" iff thumbnails shall be fetched.

Version:
"$Id: CCVGathererAgent.java 1913 2007-08-08 02:41:53Z jpeters $"
Author:
Patric Kabus, Volker Roth
See Also:
Serialized Form

Field Summary
static String NAME_IDX
          The name of the index file.
static String NAME_THUMBS
          The name of the directory in which thumbnails are kept.
static String NAME_TMP
          The name of the temporary index file.
protected  long time_
          The time this agent started (the first time it is run).
 
Fields inherited from class de.fhg.igd.semoa.agent.RoundtripAgent
debug_, env_, MAX_RETRIES, mob_, start_, vars_
 
Constructor Summary
CCVGathererAgent()
           
 
Method Summary
protected  void finish()
          This method shall be executed when the gatherer is at its destination host on which it is expected to update the index with the collected PictureEntries.
 void onRunning()
          This method is called upon running the agent.
protected  void perform()
          Gathers the feature vectors of local pictures.
 
Methods inherited from class de.fhg.igd.semoa.agent.RoundtripAgent
getHopNumber, run
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

NAME_IDX

public static final String NAME_IDX
The name of the index file.

See Also:
Constant Field Values

NAME_TMP

public static final String NAME_TMP
The name of the temporary index file.

See Also:
Constant Field Values

NAME_THUMBS

public static final String NAME_THUMBS
The name of the directory in which thumbnails are kept.

See Also:
Constant Field Values

time_

protected long time_
The time this agent started (the first time it is run).

Constructor Detail

CCVGathererAgent

public CCVGathererAgent()
Method Detail

onRunning

public void onRunning()
This method is called upon running the agent. It initialises some fields required by the agent and creates empty index files for the current hop if none exists yet.

On each hop, a dummy index file is created in the mutable part of the agent. The files' names are of the form <n>/idx, where <n> stands for the number of the hop. Hop numbers starts with zero. If the structure is mapped to a file system then the above form implies that a directory is created for each hop. This allows to set a security policy which controls access to the individual indexes.

Overrides:
onRunning in class RoundtripAgent

perform

protected void perform()
                throws Exception
Gathers the feature vectors of local pictures. This requires that a PicsSource service is installed locally. The path to this service is configured by means of the agent's properties. The relevant property is:
pics = <string>
The path where the PicsSource is expected to be published.

Overrides:
perform in class RoundtripAgent
Throws:
Exception - if something's wrong.

finish

protected void finish()
               throws Exception
This method shall be executed when the gatherer is at its destination host on which it is expected to update the index with the collected PictureEntries.

The name and level of the PicsIndex to use must be configured in the agent's properties. The property is:

idx = <string>
The path where the PicsIndex is expected to be published.

Overrides:
finish in class RoundtripAgent
Throws:
if - somethong's wrong.
Exception


Copyright © Fraunhofer Gesellschaft. All Rights Reserved.