|
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.client.CentralImpl org.biomoby.client.CentralDigestImpl org.biomoby.client.CentralDigestCachedSimpleImpl org.biomoby.client.CentralDigestCachedImpl
public class CentralDigestCachedImpl
An implementation of CentralAll
, allowing to
cache locally results of the cumulative methods so it does not need to access
Moby registry all the time. The other methods of the Central interface do not
use the results of the cached cumulative results (their implementation is
just passed to the parent class).
The caching is done in the file system, not in memory, so the results are
permanent (until someone removes the caching directory, or calls
CentralDigestCachedSimpleImpl.removeFromCache(java.lang.String)
).
This class can be used also without caching - just instantiate it with 'cacheDir' set to null in the constructor.
Field Summary |
---|
Fields inherited from class org.biomoby.client.CentralImpl |
---|
CENTRAL_IMPL_RESOURCE_NAME, DEFAULT_CENTRAL_IMPL_CLASSNAME, DEFAULT_ENDPOINT, DEFAULT_NAMESPACE, DOCUMENT_BUILDER_FACTORIES |
Fields inherited from interface org.biomoby.shared.CentralCached |
---|
CACHE_PART_DATATYPES, CACHE_PART_NAMESPACES, CACHE_PART_SERVICES, CACHE_PART_SERVICETYPES, CACHE_PROP_COUNT, CACHE_PROP_LOCATION, CACHE_PROP_NAME, CACHE_PROP_OLDEST, CACHE_PROP_REGISTRY_URL, CACHE_PROP_SIZE, CACHE_PROP_YOUNGEST, LIST_FILE, RDF_FILE |
Fields inherited from interface org.biomoby.shared.Central |
---|
DATA_TYPES_RESOURCE_NAME, FULL_RESOURCE_NAME, HAS, HASA, iHAS, iHASA, iISA, ISA, NAMESPACES_RESOURCE_NAME, SERVICE_INSTANCES_RESOURCE_NAME, SERVICE_TYPES_RESOURCE_NAME |
Constructor Summary | |
---|---|
CentralDigestCachedImpl()
The same as calling CentralDigestCachedImpl(null) |
|
CentralDigestCachedImpl(String cacheDir)
Create an instance that will access a default Moby registry and will cache results in the 'cacheDir' directory. |
|
CentralDigestCachedImpl(String endpoint,
String namespace)
Create an instance that will access a specific Moby registry and will cache results in the default cache directory. |
|
CentralDigestCachedImpl(String endpoint,
String namespace,
String cacheDir)
Create an instance that will access a Moby registry defined by its 'endpoint' and 'namespace', and will cache results in the 'cacheDir' directory. |
Method Summary | |
---|---|
Map |
getDataTypeNames()
Parses and imports the following XML. |
MobyDataType[] |
getDataTypes()
Get definition of all known data types. |
MobyNamespace[] |
getFullNamespaces()
Parses and imports the following XML. |
Map |
getServiceNamesByAuthority()
Parses and imports the following XML. |
MobyService[] |
getServices()
Get definition of all registered service instances. |
Methods inherited from class org.biomoby.client.CentralDigestCachedSimpleImpl |
---|
getCacheAge, getCacheDir, getCacheInfo, getCacheInfoFormatted, getCacheMode, isUsingCache, removeFromCache, setCacheMode, updateCache |
Methods inherited from class org.biomoby.client.CentralDigestImpl |
---|
addNotificationListener, addNotificationListeners, callback, fireEvent, fireEvent, getFullServiceTypes, getNotificationListeners, removeNotificationListener, removeNotificationListeners |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.biomoby.shared.CentralDigest |
---|
getFullServiceTypes |
Methods inherited from interface org.biomoby.shared.event.Notifier |
---|
addNotificationListener, addNotificationListeners, callback, fireEvent, fireEvent, getNotificationListeners, removeNotificationListener, removeNotificationListeners |
Constructor Detail |
---|
public CentralDigestCachedImpl() throws MobyException
MobyException
public CentralDigestCachedImpl(String cacheDir) throws MobyException
MobyException
public CentralDigestCachedImpl(String endpoint, String namespace) throws MobyException
MobyException
public CentralDigestCachedImpl(String endpoint, String namespace, String cacheDir) throws MobyException
MobyException
Method Detail |
---|
public Map getDataTypeNames() throws MobyException
CentralImpl
<objectNames> <Object name="objectName" lsid="..."> <Description><![CDATA[free text description here]]></Description> </Object> ... ... </objectNames>
getDataTypeNames
in interface Central
getDataTypeNames
in class CentralDigestCachedSimpleImpl
MobyException
- if communication with the Moby Registry failspublic MobyDataType[] getDataTypes() throws MobyException
CentralDigest
Central.getDataType(java.lang.String)
for all
registered data type names.
getDataTypes
in interface Central
getDataTypes
in interface CentralDigest
getDataTypes
in class CentralDigestCachedSimpleImpl
MobyException
- if communication with the Moby Registry failspublic Map getServiceNamesByAuthority() throws MobyException
CentralImpl
<serviceNames> <serviceName name="serviceName" lsid="..." authURI='authority.info.here'/> ... ... </serviceNames>
getServiceNamesByAuthority
in interface Central
getServiceNamesByAuthority
in class CentralDigestCachedSimpleImpl
MobyException
- if communication with the Moby Registry failspublic MobyService[] getServices() throws MobyException
CentralDigest
findService by name
for all
known service names.
getServices
in interface CentralDigest
getServices
in class CentralDigestCachedSimpleImpl
MobyException
- if communication with the Moby Registry failspublic MobyNamespace[] getFullNamespaces() throws MobyException
CentralImpl
<Namespaces> <Namespace name="namespace" lsid="..."> <Description><![CDATA[free text description here]]></Description> <contactEmail>...</contactEmail> <authURI>...</authURI> </Namespace> ... ... </Namespaces>
getFullNamespaces
in interface Central
getFullNamespaces
in class CentralDigestCachedSimpleImpl
MobyException
- if communication with the Moby Registry fails
|
Version: 1.1.1 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |