diff --git a/js-test/servers/common/core-plugins/tests/1/as/webapps/openbis-v3-api-test/html/dto/DataSetTypeFetchOptions.js b/js-test/servers/common/core-plugins/tests/1/as/webapps/openbis-v3-api-test/html/dto/DataSetTypeFetchOptions.js new file mode 100644 index 0000000000000000000000000000000000000000..d04aed73a458de800dd13a9ba45e900811842ae0 --- /dev/null +++ b/js-test/servers/common/core-plugins/tests/1/as/webapps/openbis-v3-api-test/html/dto/DataSetTypeFetchOptions.js @@ -0,0 +1,4 @@ +var DataSetTypeFetchOptions = function() +{ + this['@type'] = 'DataSetTypeFetchOptions'; +} diff --git a/js-test/servers/common/core-plugins/tests/1/as/webapps/openbis-v3-api-test/html/index.html b/js-test/servers/common/core-plugins/tests/1/as/webapps/openbis-v3-api-test/html/index.html index 86b940c2d8094e664f8cde54093efa4cb92e3af1..581caf8d275be622e6efd928988ceded270ec6ed 100644 --- a/js-test/servers/common/core-plugins/tests/1/as/webapps/openbis-v3-api-test/html/index.html +++ b/js-test/servers/common/core-plugins/tests/1/as/webapps/openbis-v3-api-test/html/index.html @@ -24,6 +24,7 @@ <script src="dto/AttachmentFetchOptions.js"></script> <script src="dto/DataSet.js"></script> <script src="dto/DataSetFetchOptions.js"></script> + <script src="dto/DataSetTypeFetchOptions.js"></script> <script src="dto/Experiment.js"></script> <script src="dto/ExperimentFetchOptions.js"></script> <script src="dto/ExperimentType.js"></script> diff --git a/js-test/servers/common/core-plugins/tests/1/as/webapps/openbis-v3-api-test/html/openbis-v3-api-test.js b/js-test/servers/common/core-plugins/tests/1/as/webapps/openbis-v3-api-test/html/openbis-v3-api-test.js index 2bc7d4288e0350ebf97668118a4c7ca049c57f62..ee85e26664dede6afd231e297be42adefa86b448 100644 --- a/js-test/servers/common/core-plugins/tests/1/as/webapps/openbis-v3-api-test/html/openbis-v3-api-test.js +++ b/js-test/servers/common/core-plugins/tests/1/as/webapps/openbis-v3-api-test/html/openbis-v3-api-test.js @@ -13,378 +13,419 @@ var testUserId = "openbis_test_js"; var testUserPassword = "password"; var createFacade = function(action) { - stop(); + stop(); - var facade = new openbis(testApiUrl); + var facade = new openbis(testApiUrl); - facade.close = function() { - facade.logout(function() { - facade.closed = true; - }); - }; + facade.close = function() { + facade.logout(function() { + facade.closed = true; + }); + }; - action(facade); + action(facade); - var timeout = 30000; - var checkInterval = 100; - var intervalTotal = 0; + var timeout = 30000; + var checkInterval = 100; + var intervalTotal = 0; - var startWhenClosed = function() { - if (facade.closed) { - start(); - } else { - intervalTotal += checkInterval; + var startWhenClosed = function() { + if (facade.closed) { + start(); + } else { + intervalTotal += checkInterval; - if (intervalTotal < timeout) { - setTimeout(startWhenClosed, checkInterval); - } else { - start(); - } - } - }; + if (intervalTotal < timeout) { + setTimeout(startWhenClosed, checkInterval); + } else { + start(); + } + } + }; - startWhenClosed(); + startWhenClosed(); } var createFacadeAndLogin = function(action) { - createFacade(function(facade) { - facade.login(testUserId, testUserPassword, function() { - action(facade); - }); - }); + createFacade(function(facade) { + facade.login(testUserId, testUserPassword, function() { + action(facade); + }); + }); } var createExperimentFetchOptions = function() { - var fo = new ExperimentFetchOptions(); - fo.withType(); - fo.withProject().withSpace(); - fo.withProperties(); - fo.withTags(); - fo.withRegistrator(); - fo.withModifier(); - fo.withAttachments(); - return fo; + var fo = new ExperimentFetchOptions(); + fo.withType(); + fo.withProject().withSpace(); + fo.withProperties(); + fo.withTags(); + fo.withRegistrator(); + fo.withModifier(); + fo.withAttachments(); + return fo; } var createSampleFetchOptions = function() { - var fo = new SampleFetchOptions(); - fo.withType(); - fo.withExperiment().withProject().withSpace(); - fo.withSpace(); - fo.withProperties(); - fo.withTags(); - fo.withRegistrator(); - fo.withModifier(); - fo.withAttachments(); - return fo; + var fo = new SampleFetchOptions(); + fo.withType(); + fo.withExperiment().withProject().withSpace(); + fo.withSpace(); + fo.withProperties(); + fo.withTags(); + fo.withRegistrator(); + fo.withModifier(); + fo.withAttachments(); + return fo; +} + +var createDataSetFetchOptions = function() { + var fo = new DataSetFetchOptions(); + fo.withType(); + fo.withExperiment().withProject().withSpace(); +// fo.withSample().withSpace(); + fo.withProperties(); + fo.withTags(); + fo.withRegistrator(); + fo.withModifier(); + return fo; } test("mapExperiments()", function() { - createFacadeAndLogin(function(facade) { - var experimentIds = [ { - "@type" : "ExperimentPermId", - "permId" : "20130412105232616-2" - } ]; - var fetchOptions = createExperimentFetchOptions(); - - facade.mapExperiments(experimentIds, fetchOptions, function(experiments) { - assertObjectsCount(Object.keys(experiments), 1); - - var experiment = experiments["20130412105232616-2"]; - equal(experiment.code, "EXP-1", "Experiment code"); - equal(experiment.type.code, "HCS_PLATONIC", "Type code"); - equal(experiment.project.code, "SCREENING-EXAMPLES", "Project code"); - equal(experiment.project.space.code, "PLATONIC", "Space code"); - facade.close(); - }, function(error) { - ok(false, error); - }); - }); + createFacadeAndLogin(function(facade) { + var experimentIds = [ { + "@type" : "ExperimentPermId", + "permId" : "20130412105232616-2" + } ]; + var fetchOptions = createExperimentFetchOptions(); + + facade.mapExperiments(experimentIds, fetchOptions, function(experiments) { + assertObjectsCount(Object.keys(experiments), 1); + + var experiment = experiments["20130412105232616-2"]; + equal(experiment.code, "EXP-1", "Experiment code"); + equal(experiment.type.code, "HCS_PLATONIC", "Type code"); + equal(experiment.project.code, "SCREENING-EXAMPLES", "Project code"); + equal(experiment.project.space.code, "PLATONIC", "Space code"); + facade.close(); + }, function(error) { + ok(false, error); + }); + }); }); test("mapSamples()", function() { - createFacadeAndLogin(function(facade) { - var sampleIds = [ { - "@type" : "SamplePermId", - "permId" : "20130412140147735-20" - } ]; - var fetchOptions = createSampleFetchOptions(); - - facade.mapSamples(sampleIds, fetchOptions, function(samples) { - assertObjectsCount(Object.keys(samples), 1); - - var sample = samples["20130412140147735-20"]; - equal(sample.code, "PLATE-1", "Sample code"); - equal(sample.type.code, "PLATE", "Type code"); - equal(sample.experiment.code, "EXP-1", "Experiment code"); - equal(sample.experiment.project.code, "SCREENING-EXAMPLES", "Project code"); - equal(sample.space.code, "PLATONIC", "Space code"); - facade.close(); - }, function(error) { - ok(false, error); - }); - }); + createFacadeAndLogin(function(facade) { + var sampleIds = [ { + "@type" : "SamplePermId", + "permId" : "20130412140147735-20" + } ]; + var fetchOptions = createSampleFetchOptions(); + + facade.mapSamples(sampleIds, fetchOptions, function(samples) { + assertObjectsCount(Object.keys(samples), 1); + + var sample = samples["20130412140147735-20"]; + equal(sample.code, "PLATE-1", "Sample code"); + equal(sample.type.code, "PLATE", "Type code"); + equal(sample.experiment.code, "EXP-1", "Experiment code"); + equal(sample.experiment.project.code, "SCREENING-EXAMPLES", "Project code"); + equal(sample.space.code, "PLATONIC", "Space code"); + facade.close(); + }, function(error) { + ok(false, error); + }); + }); }); test("searchExperiments()", function() { - createFacadeAndLogin(function(facade) { - var criterion = { - "@type" : "ExperimentSearchCriterion", - "criteria" : [ { - "@type" : "CodeSearchCriterion", - "fieldValue" : { - "@type" : "StringEqualToValue", - "value" : "TEST-EXPERIMENT-2" - } - } ] - }; - var fetchOptions = createExperimentFetchOptions(); - - facade.searchExperiments(criterion, fetchOptions, function(experiments) { - assertObjectsCount(experiments, 1); - - var experiment = experiments[0]; - equal(experiment.code, "TEST-EXPERIMENT-2", "Experiment code"); - equal(experiment.type.code, "UNKNOWN", "Type code"); - equal(experiment.project.code, "TEST-PROJECT", "Project code"); - equal(experiment.project.space.code, "TEST", "Space code"); - facade.close(); - }, function(error) { - ok(false, error); - }); - }); + createFacadeAndLogin(function(facade) { + var criterion = { + "@type" : "ExperimentSearchCriterion", + "criteria" : [ { + "@type" : "CodeSearchCriterion", + "fieldValue" : { + "@type" : "StringEqualToValue", + "value" : "TEST-EXPERIMENT-2" + } + } ] + }; + var fetchOptions = createExperimentFetchOptions(); + + facade.searchExperiments(criterion, fetchOptions, function(experiments) { + assertObjectsCount(experiments, 1); + + var experiment = experiments[0]; + equal(experiment.code, "TEST-EXPERIMENT-2", "Experiment code"); + equal(experiment.type.code, "UNKNOWN", "Type code"); + equal(experiment.project.code, "TEST-PROJECT", "Project code"); + equal(experiment.project.space.code, "TEST", "Space code"); + facade.close(); + }, function(error) { + ok(false, error); + }); + }); }); test("searchSamples()", function() { - createFacadeAndLogin(function(facade) { - var criterion = { - "@type" : "SampleSearchCriterion", - "criteria" : [ { - "@type" : "CodeSearchCriterion", - "fieldValue" : { - "@type" : "StringEqualToValue", - "value" : "PLATE-1" - } - } ] - }; - var fetchOptions = createSampleFetchOptions() - - facade.searchSamples(criterion, fetchOptions, function(samples) { - assertObjectsCount(samples, 1); - - var sample = samples[0]; - equal(sample.code, "PLATE-1", "Sample code"); - equal(sample.type.code, "PLATE", "Type code"); - equal(sample.experiment.code, "EXP-1", "Experiment code"); - equal(sample.experiment.project.code, "SCREENING-EXAMPLES", "Project code"); - equal(sample.space.code, "PLATONIC", "Space code"); - facade.close(); - }, function(error) { - ok(false, error); - }); - }); + createFacadeAndLogin(function(facade) { + var criterion = { + "@type" : "SampleSearchCriterion", + "criteria" : [ { + "@type" : "CodeSearchCriterion", + "fieldValue" : { + "@type" : "StringEqualToValue", + "value" : "PLATE-1" + } + } ] + }; + var fetchOptions = createSampleFetchOptions() + + facade.searchSamples(criterion, fetchOptions, function(samples) { + assertObjectsCount(samples, 1); + + var sample = samples[0]; + equal(sample.code, "PLATE-1", "Sample code"); + equal(sample.type.code, "PLATE", "Type code"); + equal(sample.experiment.code, "EXP-1", "Experiment code"); + equal(sample.experiment.project.code, "SCREENING-EXAMPLES", "Project code"); + equal(sample.space.code, "PLATONIC", "Space code"); + facade.close(); + }, function(error) { + ok(false, error); + }); + }); +}); + +test("searchDataSets()", function() { + createFacadeAndLogin(function(facade) { + var criterion = { + "@type" : "DataSetSearchCriterion", + "criteria" : [ { + "@type" : "CodeSearchCriterion", + "fieldValue" : { + "@type" : "StringEqualToValue", + "value" : "20130412152036861-380" + } + } ] + }; + var fetchOptions = createDataSetFetchOptions() + + facade.searchDataSets(criterion, fetchOptions, function(dataSets) { + assertObjectsCount(dataSets, 1); + + var dataSet = dataSets[0]; + equal(dataSet.code, "20130412152036861-380", "Data Set code"); + equal(dataSet.type.code, "HCS_IMAGE_RAW", "Type code"); + equal(dataSet.experiment.code, "TEST-EXPERIMENT", "Experiment code"); + equal(dataSet.experiment.project.code, "TEST-PROJECT", "Project code"); +// equal(dataSet.sample.code, "PLATE-1A", "Sample code"); +// equal(dataSet.sample.space.code, "TEST", "Space code"); + facade.close(); + }, function(error) { + ok(false, error); + }); + }); }); test("createExperiments()", function() { - createFacadeAndLogin(function(facade) { - var code = "CREATE_JSON_EXPERIMENT_" + (new Date().getTime()); - var creations = [ { - "@type" : "ExperimentCreation", - - "typeId" : { - "@type" : "EntityTypePermId", - "permId" : "UNKNOWN" - }, - - "code" : code, - - "projectId" : { - "@type" : "ProjectIdentifier", - "identifier" : "/TEST/TEST-PROJECT" - }, - - "tagIds" : [ { - "@type" : "TagCode", - "code" : "CREATE_JSON_TAG" - } ] - } ]; - - var experimentCreation = new ExperimentCreation(); - experimentCreation.setTypeId(new EntityTypePermId("UNKNOWN")); - experimentCreation.setCode(code); - experimentCreation.setProjectId(new ProjectIdentifier("/TEST/TEST-PROJECT")); - experimentCreation.setTagIds([new TagCode("CREATE_JSON_TAG")]); - - var fetchOptions = createExperimentFetchOptions(); - - facade.createExperiments([experimentCreation], function(permIds) { - facade.mapExperiments(permIds, fetchOptions, function(experiments) { - assertObjectsCount(Object.keys(experiments), 1); - - var experiment = experiments[permIds[0].permId]; - equal(experiment.code, code, "Experiment code"); - equal(experiment.type.code, "UNKNOWN", "Type code"); - equal(experiment.project.code, "TEST-PROJECT", "Project code"); - equal(experiment.project.space.code, "TEST", "Space code"); - equal(experiment.tags[0].code, "CREATE_JSON_TAG", "Tag code"); - facade.close(); - }, function(error) { - ok(false, error); - }); - }, function(error) { - ok(false, error); - }); - }); + createFacadeAndLogin(function(facade) { + var code = "CREATE_JSON_EXPERIMENT_" + (new Date().getTime()); + var creations = [ { + "@type" : "ExperimentCreation", + + "typeId" : { + "@type" : "EntityTypePermId", + "permId" : "UNKNOWN" + }, + + "code" : code, + + "projectId" : { + "@type" : "ProjectIdentifier", + "identifier" : "/TEST/TEST-PROJECT" + }, + + "tagIds" : [ { + "@type" : "TagCode", + "code" : "CREATE_JSON_TAG" + } ] + } ]; + var experimentCreation = new ExperimentCreation(); + experimentCreation.setTypeId(new EntityTypePermId("UNKNOWN")); + experimentCreation.setCode(code); + experimentCreation.setProjectId(new ProjectIdentifier("/TEST/TEST-PROJECT")); + experimentCreation.setTagIds([new TagCode("CREATE_JSON_TAG")]); + + var fetchOptions = createExperimentFetchOptions(); + facade.createExperiments([experimentCreation], function(permIds) { + facade.mapExperiments(permIds, fetchOptions, function(experiments) { + assertObjectsCount(Object.keys(experiments), 1); + + var experiment = experiments[permIds[0].permId]; + equal(experiment.code, code, "Experiment code"); + equal(experiment.type.code, "UNKNOWN", "Type code"); + equal(experiment.project.code, "TEST-PROJECT", "Project code"); + equal(experiment.project.space.code, "TEST", "Space code"); + equal(experiment.tags[0].code, "CREATE_JSON_TAG", "Tag code"); + facade.close(); + }, function(error) { + ok(false, error); + }); + }, function(error) { + ok(false, error); + }); + }); }); test("createSamples()", function() { - createFacadeAndLogin(function(facade) { - var code = "CREATE_JSON_SAMPLE_" + (new Date().getTime()); - var creations = [ { - "@type" : "SampleCreation", - - "typeId" : { - "@type" : "EntityTypePermId", - "permId" : "UNKNOWN" - }, - - "code" : code, - - "spaceId" : { - "@type" : "SpacePermId", - "permId" : "TEST" - }, - - "tagIds" : [ { - "@type" : "TagCode", - "code" : "CREATE_JSON_TAG" - } ] - } ]; - var fetchOptions = createSampleFetchOptions(); - - facade.createSamples(creations, function(permIds) { - facade.mapSamples(permIds, fetchOptions, function(samples) { - assertObjectsCount(Object.keys(samples), 1); - - var sample = samples[permIds[0].permId]; - equal(sample.code, code, "Sample code"); - equal(sample.type.code, "UNKNOWN", "Type code"); - equal(sample.space.code, "TEST", "Space code"); - facade.close(); - }, function(error) { - ok(false, error); - }); - }, function(error) { - ok(false, error); - }); - }); + createFacadeAndLogin(function(facade) { + var code = "CREATE_JSON_SAMPLE_" + (new Date().getTime()); + var creations = [ { + "@type" : "SampleCreation", + + "typeId" : { + "@type" : "EntityTypePermId", + "permId" : "UNKNOWN" + }, + + "code" : code, + + "spaceId" : { + "@type" : "SpacePermId", + "permId" : "TEST" + }, + + "tagIds" : [ { + "@type" : "TagCode", + "code" : "CREATE_JSON_TAG" + } ] + } ]; + var fetchOptions = createSampleFetchOptions(); + + facade.createSamples(creations, function(permIds) { + facade.mapSamples(permIds, fetchOptions, function(samples) { + assertObjectsCount(Object.keys(samples), 1); + + var sample = samples[permIds[0].permId]; + equal(sample.code, code, "Sample code"); + equal(sample.type.code, "UNKNOWN", "Type code"); + equal(sample.space.code, "TEST", "Space code"); + facade.close(); + }, function(error) { + ok(false, error); + }); + }, function(error) { + ok(false, error); + }); + }); }); test("updateExperiments()", function() { - createFacadeAndLogin(function(facade) { - var code = "UPDATE_JSON_EXPERIMENT_" + (new Date().getTime()); - var creations = [ { - "@type" : "ExperimentCreation", - - "typeId" : { - "@type" : "EntityTypePermId", - "permId" : "UNKNOWN" - }, - - "code" : code, - - "projectId" : { - "@type" : "ProjectIdentifier", - "identifier" : "/TEST/TEST-PROJECT" - } - } ]; - - facade.createExperiments(creations, function(permIds) { - var updates = [ { - "@type" : "ExperimentUpdate", - - "experimentId" : permIds[0], - - "projectId" : { - "@type" : "ProjectIdentifier", - "identifier" : "/PLATONIC/SCREENING-EXAMPLES" - } - } ]; - - facade.updateExperiments(updates, function() { - var fetchOptions = createExperimentFetchOptions(); - - facade.mapExperiments(permIds, fetchOptions, function(experiments) { - assertObjectsCount(Object.keys(experiments), 1); - - var experiment = experiments[permIds[0].permId]; - equal(experiment.code, code, "Experiment code"); - equal(experiment.type.code, "UNKNOWN", "Type code"); - equal(experiment.project.code, "SCREENING-EXAMPLES", "Project code"); - equal(experiment.project.space.code, "PLATONIC", "Space code"); - facade.close(); - }, function(error) { - ok(false, error); - }); - }, function(error) { - ok(false, error); - }); - }, function(error) { - ok(false, error); - }); - }); + createFacadeAndLogin(function(facade) { + var code = "UPDATE_JSON_EXPERIMENT_" + (new Date().getTime()); + var creations = [ { + "@type" : "ExperimentCreation", + + "typeId" : { + "@type" : "EntityTypePermId", + "permId" : "UNKNOWN" + }, + + "code" : code, + + "projectId" : { + "@type" : "ProjectIdentifier", + "identifier" : "/TEST/TEST-PROJECT" + } + } ]; + + facade.createExperiments(creations, function(permIds) { + var updates = [ { + "@type" : "ExperimentUpdate", + + "experimentId" : permIds[0], + + "projectId" : { + "@type" : "ProjectIdentifier", + "identifier" : "/PLATONIC/SCREENING-EXAMPLES" + } + } ]; + + facade.updateExperiments(updates, function() { + var fetchOptions = createExperimentFetchOptions(); + + facade.mapExperiments(permIds, fetchOptions, function(experiments) { + assertObjectsCount(Object.keys(experiments), 1); + + var experiment = experiments[permIds[0].permId]; + equal(experiment.code, code, "Experiment code"); + equal(experiment.type.code, "UNKNOWN", "Type code"); + equal(experiment.project.code, "SCREENING-EXAMPLES", "Project code"); + equal(experiment.project.space.code, "PLATONIC", "Space code"); + facade.close(); + }, function(error) { + ok(false, error); + }); + }, function(error) { + ok(false, error); + }); + }, function(error) { + ok(false, error); + }); + }); }); test("updateSamples()", function() { - createFacadeAndLogin(function(facade) { - var code = "UPDATE_JSON_SAMPLE_" + (new Date().getTime()); - var creations = [ { - "@type" : "SampleCreation", - - "typeId" : { - "@type" : "EntityTypePermId", - "permId" : "UNKNOWN" - }, - - "code" : code, - - "spaceId" : { - "@type" : "SpacePermId", - "permId" : "PLATONIC" - } - } ]; - - facade.createSamples(creations, function(permIds) { - var updates = [ { - "@type" : "SampleUpdate", - - "sampleId" : permIds[0], - - "spaceId" : { - "@type" : "SpacePermId", - "permId" : "TEST" - } - } ]; - - facade.updateSamples(updates, function() { - var fetchOptions = createSampleFetchOptions(); - - facade.mapSamples(permIds, fetchOptions, function(samples) { - assertObjectsCount(Object.keys(samples), 1); - - var sample = samples[permIds[0].permId]; - equal(sample.code, code, "Sample code"); - equal(sample.type.code, "UNKNOWN", "Type code"); - equal(sample.space.code, "TEST", "Space code"); - facade.close(); - }, function(error) { - ok(false, error); - }); - }, function(error) { - ok(false, error); - }); - }, function(error) { - ok(false, error); - }); - }); + createFacadeAndLogin(function(facade) { + var code = "UPDATE_JSON_SAMPLE_" + (new Date().getTime()); + var creations = [ { + "@type" : "SampleCreation", + + "typeId" : { + "@type" : "EntityTypePermId", + "permId" : "UNKNOWN" + }, + + "code" : code, + + "spaceId" : { + "@type" : "SpacePermId", + "permId" : "PLATONIC" + } + } ]; + + facade.createSamples(creations, function(permIds) { + var updates = [ { + "@type" : "SampleUpdate", + + "sampleId" : permIds[0], + + "spaceId" : { + "@type" : "SpacePermId", + "permId" : "TEST" + } + } ]; + + facade.updateSamples(updates, function() { + var fetchOptions = createSampleFetchOptions(); + + facade.mapSamples(permIds, fetchOptions, function(samples) { + assertObjectsCount(Object.keys(samples), 1); + + var sample = samples[permIds[0].permId]; + equal(sample.code, code, "Sample code"); + equal(sample.type.code, "UNKNOWN", "Type code"); + equal(sample.space.code, "TEST", "Space code"); + facade.close(); + }, function(error) { + ok(false, error); + }); + }, function(error) { + ok(false, error); + }); + }, function(error) { + ok(false, error); + }); + }); }); diff --git a/js-test/servers/common/core-plugins/tests/1/as/webapps/openbis-v3-api-test/html/openbis-v3-api.js b/js-test/servers/common/core-plugins/tests/1/as/webapps/openbis-v3-api-test/html/openbis-v3-api.js index dd29fef346f891d24927f139390d57c9489d734f..f3d9c3b517eb5201de1ace737f459e1a9300a3dd 100644 --- a/js-test/servers/common/core-plugins/tests/1/as/webapps/openbis-v3-api-test/html/openbis-v3-api.js +++ b/js-test/servers/common/core-plugins/tests/1/as/webapps/openbis-v3-api-test/html/openbis-v3-api.js @@ -123,6 +123,18 @@ var openbis = function() { }); } + this.searchDataSets = function(dataSetSearchCriterion, dataSetFetchOptions, onSuccess, onError) { + _private.ajaxRequest({ + url : openbisUrl, + data : { + "method" : "searchDataSets", + "params" : [ _private.sessionToken, dataSetSearchCriterion, dataSetFetchOptions ] + }, + success : onSuccess, + error : onError + }); + } + this.createExperiments = function(experimentCreations, onSuccess, onError) { _private.ajaxRequest({ url : openbisUrl,