diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/public/resources/api/v3/as/dto/common/interfaces/IDataSetsHolder.js b/openbis/source/java/ch/systemsx/cisd/openbis/public/resources/api/v3/as/dto/common/interfaces/IDataSetsHolder.js new file mode 100644 index 0000000000000000000000000000000000000000..37d568f5d7fde901ba273e7e8967beeb56b56ae4 --- /dev/null +++ b/openbis/source/java/ch/systemsx/cisd/openbis/public/resources/api/v3/as/dto/common/interfaces/IDataSetsHolder.js @@ -0,0 +1,10 @@ +define([ "stjs", "util/Exceptions" ], function(stjs, exceptions) { + var IDataSetsHolder = function() { + }; + stjs.extend(IDataSetsHolder, null, [], function(constructor, prototype) { + prototype.getDataSets = function() { + throw new exceptions.RuntimeException("Interface method."); + }; + }, {}); + return IDataSetsHolder; +}) \ No newline at end of file diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/public/resources/api/v3/as/dto/common/interfaces/IExperimentHolder.js b/openbis/source/java/ch/systemsx/cisd/openbis/public/resources/api/v3/as/dto/common/interfaces/IExperimentHolder.js new file mode 100644 index 0000000000000000000000000000000000000000..c33288e9810047bd7b0854e65806a1cdc29f3121 --- /dev/null +++ b/openbis/source/java/ch/systemsx/cisd/openbis/public/resources/api/v3/as/dto/common/interfaces/IExperimentHolder.js @@ -0,0 +1,10 @@ +define([ "stjs", "util/Exceptions" ], function(stjs, exceptions) { + var IExperimentHolder = function() { + }; + stjs.extend(IExperimentHolder, null, [], function(constructor, prototype) { + prototype.getExperiment = function() { + throw new exceptions.RuntimeException("Interface method."); + }; + }, {}); + return IExperimentHolder; +}) \ No newline at end of file diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/public/resources/api/v3/as/dto/common/interfaces/IExperimentsHolder.js b/openbis/source/java/ch/systemsx/cisd/openbis/public/resources/api/v3/as/dto/common/interfaces/IExperimentsHolder.js new file mode 100644 index 0000000000000000000000000000000000000000..a0d9e714458130ad92d51883fa2a733f5e996983 --- /dev/null +++ b/openbis/source/java/ch/systemsx/cisd/openbis/public/resources/api/v3/as/dto/common/interfaces/IExperimentsHolder.js @@ -0,0 +1,10 @@ +define([ "stjs", "util/Exceptions" ], function(stjs, exceptions) { + var IExperimentsHolder = function() { + }; + stjs.extend(IExperimentsHolder, null, [], function(constructor, prototype) { + prototype.getExperiments = function() { + throw new exceptions.RuntimeException("Interface method."); + }; + }, {}); + return IExperimentsHolder; +}) \ No newline at end of file diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/public/resources/api/v3/as/dto/common/interfaces/IMaterialsHolder.js b/openbis/source/java/ch/systemsx/cisd/openbis/public/resources/api/v3/as/dto/common/interfaces/IMaterialsHolder.js new file mode 100644 index 0000000000000000000000000000000000000000..54004de8e334be9ef37f6dc40bd719505cc2f2a8 --- /dev/null +++ b/openbis/source/java/ch/systemsx/cisd/openbis/public/resources/api/v3/as/dto/common/interfaces/IMaterialsHolder.js @@ -0,0 +1,10 @@ +define([ "stjs", "util/Exceptions" ], function(stjs, exceptions) { + var IMaterialsHolder = function() { + }; + stjs.extend(IMaterialsHolder, null, [], function(constructor, prototype) { + prototype.getMaterials = function() { + throw new exceptions.RuntimeException("Interface method."); + }; + }, {}); + return IMaterialsHolder; +}) \ No newline at end of file diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/public/resources/api/v3/as/dto/common/interfaces/IOwnerHolder.js b/openbis/source/java/ch/systemsx/cisd/openbis/public/resources/api/v3/as/dto/common/interfaces/IOwnerHolder.js new file mode 100644 index 0000000000000000000000000000000000000000..8708b0cca04b644a1ca795838e0bea0ce0323755 --- /dev/null +++ b/openbis/source/java/ch/systemsx/cisd/openbis/public/resources/api/v3/as/dto/common/interfaces/IOwnerHolder.js @@ -0,0 +1,10 @@ +define([ "stjs", "util/Exceptions" ], function(stjs, exceptions) { + var IOwnerHolder = function() { + }; + stjs.extend(IOwnerHolder, null, [], function(constructor, prototype) { + prototype.getOwner = function() { + throw new exceptions.RuntimeException("Interface method."); + }; + }, {}); + return IOwnerHolder; +}) \ No newline at end of file diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/public/resources/api/v3/as/dto/common/interfaces/IProjectHolder.js b/openbis/source/java/ch/systemsx/cisd/openbis/public/resources/api/v3/as/dto/common/interfaces/IProjectHolder.js new file mode 100644 index 0000000000000000000000000000000000000000..47b8106d397648f330fae495a4e7682913560f29 --- /dev/null +++ b/openbis/source/java/ch/systemsx/cisd/openbis/public/resources/api/v3/as/dto/common/interfaces/IProjectHolder.js @@ -0,0 +1,10 @@ +define([ "stjs", "util/Exceptions" ], function(stjs, exceptions) { + var IProjectHolder = function() { + }; + stjs.extend(IProjectHolder, null, [], function(constructor, prototype) { + prototype.getProject = function() { + throw new exceptions.RuntimeException("Interface method."); + }; + }, {}); + return IProjectHolder; +}) \ No newline at end of file diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/public/resources/api/v3/as/dto/common/interfaces/IProjectsHolder.js b/openbis/source/java/ch/systemsx/cisd/openbis/public/resources/api/v3/as/dto/common/interfaces/IProjectsHolder.js new file mode 100644 index 0000000000000000000000000000000000000000..f23b2ad01f77af87c648d364c30127e871c99a37 --- /dev/null +++ b/openbis/source/java/ch/systemsx/cisd/openbis/public/resources/api/v3/as/dto/common/interfaces/IProjectsHolder.js @@ -0,0 +1,10 @@ +define([ "stjs", "util/Exceptions" ], function(stjs, exceptions) { + var IProjectsHolder = function() { + }; + stjs.extend(IProjectsHolder, null, [], function(constructor, prototype) { + prototype.getProjects = function() { + throw new exceptions.RuntimeException("Interface method."); + }; + }, {}); + return IProjectsHolder; +}) \ No newline at end of file diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/public/resources/api/v3/as/dto/common/interfaces/ISampleHolder.js b/openbis/source/java/ch/systemsx/cisd/openbis/public/resources/api/v3/as/dto/common/interfaces/ISampleHolder.js new file mode 100644 index 0000000000000000000000000000000000000000..7eed3a166f4148f1edc58a42cc0a9014946507d1 --- /dev/null +++ b/openbis/source/java/ch/systemsx/cisd/openbis/public/resources/api/v3/as/dto/common/interfaces/ISampleHolder.js @@ -0,0 +1,10 @@ +define([ "stjs", "util/Exceptions" ], function(stjs, exceptions) { + var ISampleHolder = function() { + }; + stjs.extend(ISampleHolder, null, [], function(constructor, prototype) { + prototype.getSample = function() { + throw new exceptions.RuntimeException("Interface method."); + }; + }, {}); + return ISampleHolder; +}) \ No newline at end of file diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/public/resources/api/v3/as/dto/common/interfaces/ISamplesHolder.js b/openbis/source/java/ch/systemsx/cisd/openbis/public/resources/api/v3/as/dto/common/interfaces/ISamplesHolder.js new file mode 100644 index 0000000000000000000000000000000000000000..09cc2bc5fdf7d86e54103edfcfcb66702ce8fbbe --- /dev/null +++ b/openbis/source/java/ch/systemsx/cisd/openbis/public/resources/api/v3/as/dto/common/interfaces/ISamplesHolder.js @@ -0,0 +1,10 @@ +define([ "stjs", "util/Exceptions" ], function(stjs, exceptions) { + var ISamplesHolder = function() { + }; + stjs.extend(ISamplesHolder, null, [], function(constructor, prototype) { + prototype.getSamples = function() { + throw new exceptions.RuntimeException("Interface method."); + }; + }, {}); + return ISamplesHolder; +}) \ No newline at end of file diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/public/resources/api/v3/as/dto/tag/Tag.js b/openbis/source/java/ch/systemsx/cisd/openbis/public/resources/api/v3/as/dto/tag/Tag.js index 1f0644819e88183d1a277e0150433342bfdbd2a9..7244a882470b934138f410138cab9232dde06925 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/public/resources/api/v3/as/dto/tag/Tag.js +++ b/openbis/source/java/ch/systemsx/cisd/openbis/public/resources/api/v3/as/dto/tag/Tag.js @@ -13,6 +13,10 @@ define([ "stjs", "util/Exceptions" ], function(stjs, exceptions) { prototype.code = null; prototype.description = null; prototype.isPrivate = null; + prototype.experiments = null; + prototype.samples = null; + prototype.dataSets = null; + prototype.materials = null; prototype.registrationDate = null; prototype.owner = null; prototype.getFetchOptions = function() { @@ -45,6 +49,46 @@ define([ "stjs", "util/Exceptions" ], function(stjs, exceptions) { prototype.setPrivate = function(isPrivate) { this.isPrivate = isPrivate; }; + prototype.getExperiments = function() { + if (this.getFetchOptions() && this.getFetchOptions().hasExperiments()) { + return this.experiments; + } else { + throw new exceptions.NotFetchedException("Experiments have not been fetched."); + } + }; + prototype.setExperiments = function(experiments) { + this.experiments = experiments; + }; + prototype.getSamples = function() { + if (this.getFetchOptions() && this.getFetchOptions().hasSamples()) { + return this.samples; + } else { + throw new exceptions.NotFetchedException("Samples have not been fetched."); + } + }; + prototype.setSamples = function(samples) { + this.samples = samples; + }; + prototype.getDataSets = function() { + if (this.getFetchOptions() && this.getFetchOptions().hasDataSets()) { + return this.dataSets; + } else { + throw new exceptions.NotFetchedException("Data sets have not been fetched."); + } + }; + prototype.setDataSets = function(dataSets) { + this.dataSets = dataSets; + }; + prototype.getMaterials = function() { + if (this.getFetchOptions() && this.getFetchOptions().hasMaterials()) { + return this.materials; + } else { + throw new exceptions.NotFetchedException("Materials have not been fetched."); + } + }; + prototype.setMaterials = function(materials) { + this.materials = materials; + }; prototype.getRegistrationDate = function() { return this.registrationDate; }; @@ -64,6 +108,22 @@ define([ "stjs", "util/Exceptions" ], function(stjs, exceptions) { }, { fetchOptions : "TagFetchOptions", permId : "TagPermId", + experiments : { + name : "List", + arguments : [ "Experiment" ] + }, + samples : { + name : "List", + arguments : [ "Sample" ] + }, + dataSets : { + name : "List", + arguments : [ "DataSet" ] + }, + materials : { + name : "List", + arguments : [ "Material" ] + }, registrationDate : "Date", owner : "Person" }); diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/public/resources/api/v3/as/dto/tag/fetchoptions/TagFetchOptions.js b/openbis/source/java/ch/systemsx/cisd/openbis/public/resources/api/v3/as/dto/tag/fetchoptions/TagFetchOptions.js index 67f2755ac72809efcc8101f7c12bc8fe60a6f09a..f7d851720b75e9f7aa82d8b6a95741236c15274e 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/public/resources/api/v3/as/dto/tag/fetchoptions/TagFetchOptions.js +++ b/openbis/source/java/ch/systemsx/cisd/openbis/public/resources/api/v3/as/dto/tag/fetchoptions/TagFetchOptions.js @@ -2,14 +2,77 @@ * Class automatically generated with * {@link ch.ethz.sis.openbis.generic.shared.api.v3.dto.generators.DtoGenerator} */ -define([ "require", "stjs", "as/dto/common/fetchoptions/FetchOptions", "as/dto/person/fetchoptions/PersonFetchOptions", "as/dto/tag/fetchoptions/TagSortOptions" ], function(require, stjs, FetchOptions) { +define([ "require", "stjs", "as/dto/common/fetchoptions/FetchOptions", "as/dto/person/fetchoptions/PersonFetchOptions", "as/dto/tag/fetchoptions/TagSortOptions", + "as/dto/experiment/fetchoptions/ExperimentFetchOptions", "as/dto/sample/fetchoptions/SampleFetchOptions", "as/dto/dataset/fetchoptions/DataSetFetchOptions", + "as/dto/material/fetchoptions/MaterialFetchOptions" ], function(require, stjs, FetchOptions) { var TagFetchOptions = function() { }; stjs.extend(TagFetchOptions, FetchOptions, [ FetchOptions ], function(constructor, prototype) { prototype['@type'] = 'as.dto.tag.fetchoptions.TagFetchOptions'; constructor.serialVersionUID = 1; + prototype.experiments = null; + prototype.samples = null; + prototype.dataSets = null; + prototype.materials = null; prototype.owner = null; prototype.sort = null; + + prototype.withExperiments = function() { + if (this.experiments == null) { + var ExperimentFetchOptions = require("as/dto/experiment/fetchoptions/ExperimentFetchOptions"); + this.experiments = new ExperimentFetchOptions(); + } + return this.experiments; + }; + prototype.withExperimentsUsing = function(fetchOptions) { + return this.experiments = fetchOptions; + }; + prototype.hasExperiments = function() { + return this.experiments != null; + }; + + prototype.withSamples = function() { + if (this.samples == null) { + var SampleFetchOptions = require("as/dto/sample/fetchoptions/SampleFetchOptions"); + this.samples = new SampleFetchOptions(); + } + return this.samples; + }; + prototype.withSamplesUsing = function(fetchOptions) { + return this.samples = fetchOptions; + }; + prototype.hasSamples = function() { + return this.samples != null; + }; + + prototype.withDataSets = function() { + if (this.dataSets == null) { + var DataSetFetchOptions = require("as/dto/dataset/fetchoptions/DataSetFetchOptions"); + this.dataSets = new DataSetFetchOptions(); + } + return this.dataSets; + }; + prototype.withDataSetsUsing = function(fetchOptions) { + return this.dataSets = fetchOptions; + }; + prototype.hasDataSets = function() { + return this.dataSets != null; + }; + + prototype.withMaterials = function() { + if (this.materials == null) { + var MaterialFetchOptions = require("as/dto/material/fetchoptions/MaterialFetchOptions"); + this.materials = new MaterialFetchOptions(); + } + return this.materials; + }; + prototype.withMaterialsUsing = function(fetchOptions) { + return this.materials = fetchOptions; + }; + prototype.hasMaterials = function() { + return this.materials != null; + }; + prototype.withOwner = function() { if (this.owner == null) { var PersonFetchOptions = require("as/dto/person/fetchoptions/PersonFetchOptions"); @@ -23,6 +86,7 @@ define([ "require", "stjs", "as/dto/common/fetchoptions/FetchOptions", "as/dto/p prototype.hasOwner = function() { return this.owner != null; }; + prototype.sortBy = function() { if (this.sort == null) { var TagSortOptions = require("as/dto/tag/fetchoptions/TagSortOptions"); diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/public/resources/api/v3/openbis.js b/openbis/source/java/ch/systemsx/cisd/openbis/public/resources/api/v3/openbis.js index 58109d0b95db85907b9a5fffe4de6f62939972d0..17654f7a30f683aa311087731f8ea8aaec086e14 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/public/resources/api/v3/openbis.js +++ b/openbis/source/java/ch/systemsx/cisd/openbis/public/resources/api/v3/openbis.js @@ -416,6 +416,21 @@ define([ 'jquery', 'util/Json' ], function($, stjsUtil) { }); } + this.mapTags = function(ids, fetchOptions) { + var thisFacade = this; + return thisFacade._private.ajaxRequest({ + url : openbisUrl, + data : { + "method" : "mapTags", + "params" : [ thisFacade._private.sessionToken, ids, fetchOptions ] + }, + returnType : { + name : "Map", + arguments : [ "ITagId", "Tag" ] + } + }); + } + this.searchSpaces = function(criteria, fetchOptions) { var thisFacade = this; return thisFacade._private.ajaxRequest({ @@ -463,7 +478,7 @@ define([ 'jquery', 'util/Json' ], function($, stjsUtil) { returnType : "SearchResult" }) } - + this.searchSamples = function(criteria, fetchOptions) { var thisFacade = this; return thisFacade._private.ajaxRequest({ @@ -487,7 +502,7 @@ define([ 'jquery', 'util/Json' ], function($, stjsUtil) { returnType : "SearchResult" }); } - + this.searchDataSets = function(criteria, fetchOptions) { var thisFacade = this; return thisFacade._private.ajaxRequest({ @@ -511,7 +526,7 @@ define([ 'jquery', 'util/Json' ], function($, stjsUtil) { returnType : "SearchResult" }); } - + this.searchMaterials = function(criteria, fetchOptions) { var thisFacade = this; return thisFacade._private.ajaxRequest({