|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectch.systemsx.cisd.openbis.dss.client.api.v1.impl.OpenbisServiceFacade
public class OpenbisServiceFacade
Default implementation for IOpenbisServiceFacade
.
Constructor Summary | |
---|---|
OpenbisServiceFacade(java.lang.String sessionToken,
IGeneralInformationService service,
IGeneralInformationChangingService changingService,
IDssComponent dssComponent)
|
Method Summary | |
---|---|
void |
addAdHocVocabularyTerm(java.lang.Long vocabularyId,
NewVocabularyTerm term)
Adds new ad-hoc terms to a vocabulary starting from specified ordinal + 1. |
void |
addAdHocVocabularyTerm(ch.systemsx.cisd.openbis.generic.shared.basic.TechId vocabularyId,
java.lang.String code,
java.lang.String label,
java.lang.String description,
java.lang.Long previousTermOrdinal)
Adds new ad-hoc terms to a vocabulary starting from specified ordinal + 1. |
void |
checkSession()
Checks whether the session is alive. |
java.util.Map<java.lang.String,java.lang.String> |
extractMetadata(NewDataSetDTO newDataset,
java.io.File dataSetFile)
Extracts metadata from a file. |
DataSet |
getDataSet(java.lang.String dataSetCode)
Return a DataSet object for for the given code. |
IDataSetDss |
getDataSetDss(java.lang.String code)
|
java.util.List<DataSet> |
getDataSets(java.util.List<java.lang.String> dataSetCodes)
Return DataSet objects for given a set of codes. |
java.util.List<Experiment> |
getExperiments(java.util.List<java.lang.String> experimentIdentifiers)
Return Experiment objects for a set of given experiment identifiers. |
int |
getMinorVersionInformationService()
Returns the minor version of the general information service. |
java.util.List<Sample> |
getSamples(java.util.List<java.lang.String> sampleIdentifiers)
Return Sample objects for a set of given sample identifiers. |
java.util.List<Sample> |
getSamples(java.util.List<java.lang.String> sampleIdentifiers,
java.util.EnumSet<SampleFetchOption> fetchOptions)
Return Sample objects for a set of given sample identifiers. |
java.util.List<SpaceWithProjectsAndRoleAssignments> |
getSpacesWithProjects()
Return all spaces enriched with their projects and role assignments. |
java.util.HashMap<ch.systemsx.cisd.openbis.generic.shared.basic.dto.Vocabulary,java.util.List<ControlledVocabularyPropertyType.VocabularyTerm>> |
getVocabularyTermsMap()
Returns map of avaialable vocabulary terms. |
WebAppSettings |
getWebAppSettings(java.lang.String webAppId)
Returns the persistent settings for a given custom web app. |
java.util.List<DataSet> |
listDataSets(java.util.List<Sample> samples,
java.util.EnumSet<DataSet.Connections> connectionsToGet)
Return all data sets attached to the given samples with connections. |
java.util.List<DataSet> |
listDataSetsForExperiment(java.lang.String experimentPermId)
Returns all data sets of specified experiment. |
java.util.List<DataSet> |
listDataSetsForExperiments(java.util.List<java.lang.String> experimentIdentifiers)
Return all data sets for a given list of experiments identifiers. |
java.util.List<DataSet> |
listDataSetsForSample(java.lang.String samplePermId)
Returns all data sets of specified sample. |
java.util.List<DataSet> |
listDataSetsForSamples(java.util.List<java.lang.String> sampleIdentifiers)
Return all data sets for a given list of sample identifiers. |
java.util.List<DataSetType> |
listDataSetTypes()
Returns all data set types available in openBIS. |
java.util.List<Experiment> |
listExperimentsForProjects(java.util.List<java.lang.String> projectIdentifiers)
Return all experiments for a given list of project identifiers. |
java.util.List<Experiment> |
listExperimentsHavingDataSetsForProjects(java.util.List<java.lang.String> projectIdentifiers)
Return all experiments having data sets for a given list of project identifiers. |
java.util.List<Experiment> |
listExperimentsHavingSamplesForProjects(java.util.List<java.lang.String> projectIdentifiers)
Return all experiments having samples for a given list of project identifiers. |
java.util.List<ExperimentType> |
listExperimentTypes()
Returns all experiment types available in openBIS. |
java.util.List<Project> |
listProjects()
Returns all available projects. |
java.util.List<Sample> |
listSamplesForExperimentAndSampleType(java.lang.String experimentPermId,
java.lang.String sampleType)
Returns all samples for specified experiment and of specified type. |
java.util.List<Sample> |
listSamplesForExperiments(java.util.List<java.lang.String> experimentIdentifiers)
Return all samples for a given list of experiments identifiers. |
java.util.List<Sample> |
listSamplesForExperiments(java.util.List<java.lang.String> experimentIdentifiers,
java.util.EnumSet<SampleFetchOption> fetchOptions)
Return all samples for a given list of experiments identifiers. |
java.util.List<Sample> |
listSamplesForProjects(java.util.List<java.lang.String> projectIdentifiers)
Return all samples for a given list of project identifiers. |
java.util.List<Sample> |
listSamplesForProjects(java.util.List<java.lang.String> projectIdentifiers,
java.util.EnumSet<SampleFetchOption> fetchOptions)
Return all samples for a given list of project identifiers. |
java.util.List<Sample> |
listSamplesOfSample(java.lang.String samplePermId)
Returns all samples which are components or children of the specified sample. |
java.util.List<SampleType> |
listSampleTypes()
Returns all sample types available in openBIS. |
java.util.List<Vocabulary> |
listVocabularies()
Return all vocabularies available in openBIS together with the contained vocabulary terms. |
void |
logout()
Logs out from openBIS and frees all associated resources on the server. |
DataSet |
putDataSet(NewDataSetDTO newDataset,
java.io.File dataSetFile)
Upload a new data set to the DSS. |
java.util.List<DataSet> |
searchForDataSets(SearchCriteria searchCriteria)
Return all data sets matching a specified search criteria. |
java.util.List<Experiment> |
searchForExperiments(SearchCriteria searchCriteria)
Returns all experiments matching specified search criteria. |
java.util.List<Sample> |
searchForSamples(SearchCriteria searchCriteria)
Return all samples that match the search criteria. |
java.util.List<Sample> |
searchForSamples(SearchCriteria searchCriteria,
java.util.EnumSet<SampleFetchOption> fetchOptions)
Return all samples that match the search criteria. |
void |
setWebAppSettings(WebAppSettings customDisplaySettings)
Sets the persistent settings for a given custom web app. |
static IOpenbisServiceFacade |
tryCreate(java.lang.String sessionToken,
java.lang.String openbisUrl,
long timeoutInMillis)
|
static IOpenbisServiceFacade |
tryCreate(java.lang.String username,
java.lang.String password,
java.lang.String openbisUrl,
long timeoutInMillis)
|
java.util.List<ValidationError> |
validateDataSet(NewDataSetDTO newDataset,
java.io.File dataSetFile)
Validates a data set. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public OpenbisServiceFacade(java.lang.String sessionToken, IGeneralInformationService service, IGeneralInformationChangingService changingService, IDssComponent dssComponent)
Method Detail |
---|
public static IOpenbisServiceFacade tryCreate(java.lang.String username, java.lang.String password, java.lang.String openbisUrl, long timeoutInMillis)
public static IOpenbisServiceFacade tryCreate(java.lang.String sessionToken, java.lang.String openbisUrl, long timeoutInMillis)
public java.util.List<Project> listProjects()
ISimpleOpenbisServiceFacade
listProjects
in interface ISimpleOpenbisServiceFacade
public java.util.List<SpaceWithProjectsAndRoleAssignments> getSpacesWithProjects() throws EnvironmentFailureException
ISimpleOpenbisServiceFacade
getSpacesWithProjects
in interface ISimpleOpenbisServiceFacade
EnvironmentFailureException
public java.util.List<Experiment> getExperiments(java.util.List<java.lang.String> experimentIdentifiers) throws EnvironmentFailureException
ISimpleOpenbisServiceFacade
Experiment
objects for a set of given experiment identifiers. If some of the
specified experiment identifiers does not exist in openBIS it will be silently ignored.
getExperiments
in interface ISimpleOpenbisServiceFacade
EnvironmentFailureException
public java.util.List<Experiment> listExperimentsForProjects(java.util.List<java.lang.String> projectIdentifiers) throws EnvironmentFailureException
ISimpleOpenbisServiceFacade
listExperimentsForProjects
in interface ISimpleOpenbisServiceFacade
EnvironmentFailureException
public java.util.List<Experiment> listExperimentsHavingSamplesForProjects(java.util.List<java.lang.String> projectIdentifiers) throws EnvironmentFailureException
ISimpleOpenbisServiceFacade
listExperimentsHavingSamplesForProjects
in interface ISimpleOpenbisServiceFacade
EnvironmentFailureException
public java.util.List<Experiment> listExperimentsHavingDataSetsForProjects(java.util.List<java.lang.String> projectIdentifiers) throws EnvironmentFailureException
ISimpleOpenbisServiceFacade
listExperimentsHavingDataSetsForProjects
in interface ISimpleOpenbisServiceFacade
EnvironmentFailureException
public java.util.List<Sample> getSamples(java.util.List<java.lang.String> sampleIdentifiers) throws EnvironmentFailureException
ISimpleOpenbisServiceFacade
Sample
objects for a set of given sample identifiers. If some of the specified
sample identifiers does not exist in openBIS it will be silently ignored.
getSamples
in interface ISimpleOpenbisServiceFacade
EnvironmentFailureException
public java.util.List<Sample> getSamples(java.util.List<java.lang.String> sampleIdentifiers, java.util.EnumSet<SampleFetchOption> fetchOptions)
ISimpleOpenbisServiceFacade
Sample
objects for a set of given sample identifiers. If some of the specified
sample identifiers does not exist in openBIS it will be silently ignored.
getSamples
in interface ISimpleOpenbisServiceFacade
sampleIdentifiers
- sample identifiers for which samples should be retrievedfetchOptions
- Options that control which parts of the samples are fetched.public java.util.List<Sample> listSamplesForExperiments(java.util.List<java.lang.String> experimentIdentifiers) throws EnvironmentFailureException
ISimpleOpenbisServiceFacade
listSamplesForExperiments
in interface ISimpleOpenbisServiceFacade
EnvironmentFailureException
public java.util.List<Sample> listSamplesForExperiments(java.util.List<java.lang.String> experimentIdentifiers, java.util.EnumSet<SampleFetchOption> fetchOptions)
ISimpleOpenbisServiceFacade
listSamplesForExperiments
in interface ISimpleOpenbisServiceFacade
experimentIdentifiers
- experiment identifiers for which samples should be retrievedfetchOptions
- Options that control which parts of the samples are fetched.public java.util.List<Sample> listSamplesForExperimentAndSampleType(java.lang.String experimentPermId, java.lang.String sampleType)
ISimpleOpenbisServiceFacade
listSamplesForExperimentAndSampleType
in interface ISimpleOpenbisServiceFacade
public java.util.List<Sample> listSamplesOfSample(java.lang.String samplePermId)
ISimpleOpenbisServiceFacade
listSamplesOfSample
in interface ISimpleOpenbisServiceFacade
public java.util.List<Sample> listSamplesForProjects(java.util.List<java.lang.String> projectIdentifiers)
ISimpleOpenbisServiceFacade
listSamplesForProjects
in interface ISimpleOpenbisServiceFacade
public java.util.List<Sample> listSamplesForProjects(java.util.List<java.lang.String> projectIdentifiers, java.util.EnumSet<SampleFetchOption> fetchOptions)
ISimpleOpenbisServiceFacade
listSamplesForProjects
in interface ISimpleOpenbisServiceFacade
projectIdentifiers
- project identifiers for which samples should be retrievedfetchOptions
- Options that control which parts of the samples are fetched.public DataSet getDataSet(java.lang.String dataSetCode) throws EnvironmentFailureException
ISimpleOpenbisServiceFacade
DataSet
object for for the given code. If some of the specified data set
code does not exist in openBIS, null will be returned.
getDataSet
in interface ISimpleOpenbisServiceFacade
EnvironmentFailureException
public java.util.List<DataSet> getDataSets(java.util.List<java.lang.String> dataSetCodes) throws EnvironmentFailureException
ISimpleOpenbisServiceFacade
DataSet
objects for given a set of codes. If some of the specified data set
codes does not exist in openBIS it will be silently ignored.
getDataSets
in interface ISimpleOpenbisServiceFacade
EnvironmentFailureException
public java.util.List<DataSet> listDataSetsForExperiments(java.util.List<java.lang.String> experimentIdentifiers) throws EnvironmentFailureException
ISimpleOpenbisServiceFacade
listDataSetsForExperiments
in interface ISimpleOpenbisServiceFacade
EnvironmentFailureException
public java.util.List<DataSet> listDataSetsForExperiment(java.lang.String experimentPermId)
ISimpleOpenbisServiceFacade
listDataSetsForExperiment
in interface ISimpleOpenbisServiceFacade
public java.util.List<DataSet> listDataSetsForSamples(java.util.List<java.lang.String> sampleIdentifiers) throws EnvironmentFailureException
ISimpleOpenbisServiceFacade
listDataSetsForSamples
in interface ISimpleOpenbisServiceFacade
EnvironmentFailureException
public java.util.List<DataSet> listDataSetsForSample(java.lang.String samplePermId)
ISimpleOpenbisServiceFacade
listDataSetsForSample
in interface ISimpleOpenbisServiceFacade
public java.util.List<DataSetType> listDataSetTypes()
ISimpleOpenbisServiceFacade
listDataSetTypes
in interface ISimpleOpenbisServiceFacade
public java.util.List<SampleType> listSampleTypes()
ISimpleOpenbisServiceFacade
listSampleTypes
in interface ISimpleOpenbisServiceFacade
public java.util.List<ExperimentType> listExperimentTypes()
ISimpleOpenbisServiceFacade
listExperimentTypes
in interface ISimpleOpenbisServiceFacade
public IDataSetDss getDataSetDss(java.lang.String code) throws EnvironmentFailureException
EnvironmentFailureException
public DataSet putDataSet(NewDataSetDTO newDataset, java.io.File dataSetFile) throws EnvironmentFailureException
ISimpleOpenbisServiceFacade
putDataSet
in interface ISimpleOpenbisServiceFacade
newDataset
- The new data set that should be registereddataSetFile
- A file or folder containing the data
EnvironmentFailureException
public java.util.List<ValidationError> validateDataSet(NewDataSetDTO newDataset, java.io.File dataSetFile) throws java.lang.IllegalStateException, EnvironmentFailureException
ISimpleOpenbisServiceFacade
validateDataSet
in interface ISimpleOpenbisServiceFacade
newDataset
- The new data set that should be registereddataSetFile
- A file or folder containing the data
java.lang.IllegalStateException
- Thrown if the user has not yet been authenticated.
EnvironmentFailureException
- Thrown in cases where it is not possible to connect to
the server.public java.util.Map<java.lang.String,java.lang.String> extractMetadata(NewDataSetDTO newDataset, java.io.File dataSetFile) throws java.lang.IllegalStateException, EnvironmentFailureException
ISimpleOpenbisServiceFacade
extractMetadata
in interface ISimpleOpenbisServiceFacade
newDataset
- The new data set that should be registereddataSetFile
- A file or folder containing the data
java.lang.IllegalStateException
- Thrown if the user has not yet been authenticated.
EnvironmentFailureException
- Thrown in cases where it is not possible to connect to
the server.public void checkSession() throws InvalidSessionException
ISimpleOpenbisServiceFacade
checkSession
in interface ISimpleOpenbisServiceFacade
InvalidSessionException
- If the session is not alive.public void logout()
ISimpleOpenbisServiceFacade
IMPORTANT NOTE: If clients fail to call this method after finishing interaction with openBIS, then their session will be kept on the server until it expires. It is considered a security risk to leave openBIS sessions open.
logout
in interface ISimpleOpenbisServiceFacade
public int getMinorVersionInformationService()
ISimpleOpenbisServiceFacade
getMinorVersionInformationService
in interface ISimpleOpenbisServiceFacade
public WebAppSettings getWebAppSettings(java.lang.String webAppId)
IOpenbisServiceFacade
getWebAppSettings
in interface IOpenbisServiceFacade
webAppId
- The id of the custom web app to get the display settings for.public void setWebAppSettings(WebAppSettings customDisplaySettings)
IOpenbisServiceFacade
setWebAppSettings
in interface IOpenbisServiceFacade
customDisplaySettings
- The new display settingspublic java.util.List<Experiment> searchForExperiments(SearchCriteria searchCriteria)
IOpenbisServiceFacade
searchForExperiments
in interface IOpenbisServiceFacade
public java.util.List<Sample> searchForSamples(SearchCriteria searchCriteria)
IOpenbisServiceFacade
searchForSamples(searchCritera, EnumSet.of(SampleFetchOption.PROPERTIES))
searchForSamples
in interface IOpenbisServiceFacade
searchCriteria
- The sample metadata values to be matched against.public java.util.List<Sample> searchForSamples(SearchCriteria searchCriteria, java.util.EnumSet<SampleFetchOption> fetchOptions)
IOpenbisServiceFacade
searchForSamples
in interface IOpenbisServiceFacade
searchCriteria
- The sample metadata values to be matched against.fetchOptions
- Describes the amount of information about the sample that is needed. For
more details see
IGeneralInformationService.searchForSamples(String, SearchCriteria, EnumSet)
.public java.util.List<DataSet> searchForDataSets(SearchCriteria searchCriteria)
IOpenbisServiceFacade
searchForDataSets
in interface IOpenbisServiceFacade
searchCriteria
- the criteria used for searching.public java.util.List<DataSet> listDataSets(java.util.List<Sample> samples, java.util.EnumSet<DataSet.Connections> connectionsToGet)
IOpenbisServiceFacade
listDataSets
in interface IOpenbisServiceFacade
samples
- The samples for which we return attached data sets.public void addAdHocVocabularyTerm(ch.systemsx.cisd.openbis.generic.shared.basic.TechId vocabularyId, java.lang.String code, java.lang.String label, java.lang.String description, java.lang.Long previousTermOrdinal)
IOpenbisServiceFacade
addAdHocVocabularyTerm
in interface IOpenbisServiceFacade
vocabularyId
- The id of vocabulary which should be extended.code
- Code of new vocabulary term.label
- Label of new vocabulary term.description
- Free text describing new vocabulary term.previousTermOrdinal
- new vocabulary term will be placed right after vocabulary term
with given ordinal number.public void addAdHocVocabularyTerm(java.lang.Long vocabularyId, NewVocabularyTerm term)
IOpenbisServiceFacade
addAdHocVocabularyTerm
in interface IOpenbisServiceFacade
vocabularyId
- The id of vocabulary which should be extended.term
- the vocabulary term to be added.public java.util.HashMap<ch.systemsx.cisd.openbis.generic.shared.basic.dto.Vocabulary,java.util.List<ControlledVocabularyPropertyType.VocabularyTerm>> getVocabularyTermsMap()
IOpenbisServiceFacade
getVocabularyTermsMap
in interface IOpenbisServiceFacade
public java.util.List<Vocabulary> listVocabularies()
ISimpleOpenbisServiceFacade
listVocabularies
in interface ISimpleOpenbisServiceFacade
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |