diff --git a/api-openbis-javascript/src/v3/as/dto/exporter/ExportResult.js b/api-openbis-javascript/src/v3/as/dto/exporter/ExportResult.js new file mode 100644 index 0000000000000000000000000000000000000000..085368cb64caee7a4ddbc77b6b491c86daa5a25c --- /dev/null +++ b/api-openbis-javascript/src/v3/as/dto/exporter/ExportResult.js @@ -0,0 +1,43 @@ +/* + * Copyright ETH 2023 Zürich, Scientific IT Services + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +define(["stjs"], function (stjs) { + var ExportResult = function (downloadURL, warnings) { + this.downloadUrl = downloadURL; + this.warnings = warnings; + }; + stjs.extend( + ExportResult, + null, + [], + function (constructor, prototype) { + prototype["@type"] = "as.dto.exporter.ExportResult"; + + constructor.serialVersionUID = 1; + + prototype.getDownloadURL = function() { + return this.downloadURL; + }; + + prototype.getWarnings = function() { + return this.warnings; + }; + }, + {} + ); + return ExportResult; +}); \ No newline at end of file diff --git a/api-openbis-javascript/src/v3/as/dto/exporter/data/AllFields.js b/api-openbis-javascript/src/v3/as/dto/exporter/data/AllFields.js new file mode 100644 index 0000000000000000000000000000000000000000..916c19ff4928056d932d618e7e6c4e162e30800f --- /dev/null +++ b/api-openbis-javascript/src/v3/as/dto/exporter/data/AllFields.js @@ -0,0 +1,43 @@ +/* + * Copyright ETH 2023 Zürich, Scientific IT Services + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +define(["stjs", "as/dto/exporter/data/IExportableFields"], function (stjs, ExportableFields) { + var AllFields = function() { + } + + stjs.extend( + AllFields, + ExportableFields, + [ExportableFields], + function (constructor, prototype) { + prototype["@type"] = "as.dto.exporter.data.AllFields"; + + constructor.serialVersionUID = 1; + + prototype.getAttributes = function() { + return null; + }; + + prototype.getProperties = function() { + return null; + }; + }, + {} + ); + + return AllFields; +}); \ No newline at end of file diff --git a/api-openbis-javascript/src/v3/as/dto/exporter/data/Attribute.js b/api-openbis-javascript/src/v3/as/dto/exporter/data/Attribute.js new file mode 100644 index 0000000000000000000000000000000000000000..3314038e7d360f76689d01a9776d8d64c0c54dd5 --- /dev/null +++ b/api-openbis-javascript/src/v3/as/dto/exporter/data/Attribute.js @@ -0,0 +1,33 @@ +/* + * Copyright ETH 2023 Zürich, Scientific IT Services + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +define(["stjs", "as/dto/common/Enum"], function (stjs, Enum) { + var Attribute = function() { + Enum.call(this, ["SPACE", "SAMPLE_TYPE", "EXPERIMENT_TYPE"]); + } + + stjs.extend( + Attribute, + Enum, + [Enum], + function (constructor, prototype) { + }, + {} + ); + + return new Attribute(); +}); \ No newline at end of file diff --git a/api-openbis-javascript/src/v3/as/dto/exporter/data/ExportData.js b/api-openbis-javascript/src/v3/as/dto/exporter/data/ExportData.js new file mode 100644 index 0000000000000000000000000000000000000000..f423127e9d17c1e23699ab59f4370490bc1a3b62 --- /dev/null +++ b/api-openbis-javascript/src/v3/as/dto/exporter/data/ExportData.js @@ -0,0 +1,45 @@ +/* + * Copyright ETH 2023 Zürich, Scientific IT Services + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +define(["stjs"], function (stjs) { + var ExportData = function(permIds, fields) { + this.permIds = permIds; + this.fields = fields; + } + + stjs.extend( + ExportData, + null, + [], + function (constructor, prototype) { + prototype["@type"] = "as.dto.exporter.data.ExportData"; + + constructor.serialVersionUID = 1; + + prototype.getPermIds = function() { + return this.permIds; + }; + + prototype.getFields = function() { + return this.fields; + }; + }, + {} + ); + + return ExportData; +}); \ No newline at end of file diff --git a/api-openbis-javascript/src/v3/as/dto/exporter/data/ExportableKind.js b/api-openbis-javascript/src/v3/as/dto/exporter/data/ExportableKind.js new file mode 100644 index 0000000000000000000000000000000000000000..f4fd8b37dd926a062504656926d4d23e3ed60056 --- /dev/null +++ b/api-openbis-javascript/src/v3/as/dto/exporter/data/ExportableKind.js @@ -0,0 +1,35 @@ +/* + * Copyright ETH 2023 Zürich, Scientific IT Services + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +define(["stjs", "as/dto/common/Enum"], function (stjs, Enum) { + var ExportableKind = function() { + Enum.call(this, ["SAMPLE_TYPE", "EXPERIMENT_TYPE", "DATASET_TYPE", + "VOCABULARY_TYPE", "SPACE", "PROJECT", "SAMPLE", "EXPERIMENT", + "DATASET"]); + } + + stjs.extend( + ExportableKind, + Enum, + [Enum], + function (constructor, prototype) { + }, + {} + ); + + return new ExportableKind(); +}); \ No newline at end of file diff --git a/api-openbis-javascript/src/v3/as/dto/exporter/data/ExportablePermId.js b/api-openbis-javascript/src/v3/as/dto/exporter/data/ExportablePermId.js new file mode 100644 index 0000000000000000000000000000000000000000..a8f742d9a7689aaff72805fa9f524b87c9e385a7 --- /dev/null +++ b/api-openbis-javascript/src/v3/as/dto/exporter/data/ExportablePermId.js @@ -0,0 +1,47 @@ +/* + * Copyright ETH 2023 Zürich, Scientific IT Services + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +define(["stjs"], function (stjs) { + var ExportablePermId = function(exportableKind, permId) { + exportableKind.constructor(); // Assert that the value is defined + this.exportableKind = exportableKind; + permId.constructor(); // Assert that the value is defined + this.permId = permId; + } + + stjs.extend( + ExportablePermId, + null, + [], + function (constructor, prototype) { + prototype["@type"] = "as.dto.exporter.data.ExportablePermId"; + + constructor.serialVersionUID = 1; + + prototype.getExportableKind = function() { + return this.exportableKind; + }; + + prototype.getPermId = function() { + return this.permId; + }; + }, + {} + ); + + return ExportablePermId; +}); \ No newline at end of file diff --git a/api-openbis-javascript/src/v3/as/dto/exporter/data/IExportableFields.js b/api-openbis-javascript/src/v3/as/dto/exporter/data/IExportableFields.js new file mode 100644 index 0000000000000000000000000000000000000000..d37714f5e947bcc19ff0d60b2ad070dc0b835d79 --- /dev/null +++ b/api-openbis-javascript/src/v3/as/dto/exporter/data/IExportableFields.js @@ -0,0 +1,23 @@ +/* + * Copyright ETH 2023 Zürich, Scientific IT Services + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +define(["stjs"], function (stjs) { + var IExportableFields = function () { + }; + stjs.extend(IExportableFields, null, [], null, {}); + return IExportableFields; +}); \ No newline at end of file diff --git a/api-openbis-javascript/src/v3/as/dto/exporter/data/SelectedFields.js b/api-openbis-javascript/src/v3/as/dto/exporter/data/SelectedFields.js new file mode 100644 index 0000000000000000000000000000000000000000..a4db232a30f4210765188ef0d296fe34f7ba0879 --- /dev/null +++ b/api-openbis-javascript/src/v3/as/dto/exporter/data/SelectedFields.js @@ -0,0 +1,45 @@ +/* + * Copyright ETH 2023 Zürich, Scientific IT Services + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +define(["stjs", "as/dto/exporter/ExportableFields"], function (stjs, ExportableFields) { + var SelectedFields = function(attributes, properties) { + this.attributes = attributes; + this.properties = properties; + } + + stjs.extend( + SelectedFields, + ExportableFields, + [ExportableFields], + function (constructor, prototype) { + prototype["@type"] = "as.dto.exporter.data.SelectedFields"; + + constructor.serialVersionUID = 1; + + prototype.getAttributes = function() { + return this.attributes; + }; + + prototype.getProperties = function() { + return this.properties; + }; + }, + {} + ); + + return SelectedFields; +}); \ No newline at end of file diff --git a/api-openbis-javascript/src/v3/as/dto/exporter/options/ExportFormat.js b/api-openbis-javascript/src/v3/as/dto/exporter/options/ExportFormat.js new file mode 100644 index 0000000000000000000000000000000000000000..75baed9a5c4b1fbc873e3c2802f07b724e75d9ba --- /dev/null +++ b/api-openbis-javascript/src/v3/as/dto/exporter/options/ExportFormat.js @@ -0,0 +1,33 @@ +/* + * Copyright ETH 2023 Zürich, Scientific IT Services + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +define(["stjs", "as/dto/common/Enum"], function (stjs, Enum) { + var ExportFormat = function() { + Enum.call(this, ["XLS", "PDF", "DATA"]); + } + + stjs.extend( + ExportFormat, + Enum, + [Enum], + function (constructor, prototype) { + }, + {} + ); + + return new ExportFormat(); +}); \ No newline at end of file diff --git a/api-openbis-javascript/src/v3/as/dto/exporter/options/ExportOptions.js b/api-openbis-javascript/src/v3/as/dto/exporter/options/ExportOptions.js new file mode 100644 index 0000000000000000000000000000000000000000..58592d20a167020e9cddc709b987a9895a1b61ab --- /dev/null +++ b/api-openbis-javascript/src/v3/as/dto/exporter/options/ExportOptions.js @@ -0,0 +1,55 @@ +/* + * Copyright ETH 2023 Zürich, Scientific IT Services + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +define(["stjs"], function (stjs) { + var SelectedFields = function(formats, xlsTextFormat, withReferredTypes, withImportCompatibility) { + this.formats = formats; + this.xlsTextFormat = xlsTextFormat; + this.withReferredTypes = withReferredTypes; + this.withImportCompatibility = withImportCompatibility; + } + + stjs.extend( + SelectedFields, + null, + [], + function (constructor, prototype) { + prototype["@type"] = "as.dto.exporter.options.SelectedFields"; + + constructor.serialVersionUID = 1; + + prototype.getFormats = function() { + return this.formats; + }; + + prototype.getXlsTextFormat = function() { + return this.xlsTextFormat; + }; + + prototype.getWithReferredTypes = function() { + return this.withReferredTypes; + }; + + prototype.getWithImportCompatibility = function() { + return this.withImportCompatibility; + }; + }, + {} + ); + + return SelectedFields; +}); \ No newline at end of file diff --git a/api-openbis-javascript/src/v3/as/dto/exporter/options/XlsTextFormat.js b/api-openbis-javascript/src/v3/as/dto/exporter/options/XlsTextFormat.js new file mode 100644 index 0000000000000000000000000000000000000000..e3412bb3bd3c48bca1dd52ad534b17903708bd03 --- /dev/null +++ b/api-openbis-javascript/src/v3/as/dto/exporter/options/XlsTextFormat.js @@ -0,0 +1,33 @@ +/* + * Copyright ETH 2023 Zürich, Scientific IT Services + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +define(["stjs", "as/dto/common/Enum"], function (stjs, Enum) { + var XlsTextFormat = function() { + Enum.call(this, ["PLAIN", "RICH"]); + } + + stjs.extend( + XlsTextFormat, + Enum, + [Enum], + function (constructor, prototype) { + }, + {} + ); + + return new XlsTextFormat(); +}); \ No newline at end of file diff --git a/api-openbis-javascript/src/v3/as/dto/importer/ImportOperation.js b/api-openbis-javascript/src/v3/as/dto/importer/ImportOperation.js new file mode 100644 index 0000000000000000000000000000000000000000..1a60576de00dbb4a58ed0a32a7d4150bfe4cc47f --- /dev/null +++ b/api-openbis-javascript/src/v3/as/dto/importer/ImportOperation.js @@ -0,0 +1,50 @@ +/* + * Copyright ETH 2023 Zürich, Scientific IT Services + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +define(["stjs", "as/dto/common/operation/IOperation"], + function (stjs, IOperation) { + var ImportOperation = function(importData, importOptions) { + this.importData = importData; + this.importOptions = importOptions; + } + + stjs.extend( + ImportOperation, + IOperation, + [IOperation], + function (constructor, prototype) { + prototype["@type"] = "as.dto.importer.ImportOperation"; + + constructor.serialVersionUID = 1; + + prototype.getMessage = function() { + return "ImportOperation"; + }; + + prototype.getImportData = function() { + return this.importData; + }; + + prototype.getImportOptions = function() { + return this.importOptions; + }; + }, + {} + ); + + return ImportOperation; + }); \ No newline at end of file diff --git a/api-openbis-javascript/src/v3/as/dto/importer/ImportOperationResult.js b/api-openbis-javascript/src/v3/as/dto/importer/ImportOperationResult.js new file mode 100644 index 0000000000000000000000000000000000000000..8644008309f35a02da7fcdeee25354a5a1d0b28c --- /dev/null +++ b/api-openbis-javascript/src/v3/as/dto/importer/ImportOperationResult.js @@ -0,0 +1,40 @@ +/* + * Copyright ETH 2023 Zürich, Scientific IT Services + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +define(["stjs", "as/dto/common/operation/IOperationResult"], + function (stjs, IOperationResult) { + var ImportOperationResult = function() { + } + + stjs.extend( + ImportOperationResult, + IOperationResult, + [IOperationResult], + function (constructor, prototype) { + prototype["@type"] = "as.dto.importer.ImportOperationResult"; + + constructor.serialVersionUID = 1; + + prototype.getMessage = function() { + return "ImportOperationResult"; + }; + }, + {} + ); + + return ImportOperationResult; + }); \ No newline at end of file diff --git a/api-openbis-javascript/src/v3/as/dto/importer/data/IImportData.js b/api-openbis-javascript/src/v3/as/dto/importer/data/IImportData.js new file mode 100644 index 0000000000000000000000000000000000000000..1289c8e8e4d5fc079dc7015a826b2e4cb6f0d821 --- /dev/null +++ b/api-openbis-javascript/src/v3/as/dto/importer/data/IImportData.js @@ -0,0 +1,23 @@ +/* + * Copyright ETH 2023 Zürich, Scientific IT Services + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +define(["stjs"], function (stjs) { + var IImportData = function () { + }; + stjs.extend(IImportData, null, [], null, {}); + return IImportData; +}); \ No newline at end of file diff --git a/api-openbis-javascript/src/v3/as/dto/importer/data/ImportFormat.js b/api-openbis-javascript/src/v3/as/dto/importer/data/ImportFormat.js new file mode 100644 index 0000000000000000000000000000000000000000..982b7ff16bf67abb8fba38779fe10f233d4997d0 --- /dev/null +++ b/api-openbis-javascript/src/v3/as/dto/importer/data/ImportFormat.js @@ -0,0 +1,33 @@ +/* + * Copyright ETH 2023 Zürich, Scientific IT Services + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +define(["stjs", "as/dto/common/Enum"], function (stjs, Enum) { + var ImportFormat = function() { + Enum.call(this, ["XLS"]); + } + + stjs.extend( + ImportFormat, + Enum, + [Enum], + function (constructor, prototype) { + }, + {} + ); + + return new ImportFormat(); +}); \ No newline at end of file diff --git a/api-openbis-javascript/src/v3/as/dto/importer/data/ImportScript.js b/api-openbis-javascript/src/v3/as/dto/importer/data/ImportScript.js new file mode 100644 index 0000000000000000000000000000000000000000..f280d51ae97a854732fbe32c66dd1bbcccf1a03d --- /dev/null +++ b/api-openbis-javascript/src/v3/as/dto/importer/data/ImportScript.js @@ -0,0 +1,46 @@ +/* + * Copyright ETH 2023 Zürich, Scientific IT Services + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +define(["stjs"], + function (stjs) { + var ImportScript = function(name, source) { + this.name = name; + this.source = source; + } + + stjs.extend( + ImportScript, + null, + [], + function (constructor, prototype) { + prototype["@type"] = "as.dto.importer.data.ImportScript"; + + constructor.serialVersionUID = 1; + + prototype.getName = function() { + return this.name; + }; + + prototype.getSource = function() { + return this.source; + }; + }, + {} + ); + + return ImportScript; + }); \ No newline at end of file diff --git a/api-openbis-javascript/src/v3/as/dto/importer/data/UncompressedImportData.js b/api-openbis-javascript/src/v3/as/dto/importer/data/UncompressedImportData.js new file mode 100644 index 0000000000000000000000000000000000000000..912dbcc892e297238f9c927e59126ea9c2777016 --- /dev/null +++ b/api-openbis-javascript/src/v3/as/dto/importer/data/UncompressedImportData.js @@ -0,0 +1,46 @@ +/* + * Copyright ETH 2023 Zürich, Scientific IT Services + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +define(["stjs", "as/dto/importer/data/IImportData"], + function (stjs, IImportData) { + var UncompressedImportData = function(file, scripts) { + this.file = file; + this.scripts = scripts; + } + + stjs.extend( + UncompressedImportData, + IImportData, + [IImportData], + function (constructor, prototype) { + prototype["@type"] = "as.dto.importer.data.UncompressedImportData"; + + constructor.serialVersionUID = 1; + + prototype.getFile = function() { + return this.file; + }; + + prototype.getScripts = function() { + return this.scripts; + }; + }, + {} + ); + + return UncompressedImportData; + }); \ No newline at end of file diff --git a/api-openbis-javascript/src/v3/as/dto/importer/data/ZipImportData.js b/api-openbis-javascript/src/v3/as/dto/importer/data/ZipImportData.js new file mode 100644 index 0000000000000000000000000000000000000000..7bd8084682b09cc1bbc246b129abb4aebb97a685 --- /dev/null +++ b/api-openbis-javascript/src/v3/as/dto/importer/data/ZipImportData.js @@ -0,0 +1,46 @@ +/* + * Copyright ETH 2023 Zürich, Scientific IT Services + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +define(["stjs", "as/dto/importer/data/IImportData"], + function (stjs, IImportData) { + var ZipImportData = function(format, file) { + this.format = format; + this.file = file; + } + + stjs.extend( + ZipImportData, + IImportData, + [IImportData], + function (constructor, prototype) { + prototype["@type"] = "as.dto.importer.data.ZipImportData"; + + constructor.serialVersionUID = 1; + + prototype.getFormat = function() { + return this.format; + }; + + prototype.getFile = function() { + return this.file; + }; + }, + {} + ); + + return ZipImportData; + }); \ No newline at end of file diff --git a/api-openbis-javascript/src/v3/as/dto/importer/options/ImportMode.js b/api-openbis-javascript/src/v3/as/dto/importer/options/ImportMode.js new file mode 100644 index 0000000000000000000000000000000000000000..3a16377f3144d0df71370e2dd914f841d4a6bdec --- /dev/null +++ b/api-openbis-javascript/src/v3/as/dto/importer/options/ImportMode.js @@ -0,0 +1,33 @@ +/* + * Copyright ETH 2023 Zürich, Scientific IT Services + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +define(["stjs", "as/dto/common/Enum"], function (stjs, Enum) { + var ExportableKind = function() { + Enum.call(this, ["UPDATE_IF_EXISTS", "IGNORE_EXISTING", "FAIL_IF_EXISTS"]); + } + + stjs.extend( + ExportableKind, + Enum, + [Enum], + function (constructor, prototype) { + }, + {} + ); + + return new ExportableKind(); +}); \ No newline at end of file diff --git a/api-openbis-javascript/src/v3/as/dto/importer/options/ImportOptions.js b/api-openbis-javascript/src/v3/as/dto/importer/options/ImportOptions.js new file mode 100644 index 0000000000000000000000000000000000000000..3f609dfda2ef37fbd60eb05793afcd24d1586f05 --- /dev/null +++ b/api-openbis-javascript/src/v3/as/dto/importer/options/ImportOptions.js @@ -0,0 +1,40 @@ +/* + * Copyright ETH 2023 Zürich, Scientific IT Services + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +define(["stjs"], function (stjs) { + var ImportOptions = function(mode) { + this.mode = mode; + } + + stjs.extend( + ImportOptions, + null, + [], + function (constructor, prototype) { + prototype["@type"] = "as.dto.importer.options.ImportOptions"; + + constructor.serialVersionUID = 1; + + prototype.getMode = function() { + return this.mode; + }; + }, + {} + ); + + return ImportOptions; +}); \ No newline at end of file