|
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.shared.MobyService
public class MobyService
A container representing a service. But do not be too excited - this is not a real service but only its definition as it appears in the BioMoby registry.
This container is used mainly to register a new service in a Moby registry, and to find registered services later.
Field Summary | |
---|---|
static int |
ALIVE
|
static String |
BIOMOBY_SERVICE_URI
An immutable string representing URI (namespace) of all Biomoby services. |
static String |
CATEGORY_CGI
Name of a category for CGI BioMoby services. |
static String |
CATEGORY_CGI_ASYNC
Name of an asynchronous CGI category for BioMoby services. |
static String |
CATEGORY_MOBY
Name of a default category for BioMoby services. |
static String |
CATEGORY_MOBY_ASYNC
Name of a category for asynchornous BioMoby services. |
static String |
CATEGORY_MOBY_DOCLIT
Name of a category for document/literal BioMoby services. |
static String |
CATEGORY_MOBY_DOCLIT_ASYNC
Name of a category for asynchronous document/literal BioMoby services. |
static int |
DEAD
|
static String |
DUMMY_NAME
A dummy name used for MobyService instances that do not have (yet) a real name. |
static int |
PINGED
|
static String |
SUBMIT_ACTION_SUFFIX
A suffix added to a service name in order to make a method name that submits input to an asynchronous service. |
static int |
TESTED
|
static int |
UNCHECKED
|
Constructor Summary | |
---|---|
MobyService()
Default constructor. |
|
MobyService(String name)
Normal constructor. |
|
MobyService(String name,
String authority)
Even more normal constructor - because a service is fully qualified only by its name and its authority. |
Method Summary | |
---|---|
void |
addInput(MobyData value)
|
void |
addOutput(MobyData value)
Adds an output parameter to the service. |
void |
addUnitTest(MobyUnitTest unitTest)
|
MobyService |
clone()
Generally, you don't need to clone a service, unless you plan on modifying fields of the object, but do not want it to affect the service definition used by other threads within the JVM (i.e. getService(serviceName) always returns the same object within a single JVM instance). |
int |
compareTo(MobyService obj)
Implementing Comparable interface. |
boolean |
equals(MobyService anotherOne)
|
boolean |
equals(Object obj)
|
String |
getAuthority()
|
static Comparator |
getAuthorityComparator()
Create a comparator for case-insensitive sorting of services by their authorities. |
String |
getCategory()
|
String |
getDescription()
|
String |
getEmailContact()
|
String |
getId()
Return an ID that is given to this service instance during its registration. |
String |
getLSID()
|
String |
getName()
|
String |
getPathToRDF()
|
MobyPrimaryData[] |
getPrimaryInputs()
|
MobyPrimaryData[] |
getPrimaryOutputs()
|
String |
getRDF()
|
MobySecondaryData[] |
getSecondaryInputs()
|
static MobyService |
getService(String lsid)
|
static MobyService |
getService(String name,
String authority)
|
MobyServiceType |
getServiceType()
|
String |
getSignatureURL()
Return a URL pointing to an RDF document that contains this service description (signature). |
int |
getStatus()
|
String |
getType()
|
String |
getUniqueName()
|
MobyUnitTest[] |
getUnitTests()
|
String |
getURL()
Return a URL where this service is being served from. |
int |
hashCode()
|
boolean |
isAsynchronous()
|
boolean |
isAuthoritative()
|
void |
removeInput(MobyData value)
|
void |
removeOutput(MobyData value)
|
void |
removeUnitTest(MobyUnitTest unitTest)
|
void |
setAuthoritative(boolean value)
|
void |
setAuthority(String value)
|
void |
setCategory(String value)
|
void |
setDescription(String value)
|
void |
setEmailContact(String value)
|
void |
setId(String value)
Don't use it. |
void |
setInputs(MobyData[] value)
Adds an array of input parameter to the service. |
void |
setLSID(String value)
|
void |
setName(String value)
|
void |
setOutputs(MobyData[] value)
Adds an array of output parameter to the service. |
void |
setPathToRDF(String value)
|
void |
setRDF(String value)
|
void |
setServiceType(MobyServiceType serviceType)
|
void |
setSignatureURL(String value)
|
void |
setStatus(int statusCode,
boolean mode)
|
void |
setType(String value)
|
void |
setUnitTests(MobyUnitTest[] unitTests)
|
void |
setURL(String value)
|
String |
toShortString()
It combines this service name and its authority name. |
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final String DUMMY_NAME
public static final String BIOMOBY_SERVICE_URI
public static final int UNCHECKED
public static final int DEAD
public static final int ALIVE
public static final int PINGED
public static final int TESTED
public static final String CATEGORY_MOBY
public static final String CATEGORY_MOBY_ASYNC
public static final String CATEGORY_CGI
public static final String CATEGORY_CGI_ASYNC
public static final String CATEGORY_MOBY_DOCLIT
public static final String CATEGORY_MOBY_DOCLIT_ASYNC
public static final String SUBMIT_ACTION_SUFFIX
Constructor Detail |
---|
public MobyService()
public MobyService(String name)
public MobyService(String name, String authority)
Method Detail |
---|
public int compareTo(MobyService obj)
compareTo
in interface Comparable<MobyService>
public boolean equals(Object obj)
equals
in class Object
public int hashCode()
hashCode
in class Object
public MobyService clone()
clone
in class Object
public String getUniqueName()
public void setStatus(int statusCode, boolean mode)
statusCode
- should be one of ALIVE, PINGED, TESTEDmode
- whether the service passed the requirement or notpublic int getStatus()
public String getName()
public void setName(String value)
public String getId()
getSignatureURL()
).
public void setId(String value)
getId()
public String getLSID()
getLSID
in interface LSIDAccessible
public void setLSID(String value)
public boolean isAuthoritative()
public void setAuthoritative(boolean value)
public String getAuthority()
public void setAuthority(String value)
public String getEmailContact()
public void setEmailContact(String value)
public String getCategory()
public void setCategory(String value)
public String getDescription()
public void setDescription(String value)
public String getType()
public void setType(String value)
public MobyUnitTest[] getUnitTests()
public void setUnitTests(MobyUnitTest[] unitTests)
unitTests
- the tests to set for the servicepublic void addUnitTest(MobyUnitTest unitTest)
unitTest
- the MobyUnitTest to add to our servicepublic void removeUnitTest(MobyUnitTest unitTest)
unitTest
- the test to remove from the set of tests for the servicepublic String getURL()
Note that there is nothing in the BioMoby registry remembering (registering) a namespace of your service. Therefore, your service is supposed to use always the namespace http://biomoby.org.
public void setURL(String value)
getURL()
public String getSignatureURL()
This is how it works:
setSignatureURL(java.lang.String)
) a
URL pointing to your HTTP space, to an RDF
document. But this document does not need to exist yet.
getRDF()
.
Central
interface
(such as its default implementation CentralImpl
can copy the RDF
document for you if you put here a fully qualified path to
the file where the RDF document should be put (by calling
setPathToRDF(java.lang.String)
).
public void setSignatureURL(String value)
getSignatureURL()
public String getPathToRDF()
getSignatureURL()
public void setPathToRDF(String value)
public String getRDF()
getSignatureURL()
public void setRDF(String value)
public void setInputs(MobyData[] value)
public void addInput(MobyData value)
public void removeInput(MobyData value)
public void setOutputs(MobyData[] value)
public void addOutput(MobyData value)
public void removeOutput(MobyData value)
public MobyPrimaryData[] getPrimaryInputs()
public MobySecondaryData[] getSecondaryInputs()
public MobyPrimaryData[] getPrimaryOutputs()
public boolean equals(MobyService anotherOne)
public String toString()
toString
in class Object
public String toShortString()
equals(java.lang.Object)
and compareTo(org.biomoby.shared.MobyService)
methods. TBD: The authority should be checked that it does not contain character sequence 'space followed by a left parenthesis'.
public static Comparator getAuthorityComparator()
public MobyServiceType getServiceType()
public void setServiceType(MobyServiceType serviceType)
serviceType
- the MobyServiceType of this servicepublic static MobyService getService(String lsid)
public static MobyService getService(String name, String authority)
public boolean isAsynchronous()
|
Version: 1.1.1 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |