|
Version: 1.1.1 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.biomoby.registry.meta.RegistryCache
public class RegistryCache
A class for storing MOBY RDFs and Central calls to disk for reuse in other JVMs.
Field Summary | |
---|---|
static String |
CALL_CACHE_FILE_PREFIX
|
static String |
REG_CACHE_FILE_PREFIX
|
Constructor Summary | |
---|---|
RegistryCache()
|
Method Summary | |
---|---|
static File |
cacheRegistryOntology(Registry reg,
String resourceName)
Stores the given resource to a file for retrieval later with getOntologyFile(). |
static File |
cacheRegistryOntology(Registry reg,
String resourceName,
long allowedAgeMillis)
Stores the given resource to a file for retrieval later with getOntologyFile(). |
static File |
calcCentralCallFile(String centralEndpoint,
String callKey)
Reports where the message returned by the call should be stored on disk. |
static File |
calcDataTypeOntologyFile(Registry reg)
|
static File |
calcNamespaceOntologyFile(Registry reg)
|
static File |
calcServiceOntologyFile(Registry reg)
|
static File |
calcServiceTypeOntologyFile(Registry reg)
|
static void |
deleteAllCacheFiles()
|
static void |
deleteExpiredCacheFiles(long allowedAgeMillis)
|
static File |
getCentralCallFile(String centralEndpoint,
String callKey)
Reports where the message returned by the call is stored on disk. |
static Registry |
getDefaultRegistry()
|
static File |
getNamespaceOntologyFile(Registry reg)
|
static File |
getOntologyFile(Registry reg,
String resourceName)
Returns where a resource should be cached locally, whether it current exists or not. |
static File |
getServiceOntologyFile(Registry reg)
|
static File |
getServiceTypeOntologyFile(Registry reg)
|
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 REG_CACHE_FILE_PREFIX
public static final String CALL_CACHE_FILE_PREFIX
Constructor Detail |
---|
public RegistryCache()
Method Detail |
---|
public static File getOntologyFile(Registry reg, String resourceName)
resourceName
- one of the resources listed in org.biomoby.shared.Centralpublic static File cacheRegistryOntology(Registry reg, String resourceName) throws Exception
resourceName
- one of the resources listed in org.biomoby.shared.Central
Exception
public static File cacheRegistryOntology(Registry reg, String resourceName, long allowedAgeMillis) throws Exception
resourceName
- one of the resources listed in org.biomoby.shared.CentralallowedAgeMillis
- if the hached file exists and is less than this many milliseconds old, a new version will not be downloaded, if zero or negative, overwrite is forced.
Exception
public static Registry getDefaultRegistry()
public static File calcDataTypeOntologyFile(Registry reg)
public static File getServiceTypeOntologyFile(Registry reg)
public static File calcServiceTypeOntologyFile(Registry reg)
public static File getNamespaceOntologyFile(Registry reg)
public static File calcNamespaceOntologyFile(Registry reg)
public static File getServiceOntologyFile(Registry reg)
public static File calcServiceOntologyFile(Registry reg)
public static File getCentralCallFile(String centralEndpoint, String callKey)
callKey
- a unique ID for the Moby Central call (i.e. the contents sent to CentralImpl.doCall())
public static File calcCentralCallFile(String centralEndpoint, String callKey)
callKey
- a unique ID for the Moby Central call (i.e. the contents sent to CentralImpl.doCall())
public static void setTempDir(File dir)
dir
- directory where files should be stored, if null, the working directorypublic static void deleteExpiredCacheFiles(long allowedAgeMillis)
allowedAgeMillis
- files older than this are deleted, or if negative, all are deleted, or if zero, deleted at the end of the sessionpublic static void deleteAllCacheFiles()
|
Version: 1.1.1 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |