|
Version: 1.1.1 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object ca.ucalgary.seahawk.util.SeahawkOptions
public class SeahawkOptions
A class for storing user preferences affecting the behaviour of Seahawk.
Field Summary | |
---|---|
static String |
CACHE_POLICY_PROP
|
static String |
CONVERTER_HOST_PROP
|
static String |
CONVERTER_PORT_PROP
|
static String |
CUSTOM_REGISTRY_SYNONYM
|
static String |
PROPS_FILE_COMMENT
|
static String |
PROPS_FILE_ENCODING
|
static String |
PROPS_FILE_NAME
|
static String |
PROPS_FILE_SYS_PROPERTY
|
static String |
REFERRER_POLICY_PROP
|
static String |
REGISTRY_ENDPOINT_PROP
|
static String |
REGISTRY_NAMESPACE_PROP
|
static String |
REGISTRY_SYNONYM_PROP
|
static String |
TEMP_DIR_PROP
|
Constructor Summary | |
---|---|
SeahawkOptions()
|
Method Summary | |
---|---|
static double |
getCacheExpiry()
|
static File |
getDefaultsFile()
|
static String |
getDocConverterHost()
May be null (in which case conversions will not be available) |
static int |
getDocConverterPort()
|
static Registry |
getRegistry()
|
static boolean |
getSendReferrerPolicy()
|
static File |
getTempDir()
|
static void |
restoreSettings()
Sets the options based on a shortcircuiting set of rules (PROPS_FILE_SYS_PROPERTY, java.io.tmpdir/PROPS_FILE_NAME), using a properties file saved in the location saveSettings() puts it. |
static void |
restoreSettings(URL u)
Sets the options based on the contents of the file (created with saveSettings()). |
static boolean |
saveSettings()
Saves the current values of the preferences to a default location that restoreSettings() will use too. |
static void |
saveSettings(OutputStream os)
Store the settings in text form that can be understood by restoreSettings(). |
static void |
setCacheExpiry(double hours)
|
static void |
setDocConverterHost(String hostname)
For more details on how to run your own file converter, see http://www.artofsolving.com/node/10 |
static void |
setDocConverterPort(int port)
|
static void |
setRegistry(Registry reg)
|
static void |
setSendReferrerPolicy(boolean send)
|
static void |
setTempDir(File dir)
|
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String CACHE_POLICY_PROP
public static final String REFERRER_POLICY_PROP
public static final String TEMP_DIR_PROP
public static final String REGISTRY_SYNONYM_PROP
public static final String REGISTRY_ENDPOINT_PROP
public static final String REGISTRY_NAMESPACE_PROP
public static final String CONVERTER_HOST_PROP
public static final String CONVERTER_PORT_PROP
public static final String CUSTOM_REGISTRY_SYNONYM
public static final String PROPS_FILE_NAME
public static final String PROPS_FILE_COMMENT
public static final String PROPS_FILE_ENCODING
public static final String PROPS_FILE_SYS_PROPERTY
Constructor Detail |
---|
public SeahawkOptions()
Method Detail |
---|
public static void restoreSettings()
public static void restoreSettings(URL u) throws Exception
Exception
public static void saveSettings(OutputStream os) throws IOException
IOException
public static boolean saveSettings()
public static File getDefaultsFile()
public static void setCacheExpiry(double hours)
hours
- the number of hours cached data (e.g. ontologies & service lookups) are valid for, 0 or negative numbers meaning until Seahawk is closedpublic static double getCacheExpiry()
public static Registry getRegistry()
public static void setRegistry(Registry reg)
reg
- the Moby registry that should be used by default to resolve services, data types, etc.public static File getTempDir()
public static void setTempDir(File dir) throws Exception
dir
- directory where temporary files should be stored
Exception
- if the parameter is not a directory, or cannot be created or written topublic static void setSendReferrerPolicy(boolean send)
send
- true if Seahawk should send a referrer service HTTP header to services, otherwise falsepublic static boolean getSendReferrerPolicy()
public static void setDocConverterPort(int port) throws Exception
port
- positive number representing where the OpenOffice file converter is listening
Exception
public static int getDocConverterPort()
public static void setDocConverterHost(String hostname)
hostname
- machine on which an OpenOffice file converter is runningpublic static String getDocConverterHost()
|
Version: 1.1.1 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |