HiRISE

HiRISE.HiVali
Class TagService

java.lang.Object
  extended by HiRISE.HiVali.TagService
Direct Known Subclasses:
Tagger

public class TagService
extends Object

This is where the magic happens.


Field Summary
static String ID
          Our CVS ID
protected  List<Observation> observations
          hold observations to tag
protected  List<Product> products
          hold products to tag
protected  List<Tag> tags
          hold tags to use
 
Constructor Summary
TagService()
           
 
Method Summary
 void addObservation(Observation observation)
          Adds an observation to the list to be processed.
 void addProduct(Product product)
          Adds a product to the list to be processed.
 void addTag(Tag tag)
          Adds a tag to the list to be processed.
 void delete()
          Will delete specific tags for specific observations and products, including all feature locations assigned to those tags.
 void get()
          Gets all tags for specific observations and products and adds them onto the end of the list (you may want to clear first unless the Tagger is already empty)
 List<Observation> getObservations()
          Get the observations.
 List<Product> getProducts()
          Get the products.
 List<Tag> getTags()
          Get the tags.
 void init(Connection conn)
          Initialize with database connection
 void print()
          Will either print to standard out all tags for specific observations and products or, if no observations or products are given, list all observations and products with all of the tags that are given.
 void tag()
          If no observations or products have been added, this method will take no action.
 void track()
          Update the Product_Status for tracking a product.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ID

public static transient String ID
Our CVS ID


observations

protected List<Observation> observations
hold observations to tag


products

protected List<Product> products
hold products to tag


tags

protected List<Tag> tags
hold tags to use

Constructor Detail

TagService

public TagService()
Method Detail

init

public void init(Connection conn)
Initialize with database connection

Parameters:
conn - open database connection

addTag

public void addTag(Tag tag)
Adds a tag to the list to be processed.

Parameters:
tag - The tag

addObservation

public void addObservation(Observation observation)
Adds an observation to the list to be processed.

Parameters:
observation - The observation

addProduct

public void addProduct(Product product)
Adds a product to the list to be processed.

Parameters:
product - The product

getObservations

public List<Observation> getObservations()
Get the observations.

Returns:
observations

getProducts

public List<Product> getProducts()
Get the products.

Returns:
products

getTags

public List<Tag> getTags()
Get the tags.

Returns:
tags

track

public void track()
           throws SQLException
Update the Product_Status for tracking a product.

Throws:
SQLException - The database could not be updated

tag

public void tag()
         throws SQLException
If no observations or products have been added, this method will take no action. Otherwise, it will iterate through each observation and product, then iterate through each tag, updating the database by applying that tag to the observation or product. If polygons have been specified, each of those will be associated with each tag.

Throws:
SQLException - Database could not be updated.

delete

public void delete()
            throws SQLException
Will delete specific tags for specific observations and products, including all feature locations assigned to those tags.

Throws:
SQLException - Database could not be updated.

print

public void print()
           throws SQLException
Will either print to standard out all tags for specific observations and products or, if no observations or products are given, list all observations and products with all of the tags that are given.

Throws:
SQLException - Query could not be completed.

get

public void get()
         throws SQLException
Gets all tags for specific observations and products and adds them onto the end of the list (you may want to clear first unless the Tagger is already empty)

Throws:
SQLException - Query could not be completed.

HiRISE

Copyright (C) Arizona Board of Regents on behalf of the Planetary Image Research Laboratory, Lunar and Planetary Laboratory at the University of Arizona