|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectuk.ac.starlink.topcat.TopcatUtils
public class TopcatUtils
Class containing miscellaneous static methods and constants for use in TOPCAT.
| Field Summary | |
|---|---|
static uk.ac.starlink.table.ValueInfo |
ACTIVATORS_INFO
Parameter key for storing an activation action for a table. |
static uk.ac.starlink.table.ValueInfo |
BASE_DESCRIPTION_INFO
Column auxiliary metadata key identifying the description of columns which also have an expression (EXPR_INFO) entry. |
static uk.ac.starlink.table.ValueInfo |
COLID_INFO
Column auxiliary metadata key identifying the uniqe column identifier for use in algebraic expressions. |
static String |
DEMO_LOCATION
|
static String |
DEMO_NODES
|
static String |
DEMO_TABLE
|
static uk.ac.starlink.table.ValueInfo |
EXPR_INFO
Column auxiliary metadata key identifying the text string which gives an expression for a synthetic column. |
static uk.ac.starlink.table.ValueInfo |
NUMERIC_CONVERTER_INFO
Column auxiliary metadata key identifying an object which can convert from non-numeric cell values to numeric ones. |
static String |
STATUS_URL
|
static uk.ac.starlink.table.ValueInfo |
TIME_INFO
Data identifier for epoch-type data. |
static String |
VERSION_RESOURCE
|
| Constructor Summary | |
|---|---|
TopcatUtils()
|
|
| Method Summary | |
|---|---|
static boolean |
canExec()
Indicates whether we have System.exec permission. |
static boolean |
canJel()
Indicates if it's possible to use JEL to compile algebraic expressions. |
static boolean |
canSog()
Indicates whether there are enough classes to make SoG work at runtime. |
static void |
enquireLatestVersion()
Ascertains the most recent release using an external connection, and reports through the logging system as appropriate. |
static boolean |
equals(Object o1,
Object o2)
Determines whether two objects are equal in the sense of Object.equals(java.lang.Object). |
static String |
formatLong(long num)
Formats a long value for presentation as text. |
static String[] |
getAbout()
Returns some lines of text describing this copy of the software including its version and versions of some important components. |
static String |
getApplicationName()
Returns the name of this application. |
static String |
getBaseDescription(uk.ac.starlink.table.ColumnInfo info)
Returns the 'base description' of a column info. |
static String |
getBaseName(String origName,
String baseSuffix)
Returns the base name of a column; that is one without any suffix based on baseSuffix. |
static String |
getDistinctName(ColumnList colList,
String origName,
String baseSuffix)
Returns a column name based on a given one which is guaranteed distinct from any others in the column list. |
static String |
getExpression(uk.ac.starlink.table.ColumnInfo info)
Returns the expression text for a column. |
static String |
getRevision()
Returns the subversion revision number for TOPCAT and its dependencies. |
static String |
getSTILVersion()
Returns the version string for the version of STIL being used here. |
static String |
getVersion()
Returns the version string for this copy of TOPCAT. |
static void |
memoryError(OutOfMemoryError e)
Alerts the user that the system has run out of memory, and provides the option of some useful tips. |
static void |
memoryErrorLater(OutOfMemoryError e)
Queues a memoryError(java.lang.OutOfMemoryError) call for later execution on the
event dispatch thread. |
static void |
setBaseDescription(uk.ac.starlink.table.ColumnInfo info,
String desc)
Sets the 'base description' of a column info. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static String DEMO_LOCATION
public static String DEMO_TABLE
public static String DEMO_NODES
public static final String VERSION_RESOURCE
public static final String STATUS_URL
public static final uk.ac.starlink.table.ValueInfo COLID_INFO
public static final uk.ac.starlink.table.ValueInfo BASE_DESCRIPTION_INFO
public static final uk.ac.starlink.table.ValueInfo EXPR_INFO
public static final uk.ac.starlink.table.ValueInfo NUMERIC_CONVERTER_INFO
public static final uk.ac.starlink.table.ValueInfo ACTIVATORS_INFO
public static final uk.ac.starlink.table.ValueInfo TIME_INFO
| Constructor Detail |
|---|
public TopcatUtils()
| Method Detail |
|---|
public static String getBaseDescription(uk.ac.starlink.table.ColumnInfo info)
info - column info
public static void setBaseDescription(uk.ac.starlink.table.ColumnInfo info,
String desc)
getBaseDescription(uk.ac.starlink.table.ColumnInfo) and also
the description string itself
(DefaultValueInfo.getDescription()).
info - column info to modifydesc - base description string (don't include expression text)public static String getExpression(uk.ac.starlink.table.ColumnInfo info)
info - column info
public static String getBaseName(String origName,
String baseSuffix)
getDistinctName(uk.ac.starlink.topcat.ColumnList, java.lang.String, java.lang.String).
origName - full name, possibly including bits of suffixbaseSuffix - the base suffix string
public static String getDistinctName(ColumnList colList,
String origName,
String baseSuffix)
colList - column list within which distinct naming is requiredorigName - initial namebaseSuffix - suffix used for deduplication
getBaseName(java.lang.String, java.lang.String)public static String getApplicationName()
public static String[] getAbout()
public static void memoryError(OutOfMemoryError e)
e - exception, or nullpublic static void memoryErrorLater(OutOfMemoryError e)
memoryError(java.lang.OutOfMemoryError) call for later execution on the
event dispatch thread.
e - exception, or nullpublic static boolean canSog()
public static boolean canExec()
public static boolean canJel()
public static String getVersion()
public static String getRevision()
public static String getSTILVersion()
public static void enquireLatestVersion()
public static boolean equals(Object o1,
Object o2)
Object.equals(java.lang.Object). Unlike that method however,
it returns true if both objects are null, and
won't throw a NullPointerException.
o1 - first objecto2 - second object
o1.equals(o2) or they're both nullpublic static String formatLong(long num)
num - number to format
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||