public class Tagger extends TagService
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
DEFAULT_CATALOG
default catalog if unspecified
|
static java.lang.String |
DEFAULT_CONFIG
default config file if unspecified
|
static java.lang.String |
ID
CVS ID
|
static java.lang.String |
TAGSONOMY_ROOT
The group name that contains the tags
|
observations, products, tags
Constructor and Description |
---|
Tagger() |
Modifier and Type | Method and Description |
---|---|
static Tag |
find(PIRL.Configuration.Configuration config,
java.lang.String path)
Convenience method to locate a named tag in the tagsonomy defined in a configuration file.
|
java.lang.String |
getCatalog()
Get the name of the database catalog name we're work with.
|
PIRL.Configuration.Configuration |
getConfiguration()
Get the Configuration we're using.
|
PIRL.Database.Database |
getDatabase()
Get our database.
|
Tagsonomy |
getTagsonomy()
Get the tag definitions loaded in the initialization step
|
void |
init()
Perform one-time per-instance setup.
|
void |
init(PIRL.Configuration.Configuration config)
Perform one-time per-instance setup.
|
void |
init(PIRL.Configuration.Configuration config,
PIRL.Database.Database database)
Perform one-time per-instance setup.
|
boolean |
isQuiet()
Get quiet setting.
|
boolean |
isVerbose()
Get verbose setting.
|
static void |
main(java.lang.String[] args)
Command-line interface
|
protected static void |
printUsage(java.io.PrintStream out)
Print the usage help text to a stream.
|
void |
reset()
Resets the Tagger to it's empty but initialized state.
|
void |
setCatalog(java.lang.String catalog)
Set the name of the database catalog name to work with.
|
void |
setQuiet(boolean quiet)
Set quiet on or off
|
void |
setVerbose(boolean verbose)
Set verboseness on or off.
|
addObservation, addProduct, addTag, delete, get, getObservations, getProducts, getTags, init, print, tag, track
public static final java.lang.String ID
public static java.lang.String DEFAULT_CONFIG
public static java.lang.String TAGSONOMY_ROOT
public static final java.lang.String DEFAULT_CATALOG
public void init() throws PIRL.Database.Database_Exception, PIRL.Configuration.Configuration_Exception, java.sql.SQLException
PIRL.Configuration.Configuration_Exception
- Invalid default configuration, no DatabasePIRL.Database.Database_Exception
- Could not Connect to databasejava.sql.SQLException
public void init(PIRL.Configuration.Configuration config) throws PIRL.Database.Database_Exception, PIRL.Configuration.Configuration_Exception, java.sql.SQLException
config
- The configuration instancePIRL.Configuration.Configuration_Exception
- Invalid config file, no DatabasePIRL.Database.Database_Exception
- Could not Connect to databasejava.sql.SQLException
public void init(PIRL.Configuration.Configuration config, PIRL.Database.Database database) throws PIRL.Database.Database_Exception, PIRL.Configuration.Configuration_Exception, java.sql.SQLException
config
- The configuration instancedatabase
- The database instancePIRL.Configuration.Configuration_Exception
- Invalid configuration file, no DatabasePIRL.Database.Database_Exception
- Could not Connect to databasejava.sql.SQLException
public static Tag find(PIRL.Configuration.Configuration config, java.lang.String path) throws java.lang.IllegalArgumentException
config
- filepath
- tag name or pathjava.lang.IllegalArgumentException
- Tag could not be locatedpublic void reset()
public Tagsonomy getTagsonomy()
public void setCatalog(java.lang.String catalog)
catalog
- Catalog namepublic java.lang.String getCatalog()
public PIRL.Configuration.Configuration getConfiguration()
public PIRL.Database.Database getDatabase()
public void setQuiet(boolean quiet)
quiet
- If true, all logging will be disabledpublic void setVerbose(boolean verbose)
verbose
- If true, all logging will be enabled.public boolean isQuiet()
public boolean isVerbose()
protected static void printUsage(java.io.PrintStream out)
out
- Stream to print to.public static void main(java.lang.String[] args)
args
- Command line argumentsCopyright \ (C) Arizona Board of Regents on behalf of the \ Planetary Image Research Laboratory, Lunar and \ Planetary Laboratory at the University of Arizona