|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.yosokumo.core.Service
public class Service
Provides the basic operations available from the Yosokumo web service, e.g.,
obtainCatalog and createStudy. Whenever a basic operation fails, it throws
a ServiceException. See ServiceException
for a description of the
possible exceptions.
Nested Class Summary | |
---|---|
static class |
Service.DIFType
Specifies the Data Interchange Format (DIF) of bytes transmitted to and from the Yosokumo server. |
Constructor Summary | |
---|---|
Service()
Initializes a newly created Service object using defaults for
the credentials, host name, port, and DIF. |
|
Service(Credentials credentials)
Initializes a newly created Service object with attributes
specified by the input parameters, using defaults for the host name,
port, and DIF. |
|
Service(Credentials credentials,
java.lang.String hostName)
Initializes a newly created Service object with attributes
specified by the input parameters, using defaults for the port and DIF. |
|
Service(Credentials credentials,
java.lang.String hostName,
int port)
Initializes a newly created Service object with attributes
specified by the input parameters, using a default for the DIF. |
|
Service(Credentials credentials,
java.lang.String hostName,
int port,
Service.DIFType dif)
Initializes a newly created Service object with attributes
specified by the input parameters. |
Method Summary | |
---|---|
Role |
createRole(Role role)
Add a Role to a study's roster. |
Study |
createStudy()
Create a default study and add it to the user's catalog of studies. |
Study |
createStudy(java.lang.String studyName)
Create a named study and add it to the user's catalog of studies. |
Study |
createStudy(java.lang.String studyName,
Study.Type studyType)
Create a study with specified name and type and add it to the user's catalog of studies. |
Study |
createStudy(java.lang.String studyName,
Study.Type studyType,
Study.Status studyStatus,
Study.Visibility studyVisibility)
Create a study with specified name, type, status, and visibility, and add it to the user's catalog of studies. |
void |
deleteRole(java.lang.String userId,
java.lang.String studyId)
Delete a role. |
void |
deleteStudy(java.lang.String studyId)
Delete a study from the server. |
void |
describePredictors(java.lang.String studyId,
java.util.List<Predictor> predictorList)
Describe a study's predictors. |
int |
getStatusCode()
Return the status code from the last Service operation. |
void |
loadSubjects(java.lang.String studyId,
java.util.List<Specimen> specimenList)
Populate the rows of a study's table with subjects. |
Catalog |
obtainCatalog()
Obtain the user's catalog of studies. |
Role |
obtainRole(java.lang.String userId,
java.lang.String studyId)
Obtain a role. |
Roster |
obtainRoster(java.lang.String studyId)
Obtain the roster for a study. |
Study |
obtainStudy(java.lang.String studyId)
Obtain a study from the server. |
void |
scoreProspects(java.lang.String studyId,
java.util.List<Specimen> specimenList)
Score prospects (compute predictands) using a study's model. |
Message |
updateRole(Role role)
Update a role on the server. |
Study |
updateStudy(java.lang.String studyId,
java.lang.String studyName)
Update a study, changing the study name. |
Study |
updateStudy(java.lang.String studyId,
Study.Status studyStatus)
Update a study, changing the status. |
Study |
updateStudy(java.lang.String studyId,
Study.Visibility studyVisibility)
Update a study, changing the visibility. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Service() throws ServiceException
Service
object using defaults for
the credentials, host name, port, and DIF.
ServiceException
public Service(Credentials credentials) throws ServiceException
Service
object with attributes
specified by the input parameters, using defaults for the host name,
port, and DIF.
credentials
- user id and key for authentication.
ServiceException
public Service(Credentials credentials, java.lang.String hostName) throws ServiceException
Service
object with attributes
specified by the input parameters, using defaults for the port and DIF.
credentials
- user id and key for authentication.hostName
- host name for the Yosokumo server.
ServiceException
public Service(Credentials credentials, java.lang.String hostName, int port) throws ServiceException
Service
object with attributes
specified by the input parameters, using a default for the DIF.
credentials
- user id and key for authentication.hostName
- host name for the Yosokumo server.port
- port to use for HTTP communication.
ServiceException
public Service(Credentials credentials, java.lang.String hostName, int port, Service.DIFType dif) throws ServiceException
Service
object with attributes
specified by the input parameters.
credentials
- user id and key for authentication.hostName
- host name for the Yosokumo server.port
- port to use for HTTP communication.dif
- specifies the DIF to use to talk to the server.
ServiceException
- if the DIF is not implementedMethod Detail |
---|
public int getStatusCode()
public Catalog obtainCatalog() throws ServiceException
ServiceException
public Study createStudy() throws ServiceException
ServiceException
public Study createStudy(java.lang.String studyName) throws ServiceException
studyName
- specifies the study name.
ServiceException
public Study createStudy(java.lang.String studyName, Study.Type studyType) throws ServiceException
studyName
- specifies the study name.studyType
- specifies the study type.
ServiceException
public Study createStudy(java.lang.String studyName, Study.Type studyType, Study.Status studyStatus, Study.Visibility studyVisibility) throws ServiceException
studyName
- specifies the study name.studyType
- specifies the study type.studyStatus
- specifies the study status.studyVisibility
- specifies the study visibility.
ServiceException
public Study updateStudy(java.lang.String studyId, java.lang.String studyName) throws ServiceException
studyId
- specifies the identifier of the study to update.studyName
- is the new name to assign to the study.
Study
specified by studyId, with
its name changed to studyName. The name is also changed on
the server.
ServiceException
public Study updateStudy(java.lang.String studyId, Study.Status studyStatus) throws ServiceException
studyId
- specifies the identifier of the study to update.studyStatus
- is the new status to assign to the study.
Study
specified by studyId, with
its status changed to studyStatus. The status is also changed
on the server.
ServiceException
public Study updateStudy(java.lang.String studyId, Study.Visibility studyVisibility) throws ServiceException
studyId
- specifies the identifier of the study to update.studyVisibility
- is the new visibility to assign to the study.
Study
specified by studyId, with
its visibility changed to studyVisibility. The visibility is
also changed on the server.
ServiceException
public Study obtainStudy(java.lang.String studyId) throws ServiceException
studyId
- specifies the identifier of the study to obtain.
ServiceException
public void deleteStudy(java.lang.String studyId) throws ServiceException
studyId
- specifies the identifier of the study to delete.
ServiceException
public Roster obtainRoster(java.lang.String studyId) throws ServiceException
studyId
- specifies the identifier of the study whose roster
is to be obtained.
ServiceException
public Role createRole(Role role) throws ServiceException
Role
to a study's roster.
role
- the role to add to the roster. The user identifier
and study identifier fields of the role
must
be set. The role is added to the roster of the study,
specifying the privileges of the user on the study.
ServiceException
public Message updateRole(Role role) throws ServiceException
role
- specifies the role to change.
role
. A null return value
indicates there were no issues with the update. A non-null
return value is a reference to a Message which describes
how the request was completed provisionally. This happens,
e.g., when an attempt is made by user U to change the
delete_role privilege on a study owned by user U. The
privilege is left unchanged in such cases to ensure that
there is always at least one user (the study creator) who
is authorized to reset privileges for any roleholder for
the study.
ServiceException
public Role obtainRole(java.lang.String userId, java.lang.String studyId) throws ServiceException
userId
- specifies the user.studyId
- specifies the study.
ServiceException
public void deleteRole(java.lang.String userId, java.lang.String studyId) throws ServiceException
userId
- specifies the user.studyId
- specifies the study.
ServiceException
public void describePredictors(java.lang.String studyId, java.util.List<Predictor> predictorList) throws ServiceException
studyId
- specifies the study whose predictors are to be
described.predictorList
- a list of the predictors (= variables = columns)
for the table.
ServiceException
public void loadSubjects(java.lang.String studyId, java.util.List<Specimen> specimenList) throws ServiceException
studyId
- specifies the study whose table is to be populated.specimenList
- a list of the specimens
(= rows = observations = records) for the table.
ServiceException
public void scoreProspects(java.lang.String studyId, java.util.List<Specimen> specimenList) throws ServiceException
studyId
- specifies the study whose model is to be used.specimenList
- is the list of specimens
(= rows = observations = records) whose predictands
are to be computed. Upon return from this method, the
predictand member of each Specimen in the list
contains the results of the computations (the score).
ServiceException
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |