uk.ac.starlink.ttools.task
Class LineTableEnvironment

java.lang.Object
  extended by uk.ac.starlink.task.LineEnvironment
      extended by uk.ac.starlink.ttools.task.LineTableEnvironment
All Implemented Interfaces:
Environment, TableEnvironment

public class LineTableEnvironment
extends LineEnvironment
implements TableEnvironment

Execution environment suitable for use with the TTOOLS package. This inherits most of its behaviour from LineEnvironment but also impelements the additional methods of the TableEnvironment interface.

Since:
27 Nov 2006
Author:
Mark Taylor

Field Summary
 
Fields inherited from class uk.ac.starlink.task.LineEnvironment
INDIRECTION_CHAR, NUM_TRIES
 
Constructor Summary
LineTableEnvironment()
           
 
Method Summary
 JDBCAuthenticator getJdbcAuthenticator()
          Returns a JDBC authenticator suitable for use in this environment.
static JDBCAuthenticator getJdbcAuthenticator(Environment env)
          Returns a suitable JDBC authenticator for a given environment.
 String getParamHelp(Parameter param)
          Returns the help string for a given parameter.
static StoragePolicy getStoragePolicy(Environment env)
          Returns a suitable storage policy for a given environment.
 StarTableFactory getTableFactory()
          Returns a table factory suitable for use in this environment.
static StarTableFactory getTableFactory(Environment env)
          Returns a suitable table factory for a given environment.
 StarTableOutput getTableOutput()
          Returns a table output marshaller suitable for use in this environment.
static StarTableOutput getTableOutput(Environment env)
          Returns a suitable table output marshaller for a given environment.
 boolean isDebug()
          Indicates whether we are running in debug mode.
 boolean isHidden(Parameter param)
          Determines whether a parameter is "hidden", that is its value should not be revealed to prying eyes.
 boolean isStrictVotable()
          Determines whether votables are to be parsed in strict mode.
static boolean isStrictVotable(Environment env)
          Determines whether votables are to be parsed in strict mode.
static String normaliseName(String name)
          Normalises a given name.
 boolean paramNameMatches(String envName, Parameter param)
          Uses normaliseName(java.lang.String).
 void setDebug(boolean debug)
          Sets whether we are running in debug mode.
 void setStrictVotable(boolean strict)
          Sets whether votables should be parsed in strict mode.
 
Methods inherited from class uk.ac.starlink.task.LineEnvironment
acquireValue, checkParameters, clearValue, getAssignments, getErrorStream, getInteractive, getNames, getOutputStream, getPromptAll, getUnused, setErrorStream, setInteractive, setOutputStream, setPromptAll, setWords
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface uk.ac.starlink.task.Environment
acquireValue, clearValue, getErrorStream, getNames, getOutputStream
 

Constructor Detail

LineTableEnvironment

public LineTableEnvironment()
Method Detail

isHidden

public boolean isHidden(Parameter param)
Description copied from class: LineEnvironment
Determines whether a parameter is "hidden", that is its value should not be revealed to prying eyes. The default implementation returns false.

Overrides:
isHidden in class LineEnvironment
Parameters:
param - param
Returns:
true if param is hidden type

getParamHelp

public String getParamHelp(Parameter param)
Description copied from class: LineEnvironment
Returns the help string for a given parameter. This should be supplied in ready-to-use form, that is formatted for a suitable screen width etc.

Overrides:
getParamHelp in class LineEnvironment
Parameters:
param - parameter
Returns:
formatted documentation for param

getTableFactory

public StarTableFactory getTableFactory()
Returns a table factory suitable for use in this environment.

Specified by:
getTableFactory in interface TableEnvironment
Returns:
table factory

getTableOutput

public StarTableOutput getTableOutput()
Returns a table output marshaller suitable for use in this environment.

Specified by:
getTableOutput in interface TableEnvironment
Returns:
table output

getJdbcAuthenticator

public JDBCAuthenticator getJdbcAuthenticator()
Returns a JDBC authenticator suitable for use in this environment.

Specified by:
getJdbcAuthenticator in interface TableEnvironment
Returns:
JDBC authenticator

isDebug

public boolean isDebug()
Indicates whether we are running in debug mode.

Specified by:
isDebug in interface TableEnvironment
Returns:
true iff debugging output is required

setDebug

public void setDebug(boolean debug)
Sets whether we are running in debug mode.

Specified by:
setDebug in interface TableEnvironment
Parameters:
debug - set true if you want debugging messages

isStrictVotable

public boolean isStrictVotable()
Determines whether votables are to be parsed in strict mode.

Specified by:
isStrictVotable in interface TableEnvironment
Returns:
true if VOTables will be interpreted strictly in accordance with the standard

setStrictVotable

public void setStrictVotable(boolean strict)
Sets whether votables should be parsed in strict mode.

Specified by:
setStrictVotable in interface TableEnvironment
Parameters:
strict - true if VOTables should be interpreted strictly in accordance with the standard

paramNameMatches

public boolean paramNameMatches(String envName,
                                Parameter param)
Uses normaliseName(java.lang.String).

Overrides:
paramNameMatches in class LineEnvironment
Parameters:
envName - parameter name from environment
param - parameter
Returns:
true iff envName is considered to name param

normaliseName

public static String normaliseName(String name)
Normalises a given name. This folds to lower case, and may modify spelling.

Parameters:
name - input name
Returns:
normalised name

getTableFactory

public static StarTableFactory getTableFactory(Environment env)
Returns a suitable table factory for a given environment. If env is a TableEnvironement then env's factory is returned, otherwise a default one is returned.

Parameters:
env - execution environment
Returns:
table factory

getTableOutput

public static StarTableOutput getTableOutput(Environment env)
Returns a suitable table output marshaller for a given environment. If env is a TableEnvironment then env's outputter is returned, otherwise a default one is returned.

Parameters:
env - execution environment
Returns:
table output

getJdbcAuthenticator

public static JDBCAuthenticator getJdbcAuthenticator(Environment env)
Returns a suitable JDBC authenticator for a given environment. If env is a TableEnvironment then env's authenticator is returned, otherwise a new one is returned.

Parameters:
env - execution environment
Returns:
JDBC authenticator

getStoragePolicy

public static StoragePolicy getStoragePolicy(Environment env)
Returns a suitable storage policy for a given environment.

Parameters:
env - execution environment
Returns:
storage policy

isStrictVotable

public static boolean isStrictVotable(Environment env)
Determines whether votables are to be parsed in strict mode.

Parameters:
env - execution environment
Returns:
true if VOTables will be interpreted strictly in accordance with the standard


Copyright © 2015 Central Laboratory of the Research Councils. All Rights Reserved.