Version: 1.1.1

org.biomoby.service.dashboard
Class RegistryModel

java.lang.Object
  extended by org.biomoby.service.dashboard.AbstractModel
      extended by org.biomoby.service.dashboard.RegistryModel
All Implemented Interfaces:
DashboardProperties, Notifier

public class RegistryModel
extends AbstractModel
implements Notifier

A real worker that supplies all data from a Biomoby registry (or from a local cache) to various panels, especially to the RegistryPanel and the RegistrationPanel.

Version:
$Id: RegistryModel.java,v 1.21 2008/03/02 12:45:26 senger Exp $
Author:
Martin Senger

Field Summary
static int PART_DATA_TYPES
           
static int PART_NAMESPACES
           
static int PART_SERVICE_TYPES
           
static int PART_SERVICES
           
 
Fields inherited from interface org.biomoby.shared.event.Notifier
AUTHORITIES_CANCELLED, AUTHORITIES_COUNT, AUTHORITIES_END, AUTHORITIES_RESET, AUTHORITIES_START, AUTHORITIES_UPDATED, AUTHORITY_LOADED, AUTHORITY_LOADING, DATA_TYPE_LOADED, DATA_TYPE_LOADING, DATA_TYPES_CANCELLED, DATA_TYPES_COUNT, DATA_TYPES_END, DATA_TYPES_RESET, DATA_TYPES_START, DATA_TYPES_UPDATED, NAMESPACE_LOADED, NAMESPACE_LOADING, NAMESPACES_CANCELLED, NAMESPACES_COUNT, NAMESPACES_END, NAMESPACES_RESET, NAMESPACES_START, NAMESPACES_UPDATED, SERVICE_TYPE_LOADED, SERVICE_TYPE_LOADING, SERVICE_TYPES_CANCELLED, SERVICE_TYPES_COUNT, SERVICE_TYPES_END, SERVICE_TYPES_RESET, SERVICE_TYPES_START, SERVICE_TYPES_UPDATED, SIGNAL_CANCEL_DATA_TYPES, SIGNAL_CANCEL_NAMESPACES, SIGNAL_CANCEL_SERVICE_TYPES, SIGNAL_CANCEL_SERVICES
 
Fields inherited from interface org.biomoby.service.dashboard.DashboardProperties
DP_ANT_MODEL, DP_AUTHENTICATION, DP_AXIS_ADMIN, DP_AXIS_IN_TOMCAT, DP_BGCOLOR, DP_CACHE_DIR, DP_CALL_SERVICE, DP_CBS_DEPLOY, DP_CONSOLE_FILE, DP_CONTACT, DP_CS_CLASS, DP_CS_NEWURL, DP_CS_NONE, DP_CS_REGISTRY, DP_CS_URL, DP_DATATYPE_NAME, DP_DEFAULT_REGISTRY, DP_DEPL_SERVICES, DP_DEPLOY_IN_TOMCAT, DP_DESCRIPTION, DP_DESCRIPTION_FILE, DP_DETACH_VIEW, DP_DOT_LOC, DP_ENDPOINT, DP_FL_BIOCASE, DP_FL_HIBERNATE, DP_FL_NONE, DP_FL_SOAPLAB, DP_HOSTNAME, DP_ICON, DP_IMPL_CLASS, DP_INP_ASBYTES, DP_INP_PING, DP_INP_SHOW, DP_INP_SHOWXML, DP_LOCAL_DEPLOY, DP_MOSES_FLAVOUR, DP_OUT_FILE, DP_OUT_SHOW, DP_OUT_SHOWXML, DP_OUT_VIEWER, DP_P_DESCRIPTION, DP_P_DESCRIPTION_FILE, DP_PASSWORD_AUTHENTICATION, DP_PATTERN, DP_PORT, DP_REG_DT_AUTH, DP_REG_DT_DESC, DP_REG_DT_EMAIL, DP_REG_DT_NAME, DP_REG_DT_TREE, DP_REG_INFO, DP_REG_NS_AUTH, DP_REG_NS_DESC, DP_REG_NS_EMAIL, DP_REG_NS_NAME, DP_REG_S_AUTH, DP_REG_S_CATEGORY, DP_REG_S_EMAIL, DP_REG_S_NAME, DP_REG_S_RDF_PATH, DP_REG_S_RDF_URL, DP_REG_S_TYPE, DP_REG_S_URL, DP_REG_S_XML_PATH, DP_REG_ST_AUTH, DP_REG_ST_DESC, DP_REG_ST_EMAIL, DP_REG_ST_ISA, DP_REG_ST_NAME, DP_REG_VERBOSE, DP_REGISTRY_CACHE_DIR, DP_REGISTRY_ENDPOINT, DP_REGISTRY_MODEL, DP_REGISTRY_NAMESPACE, DP_REGISTRY_SYNONYM, DP_RESULT_FILE, DP_S_SELECTED, DP_SC_IN_FILE, DP_SC_INPUT_FILE, DP_SC_SERVICE, DP_SC_SERVICE_NAME, DP_SC_SERVICES, DP_SEL_AUTHORITIES, DP_SEL_SERVICES, DP_SERVICE_NAME, DP_STATUS_MSG, DP_TITLE, DP_TITLE_ICON, DP_TOMCAT_HOME, DP_USE_AUTHORITATIVE, DP_USE_CACHE, DP_USE_DOT, DP_USE_DT_COMP, DP_USE_DT_DOC, DP_USE_DT_GEN, DP_USE_DT_JAR, DP_USE_S_COMP, DP_USE_S_DOC, DP_USE_S_GEN, DP_USE_S_JAR, DP_USE_SIGNATURE, DP_USE_SIMULATE, DP_USER_AUTHENTICATION, DP_USER_JARS, DP_WANTED_REGISTRIES, DP_WSDD_TEMPL
 
Constructor Summary
RegistryModel()
          Default constructor.
 
Method Summary
 void addNotificationListener(NotificationListener l)
          Adds the specified notification listener to receive notification events from the class that implements this interface.
 void addNotificationListeners(NotificationListener[] l)
          Adds the specified notification listeners to receive notification events from the class that implements this interface.
 void callback(int signal)
          Call the notifier and signal that it can stop loading data (or whatever it is doing).
 String callRegistry(String methodName, File inputXML)
          Call the given method (on worker) with data given in 'inputXML'.
 HashSet findInDataTypes(String searchText)
          Return a HashSet filled with names of data types that have somewhere given 'searchText'.
 HashSet findInNamespaces(String searchText)
          Return a HashSet filled with names of namespaces that have somewhere given 'searchText'.
 Set<String> findInServices(String searchText)
          Return a Set filled with names of services that have somewhere given 'searchText'.
 Set<String> findInServiceTypes(String searchText)
          Return a Set filled with names of service types that have somewhere given 'searchText'.
 void fireEvent(int type, Object message, Object details)
           
 void fireEvent(NotificationEvent event)
           
 String getCacheInfoFormatted()
           
 MobyDataType getDataType(String dataTypeName)
           
 MobyDataType[] getDataTypes(Object initiator)
          Fetch data types (from a cache or from a registry).
 String getDefaultRegistryEndpoint()
          Return an endpoint (a stringified URL) of a default Moby registry.
 String getDefaultRegistryNamespace()
          Return a namespace (a URI) used by a default Moby registry.
 MobyNamespace getNamespace(String namespace)
           
 MobyNamespace[] getNamespaces(Object initiator)
          Fetch namespaces (from a cache or from a registry).
 NotificationListener[] getNotificationListeners()
          Returns an array of all the NotificationListeners added to the class that implements this interface.
 String getRegisterDataTypeXML(MobyDataType dataType)
           
 String getRegisterNamespaceXML(MobyNamespace namespace)
           
 String getRegisterServiceTypeXML(MobyServiceType serviceType)
           
 String getRegisterServiceXML(MobyService service)
           
 MobyService getService(String combinedServiceName)
           
 MobyService[] getServices(Object initiator)
          Fetch services (from a cache or from a registry).
 MobyServiceType getServiceType(String serviceTypeName)
           
 MobyServiceType[] getServiceTypes(Object initiator)
          Fetch service types (from a cache or from a registry).
 void registerDataType(MobyDataType dataType)
           
 void registerNamespace(MobyNamespace namespace)
           
 void registerService(MobyService service)
           
 void registerServiceType(MobyServiceType serviceType)
           
 void reloadDataTypesCache()
           
 void reloadNamespacesCache()
           
 void reloadServicesCache()
           
 void reloadServiceTypesCache()
           
 void removeNotificationListener(NotificationListener l)
          Removes the specified notification listener so that it no longer receives notification events from the class that implements this interface.
 void removeNotificationListeners(NotificationListener[] l)
          Removes the specified notification listeners so that they no longer receive notification events from the class that implements this interface.
 boolean setVerbose(boolean enabled)
           
 void unRegisterDataType(MobyDataType dataType)
           
 void unRegisterNamespace(MobyNamespace namespace)
           
 void unRegisterService(MobyService service)
           
 void unRegisterServiceType(MobyServiceType serviceType)
           
 void updateDataTypesCache()
           
 void updateNamespacesCache()
           
 void updateServicesCache()
           
 void updateServiceTypesCache()
           
 
Methods inherited from class org.biomoby.service.dashboard.AbstractModel
setPropertyChannel
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PART_SERVICES

public static final int PART_SERVICES
See Also:
Constant Field Values

PART_DATA_TYPES

public static final int PART_DATA_TYPES
See Also:
Constant Field Values

PART_SERVICE_TYPES

public static final int PART_SERVICE_TYPES
See Also:
Constant Field Values

PART_NAMESPACES

public static final int PART_NAMESPACES
See Also:
Constant Field Values
Constructor Detail

RegistryModel

public RegistryModel()
Default constructor.

Method Detail

getDefaultRegistryEndpoint

public String getDefaultRegistryEndpoint()
Return an endpoint (a stringified URL) of a default Moby registry.


getDefaultRegistryNamespace

public String getDefaultRegistryNamespace()
Return a namespace (a URI) used by a default Moby registry.


setVerbose

public boolean setVerbose(boolean enabled)

callRegistry

public String callRegistry(String methodName,
                           File inputXML)
                    throws MobyException
Call the given method (on worker) with data given in 'inputXML'. Return whatever the worker's method returns.

Throws:
MobyException

registerDataType

public void registerDataType(MobyDataType dataType)
                      throws MobyException
Throws:
MobyException

getRegisterDataTypeXML

public String getRegisterDataTypeXML(MobyDataType dataType)
                              throws MobyException
Throws:
MobyException

unRegisterDataType

public void unRegisterDataType(MobyDataType dataType)
                        throws MobyException
Throws:
MobyException

updateDataTypesCache

public void updateDataTypesCache()
                          throws MobyException
Throws:
MobyException

reloadDataTypesCache

public void reloadDataTypesCache()
                          throws MobyException
Throws:
MobyException

getDataTypes

public MobyDataType[] getDataTypes(Object initiator)
                            throws MobyException
Fetch data types (from a cache or from a registry). When done, signal that data types are updated. If an initiator is known (not null), signal, who asked for it, as well.

Throws:
MobyException

getDataType

public MobyDataType getDataType(String dataTypeName)
                         throws MobyException
Throws:
MobyException

findInDataTypes

public HashSet findInDataTypes(String searchText)
                        throws MobyException
Return a HashSet filled with names of data types that have somewhere given 'searchText'. Add case-insensitivity to the regular expression in 'searchText'.

Throws:
MobyException

registerServiceType

public void registerServiceType(MobyServiceType serviceType)
                         throws MobyException
Throws:
MobyException

getRegisterServiceTypeXML

public String getRegisterServiceTypeXML(MobyServiceType serviceType)
                                 throws MobyException
Throws:
MobyException

unRegisterServiceType

public void unRegisterServiceType(MobyServiceType serviceType)
                           throws MobyException
Throws:
MobyException

updateServiceTypesCache

public void updateServiceTypesCache()
                             throws MobyException
Throws:
MobyException

reloadServiceTypesCache

public void reloadServiceTypesCache()
                             throws MobyException
Throws:
MobyException

getServiceTypes

public MobyServiceType[] getServiceTypes(Object initiator)
                                  throws MobyException
Fetch service types (from a cache or from a registry). When done, signal that service types are updated. If an initiator is known (not null), signal, who asked for it, as well.

Throws:
MobyException

getServiceType

public MobyServiceType getServiceType(String serviceTypeName)
                               throws MobyException
Throws:
MobyException

findInServiceTypes

public Set<String> findInServiceTypes(String searchText)
                               throws MobyException
Return a Set filled with names of service types that have somewhere given 'searchText'. Add case-insensitivity to the regular expression in 'searchText'.

Throws:
MobyException

registerNamespace

public void registerNamespace(MobyNamespace namespace)
                       throws MobyException
Throws:
MobyException

getRegisterNamespaceXML

public String getRegisterNamespaceXML(MobyNamespace namespace)
                               throws MobyException
Throws:
MobyException

unRegisterNamespace

public void unRegisterNamespace(MobyNamespace namespace)
                         throws MobyException
Throws:
MobyException

updateNamespacesCache

public void updateNamespacesCache()
                           throws MobyException
Throws:
MobyException

reloadNamespacesCache

public void reloadNamespacesCache()
                           throws MobyException
Throws:
MobyException

getNamespaces

public MobyNamespace[] getNamespaces(Object initiator)
                              throws MobyException
Fetch namespaces (from a cache or from a registry). When done, signal that namespaces are updated. If an initiator is known (not null), signal, who asked for it, as well.

Throws:
MobyException

getNamespace

public MobyNamespace getNamespace(String namespace)
                           throws MobyException
Throws:
MobyException

findInNamespaces

public HashSet findInNamespaces(String searchText)
                         throws MobyException
Return a HashSet filled with names of namespaces that have somewhere given 'searchText'. Add case-insensitivity to the regular expression in 'searchText'.

Throws:
MobyException

registerService

public void registerService(MobyService service)
                     throws MobyException
Throws:
MobyException

getRegisterServiceXML

public String getRegisterServiceXML(MobyService service)
                             throws MobyException
Throws:
MobyException

unRegisterService

public void unRegisterService(MobyService service)
                       throws MobyException
Throws:
MobyException

updateServicesCache

public void updateServicesCache()
                         throws MobyException
Throws:
MobyException

reloadServicesCache

public void reloadServicesCache()
                         throws MobyException
Throws:
MobyException

getServices

public MobyService[] getServices(Object initiator)
                          throws MobyException
Fetch services (from a cache or from a registry). When done, signal that services are updated. If an initiator is known (not null), signal, who asked for it, as well.

Throws:
MobyException

getService

public MobyService getService(String combinedServiceName)
                       throws MobyException
Throws:
MobyException

findInServices

public Set<String> findInServices(String searchText)
                           throws MobyException
Return a Set filled with names of services that have somewhere given 'searchText'. Add case-insensitivity to the regular expression in 'searchText'.

Throws:
MobyException

getCacheInfoFormatted

public String getCacheInfoFormatted()
                             throws MobyException
Throws:
MobyException

addNotificationListener

public void addNotificationListener(NotificationListener l)
Description copied from interface: Notifier
Adds the specified notification listener to receive notification events from the class that implements this interface.

Specified by:
addNotificationListener in interface Notifier
Parameters:
l - notification listener to be added

addNotificationListeners

public void addNotificationListeners(NotificationListener[] l)
Description copied from interface: Notifier
Adds the specified notification listeners to receive notification events from the class that implements this interface.

Specified by:
addNotificationListeners in interface Notifier
Parameters:
l - notification listeners to be added

removeNotificationListener

public void removeNotificationListener(NotificationListener l)
Description copied from interface: Notifier
Removes the specified notification listener so that it no longer receives notification events from the class that implements this interface.

Specified by:
removeNotificationListener in interface Notifier
Parameters:
l - notification listener to be removed

removeNotificationListeners

public void removeNotificationListeners(NotificationListener[] l)
Description copied from interface: Notifier
Removes the specified notification listeners so that they no longer receive notification events from the class that implements this interface.

Specified by:
removeNotificationListeners in interface Notifier
Parameters:
l - notification listeners to be removed

getNotificationListeners

public NotificationListener[] getNotificationListeners()
Description copied from interface: Notifier
Returns an array of all the NotificationListeners added to the class that implements this interface.

Specified by:
getNotificationListeners in interface Notifier
Returns:
all of the NotificationListeners added or an empty array if no listeners have been added

callback

public void callback(int signal)
Description copied from interface: Notifier
Call the notifier and signal that it can stop loading data (or whatever it is doing).

Specified by:
callback in interface Notifier
Parameters:
signal - identifies what to stop doing (some usual values of this signal are defined elsewhere in this interface with names starting by SIGNAL_)

fireEvent

public void fireEvent(int type,
                      Object message,
                      Object details)
Specified by:
fireEvent in interface Notifier

fireEvent

public void fireEvent(NotificationEvent event)
Specified by:
fireEvent in interface Notifier

Version: 1.1.1

Submit a bug or feature
Generated: Sat May 29 04:26:35 EDT 2010