|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectuk.ac.starlink.ttools.task.MapEnvironment
public class MapEnvironment
Environment which allows use of ttools tasks from an in-memory context. Input StarTables can be set as values of parameters and output ones can be extracted.
Constructor Summary | |
---|---|
MapEnvironment()
Constructs a new environment with no values. |
|
MapEnvironment(Map map)
Constructs a new environment with a map of parameter name->value pairs. |
|
MapEnvironment(MapEnvironment env)
Clone constructor. |
Method Summary | |
---|---|
void |
acquireValue(uk.ac.starlink.task.Parameter param)
|
void |
clearValue(uk.ac.starlink.task.Parameter param)
|
PrintStream |
getErrorStream()
|
uk.ac.starlink.table.jdbc.JDBCAuthenticator |
getJdbcAuthenticator()
Returns a JDBC authenticator suitable for use in this environment. |
String[] |
getNames()
|
String[] |
getOutputLines()
Returns the output written by the task so far, in an array one line per element. |
PrintStream |
getOutputStream()
|
uk.ac.starlink.table.StarTable |
getOutputTable(String paramName)
If the task which has been executed in this environment has created an output table which has not been otherwise disposed of, you can get it from here. |
String |
getOutputText()
Returns a string which contains all the output written by the task so far. |
uk.ac.starlink.table.StarTableFactory |
getTableFactory()
Returns a table factory suitable for use in this environment. |
uk.ac.starlink.table.StarTableOutput |
getTableOutput()
Returns a table output marshaller suitable for use in this environment. |
boolean |
isDebug()
Indicates whether we are running in debug mode. |
boolean |
isStrictVotable()
Determines whether votables are to be parsed in strict mode. |
void |
setDebug(boolean debug)
Sets whether we are running in debug mode. |
MapEnvironment |
setResourceBase(Class clazz)
Sets the class which defines the context for resource discovery. |
void |
setStrictVotable(boolean strict)
Sets whether votables should be parsed in strict mode. |
MapEnvironment |
setValue(String paramName,
Object value)
Sets the value of a parameter. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public MapEnvironment()
public MapEnvironment(Map map)
map
- parameter mappublic MapEnvironment(MapEnvironment env)
env
- environment to copyMethod Detail |
---|
public PrintStream getOutputStream()
getOutputStream
in interface uk.ac.starlink.task.Environment
public PrintStream getErrorStream()
getErrorStream
in interface uk.ac.starlink.task.Environment
public void clearValue(uk.ac.starlink.task.Parameter param)
clearValue
in interface uk.ac.starlink.task.Environment
public String[] getNames()
getNames
in interface uk.ac.starlink.task.Environment
public String getOutputText()
public String[] getOutputLines()
public MapEnvironment setValue(String paramName, Object value)
paramName
- namevalue
- string or other value
public MapEnvironment setResourceBase(Class clazz)
clazz
- resource base class
Class.getResource(java.lang.String)
public uk.ac.starlink.table.StarTable getOutputTable(String paramName)
paramName
- name of a TableConsumerParameter
name
public void acquireValue(uk.ac.starlink.task.Parameter param) throws uk.ac.starlink.task.TaskException
acquireValue
in interface uk.ac.starlink.task.Environment
uk.ac.starlink.task.TaskException
public uk.ac.starlink.table.StarTableFactory getTableFactory()
TableEnvironment
getTableFactory
in interface TableEnvironment
public uk.ac.starlink.table.StarTableOutput getTableOutput()
TableEnvironment
getTableOutput
in interface TableEnvironment
public uk.ac.starlink.table.jdbc.JDBCAuthenticator getJdbcAuthenticator()
TableEnvironment
getJdbcAuthenticator
in interface TableEnvironment
public boolean isDebug()
TableEnvironment
isDebug
in interface TableEnvironment
public void setDebug(boolean debug)
TableEnvironment
setDebug
in interface TableEnvironment
debug
- set true if you want debugging messagespublic boolean isStrictVotable()
TableEnvironment
isStrictVotable
in interface TableEnvironment
public void setStrictVotable(boolean strict)
TableEnvironment
setStrictVotable
in interface TableEnvironment
strict
- true if VOTables should be interpreted
strictly in accordance with the standard
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |