Package uk.ac.starlink.ttools.task
Class LineTableEnvironment
- java.lang.Object
-
- uk.ac.starlink.task.LineEnvironment
-
- uk.ac.starlink.ttools.task.LineTableEnvironment
-
- All Implemented Interfaces:
uk.ac.starlink.task.Environment
,TableEnvironment
public class LineTableEnvironment extends uk.ac.starlink.task.LineEnvironment implements TableEnvironment
Execution environment suitable for use with the TTOOLS package. This inherits most of its behaviour fromLineEnvironment
but also impelements the additional methods of theTableEnvironment
interface.- Since:
- 27 Nov 2006
- Author:
- Mark Taylor
-
-
Constructor Summary
Constructors Constructor Description LineTableEnvironment()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description uk.ac.starlink.table.jdbc.JDBCAuthenticator
getJdbcAuthenticator()
Returns a JDBC authenticator suitable for use in this environment.static uk.ac.starlink.table.jdbc.JDBCAuthenticator
getJdbcAuthenticator(uk.ac.starlink.task.Environment env)
Returns a suitable JDBC authenticator for a given environment.java.lang.String
getParamHelp(uk.ac.starlink.task.Parameter<?> param)
static uk.ac.starlink.table.StoragePolicy
getStoragePolicy(uk.ac.starlink.task.Environment env)
Returns a suitable storage policy for a given environment.uk.ac.starlink.table.StarTableFactory
getTableFactory()
Returns a table factory suitable for use in this environment.static uk.ac.starlink.table.StarTableFactory
getTableFactory(uk.ac.starlink.task.Environment env)
Returns a suitable table factory for a given environment.uk.ac.starlink.table.StarTableOutput
getTableOutput()
Returns a table output marshaller suitable for use in this environment.static uk.ac.starlink.table.StarTableOutput
getTableOutput(uk.ac.starlink.task.Environment env)
Returns a suitable table output marshaller for a given environment.boolean
isDebug()
Indicates whether we are running in debug mode.boolean
isHidden(uk.ac.starlink.task.Parameter<?> param)
boolean
isStrictVotable()
Determines whether votables are to be parsed in strict mode.static boolean
isStrictVotable(uk.ac.starlink.task.Environment env)
Determines whether votables are to be parsed in strict mode.static java.lang.String
normaliseName(java.lang.String name)
Normalises a given name.boolean
paramNameMatches(java.lang.String envName, uk.ac.starlink.task.Parameter<?> param)
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
-
-
-
-
Method Detail
-
isHidden
public boolean isHidden(uk.ac.starlink.task.Parameter<?> param)
- Overrides:
isHidden
in classuk.ac.starlink.task.LineEnvironment
-
getParamHelp
public java.lang.String getParamHelp(uk.ac.starlink.task.Parameter<?> param)
- Overrides:
getParamHelp
in classuk.ac.starlink.task.LineEnvironment
-
getTableFactory
public uk.ac.starlink.table.StarTableFactory getTableFactory()
Returns a table factory suitable for use in this environment.- Specified by:
getTableFactory
in interfaceTableEnvironment
- Returns:
- table factory
-
getTableOutput
public uk.ac.starlink.table.StarTableOutput getTableOutput()
Returns a table output marshaller suitable for use in this environment.- Specified by:
getTableOutput
in interfaceTableEnvironment
- Returns:
- table output
-
getJdbcAuthenticator
public uk.ac.starlink.table.jdbc.JDBCAuthenticator getJdbcAuthenticator()
Returns a JDBC authenticator suitable for use in this environment.- Specified by:
getJdbcAuthenticator
in interfaceTableEnvironment
- Returns:
- JDBC authenticator
-
isDebug
public boolean isDebug()
Indicates whether we are running in debug mode.- Specified by:
isDebug
in interfaceTableEnvironment
- 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 interfaceTableEnvironment
- 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 interfaceTableEnvironment
- 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 interfaceTableEnvironment
- Parameters:
strict
- true if VOTables should be interpreted strictly in accordance with the standard
-
paramNameMatches
public boolean paramNameMatches(java.lang.String envName, uk.ac.starlink.task.Parameter<?> param)
- Overrides:
paramNameMatches
in classuk.ac.starlink.task.LineEnvironment
-
normaliseName
public static java.lang.String normaliseName(java.lang.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 uk.ac.starlink.table.StarTableFactory getTableFactory(uk.ac.starlink.task.Environment env)
Returns a suitable table factory for a given environment. Ifenv
is a TableEnvironement thenenv
's factory is returned, otherwise a default one is returned.- Parameters:
env
- execution environment- Returns:
- table factory
-
getTableOutput
public static uk.ac.starlink.table.StarTableOutput getTableOutput(uk.ac.starlink.task.Environment env)
Returns a suitable table output marshaller for a given environment. Ifenv
is a TableEnvironment thenenv
's outputter is returned, otherwise a default one is returned.- Parameters:
env
- execution environment- Returns:
- table output
-
getJdbcAuthenticator
public static uk.ac.starlink.table.jdbc.JDBCAuthenticator getJdbcAuthenticator(uk.ac.starlink.task.Environment env)
Returns a suitable JDBC authenticator for a given environment. Ifenv
is a TableEnvironment thenenv
's authenticator is returned, otherwise a new one is returned.- Parameters:
env
- execution environment- Returns:
- JDBC authenticator
-
getStoragePolicy
public static uk.ac.starlink.table.StoragePolicy getStoragePolicy(uk.ac.starlink.task.Environment env)
Returns a suitable storage policy for a given environment.- Parameters:
env
- execution environment- Returns:
- storage policy
-
isStrictVotable
public static boolean isStrictVotable(uk.ac.starlink.task.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
-
-