BACK

MobyCentral API

MobyCentral is an API to work with BioMoby Registry. Library relies on JAX-WS 2.1 API that is a part of Java 6. It also works on JEE5 where JAX-WS is a part of the platform. In case of using Java 5, JAX-WS must be present in a classpath.

All operations with BioMoby Registry are done through MobyCentralOperations interface. This interface is obtained through MobyCentralFactory class.

// obtaining MobyCentralOperations proxy
MobyCentral central = new MobyCentral("http://moby-dev.inab.org/cgi-bin/MOBY-Central.pl", "http://moby-dev.inab.org/MOBY/Central");
MobyCentralOperations operations = MobyCentralFactory.getCentralDigest(central);
     
// create a template service with search parameters (works like a mask)
Service template = new Service("getEntryFromPDB", "inb.bsc.es");
       
// obtain a list of services that match our template (no "keywords" no "expand")
List<Service> services = operations.findService(template, null, false, false);

All operations work with a common normalized set of classes shared with a MobyCore API (located in org.inb.biomoby.shared.registry.* package). This way an obtained Service object from the example above may be passed to MobyDispatch for a further execution. Moreover these classes annotated with JAXB annotations allowing XML serialization and are Serializable and Cloneable.

Here is a list of supported operations (from MobyCentralOperations):
Operation Name Operation Description
retrieveService public ServiceType retrieveService(ServiceType serviceType) throws Exception
Retrieve the definition for a service instance, as specified in WSDL format. This information is used by the client to compose queries.
registerService public Registration registerService(Service service) throws Exception;
Register a new service instance. You have a new service you'd like to share with the world.
findService public List<Service> findService(Service service, List<String> keywords, boolean isExpandServices, boolean isExpandObjects) throws Exception;
Locate a service instance, matching various characteristics, such as the provider name, the kind of input expected by the service, the kind of output it provides, etc.
retrieveNamespaces public List<Namespace> retrieveNamespaces() throws Exception;
Retrieve a list of all registered namespaces.
registerNamespace public Registration registerNamespace(Namespace namespace) throws Exception;
Register a new namespace.
deregisterNamespace public Registration deregisterNamespace(Namespace namespace) throws Exception;
Deregister a deprecated namespace term.
retrieveServiceTypes public List<ServiceType> retrieveServiceTypes() throws Exception;
Retrieve the definitions and registration details of all registered service types.
registerServiceType public Registration registerServiceType(ServiceType serviceType) throws Exception;
Register a new service type.
deregisterServiceType public Registration deregisterServiceType(ServiceType serviceType) throws Exception;
Deregister a deprecated service type.
retrieveServiceNames public List<Service> retrieveServiceNames() throws Exception;
Retrieve the names of all registered services.
registerObjectClass public Registration registerObjectClass(ObjectType objectType) throws Exception;
Register a new object class. This is useful if you want to add to MOBY's object ontology, by creating a new data type.
deregisterObjectClass public Registration deregisterObjectClass(ObjectType objectType) throws Exception;
Deregister a deprecated object class. If your object is no longer useful, you can remove it from the ontology with this procedure.
relationships public List<Relationship<ServiceType>> relationships(ServiceType serviceType, List<RELATIONSHIP_TYPE> relationships, DIRECTION_TYPE direction, boolean expandRelationship) throws Exception;
Retrieve services relationships.
public List<Relationship<ObjectType>> relationships(ObjectType objectType, List<RELATIONSHIP_TYPE> relationships, DIRECTION_TYPE direction, boolean expandRelationship) throws Exception;
Retrieve object types relationships.
retrieveServiceProviders public List<ServiceProvider> retrieveServiceProviders() throws Exception;
Retrieve the names of all registered service providers. This allows you to see what sites are providing MOBY services (in the dozens).
retrieveObjectDefinition public ObjectType retrieveObjectDefinition(ObjectType objectType) throws Exception;
Retrieve the class definition, in the form of the full registration details for that class type.
retrieveObjectNames public List<ObjectType> retrieveObjectNames() throws Exception;
Retrieve the definitions and registration details of all registered object types.
retrieveResourceURLs public List<Resource> retrieveResourceURLs() throws Exception;
Retrieve the URLs of all registered services.

Dmitry Repchevsky