diff --git a/authentication/build.gradle b/authentication/build.gradle index b8bacb1d92072e9036be8b8e0d319ad15a9c4ce6..79fd3cd773e21bcc158329c00020fa67dc4ca34d 100644 --- a/authentication/build.gradle +++ b/authentication/build.gradle @@ -4,8 +4,7 @@ evaluationDependsOn(':common') apply from: '../gradle/javaproject.gradle' dependencies { - compile project(':common'), - 'bouncycastle:bcpg:+' + compile project(':common') testCompile project(path: ':common', configuration: 'tests') } diff --git a/base/.gitignore b/base/.gitignore deleted file mode 100644 index f3e71812850e072066f1c3afdfa824b89ceb4387..0000000000000000000000000000000000000000 --- a/base/.gitignore +++ /dev/null @@ -1,4 +0,0 @@ -/targets -/test-output -/bin -/build diff --git a/base/build.gradle b/base/build.gradle deleted file mode 100644 index 4397cfec161683609744eb267b307ea3c0e93ba3..0000000000000000000000000000000000000000 --- a/base/build.gradle +++ /dev/null @@ -1,106 +0,0 @@ -apply from: '../gradle/javaproject.gradle' - -group='sis' - -dependencies { - compile 'apache:commons-io:+', - 'apache:commons-lang:+', - 'testng:testng:+', - 'rinn:restrictions:+' -} - -tasks.withType(Test) { - systemProperty "java.library.path", "libs/native/unix/amd64-Linux:libs/native/nativedata/amd64-Linux:libs/native/unix/x86_64-Mac OS X:libs/native/nativedata/x86_64-Mac OS X" -} - - -sourceSets { - test { - resources { - srcDir "libs" - include "**" - } - } -} - -jar { - manifest { - attributes 'Main-Class': 'ch.systemsx.cisd.base.BuildAndEnvironmentInfo' - } - - from('targets/dist') { - include 'BUILD*INFO' - } - - from fileTree("libs/") -} - -task standaloneTestJar(type: Jar, dependsOn: [classes, testClasses]) { - archiveName "${project.group}-base-test.jar" - from files(sourceSets.main.output.classesDir) - from files(sourceSets.main.output.resourcesDir) - from files(sourceSets.test.output.classesDir) - from files("libs") - - from {configurations.testRuntime.collect {zipTree(it)}} - - manifest { - attributes 'Main-Class': 'ch.systemsx.cisd.base.AllTests' - } -} - -task javadocZip(type: Zip, dependsOn: javadoc) { - archiveName "${project.group}-base-javadoc.zip" - from javadoc.destinationDir -} - -task distributionZip(type: Zip, dependsOn: [jar, sourcesJar, javadocZip, standaloneTestJar]) { - baseName = "${project.group}-base" - from ('dist') { - into "${project.group}-base" - } - - from ('doc') { - into "${project.group}-base/doc" - } - - from (jar.archivePath) { - into "${project.group}-base/lib" - rename '(.*)', "${project.group}-base.jar" - } - - from (sourcesJar.archivePath) { - into "${project.group}-base/src" - rename '(.*)', "${project.group}-base-src.jar" - } - - from (standaloneTestJar.archivePath) { - into "${project.group}-base/lib" - } - - from (javadocZip.archivePath) { - into "${project.group}-base/doc" - } -} - -build.dependsOn distributionZip - -publishing { - publications { - ivy(IvyPublication) { - module "${project.group}-base" - revision project.revisionForPublication - from components.java - artifact(sourcesJar) { - type = 'source' - } - descriptor { - withXml { - for (org in ['testng', 'rinn']) { - asNode().dependencies.dependency.find { it.@org == org }.replaceNode {} - } - } - } - } - } -} \ No newline at end of file diff --git a/base/build/antrun.sh b/base/build/antrun.sh deleted file mode 100755 index 5ff1a62b259d6011d228440f2fb89ec0dbecf747..0000000000000000000000000000000000000000 --- a/base/build/antrun.sh +++ /dev/null @@ -1,6 +0,0 @@ -#! /bin/bash - -ME="$0" -MYDIR=${ME%/*} -cd $MYDIR -ant -lib ../../build_resources/lib/ecj.jar "$@" diff --git a/base/build/build.xml b/base/build/build.xml deleted file mode 100644 index 32b7fa303e0ddde10f24f68d8a9a4c9adb59a2ab..0000000000000000000000000000000000000000 --- a/base/build/build.xml +++ /dev/null @@ -1,163 +0,0 @@ -<project name="base" default="dist" basedir=".."> - <target name="clean"> - <delete dir="${dist}" /> - </target> - - <import file="../../build_resources/ant/build-common.xml" /> - - <project-classpath name="ecp" classes="${classes}" /> - <property name="distfolder" value="sis-base" /> - <property name="mainfolder" value="base" /> - <property name="jar.file" value="${dist}/sis-base.jar" /> - <property name="dist.file" value="${dist}/sis-base" /> - <property name="jar.test.file" value="${dist}/sis-base-test.jar" /> - <property name="src.zip.file" value="${dist}/sis-base-src.zip" /> - <property name="javadoc.zip.file" value="${dist}/sis-base-javadoc.zip" /> - <property name="original.dist" value="../${ant.project.name}/dist" /> - <property name="nativesrc" value="libs/native" /> - <property name="nativeroot" value="${targets}/ant" /> - <property name="native" value="${nativeroot}/native" /> - - <property name="dist.common" value="${dist}/${mainfolder}" /> - <property name="dist.common.lib" value="${dist.common}/lib" /> - - - <target name="ci" depends="build-common.ci, check-dependencies, dist" /> - - <target name="jar" depends="compile"> - <mkdir dir="${dist.common.lib}" /> - <build-info revision="revision.number" version="version.number" clean="clean.flag" /> - <echo file="${build.info.file}">${version.number}:${revision.number}:${clean.flag}</echo> - <copy todir="${native}"> - <fileset dir="${nativesrc}"> - <include name="**/libunix.so" /> - <include name="**/libunix.jnilib" /> - </fileset> - </copy> - <copy todir="${native}"> - <fileset dir="${nativesrc}"> - <include name="**/libnativedata.so" /> - <include name="**/libnativedata.jnilib" /> - <include name="**/nativedata.dll" /> - </fileset> - </copy> - <recursive-jar destfile="${jar.file}"> - <fileset dir="${classes}"> - <include name="**/*.class" /> - <include name="${build.info.filename}" /> - </fileset> - <fileset dir="${nativeroot}"> - <include name="native/**/*.so" /> - <include name="native/**/*.jnilib" /> - <include name="native/**/*.dll" /> - </fileset> - <manifest> - <attribute name="Main-Class" - value="ch.systemsx.cisd.base.BuildAndEnvironmentInfo" /> - <attribute name="Version" value="${version.number}" /> - <attribute name="Build-Number" - value="${version.number} (r${revision.number},${clean.flag})" /> - </manifest> - </recursive-jar> - </target> - - <target name="jar-test" depends="compile-tests"> - <mkdir dir="${dist.common.lib}" /> - <build-info revision="revision.number" version="version.number" clean="clean.flag" /> - <echo file="${build.info.file}">${version.number}:${revision.number}:${clean.flag}</echo> - <copy todir="${native}"> - <fileset dir="${nativesrc}"> - <include name="**/libunix.so" /> - <include name="**/libunix.jnilib" /> - </fileset> - </copy> - <copy todir="${native}"> - <fileset dir="${nativesrc}"> - <include name="**/libnativedata.so" /> - <include name="**/libnativedata.jnilib" /> - <include name="**/nativedata.dll" /> - </fileset> - </copy> - <recursive-jar destfile="${jar.test.file}"> - <fileset dir="${classes}"> - <include name="**/*.class" /> - <include name="${build.info.filename}" /> - </fileset> - <fileset dir="${nativeroot}"> - <include name="native/**/*.so" /> - <include name="native/**/*.jnilib" /> - <include name="native/**/*.dll" /> - </fileset> - <zipfileset src="${lib}/testng/testng-jdk15.jar" /> - <zipfileset src="${lib}/commons-lang/commons-lang.jar" /> - <zipfileset src="${lib}/commons-io/commons-io.jar" /> - <manifest> - <attribute name="Main-Class" value="ch.systemsx.cisd.base.AllTests" /> - <attribute name="Version" value="${version.number}" /> - <attribute name="Build-Number" - value="${version.number} (r${revision.number},${clean.flag})" /> - </manifest> - </recursive-jar> - </target> - - <target name="src-zip"> - <build-info revision="revision.number" version="version.number" clean="clean.flag" /> - <mkdir dir="${classes}" /> - <echo file="${build.info.file}">${version.number}:${revision.number}:${clean.flag}</echo> - <jar destfile="${src.zip.file}"> - <fileset dir="${classes}"> - <include name="${build.info.filename}" /> - </fileset> - <fileset dir="${sources}"> - <include name="**/*.java" /> - </fileset> - <fileset dir="${sources.test}"> - <include name="ch/systemsx/cisd/base/tests/**/*.java" /> - </fileset> - <manifest> - <attribute name="Version" value="${version.number}" /> - <attribute name="Build-Number" - value="${version.number} (r${revision.number},${clean.flag})" /> - </manifest> - </jar> - </target> - - <target name="doc"> - <delete dir="targets/doc" /> - <javadoc sourcepath="source/java" - packagenames="ch.systemsx.cisd.base.*" - classpath="../libraries/commons-lang/commons-lang.jar:../libraries/commons-io/commons-io.jar:../libraries/testng/testng-jdk15.jar:../libraries/restrictionchecker/restrictions.jar" - destdir="targets/doc" - access="public" /> - </target> - - <target name="dist" depends="clean, jar, jar-test, src-zip, doc"> - <zip destfile="${javadoc.zip.file}" basedir="${targets}" includes="doc/**" /> - <delete dir="${dist}/${mainfolder}" /> - <delete dir="${dist}/${distfolder}" /> - <move file="${jar.file}" todir="${dist}/${distfolder}/lib" /> - <move file="${jar.test.file}" todir="${dist}/${distfolder}/lib" /> - <move file="${src.zip.file}" todir="${dist}/${distfolder}/src" /> - <move file="${javadoc.zip.file}" todir="${dist}/${distfolder}/doc" /> - <copy todir="${dist}/${distfolder}/doc"> - <fileset dir="doc" includes="**" /> - </copy> - <copy todir="${dist}/${distfolder}"> - <fileset dir="${original.dist}"/> - </copy> - <zip destfile="${dist.file}-${version.number}-r${revision.number}.zip" - basedir="${dist}" - includes="${distfolder}/**" /> - <delete dir="${dist}/${distfolder}" /> - </target> - - <!-- - // Runs the test suite 'tests.xml'. - --> - <target name="run-tests" description="Runs the test suite 'tests.xml'."> - <antcall target="build-common.run-tests"> - <param name="test.suite" value="tests.xml" /> - </antcall> - </target> - -</project> diff --git a/base/dist/COPYING b/base/dist/COPYING deleted file mode 100644 index 0bae4727c89b5e38a5c28bff7ff8550dc945aaf5..0000000000000000000000000000000000000000 --- a/base/dist/COPYING +++ /dev/null @@ -1,15 +0,0 @@ -/* - * Copyright 2009 ETH Zuerich, CISD - * - * 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. - */ diff --git a/base/dist/COPYING_HDF b/base/dist/COPYING_HDF deleted file mode 100644 index 7ca600955f30e130128b9aba1d38e9aa6472e5a2..0000000000000000000000000000000000000000 --- a/base/dist/COPYING_HDF +++ /dev/null @@ -1,88 +0,0 @@ -Copyright Notice and Statement for NCSA Hierarchical Data Format (HDF) -Java Software Library and Utilities - -NCSA Hierarchical Data Format (HDF) Software Library and Utilities -Copyright 1988-2004, the Board of Trustees of the University of Illinois. -Copyright 2007-2009, Center for Information Sciences and Databases, ETH Zurich, Switzerland. -All rights reserved. - -Contributors to the library: National Center for Supercomputing -Applications (NCSA) at the University of Illinois, Lawrence -Livermore Nationall Laboratory (LLNL), Sandia National Laboratories (SNL), -Los Alamos National Laboratory (LANL). Fortner Software, Unidata -Program Center (netCDF), The Independent JPEG Group (JPEG), -Jean-loup Gailly and Mark Adler (gzip), and Digital Equipment -Corporation (DEC). Macintosh support contributed by Gregory L. Guerin. -Center for Information Sciences and Databases, ETH Zurich, Switzerland - -The package 'glguerin': -Copyright 1998, 1999 by Gregory L. Guerin. -Redistribute or reuse only as described below. -These files are from the MacBinary Toolkit for Java: - <http://www.amug.org/~glguerin/sw/#macbinary> -and are redistributed by NCSA with permission of the author. - -This work was supported in part by a Cooperative Agreement with -NASA under NASA grant NAG 5-2040 and NAG NCC5-599. - -Redistribution and use in source and binary forms, with or without -modification, are permitted for any purpose (including commercial purposes) -provided that the following conditions are met: - -1. Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. - -2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or materials provided with the distribution. - -3. In addition, redistributions of modified forms of the source or binary - code must carry prominent notices stating that the original code was - changed and the date of the change. - -4. All publications or advertising materials mentioning features or use of - this software must acknowledge that it was developed by the National - Center for Supercomputing Applications at the University of Illinois, and - credit the Contributors. - -5. Neither the name of the University nor the names of the Contributors may - be used to endorse or promote products derived from this software without - specific prior written permission from the University or the Contributors. - -6. THIS SOFTWARE IS PROVIDED BY THE UNIVERSITY AND THE CONTRIBUTORS "AS IS" - WITH NO WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED. In no event - shall the University or the Contributors be liable for any damages - suffered by the users arising out of the use of this software, even if - advised of the possibility of such damage. - --------------------------------------------------------------------------- -Portions of HDF5 were developed with support from the University of -California, Lawrence Livermore National Laboratory (UC LLNL). -The following statement applies to those portions of the product -and must be retained in any redistribution of source code, binaries, -documentation, and/or accompanying materials: - - This work was partially produced at the University of California, - Lawrence Livermore National Laboratory (UC LLNL) under contract no. - W-7405-ENG-48 (Contract 48) between the U.S. Department of Energy - (DOE) and The Regents of the University of California (University) - for the operation of UC LLNL. - - DISCLAIMER: - This work was prepared as an account of work sponsored by an agency - of the United States Government. Neither the United States - Government nor the University of California nor any of their - employees, makes any warranty, express or implied, or assumes any - liability or responsibility for the accuracy, completeness, or - usefulness of any information, apparatus, product, or process - disclosed, or represents that its use would not infringe privately- - owned rights. Reference herein to any specific commercial products, - process, or service by trade name, trademark, manufacturer, or - otherwise, does not necessarily constitute or imply its endorsement, - recommendation, or favoring by the United States Government or the - University of California. The views and opinions of authors - expressed herein do not necessarily state or reflect those of the - United States Government or the University of California, and shall - not be used for advertising or product endorsement purposes. --------------------------------------------------------------------------- - diff --git a/base/dist/LICENSE b/base/dist/LICENSE deleted file mode 100644 index f820d4bd3a6072ed03f22499937d1e0c62f806ea..0000000000000000000000000000000000000000 --- a/base/dist/LICENSE +++ /dev/null @@ -1,203 +0,0 @@ -/* - * Apache License - * Version 2.0, January 2004 - * http://www.apache.org/licenses/ - * - * TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - * - * 1. Definitions. - * - * "License" shall mean the terms and conditions for use, reproduction, - * and distribution as defined by Sections 1 through 9 of this document. - * - * "Licensor" shall mean the copyright owner or entity authorized by - * the copyright owner that is granting the License. - * - * "Legal Entity" shall mean the union of the acting entity and all - * other entities that control, are controlled by, or are under common - * control with that entity. For the purposes of this definition, - * "control" means (i) the power, direct or indirect, to cause the - * direction or management of such entity, whether by contract or - * otherwise, or (ii) ownership of fifty percent (50%) or more of the - * outstanding shares, or (iii) beneficial ownership of such entity. - * - * "You" (or "Your") shall mean an individual or Legal Entity - * exercising permissions granted by this License. - * - * "Source" form shall mean the preferred form for making modifications, - * including but not limited to software source code, documentation - * source, and configuration files. - * - * "Object" form shall mean any form resulting from mechanical - * transformation or translation of a Source form, including but - * not limited to compiled object code, generated documentation, - * and conversions to other media types. - * - * "Work" shall mean the work of authorship, whether in Source or - * Object form, made available under the License, as indicated by a - * copyright notice that is included in or attached to the work - * (an example is provided in the Appendix below). - * - * "Derivative Works" shall mean any work, whether in Source or Object - * form, that is based on (or derived from) the Work and for which the - * editorial revisions, annotations, elaborations, or other modifications - * represent, as a whole, an original work of authorship. For the purposes - * of this License, Derivative Works shall not include works that remain - * separable from, or merely link (or bind by name) to the interfaces of, - * the Work and Derivative Works thereof. - * - * "Contribution" shall mean any work of authorship, including - * the original version of the Work and any modifications or additions - * to that Work or Derivative Works thereof, that is intentionally - * submitted to Licensor for inclusion in the Work by the copyright owner - * or by an individual or Legal Entity authorized to submit on behalf of - * the copyright owner. For the purposes of this definition, "submitted" - * means any form of electronic, verbal, or written communication sent - * to the Licensor or its representatives, including but not limited to - * communication on electronic mailing lists, source code control systems, - * and issue tracking systems that are managed by, or on behalf of, the - * Licensor for the purpose of discussing and improving the Work, but - * excluding communication that is conspicuously marked or otherwise - * designated in writing by the copyright owner as "Not a Contribution." - * - * "Contributor" shall mean Licensor and any individual or Legal Entity - * on behalf of whom a Contribution has been received by Licensor and - * subsequently incorporated within the Work. - * - * 2. Grant of Copyright License. Subject to the terms and conditions of - * this License, each Contributor hereby grants to You a perpetual, - * worldwide, non-exclusive, no-charge, royalty-free, irrevocable - * copyright license to reproduce, prepare Derivative Works of, - * publicly display, publicly perform, sublicense, and distribute the - * Work and such Derivative Works in Source or Object form. - * - * 3. Grant of Patent License. Subject to the terms and conditions of - * this License, each Contributor hereby grants to You a perpetual, - * worldwide, non-exclusive, no-charge, royalty-free, irrevocable - * (except as stated in this section) patent license to make, have made, - * use, offer to sell, sell, import, and otherwise transfer the Work, - * where such license applies only to those patent claims licensable - * by such Contributor that are necessarily infringed by their - * Contribution(s) alone or by combination of their Contribution(s) - * with the Work to which such Contribution(s) was submitted. If You - * institute patent litigation against any entity (including a - * cross-claim or counterclaim in a lawsuit) alleging that the Work - * or a Contribution incorporated within the Work constitutes direct - * or contributory patent infringement, then any patent licenses - * granted to You under this License for that Work shall terminate - * as of the date such litigation is filed. - * - * 4. Redistribution. You may reproduce and distribute copies of the - * Work or Derivative Works thereof in any medium, with or without - * modifications, and in Source or Object form, provided that You - * meet the following conditions: - * - * (a) You must give any other recipients of the Work or - * Derivative Works a copy of this License; and - * - * (b) You must cause any modified files to carry prominent notices - * stating that You changed the files; and - * - * (c) You must retain, in the Source form of any Derivative Works - * that You distribute, all copyright, patent, trademark, and - * attribution notices from the Source form of the Work, - * excluding those notices that do not pertain to any part of - * the Derivative Works; and - * - * (d) If the Work includes a "NOTICE" text file as part of its - * distribution, then any Derivative Works that You distribute must - * include a readable copy of the attribution notices contained - * within such NOTICE file, excluding those notices that do not - * pertain to any part of the Derivative Works, in at least one - * of the following places: within a NOTICE text file distributed - * as part of the Derivative Works; within the Source form or - * documentation, if provided along with the Derivative Works; or, - * within a display generated by the Derivative Works, if and - * wherever such third-party notices normally appear. The contents - * of the NOTICE file are for informational purposes only and - * do not modify the License. You may add Your own attribution - * notices within Derivative Works that You distribute, alongside - * or as an addendum to the NOTICE text from the Work, provided - * that such additional attribution notices cannot be construed - * as modifying the License. - * - * You may add Your own copyright statement to Your modifications and - * may provide additional or different license terms and conditions - * for use, reproduction, or distribution of Your modifications, or - * for any such Derivative Works as a whole, provided Your use, - * reproduction, and distribution of the Work otherwise complies with - * the conditions stated in this License. - * - * 5. Submission of Contributions. Unless You explicitly state otherwise, - * any Contribution intentionally submitted for inclusion in the Work - * by You to the Licensor shall be under the terms and conditions of - * this License, without any additional terms or conditions. - * Notwithstanding the above, nothing herein shall supersede or modify - * the terms of any separate license agreement you may have executed - * with Licensor regarding such Contributions. - * - * 6. Trademarks. This License does not grant permission to use the trade - * names, trademarks, service marks, or product names of the Licensor, - * except as required for reasonable and customary use in describing the - * origin of the Work and reproducing the content of the NOTICE file. - * - * 7. Disclaimer of Warranty. Unless required by applicable law or - * agreed to in writing, Licensor provides the Work (and each - * Contributor provides its Contributions) on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - * implied, including, without limitation, any warranties or conditions - * of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - * PARTICULAR PURPOSE. You are solely responsible for determining the - * appropriateness of using or redistributing the Work and assume any - * risks associated with Your exercise of permissions under this License. - * - * 8. Limitation of Liability. In no event and under no legal theory, - * whether in tort (including negligence), contract, or otherwise, - * unless required by applicable law (such as deliberate and grossly - * negligent acts) or agreed to in writing, shall any Contributor be - * liable to You for damages, including any direct, indirect, special, - * incidental, or consequential damages of any character arising as a - * result of this License or out of the use or inability to use the - * Work (including but not limited to damages for loss of goodwill, - * work stoppage, computer failure or malfunction, or any and all - * other commercial damages or losses), even if such Contributor - * has been advised of the possibility of such damages. - * - * 9. Accepting Warranty or Additional Liability. While redistributing - * the Work or Derivative Works thereof, You may choose to offer, - * and charge a fee for, acceptance of support, warranty, indemnity, - * or other liability obligations and/or rights consistent with this - * License. However, in accepting such obligations, You may act only - * on Your own behalf and on Your sole responsibility, not on behalf - * of any other Contributor, and only if You agree to indemnify, - * defend, and hold each Contributor harmless for any liability - * incurred by, or claims asserted against, such Contributor by reason - * of your accepting any such warranty or additional liability. - * - * END OF TERMS AND CONDITIONS - * - * APPENDIX: How to apply the Apache License to your work. - * - * To apply the Apache License to your work, attach the following - * boilerplate notice, with the fields enclosed by brackets "[]" - * replaced with your own identifying information. (Don't include - * the brackets!) The text should be enclosed in the appropriate - * comment syntax for the file format. We also recommend that a - * file or class name and description of purpose be included on the - * same "printed page" as the copyright notice for easier - * identification within third-party archives. - * - * Copyright [yyyy] [name of copyright owner] - * - * 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. - */ diff --git a/base/doc/tagged_array_def.txt b/base/doc/tagged_array_def.txt deleted file mode 100644 index 4fe98e2a0e1f3236465cd499d7b68a040fb40bf6..0000000000000000000000000000000000000000 --- a/base/doc/tagged_array_def.txt +++ /dev/null @@ -1,43 +0,0 @@ -Tagged Array Definition: - -All indices and lengths are given in bytes. - -ID: number_type -START INDEX: 0 -LENGTH: 1 -DESCRIPTION: - 'F' : IEEE floating point numbers - 'I' : Integer numbers - -ID: endiness -START INDEX: 1 -LENGTH: 1 -DESCRIPTION: - 'L' : Little Endian - 'B' : Big Endian - -ID: element_size -START INDEX: 2 -LENGTH: 1 -DESCRIPTION: - Size in Bytes (e.g. 4 for a 32bit number, or 8 for a 64bit number) - -ID: rank -START INDEX: 3 -LENGTH: 1 -DESCRIPTION: - Rank of the array (e.g. 2 for a matrix or 3 for a cube) - -ID: dimensions -START INDEX: 4 -LENGTH: 4 * rank -DESCRIPTION: - Dimensions of the array along each axis; each entry is a 32bit (4 byte) integer number in the specified endiness - -ID: data -START INDEX: 4 + 4 * rank -LENGTH: prod(dimensions) -DESCRIPTION: - Number array with prod(dimensions) elements in C row-major order; - each element is a number of the specified number_type, endiness and element_size - \ No newline at end of file diff --git a/base/gradle/wrapper/gradle-wrapper.jar b/base/gradle/wrapper/gradle-wrapper.jar deleted file mode 100644 index a0b6f5dee8d1efdd6f7fa26cc2663035abaec5b4..0000000000000000000000000000000000000000 Binary files a/base/gradle/wrapper/gradle-wrapper.jar and /dev/null differ diff --git a/base/gradle/wrapper/gradle-wrapper.properties b/base/gradle/wrapper/gradle-wrapper.properties deleted file mode 100644 index 5884b6b2efa4cafbfe13521d23b0602bea641da1..0000000000000000000000000000000000000000 --- a/base/gradle/wrapper/gradle-wrapper.properties +++ /dev/null @@ -1,6 +0,0 @@ -#Tue Jun 13 15:27:00 CEST 2017 -distributionBase=GRADLE_USER_HOME -distributionPath=wrapper/dists -zipStoreBase=GRADLE_USER_HOME -zipStorePath=wrapper/dists -distributionUrl=http\://svnsis.ethz.ch/repos/cisd/ivy-repository/trunk/gradle/distribution/3.5/gradle-3.5-all.zip diff --git a/base/libs/native/nativedata/amd64-Linux/libnativedata.so b/base/libs/native/nativedata/amd64-Linux/libnativedata.so deleted file mode 100755 index 9b7f1b9d107365a85551ce5e5612e63234516343..0000000000000000000000000000000000000000 Binary files a/base/libs/native/nativedata/amd64-Linux/libnativedata.so and /dev/null differ diff --git a/base/libs/native/nativedata/amd64-SunOS/libnativedata.so b/base/libs/native/nativedata/amd64-SunOS/libnativedata.so deleted file mode 100755 index 1044cd13902360e29c600fcf118ddc175d7629bb..0000000000000000000000000000000000000000 Binary files a/base/libs/native/nativedata/amd64-SunOS/libnativedata.so and /dev/null differ diff --git a/base/libs/native/nativedata/amd64-Windows/nativedata.dll b/base/libs/native/nativedata/amd64-Windows/nativedata.dll deleted file mode 100755 index 5760aa37e5dc562f0eea908ea771ca212228c002..0000000000000000000000000000000000000000 Binary files a/base/libs/native/nativedata/amd64-Windows/nativedata.dll and /dev/null differ diff --git a/base/libs/native/nativedata/arm-Linux/libnativedata.so b/base/libs/native/nativedata/arm-Linux/libnativedata.so deleted file mode 100755 index 6f85efe3ff18e914f9fe543d4b89ffe0f3d85860..0000000000000000000000000000000000000000 Binary files a/base/libs/native/nativedata/arm-Linux/libnativedata.so and /dev/null differ diff --git a/base/libs/native/nativedata/i386-Linux/libnativedata.so b/base/libs/native/nativedata/i386-Linux/libnativedata.so deleted file mode 100755 index 256132f0306644d853c1682a7d456b28d5e45a2c..0000000000000000000000000000000000000000 Binary files a/base/libs/native/nativedata/i386-Linux/libnativedata.so and /dev/null differ diff --git a/base/libs/native/nativedata/i386-Mac OS X/libnativedata.jnilib b/base/libs/native/nativedata/i386-Mac OS X/libnativedata.jnilib deleted file mode 100755 index 3271106a05e2e525c1196be5d4ac929dbc1a8c2c..0000000000000000000000000000000000000000 Binary files a/base/libs/native/nativedata/i386-Mac OS X/libnativedata.jnilib and /dev/null differ diff --git a/base/libs/native/nativedata/sparc-SunOS/libnativedata.so b/base/libs/native/nativedata/sparc-SunOS/libnativedata.so deleted file mode 100755 index 2a7bb7ff6ddc06502fa332c0d6b55054f058f128..0000000000000000000000000000000000000000 Binary files a/base/libs/native/nativedata/sparc-SunOS/libnativedata.so and /dev/null differ diff --git a/base/libs/native/nativedata/sparcv9-SunOS/libnativedata.so b/base/libs/native/nativedata/sparcv9-SunOS/libnativedata.so deleted file mode 100755 index 397cfdb34d5df9e80eec3dc01659dda25b88dea2..0000000000000000000000000000000000000000 Binary files a/base/libs/native/nativedata/sparcv9-SunOS/libnativedata.so and /dev/null differ diff --git a/base/libs/native/nativedata/x86-SunOS/libnativedata.so b/base/libs/native/nativedata/x86-SunOS/libnativedata.so deleted file mode 100755 index 85a7fa6f4fcb80cf514b7b12f6ff1172ff110df4..0000000000000000000000000000000000000000 Binary files a/base/libs/native/nativedata/x86-SunOS/libnativedata.so and /dev/null differ diff --git a/base/libs/native/nativedata/x86-Windows/nativedata.dll b/base/libs/native/nativedata/x86-Windows/nativedata.dll deleted file mode 100755 index f4cdef827a04e6ffda1c9aad25e7db689e482d31..0000000000000000000000000000000000000000 Binary files a/base/libs/native/nativedata/x86-Windows/nativedata.dll and /dev/null differ diff --git a/base/libs/native/nativedata/x86_64-Mac OS X/libnativedata.jnilib b/base/libs/native/nativedata/x86_64-Mac OS X/libnativedata.jnilib deleted file mode 100755 index 1720db0f9441d2c79054e76dfa8024c74499f286..0000000000000000000000000000000000000000 Binary files a/base/libs/native/nativedata/x86_64-Mac OS X/libnativedata.jnilib and /dev/null differ diff --git a/base/libs/native/unix/amd64-Linux/libunix.so b/base/libs/native/unix/amd64-Linux/libunix.so deleted file mode 100755 index 7c6cce3f9efa5dce78d4cdc6cc88ffc4f21b85ce..0000000000000000000000000000000000000000 Binary files a/base/libs/native/unix/amd64-Linux/libunix.so and /dev/null differ diff --git a/base/libs/native/unix/amd64-SunOS/libunix.so b/base/libs/native/unix/amd64-SunOS/libunix.so deleted file mode 100755 index e4a0e21ccbc62c8dc15397a2eb77b6e6f4bcf638..0000000000000000000000000000000000000000 Binary files a/base/libs/native/unix/amd64-SunOS/libunix.so and /dev/null differ diff --git a/base/libs/native/unix/arm-Linux/libunix.so b/base/libs/native/unix/arm-Linux/libunix.so deleted file mode 100755 index 614fc465f854632f37dbdafa71ed3e514fc6f80f..0000000000000000000000000000000000000000 Binary files a/base/libs/native/unix/arm-Linux/libunix.so and /dev/null differ diff --git a/base/libs/native/unix/i386-Linux/libunix.so b/base/libs/native/unix/i386-Linux/libunix.so deleted file mode 100755 index 2c852cfe6c2dcaa34bf7b86e3af3ecbdf9a4e71e..0000000000000000000000000000000000000000 Binary files a/base/libs/native/unix/i386-Linux/libunix.so and /dev/null differ diff --git a/base/libs/native/unix/i386-Mac OS X/libunix.jnilib b/base/libs/native/unix/i386-Mac OS X/libunix.jnilib deleted file mode 100755 index d57021ba5f77eccff3f5b01ba3c6cae7992954df..0000000000000000000000000000000000000000 Binary files a/base/libs/native/unix/i386-Mac OS X/libunix.jnilib and /dev/null differ diff --git a/base/libs/native/unix/sparc-SunOS/libunix.so b/base/libs/native/unix/sparc-SunOS/libunix.so deleted file mode 100755 index 6ec3d73a94ba09b3708c615da35d24976c73c809..0000000000000000000000000000000000000000 Binary files a/base/libs/native/unix/sparc-SunOS/libunix.so and /dev/null differ diff --git a/base/libs/native/unix/sparcv9-SunOS/libunix.so b/base/libs/native/unix/sparcv9-SunOS/libunix.so deleted file mode 100755 index 491a63d2316766d1b0674f8b9971dfa6f4ee7eb5..0000000000000000000000000000000000000000 Binary files a/base/libs/native/unix/sparcv9-SunOS/libunix.so and /dev/null differ diff --git a/base/libs/native/unix/x86-SunOS/libunix.so b/base/libs/native/unix/x86-SunOS/libunix.so deleted file mode 100755 index 787c37a62544eb8465b9fd5bea8ec4ff60979e81..0000000000000000000000000000000000000000 Binary files a/base/libs/native/unix/x86-SunOS/libunix.so and /dev/null differ diff --git a/base/libs/native/unix/x86_64-Mac OS X/libunix.jnilib b/base/libs/native/unix/x86_64-Mac OS X/libunix.jnilib deleted file mode 100755 index bfaa2057c2769c7a8f9facd9b02130d9e761e4a6..0000000000000000000000000000000000000000 Binary files a/base/libs/native/unix/x86_64-Mac OS X/libunix.jnilib and /dev/null differ diff --git a/base/resource/dependency-structure.ddf b/base/resource/dependency-structure.ddf deleted file mode 100644 index b463616bf426ecbb987f282ab6b0f3d5f95fc1fe..0000000000000000000000000000000000000000 --- a/base/resource/dependency-structure.ddf +++ /dev/null @@ -1,6 +0,0 @@ -{package} = ch.systemsx.cisd.base - -layer exceptions = ${package}.exceptions -layer rest = ${package}.mdarray ${package}.namedthread ${package}.unix ${package}.utilities - -check layeringOf exceptions rest \ No newline at end of file diff --git a/base/settings.gradle b/base/settings.gradle deleted file mode 100644 index 8062ac25691000178f94b7d9fc1091ef3700f632..0000000000000000000000000000000000000000 --- a/base/settings.gradle +++ /dev/null @@ -1 +0,0 @@ -// Don't delete it eventough it is empty! diff --git a/base/source/c/COPYING b/base/source/c/COPYING deleted file mode 100644 index 7ca600955f30e130128b9aba1d38e9aa6472e5a2..0000000000000000000000000000000000000000 --- a/base/source/c/COPYING +++ /dev/null @@ -1,88 +0,0 @@ -Copyright Notice and Statement for NCSA Hierarchical Data Format (HDF) -Java Software Library and Utilities - -NCSA Hierarchical Data Format (HDF) Software Library and Utilities -Copyright 1988-2004, the Board of Trustees of the University of Illinois. -Copyright 2007-2009, Center for Information Sciences and Databases, ETH Zurich, Switzerland. -All rights reserved. - -Contributors to the library: National Center for Supercomputing -Applications (NCSA) at the University of Illinois, Lawrence -Livermore Nationall Laboratory (LLNL), Sandia National Laboratories (SNL), -Los Alamos National Laboratory (LANL). Fortner Software, Unidata -Program Center (netCDF), The Independent JPEG Group (JPEG), -Jean-loup Gailly and Mark Adler (gzip), and Digital Equipment -Corporation (DEC). Macintosh support contributed by Gregory L. Guerin. -Center for Information Sciences and Databases, ETH Zurich, Switzerland - -The package 'glguerin': -Copyright 1998, 1999 by Gregory L. Guerin. -Redistribute or reuse only as described below. -These files are from the MacBinary Toolkit for Java: - <http://www.amug.org/~glguerin/sw/#macbinary> -and are redistributed by NCSA with permission of the author. - -This work was supported in part by a Cooperative Agreement with -NASA under NASA grant NAG 5-2040 and NAG NCC5-599. - -Redistribution and use in source and binary forms, with or without -modification, are permitted for any purpose (including commercial purposes) -provided that the following conditions are met: - -1. Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. - -2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or materials provided with the distribution. - -3. In addition, redistributions of modified forms of the source or binary - code must carry prominent notices stating that the original code was - changed and the date of the change. - -4. All publications or advertising materials mentioning features or use of - this software must acknowledge that it was developed by the National - Center for Supercomputing Applications at the University of Illinois, and - credit the Contributors. - -5. Neither the name of the University nor the names of the Contributors may - be used to endorse or promote products derived from this software without - specific prior written permission from the University or the Contributors. - -6. THIS SOFTWARE IS PROVIDED BY THE UNIVERSITY AND THE CONTRIBUTORS "AS IS" - WITH NO WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED. In no event - shall the University or the Contributors be liable for any damages - suffered by the users arising out of the use of this software, even if - advised of the possibility of such damage. - --------------------------------------------------------------------------- -Portions of HDF5 were developed with support from the University of -California, Lawrence Livermore National Laboratory (UC LLNL). -The following statement applies to those portions of the product -and must be retained in any redistribution of source code, binaries, -documentation, and/or accompanying materials: - - This work was partially produced at the University of California, - Lawrence Livermore National Laboratory (UC LLNL) under contract no. - W-7405-ENG-48 (Contract 48) between the U.S. Department of Energy - (DOE) and The Regents of the University of California (University) - for the operation of UC LLNL. - - DISCLAIMER: - This work was prepared as an account of work sponsored by an agency - of the United States Government. Neither the United States - Government nor the University of California nor any of their - employees, makes any warranty, express or implied, or assumes any - liability or responsibility for the accuracy, completeness, or - usefulness of any information, apparatus, product, or process - disclosed, or represents that its use would not infringe privately- - owned rights. Reference herein to any specific commercial products, - process, or service by trade name, trademark, manufacturer, or - otherwise, does not necessarily constitute or imply its endorsement, - recommendation, or favoring by the United States Government or the - University of California. The views and opinions of authors - expressed herein do not necessarily state or reflect those of the - United States Government or the University of California, and shall - not be used for advertising or product endorsement purposes. --------------------------------------------------------------------------- - diff --git a/base/source/c/compile_linux_amd64.sh b/base/source/c/compile_linux_amd64.sh deleted file mode 100755 index 038f83a94355d54bd5b58005f6d361e77520cf18..0000000000000000000000000000000000000000 --- a/base/source/c/compile_linux_amd64.sh +++ /dev/null @@ -1,6 +0,0 @@ -#! /bin/bash - -gcc -shared -O3 -fPIC unix.c -I/usr/java/jdk1.6.0/include -I/usr/java/jdk1.6.0/include/linux -o libunix.so - -# MACHINE_BYTE_ORDER=1 corresponds to 'little endian' -gcc -shared -O3 -fPIC -DMACHINE_BYTE_ORDER=1 copy*.c -I/usr/java/jdk1.6.0/include -I/usr/java/jdk1.6.0/include/linux -o libnativedata.so diff --git a/base/source/c/compile_linux_arm.sh b/base/source/c/compile_linux_arm.sh deleted file mode 100755 index 2b57024ba736efbd4379cc7cb0ad576896ea2415..0000000000000000000000000000000000000000 --- a/base/source/c/compile_linux_arm.sh +++ /dev/null @@ -1,6 +0,0 @@ -#! /bin/bash - -gcc -shared -O3 -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -I/usr/java/jdk1.7.0/include -I/usr/java/jdk1.7.0/include/linux unix.c -o libunix.so - -# MACHINE_BYTE_ORDER=1 corresponds to 'little endian' -gcc -shared -O3 -fPIC -DMACHINE_BYTE_ORDER=1 copy*.c -I/usr/java/jdk1.7.0/include -I/usr/java/jdk1.7.0/include/linux -o libnativedata.so diff --git a/base/source/c/compile_linux_i386.sh b/base/source/c/compile_linux_i386.sh deleted file mode 100755 index e9cb84047aded7fb2caa021726b94df71e6d7571..0000000000000000000000000000000000000000 --- a/base/source/c/compile_linux_i386.sh +++ /dev/null @@ -1,6 +0,0 @@ -#! /bin/bash - -gcc -m32 -shared -O3 -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -I/usr/java/jdk1.6.0/include -I/usr/java/jdk1.6.0/include/linux unix.c -o libunix.so - -# MACHINE_BYTE_ORDER=1 corresponds to 'little endian' -gcc -m32 -shared -O3 -fPIC -DMACHINE_BYTE_ORDER=1 copy*.c -I/usr/java/jdk1.6.0/include -I/usr/java/jdk1.6.0/include/linux -o libnativedata.so diff --git a/base/source/c/compile_macosx_i386.sh b/base/source/c/compile_macosx_i386.sh deleted file mode 100755 index e8f53457bddf98aafddb451d27a80b0ed6992eb9..0000000000000000000000000000000000000000 --- a/base/source/c/compile_macosx_i386.sh +++ /dev/null @@ -1,6 +0,0 @@ -#! /bin/bash - -gcc -m32 -mmacosx-version-min=10.6 -bundle -O3 unix.c -I/System/Library/Frameworks/JavaVM.framework/Versions/Current/Headers -o libunix.jnilib - -# MACHINE_BYTE_ORDER=1 corresponds to 'little endian' -gcc -m32 -mmacosx-version-min=10.6 -bundle -O3 -DMACHINE_BYTE_ORDER=1 copy*.c -I/System/Library/Frameworks/JavaVM.framework/Versions/Current/Headers -o libnativedata.jnilib diff --git a/base/source/c/compile_macosx_x86_64.sh b/base/source/c/compile_macosx_x86_64.sh deleted file mode 100755 index ec2d73640f9ccd5d0f48da7de977086722c2d9a3..0000000000000000000000000000000000000000 --- a/base/source/c/compile_macosx_x86_64.sh +++ /dev/null @@ -1,6 +0,0 @@ -#! /bin/bash - -gcc -m64 -mmacosx-version-min=10.6 -dynamiclib -D_DARWIN_USE_64_BIT_INODE -O3 unix.c -I/System/Library/Frameworks/JavaVM.framework/Versions/Current/Headers -o libunix.jnilib - -# MACHINE_BYTE_ORDER=1 corresponds to 'little endian' -gcc -m64 -mmacosx-version-min=10.6 -dynamiclib -O3 -DMACHINE_BYTE_ORDER=1 copy*.c -I/System/Library/Frameworks/JavaVM.framework/Versions/Current/Headers -o libnativedata.jnilib diff --git a/base/source/c/compile_solaris_amd64.sh b/base/source/c/compile_solaris_amd64.sh deleted file mode 100755 index 16c3ac9bfaef12f0191fe77c2cab905c71b64710..0000000000000000000000000000000000000000 --- a/base/source/c/compile_solaris_amd64.sh +++ /dev/null @@ -1,6 +0,0 @@ -#! /bin/bash - -cc -G -KPIC -fast -m64 -I/usr/java/include -I/usr/java/include/solaris unix.c -o libunix.so - -# MACHINE_BYTE_ORDER=1 corresponds to 'little endian' -cc -G -KPIC -fast -m64 -DMACHINE_BYTE_ORDER=1 copy*.c -I/usr/java/include -I/usr/java/include/solaris -o libnativedata.so diff --git a/base/source/c/compile_solaris_sparc.sh b/base/source/c/compile_solaris_sparc.sh deleted file mode 100755 index 99e2dd295b18dd968aeea123fd01a71a10f82705..0000000000000000000000000000000000000000 --- a/base/source/c/compile_solaris_sparc.sh +++ /dev/null @@ -1,6 +0,0 @@ -#! /bin/bash - -cc -G -KPIC -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -I/usr/java/include -I/usr/java/include/solaris unix.c -o libunix.so - -# MACHINE_BYTE_ORDER=2 corresponds to 'big endian' -cc -G -KPIC -DMACHINE_BYTE_ORDER=2 copy*.c -I/usr/java/include -I/usr/java/include/solaris -o libnativedata.so diff --git a/base/source/c/compile_solaris_sparcv9.sh b/base/source/c/compile_solaris_sparcv9.sh deleted file mode 100755 index 37852b48b737b56900821ff21afb0109076f4cb8..0000000000000000000000000000000000000000 --- a/base/source/c/compile_solaris_sparcv9.sh +++ /dev/null @@ -1,6 +0,0 @@ -#! /bin/bash - -cc -G -KPIC -fast -m64 -I/usr/java/include -I/usr/java/include/solaris unix.c -o libunix.so - -# MACHINE_BYTE_ORDER=2 corresponds to 'big endian' -cc -G -KPIC -fast -m64 -DMACHINE_BYTE_ORDER=2 copy*.c -I/usr/java/include -I/usr/java/include/solaris -o libnativedata.so diff --git a/base/source/c/compile_solaris_x86.sh b/base/source/c/compile_solaris_x86.sh deleted file mode 100755 index 588e192f6b6ac6fbe8754e164420d36aa795c47a..0000000000000000000000000000000000000000 --- a/base/source/c/compile_solaris_x86.sh +++ /dev/null @@ -1,6 +0,0 @@ -#! /bin/bash - -cc -G -KPIC -fast -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -I/usr/java/include -I/usr/java/include/solaris unix.c -o libunix.so - -# MACHINE_BYTE_ORDER=1 corresponds to 'little endian' -cc -G -KPIC -fast -DMACHINE_BYTE_ORDER=1 copy*.c -I/usr/java/include -I/usr/java/include/solaris -o libnativedata.so diff --git a/base/source/c/compile_windows_i386.mak b/base/source/c/compile_windows_i386.mak deleted file mode 100644 index 8ebb900566b84eae08116fc446f920388b9a90a8..0000000000000000000000000000000000000000 --- a/base/source/c/compile_windows_i386.mak +++ /dev/null @@ -1,181 +0,0 @@ -#============================================================================ -# -# Makefile to compile the 'nativedata' native library -# Usage: nmake /f compile_windows_i386.mak -# -#============================================================================ - -# Visual C++ directory, for example -VCPPDIR=C:\Program Files\Microsoft Visual Studio 9.0\VC - -# Directory where JDK is installed (We require JDK 1.6) -JAVADIR=C:\Program Files\Java\jdk1.6.0_37 - -# Common parent directory -PARENTDIR=C:\nativeData - -# Directory of the HDF Java Products, for example -SRCDIR=$(PARENTDIR)\c\ - -#=========================================================================== -# Do not make any change below this line unless you know what you do -#=========================================================================== -PATH=$(PATH);$(VCPPDIR)\BIN -SRCDIR=$(SRCDIR) - -VALID_PATH_SET=YES -#------------------------------------------------------- -# Test if all path is valid - -!IF EXISTS("$(VCPPDIR)") -!ELSE -!MESSAGE ERROR: Visual C++ directory $(VCPPDIR) does not exist -VALID_PATH_SET=NO -!ENDIF - -!IF EXISTS("$(JAVADIR)") -!ELSE -!MESSAGE ERROR: JDK directory $(JAVADIR) does not exist -VALID_PATH_SET=NO -!ENDIF - -!IF EXISTS("$(SRCDIR)") -!ELSE -!MESSAGE ERROR: C source directory $(SRCDIR) does not exist -VALID_PATH_SET=NO -!ENDIF - -#------------------------------------------------------- - - -!IF "$(VALID_PATH_SET)" == "YES" - -!IF "$(OS)" == "Windows_NT" -NULL= -!ELSE -NULL=nul -!ENDIF - -INTDIR=.\nativedata\Release -OUTDIR=$(SRCDIR)\lib\win - -INCLUDES = \ - "$(JAVADIR)\include\jni.h" \ - "$(JAVADIR)\include\win32\jni_md.h" - - -ALL : "$(OUTDIR)\nativedata.dll" - -"$(INTDIR)" : - if not exist "$(INTDIR)/$(NULL)" mkdir "$(INTDIR)" - -"$(OUTDIR)" : - if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)" - -CPP=cl.exe -CPP_PROJ=/nologo /W3 /EHsc /O2 /I "$(JAVADIR)\include" /I "$(JAVADIR)\include\win32" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "MACHINE_BYTE_ORDER=1" /Fp"$(INTDIR)\nativedata.pch" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /c - -.c{$(INTDIR)}.obj:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -.cpp{$(INTDIR)}.obj:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -.cxx{$(INTDIR)}.obj:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -.c{$(INTDIR)}.sbr:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -.cpp{$(INTDIR)}.sbr:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -.cxx{$(INTDIR)}.sbr:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -MTL=midl.exe -MTL_PROJ=/nologo /D "NDEBUG" /mktyplib203 /win32 -RSC=rc.exe -BSC32=bscmake.exe -BSC32_FLAGS=/nologo /o"$(INTDIR)\nativedata.bsc" -BSC32_SBRS= \ - -LINK=link.exe -LINK_FLAGS=/nologo /dll /nodefaultlib:msvcrt /incremental:no /pdb:"$(INTDIR)\nativedata.pdb" /machine:I386 /out:"$(OUTDIR)\nativedata.dll" /implib:"$(INTDIR)\nativedata.lib" -LINK_OBJS= \ - "$(INTDIR)\copyCommon.obj" \ - "$(INTDIR)\copyByteDouble.obj" \ - "$(INTDIR)\copyByteFloat.obj" \ - "$(INTDIR)\copyByteInt.obj" \ - "$(INTDIR)\copyByteLong.obj" \ - "$(INTDIR)\copyByteShort.obj" \ - "$(INTDIR)\copyByteChar.obj" - -"$(OUTDIR)\nativedata.dll" : "$(OUTDIR)" $(DEF_FILE) $(LINK_OBJS) - $(LINK) @<< - $(LINK_FLAGS) $(LINK_OBJS) -<< - - -SOURCE=$(SRCDIR)\copyCommon.c - -"$(INTDIR)\copyCommon.obj" : $(SOURCE) $(INCLUDES) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE=$(SRCDIR)\copyByteDouble.c - -"$(INTDIR)\copyByteDouble.obj" : $(SOURCE) $(INCLUDES) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - -SOURCE=$(SRCDIR)\copyByteFloat.c - -"$(INTDIR)\copyByteFloat.obj" : $(SOURCE) $(INCLUDES) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - -SOURCE=$(SRCDIR)\copyByteInt.c - -"$(INTDIR)\copyByteInt.obj" : $(SOURCE) $(INCLUDES) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - -SOURCE=$(SRCDIR)\copyByteLong.c - -"$(INTDIR)\copyByteLong.obj" : $(SOURCE) $(INCLUDES) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - -SOURCE=$(SRCDIR)\copyByteShort.c - -"$(INTDIR)\copyByteShort.obj" : $(SOURCE) $(INCLUDES) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - -SOURCE=$(SRCDIR)\copyByteChar.c - -"$(INTDIR)\copyByteChar.obj" : $(SOURCE) $(INCLUDES) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - -CLEAN : - -@erase "$(INTDIR)\copyCommon.obj" - -@erase "$(INTDIR)\copyByteDouble.obj" - -@erase "$(INTDIR)\copyByteFloat.obj" - -@erase "$(INTDIR)\copyByteInt.obj" - -@erase "$(INTDIR)\copyByteLong.obj" - -@erase "$(INTDIR)\copyByteShort.obj" - -@erase "$(INTDIR)\copyByteChar.obj" - -@erase "$(INTDIR)\vc90.idb" - -@erase "$(INTDIR)\nativedata.exp" - -@erase "$(INTDIR)\nativedata.lib" - -@erase "$(OUTDIR)\nativedata.dll" - -!ENDIF diff --git a/base/source/c/compile_windows_x64.mak b/base/source/c/compile_windows_x64.mak deleted file mode 100644 index 52f71d7f8911fb9d152beec7b3293aff030270d0..0000000000000000000000000000000000000000 --- a/base/source/c/compile_windows_x64.mak +++ /dev/null @@ -1,182 +0,0 @@ -#============================================================================ -# -# Makefile to compile the 'nativedata' native library -# Usage: nmake /f compile_windows_i386.mak -# -#============================================================================ - -# Visual C++ directory, for example -VCPPDIR=C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC - -# Directory where JDK is installed (We require JDK 1.6) -JAVADIR=C:\Program Files\Java\jdk1.6.0_37 - -# Common parent directory -PARENTDIR=C:\nativeData - -# Directory of the HDF Java Products, for example -SRCDIR=$(PARENTDIR)\c\ - -#=========================================================================== -# Do not make any change below this line unless you know what you do -#=========================================================================== -PATH=$(PATH);$(VCPPDIR)\BIN -SRCDIR=$(SRCDIR) - -VALID_PATH_SET=YES -#------------------------------------------------------- -# Test if all path is valid - -!IF EXISTS("$(VCPPDIR)") -!ELSE -!MESSAGE ERROR: Visual C++ directory $(VCPPDIR) does not exist -VALID_PATH_SET=NO -!ENDIF - -!IF EXISTS("$(JAVADIR)") -!ELSE -!MESSAGE ERROR: JDK directory $(JAVADIR) does not exist -VALID_PATH_SET=NO -!ENDIF - -!IF EXISTS("$(SRCDIR)") -!ELSE -!MESSAGE ERROR: C source directory $(SRCDIR) does not exist -VALID_PATH_SET=NO -!ENDIF - -#------------------------------------------------------- - - -!IF "$(VALID_PATH_SET)" == "YES" - -!IF "$(OS)" == "Windows_NT" -NULL= -!ELSE -NULL=nul -!ENDIF - -INTDIR=.\nativedata\Release -OUTDIR=$(SRCDIR)\lib\win - -INCLUDES = \ - "$(JAVADIR)\include\jni.h" \ - "$(JAVADIR)\include\win32\jni_md.h" - - -ALL : "$(OUTDIR)\nativedata.dll" - -"$(INTDIR)" : - if not exist "$(INTDIR)/$(NULL)" mkdir "$(INTDIR)" - -"$(OUTDIR)" : - if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)" - -CPP=cl.exe -CPP_PROJ=/nologo /W3 /EHsc /O2 /I "$(JAVADIR)\include" /I "$(JAVADIR)\include\win32" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "MACHINE_BYTE_ORDER=1" /Fp"$(INTDIR)\nativedata.pch" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /c - -.c{$(INTDIR)}.obj:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -.cpp{$(INTDIR)}.obj:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -.cxx{$(INTDIR)}.obj:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -.c{$(INTDIR)}.sbr:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -.cpp{$(INTDIR)}.sbr:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -.cxx{$(INTDIR)}.sbr:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -MTL=midl.exe -MTL_PROJ=/nologo /D "NDEBUG" /mktyplib203 /win32 -RSC=rc.exe -BSC32=bscmake.exe -BSC32_FLAGS=/nologo /o"$(INTDIR)\nativedata.bsc" -BSC32_SBRS= \ - -LINK=link.exe -LINK_FLAGS=/nologo /dll /nodefaultlib:msvcrt /incremental:no /pdb:"$(INTDIR)\nativedata.pdb" /machine:x64 /out:"$(OUTDIR)\nativedata.dll" /implib:"$(INTDIR)\nativedata.lib" -LINK_OBJS= \ - "$(INTDIR)\copyCommon.obj" \ - "$(INTDIR)\copyByteDouble.obj" \ - "$(INTDIR)\copyByteFloat.obj" \ - "$(INTDIR)\copyByteInt.obj" \ - "$(INTDIR)\copyByteLong.obj" \ - "$(INTDIR)\copyByteShort.obj" \ - "$(INTDIR)\copyByteChar.obj" - - -"$(OUTDIR)\nativedata.dll" : "$(OUTDIR)" $(DEF_FILE) $(LINK_OBJS) - $(LINK) @<< - $(LINK_FLAGS) $(LINK_OBJS) -<< - - -SOURCE=$(SRCDIR)\copyCommon.c - -"$(INTDIR)\copyCommon.obj" : $(SOURCE) $(INCLUDES) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE=$(SRCDIR)\copyByteDouble.c - -"$(INTDIR)\copyByteDouble.obj" : $(SOURCE) $(INCLUDES) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - -SOURCE=$(SRCDIR)\copyByteFloat.c - -"$(INTDIR)\copyByteFloat.obj" : $(SOURCE) $(INCLUDES) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - -SOURCE=$(SRCDIR)\copyByteInt.c - -"$(INTDIR)\copyByteInt.obj" : $(SOURCE) $(INCLUDES) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - -SOURCE=$(SRCDIR)\copyByteLong.c - -"$(INTDIR)\copyByteLong.obj" : $(SOURCE) $(INCLUDES) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - -SOURCE=$(SRCDIR)\copyByteShort.c - -"$(INTDIR)\copyByteShort.obj" : $(SOURCE) $(INCLUDES) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - -SOURCE=$(SRCDIR)\copyByteChar.c - -"$(INTDIR)\copyByteChar.obj" : $(SOURCE) $(INCLUDES) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - -CLEAN : - -@erase "$(INTDIR)\copyCommon.obj" - -@erase "$(INTDIR)\copyByteDouble.obj" - -@erase "$(INTDIR)\copyByteFloat.obj" - -@erase "$(INTDIR)\copyByteInt.obj" - -@erase "$(INTDIR)\copyByteLong.obj" - -@erase "$(INTDIR)\copyByteShort.obj" - -@erase "$(INTDIR)\copyByteChar.obj" - -@erase "$(INTDIR)\vc90.idb" - -@erase "$(INTDIR)\nativedata.exp" - -@erase "$(INTDIR)\nativedata.lib" - -@erase "$(OUTDIR)\nativedata.dll" - -!ENDIF diff --git a/base/source/c/copyByteChar.c b/base/source/c/copyByteChar.c deleted file mode 100644 index 02b8a17990a62c0db983dd0e327f2d1e6b822d65..0000000000000000000000000000000000000000 --- a/base/source/c/copyByteChar.c +++ /dev/null @@ -1,42 +0,0 @@ -/**************************************************************************** - * NCSA HDF * - * National Computational Science Alliance * - * University of Illinois at Urbana-Champaign * - * 605 E. Springfield, Champaign IL 61820 * - * * - * Center for Information Sciences and Databases, ETH Zurich, Switzerland * - * * - * For conditions of distribution and use, see the accompanying * - * COPYING file. * - * * - ****************************************************************************/ - -/* - * This module contains the implementation of all the native methods - * used for number conversion. This is represented by the Java - * class HDFNativeData. - * - * These routines convert one dimensional arrays of bytes into - * one-D arrays of other types (int, float, etc) and vice versa. - * - * These routines are called from the Java parts of the Java-C - * interface. - * - * ***Important notes: - * - * 1. These routines are designed to be portable--they use the - * C compiler to do the required native data manipulation. - * 2. These routines copy the data at least once -- a serious - * but unavoidable performance hit. - */ - -#define TARGET jchar -#define TARGET_ARRAY jcharArray -#define METHODNAMETB "copyCharToByte" -#define FUNCTIONNAMETB Java_ch_systemsx_cisd_base_convert_NativeData_copyCharToByte___3CI_3BIII -#define METHODNAMEBT "copyByteToChar" -#define FUNCTIONNAMEBT Java_ch_systemsx_cisd_base_convert_NativeData_copyByteToChar___3BI_3CIII -#define COPY_FUNC GetCharArrayRegion -#define CHANGE_BYTE_ORDER CHANGE_BYTE_ORDER_2 - -#include "copyByteTarget.ctempl" diff --git a/base/source/c/copyByteDouble.c b/base/source/c/copyByteDouble.c deleted file mode 100644 index 734d7399ba704fb3d343b1c6d07c45fc8d80fbe3..0000000000000000000000000000000000000000 --- a/base/source/c/copyByteDouble.c +++ /dev/null @@ -1,42 +0,0 @@ -/**************************************************************************** - * NCSA HDF * - * National Computational Science Alliance * - * University of Illinois at Urbana-Champaign * - * 605 E. Springfield, Champaign IL 61820 * - * * - * Center for Information Sciences and Databases, ETH Zurich, Switzerland * - * * - * For conditions of distribution and use, see the accompanying * - * COPYING file. * - * * - ****************************************************************************/ - -/* - * This module contains the implementation of all the native methods - * used for number conversion. This is represented by the Java - * class HDFNativeData. - * - * These routines convert one dimensional arrays of bytes into - * one-D arrays of other types (int, double, etc) and vice versa. - * - * These routines are called from the Java parts of the Java-C - * interface. - * - * ***Important notes: - * - * 1. These routines are designed to be portable--they use the - * C compiler to do the required native data manipulation. - * 2. These routines copy the data at least once -- a serious - * but unavoidable performance hit. - */ - -#define TARGET jdouble -#define TARGET_ARRAY jdoubleArray -#define METHODNAMETB "copyDoubleToByte" -#define FUNCTIONNAMETB Java_ch_systemsx_cisd_base_convert_NativeData_copyDoubleToByte___3DI_3BIII -#define METHODNAMEBT "copyByteToDouble" -#define FUNCTIONNAMEBT Java_ch_systemsx_cisd_base_convert_NativeData_copyByteToDouble___3BI_3DIII -#define COPY_FUNC GetDoubleArrayRegion -#define CHANGE_BYTE_ORDER CHANGE_BYTE_ORDER_8 - -#include "copyByteTarget.ctempl" diff --git a/base/source/c/copyByteFloat.c b/base/source/c/copyByteFloat.c deleted file mode 100644 index 797a818a67bd8f361e40205eaf0c36681ae78d64..0000000000000000000000000000000000000000 --- a/base/source/c/copyByteFloat.c +++ /dev/null @@ -1,42 +0,0 @@ -/**************************************************************************** - * NCSA HDF * - * National Computational Science Alliance * - * University of Illinois at Urbana-Champaign * - * 605 E. Springfield, Champaign IL 61820 * - * * - * Center for Information Sciences and Databases, ETH Zurich, Switzerland * - * * - * For conditions of distribution and use, see the accompanying * - * COPYING file. * - * * - ****************************************************************************/ - -/* - * This module contains the implementation of all the native methods - * used for number conversion. This is represented by the Java - * class HDFNativeData. - * - * These routines convert one dimensional arrays of bytes into - * one-D arrays of other types (int, float, etc) and vice versa. - * - * These routines are called from the Java parts of the Java-C - * interface. - * - * ***Important notes: - * - * 1. These routines are designed to be portable--they use the - * C compiler to do the required native data manipulation. - * 2. These routines copy the data at least once -- a serious - * but unavoidable performance hit. - */ - -#define TARGET jfloat -#define TARGET_ARRAY jfloatArray -#define METHODNAMETB "copyFloatToByte" -#define FUNCTIONNAMETB Java_ch_systemsx_cisd_base_convert_NativeData_copyFloatToByte___3FI_3BIII -#define METHODNAMEBT "copyByteToFloat" -#define FUNCTIONNAMEBT Java_ch_systemsx_cisd_base_convert_NativeData_copyByteToFloat___3BI_3FIII -#define COPY_FUNC GetFloatArrayRegion -#define CHANGE_BYTE_ORDER CHANGE_BYTE_ORDER_4 - -#include "copyByteTarget.ctempl" diff --git a/base/source/c/copyByteInt.c b/base/source/c/copyByteInt.c deleted file mode 100644 index 422754671c60f927c1bdc34decd0c1d2fe1978a4..0000000000000000000000000000000000000000 --- a/base/source/c/copyByteInt.c +++ /dev/null @@ -1,42 +0,0 @@ -/**************************************************************************** - * NCSA HDF * - * National Computational Science Alliance * - * University of Illinois at Urbana-Champaign * - * 605 E. Springfield, Champaign IL 61820 * - * * - * Center for Information Sciences and Databases, ETH Zurich, Switzerland * - * * - * For conditions of distribution and use, see the accompanying * - * COPYING file. * - * * - ****************************************************************************/ - -/* - * This module contains the implementation of all the native methods - * used for number conversion. This is represented by the Java - * class HDFNativeData. - * - * These routines convert one dimensional arrays of bytes into - * one-D arrays of other types (int, float, etc) and vice versa. - * - * These routines are called from the Java parts of the Java-C - * interface. - * - * ***Important notes: - * - * 1. These routines are designed to be portable--they use the - * C compiler to do the required native data manipulation. - * 2. These routines copy the data at least once -- a serious - * but unavoidable performance hit. - */ - -#define TARGET jint -#define TARGET_ARRAY jintArray -#define METHODNAMETB "copyIntToByte" -#define FUNCTIONNAMETB Java_ch_systemsx_cisd_base_convert_NativeData_copyIntToByte___3II_3BIII -#define METHODNAMEBT "copyByteToInt" -#define FUNCTIONNAMEBT Java_ch_systemsx_cisd_base_convert_NativeData_copyByteToInt___3BI_3IIII -#define COPY_FUNC GetIntArrayRegion -#define CHANGE_BYTE_ORDER CHANGE_BYTE_ORDER_4 - -#include "copyByteTarget.ctempl" diff --git a/base/source/c/copyByteLong.c b/base/source/c/copyByteLong.c deleted file mode 100644 index c28352f2e6d2692d32f2d9d60d8695c97b72614d..0000000000000000000000000000000000000000 --- a/base/source/c/copyByteLong.c +++ /dev/null @@ -1,42 +0,0 @@ -/**************************************************************************** - * NCSA HDF * - * National Computational Science Alliance * - * University of Illinois at Urbana-Champaign * - * 605 E. Springfield, Champaign IL 61820 * - * * - * Center for Information Sciences and Databases, ETH Zurich, Switzerland * - * * - * For conditions of distribution and use, see the accompanying * - * COPYING file. * - * * - ****************************************************************************/ - -/* - * This module contains the implementation of all the native methods - * used for number conversion. This is represented by the Java - * class HDFNativeData. - * - * These routines convert one dimensional arrays of bytes into - * one-D arrays of other types (int, float, etc) and vice versa. - * - * These routines are called from the Java parts of the Java-C - * interface. - * - * ***Important notes: - * - * 1. These routines are designed to be portable--they use the - * C compiler to do the required native data manipulation. - * 2. These routines copy the data at least once -- a serious - * but unavoidable performance hit. - */ - -#define TARGET jlong -#define TARGET_ARRAY jlongArray -#define METHODNAMETB "copyLongToByte" -#define FUNCTIONNAMETB Java_ch_systemsx_cisd_base_convert_NativeData_copyLongToByte___3JI_3BIII -#define METHODNAMEBT "copyByteToLong" -#define FUNCTIONNAMEBT Java_ch_systemsx_cisd_base_convert_NativeData_copyByteToLong___3BI_3JIII -#define COPY_FUNC GetLongArrayRegion -#define CHANGE_BYTE_ORDER CHANGE_BYTE_ORDER_8 - -#include "copyByteTarget.ctempl" diff --git a/base/source/c/copyByteShort.c b/base/source/c/copyByteShort.c deleted file mode 100644 index 5081ab739910480dcfd0c8ab269f8a2e0a965ed9..0000000000000000000000000000000000000000 --- a/base/source/c/copyByteShort.c +++ /dev/null @@ -1,42 +0,0 @@ -/**************************************************************************** - * NCSA HDF * - * National Computational Science Alliance * - * University of Illinois at Urbana-Champaign * - * 605 E. Springfield, Champaign IL 61820 * - * * - * Center for Information Sciences and Databases, ETH Zurich, Switzerland * - * * - * For conditions of distribution and use, see the accompanying * - * COPYING file. * - * * - ****************************************************************************/ - -/* - * This module contains the implementation of all the native methods - * used for number conversion. This is represented by the Java - * class HDFNativeData. - * - * These routines convert one dimensional arrays of bytes into - * one-D arrays of other types (int, float, etc) and vice versa. - * - * These routines are called from the Java parts of the Java-C - * interface. - * - * ***Important notes: - * - * 1. These routines are designed to be portable--they use the - * C compiler to do the required native data manipulation. - * 2. These routines copy the data at least once -- a serious - * but unavoidable performance hit. - */ - -#define TARGET jshort -#define TARGET_ARRAY jshortArray -#define METHODNAMETB "copyShortToByte" -#define FUNCTIONNAMETB Java_ch_systemsx_cisd_base_convert_NativeData_copyShortToByte___3SI_3BIII -#define METHODNAMEBT "copyByteToShort" -#define FUNCTIONNAMEBT Java_ch_systemsx_cisd_base_convert_NativeData_copyByteToShort___3BI_3SIII -#define COPY_FUNC GetShortArrayRegion -#define CHANGE_BYTE_ORDER CHANGE_BYTE_ORDER_2 - -#include "copyByteTarget.ctempl" diff --git a/base/source/c/copyByteTarget.ctempl b/base/source/c/copyByteTarget.ctempl deleted file mode 100644 index 7d9b8d205bb2f8b0c6b678daa5621ce5f3e4ec7b..0000000000000000000000000000000000000000 --- a/base/source/c/copyByteTarget.ctempl +++ /dev/null @@ -1,241 +0,0 @@ -/**************************************************************************** - * NCSA HDF * - * National Computational Science Alliance * - * University of Illinois at Urbana-Champaign * - * 605 E. Springfield, Champaign IL 61820 * - * * - * Center for Information Sciences and Databases, ETH Zurich, Switzerland * - * * - * For conditions of distribution and use, see the accompanying * - * COPYING file. * - * * - ****************************************************************************/ - -/* - * This module contains the implementation of all the native methods - * used for number conversion. This is represented by the Java - * class HDFNativeData. - * - * These routines convert one dimensional arrays of bytes into - * one-D arrays of other types (int, float, etc) and vice versa. - * - * These routines are called from the Java parts of the Java-C - * interface. - * - * ***Important notes: - * - * 1. These routines are designed to be portable--they use the - * C compiler to do the required native data manipulation. - * 2. These routines copy the data at least once -- a serious - * but unavoidable performance hit. - */ - -#ifdef __cplusplus -extern "C" { -#endif - -#include <jni.h> - -extern jboolean h5JNIFatalError( JNIEnv *env, char *functName); -extern jboolean h5nullArgument( JNIEnv *env, char *functName); -extern jboolean h5badArgument( JNIEnv *env, char *functName); -extern jboolean h5indexOutOfBounds( JNIEnv *env, char *functName); - -/* Change byte order for data type of length 2. */ -#define CHANGE_BYTE_ORDER_2(ARRAY) {jbyte _tmp; _tmp=ARRAY[0]; ARRAY[0]=ARRAY[1]; ARRAY[1]=_tmp;} -/* Change byte order for data type of length 4. */ -#define CHANGE_BYTE_ORDER_4(ARRAY) {jbyte _tmp; _tmp=ARRAY[0]; ARRAY[0]=ARRAY[3]; ARRAY[3]=_tmp; _tmp=ARRAY[1]; ARRAY[1]=ARRAY[2]; ARRAY[2]=_tmp;} -/* Change byte order for data type of length 8. */ -#define CHANGE_BYTE_ORDER_8(ARRAY) {jbyte _tmp; _tmp=ARRAY[0]; ARRAY[0]=ARRAY[7]; ARRAY[7]=_tmp; _tmp=ARRAY[1]; ARRAY[1]=ARRAY[6]; ARRAY[6]=_tmp; _tmp=ARRAY[2]; ARRAY[2]=ARRAY[5]; ARRAY[5]=_tmp; _tmp=ARRAY[3]; ARRAY[3]=ARRAY[4]; ARRAY[4]=_tmp;} - -#define INDATA_IS_NULL_ERR_TB METHODNAMETB ": inData is NULL" -#define OUTDATA_IS_NULL_ERR_TB METHODNAMETB ": outData is NULL" -#define OOB_IN_ERR_TB METHODNAMETB ": inStart or len is out of bounds" -#define OOB_OUT_ERR_TB METHODNAMETB ": outStart or len is out of bounds" -#define PINNING_OUT_ERR_TB METHODNAMETB ": pinning outArray failed" - -#define INDATA_IS_NULL_ERR_BT METHODNAMEBT ": inData is NULL" -#define OUTDATA_IS_NULL_ERR_BT METHODNAMEBT ": outData is NULL" -#define OOB_IN_ERR_BT METHODNAMEBT ": inStart or len is out of bounds" -#define OOB_OUT_ERR_BT METHODNAMEBT ": outStart or len is out of bounds" -#define PINNING_OUT_ERR_BT METHODNAMEBT ": pinning outArray failed" - -/* - * public static native void copy<TARGET_CAPT>oByte(<TARGET>[] inData, int inStart, - * byte[] outData, int outStart, int len, int byteOrder); - */ -JNIEXPORT void JNICALL FUNCTIONNAMETB -(JNIEnv *env, - jclass clss, - TARGET_ARRAY inData, /* IN: array of TARGET */ - jint inStart, - jbyteArray outData, /* OUT: array of byte */ - jint outStart, - jint len, - jint byteOrder -) -{ - jsize inSize, outSize; - jint lenInBytes; - jbyte *outArray; - jboolean isCopy; - - if (inData == NULL) { - h5nullArgument(env, INDATA_IS_NULL_ERR_BT); - return; - } - - if (outData == NULL) { - h5nullArgument(env, OUTDATA_IS_NULL_ERR_TB); - return; - } - - lenInBytes = len * sizeof(TARGET); - -#ifdef __cplusplus - inSize = env->GetArrayLength(inData); -#else - inSize = (*env)->GetArrayLength(env, inData); -#endif - if ((inStart < 0) || (inStart + len > inSize)) { - h5indexOutOfBounds(env, OOB_IN_ERR_TB); - return; - } - -#ifdef __cplusplus - outSize = env->GetArrayLength(outData); -#else - outSize = (*env)->GetArrayLength(env, outData); -#endif - if ((outStart < 0) || (outStart + lenInBytes > outSize)) { - h5indexOutOfBounds(env, OOB_OUT_ERR_TB); - return; - } - -#ifdef __cplusplus - outArray = env->GetPrimitiveArrayCritical(outData, &isCopy); -#else - outArray = (*env)->GetPrimitiveArrayCritical(env, outData, &isCopy); -#endif - if (outArray == NULL) { - h5JNIFatalError(env, PINNING_OUT_ERR_TB); - return; - } - -#ifdef __cplusplus - env->COPY_FUNC(inData, inStart, len, (TARGET*) (outArray + outStart)); -#else - (*env)->COPY_FUNC(env, inData, inStart, len, (TARGET*) (outArray + outStart)); -#endif - - if (byteOrder > 0 && byteOrder != MACHINE_BYTE_ORDER) - { - jbyte *buf = outArray + outStart; - int nelmts; - for(nelmts = 0; nelmts < len; ++nelmts) - { - CHANGE_BYTE_ORDER(buf); - buf += sizeof(TARGET); - } - } - -#ifdef __cplusplus - env->ReleasePrimitiveArrayCritical(outData, outArray, 0); -#else - (*env)->ReleasePrimitiveArrayCritical(env, outData,outArray, 0); -#endif - - return; -} - -/* - * public static native void copyByteTo<TARGET_CAP>(byte[] inData, int inStart, - * TARGET[] outData, int outStart, int len, int byteOrder); - */ -JNIEXPORT void JNICALL FUNCTIONNAMEBT -(JNIEnv *env, - jclass clss, - jbyteArray inData, /* IN: array of byte */ - jint inStart, - TARGET_ARRAY outData, /* OUT: array of TAGET */ - jint outStart, - jint len, - jint byteOrder - ) -{ - jsize inSize, outSize; - jint lenInBytes; - TARGET *outArray; - jboolean isCopy; - - if (inData == NULL) { - h5nullArgument(env, INDATA_IS_NULL_ERR_BT); - return; - } - - if (outData == NULL) { - h5nullArgument(env, OUTDATA_IS_NULL_ERR_BT); - return; - } - - lenInBytes = len * sizeof(TARGET); - -#ifdef __cplusplus - inSize = env->GetArrayLength(inData); -#else - inSize = (*env)->GetArrayLength(env, inData); -#endif - if ((inStart < 0) || (inStart + lenInBytes > inSize)) { - h5indexOutOfBounds(env, OOB_IN_ERR_BT); - return; - } - -#ifdef __cplusplus - outSize = env->GetArrayLength(outData); -#else - outSize = (*env)->GetArrayLength(env, outData); -#endif - if ((outStart < 0) || (outStart + len > outSize)) { - h5indexOutOfBounds(env, OOB_OUT_ERR_BT); - return; - } - -#ifdef __cplusplus - outArray = env->GetPrimitiveArrayCritical(outData, &isCopy); -#else - outArray = (*env)->GetPrimitiveArrayCritical(env, outData, &isCopy); -#endif - if (outArray == NULL) { - h5JNIFatalError(env, PINNING_OUT_ERR_BT); - return; - } - -#ifdef __cplusplus - env->GetByteArrayRegion(inData, inStart, lenInBytes, outArray + outStart); -#else - (*env)->GetByteArrayRegion(env, inData, inStart, lenInBytes, (jbyte*) (outArray + outStart)); -#endif - - if (byteOrder > 0 && byteOrder != MACHINE_BYTE_ORDER) - { - jbyte *buf = (jbyte*) outArray + outStart; - int nelmts; - for(nelmts = 0; nelmts < len; ++nelmts) - { - CHANGE_BYTE_ORDER(buf); - buf += sizeof(TARGET); - } - } - -#ifdef __cplusplus - env->ReleasePrimitiveArrayCritical(outData, outArray, 0); -#else - (*env)->ReleasePrimitiveArrayCritical(env, outData, outArray, 0); -#endif - - return; -} - -#ifdef __cplusplus -} -#endif diff --git a/base/source/c/copyCommon.c b/base/source/c/copyCommon.c deleted file mode 100755 index 40a0278b7590e9c92ff55ef06d8ef7ab1eb50fcd..0000000000000000000000000000000000000000 --- a/base/source/c/copyCommon.c +++ /dev/null @@ -1,268 +0,0 @@ -/**************************************************************************** - * NCSA HDF * - * National Comptational Science Alliance * - * University of Illinois at Urbana-Champaign * - * 605 E. Springfield, Champaign IL 61820 * - * * - * For conditions of distribution and use, see the accompanying * - * COPYING file. * - * * - ****************************************************************************/ - -/* - * This is a utility program used by native code to generate Java exceptions. - * - */ -#ifdef __cplusplus -extern "C" { -#endif - -#include <stdio.h> -#include "jni.h" - -/* - * public static native boolean isLittleEndian(); - */ -JNIEXPORT jboolean JNICALL Java_ch_systemsx_cisd_base_convert_NativeData_isLittleEndian -(JNIEnv *env, - jclass clss - ) -{ - return MACHINE_BYTE_ORDER == 1; -} - -/* - * A fatal error in a JNI call - * Create and throw an 'InternalError' - * - * Note: This routine never returns from the 'throw', - * and the Java native method immediately raises the - * exception. - */ -jboolean h5JNIFatalError( JNIEnv *env, char *functName) -{ - jmethodID jm; - jclass jc; - char * args[2]; - jobject ex; - jstring str; - int rval; - -#ifdef __cplusplus - jc = env->FindClass("java/lang/InternalError"); -#else - jc = (*env)->FindClass(env, "java/lang/InternalError"); -#endif - if (jc == NULL) { - return JNI_FALSE; - } -#ifdef __cplusplus - jm = env->GetMethodID(jc, "<init>", "(Ljava/lang/String;)V"); -#else - jm = (*env)->GetMethodID(env, jc, "<init>", "(Ljava/lang/String;)V"); -#endif - if (jm == NULL) { - return JNI_FALSE; - } - -#ifdef __cplusplus - str = env->NewStringUTF(functName); -#else - str = (*env)->NewStringUTF(env,functName); -#endif - args[0] = (char *)str; - args[1] = 0; -#ifdef __cplusplus - ex = env->NewObjectA ( jc, jm, (jvalue *)args ); - - rval = env->Throw( (jthrowable) ex ); -#else - ex = (*env)->NewObjectA ( env, jc, jm, (jvalue *)args ); - - rval = (*env)->Throw(env, ex ); -#endif - if (rval < 0) { - fprintf(stderr, "FATAL ERROR: JNIFatal: Throw failed\n"); - return JNI_FALSE; - } - - return JNI_TRUE; -} - -/* - * A NULL argument in an HDF5 call - * Create and throw an 'NullPointerException' - * - * Note: This routine never returns from the 'throw', - * and the Java native method immediately raises the - * exception. - */ -jboolean h5nullArgument( JNIEnv *env, char *functName) -{ - jmethodID jm; - jclass jc; - char * args[2]; - jobject ex; - jstring str; - int rval; - -#ifdef __cplusplus - jc = env->FindClass("java/lang/NullPointerException"); -#else - jc = (*env)->FindClass(env, "java/lang/NullPointerException"); -#endif - if (jc == NULL) { - return JNI_FALSE; - } -#ifdef __cplusplus - jm = env->GetMethodID(jc, "<init>", "(Ljava/lang/String;)V"); -#else - jm = (*env)->GetMethodID(env, jc, "<init>", "(Ljava/lang/String;)V"); -#endif - if (jm == NULL) { - return JNI_FALSE; - } - -#ifdef __cplusplus - str = env->NewStringUTF(functName); -#else - str = (*env)->NewStringUTF(env,functName); -#endif - args[0] = (char *)str; - args[1] = 0; -#ifdef __cplusplus - ex = env->NewObjectA ( jc, jm, (jvalue *)args ); - - rval = env->Throw((jthrowable) ex ); -#else - ex = (*env)->NewObjectA ( env, jc, jm, (jvalue *)args ); - - rval = (*env)->Throw(env, ex ); -#endif - - if (rval < 0) { - fprintf(stderr, "FATAL ERROR: NullPointer: Throw failed\n"); - return JNI_FALSE; - } - - return JNI_TRUE; -} - -/* - * A bad argument in an HDF5 call - * Create and throw an 'IllegalArgumentException' - * - * Note: This routine never returns from the 'throw', - * and the Java native method immediately raises the - * exception. - */ -jboolean h5badArgument( JNIEnv *env, char *functName) -{ - jmethodID jm; - jclass jc; - char * args[2]; - jobject ex; - jstring str; - int rval; - -#ifdef __cplusplus - jc = env->FindClass("java/lang/IllegalArgumentException"); -#else - jc = (*env)->FindClass(env, "java/lang/IllegalArgumentException"); -#endif - if (jc == NULL) { - return JNI_FALSE; - } -#ifdef __cplusplus - jm = env->GetMethodID(jc, "<init>", "(Ljava/lang/String;)V"); -#else - jm = (*env)->GetMethodID(env, jc, "<init>", "(Ljava/lang/String;)V"); -#endif - if (jm == NULL) { - return JNI_FALSE; - } - -#ifdef __cplusplus - str = env->NewStringUTF(functName); -#else - str = (*env)->NewStringUTF(env,functName); -#endif - args[0] = (char *)str; - args[1] = 0; -#ifdef __cplusplus - ex = env->NewObjectA ( jc, jm, (jvalue *)args ); - - rval = env->Throw((jthrowable) ex ); -#else - ex = (*env)->NewObjectA ( env, jc, jm, (jvalue *)args ); - - rval = (*env)->Throw(env, ex ); -#endif - if (rval < 0) { - fprintf(stderr, "FATAL ERROR: BadArgument: Throw failed\n"); - return JNI_FALSE; - } - - return JNI_TRUE; -} - -/* - * An Index-out-of-bounds error argument in an HDF5 call - * Create and throw an 'IllegalArgumentException' - * - * Note: This routine never returns from the 'throw', - * and the Java native method immediately raises the - * exception. - */ -jboolean h5indexOutOfBounds( JNIEnv *env, char *functName) -{ - jmethodID jm; - jclass jc; - char * args[2]; - jobject ex; - jstring str; - int rval; - -#ifdef __cplusplus - jc = env->FindClass("java/lang/IndexOutOfBoundsException"); -#else - jc = (*env)->FindClass(env, "java/lang/IndexOutOfBoundsException"); -#endif - if (jc == NULL) { - return JNI_FALSE; - } -#ifdef __cplusplus - jm = env->GetMethodID(jc, "<init>", "(Ljava/lang/String;)V"); -#else - jm = (*env)->GetMethodID(env, jc, "<init>", "(Ljava/lang/String;)V"); -#endif - if (jm == NULL) { - return JNI_FALSE; - } - -#ifdef __cplusplus - str = env->NewStringUTF(functName); -#else - str = (*env)->NewStringUTF(env,functName); -#endif - args[0] = (char *)str; - args[1] = 0; -#ifdef __cplusplus - ex = env->NewObjectA ( jc, jm, (jvalue *)args ); - - rval = env->Throw((jthrowable) ex ); -#else - ex = (*env)->NewObjectA ( env, jc, jm, (jvalue *)args ); - - rval = (*env)->Throw(env, ex ); -#endif - if (rval < 0) { - fprintf(stderr, "FATAL ERROR: BadArgument: Throw failed\n"); - return JNI_FALSE; - } - - return JNI_TRUE; -} -#ifdef __cplusplus -} -#endif diff --git a/base/source/c/unix.c b/base/source/c/unix.c deleted file mode 100644 index 1cfeef9fc9de76e48a37420c5f907f27783b4d34..0000000000000000000000000000000000000000 --- a/base/source/c/unix.c +++ /dev/null @@ -1,446 +0,0 @@ -/* - * Copyright 2008 ETH Zuerich, CISD - * - * 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. - */ -#include <unistd.h> -#include <errno.h> -#include <string.h> -#include <pwd.h> -#include <grp.h> -#include <sys/types.h> -#include <sys/stat.h> -#include <jni.h> - -/* Types of links. Keep in sync with Java enum. */ -#define REGULAR_FILE 0 -#define DIRECTORY 1 -#define SYMLINK 2 -#define OTHER 3 - -#ifndef __STAT -#define __STAT stat -#endif - -#ifndef __LSTAT -#define __LSTAT lstat -#endif - -/* Global references. */ -jclass stringClass; -jclass passwordClass; -jmethodID passwordConstructorID; -jclass groupClass; -jmethodID groupConstructorID; -jclass statClass; -jmethodID statConstructorID; - -JNIEXPORT jint JNICALL Java_ch_systemsx_cisd_base_unix_Unix_init - (JNIEnv *env, jclass clss) -{ - stringClass = (*env)->FindClass(env, "java/lang/String"); - if (stringClass == NULL) /* Really shouldn't happen, will throw NoClassDefFoundError. */ - { - return -1; - } - stringClass = (*env)->NewGlobalRef(env, stringClass); - passwordClass = (*env)->FindClass(env, "ch/systemsx/cisd/base/unix/Unix$Password"); - if (passwordClass == NULL) /* Really shouldn't happen, will throw NoClassDefFoundError. */ - { - return -1; - } - passwordClass = (*env)->NewGlobalRef(env, passwordClass); - passwordConstructorID = (*env)->GetMethodID(env, passwordClass, "<init>", "(Ljava/lang/String;Ljava/lang/String;IILjava/lang/String;Ljava/lang/String;Ljava/lang/String;)V"); - if (passwordConstructorID == NULL) /* Really shouldn't happen, will throw NoSuchMethodError. */ - { - return -1; - } - groupClass = (*env)->FindClass(env, "ch/systemsx/cisd/base/unix/Unix$Group"); - if (groupClass == NULL) /* Really shouldn't happen, will throw NoClassDefFoundError. */ - { - return -1; - } - groupClass = (*env)->NewGlobalRef(env, groupClass); - groupConstructorID = (*env)->GetMethodID(env, groupClass, "<init>", "(Ljava/lang/String;Ljava/lang/String;I[Ljava/lang/String;)V"); - if (groupConstructorID == NULL) /* Really shouldn't happen, will throw NoSuchMethodError. */ - { - return -1; - } - statClass = (*env)->FindClass(env, "ch/systemsx/cisd/base/unix/Unix$Stat"); - if (statClass == NULL) /* Really shouldn't happen, will throw NoClassDefFoundError. */ - { - return -1; - } - statClass = (*env)->NewGlobalRef(env, statClass); - statConstructorID = (*env)->GetMethodID(env, statClass, "<init>", "(JJSBIIIJJJJJI)V"); - if (groupConstructorID == NULL) /* Really shouldn't happen, will throw NoSuchMethodError. */ - { - return -1; - } - return 0; -} - -JNIEXPORT jint JNICALL Java_ch_systemsx_cisd_base_unix_Unix_link - (JNIEnv *env, jclass clss, jstring filename, jstring linktarget) -{ - const char* pfilename; - const char* plinktarget; - int retval; - - pfilename = (char *)(*env)->GetStringUTFChars(env, filename, NULL); - plinktarget = (char *)(*env)->GetStringUTFChars(env, linktarget, NULL); - - retval = link(pfilename, plinktarget); - if (retval < 0) - { - retval = -errno; - } - - (*env)->ReleaseStringUTFChars(env, filename, pfilename); - (*env)->ReleaseStringUTFChars(env, linktarget, plinktarget); - - return retval; -} - -JNIEXPORT jint JNICALL Java_ch_systemsx_cisd_base_unix_Unix_symlink - (JNIEnv *env, jclass clss, jstring filename, jstring linktarget) -{ - const char* pfilename; - const char* plinktarget; - int retval; - - pfilename = (char *)(*env)->GetStringUTFChars(env, filename, NULL); - plinktarget = (char *)(*env)->GetStringUTFChars(env, linktarget, NULL); - - retval = symlink(pfilename, plinktarget); - if (retval < 0) { - retval = -errno; - } - - (*env)->ReleaseStringUTFChars(env, filename, pfilename); - (*env)->ReleaseStringUTFChars(env, linktarget, plinktarget); - - return retval; -} - -/* Function pointer for stat function calls. */ -typedef int (*stat_func_ptr)(const char *path, struct __STAT *buf); - -jobject call_stat(JNIEnv *env, jclass clss, jstring filename, stat_func_ptr statf) -{ - const char* pfilename; - struct __STAT s; - jobject result; - int retval; - jbyte type; - - pfilename = (char *) (*env)->GetStringUTFChars(env, filename, NULL); - retval = statf(pfilename, &s); - (*env)->ReleaseStringUTFChars(env, filename, pfilename); - if (retval < 0) - { - return NULL; - } else - { - if (S_ISLNK(s.st_mode)) - { - type = SYMLINK; - } else if (S_ISDIR(s.st_mode)) - { - type = DIRECTORY; - } else if (S_ISREG(s.st_mode)) - { - type = REGULAR_FILE; - } else - { - type = OTHER; - } - result = (*env)->NewObject(env, statClass, statConstructorID, (jlong) s.st_dev, (jlong) s.st_ino, - (jshort) (s.st_mode & 07777), (jbyte) type, (jint) s.st_nlink, - (jint) s.st_uid, (jint) s.st_gid, (jlong) s.st_atime, (jlong) s.st_mtime, - (jlong) s.st_ctime, (jlong) s.st_size, (jlong) s.st_blocks, (jint) s.st_blksize); - return result; - } -} - -JNIEXPORT jobject JNICALL Java_ch_systemsx_cisd_base_unix_Unix_stat(JNIEnv *env, jclass clss, jstring filename) -{ - return call_stat(env, clss, filename, &__STAT); -} - -JNIEXPORT jobject JNICALL Java_ch_systemsx_cisd_base_unix_Unix_lstat(JNIEnv *env, jclass clss, jstring filename) -{ - return call_stat(env, clss, filename, &__LSTAT); -} - -JNIEXPORT jstring JNICALL Java_ch_systemsx_cisd_base_unix_Unix_readlink(JNIEnv *env, jclass clss, jstring linkname, jint linkvallen) -{ - const char* plinkname; - char plinkvalue[linkvallen + 1]; - int retval; - - plinkname = (char *)(*env)->GetStringUTFChars(env, linkname, NULL); - retval = readlink(plinkname, plinkvalue, linkvallen); - (*env)->ReleaseStringUTFChars(env, linkname, plinkname); - if (retval < 0) - { - return NULL; - } else - { - plinkvalue[linkvallen] = '\0'; - return (*env)->NewStringUTF(env, plinkvalue); - } -} - -JNIEXPORT jint JNICALL Java_ch_systemsx_cisd_base_unix_Unix_chmod(JNIEnv *env, jclass clss, jstring linkname, jshort mode) -{ - const char* plinkname; - int retval; - - plinkname = (char *)(*env)->GetStringUTFChars(env, linkname, NULL); - retval = chmod(plinkname, mode); - (*env)->ReleaseStringUTFChars(env, linkname, plinkname); - if (retval < 0) - { - return -errno; - } else - { - return 0; - } -} - -JNIEXPORT jint JNICALL Java_ch_systemsx_cisd_base_unix_Unix_chown(JNIEnv *env, jclass clss, jstring linkname, jint uid, jint gid) -{ - const char* plinkname; - int retval; - - plinkname = (char *)(*env)->GetStringUTFChars(env, linkname, NULL); - retval = chown(plinkname, uid, gid); - (*env)->ReleaseStringUTFChars(env, linkname, plinkname); - if (retval < 0) - { - return -errno; - } else - { - return 0; - } -} - -JNIEXPORT jstring JNICALL Java_ch_systemsx_cisd_base_unix_Unix_getuser(JNIEnv *env, jclass clss, jint uid) -{ - struct passwd *pw; - - pw = getpwuid(uid); - if (pw == NULL) - { - return NULL; - } else - { - return (*env)->NewStringUTF(env, pw->pw_name); - } -} - -JNIEXPORT jstring JNICALL Java_ch_systemsx_cisd_base_unix_Unix_getgroup(JNIEnv *env, jclass clss, jint gid) -{ - struct group *gp; - - gp = getgrgid(gid); - if (gp == NULL) - { - return NULL; - } else - { - return (*env)->NewStringUTF(env, gp->gr_name); - } -} - -JNIEXPORT jint JNICALL Java_ch_systemsx_cisd_base_unix_Unix_getuid__(JNIEnv *env, jclass clss) -{ - return getuid(); -} - -JNIEXPORT jint JNICALL Java_ch_systemsx_cisd_base_unix_Unix_geteuid(JNIEnv *env, jclass clss) -{ - return geteuid(); -} - -JNIEXPORT jint JNICALL Java_ch_systemsx_cisd_base_unix_Unix_getuid__Ljava_lang_String_2(JNIEnv *env, jclass clss, jstring user) -{ - const char* puser; - struct passwd *pw; - - puser = (char *)(*env)->GetStringUTFChars(env, user, NULL); - pw = getpwnam(puser); - (*env)->ReleaseStringUTFChars(env, user, puser); - if (pw == NULL) - { - return -errno; - } else - { - return pw->pw_uid; - } -} - -JNIEXPORT jobject JNICALL Java_ch_systemsx_cisd_base_unix_Unix_getpwnam(JNIEnv *env, jclass clss, jstring user) -{ - const char* puser; - struct passwd *pw; - jstring passwd; - jstring fullname; - jstring homedir; - jstring shell; - jobject result; - - puser = (char *)(*env)->GetStringUTFChars(env, user, NULL); - pw = getpwnam(puser); - (*env)->ReleaseStringUTFChars(env, user, puser); - if (pw == NULL) - { - return NULL; - } else - { - passwd = (*env)->NewStringUTF(env, pw->pw_passwd); - fullname = (*env)->NewStringUTF(env, pw->pw_gecos); - homedir = (*env)->NewStringUTF(env, pw->pw_dir); - shell = (*env)->NewStringUTF(env, pw->pw_shell); - result = (*env)->NewObject(env, passwordClass, passwordConstructorID, user, passwd, pw->pw_uid, pw->pw_gid, fullname, homedir, shell); - return result; - } -} - -JNIEXPORT jobject JNICALL Java_ch_systemsx_cisd_base_unix_Unix_getpwuid(JNIEnv *env, jclass clss, jint uid) -{ - struct passwd *pw; - jstring user; - jstring passwd; - jstring fullname; - jstring homedir; - jstring shell; - jobject result; - - pw = getpwuid(uid); - if (pw == NULL) - { - return NULL; - } else - { - user = (*env)->NewStringUTF(env, pw->pw_name); - passwd = (*env)->NewStringUTF(env, pw->pw_passwd); - fullname = (*env)->NewStringUTF(env, pw->pw_gecos); - homedir = (*env)->NewStringUTF(env, pw->pw_dir); - shell = (*env)->NewStringUTF(env, pw->pw_shell); - result = (*env)->NewObject(env, passwordClass, passwordConstructorID, user, passwd, pw->pw_uid, pw->pw_gid, fullname, homedir, shell); - return result; - } -} - -JNIEXPORT jobjectArray JNICALL Java_ch_systemsx_cisd_base_unix_Unix_getgrnam(JNIEnv *env, jclass clss, jstring group) -{ - const char* pgroup; - struct group *gr; - jstring grouppwd; - jobject result; - jobjectArray members; - int i; - - pgroup = (char *)(*env)->GetStringUTFChars(env, group, NULL); - gr = getgrnam(pgroup); - (*env)->ReleaseStringUTFChars(env, group, pgroup); - if (gr == NULL) - { - return NULL; - } else - { - grouppwd = (*env)->NewStringUTF(env, gr->gr_passwd); - /* Count group members. */ - for (i = 0; (gr->gr_mem)[i] != NULL; ++i); - members = (*env)->NewObjectArray(env, i, stringClass, NULL); - for (i = 0; (gr->gr_mem)[i] != NULL; ++i) - { - (*env)->SetObjectArrayElement(env, members, i, (*env)->NewStringUTF(env, (gr->gr_mem)[i])); - } - result = (*env)->NewObject(env, groupClass, groupConstructorID, group, grouppwd, gr->gr_gid, members); - return result; - } -} - -JNIEXPORT jobjectArray JNICALL Java_ch_systemsx_cisd_base_unix_Unix_getgrgid(JNIEnv *env, jclass clss, jint gid) -{ - struct group *gr; - jstring group; - jstring grouppwd; - jobject result; - jobjectArray members; - int i; - - gr = getgrgid(gid); - if (gr == NULL) - { - return NULL; - } else - { - group = (*env)->NewStringUTF(env, gr->gr_name); - grouppwd = (*env)->NewStringUTF(env, gr->gr_passwd); - /* Count group members. */ - for (i = 0; (gr->gr_mem)[i] != NULL; ++i); - members = (*env)->NewObjectArray(env, i, stringClass, NULL); - for (i = 0; (gr->gr_mem)[i] != NULL; ++i) - { - (*env)->SetObjectArrayElement(env, members, i, (*env)->NewStringUTF(env, (gr->gr_mem)[i])); - } - result = (*env)->NewObject(env, groupClass, groupConstructorID, group, grouppwd, gr->gr_gid, members); - return result; - } -} - -JNIEXPORT jint JNICALL Java_ch_systemsx_cisd_base_unix_Unix_getgid__(JNIEnv *env, jclass clss) -{ - return getgid(); -} - -JNIEXPORT jint JNICALL Java_ch_systemsx_cisd_base_unix_Unix_getegid(JNIEnv *env, jclass clss) -{ - return getegid(); -} - -JNIEXPORT jint JNICALL Java_ch_systemsx_cisd_base_unix_Unix_getgid__Ljava_lang_String_2(JNIEnv *env, jclass clss, jstring group) -{ - const char* pgroup; - struct group *gr; - - pgroup = (char *)(*env)->GetStringUTFChars(env, group, NULL); - gr = getgrnam(pgroup); - (*env)->ReleaseStringUTFChars(env, group, pgroup); - if (gr == NULL) - { - return -errno; - } else - { - return gr->gr_gid; - } -} - -JNIEXPORT jint JNICALL Java_ch_systemsx_cisd_base_unix_Unix_getpid(JNIEnv *env, jclass clss) -{ - return getpid(); -} - -JNIEXPORT jstring JNICALL Java_ch_systemsx_cisd_base_unix_Unix_strerror__I(JNIEnv *env, jclass clss, jint errnum) -{ - return (*env)->NewStringUTF(env, strerror(errnum < 0 ? -errnum : errnum)); -} - -JNIEXPORT jstring JNICALL Java_ch_systemsx_cisd_base_unix_Unix_strerror__(JNIEnv *env, jclass clss) -{ - return (*env)->NewStringUTF(env, strerror(errno)); -} diff --git a/base/source/java/ch/systemsx/cisd/base/BuildAndEnvironmentInfo.java b/base/source/java/ch/systemsx/cisd/base/BuildAndEnvironmentInfo.java deleted file mode 100644 index 91a10b57ee06a94ac41eaaa40d45e69872a39dd6..0000000000000000000000000000000000000000 --- a/base/source/java/ch/systemsx/cisd/base/BuildAndEnvironmentInfo.java +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright 2009 ETH Zuerich, CISD - * - * 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. - */ - -package ch.systemsx.cisd.base; - -import ch.systemsx.cisd.base.utilities.AbstractBuildAndEnvironmentInfo; - - -/** - * The build and environment information for cisd-base. - * - * @author Franz-Josef Elmer - */ -public class BuildAndEnvironmentInfo extends AbstractBuildAndEnvironmentInfo -{ - private final static String BASE = "base"; - - public final static BuildAndEnvironmentInfo INSTANCE = new BuildAndEnvironmentInfo(); - - private BuildAndEnvironmentInfo() - { - super(BASE); - } - - /** - * Shows build and environment information on the console. - */ - public static void main(String[] args) - { - System.out.println(INSTANCE); - } - -} diff --git a/base/source/java/ch/systemsx/cisd/base/annotation/JsonObject.java b/base/source/java/ch/systemsx/cisd/base/annotation/JsonObject.java deleted file mode 100644 index abf69e3a7faffadfc28b6cc6f31aa09d1b46963c..0000000000000000000000000000000000000000 --- a/base/source/java/ch/systemsx/cisd/base/annotation/JsonObject.java +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright 2012 ETH Zuerich, CISD - * - * 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. - */ - -package ch.systemsx.cisd.base.annotation; - -import java.lang.annotation.Documented; -import java.lang.annotation.ElementType; -import java.lang.annotation.Retention; -import java.lang.annotation.RetentionPolicy; -import java.lang.annotation.Target; - -/** - * Annotation all JSON transfered classes should be marked with. It was originally created to - * replace @JsonTypeName annotation which was not visible in the documentation. With @JsonTypeName - * annotation it would be impossible for our users to find a logical type name of a class to be sent - * to JSON-RPC services. - * - * @author pkupczyk - */ -@Target( - { ElementType.TYPE }) -@Retention(RetentionPolicy.RUNTIME) -@Documented -public @interface JsonObject -{ - /** - * Logical type name for annotated type. - */ - public String value(); -} diff --git a/base/source/java/ch/systemsx/cisd/base/convert/NativeArrayEncoding.java b/base/source/java/ch/systemsx/cisd/base/convert/NativeArrayEncoding.java deleted file mode 100644 index e2bfa3daacde2698981cc2c915d4c8ab0222c75a..0000000000000000000000000000000000000000 --- a/base/source/java/ch/systemsx/cisd/base/convert/NativeArrayEncoding.java +++ /dev/null @@ -1,184 +0,0 @@ -/* - * Copyright 2010 ETH Zuerich, CISD - * - * 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. - */ - -package ch.systemsx.cisd.base.convert; - -import ch.systemsx.cisd.base.convert.NativeData.ByteOrder; - -/** - * An enum for encoding array of numbers (integer or float) in native (host) format. - * - * @author Bernd Rinn - */ -public enum NativeArrayEncoding -{ - INT8_NATIVE(false, (byte) 1, NativeData.ByteOrder.NATIVE), - - INT16_LITTLE_ENDIAN(false, (byte) 2, NativeData.ByteOrder.LITTLE_ENDIAN), - - INT32_LITTLE_ENDIAN(false, (byte) 4, NativeData.ByteOrder.LITTLE_ENDIAN), - - INT64_LITTLE_ENDIAN(false, (byte) 8, NativeData.ByteOrder.LITTLE_ENDIAN), - - INT16_BIG_ENDIAN(false, (byte) 2, NativeData.ByteOrder.BIG_ENDIAN), - - INT32_BIG_ENDIAN(false, (byte) 4, NativeData.ByteOrder.BIG_ENDIAN), - - INT64_BIG_ENDIAN(false, (byte) 8, NativeData.ByteOrder.BIG_ENDIAN), - - FLOAT32_LITTLE_ENDIAN(true, (byte) 4, NativeData.ByteOrder.LITTLE_ENDIAN), - - FLOAT64_LITTLE_ENDIAN(true, (byte) 8, NativeData.ByteOrder.LITTLE_ENDIAN), - - FLOAT32_BIG_ENDIAN(true, (byte) 4, NativeData.ByteOrder.BIG_ENDIAN), - - FLOAT64_BIG_ENDIAN(true, (byte) 8, NativeData.ByteOrder.BIG_ENDIAN), - - ; - - private static final int MIN_ENCODING_HEADER_SIZE = 8; - - private static final int CHAR_N = 78; - - private static final int CHAR_B = 66; - - private static final int CHAR_L = 76; - - private static final int CHAR_I = 73; - - private static final int CHAR_F = 70; - - private boolean floatingPoint; - - private ByteOrder byteOrder; - - private byte sizeInBytes; - - private byte[] magic; - - NativeArrayEncoding(boolean floatingPoint, byte sizeInBytes, NativeData.ByteOrder byteOrder) - { - this.floatingPoint = floatingPoint; - this.byteOrder = byteOrder; - this.sizeInBytes = sizeInBytes; - this.magic = - new byte[] - { - (byte) (floatingPoint ? CHAR_F : CHAR_I), - (byte) ((byteOrder == ByteOrder.LITTLE_ENDIAN) ? CHAR_L - : (byteOrder == ByteOrder.BIG_ENDIAN) ? CHAR_B : CHAR_N), - sizeInBytes }; - } - - /** - * Returns <code>true</code>, if the encoded array is a float array. - */ - public boolean isFloatingPoint() - { - return floatingPoint; - } - - /** - * Returns <code>true</code>, if the encoded array is an int array. - */ - public boolean isInteger() - { - return floatingPoint == false; - } - - /** - * Returns the byte order of the array. - */ - public NativeData.ByteOrder getByteOrder() - { - return byteOrder; - } - - /** - * Returns the size of one element in bytes. - */ - public byte getSizeInBytes() - { - return sizeInBytes; - } - - byte[] getMagic() - { - return magic; - } - - static NativeArrayEncoding tryGetIntEncoding(ByteOrder byteOrder, byte sizeInBytes) - { - assert byteOrder != null; - if (sizeInBytes == 1 && byteOrder == ByteOrder.NATIVE) - { - return INT8_NATIVE; - } else if (sizeInBytes == 2) - { - return (byteOrder == ByteOrder.LITTLE_ENDIAN) ? INT16_LITTLE_ENDIAN : INT16_BIG_ENDIAN; - } else if (sizeInBytes == 4) - { - return (byteOrder == ByteOrder.LITTLE_ENDIAN) ? INT32_LITTLE_ENDIAN : INT32_BIG_ENDIAN; - - } else if (sizeInBytes == 8) - { - return (byteOrder == ByteOrder.LITTLE_ENDIAN) ? INT64_LITTLE_ENDIAN : INT64_BIG_ENDIAN; - } - return null; - } - - static NativeArrayEncoding tryGetFloatEncoding(ByteOrder byteOrder, byte sizeInBytes) - { - assert byteOrder != null; - if (sizeInBytes == 4) - { - return (byteOrder == ByteOrder.LITTLE_ENDIAN) ? FLOAT32_LITTLE_ENDIAN - : FLOAT32_BIG_ENDIAN; - } else if (sizeInBytes == 8) - { - return (byteOrder == ByteOrder.LITTLE_ENDIAN) ? FLOAT64_LITTLE_ENDIAN - : FLOAT64_BIG_ENDIAN; - } - return null; - } - - /** - * Returns the encoding for the given <var>byteArr</var>, or <code>null</code>, if - * <var>byteArr</var> is not an encoded array. - */ - public static NativeArrayEncoding tryGetEncoding(byte[] byteArr) - { - if (byteArr.length < MIN_ENCODING_HEADER_SIZE) - { - return null; - } - final ByteOrder byteOrder = - (byteArr[1] == CHAR_L) ? ByteOrder.LITTLE_ENDIAN - : (byteArr[1] == CHAR_B) ? ByteOrder.BIG_ENDIAN : null; - if (byteOrder == null) - { - return null; - } - if (byteArr[0] == CHAR_F) - { - return tryGetFloatEncoding(byteOrder, byteArr[2]); - } else if (byteArr[0] == CHAR_I) - { - return tryGetIntEncoding(byteOrder, byteArr[2]); - } - return null; - } -} \ No newline at end of file diff --git a/base/source/java/ch/systemsx/cisd/base/convert/NativeData.java b/base/source/java/ch/systemsx/cisd/base/convert/NativeData.java deleted file mode 100644 index f962af5504892d1de6945b851a9074a712128106..0000000000000000000000000000000000000000 --- a/base/source/java/ch/systemsx/cisd/base/convert/NativeData.java +++ /dev/null @@ -1,1086 +0,0 @@ -/**************************************************************************** - * NCSA HDF * - * National Computational Science Alliance * - * University of Illinois at Urbana-Champaign * - * 605 E. Springfield, Champaign IL 61820 * - * * - * Center for Information Sciences and Databases, ETH Zurich, Switzerland * - * * - * For conditions of distribution and use, see the accompanying * - * COPYING file. * - * * - ****************************************************************************/ - -package ch.systemsx.cisd.base.convert; - -import java.nio.ByteBuffer; - -import ch.systemsx.cisd.base.utilities.NativeLibraryUtilities; - -/** - * This class encapsulates native methods to deal with arrays of numbers, converting from numbers to - * bytes and bytes to numbers. - * <p> - * These routines are used by class <b>HDFArray</b> to pass data to and from the HDF5 library. - * <p> - * Methods copyXxxToByte() convert a Java array of primitive numbers (int, short, ...) to a Java - * array of bytes. Methods copyByteToXxx() convert from a Java array of bytes into a Java array of - * primitive numbers (int, short, ...) - * <p> - * Variant interfaces convert only a sub-array. - * <p> - * The class has optimized methods using jni-libraries for some common platforms and a pure-java - * implementation (called <i>javamode</i> if the jni-libraries are not available). If you want to - * enforce <i>javamode</i>, you need to pass the property <code>nativedata.javamode=true</code> to - * the JRE. - */ -public class NativeData -{ - private static final boolean useNativeLib; - - static - { - if (Boolean.getBoolean("nativedata.javamode")) - { - useNativeLib = false; - } else - { - useNativeLib = NativeLibraryUtilities.loadNativeLibrary("nativedata"); - } - } - - /** Size of a <code>short</code> value in <code>byte</code>s. */ - public final static int SHORT_SIZE = 2; - - /** Size of a <code>char</code> value in <code>byte</code>s. */ - public final static int CHAR_SIZE = 2; - - /** Size of an <code>int</code> value in <code>byte</code>s. */ - public final static int INT_SIZE = 4; - - /** Size of a <code>long</code> value in <code>byte</code>s. */ - public final static int LONG_SIZE = 8; - - /** Size of a <code>float</code> value in <code>byte</code>s. */ - public final static int FLOAT_SIZE = 4; - - /** Size of a <code>double</code> value in <code>byte</code>s. */ - public final static int DOUBLE_SIZE = 8; - - /** Byte Order enumeration. */ - // Implementation note: the ordinal of the entries needs to be understood by the native methods - public enum ByteOrder - { - /** <code>byte[]</code> is in native byte order (that is: don't change byte order) */ - NATIVE(java.nio.ByteOrder.nativeOrder()), - /** <code>byte[]</code> is in little endian byte order */ - LITTLE_ENDIAN(java.nio.ByteOrder.LITTLE_ENDIAN), - /** <code>byte[]</code> is in big endian byte order */ - BIG_ENDIAN(java.nio.ByteOrder.BIG_ENDIAN); - - private final java.nio.ByteOrder nioByteOrder; - - ByteOrder(java.nio.ByteOrder nioByteOrder) - { - this.nioByteOrder = nioByteOrder; - } - - java.nio.ByteOrder getNioByteOrder() - { - return nioByteOrder; - } - - static ByteOrder getNativeByteOrder() - { - return NATIVE.nioByteOrder.equals(LITTLE_ENDIAN.nioByteOrder) ? LITTLE_ENDIAN - : BIG_ENDIAN; - } - } - - /** - * Returns <code>true</code> if this platform is a little-endian platform and <code>false</code> - * , if it is a big-endian platform. - */ - private static native boolean isLittleEndian(); - - /** - * Copies a range from an array of <code>int</code> into an array of <code>byte</code>. - * - * @param inData The input array of <code>int</code> values. - * @param inStart The position in the input array <code>inData</code> of <code>int</code> to - * start - * @param outData The output array of <code>byte</code> values. - * @param outStart The start in the output array <code>byteData</code> of <code>byte</code> to - * start - * @param len The number of <code>int</code> to copy - * @param byteOrder The ordinal of {@link ByteOrder}, encoding what byte order the - * <var>outData</var> should be in. - */ - private static native void copyIntToByte(int[] inData, int inStart, byte[] outData, - int outStart, int len, int byteOrder); - - /** - * Copies a range from an array of <code>byte</code> into an array of <code>int</code>. - * - * @param inData The input array of <code>byte</code> values. - * @param inStart The position in the input array <code>inData</code> of <code>byte</code> to - * start - * @param outData The output array of <code>int</code> values. - * @param outStart The start in the output array <code>byteData</code> of <code>int</code> to - * start - * @param len The number of <code>int</code> to copy - * @param byteOrder The ordinal of {@link ByteOrder}, encoding what byte order the - * <var>outData</var> should be in. - */ - private static native void copyByteToInt(byte[] inData, int inStart, int[] outData, - int outStart, int len, int byteOrder); - - /** - * Copies a range from an array of <code>long</code> into an array of <code>byte</code>. - * - * @param inData The input array of <code>long</code> values. - * @param inStart The position in the input array <code>inData</code> of <code>long</code> to - * start - * @param outData The output array of <code>byte</code> values. - * @param outStart The start in the output array <code>byteData</code> of <code>byte</code> to - * start - * @param len The number of <code>long</code> to copy - * @param byteOrder The ordinal of {@link ByteOrder}, encoding what byte order the - * <var>outData</var> should be in. - */ - private static native void copyLongToByte(long[] inData, int inStart, byte[] outData, - int outStart, int len, int byteOrder); - - /** - * Copies a range from an array of <code>byte</code> into an array of <code>long</code>. - * - * @param inData The input array of <code>byte</code> values. - * @param inStart The position in the input array <code>inData</code> of <code>byte</code> to - * start - * @param outData The output array of <code>long</code> values. - * @param outStart The start in the output array <code>byteData</code> of <code>long</code> to - * start - * @param len The number of <code>long</code> to copy - * @param byteOrder The ordinal of {@link ByteOrder}, encoding what byte order the - * <var>outData</var> should be in. - */ - private static native void copyByteToLong(byte[] inData, int inStart, long[] outData, - int outStart, int len, int byteOrder); - - /** - * Copies a range from an array of <code>short</code> into an array of <code>byte</code>. - * - * @param inData The input array of <code>short</code> values. - * @param inStart The position in the input array <code>inData</code> of <code>short</code> to - * start - * @param outData The output array of <code>byte</code> values. - * @param outStart The start in the output array <code>byteData</code> of <code>byte</code> to - * start - * @param len The number of <code>short</code> to copy - * @param byteOrder The ordinal of {@link ByteOrder}, encoding what byte order the - * <var>outData</var> should be in. - */ - private static native void copyShortToByte(short[] inData, int inStart, byte[] outData, - int outStart, int len, int byteOrder); - - /** - * Copies a range from an array of <code>byte</code> into an array of <code>short</code>. - * - * @param inData The input array of <code>byte</code> values. - * @param inStart The position in the input array <code>inData</code> of <code>byte</code> to - * start - * @param outData The output array of <code>short</code> values. - * @param outStart The start in the output array <code>byteData</code> of <code>short</code> to - * start - * @param len The number of <code>short</code> to copy - * @param byteOrder The ordinal of {@link ByteOrder}, encoding what byte order the - * <var>outData</var> should be in. - */ - private static native void copyByteToShort(byte[] inData, int inStart, short[] outData, - int outStart, int len, int byteOrder); - - /** - * Copies a range from an array of <code>char</code> into an array of <code>byte</code>. - * - * @param inData The input array of <code>char</code> values. - * @param inStart The position in the input array <code>inData</code> of <code>char</code> to - * start - * @param outData The output array of <code>byte</code> values. - * @param outStart The start in the output array <code>byteData</code> of <code>byte</code> to - * start - * @param len The number of <code>char</code> to copy - * @param byteOrder The ordinal of {@link ByteOrder}, encoding what byte order the - * <var>outData</var> should be in. - */ - private static native void copyCharToByte(char[] inData, int inStart, byte[] outData, - int outStart, int len, int byteOrder); - - /** - * Copies a range from an array of <code>byte</code> into an array of <code>char</code>. - * - * @param inData The input array of <code>byte</code> values. - * @param inStart The position in the input array <code>inData</code> of <code>byte</code> to - * start - * @param outData The output array of <code>char</code> values. - * @param outStart The start in the output array <code>byteData</code> of <code>char</code> to - * start - * @param len The number of <code>char</code> to copy - * @param byteOrder The ordinal of {@link ByteOrder}, encoding what byte order the - * <var>outData</var> should be in. - */ - private static native void copyByteToChar(byte[] inData, int inStart, char[] outData, - int outStart, int len, int byteOrder); - - /** - * Copies a range from an array of <code>float</code> into an array of <code>byte</code>. - * - * @param inData The input array of <code>float</code> values. - * @param inStart The position in the input array <code>inData</code> of <code>float</code> to - * start - * @param outData The output array of <code>byte</code> values. - * @param outStart The start in the output array <code>byteData</code> of <code>byte</code> to - * start - * @param len The number of <code>float</code> to copy - * @param byteOrder The ordinal of {@link ByteOrder}, encoding what byte order the - * <var>outData</var> should be in. - */ - private static native void copyFloatToByte(float[] inData, int inStart, byte[] outData, - int outStart, int len, int byteOrder); - - /** - * Copies a range from an array of <code>byte</code> into an array of <code>float</code>. - * - * @param inData The input array of <code>byte</code> values. - * @param inStart The position in the input array <code>inData</code> of <code>byte</code> to - * start - * @param outData The output array of <code>float</code> values. - * @param outStart The start in the output array <code>byteData</code> of <code>float</code> to - * start - * @param len The number of <code>float</code> to copy - * @param byteOrder The ordinal of {@link ByteOrder}, encoding what byte order the - * <var>outData</var> should be in. - */ - private static native void copyByteToFloat(byte[] inData, int inStart, float[] outData, - int outStart, int len, int byteOrder); - - /** - * Copies a range from an array of <code>double</code> into an array of <code>byte</code>. - * - * @param inData The input array of <code>double</code> values. - * @param inStart The position in the input array <code>inData</code> of <code>double</code> to - * start - * @param outData The output array of <code>byte</code> values. - * @param outStart The start in the output array <code>byteData</code> of <code>byte</code> to - * start - * @param len The number of <code>double</code> to copy - * @param byteOrder The ordinal of {@link ByteOrder}, encoding what byte order the - * <var>outData</var> should be in. - */ - private static native void copyDoubleToByte(double[] inData, int inStart, byte[] outData, - int outStart, int len, int byteOrder); - - /** - * Copies a range from an array of <code>byte</code> into an array of <code>double</code>. - * - * @param inData The input array of <code>byte</code> values. - * @param inStart The position in the input array <code>inData</code> of <code>byte</code> to - * start - * @param outData The output array of <code>double</code> values. - * @param outStart The start in the output array <code>byteData</code> of <code>double</code> to - * start - * @param len The number of <code>double</code> to copy - * @param byteOrder The ordinal of {@link ByteOrder}, encoding what byte order the - * <var>outData</var> should be in. - */ - private static native void copyByteToDouble(byte[] inData, int inStart, double[] outData, - int outStart, int len, int byteOrder); - - // - // Public - // - - /** Call to ensure that the native library is loaded. */ - public static void ensureNativeLibIsLoaded() - { - } - - /** - * Returns <code>true</code>, if this class uses the native library and <code>false</code> - * otherwise. - */ - public static boolean isUseNativeLib() - { - return useNativeLib; - } - - /** - * Returns the native byte order of the host running this JRE. - */ - public static ByteOrder getNativeByteOrder() - { - return ByteOrder.getNativeByteOrder(); - } - - /** - * Changes the byte order of the bytes constituting <var>s</var>. - */ - public static short changeByteOrder(short s) - { - return (short) ((s << 8) | ((s >> 8) & 0xff)); - } - - /** - * Changes the byte order of the bytes constituting <var>c</var>. - */ - public static char changeByteOrder(char c) - { - return (char) ((c << 8) | ((c >> 8) & 0xff)); - } - - /** - * Changes the byte order of the bytes constituting <var>i</var>. - */ - public static int changeByteOrder(int i) - { - return ((changeByteOrder((short) i) << 16) | (changeByteOrder((short) (i >> 16)) & 0xffff)); - } - - /** - * Changes the byte order of the bytes constituting <var>f</var>. - */ - public static float changeByteOrder(float f) - { - return Float.intBitsToFloat(changeByteOrder(Float.floatToRawIntBits(f))); - } - - /** - * Changes the byte order of the bytes constituting <var>l</var>. - */ - public static long changeByteOrder(long l) - { - return (((long) changeByteOrder((int) (l)) << 32) | (changeByteOrder((int) (l >> 32)) & 0xffffffffL)); - } - - /** - * Changes the byte order of the bytes constituting <var>d</var>. - */ - public static double changeByteOrder(double d) - { - return Double.longBitsToDouble(changeByteOrder(Double.doubleToRawLongBits(d))); - } - - /** - * Copies a range from an array of <code>int</code> into an array of <code>byte</code>. - * - * @param inData The input array of <code>int</code> values. - * @param inStart The position in the input array <code>inData</code> of <code>int</code> to - * start - * @param outData The output array of <code>byte</code> values. - * @param outStart The start in the output array <code>byteData</code> of <code>byte</code> to - * start - * @param len The number of <code>int</code> to copy - * @param byteOrder The {@link ByteOrder}, encoding what byte order the <var>outData</var> - * should be in. - */ - public static void copyIntToByte(int[] inData, int inStart, byte[] outData, int outStart, - int len, ByteOrder byteOrder) - { - if (useNativeLib) - { - copyIntToByte(inData, inStart, outData, outStart, len, byteOrder.ordinal()); - } else - { - final ByteBuffer bb = ByteBuffer.wrap(outData, outStart, len * INT_SIZE); - bb.order(byteOrder.getNioByteOrder()); - bb.asIntBuffer().put(inData, inStart, len); - } - } - - /** - * Copies a range from an array of <code>byte</code> into an array of <code>int</code>. - * - * @param inData The input array of <code>byte</code> values. - * @param inStart The position in the input array <code>inData</code> of <code>byte</code> to - * start - * @param outData The output array of <code>int</code> values. - * @param outStart The start in the output array <code>byteData</code> of <code>int</code> to - * start - * @param len The number of <code>int</code> to copy - * @param byteOrder The {@link ByteOrder}, encoding what byte order the <var>outData</var> - * should be in. - */ - public static void copyByteToInt(byte[] inData, int inStart, int[] outData, int outStart, - int len, ByteOrder byteOrder) - { - if (useNativeLib) - { - copyByteToInt(inData, inStart, outData, outStart, len, byteOrder.ordinal()); - } else - { - final ByteBuffer bb = ByteBuffer.wrap(inData, inStart, len * INT_SIZE); - bb.order(byteOrder.getNioByteOrder()); - bb.asIntBuffer().get(outData, outStart, len); - } - } - - /** - * Copies a range from an array of <code>long</code> into an array of <code>byte</code>. - * - * @param inData The input array of <code>long</code> values. - * @param inStart The position in the input array <code>inData</code> of <code>long</code> to - * start - * @param outData The output array of <code>byte</code> values. - * @param outStart The start in the output array <code>byteData</code> of <code>byte</code> to - * start - * @param len The number of <code>long</code> to copy - * @param byteOrder The {@link ByteOrder}, encoding what byte order the <var>outData</var> - * should be in. - */ - public static void copyLongToByte(long[] inData, int inStart, byte[] outData, int outStart, - int len, ByteOrder byteOrder) - { - if (useNativeLib) - { - copyLongToByte(inData, inStart, outData, outStart, len, byteOrder.ordinal()); - } else - { - final ByteBuffer bb = ByteBuffer.wrap(outData, outStart, len * LONG_SIZE); - bb.order(byteOrder.getNioByteOrder()); - bb.asLongBuffer().put(inData, inStart, len); - } - } - - /** - * Copies a range from an array of <code>byte</code> into an array of <code>long</code>. - * - * @param inData The input array of <code>byte</code> values. - * @param inStart The position in the input array <code>inData</code> of <code>byte</code> to - * start - * @param outData The output array of <code>long</code> values. - * @param outStart The start in the output array <code>byteData</code> of <code>long</code> to - * start - * @param len The number of <code>long</code> to copy - * @param byteOrder The {@link ByteOrder}, encoding what byte order the <var>outData</var> - * should be in. - */ - public static void copyByteToLong(byte[] inData, int inStart, long[] outData, int outStart, - int len, ByteOrder byteOrder) - { - if (useNativeLib) - { - copyByteToLong(inData, inStart, outData, outStart, len, byteOrder.ordinal()); - } else - { - final ByteBuffer bb = ByteBuffer.wrap(inData, inStart, len * LONG_SIZE); - bb.order(byteOrder.getNioByteOrder()); - bb.asLongBuffer().get(outData, outStart, len); - } - } - - /** - * Copies a range from an array of <code>short</code> into an array of <code>byte</code>. - * - * @param inData The input array of <code>short</code> values. - * @param inStart The position in the input array <code>inData</code> of <code>short</code> to - * start - * @param outData The output array of <code>byte</code> values. - * @param outStart The start in the output array <code>byteData</code> of <code>byte</code> to - * start - * @param len The number of <code>short</code> to copy - * @param byteOrder The {@link ByteOrder}, encoding what byte order the <var>outData</var> - * should be in. - */ - public static void copyShortToByte(short[] inData, int inStart, byte[] outData, int outStart, - int len, ByteOrder byteOrder) - { - if (useNativeLib) - { - copyShortToByte(inData, inStart, outData, outStart, len, byteOrder.ordinal()); - } else - { - final ByteBuffer bb = ByteBuffer.wrap(outData, outStart, len * SHORT_SIZE); - bb.order(byteOrder.getNioByteOrder()); - bb.asShortBuffer().put(inData, inStart, len); - } - } - - /** - * Copies a range from an array of <code>char</code> into an array of <code>byte</code>. - * - * @param inData The input array of <code>char</code> values. - * @param inStart The position in the input array <code>inData</code> of <code>char</code> to - * start - * @param outData The output array of <code>byte</code> values. - * @param outStart The start in the output array <code>byteData</code> of <code>byte</code> to - * start - * @param len The number of <code>char</code> to copy - * @param byteOrder The {@link ByteOrder}, encoding what byte order the <var>outData</var> - * should be in. - */ - public static void copyCharToByte(char[] inData, int inStart, byte[] outData, int outStart, - int len, ByteOrder byteOrder) - { - if (useNativeLib) - { - copyCharToByte(inData, inStart, outData, outStart, len, byteOrder.ordinal()); - } else - { - final ByteBuffer bb = ByteBuffer.wrap(outData, outStart, len * SHORT_SIZE); - bb.order(byteOrder.getNioByteOrder()); - bb.asCharBuffer().put(inData, inStart, len); - } - } - - /** - * Copies a range from an array of <code>byte</code> into an array of <code>short</code>. - * - * @param inData The input array of <code>byte</code> values. - * @param inStart The position in the input array <code>inData</code> of <code>byte</code> to - * start - * @param outData The output array of <code>short</code> values. - * @param outStart The start in the output array <code>byteData</code> of <code>short</code> to - * start - * @param len The number of <code>short</code> to copy - * @param byteOrder The {@link ByteOrder}, encoding what byte order the <var>outData</var> - * should be in. - */ - public static void copyByteToShort(byte[] inData, int inStart, short[] outData, int outStart, - int len, ByteOrder byteOrder) - { - if (useNativeLib) - { - copyByteToShort(inData, inStart, outData, outStart, len, byteOrder.ordinal()); - } else - { - final ByteBuffer bb = ByteBuffer.wrap(inData, inStart, len * SHORT_SIZE); - bb.order(byteOrder.getNioByteOrder()); - bb.asShortBuffer().get(outData, outStart, len); - } - } - - /** - * Copies a range from an array of <code>byte</code> into an array of <code>char</code>. - * - * @param inData The input array of <code>byte</code> values. - * @param inStart The position in the input array <code>inData</code> of <code>byte</code> to - * start - * @param outData The output array of <code>short</code> values. - * @param outStart The start in the output array <code>byteData</code> of <code>short</code> to - * start - * @param len The number of <code>short</code> to copy - * @param byteOrder The {@link ByteOrder}, encoding what byte order the <var>outData</var> - * should be in. - */ - public static void copyByteToChar(byte[] inData, int inStart, char[] outData, int outStart, - int len, ByteOrder byteOrder) - { - if (useNativeLib) - { - copyByteToChar(inData, inStart, outData, outStart, len, byteOrder.ordinal()); - } else - { - final ByteBuffer bb = ByteBuffer.wrap(inData, inStart, len * CHAR_SIZE); - bb.order(byteOrder.getNioByteOrder()); - bb.asCharBuffer().get(outData, outStart, len); - } - } - - /** - * Copies a range from an array of <code>float</code> into an array of <code>byte</code>. - * - * @param inData The input array of <code>float</code> values. - * @param inStart The position in the input array <code>inData</code> of <code>float</code> to - * start - * @param outData The output array of <code>byte</code> values. - * @param outStart The start in the output array <code>byteData</code> of <code>byte</code> to - * start - * @param len The number of <code>float</code> to copy - * @param byteOrder The {@link ByteOrder}, encoding what byte order the <var>outData</var> - * should be in. - */ - public static void copyFloatToByte(float[] inData, int inStart, byte[] outData, int outStart, - int len, ByteOrder byteOrder) - { - if (useNativeLib) - { - copyFloatToByte(inData, inStart, outData, outStart, len, byteOrder.ordinal()); - } else - { - final ByteBuffer bb = ByteBuffer.wrap(outData, outStart, len * FLOAT_SIZE); - bb.order(byteOrder.getNioByteOrder()); - bb.asFloatBuffer().put(inData, inStart, len); - } - } - - /** - * Copies a range from an array of <code>byte</code> into an array of <code>float</code>. - * - * @param inData The input array of <code>byte</code> values. - * @param inStart The position in the input array <code>inData</code> of <code>byte</code> to - * start - * @param outData The output array of <code>float</code> values. - * @param outStart The start in the output array <code>byteData</code> of <code>float</code> to - * start - * @param len The number of <code>float</code> to copy - * @param byteOrder The {@link ByteOrder}, encoding what byte order the <var>outData</var> - * should be in. - */ - public static void copyByteToFloat(byte[] inData, int inStart, float[] outData, int outStart, - int len, ByteOrder byteOrder) - { - if (useNativeLib) - { - copyByteToFloat(inData, inStart, outData, outStart, len, byteOrder.ordinal()); - } else - { - final ByteBuffer bb = ByteBuffer.wrap(inData, inStart, len * FLOAT_SIZE); - bb.order(byteOrder.getNioByteOrder()); - bb.asFloatBuffer().get(outData, outStart, len); - } - } - - /** - * Copies a range from an array of <code>double</code> into an array of <code>byte</code>. - * - * @param inData The input array of <code>double</code> values. - * @param inStart The position in the input array <code>inData</code> of <code>double</code> to - * start - * @param outData The output array of <code>byte</code> values. - * @param outStart The start in the output array <code>byteData</code> of <code>byte</code> to - * start - * @param len The number of <code>double</code> to copy - * @param byteOrder The {@link ByteOrder}, encoding what byte order the <var>outData</var> - * should be in. - */ - public static void copyDoubleToByte(double[] inData, int inStart, byte[] outData, int outStart, - int len, ByteOrder byteOrder) - { - if (useNativeLib) - { - copyDoubleToByte(inData, inStart, outData, outStart, len, byteOrder.ordinal()); - } else - { - final ByteBuffer bb = ByteBuffer.wrap(outData, outStart, len * DOUBLE_SIZE); - bb.order(byteOrder.getNioByteOrder()); - bb.asDoubleBuffer().put(inData, inStart, len); - } - } - - /** - * Copies a range from an array of <code>byte</code> into an array of <code>double</code>. - * - * @param inData The input array of <code>byte</code> values. - * @param inStart The position in the input array <code>inData</code> of <code>byte</code> to - * start - * @param outData The output array of <code>double</code> values. - * @param outStart The start in the output array <code>byteData</code> of <code>double</code> to - * start - * @param len The number of <code>double</code> to copy - * @param byteOrder The {@link ByteOrder}, encoding what byte order the <var>outData</var> - * should be in. - */ - public static void copyByteToDouble(byte[] inData, int inStart, double[] outData, int outStart, - int len, ByteOrder byteOrder) - { - if (useNativeLib) - { - copyByteToDouble(inData, inStart, outData, outStart, len, byteOrder.ordinal()); - } else - { - final ByteBuffer bb = ByteBuffer.wrap(inData, inStart, len * DOUBLE_SIZE); - bb.order(byteOrder.getNioByteOrder()); - bb.asDoubleBuffer().get(outData, outStart, len); - } - } - - /** - * Converts a <code>byte[]</code> array into a <code>char[]</code> array. - * - * @param byteArr The <code>byte[]</code> to convert. - * @param byteOrder The byte order of <var>byteArr</var>. - * @param start The position in the <var>byteArr</var> to start the conversion. - * @param len The number of <code>short</code> values to convert. - * @return The <code>char[]</code> array. - */ - public static char[] byteToChar(byte[] byteArr, ByteOrder byteOrder, int start, int len) - { - final char[] array = new char[len]; - copyByteToChar(byteArr, start, array, 0, len, byteOrder); - return array; - } - - /** - * Converts a <code>byte[]</code> array into a <code>char[]</code> array. - * - * @param byteArr The <code>byte[]</code> to convert. - * @param byteOrder The byte order of <var>byteArr</var>. - * @return The <code>char[]</code> array. - */ - public static char[] byteToChar(byte[] byteArr, ByteOrder byteOrder) - { - if (byteArr.length % CHAR_SIZE != 0) - { - throw new IllegalArgumentException("Length of byteArr does not match size of data type"); - } - final int len = byteArr.length / SHORT_SIZE; - final char[] array = new char[len]; - copyByteToChar(byteArr, 0, array, 0, len, byteOrder); - return array; - } - - /** - * Converts a <code>byte[]</code> array into a <code>short[]</code> array. - * - * @param byteArr The <code>byte[]</code> to convert. - * @param byteOrder The byte order of <var>byteArr</var>. - * @param start The position in the <var>byteArr</var> to start the conversion. - * @param len The number of <code>short</code> values to convert. - * @return The <code>short[]</code> array. - */ - public static short[] byteToShort(byte[] byteArr, ByteOrder byteOrder, int start, int len) - { - final short[] array = new short[len]; - copyByteToShort(byteArr, start, array, 0, len, byteOrder); - return array; - } - - /** - * Converts a <code>byte[]</code> array into a <code>short[]</code> array. - * - * @param byteArr The <code>byte[]</code> to convert. - * @param byteOrder The byte order of <var>byteArr</var>. - * @return The <code>short[]</code> array. - */ - public static short[] byteToShort(byte[] byteArr, ByteOrder byteOrder) - { - if (byteArr.length % SHORT_SIZE != 0) - { - throw new IllegalArgumentException("Length of byteArr does not match size of data type"); - } - final int len = byteArr.length / SHORT_SIZE; - final short[] array = new short[len]; - copyByteToShort(byteArr, 0, array, 0, len, byteOrder); - return array; - } - - /** - * Converts a <code>short[]</code> array to a <code>byte[]</code> array. - * - * @param data The array to convert. - * @param byteOrder The byte order of the returned <code>byte[]</code>. - * @param start The position in <var>data</var> to start the conversion. - * @param len The number of <code>short</code> values to convert. - * @return The converted <code>byte[]</code> array. - */ - public static byte[] shortToByte(short[] data, ByteOrder byteOrder, int start, int len) - { - final byte[] byteArr = new byte[SHORT_SIZE * len]; - copyShortToByte(data, start, byteArr, 0, len, byteOrder); - return byteArr; - } - - /** - * Converts a <code>short[]</code> array to a <code>byte[]</code> array. - * - * @param data The array to convert. - * @param byteOrder The byte order of the returned <code>byte[]</code>. - * @return The converted <code>byte[]</code> array. - */ - public static byte[] shortToByte(short[] data, ByteOrder byteOrder) - { - final byte[] byteArr = new byte[SHORT_SIZE * data.length]; - copyShortToByte(data, 0, byteArr, 0, data.length, byteOrder); - return byteArr; - } - - /** - * Converts a <code>char[]</code> array to a <code>byte[]</code> array. - * - * @param data The array to convert. - * @param byteOrder The byte order of the returned <code>byte[]</code>. - * @param start The position in <var>data</var> to start the conversion. - * @param len The number of <code>char</code> values to convert. - * @return The converted <code>byte[]</code> array. - */ - public static byte[] charToByte(char[] data, ByteOrder byteOrder, int start, int len) - { - final byte[] byteArr = new byte[CHAR_SIZE * len]; - copyCharToByte(data, start, byteArr, 0, len, byteOrder); - return byteArr; - } - - /** - * Converts a <code>char[]</code> array to a <code>byte[]</code> array. - * - * @param data The array to convert. - * @param byteOrder The byte order of the returned <code>byte[]</code>. - * @return The converted <code>byte[]</code> array. - */ - public static byte[] charToByte(char[] data, ByteOrder byteOrder) - { - final byte[] byteArr = new byte[CHAR_SIZE * data.length]; - copyCharToByte(data, 0, byteArr, 0, data.length, byteOrder); - return byteArr; - } - - /** - * Converts a <code>byte[]</code> array into an <code>int[]</code> array. - * - * @param byteArr The <code>byte[]</code> to convert. - * @param byteOrder The byte order of <var>byteArr</var>. - * @param start The position in the <var>byteArr</var> to start the conversion. - * @param len The number of <code>int</code> values to convert. - * @return The <code>int[]</code> array. - */ - public static int[] byteToInt(byte[] byteArr, ByteOrder byteOrder, int start, int len) - { - final int[] array = new int[len]; - copyByteToInt(byteArr, start, array, 0, len, byteOrder); - return array; - } - - /** - * Converts a <code>byte[]</code> array into an <code>int[]</code> array. - * - * @param byteArr The <code>byte[]</code> to convert. - * @param byteOrder The byte order of <var>byteArr</var>. - * @return The <code>int[]</code> array. - */ - public static int[] byteToInt(byte[] byteArr, ByteOrder byteOrder) - { - if (byteArr.length % INT_SIZE != 0) - { - throw new IllegalArgumentException("Length of byteArr does not match size of data type"); - } - final int len = byteArr.length / INT_SIZE; - final int[] array = new int[len]; - copyByteToInt(byteArr, 0, array, 0, len, byteOrder); - return array; - } - - /** - * Converts a <code>int[]</code> array to a <code>byte[]</code> array. - * - * @param data The array to convert. - * @param byteOrder The byte order of the returned <code>byte[]</code>. - * @param start The position in <var>data</var> to start the conversion. - * @param len The number of <code>int</code> values to convert. - * @return The converted <code>byte[]</code> array. - */ - public static byte[] intToByte(int[] data, ByteOrder byteOrder, int start, int len) - { - final byte[] byteArr = new byte[INT_SIZE * len]; - copyIntToByte(data, start, byteArr, 0, len, byteOrder); - return byteArr; - } - - /** - * Converts a <code>int[]</code> array to a <code>byte[]</code> array. - * - * @param data The array to convert. - * @param byteOrder The byte order of the returned <code>byte[]</code>. - * @return The converted <code>byte[]</code> array. - */ - public static byte[] intToByte(int[] data, ByteOrder byteOrder) - { - final byte[] byteArr = new byte[INT_SIZE * data.length]; - copyIntToByte(data, 0, byteArr, 0, data.length, byteOrder); - return byteArr; - } - - /** - * Converts a <code>byte[]</code> array into a <code>long[]</code> array. - * - * @param byteArr The <code>byte[]</code> to convert. - * @param byteOrder The byte order of <var>byteArr</var>. - * @param start The position in the <var>byteArr</var> to start the conversion. - * @param len The number of <code>long</code> values to convert. - * @return The <code>long[]</code> array. - */ - public static long[] byteToLong(byte[] byteArr, ByteOrder byteOrder, int start, int len) - { - final long[] array = new long[len]; - copyByteToLong(byteArr, start, array, 0, len, byteOrder); - return array; - } - - /** - * Converts a <code>byte[]</code> array into a <code>long[]</code> array. - * - * @param byteArr The <code>byte[]</code> to convert. - * @param byteOrder The byte order of <var>byteArr</var>. - * @return The <code>long[]</code> array. - */ - public static long[] byteToLong(byte[] byteArr, ByteOrder byteOrder) - { - if (byteArr.length % LONG_SIZE != 0) - { - throw new IllegalArgumentException("Length of byteArr does not match size of data type"); - } - final int len = byteArr.length / LONG_SIZE; - final long[] array = new long[len]; - copyByteToLong(byteArr, 0, array, 0, len, byteOrder); - return array; - } - - /** - * Converts a <code>long[]</code> array to a <code>byte[]</code> array. - * - * @param data The array to convert. - * @param byteOrder The byte order of the returned <code>byte[]</code>. - * @param start The position in <var>data</var> to start the conversion. - * @param len The number of <code>long</code> values to convert. - * @return The converted <code>byte[]</code> array. - */ - public static byte[] longToByte(long[] data, ByteOrder byteOrder, int start, int len) - { - final byte[] byteArr = new byte[LONG_SIZE * len]; - copyLongToByte(data, start, byteArr, 0, len, byteOrder); - return byteArr; - } - - /** - * Converts a <code>long[]</code> array to a <code>byte[]</code> array. - * - * @param data The array to convert. - * @param byteOrder The byte order of the returned <code>byte[]</code>. - * @return The converted <code>byte[]</code> array. - */ - public static byte[] longToByte(long[] data, ByteOrder byteOrder) - { - final byte[] byteArr = new byte[LONG_SIZE * data.length]; - copyLongToByte(data, 0, byteArr, 0, data.length, byteOrder); - return byteArr; - } - - /** - * Converts a <code>byte[]</code> array into a <code>float[]</code> array. - * - * @param byteArr The <code>byte[]</code> to convert. - * @param byteOrder The byte order of <var>byteArr</var>. - * @param start The position in the <var>byteArr</var> to start the conversion. - * @param len The number of <code>float</code> values to convert. - * @return The <code>float[]</code> array. - */ - public static float[] byteToFloat(byte[] byteArr, ByteOrder byteOrder, int start, int len) - { - final float[] array = new float[len]; - copyByteToFloat(byteArr, start, array, 0, len, byteOrder); - return array; - } - - /** - * Converts a <code>byte[]</code> array into a <code>float[]</code> array. - * - * @param byteArr The <code>byte[]</code> to convert. - * @param byteOrder The byte order of <var>byteArr</var>. - * @return The <code>float[]</code> array. - */ - public static float[] byteToFloat(byte[] byteArr, ByteOrder byteOrder) - { - if (byteArr.length % FLOAT_SIZE != 0) - { - throw new IllegalArgumentException("Length of byteArr does not match size of data type"); - } - final int len = byteArr.length / FLOAT_SIZE; - final float[] array = new float[len]; - copyByteToFloat(byteArr, 0, array, 0, len, byteOrder); - return array; - } - - /** - * Converts a <code>float[]</code> array to a <code>byte[]</code> array. - * - * @param data The array to convert. - * @param byteOrder The byte order of the returned <code>byte[]</code>. - * @param start The position in <var>data</var> to start the conversion. - * @param len The number of <code>float</code> values to convert. - * @return The converted <code>byte[]</code> array. - */ - public static byte[] floatToByte(float[] data, ByteOrder byteOrder, int start, int len) - { - final byte[] byteArr = new byte[FLOAT_SIZE * len]; - copyFloatToByte(data, start, byteArr, 0, len, byteOrder); - return byteArr; - } - - /** - * Converts a <code>float[]</code> array to a <code>byte[]</code> array. - * - * @param data The array to convert. - * @param byteOrder The byte order of the returned <code>byte[]</code>. - * @return The converted <code>byte[]</code> array. - */ - public static byte[] floatToByte(float[] data, ByteOrder byteOrder) - { - final byte[] byteArr = new byte[FLOAT_SIZE * data.length]; - copyFloatToByte(data, 0, byteArr, 0, data.length, byteOrder); - return byteArr; - } - - /** - * Converts a <code>byte[]</code> array into a <code>double[]</code> array. - * - * @param byteArr The <code>byte[]</code> to convert. - * @param byteOrder The byte order of <var>byteArr</var>. - * @param start The position in the <var>byteArr</var> to start the conversion. - * @param len The number of <code>double</code> values to convert. - * @return The <code>double[]</code> array. - */ - public static double[] byteToDouble(byte[] byteArr, ByteOrder byteOrder, int start, int len) - { - final double[] array = new double[len]; - copyByteToDouble(byteArr, start, array, 0, len, byteOrder); - return array; - } - - /** - * Converts a <code>byte[]</code> array into a <code>double[]</code> array. - * - * @param byteArr The <code>byte[]</code> to convert. - * @param byteOrder The byte order of <var>byteArr</var>. - * @return The <code>double[]</code> array. - */ - public static double[] byteToDouble(byte[] byteArr, ByteOrder byteOrder) - { - if (byteArr.length % DOUBLE_SIZE != 0) - { - throw new IllegalArgumentException("Length of byteArr does not match size of data type"); - } - final int len = byteArr.length / DOUBLE_SIZE; - final double[] array = new double[len]; - copyByteToDouble(byteArr, 0, array, 0, len, byteOrder); - return array; - } - - /** - * Converts a <code>double[]</code> array to a <code>byte[]</code> array. - * - * @param data The array to convert. - * @param byteOrder The byte order of the returned <code>byte[]</code>. - * @param start The position in <var>data</var> to start the conversion. - * @param len The number of <code>double</code> values to convert. - * @return The converted <code>byte[]</code> array. - */ - public static byte[] doubleToByte(double[] data, ByteOrder byteOrder, int start, int len) - { - final byte[] byteArr = new byte[DOUBLE_SIZE * len]; - copyDoubleToByte(data, start, byteArr, 0, len, byteOrder); - return byteArr; - } - - /** - * Converts a <code>double[]</code> array to a <code>byte[]</code> array. - * - * @param data The array to convert. - * @param byteOrder The byte order of the returned <code>byte[]</code>. - * @return The converted <code>byte[]</code> array. - */ - public static byte[] doubleToByte(double[] data, ByteOrder byteOrder) - { - final byte[] byteArr = new byte[DOUBLE_SIZE * data.length]; - copyDoubleToByte(data, 0, byteArr, 0, data.length, byteOrder); - return byteArr; - } - -} diff --git a/base/source/java/ch/systemsx/cisd/base/convert/NativeTaggedArray.java b/base/source/java/ch/systemsx/cisd/base/convert/NativeTaggedArray.java deleted file mode 100644 index da8c6b8fcad0e763c32bb75fc5bca37af97cccd2..0000000000000000000000000000000000000000 --- a/base/source/java/ch/systemsx/cisd/base/convert/NativeTaggedArray.java +++ /dev/null @@ -1,672 +0,0 @@ -/* - * Copyright 2010 ETH Zuerich, CISD - * - * 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. - */ - -package ch.systemsx.cisd.base.convert; - -import static ch.systemsx.cisd.base.convert.NativeData.DOUBLE_SIZE; -import static ch.systemsx.cisd.base.convert.NativeData.FLOAT_SIZE; -import static ch.systemsx.cisd.base.convert.NativeData.INT_SIZE; -import static ch.systemsx.cisd.base.convert.NativeData.LONG_SIZE; -import static ch.systemsx.cisd.base.convert.NativeData.SHORT_SIZE; - -import ch.systemsx.cisd.base.convert.NativeData.ByteOrder; -import ch.systemsx.cisd.base.mdarray.MDAbstractArray; -import ch.systemsx.cisd.base.mdarray.MDDoubleArray; -import ch.systemsx.cisd.base.mdarray.MDFloatArray; -import ch.systemsx.cisd.base.mdarray.MDIntArray; -import ch.systemsx.cisd.base.mdarray.MDLongArray; -import ch.systemsx.cisd.base.mdarray.MDShortArray; - -/** - * A utility class that supports encoding and decoding of arrays of primitive number types to byte - * arrays such that the characteristics of the number type (float or integer, byte order, element - * size) and the dimensions are known and can be checked for correctness when converted back to the - * number type. - * - * @author Bernd Rinn - */ -public class NativeTaggedArray -{ - - private final static NativeData.ByteOrder NATIVE_BYTE_ORDER = NativeData.getNativeByteOrder(); - - private static final int MAGIC_SIZE = 3; - - private static final int RANK_SIZE = 1; - - private static final int RANK_INDEX = 3; - - private static final int LENGTH_SIZE = 4; - - private static final int LENGTH_INDEX = 4; - - private static final int RANK_1 = 1; - - /** - * A class to return the array encoding and dimensions of a native tagged array. - */ - public static class NativeArrayTag - { - private final NativeArrayEncoding encoding; - - private final int[] dimensions; - - NativeArrayTag(NativeArrayEncoding encoding, int[] dimensions) - { - this.encoding = encoding; - this.dimensions = dimensions; - } - - /** - * Returns the {@link NativeArrayEncoding} of the array. - */ - public NativeArrayEncoding getEncoding() - { - return encoding; - } - - /** - * Resurns the dimensions of the array. - */ - public int[] getDimensions() - { - return dimensions; - } - } - - /** - * Returns the array tag of the native tagged array encoded in <var>data</var>, or - * <code>null</code>, if <var>data</var> does not encode a native tagged array. - */ - public static NativeArrayTag tryGetArrayTag(byte[] data) - { - final NativeArrayEncoding encodingOrNull = NativeArrayEncoding.tryGetEncoding(data); - if (encodingOrNull == null) - { - return null; - } - final int rank = data[RANK_INDEX]; - final int[] dimensions = new int[rank]; - NativeData.copyByteToInt(data, LENGTH_INDEX, dimensions, 0, rank, - encodingOrNull.getByteOrder()); - return new NativeArrayTag(encodingOrNull, dimensions); - } - - // - // Float - // - - /** - * Converts <var>data</var> into a tagged array in native byte order. - */ - public static byte[] toByteArray(float[] data) - { - return toByteArray(data, NATIVE_BYTE_ORDER); - } - - /** - * Converts <var>data</var> into a tagged array in given byte order. - */ - public static byte[] toByteArray(float[] data, ByteOrder byteOrder) - { - final byte[] magic = - NativeArrayEncoding.tryGetFloatEncoding(byteOrder, (byte) FLOAT_SIZE).getMagic(); - assert magic.length == MAGIC_SIZE; - final int headerSize = MAGIC_SIZE + RANK_SIZE + 1 * LENGTH_SIZE; - final byte[] byteArr = new byte[headerSize + FLOAT_SIZE * data.length]; - System.arraycopy(magic, 0, byteArr, 0, MAGIC_SIZE); - byteArr[RANK_INDEX] = RANK_1; - NativeData.copyIntToByte(new int[] - { data.length }, 0, byteArr, LENGTH_INDEX, 1, byteOrder); - NativeData.copyFloatToByte(data, 0, byteArr, headerSize, data.length, byteOrder); - return byteArr; - } - - /** - * Converts <var>data</var> into a tagged array in native byte order. - */ - public static byte[] toByteArray(MDFloatArray data) - { - return toByteArray(data, NATIVE_BYTE_ORDER); - } - - /** - * Converts <var>data</var> into a tagged array in given byte order. - */ - public static byte[] toByteArray(MDFloatArray data, ByteOrder byteOrder) - { - final byte[] magic = - NativeArrayEncoding.tryGetFloatEncoding(byteOrder, (byte) FLOAT_SIZE).getMagic(); - assert magic.length == MAGIC_SIZE; - final byte rank = (byte) data.rank(); - final int headerSize = MAGIC_SIZE + RANK_SIZE + rank * LENGTH_SIZE; - final float[] flatDataArray = data.getAsFlatArray(); - final byte[] byteArr = new byte[headerSize + FLOAT_SIZE * flatDataArray.length]; - System.arraycopy(magic, 0, byteArr, 0, MAGIC_SIZE); - byteArr[RANK_INDEX] = rank; - NativeData.copyIntToByte(data.dimensions(), 0, byteArr, LENGTH_INDEX, rank, byteOrder); - NativeData.copyFloatToByte(flatDataArray, 0, byteArr, headerSize, flatDataArray.length, - byteOrder); - return byteArr; - } - - /** - * Returns the tagged array <var>data</var> as a float array or <code>null</code>, if - * <var>data</var> is not a tagged 1D float array. - */ - public static float[] tryToFloatArray1D(byte[] data) - { - final NativeArrayEncoding encoding = NativeArrayEncoding.tryGetEncoding(data); - if (encoding == null || encoding.isInteger() || encoding.getSizeInBytes() != FLOAT_SIZE) - { - return null; - } - final int rank = data[RANK_INDEX]; - if (rank != 1) - { - return null; - } - final int[] dimensions = new int[1]; - NativeData.copyByteToInt(data, LENGTH_INDEX, dimensions, 0, 1, encoding.getByteOrder()); - if (dimensions[0] * FLOAT_SIZE + LENGTH_INDEX + LENGTH_SIZE != data.length) - { - return null; - } - final float[] floatData = new float[dimensions[0]]; - NativeData.copyByteToFloat(data, LENGTH_INDEX + LENGTH_SIZE, floatData, 0, - floatData.length, encoding.getByteOrder()); - return floatData; - } - - /** - * Returns the tagged array <var>data</var> as a {@link MDFloatArray} or <code>null</code>, if - * <var>data</var> is not a tagged (multi-dimensional) float array. - */ - public static MDFloatArray tryToFloatArray(byte[] data) - { - final NativeArrayEncoding encoding = NativeArrayEncoding.tryGetEncoding(data); - if (encoding == null || encoding.isInteger() || encoding.getSizeInBytes() != FLOAT_SIZE) - { - return null; - } - final int rank = data[RANK_INDEX]; - final int[] dimensions = new int[rank]; - NativeData.copyByteToInt(data, LENGTH_INDEX, dimensions, 0, rank, encoding.getByteOrder()); - final int length = MDAbstractArray.getLength(dimensions); - final int headerSize = LENGTH_INDEX + rank * LENGTH_SIZE; - if (length * FLOAT_SIZE + headerSize != data.length) - { - return null; - } - final float[] intData = new float[length]; - NativeData.copyByteToFloat(data, headerSize, intData, 0, intData.length, - encoding.getByteOrder()); - return new MDFloatArray(intData, dimensions); - } - - // - // Double - // - - /** - * Converts <var>data</var> into a tagged array in native byte order. - */ - public static byte[] toByteArray(double[] data) - { - return toByteArray(data, NATIVE_BYTE_ORDER); - } - - /** - * Converts <var>data</var> into a tagged array in given byte order. - */ - public static byte[] toByteArray(double[] data, ByteOrder byteOrder) - { - final byte[] magic = - NativeArrayEncoding.tryGetFloatEncoding(byteOrder, (byte) DOUBLE_SIZE).getMagic(); - assert magic.length == MAGIC_SIZE; - final int headerSize = MAGIC_SIZE + RANK_SIZE + 1 * LENGTH_SIZE; - final byte[] byteArr = new byte[headerSize + DOUBLE_SIZE * data.length]; - System.arraycopy(magic, 0, byteArr, 0, MAGIC_SIZE); - byteArr[RANK_INDEX] = RANK_1; - NativeData.copyIntToByte(new int[] - { data.length }, 0, byteArr, LENGTH_INDEX, 1, byteOrder); - NativeData.copyDoubleToByte(data, 0, byteArr, headerSize, data.length, byteOrder); - return byteArr; - } - - /** - * Converts <var>data</var> into a tagged array in native byte order. - */ - public static byte[] toByteArray(MDDoubleArray data) - { - return toByteArray(data, NATIVE_BYTE_ORDER); - } - - /** - * Converts <var>data</var> into a tagged array in given byte order. - */ - public static byte[] toByteArray(MDDoubleArray data, ByteOrder byteOrder) - { - final byte[] magic = - NativeArrayEncoding.tryGetFloatEncoding(byteOrder, (byte) DOUBLE_SIZE).getMagic(); - assert magic.length == MAGIC_SIZE; - final byte rank = (byte) data.rank(); - final int headerSize = MAGIC_SIZE + RANK_SIZE + rank * LENGTH_SIZE; - final double[] flatDataArray = data.getAsFlatArray(); - final byte[] byteArr = new byte[headerSize + DOUBLE_SIZE * flatDataArray.length]; - System.arraycopy(magic, 0, byteArr, 0, MAGIC_SIZE); - byteArr[RANK_INDEX] = rank; - NativeData.copyIntToByte(data.dimensions(), 0, byteArr, LENGTH_INDEX, rank, byteOrder); - NativeData.copyDoubleToByte(flatDataArray, 0, byteArr, headerSize, flatDataArray.length, - byteOrder); - return byteArr; - } - - /** - * Returns the tagged array <var>data</var> as a double array or <code>null</code>, if - * <var>data</var> is not a tagged 1D double array. - */ - public static double[] tryToDoubleArray1D(byte[] data) - { - final NativeArrayEncoding encoding = NativeArrayEncoding.tryGetEncoding(data); - if (encoding == null || encoding.isInteger() || encoding.getSizeInBytes() != DOUBLE_SIZE) - { - return null; - } - final int rank = data[RANK_INDEX]; - if (rank != 1) - { - return null; - } - final int[] dimensions = new int[1]; - NativeData.copyByteToInt(data, LENGTH_INDEX, dimensions, 0, 1, encoding.getByteOrder()); - if (dimensions[0] * DOUBLE_SIZE + LENGTH_INDEX + LENGTH_SIZE != data.length) - { - return null; - } - final double[] doubleData = new double[dimensions[0]]; - NativeData.copyByteToDouble(data, LENGTH_INDEX + LENGTH_SIZE, doubleData, 0, - doubleData.length, encoding.getByteOrder()); - return doubleData; - } - - /** - * Returns the tagged array <var>data</var> as a {@link MDDoubleArray} or <code>null</code>, if - * <var>data</var> is not a tagged (multi-dimensional) double array. - */ - public static MDDoubleArray tryToDoubleArray(byte[] data) - { - final NativeArrayEncoding encoding = NativeArrayEncoding.tryGetEncoding(data); - if (encoding == null || encoding.isInteger() || encoding.getSizeInBytes() != DOUBLE_SIZE) - { - return null; - } - final int rank = data[RANK_INDEX]; - final int[] dimensions = new int[rank]; - NativeData.copyByteToInt(data, LENGTH_INDEX, dimensions, 0, rank, encoding.getByteOrder()); - final int length = MDAbstractArray.getLength(dimensions); - final int headerSize = LENGTH_INDEX + rank * LENGTH_SIZE; - if (length * DOUBLE_SIZE + headerSize != data.length) - { - return null; - } - final double[] intData = new double[length]; - NativeData.copyByteToDouble(data, headerSize, intData, 0, intData.length, - encoding.getByteOrder()); - return new MDDoubleArray(intData, dimensions); - } - - // - // Short - // - - /** - * Converts <var>data</var> into a tagged array in native byte order. - */ - public static byte[] toByteArray(short[] data) - { - return toByteArray(data, NATIVE_BYTE_ORDER); - } - - /** - * Converts <var>data</var> into a tagged array in given byte order. - */ - public static byte[] toByteArray(short[] data, ByteOrder byteOrder) - { - final byte[] magic = - NativeArrayEncoding.tryGetIntEncoding(byteOrder, (byte) SHORT_SIZE).getMagic(); - assert magic.length == MAGIC_SIZE; - final int headerSize = MAGIC_SIZE + RANK_SIZE + 1 * LENGTH_SIZE; - final byte[] byteArr = new byte[headerSize + SHORT_SIZE * data.length]; - System.arraycopy(magic, 0, byteArr, 0, MAGIC_SIZE); - byteArr[RANK_INDEX] = RANK_1; - NativeData.copyIntToByte(new int[] - { data.length }, 0, byteArr, LENGTH_INDEX, 1, byteOrder); - NativeData.copyShortToByte(data, 0, byteArr, headerSize, data.length, byteOrder); - return byteArr; - } - - /** - * Converts <var>data</var> into a tagged array in native byte order. - */ - public static byte[] toByteArray(MDShortArray data) - { - return toByteArray(data, NATIVE_BYTE_ORDER); - } - - /** - * Converts <var>data</var> into a tagged array in given byte order. - */ - public static byte[] toByteArray(MDShortArray data, ByteOrder byteOrder) - { - final byte[] magic = - NativeArrayEncoding.tryGetIntEncoding(byteOrder, (byte) SHORT_SIZE).getMagic(); - assert magic.length == MAGIC_SIZE; - final byte rank = (byte) data.rank(); - final int headerSize = MAGIC_SIZE + RANK_SIZE + rank * LENGTH_SIZE; - final short[] flatDataArray = data.getAsFlatArray(); - final byte[] byteArr = new byte[headerSize + SHORT_SIZE * flatDataArray.length]; - System.arraycopy(magic, 0, byteArr, 0, MAGIC_SIZE); - byteArr[RANK_INDEX] = rank; - NativeData.copyIntToByte(data.dimensions(), 0, byteArr, LENGTH_INDEX, rank, byteOrder); - NativeData.copyShortToByte(flatDataArray, 0, byteArr, headerSize, flatDataArray.length, - byteOrder); - return byteArr; - } - - /** - * Returns the tagged array <var>data</var> as a short array or <code>null</code>, if - * <var>data</var> is not a tagged 1D short array. - */ - public static short[] tryToShortArray1D(byte[] data) - { - final NativeArrayEncoding encoding = NativeArrayEncoding.tryGetEncoding(data); - if (encoding == null || encoding.isFloatingPoint() - || encoding.getSizeInBytes() != SHORT_SIZE) - { - return null; - } - final int rank = data[RANK_INDEX]; - if (rank != 1) - { - return null; - } - final int[] dimensions = new int[1]; - NativeData.copyByteToInt(data, LENGTH_INDEX, dimensions, 0, 1, encoding.getByteOrder()); - if (dimensions[0] * SHORT_SIZE + LENGTH_INDEX + LENGTH_SIZE != data.length) - { - return null; - } - final short[] shortData = new short[dimensions[0]]; - NativeData.copyByteToShort(data, LENGTH_INDEX + LENGTH_SIZE, shortData, 0, - shortData.length, encoding.getByteOrder()); - return shortData; - } - - /** - * Returns the tagged array <var>data</var> as a {@link MDShortArray} or <code>null</code>, if - * <var>data</var> is not a tagged (multi-dimensional) short array. - */ - public static MDShortArray tryToShortArray(byte[] data) - { - final NativeArrayEncoding encoding = NativeArrayEncoding.tryGetEncoding(data); - if (encoding == null || encoding.isFloatingPoint() - || encoding.getSizeInBytes() != SHORT_SIZE) - { - return null; - } - final int rank = data[RANK_INDEX]; - final int[] dimensions = new int[rank]; - NativeData.copyByteToInt(data, LENGTH_INDEX, dimensions, 0, rank, encoding.getByteOrder()); - final int length = MDAbstractArray.getLength(dimensions); - final int headerSize = LENGTH_INDEX + rank * LENGTH_SIZE; - if (length * SHORT_SIZE + headerSize != data.length) - { - return null; - } - final short[] intData = new short[length]; - NativeData.copyByteToShort(data, headerSize, intData, 0, intData.length, - encoding.getByteOrder()); - return new MDShortArray(intData, dimensions); - } - - // - // Int - // - - /** - * Converts <var>data</var> into a tagged array in native byte order. - */ - public static byte[] toByteArray(int[] data) - { - return toByteArray(data, NATIVE_BYTE_ORDER); - } - - /** - * Converts <var>data</var> into a tagged array in given byte order. - */ - public static byte[] toByteArray(int[] data, ByteOrder byteOrder) - { - final byte[] magic = - NativeArrayEncoding.tryGetIntEncoding(byteOrder, (byte) INT_SIZE).getMagic(); - assert magic.length == MAGIC_SIZE; - final int headerSize = MAGIC_SIZE + RANK_SIZE + 1 * LENGTH_SIZE; - final byte[] byteArr = new byte[headerSize + INT_SIZE * data.length]; - System.arraycopy(magic, 0, byteArr, 0, MAGIC_SIZE); - byteArr[RANK_INDEX] = RANK_1; - NativeData.copyIntToByte(new int[] - { data.length }, 0, byteArr, LENGTH_INDEX, 1, byteOrder); - NativeData.copyIntToByte(data, 0, byteArr, headerSize, data.length, byteOrder); - return byteArr; - } - - /** - * Converts <var>data</var> into a tagged array in native byte order. - */ - public static byte[] toByteArray(MDIntArray data) - { - return toByteArray(data, NATIVE_BYTE_ORDER); - } - - /** - * Converts <var>data</var> into a tagged array in given byte order. - */ - public static byte[] toByteArray(MDIntArray data, ByteOrder byteOrder) - { - final byte[] magic = - NativeArrayEncoding.tryGetIntEncoding(byteOrder, (byte) INT_SIZE).getMagic(); - assert magic.length == MAGIC_SIZE; - final byte rank = (byte) data.rank(); - final int headerSize = MAGIC_SIZE + RANK_SIZE + rank * LENGTH_SIZE; - final int[] flatDataArray = data.getAsFlatArray(); - final byte[] byteArr = new byte[headerSize + INT_SIZE * flatDataArray.length]; - System.arraycopy(magic, 0, byteArr, 0, MAGIC_SIZE); - byteArr[RANK_INDEX] = rank; - NativeData.copyIntToByte(data.dimensions(), 0, byteArr, LENGTH_INDEX, rank, byteOrder); - NativeData.copyIntToByte(flatDataArray, 0, byteArr, headerSize, flatDataArray.length, - byteOrder); - return byteArr; - } - - /** - * Returns the tagged array <var>data</var> as an int array or <code>null</code>, if - * <var>data</var> is not a tagged 1D int array. - */ - public static int[] tryToIntArray1D(byte[] data) - { - final NativeArrayEncoding encoding = NativeArrayEncoding.tryGetEncoding(data); - if (encoding == null || encoding.isFloatingPoint() || encoding.getSizeInBytes() != INT_SIZE) - { - return null; - } - final int rank = data[RANK_INDEX]; - if (rank != 1) - { - return null; - } - final int[] dimensions = new int[1]; - NativeData.copyByteToInt(data, LENGTH_INDEX, dimensions, 0, 1, encoding.getByteOrder()); - if (dimensions[0] * INT_SIZE + LENGTH_INDEX + LENGTH_SIZE != data.length) - { - return null; - } - final int[] intData = new int[dimensions[0]]; - NativeData.copyByteToInt(data, LENGTH_INDEX + LENGTH_SIZE, intData, 0, intData.length, - encoding.getByteOrder()); - return intData; - } - - /** - * Returns the tagged array <var>data</var> as a {@link MDIntArray} or <code>null</code>, if - * <var>data</var> is not a tagged (multi-dimensional) int array. - */ - public static MDIntArray tryToIntArray(byte[] data) - { - final NativeArrayEncoding encoding = NativeArrayEncoding.tryGetEncoding(data); - if (encoding == null || encoding.isFloatingPoint() || encoding.getSizeInBytes() != INT_SIZE) - { - return null; - } - final int rank = data[RANK_INDEX]; - final int[] dimensions = new int[rank]; - NativeData.copyByteToInt(data, LENGTH_INDEX, dimensions, 0, rank, encoding.getByteOrder()); - final int length = MDAbstractArray.getLength(dimensions); - final int headerSize = LENGTH_INDEX + rank * LENGTH_SIZE; - if (length * INT_SIZE + headerSize != data.length) - { - return null; - } - final int[] intData = new int[length]; - NativeData.copyByteToInt(data, headerSize, intData, 0, intData.length, - encoding.getByteOrder()); - return new MDIntArray(intData, dimensions); - } - - // - // Long - // - - /** - * Converts <var>data</var> into a tagged array in native byte order. - */ - public static byte[] toByteArray(long[] data) - { - return toByteArray(data, NATIVE_BYTE_ORDER); - } - - /** - * Converts <var>data</var> into a tagged array in given byte order. - */ - public static byte[] toByteArray(long[] data, ByteOrder byteOrder) - { - final byte[] magic = - NativeArrayEncoding.tryGetIntEncoding(byteOrder, (byte) LONG_SIZE).getMagic(); - assert magic.length == MAGIC_SIZE; - final int headerSize = MAGIC_SIZE + RANK_SIZE + 1 * LENGTH_SIZE; - final byte[] byteArr = new byte[headerSize + LONG_SIZE * data.length]; - System.arraycopy(magic, 0, byteArr, 0, MAGIC_SIZE); - byteArr[RANK_INDEX] = RANK_1; - NativeData.copyIntToByte(new int[] - { data.length }, 0, byteArr, LENGTH_INDEX, 1, byteOrder); - NativeData.copyLongToByte(data, 0, byteArr, headerSize, data.length, byteOrder); - return byteArr; - } - - /** - * Converts <var>data</var> into a tagged array in native byte order. - */ - public static byte[] toByteArray(MDLongArray data) - { - return toByteArray(data, NATIVE_BYTE_ORDER); - } - - /** - * Converts <var>data</var> into a tagged array in given byte order. - */ - public static byte[] toByteArray(MDLongArray data, ByteOrder byteOrder) - { - final byte[] magic = - NativeArrayEncoding.tryGetIntEncoding(byteOrder, (byte) LONG_SIZE).getMagic(); - assert magic.length == MAGIC_SIZE; - final byte rank = (byte) data.rank(); - final int headerSize = MAGIC_SIZE + RANK_SIZE + rank * LENGTH_SIZE; - final long[] flatDataArray = data.getAsFlatArray(); - final byte[] byteArr = new byte[headerSize + LONG_SIZE * flatDataArray.length]; - System.arraycopy(magic, 0, byteArr, 0, MAGIC_SIZE); - byteArr[RANK_INDEX] = rank; - NativeData.copyIntToByte(data.dimensions(), 0, byteArr, LENGTH_INDEX, rank, byteOrder); - NativeData.copyLongToByte(flatDataArray, 0, byteArr, headerSize, flatDataArray.length, - byteOrder); - return byteArr; - } - - /** - * Returns the tagged array <var>data</var> as a long array or <code>null</code>, if - * <var>data</var> is not a tagged 1D long array. - */ - public static long[] tryToLongArray1D(byte[] data) - { - final NativeArrayEncoding encoding = NativeArrayEncoding.tryGetEncoding(data); - if (encoding == null || encoding.isFloatingPoint() - || encoding.getSizeInBytes() != LONG_SIZE) - { - return null; - } - final int rank = data[RANK_INDEX]; - if (rank != 1) - { - return null; - } - final int[] dimensions = new int[1]; - NativeData.copyByteToInt(data, LENGTH_INDEX, dimensions, 0, 1, encoding.getByteOrder()); - if (dimensions[0] * LONG_SIZE + LENGTH_INDEX + 1 * LENGTH_SIZE != data.length) - { - return null; - } - final long[] longData = new long[dimensions[0]]; - NativeData.copyByteToLong(data, LENGTH_INDEX + LENGTH_SIZE, longData, 0, longData.length, - encoding.getByteOrder()); - return longData; - } - - /** - * Returns the tagged array <var>data</var> as a {@link MDLongArray} or <code>null</code>, if - * <var>data</var> is not a tagged (multi-dimensional) long array. - */ - public static MDLongArray tryToLongArray(byte[] data) - { - final NativeArrayEncoding encoding = NativeArrayEncoding.tryGetEncoding(data); - if (encoding == null || encoding.isFloatingPoint() - || encoding.getSizeInBytes() != LONG_SIZE) - { - return null; - } - final int rank = data[RANK_INDEX]; - final int[] dimensions = new int[rank]; - NativeData.copyByteToInt(data, LENGTH_INDEX, dimensions, 0, rank, encoding.getByteOrder()); - final int length = MDAbstractArray.getLength(dimensions); - final int headerSize = LENGTH_INDEX + rank * LENGTH_SIZE; - if (length * LONG_SIZE + headerSize != data.length) - { - return null; - } - final long[] longData = new long[length]; - NativeData.copyByteToLong(data, headerSize, longData, 0, longData.length, - encoding.getByteOrder()); - return new MDLongArray(longData, dimensions); - } - -} diff --git a/base/source/java/ch/systemsx/cisd/base/exceptions/CheckedExceptionTunnel.java b/base/source/java/ch/systemsx/cisd/base/exceptions/CheckedExceptionTunnel.java deleted file mode 100644 index c874c449eb06cf31a26d1af807f9f6dba9d2cb8f..0000000000000000000000000000000000000000 --- a/base/source/java/ch/systemsx/cisd/base/exceptions/CheckedExceptionTunnel.java +++ /dev/null @@ -1,285 +0,0 @@ -/* - * Copyright 2007 ETH Zuerich, CISD - * - * 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. - */ - -package ch.systemsx.cisd.base.exceptions; - -import java.io.IOException; -import java.io.PrintStream; -import java.io.PrintWriter; - -/** - * An exception for tunneling checked exception through code that doesn't expect it. - * - * @author Bernd Rinn - */ -public class CheckedExceptionTunnel extends RuntimeException -{ - - private static final long serialVersionUID = 1L; - - /** - * Returns an unchecked exception from a <var>checkedException</var>. - * - * @param checkedExceptionOrNull The checked exception to tunnel. - */ - public CheckedExceptionTunnel(final Exception checkedExceptionOrNull) - { - super(checkedExceptionOrNull); - - assert (checkedExceptionOrNull instanceof RuntimeException) == false; - } - - protected CheckedExceptionTunnel(final String msg) - { - super(msg); - } - - protected CheckedExceptionTunnel() - { - } - - @Override - public String getMessage() - { - if (getCause() != null && getCause().getMessage() != null) - { - return getCause().getMessage(); - } - return super.getMessage(); - } - - @Override - public String toString() - { - if (getCause() != null) - { - return getCause().toString(); - } - return super.toString(); - } - - @Override - public void printStackTrace(PrintStream s) - { - if (getCause() != null) - { - getCause().printStackTrace(s); - } else - { - super.printStackTrace(s); - } - } - - @Override - public void printStackTrace(PrintWriter s) - { - if (getCause() != null) - { - getCause().printStackTrace(s); - } else - { - super.printStackTrace(s); - } - } - - /** - * Like {@link #printStackTrace()}, but includes the tunnel's stacktrace as well. - */ - public void printFullStackTrace() - { - printFullStackTrace(System.err); - } - - /** - * Like {@link #printStackTrace(PrintStream)}, but includes the tunnel's stacktrace as well. - */ - public void printFullStackTrace(PrintStream s) - { - synchronized (s) { - s.println(super.toString()); - StackTraceElement[] trace = getStackTrace(); - for (int i=0; i < trace.length; i++) - s.println("\tat " + trace[i]); - - Throwable ourCause = getCause(); - if (ourCause != null) - { - printStackTraceAsCause(ourCause, s, trace); - } - } - } - - /** - * Print our stack trace as a cause for the specified stack trace. - */ - private static void printStackTraceAsCause(Throwable cause, PrintStream s, - StackTraceElement[] causedTrace) - { - final StackTraceElement[] trace = cause.getStackTrace(); - int m = trace.length-1, n = causedTrace.length-1; - while (m >= 0 && n >=0 && trace[m].equals(causedTrace[n])) { - m--; n--; - } - final int framesInCommon = trace.length - 1 - m; - - s.println("Caused by: " + cause); - for (int i=0; i <= m; i++) - s.println("\tat " + trace[i]); - if (framesInCommon != 0) - s.println("\t... " + framesInCommon + " more"); - - final Throwable ourCauseesCause = cause.getCause(); - if (ourCauseesCause != null) - { - printStackTraceAsCause(ourCauseesCause, s, trace); - } - } - - /** - * Like {@link #printStackTrace(PrintWriter)}, but includes the tunnel's stacktrace as well. - */ - public void printFullStackTrace(PrintWriter s) - { - synchronized (s) { - s.println(super.toString()); - StackTraceElement[] trace = getStackTrace(); - for (int i=0; i < trace.length; i++) - s.println("\tat " + trace[i]); - - Throwable ourCause = getCause(); - if (ourCause != null) - { - printStackTraceAsCause(ourCause, s, trace); - } - } - } - - /** - * Print our stack trace as a cause for the specified stack trace. - */ - private static void printStackTraceAsCause(Throwable cause, PrintWriter s, - StackTraceElement[] causedTrace) - { - final StackTraceElement[] trace = cause.getStackTrace(); - int m = trace.length-1, n = causedTrace.length-1; - while (m >= 0 && n >=0 && trace[m].equals(causedTrace[n])) { - m--; n--; - } - final int framesInCommon = trace.length - 1 - m; - - s.println("Caused by: " + cause); - for (int i=0; i <= m; i++) - s.println("\tat " + trace[i]); - if (framesInCommon != 0) - s.println("\t... " + framesInCommon + " more"); - - final Throwable ourCauseesCause = cause.getCause(); - if (ourCauseesCause != null) - { - printStackTraceAsCause(ourCauseesCause, s, trace); - } - } - - /** - * Convenience wrapper for {@link #wrapIfNecessary(Exception)}. If <var>throwable</var> is an - * {@link Error}, this method will not return but the error will be thrown. - * - * @param throwable The exception to represent by the return value. - * @return A {@link RuntimeException} representing the <var>throwable</var>. - * @throws Error If <var>throwable</var> is an {@link Error} (except when it is a - * {@link ThreadDeath}, which returns a {@link InterruptedExceptionUnchecked}). - */ - public final static RuntimeException wrapIfNecessary(final Throwable throwable) throws Error - { - if (throwable instanceof Error) - { - if (throwable instanceof ThreadDeath) - { - return new InterruptedExceptionUnchecked(); - } else - { - throw (Error) throwable; - } - } - return wrapIfNecessary((Exception) throwable); - } - - /** - * Returns a {@link RuntimeException} from an <var>exception</var>. If <var>exception</var> is - * already a {@link RuntimeException}, itself is returned, otherwise an appropriate unchecked - * equivalent. If no unchecked equivalent exists, a {@link CheckedExceptionTunnel} is returned - * with <var>exception</var> as checked exception argument. - * - * @param exception The exception to represent by the return value. - * @return A {@link RuntimeException} representing the <var>exception</var>. - */ - public final static RuntimeException wrapIfNecessary(final Exception exception) - { - if (exception instanceof RuntimeException) - { - return (RuntimeException) exception; - } - if (exception instanceof IOException) - { - return new IOExceptionUnchecked((IOException) exception); - } - if (exception instanceof InterruptedException) - { - return new InterruptedExceptionUnchecked((InterruptedException) exception); - } - if (exception instanceof java.util.concurrent.TimeoutException) - { - return new TimeoutExceptionUnchecked((java.util.concurrent.TimeoutException) exception); - } - return new CheckedExceptionTunnel(exception); - } - - /** - * Returns the original exception before being wrapped, if the exception has been wrapped, or - * <var>exception</var> otherwise. - */ - public final static Exception unwrapIfNecessary(final Exception exception) - { - assert exception != null : "Exception not specified."; - if (exception instanceof CheckedExceptionTunnel) - { - // We are sure that the wrapped exception is an 'Exception'. - final Exception causeOrNull = (Exception) exception.getCause(); - if (causeOrNull != null) - { - return causeOrNull; - } - } - return exception; - } - - /** - * Returns the original throwable before being wrapped, if the throwable has been wrapped, or - * <var>exception</var> otherwise. - */ - public final static Throwable unwrapIfNecessary(final Throwable throwable) - { - assert throwable != null : "Exception not specified."; - if (throwable instanceof Error) - { - return throwable; - } else - { - return unwrapIfNecessary((Exception) throwable); - } - } - -} diff --git a/base/source/java/ch/systemsx/cisd/base/exceptions/IErrorStrategy.java b/base/source/java/ch/systemsx/cisd/base/exceptions/IErrorStrategy.java deleted file mode 100644 index cfd17ee2f1c9152c411ee54e673a40f1b02e6f19..0000000000000000000000000000000000000000 --- a/base/source/java/ch/systemsx/cisd/base/exceptions/IErrorStrategy.java +++ /dev/null @@ -1,56 +0,0 @@ -/* - * Copyright 2012 ETH Zuerich, CISD - * - * 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. - */ - -package ch.systemsx.cisd.base.exceptions; - -/** - * A strategy role for dealing with errors. - * - * @author Bernd Rinn - */ -public interface IErrorStrategy -{ - /** - * The default error strategy, just re-throws the exception. - */ - public static final IErrorStrategy DEFAULT_ERROR_STRATEGY = new IErrorStrategy() - { - @Override - public void dealWithError(Throwable th) throws RuntimeException, Error - { - throw CheckedExceptionTunnel.wrapIfNecessary(th); - } - - @Override - public void warning(String message) - { - System.err.println(message); - } - }; - - /** - * Called when an exception <var>ex</var> has occurred. Can, but doesn't have to, abort the - * operation by re-throwing the exception. - * - * @throws RuntimeException if the operation should be aborted. - */ - public void dealWithError(final Throwable th) throws RuntimeException, Error; - - /** - * Called to issue a warning message. - */ - public void warning(String message); -} diff --git a/base/source/java/ch/systemsx/cisd/base/exceptions/IOExceptionUnchecked.java b/base/source/java/ch/systemsx/cisd/base/exceptions/IOExceptionUnchecked.java deleted file mode 100644 index caa7b39f031bef15fd3cb0a3c30caf0e9db13abf..0000000000000000000000000000000000000000 --- a/base/source/java/ch/systemsx/cisd/base/exceptions/IOExceptionUnchecked.java +++ /dev/null @@ -1,81 +0,0 @@ -/* - * Copyright 2008 ETH Zuerich, CISD - * - * 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. - */ - -package ch.systemsx.cisd.base.exceptions; - -import java.io.IOException; - -/** - * A {@link CheckedExceptionTunnel} for an {@link IOException}. - * - * @author Bernd Rinn - */ -public class IOExceptionUnchecked extends CheckedExceptionTunnel -{ - private static final long serialVersionUID = 1L; - - /** - * Returns an <code>IOExceptionUnchecked</code> from a <code>IOException</code>. - * - * @param checkedException The checked exception to tunnel. - */ - public IOExceptionUnchecked(final IOException checkedException) - { - super(checkedException); - - assert checkedException != null; - } - - /** - * Returns an <code>IOExceptionUnchecked</code> from a newly created <code>IOException</code> - * with given <var>msg</var>. - * - * @param msg The checked exception to tunnel. - */ - public IOExceptionUnchecked(final String msg) - { - this(new IOException(msg)); - } - - private static IOException createIOException(final Throwable throwable) - { - final IOException ioe = - new IOException(throwable.getClass().getSimpleName() + ": " - + throwable.getMessage()); - ioe.initCause(throwable); - return ioe; - } - - /** - * Returns an <code>IOExceptionUnchecked</code> from newly created <code>IOException</code> with - * given <var>throwable</var> as its cause. - * - * @param throwable The throwable to use the cause of the created <code>IOException</code>. - */ - public IOExceptionUnchecked(final Throwable throwable) - { - super(createIOException(throwable)); - - assert throwable != null; - } - - @Override - public IOException getCause() - { - return (IOException) super.getCause(); - } - -} diff --git a/base/source/java/ch/systemsx/cisd/base/exceptions/InterruptedExceptionUnchecked.java b/base/source/java/ch/systemsx/cisd/base/exceptions/InterruptedExceptionUnchecked.java deleted file mode 100644 index d4200529ab4d045df5591117741e8efa237cb5f8..0000000000000000000000000000000000000000 --- a/base/source/java/ch/systemsx/cisd/base/exceptions/InterruptedExceptionUnchecked.java +++ /dev/null @@ -1,61 +0,0 @@ -/* - * Copyright 2008 ETH Zuerich, CISD - * - * 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. - */ - -package ch.systemsx.cisd.base.exceptions; - -/** - * Exception that signals that whoever gets it should stop its current work. This is an unchecked - * equivalent to an {@link InterruptedException}. - * <p> - * This is usually triggered by interrupting the thread that the work package is processed in and - * regularly checking with {@link #check()}. - * </p> - * - * @author Bernd Rinn - */ -public class InterruptedExceptionUnchecked extends CheckedExceptionTunnel -{ - - private static final long serialVersionUID = 1L; - - public InterruptedExceptionUnchecked() - { - super(); - } - - public InterruptedExceptionUnchecked(final InterruptedException cause) - { - super(cause); - } - - /** - * Checks whether the current thread has been interrupted and, if it has, throw a - * {@link InterruptedExceptionUnchecked}. - */ - public final static void check() throws InterruptedExceptionUnchecked - { - if (Thread.interrupted()) - { - throw new InterruptedExceptionUnchecked(); - } - } - - @Override - public InterruptedException getCause() - { - return (InterruptedException) super.getCause(); - } -} diff --git a/base/source/java/ch/systemsx/cisd/base/exceptions/TimeoutExceptionUnchecked.java b/base/source/java/ch/systemsx/cisd/base/exceptions/TimeoutExceptionUnchecked.java deleted file mode 100644 index 2768a8bce38d42ed07e62b91de6d4fc5838d448c..0000000000000000000000000000000000000000 --- a/base/source/java/ch/systemsx/cisd/base/exceptions/TimeoutExceptionUnchecked.java +++ /dev/null @@ -1,52 +0,0 @@ -/* - * Copyright 2008 ETH Zuerich, CISD - * - * 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. - */ - -package ch.systemsx.cisd.base.exceptions; - -import java.util.concurrent.TimeoutException; - -/** - * Exception thrown when a blocking operation times out. This is an unchecked equivalent of - * {@link TimeoutException}, that is it is derived from {@link CheckedExceptionTunnel}. - * - * @author Bernd Rinn - */ -public class TimeoutExceptionUnchecked extends CheckedExceptionTunnel -{ - - private static final long serialVersionUID = 1L; - - public TimeoutExceptionUnchecked() - { - } - - public TimeoutExceptionUnchecked(String msg) - { - super(msg); - } - - public TimeoutExceptionUnchecked(java.util.concurrent.TimeoutException cause) - { - super(cause); - } - - @Override - public TimeoutException getCause() - { - return (TimeoutException) super.getCause(); - } - -} \ No newline at end of file diff --git a/base/source/java/ch/systemsx/cisd/base/exceptions/package.html b/base/source/java/ch/systemsx/cisd/base/exceptions/package.html deleted file mode 100644 index b5b2cd121183f1c2d4902c081f0de1c33847d4e7..0000000000000000000000000000000000000000 --- a/base/source/java/ch/systemsx/cisd/base/exceptions/package.html +++ /dev/null @@ -1,13 +0,0 @@ -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" - "http://www.w3.org/TR/html4/loose.dtd"> -<html> -<head> -<title>Exceptions.</title> -</head> -<body> -<p> -This package provides basic exceptions thrown by CISD software. Note that all exceptions are -unchecked. -</p> -</body> -</html> \ No newline at end of file diff --git a/base/source/java/ch/systemsx/cisd/base/image/IImageTransformer.java b/base/source/java/ch/systemsx/cisd/base/image/IImageTransformer.java deleted file mode 100644 index bcc9599a2c963b1850a2895cedc1c1137af6aa69..0000000000000000000000000000000000000000 --- a/base/source/java/ch/systemsx/cisd/base/image/IImageTransformer.java +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright 2010 ETH Zuerich, CISD - * - * 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. - */ - -package ch.systemsx.cisd.base.image; - -import java.awt.image.BufferedImage; - -/** - * Interface for classes which can transform images. The transformation depends only on some - * parameters and an image as input. - * - * @author Franz-Josef Elmer - */ -public interface IImageTransformer -{ - /** - * Transforms the specified image. The transformation must <i>not</i> change the input image. - * - * @return The transformed image. - */ - public BufferedImage transform(BufferedImage image); -} diff --git a/base/source/java/ch/systemsx/cisd/base/image/IStreamingImageTransformer.java b/base/source/java/ch/systemsx/cisd/base/image/IStreamingImageTransformer.java deleted file mode 100644 index 5520617fef33a5c16efa9f60226cba32caeefb03..0000000000000000000000000000000000000000 --- a/base/source/java/ch/systemsx/cisd/base/image/IStreamingImageTransformer.java +++ /dev/null @@ -1,53 +0,0 @@ -/* - * Copyright 2011 ETH Zuerich, CISD - * - * 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. - */ - -package ch.systemsx.cisd.base.image; - -import java.awt.image.BufferedImage; -import java.io.InputStream; -import java.io.OutputStream; - -import ch.systemsx.cisd.base.image.IImageTransformer; - -/** - * Interface for classes which can transform images in a streaming mode. The transformation depends - * only on some parameters and an image as stream of bytes. - * - * @author Bernd Rinn - */ -public interface IStreamingImageTransformer extends IImageTransformer -{ - - /** - * Transforms the image provided as the <var>input</var> stream. - * - * @return The transformed image. - */ - public BufferedImage transform(InputStream input); - - /** - * Transforms the image provided as the <var>input</var> stream. - * - * @return The transformed image as a byte array that constitutes a PNG file. - */ - public byte[] transformToPNG(InputStream input); - - /** - * Transforms the image provided as the <var>input</var> stream. Writes the transformed PNG file - * to the <var>output</var> stream. - */ - public void transformToPNGStream(InputStream input, OutputStream output); -} diff --git a/base/source/java/ch/systemsx/cisd/base/image/IStreamingImageTransformerFactory.java b/base/source/java/ch/systemsx/cisd/base/image/IStreamingImageTransformerFactory.java deleted file mode 100644 index 6b4e06f561e1534c79f6a995c37dde8ea4d233f8..0000000000000000000000000000000000000000 --- a/base/source/java/ch/systemsx/cisd/base/image/IStreamingImageTransformerFactory.java +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Copyright 2011 ETH Zuerich, CISD - * - * 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. - */ - -package ch.systemsx.cisd.base.image; - -import ch.systemsx.cisd.base.annotation.JsonObject; -import ch.systemsx.cisd.base.image.IImageTransformerFactory; - -/** - * Factory creating an {@link IStreamingImageTransformer}. The parameters of the transformer should - * be stored as serializable attributes of concrete implementations of this interface. - * - * @author Bernd Rinn - */ -@JsonObject(value="IStreamingImageTransformerFactory") -public interface IStreamingImageTransformerFactory extends IImageTransformerFactory -{ - /** - * Creates a transformer object based on the attributes of the factory. - */ - @Override - public IStreamingImageTransformer createTransformer(); -} diff --git a/base/source/java/ch/systemsx/cisd/base/io/AdapterIInputStreamToInputStream.java b/base/source/java/ch/systemsx/cisd/base/io/AdapterIInputStreamToInputStream.java deleted file mode 100644 index 08767664cb0a1975fb0603641331ee3571ce97ae..0000000000000000000000000000000000000000 --- a/base/source/java/ch/systemsx/cisd/base/io/AdapterIInputStreamToInputStream.java +++ /dev/null @@ -1,157 +0,0 @@ -/* - * Copyright 2008 ETH Zuerich, CISD - * - * 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. - */ - -package ch.systemsx.cisd.base.io; - -import java.io.IOException; -import java.io.InputStream; - -import ch.systemsx.cisd.base.exceptions.IOExceptionUnchecked; - -/** - * An adapter for {@link IInputStream} that extends {@link java.io.InputStream}. - * - * @author Bernd Rinn - */ -public class AdapterIInputStreamToInputStream extends InputStream -{ - - private final IInputStream delegate; - - public AdapterIInputStreamToInputStream(IInputStream delegate) - { - this.delegate = delegate; - } - - @Override - public int available() throws IOException - { - try - { - return delegate.available(); - } catch (IOExceptionUnchecked ex) - { - throw ex.getCause(); - } - } - - @Override - public void close() throws IOException - { - try - { - delegate.close(); - } catch (IOExceptionUnchecked ex) - { - throw ex.getCause(); - } - } - - @Override - public synchronized void mark(int readlimit) - { - delegate.mark(readlimit); - } - - @Override - public boolean markSupported() - { - return delegate.markSupported(); - } - - @Override - public int read() throws IOException - { - try - { - return delegate.read(); - } catch (IOExceptionUnchecked ex) - { - throw ex.getCause(); - } - } - - @Override - public int read(byte[] b, int off, int len) throws IOException - { - try - { - return delegate.read(b, off, len); - } catch (IOExceptionUnchecked ex) - { - throw ex.getCause(); - } - } - - @Override - public int read(byte[] b) throws IOException - { - try - { - return delegate.read(b); - } catch (IOExceptionUnchecked ex) - { - throw ex.getCause(); - } - } - - @Override - public synchronized void reset() throws IOException - { - try - { - delegate.reset(); - } catch (IOExceptionUnchecked ex) - { - throw ex.getCause(); - } - } - - @Override - public long skip(long n) throws IOException - { - try - { - return delegate.skip(n); - } catch (IOExceptionUnchecked ex) - { - throw ex.getCause(); - } - } - - // - // Object - // - - @Override - public boolean equals(Object obj) - { - return delegate.equals(obj); - } - - @Override - public int hashCode() - { - return delegate.hashCode(); - } - - @Override - public String toString() - { - return delegate.toString(); - } - -} diff --git a/base/source/java/ch/systemsx/cisd/base/io/AdapterIOutputStreamToOutputStream.java b/base/source/java/ch/systemsx/cisd/base/io/AdapterIOutputStreamToOutputStream.java deleted file mode 100644 index 55b6e5f9c7f79a75f8925d1da3f82a1202ac0e12..0000000000000000000000000000000000000000 --- a/base/source/java/ch/systemsx/cisd/base/io/AdapterIOutputStreamToOutputStream.java +++ /dev/null @@ -1,121 +0,0 @@ -/* - * Copyright 2008 ETH Zuerich, CISD - * - * 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. - */ - -package ch.systemsx.cisd.base.io; - -import java.io.IOException; -import java.io.OutputStream; - -import ch.systemsx.cisd.base.exceptions.IOExceptionUnchecked; - -/** - * An adapter for {@link IOutputStream} that extends {@link java.io.OutputStream}. - * - * @author Bernd Rinn - */ -public class AdapterIOutputStreamToOutputStream extends OutputStream -{ - - private final IOutputStream delegate; - - public AdapterIOutputStreamToOutputStream(IOutputStream delegate) - { - this.delegate = delegate; - } - - @Override - public void write(int b) throws IOException - { - try - { - delegate.write(b); - } catch (IOExceptionUnchecked ex) - { - throw ex.getCause(); - } - } - - @Override - public void close() throws IOException - { - try - { - delegate.close(); - } catch (IOExceptionUnchecked ex) - { - throw ex.getCause(); - } - } - - @Override - public void flush() throws IOException - { - try - { - delegate.flush(); - } catch (IOExceptionUnchecked ex) - { - throw ex.getCause(); - } - } - - @Override - public void write(byte[] b, int off, int len) throws IOException - { - try - { - delegate.write(b, off, len); - } catch (IOExceptionUnchecked ex) - { - throw ex.getCause(); - } - } - - @Override - public void write(byte[] b) throws IOException - { - try - { - delegate.write(b); - } catch (IOExceptionUnchecked ex) - { - throw ex.getCause(); - } - } - - // - // Object - // - - @Override - public boolean equals(Object obj) - { - return delegate.equals(obj); - } - - @Override - public int hashCode() - { - return delegate.hashCode(); - } - - @Override - public String toString() - { - return delegate.toString(); - } - -} diff --git a/base/source/java/ch/systemsx/cisd/base/io/AdapterInputStreamToIInputStream.java b/base/source/java/ch/systemsx/cisd/base/io/AdapterInputStreamToIInputStream.java deleted file mode 100644 index c9e46a5ee442b90fc2c0452e0482eee1a1211c3a..0000000000000000000000000000000000000000 --- a/base/source/java/ch/systemsx/cisd/base/io/AdapterInputStreamToIInputStream.java +++ /dev/null @@ -1,157 +0,0 @@ -/* - * Copyright 2008 ETH Zuerich, CISD - * - * 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. - */ - -package ch.systemsx.cisd.base.io; - -import java.io.IOException; - -import ch.systemsx.cisd.base.exceptions.CheckedExceptionTunnel; -import ch.systemsx.cisd.base.exceptions.IOExceptionUnchecked; - -/** - * An adapter for {@link java.io.InputStream} that implements {@link IInputStream}. - * - * @author Bernd Rinn - */ -public class AdapterInputStreamToIInputStream implements IInputStream -{ - - private final java.io.InputStream delegate; - - public AdapterInputStreamToIInputStream(java.io.InputStream delegate) - { - this.delegate = delegate; - } - - @Override - public int available() throws IOExceptionUnchecked - { - try - { - return delegate.available(); - } catch (IOException ex) - { - throw CheckedExceptionTunnel.wrapIfNecessary(ex); - } - } - - @Override - public void close() throws IOExceptionUnchecked - { - try - { - delegate.close(); - } catch (IOException ex) - { - throw CheckedExceptionTunnel.wrapIfNecessary(ex); - } - } - - @Override - public void mark(int readlimit) - { - delegate.mark(readlimit); - } - - @Override - public boolean markSupported() - { - return delegate.markSupported(); - } - - @Override - public int read() throws IOExceptionUnchecked - { - try - { - return delegate.read(); - } catch (IOException ex) - { - throw CheckedExceptionTunnel.wrapIfNecessary(ex); - } - } - - @Override - public int read(byte[] b, int off, int len) throws IOExceptionUnchecked - { - try - { - return delegate.read(b, off, len); - } catch (IOException ex) - { - throw CheckedExceptionTunnel.wrapIfNecessary(ex); - } - } - - @Override - public int read(byte[] b) throws IOExceptionUnchecked - { - try - { - return delegate.read(b); - } catch (IOException ex) - { - throw CheckedExceptionTunnel.wrapIfNecessary(ex); - } - } - - @Override - public void reset() throws IOExceptionUnchecked - { - try - { - delegate.reset(); - } catch (IOException ex) - { - throw CheckedExceptionTunnel.wrapIfNecessary(ex); - } - } - - @Override - public long skip(long n) throws IOExceptionUnchecked - { - try - { - return delegate.skip(n); - } catch (IOException ex) - { - throw CheckedExceptionTunnel.wrapIfNecessary(ex); - } - } - - // - // Object - // - - @Override - public String toString() - { - return delegate.toString(); - } - - @Override - public boolean equals(Object obj) - { - return delegate.equals(obj); - } - - @Override - public int hashCode() - { - return delegate.hashCode(); - } - -} diff --git a/base/source/java/ch/systemsx/cisd/base/io/AdapterOutputStreamToIOutputStream.java b/base/source/java/ch/systemsx/cisd/base/io/AdapterOutputStreamToIOutputStream.java deleted file mode 100644 index 0720195778b3435d60bff4cfdc19e45ddead39c2..0000000000000000000000000000000000000000 --- a/base/source/java/ch/systemsx/cisd/base/io/AdapterOutputStreamToIOutputStream.java +++ /dev/null @@ -1,130 +0,0 @@ -/* - * Copyright 2008 ETH Zuerich, CISD - * - * 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. - */ - -package ch.systemsx.cisd.base.io; - -import java.io.IOException; - -import ch.systemsx.cisd.base.exceptions.IOExceptionUnchecked; - -/** - * An adapter for {@link java.io.OutputStream} that implements {@link IOutputStream}. - * - * @author Bernd Rinn - */ -public class AdapterOutputStreamToIOutputStream implements IOutputStream -{ - - private final java.io.OutputStream delegate; - - public AdapterOutputStreamToIOutputStream(java.io.OutputStream delegate) - { - this.delegate = delegate; - } - - // - // IOutputStream - // - - @Override - public void write(byte[] b, int off, int len) throws IOExceptionUnchecked - { - try - { - delegate.write(b, off, len); - } catch (IOException ex) - { - throw new IOExceptionUnchecked(ex); - } - } - - @Override - public void write(byte[] b) throws IOExceptionUnchecked - { - try - { - delegate.write(b); - } catch (IOException ex) - { - throw new IOExceptionUnchecked(ex); - } - } - - @Override - public void write(int b) throws IOExceptionUnchecked - { - try - { - delegate.write(b); - } catch (IOException ex) - { - throw new IOExceptionUnchecked(ex); - } - } - - @Override - public void close() throws IOExceptionUnchecked - { - try - { - delegate.close(); - } catch (IOException ex) - { - throw new IOExceptionUnchecked(ex); - } - } - - @Override - public void flush() throws IOExceptionUnchecked - { - try - { - delegate.flush(); - } catch (IOException ex) - { - throw new IOExceptionUnchecked(ex); - } - } - - @Override - public void synchronize() throws IOExceptionUnchecked - { - flush(); - } - - // - // Object - // - - @Override - public boolean equals(Object obj) - { - return delegate.equals(obj); - } - - @Override - public int hashCode() - { - return delegate.hashCode(); - } - - @Override - public String toString() - { - return delegate.toString(); - } - -} diff --git a/base/source/java/ch/systemsx/cisd/base/io/ByteBufferRandomAccessFile.java b/base/source/java/ch/systemsx/cisd/base/io/ByteBufferRandomAccessFile.java deleted file mode 100644 index 1055b8b0ae106d76073968a0c98d41685001d3ec..0000000000000000000000000000000000000000 --- a/base/source/java/ch/systemsx/cisd/base/io/ByteBufferRandomAccessFile.java +++ /dev/null @@ -1,455 +0,0 @@ -/* - * Copyright 2011 ETH Zuerich, CISD - * - * 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. - */ - -package ch.systemsx.cisd.base.io; - -import java.io.EOFException; -import java.io.UnsupportedEncodingException; -import java.nio.ByteBuffer; -import java.nio.ByteOrder; - -import ch.systemsx.cisd.base.convert.NativeData; -import ch.systemsx.cisd.base.exceptions.CheckedExceptionTunnel; -import ch.systemsx.cisd.base.exceptions.IOExceptionUnchecked; - -/** - * An implementation of {@link IRandomAccessFile} based on a {@link ByteBuffer}. - * <p> - * Does <i>not</i> implement {@link IRandomAccessFile#readLine()}. - * - * @author Bernd Rinn - */ -public class ByteBufferRandomAccessFile implements IRandomAccessFile -{ - - private final ByteBuffer buf; - - private void addToLength(int newItemLen) - { - final int rem = buf.remaining(); - if (newItemLen > rem) - { - buf.limit(buf.limit() + (newItemLen - rem)); - } - } - - /** - * Creates a {@link IRandomAccessFile} wrapper for the given <var>buf</var>. - * - * @param buf The buffer to wrap. - * @param initialLength The initially set length (corresponds to the {@link ByteBuffer#limit()} - * ). - */ - public ByteBufferRandomAccessFile(ByteBuffer buf, int initialLength) - { - this(buf); - setLength(initialLength); - } - - /** - * Creates a {@link IRandomAccessFile} wrapper for the given <var>buf</var>. Does not change the - * {@link ByteBuffer#limit()} of <var>buf</var>. - * - * @param buf The buffer to wrap. - */ - public ByteBufferRandomAccessFile(ByteBuffer buf) - { - this.buf = buf; - } - - /** - * Creates a {@link IRandomAccessFile} wrapper for the given <var>array</var>. - * - * @param array The byte array to wrap. - * @param initialLength The initially set length. - */ - public ByteBufferRandomAccessFile(byte[] array, int initialLength) - { - this(array); - setLength(initialLength); - } - - /** - * Creates a {@link IRandomAccessFile} wrapper for the given <var>array</var>. The initial - * {@link ByteBuffer#limit()} will be <code>array.length</code>. - * - * @param array The byte array to wrap. - */ - public ByteBufferRandomAccessFile(byte[] array) - { - this(ByteBuffer.wrap(array)); - } - - /** - * Creates a {@link IRandomAccessFile} wrapper for a {@link ByteBuffer} with - * <var>capacity</var>. The initial {@link ByteBuffer#limit()} will be <code>0</code>. - * - * @param capacity The maximal size of the {@link ByteBuffer}. - */ - public ByteBufferRandomAccessFile(int capacity) - { - this(ByteBuffer.allocate(capacity)); - setLength(0); - } - - @Override - public ByteOrder getByteOrder() - { - return buf.order(); - } - - @Override - public void setByteOrder(ByteOrder byteOrder) - { - buf.order(byteOrder); - } - - @Override - public void readFully(byte[] b) throws IOExceptionUnchecked - { - readFully(b, 0, b.length); - } - - @Override - public void readFully(byte[] b, int off, int len) throws IOExceptionUnchecked - { - if (available0() == -1) - { - throw new IOExceptionUnchecked(new EOFException()); - } else - { - buf.get(b, off, len); - } - } - - @Override - public int skipBytes(int n) throws IOExceptionUnchecked - { - if (n <= 0) - { - return 0; - } - final int pos = buf.position(); - final int len = buf.limit(); - final int newpos = Math.min(len, pos + n); - buf.position(newpos); - return (newpos - pos); - } - - @Override - public void close() throws IOExceptionUnchecked - { - // NOOP - } - - @Override - public int read() throws IOExceptionUnchecked - { - return buf.get() & 0xff; - } - - @Override - public int read(byte[] b) throws IOExceptionUnchecked - { - return read(b, 0, b.length); - } - - @Override - public int read(byte[] b, int off, int len) throws IOExceptionUnchecked - { - final int bytesRead = Math.min(available0(), len); - if (bytesRead < 0) - { - return bytesRead; - } - buf.get(b, off, bytesRead); - return bytesRead; - } - - @Override - public long skip(long n) throws IOExceptionUnchecked - { - if (n > Integer.MAX_VALUE) - { - throw new IndexOutOfBoundsException(); - } - return skipBytes((int) n); - } - - private int available0() throws IOExceptionUnchecked - { - return (buf.remaining() == 0) ? -1 : buf.remaining(); - } - - @Override - public int available() throws IOExceptionUnchecked - { - return buf.remaining(); - } - - @Override - public void mark(int readlimit) - { - buf.mark(); - } - - @Override - public void reset() throws IOExceptionUnchecked - { - buf.reset(); - } - - @Override - public boolean markSupported() - { - return true; - } - - @Override - public void flush() throws IOExceptionUnchecked - { - // NOOP - } - - @Override - public void synchronize() throws IOExceptionUnchecked - { - // NOOP - } - - @Override - public long getFilePointer() throws IOExceptionUnchecked - { - return buf.position(); - } - - @Override - public void seek(long pos) throws IOExceptionUnchecked - { - buf.position((int) pos); - } - - @Override - public long length() throws IOExceptionUnchecked - { - return buf.limit(); - } - - @Override - public void setLength(long newLength) throws IOExceptionUnchecked - { - buf.limit((int) newLength); - } - - @Override - public boolean readBoolean() throws IOExceptionUnchecked - { - return buf.get() != 0; - } - - @Override - public byte readByte() throws IOExceptionUnchecked - { - return buf.get(); - } - - @Override - public int readUnsignedByte() throws IOExceptionUnchecked - { - return buf.get() & 0xff; - } - - @Override - public short readShort() throws IOExceptionUnchecked - { - return buf.getShort(); - } - - @Override - public int readUnsignedShort() throws IOExceptionUnchecked - { - return buf.getShort() & 0xffff; - } - - @Override - public char readChar() throws IOExceptionUnchecked - { - return buf.getChar(); - } - - @Override - public int readInt() throws IOExceptionUnchecked - { - return buf.getInt(); - } - - @Override - public long readLong() throws IOExceptionUnchecked - { - return buf.getLong(); - } - - @Override - public float readFloat() throws IOExceptionUnchecked - { - return buf.getFloat(); - } - - @Override - public double readDouble() throws IOExceptionUnchecked - { - return buf.getDouble(); - } - - /** - * @throws UnsupportedOperationException - */ - @Override - public String readLine() throws UnsupportedOperationException - { - throw new UnsupportedOperationException(); - } - - @Override - public String readUTF() - { - try - { - final byte[] strBuf = new byte[readUnsignedShort()]; - buf.get(strBuf); - return new String(strBuf, "UTF-8"); - } catch (UnsupportedEncodingException ex) - { - throw CheckedExceptionTunnel.wrapIfNecessary(ex); - } - } - - @Override - public void write(int b) throws IOExceptionUnchecked - { - addToLength(1); - buf.put((byte) b); - } - - @Override - public void write(byte[] b) throws IOExceptionUnchecked - { - addToLength(b.length); - buf.put(b); - } - - @Override - public void write(byte[] b, int off, int len) throws IOExceptionUnchecked - { - addToLength(len); - buf.put(b, off, len); - } - - @Override - public void writeBoolean(boolean v) throws IOExceptionUnchecked - { - addToLength(1); - buf.put((byte) (v ? 1 : 0)); - } - - @Override - public void writeByte(int v) throws IOExceptionUnchecked - { - write((byte) v); - } - - @Override - public void writeShort(int v) throws IOExceptionUnchecked - { - addToLength(NativeData.SHORT_SIZE); - buf.putShort((short) v); - } - - @Override - public void writeChar(int v) throws IOExceptionUnchecked - { - addToLength(NativeData.CHAR_SIZE); - buf.putChar((char) v); - } - - @Override - public void writeInt(int v) throws IOExceptionUnchecked - { - addToLength(NativeData.INT_SIZE); - buf.putInt(v); - } - - @Override - public void writeLong(long v) throws IOExceptionUnchecked - { - addToLength(NativeData.LONG_SIZE); - buf.putLong(v); - } - - @Override - public void writeFloat(float v) throws IOExceptionUnchecked - { - addToLength(NativeData.FLOAT_SIZE); - buf.putFloat(v); - } - - @Override - public void writeDouble(double v) throws IOExceptionUnchecked - { - addToLength(NativeData.DOUBLE_SIZE); - buf.putDouble(v); - } - - @Override - public void writeBytes(String s) throws IOExceptionUnchecked - { - final int len = s.length(); - addToLength(len); - for (int i = 0; i < len; i++) - { - buf.put((byte) s.charAt(i)); - } - } - - @Override - public void writeChars(String s) throws IOExceptionUnchecked - { - final int len = s.length(); - addToLength(NativeData.CHAR_SIZE * len); - for (int i = 0; i < len; i++) - { - final int v = s.charAt(i); - buf.put((byte) ((v >>> 8) & 0xFF)); - buf.put((byte) ((v >>> 0) & 0xFF)); - } - } - - @Override - public void writeUTF(String str) throws UnsupportedOperationException - { - try - { - final byte[] strBuf = str.getBytes("UTF-8"); - addToLength(NativeData.SHORT_SIZE + strBuf.length); - writeShort(strBuf.length); - write(strBuf); - } catch (UnsupportedEncodingException ex) - { - throw CheckedExceptionTunnel.wrapIfNecessary(ex); - } - } - -} diff --git a/base/source/java/ch/systemsx/cisd/base/io/ICloseable.java b/base/source/java/ch/systemsx/cisd/base/io/ICloseable.java deleted file mode 100644 index 1f3073e2ee3622bee56533ac7c3f2f787e247db9..0000000000000000000000000000000000000000 --- a/base/source/java/ch/systemsx/cisd/base/io/ICloseable.java +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Copyright 2008 ETH Zuerich, CISD - * - * 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. - */ - -package ch.systemsx.cisd.base.io; - -import java.io.IOException; - -import ch.systemsx.cisd.base.exceptions.IOExceptionUnchecked; - -/** - * A role that allows to close resource. Like {@link java.io.Closeable} but doesn't throw an - * {@link IOException} but a {@link IOExceptionUnchecked} instead. - * - * @author Bernd Rinn - */ -public interface ICloseable -{ - - /** - * Closes the resource. - */ - public void close() throws IOExceptionUnchecked; - -} diff --git a/base/source/java/ch/systemsx/cisd/base/io/IInputStream.java b/base/source/java/ch/systemsx/cisd/base/io/IInputStream.java deleted file mode 100644 index c43e11289faa5ccc1738ce4b76ac8412b90d267d..0000000000000000000000000000000000000000 --- a/base/source/java/ch/systemsx/cisd/base/io/IInputStream.java +++ /dev/null @@ -1,74 +0,0 @@ -/* - * Copyright 2008 ETH Zuerich, CISD - * - * 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. - */ - -package ch.systemsx.cisd.base.io; - -import ch.systemsx.cisd.base.exceptions.IOExceptionUnchecked; - -/** - * An interface for {@link java.io.InputStream}. - * - * @author Bernd Rinn - */ -public interface IInputStream -{ - - /** - * @see java.io.InputStream#read() - */ - public int read() throws IOExceptionUnchecked; - - /** - * @see java.io.InputStream#read(byte[]) - */ - public int read(byte b[]) throws IOExceptionUnchecked; - - /** - * @see java.io.InputStream#read(byte[], int, int) - */ - public int read(byte b[], int off, int len) throws IOExceptionUnchecked; - - /** - * @see java.io.InputStream#skip(long) - */ - public long skip(long n) throws IOExceptionUnchecked; - - /** - * @see java.io.InputStream#available() - */ - public int available() throws IOExceptionUnchecked; - - /** - * @see java.io.InputStream#close() - */ - public void close() throws IOExceptionUnchecked; - - /** - * @see java.io.InputStream#mark(int) - */ - public void mark(int readlimit); - - /** - * @see java.io.InputStream#reset() - */ - public void reset() throws IOExceptionUnchecked; - - /** - * @see java.io.InputStream#markSupported() - */ - public boolean markSupported(); - -} diff --git a/base/source/java/ch/systemsx/cisd/base/io/IOutputStream.java b/base/source/java/ch/systemsx/cisd/base/io/IOutputStream.java deleted file mode 100644 index 7445d49595df8e55e8044c1c18e643cb0b8f9b06..0000000000000000000000000000000000000000 --- a/base/source/java/ch/systemsx/cisd/base/io/IOutputStream.java +++ /dev/null @@ -1,60 +0,0 @@ -/* - * Copyright 2008 ETH Zuerich, CISD - * - * 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. - */ - -package ch.systemsx.cisd.base.io; - -import ch.systemsx.cisd.base.exceptions.IOExceptionUnchecked; - -/** - * An interface for {@link java.io.OutputStream}. - * - * @author Bernd Rinn - */ -public interface IOutputStream extends ICloseable, ISynchronizable -{ - /** - * @see java.io.OutputStream#write(int) - */ - public void write(int b) throws IOExceptionUnchecked; - - /** - * @see java.io.OutputStream#write(byte[]) - */ - public void write(byte b[]) throws IOExceptionUnchecked; - - /** - * @see java.io.OutputStream#write(byte[], int, int) - */ - public void write(byte b[], int off, int len) throws IOExceptionUnchecked; - - /** - * @see java.io.OutputStream#flush() - */ - public void flush() throws IOExceptionUnchecked; - - /** - * @see java.io.OutputStream#flush() - */ - @Override - public void synchronize() throws IOExceptionUnchecked; - - /** - * @see java.io.OutputStream#close() - */ - @Override - public void close() throws IOExceptionUnchecked; - -} diff --git a/base/source/java/ch/systemsx/cisd/base/io/IRandomAccessFile.java b/base/source/java/ch/systemsx/cisd/base/io/IRandomAccessFile.java deleted file mode 100644 index 8cd83ec1150ac326f7976f60d12ddf76655e4849..0000000000000000000000000000000000000000 --- a/base/source/java/ch/systemsx/cisd/base/io/IRandomAccessFile.java +++ /dev/null @@ -1,278 +0,0 @@ -/* - * Copyright 2011 ETH Zuerich, CISD - * - * 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. - */ - -package ch.systemsx.cisd.base.io; - -import java.io.Closeable; -import java.io.DataInput; -import java.io.DataOutput; -import java.nio.ByteOrder; - -import ch.systemsx.cisd.base.exceptions.IOExceptionUnchecked; - -/** - * The interface of {@link java.io.RandomAccessFile}. - * - * @author Bernd Rinn - */ -public interface IRandomAccessFile extends DataInput, DataOutput, Closeable, IInputStream, - IOutputStream -{ - /** - * Gets the byte-order (endiness) of the random access file. Default is network-byte order - * (big-endian). - */ - public ByteOrder getByteOrder(); - - /** - * Sets the byte-order (endiness) of the random access file. - */ - public void setByteOrder(ByteOrder byteOrder); - - // - // RandomAccessFile - // - - /** - * Returns the current offset in this file. - * - * @return the offset from the beginning of the file, in bytes, at which the next read or write - * occurs. - * @exception IOExceptionUnchecked if an I/O error occurs. - */ - public long getFilePointer() throws IOExceptionUnchecked; - - /** - * Sets the file-pointer offset, measured from the beginning of this file, at which the next - * read or write occurs. The offset may be set beyond the end of the file. Setting the offset - * beyond the end of the file does not change the file length. The file length will change only - * by writing after the offset has been set beyond the end of the file. - * - * @param pos the offset position, measured in bytes from the beginning of the file, at which to - * set the file pointer. - * @exception IOExceptionUnchecked if <code>pos</code> is less than <code>0</code> or if an I/O - * error occurs. - */ - public void seek(long pos) throws IOExceptionUnchecked; - - /** - * Returns the length of this file. - * - * @return the length of this file, measured in bytes. - * @exception IOExceptionUnchecked if an I/O error occurs. - */ - public long length() throws IOExceptionUnchecked; - - /** - * Sets the length of this file. - * <p> - * If the present length of the file as returned by the <code>length</code> method is greater - * than the <code>newLength</code> argument then the file will be truncated. In this case, if - * the file offset as returned by the <code>getFilePointer</code> method is greater than - * <code>newLength</code> then after this method returns the offset will be equal to - * <code>newLength</code>. - * <p> - * If the present length of the file as returned by the <code>length</code> method is smaller - * than the <code>newLength</code> argument then the file will be extended. In this case, the - * contents of the extended portion of the file are not defined. - * - * @param newLength The desired length of the file - * @exception IOExceptionUnchecked If an I/O error occurs - */ - public void setLength(long newLength) throws IOExceptionUnchecked; - - // - // DataInput - // - - /** - * @see DataInput#readFully(byte[]) - */ - @Override - public void readFully(byte b[]) throws IOExceptionUnchecked; - - /** - * @see DataInput#readFully(byte[], int, int) - */ - @Override - public void readFully(byte b[], int off, int len) throws IOExceptionUnchecked; - - /** - * @see DataInput#skipBytes(int) - */ - @Override - public int skipBytes(int n) throws IOExceptionUnchecked; - - /** - * @see DataInput#readBoolean() - */ - @Override - public boolean readBoolean() throws IOExceptionUnchecked; - - /** - * @see DataInput#readByte() - */ - @Override - public byte readByte() throws IOExceptionUnchecked; - - /** - * @see DataInput#readUnsignedByte() - */ - @Override - public int readUnsignedByte() throws IOExceptionUnchecked; - - /** - * @see DataInput#readShort() - */ - @Override - public short readShort() throws IOExceptionUnchecked; - - /** - * @see DataInput#readUnsignedShort() - */ - @Override - public int readUnsignedShort() throws IOExceptionUnchecked; - - /** - * @see DataInput#readChar() - */ - @Override - public char readChar() throws IOExceptionUnchecked; - - /** - * @see DataInput#readInt() - */ - @Override - public int readInt() throws IOExceptionUnchecked; - - /** - * @see DataInput#readLong() - */ - @Override - public long readLong() throws IOExceptionUnchecked; - - /** - * @see DataInput#readFloat() - */ - @Override - public float readFloat() throws IOExceptionUnchecked; - - /** - * @see DataInput#readDouble() - */ - @Override - public double readDouble() throws IOExceptionUnchecked; - - /** - * @see DataInput#readLine() - */ - @Override - public String readLine() throws IOExceptionUnchecked; - - /** - * @see DataInput#readUTF() - */ - @Override - public String readUTF() throws IOExceptionUnchecked; - - // - // DataOutput - // - - /** - * @see DataOutput#write(int) - */ - @Override - public void write(int b) throws IOExceptionUnchecked; - - /** - * @see DataOutput#write(byte[]) - */ - @Override - public void write(byte b[]) throws IOExceptionUnchecked; - - /** - * @see DataOutput#write(byte[], int, int) - */ - @Override - public void write(byte b[], int off, int len) throws IOExceptionUnchecked; - - /** - * @see DataOutput#writeBoolean(boolean) - */ - @Override - public void writeBoolean(boolean v) throws IOExceptionUnchecked; - - /** - * @see DataOutput#writeByte(int) - */ - @Override - public void writeByte(int v) throws IOExceptionUnchecked; - - /** - * @see DataOutput#writeShort(int) - */ - @Override - public void writeShort(int v) throws IOExceptionUnchecked; - - /** - * @see DataOutput#writeChar(int) - */ - @Override - public void writeChar(int v) throws IOExceptionUnchecked; - - /** - * @see DataOutput#writeInt(int) - */ - @Override - public void writeInt(int v) throws IOExceptionUnchecked; - - /** - * @see DataOutput#writeLong(long) - */ - @Override - public void writeLong(long v) throws IOExceptionUnchecked; - - /** - * @see DataOutput#writeFloat(float) - */ - @Override - public void writeFloat(float v) throws IOExceptionUnchecked; - - /** - * @see DataOutput#writeDouble(double) - */ - @Override - public void writeDouble(double v) throws IOExceptionUnchecked; - - /** - * @see DataOutput#writeBytes(String) - */ - @Override - public void writeBytes(String s) throws IOExceptionUnchecked; - - /** - * @see DataOutput#writeChars(String) - */ - @Override - public void writeChars(String s) throws IOExceptionUnchecked; - - /** - * @see DataOutput#writeUTF(String) - */ - @Override - public void writeUTF(String str) throws IOExceptionUnchecked; -} diff --git a/base/source/java/ch/systemsx/cisd/base/io/ISynchronizable.java b/base/source/java/ch/systemsx/cisd/base/io/ISynchronizable.java deleted file mode 100644 index 67c15911b38b573d0c67a40dbaee9e7fb17691fe..0000000000000000000000000000000000000000 --- a/base/source/java/ch/systemsx/cisd/base/io/ISynchronizable.java +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Copyright 2008 ETH Zuerich, CISD - * - * 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. - */ - -package ch.systemsx.cisd.base.io; - -import ch.systemsx.cisd.base.exceptions.IOExceptionUnchecked; - -/** - * A roles that allows to synchronize a resource with an underlying resource. - * - * @author Bernd Rinn - */ -public interface ISynchronizable -{ - - /** - * Performs a synchronization of the resource. - */ - public void synchronize() throws IOExceptionUnchecked; - -} diff --git a/base/source/java/ch/systemsx/cisd/base/io/RandomAccessFileImpl.java b/base/source/java/ch/systemsx/cisd/base/io/RandomAccessFileImpl.java deleted file mode 100644 index e5f1ce79ed54c9b4e8b9d48e352080a110babaf2..0000000000000000000000000000000000000000 --- a/base/source/java/ch/systemsx/cisd/base/io/RandomAccessFileImpl.java +++ /dev/null @@ -1,648 +0,0 @@ -/* - * Copyright 2011 ETH Zuerich, CISD - * - * 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. - */ - -package ch.systemsx.cisd.base.io; - -import static ch.systemsx.cisd.base.convert.NativeData.changeByteOrder; - -import java.io.File; -import java.io.FileDescriptor; -import java.io.FileNotFoundException; -import java.io.IOException; -import java.io.RandomAccessFile; -import java.nio.ByteOrder; -import java.nio.channels.FileChannel; - -import ch.systemsx.cisd.base.exceptions.CheckedExceptionTunnel; -import ch.systemsx.cisd.base.exceptions.IOExceptionUnchecked; - -/** - * The file implementation of {@link IRandomAccessFile}. - * - * @author Bernd Rinn - */ -public class RandomAccessFileImpl implements IRandomAccessFile -{ - - private final RandomAccessFile randomAccessFile; - - private ByteOrder byteOrder = ByteOrder.BIG_ENDIAN; - - private boolean changeByteOrder = ByteOrder.LITTLE_ENDIAN.equals(byteOrder); - - private long markedPosition = -1; - - public RandomAccessFileImpl(RandomAccessFile randomAccessFile) - { - this.randomAccessFile = randomAccessFile; - } - - public RandomAccessFileImpl(String name, String mode) throws IOExceptionUnchecked - { - try - { - this.randomAccessFile = new RandomAccessFile(name, mode); - } catch (FileNotFoundException ex) - { - throw CheckedExceptionTunnel.wrapIfNecessary(ex); - } - } - - public RandomAccessFileImpl(File file, String mode) throws IOExceptionUnchecked - { - try - { - this.randomAccessFile = new RandomAccessFile(file, mode); - } catch (FileNotFoundException ex) - { - throw CheckedExceptionTunnel.wrapIfNecessary(ex); - } - } - - public final FileDescriptor getFD() throws IOException - { - return randomAccessFile.getFD(); - } - - public final FileChannel getChannel() - { - return randomAccessFile.getChannel(); - } - - @Override - public ByteOrder getByteOrder() - { - return byteOrder; - } - - @Override - public void setByteOrder(ByteOrder byteOrder) - { - this.byteOrder = byteOrder; - this.changeByteOrder = ByteOrder.LITTLE_ENDIAN.equals(byteOrder); - } - - @Override - public int read() throws IOExceptionUnchecked - { - try - { - return randomAccessFile.read(); - } catch (IOException ex) - { - throw CheckedExceptionTunnel.wrapIfNecessary(ex); - } - } - - @Override - public int read(byte[] b, int off, int len) throws IOExceptionUnchecked - { - try - { - return randomAccessFile.read(b, off, len); - } catch (IOException ex) - { - throw CheckedExceptionTunnel.wrapIfNecessary(ex); - } - } - - @Override - public int read(byte[] b) throws IOExceptionUnchecked - { - try - { - return randomAccessFile.read(b); - } catch (IOException ex) - { - throw CheckedExceptionTunnel.wrapIfNecessary(ex); - } - } - - @Override - public final void readFully(byte[] b) throws IOExceptionUnchecked - { - try - { - randomAccessFile.readFully(b); - } catch (IOException ex) - { - throw CheckedExceptionTunnel.wrapIfNecessary(ex); - } - } - - @Override - public final void readFully(byte[] b, int off, int len) throws IOExceptionUnchecked - { - try - { - randomAccessFile.readFully(b, off, len); - } catch (IOException ex) - { - throw CheckedExceptionTunnel.wrapIfNecessary(ex); - } - } - - @Override - public int skipBytes(int n) throws IOExceptionUnchecked - { - try - { - return randomAccessFile.skipBytes(n); - } catch (IOException ex) - { - throw CheckedExceptionTunnel.wrapIfNecessary(ex); - } - } - - @Override - public void write(int b) throws IOExceptionUnchecked - { - try - { - randomAccessFile.write(b); - } catch (IOException ex) - { - throw CheckedExceptionTunnel.wrapIfNecessary(ex); - } - } - - @Override - public void write(byte[] b) throws IOExceptionUnchecked - { - try - { - randomAccessFile.write(b); - } catch (IOException ex) - { - throw CheckedExceptionTunnel.wrapIfNecessary(ex); - } - } - - @Override - public void write(byte[] b, int off, int len) throws IOExceptionUnchecked - { - try - { - randomAccessFile.write(b, off, len); - } catch (IOException ex) - { - throw CheckedExceptionTunnel.wrapIfNecessary(ex); - } - } - - @Override - public long getFilePointer() throws IOExceptionUnchecked - { - try - { - return randomAccessFile.getFilePointer(); - } catch (IOException ex) - { - throw CheckedExceptionTunnel.wrapIfNecessary(ex); - } - } - - @Override - public void seek(long pos) throws IOExceptionUnchecked - { - try - { - randomAccessFile.seek(pos); - } catch (IOException ex) - { - throw CheckedExceptionTunnel.wrapIfNecessary(ex); - } - } - - @Override - public long length() throws IOExceptionUnchecked - { - try - { - return randomAccessFile.length(); - } catch (IOException ex) - { - throw CheckedExceptionTunnel.wrapIfNecessary(ex); - } - } - - @Override - public void setLength(long newLength) throws IOExceptionUnchecked - { - try - { - randomAccessFile.setLength(newLength); - } catch (IOException ex) - { - throw CheckedExceptionTunnel.wrapIfNecessary(ex); - } - } - - @Override - public void close() throws IOExceptionUnchecked - { - try - { - randomAccessFile.close(); - } catch (IOException ex) - { - throw CheckedExceptionTunnel.wrapIfNecessary(ex); - } - } - - @Override - public final boolean readBoolean() throws IOExceptionUnchecked - { - try - { - return randomAccessFile.readBoolean(); - } catch (IOException ex) - { - throw CheckedExceptionTunnel.wrapIfNecessary(ex); - } - } - - @Override - public final byte readByte() throws IOExceptionUnchecked - { - try - { - return randomAccessFile.readByte(); - } catch (IOException ex) - { - throw CheckedExceptionTunnel.wrapIfNecessary(ex); - } - } - - @Override - public final int readUnsignedByte() throws IOExceptionUnchecked - { - try - { - return randomAccessFile.readUnsignedByte(); - } catch (IOException ex) - { - throw CheckedExceptionTunnel.wrapIfNecessary(ex); - } - } - - @Override - public final short readShort() throws IOExceptionUnchecked - { - try - { - final short s = randomAccessFile.readShort(); - return changeByteOrder ? changeByteOrder(s) : s; - } catch (IOException ex) - { - throw CheckedExceptionTunnel.wrapIfNecessary(ex); - } - } - - @Override - public final int readUnsignedShort() throws IOExceptionUnchecked - { - return readShort() & 0xffff; - } - - @Override - public final char readChar() throws IOExceptionUnchecked - { - try - { - final char c = randomAccessFile.readChar(); - return changeByteOrder ? changeByteOrder(c) : c; - } catch (IOException ex) - { - throw CheckedExceptionTunnel.wrapIfNecessary(ex); - } - } - - @Override - public final int readInt() throws IOExceptionUnchecked - { - try - { - final int i = randomAccessFile.readInt(); - return changeByteOrder ? changeByteOrder(i) : i; - } catch (IOException ex) - { - throw CheckedExceptionTunnel.wrapIfNecessary(ex); - } - } - - @Override - public final long readLong() throws IOExceptionUnchecked - { - try - { - final long l = randomAccessFile.readLong(); - return changeByteOrder ? changeByteOrder(l) : l; - } catch (IOException ex) - { - throw CheckedExceptionTunnel.wrapIfNecessary(ex); - } - } - - @Override - public final float readFloat() throws IOExceptionUnchecked - { - try - { - final float f = randomAccessFile.readFloat(); - return changeByteOrder ? changeByteOrder(f) : f; - } catch (IOException ex) - { - throw CheckedExceptionTunnel.wrapIfNecessary(ex); - } - } - - @Override - public final double readDouble() throws IOExceptionUnchecked - { - try - { - final double d = randomAccessFile.readDouble(); - return changeByteOrder ? changeByteOrder(d) : d; - } catch (IOException ex) - { - throw CheckedExceptionTunnel.wrapIfNecessary(ex); - } - } - - @Override - public final String readLine() throws IOExceptionUnchecked - { - try - { - return randomAccessFile.readLine(); - } catch (IOException ex) - { - throw CheckedExceptionTunnel.wrapIfNecessary(ex); - } - } - - @Override - public final String readUTF() throws IOExceptionUnchecked - { - try - { - return randomAccessFile.readUTF(); - } catch (IOException ex) - { - throw CheckedExceptionTunnel.wrapIfNecessary(ex); - } - } - - @Override - public final void writeBoolean(boolean v) throws IOExceptionUnchecked - { - try - { - randomAccessFile.writeBoolean(v); - } catch (IOException ex) - { - throw CheckedExceptionTunnel.wrapIfNecessary(ex); - } - } - - @Override - public final void writeByte(int v) throws IOExceptionUnchecked - { - try - { - randomAccessFile.writeByte(v); - } catch (IOException ex) - { - throw CheckedExceptionTunnel.wrapIfNecessary(ex); - } - } - - @Override - public final void writeShort(int v) throws IOExceptionUnchecked - { - try - { - randomAccessFile.writeShort(changeByteOrder ? changeByteOrder(v) : v); - } catch (IOException ex) - { - throw CheckedExceptionTunnel.wrapIfNecessary(ex); - } - } - - @Override - public final void writeChar(int v) throws IOExceptionUnchecked - { - try - { - randomAccessFile.writeChar(changeByteOrder ? changeByteOrder(v) : v); - } catch (IOException ex) - { - throw CheckedExceptionTunnel.wrapIfNecessary(ex); - } - } - - @Override - public final void writeInt(int v) throws IOExceptionUnchecked - { - try - { - randomAccessFile.writeInt(changeByteOrder ? changeByteOrder(v) : v); - } catch (IOException ex) - { - throw CheckedExceptionTunnel.wrapIfNecessary(ex); - } - } - - @Override - public final void writeLong(long v) throws IOExceptionUnchecked - { - try - { - randomAccessFile.writeLong(changeByteOrder ? changeByteOrder(v) : v); - } catch (IOException ex) - { - throw CheckedExceptionTunnel.wrapIfNecessary(ex); - } - } - - @Override - public final void writeFloat(float v) throws IOExceptionUnchecked - { - try - { - randomAccessFile.writeFloat(changeByteOrder ? changeByteOrder(v) : v); - } catch (IOException ex) - { - throw CheckedExceptionTunnel.wrapIfNecessary(ex); - } - } - - @Override - public final void writeDouble(double v) throws IOExceptionUnchecked - { - try - { - randomAccessFile.writeDouble(changeByteOrder ? changeByteOrder(v) : v); - } catch (IOException ex) - { - throw CheckedExceptionTunnel.wrapIfNecessary(ex); - } - } - - @Override - public final void writeBytes(String s) throws IOExceptionUnchecked - { - try - { - randomAccessFile.writeBytes(s); - } catch (IOException ex) - { - throw CheckedExceptionTunnel.wrapIfNecessary(ex); - } - } - - @Override - public final void writeChars(String s) throws IOExceptionUnchecked - { - try - { - randomAccessFile.writeChars(s); - } catch (IOException ex) - { - throw CheckedExceptionTunnel.wrapIfNecessary(ex); - } - } - - @Override - public final void writeUTF(String str) throws IOExceptionUnchecked - { - try - { - randomAccessFile.writeUTF(str); - } catch (IOException ex) - { - throw CheckedExceptionTunnel.wrapIfNecessary(ex); - } - } - - @Override - public long skip(long n) throws IOExceptionUnchecked - { - if (n <= 0) - { - return 0; - } - try - { - final long pos = randomAccessFile.getFilePointer(); - final long len = randomAccessFile.length(); - final long newpos = Math.min(len, pos + n); - randomAccessFile.seek(newpos); - return (int) (newpos - pos); - } catch (IOException ex) - { - throw CheckedExceptionTunnel.wrapIfNecessary(ex); - } - } - - @Override - public int available() throws IOExceptionUnchecked - { - try - { - return (int) Math.min(randomAccessFile.length() - randomAccessFile.getFilePointer(), Integer.MAX_VALUE); - } catch (IOException ex) - { - throw CheckedExceptionTunnel.wrapIfNecessary(ex); - } - } - - @Override - public void mark(int readlimit) - { - try - { - markedPosition = randomAccessFile.getFilePointer(); - } catch (IOException ex) - { - throw CheckedExceptionTunnel.wrapIfNecessary(ex); - } - } - - @Override - public void reset() throws IOExceptionUnchecked - { - if (markedPosition == -1) - { - throw new IOExceptionUnchecked(new IOException("mark() not called")); - } - try - { - randomAccessFile.seek(markedPosition); - } catch (IOException ex) - { - throw CheckedExceptionTunnel.wrapIfNecessary(ex); - } - } - - @Override - public boolean markSupported() - { - return true; - } - - @Override - public void flush() throws IOExceptionUnchecked - { - // NOOP - } - - @Override - public void synchronize() throws IOExceptionUnchecked - { - try - { - randomAccessFile.getFD().sync(); - } catch (IOException ex) - { - throw CheckedExceptionTunnel.wrapIfNecessary(ex); - } - } - - // - // Object - // - - @Override - public int hashCode() - { - return randomAccessFile.hashCode(); - } - - @Override - public boolean equals(Object obj) - { - return randomAccessFile.equals(obj); - } - - @Override - public String toString() - { - return randomAccessFile.toString(); - } - -} diff --git a/base/source/java/ch/systemsx/cisd/base/mdarray/MDAbstractArray.java b/base/source/java/ch/systemsx/cisd/base/mdarray/MDAbstractArray.java deleted file mode 100644 index d2dd83829019a4a99cf5268e0b6f98641e9a2c61..0000000000000000000000000000000000000000 --- a/base/source/java/ch/systemsx/cisd/base/mdarray/MDAbstractArray.java +++ /dev/null @@ -1,480 +0,0 @@ -/* - * Copyright 2008 ETH Zuerich, CISD - * - * 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. - */ - -package ch.systemsx.cisd.base.mdarray; - -import java.io.Serializable; -import java.util.Iterator; - -import org.apache.commons.lang.ArrayUtils; -import org.apache.commons.lang.ClassUtils; - -/** - * Base class of a multi-dimensional array. The <var>dimensions</var> of an array are provided - * separately from the data as a <code>int[]</code>. - * <p> - * The array can grow or shrink in the first dimension (<var>dimensions[0]</var>). Dimensions - * <code>1...n</code> are static. They are said to form a <i>hyper-row</i>. - * - * @author Bernd Rinn - */ -public abstract class MDAbstractArray<T> implements Serializable, - Iterable<MDAbstractArray<T>.ArrayEntry> -{ - private static final long serialVersionUID = 1L; - - protected final int[] dimensions; - - protected int hyperRowLength; - - protected int capacityHyperRows; - - protected int size; - - /** - * A class to represent an entry (index and value) of a {@link MDArray}, used for iteration. - */ - public class ArrayEntry - { - private final int linearIndex; - - ArrayEntry(int linearIndex) - { - this.linearIndex = linearIndex; - } - - /** - * The multi-dimensional index of this entry. - */ - public int[] getIndex() - { - return computeReverseIndex(linearIndex); - } - - /** - * The linear index of this entry. - */ - public int getLinearIndex() - { - return linearIndex; - } - - /** - * The value of this entry. - */ - public T getValue() - { - return getAsObject(linearIndex); - } - } - - protected MDAbstractArray(int[] dimensions, int arrayLength, int capacityHyperRows) - { - assert dimensions != null; - - this.dimensions = dimensions; - this.hyperRowLength = computeHyperRowLength(dimensions); - if (hyperRowLength == 0) - { - this.capacityHyperRows = 0; - this.size = 0; - } else - { - if (arrayLength % hyperRowLength != 0) - { - throw new IllegalArgumentException("Actual array length " + arrayLength - + " does not match hyper-row length " + hyperRowLength + "."); - } - this.capacityHyperRows = - (capacityHyperRows > 0) ? capacityHyperRows : Math.max(dimensions[0], - arrayLength / hyperRowLength); - this.size = dimensions[0] * hyperRowLength; - } - } - - protected int computeHyperRowLength(@SuppressWarnings("hiding") - int[] dimensions) - { - int hyperRowLen = 1; - for (int i = 1; i < dimensions.length; ++i) - { - hyperRowLen *= dimensions[i]; - } - return hyperRowLen; - } - - /** - * Returns the rank of the array. - */ - public int rank() - { - return dimensions.length; - } - - /** - * Returns the extent of the array along its <var>dim</var>-th axis. - */ - public int size(int dim) - { - assert dim < dimensions.length; - - return dimensions[dim]; - } - - /** - * Returns a copy of the dimensions of the multi-dimensional array. - */ - public int[] dimensions() - { - return dimensions.clone(); - } - - /** - * Returns a copy of the dimensions of the multi-dimensional array as <code>long[]</code>. - */ - public long[] longDimensions() - { - final long[] dimensionsCopy = new long[dimensions.length]; - for (int i = 0; i < dimensionsCopy.length; ++i) - { - dimensionsCopy[i] = dimensions[i]; - } - return dimensionsCopy; - } - - /** - * Returns the number of elements in the array. - */ - public int size() - { - return size; - } - - /** - * Returns the current number of hyper rows of of this array. - */ - public int numberOfHyperRows() - { - return numberOfHyperRows(); - } - - /** - * Return an object which has the same value as the element of the array specified by - * <var>linearIndex</var>. - * - * @param linearIndex The index in the linear array returned by {@link #getAsFlatArray()}. - * @return The value at the specified index. - */ - public abstract T getAsObject(int linearIndex); - - /** - * Return an object which has the same value as the element of the array specified by - * <var>indices</var>. - */ - public abstract T getAsObject(int... indices); - - /** - * Sets the element of the array specified by <var>indices</var> to the particular - * <var>value</var>. - */ - public abstract void setToObject(T value, int... indices); - - /** - * Sets the element of the array specified by <var>linearIndex</var> to the particular - * <var>value</var>. - * - * @param value The new value to set. - * @param linearIndex The index in the linear array returned by {@link #getAsFlatArray()}. - */ - public abstract void setToObject(T value, int linearIndex); - - /** - * Returns the array in flattened form. Changes to the returned object will change the - * multi-dimensional array directly. - */ - public abstract Object getAsFlatArray(); - - /** - * Returns a copy of the array in flattened form. Changes to the returned object will <i>not</i> - * change the multi-dimensional array directly. - */ - public abstract Object getCopyAsFlatArray(); - - protected abstract void adaptCapacityHyperRows(); - - /** - * Returns the capacity of elements in the array. - */ - public abstract int capacity(); - - /** - * Increase the number of hyper-rows by <var>count</var>. Doubles the capacity if needed. - * - * @return The new number of rows. - */ - public int incNumberOfHyperRows(int count) - { - dimensions[0] += count; - if (dimensions[0] > capacityHyperRows) - { - capacityHyperRows = Math.max(capacityHyperRows * 2, dimensions[0]); - adaptCapacityHyperRows(); - } - size += count * hyperRowLength; - return dimensions[0]; - } - - /** - * Decrease the number of hyper-rows by <var>count</var>. - * - * @return The new number of rows. - */ - public int decNumberOfHyperRows(int count) - { - dimensions[0] -= count; - size -= count * hyperRowLength; - return dimensions[0]; - } - - /** - * Computes the linear index for the multi-dimensional <var>indices</var> provided. - */ - public int computeIndex(int... indices) - { - assert indices != null; - assert indices.length == dimensions.length; - - int index = indices[0]; - for (int i = 1; i < indices.length; ++i) - { - index = index * dimensions[i] + indices[i]; - } - return index; - } - - /** - * Computes the multi-dimensional index from the <var>linearIndex</var>. - */ - public int[] computeReverseIndex(int linearIndex) - { - final int[] index = new int[dimensions.length]; - int workIndex = linearIndex; - int blockSize = size; - for (int i = 0; i < dimensions.length; ++i) - { - blockSize /= dimensions[i]; - index[i] = workIndex / blockSize; - workIndex = workIndex - index[i] * blockSize; - } - return index; - } - - /** - * Computes the linear index for the two-dimensional (<var>indexX, indexY</var>) provided. - */ - public int computeIndex(int indexX, int indexY) - { - assert 2 == dimensions.length; - - return dimensions[1] * indexX + indexY; - } - - /** - * Computes the linear index for the three-dimensional (<var>indexX, indexY, indexZ</var>) - * provided. - */ - public int computeIndex(int indexX, int indexY, int indexZ) - { - assert 3 == dimensions.length; - - return dimensions[2] * (dimensions[1] * indexX + indexY) + indexZ; - } - - /** - * Converts the <var>dimensions</var> from <code>long[]</code> to <code>int[]</code>. - */ - public static int[] toInt(final long[] dimensions) - { - assert dimensions != null; - - final int[] result = new int[dimensions.length]; - for (int i = 0; i < result.length; ++i) - { - result[i] = (int) dimensions[i]; - if (result[i] != dimensions[i]) - { - throw new IllegalArgumentException("Dimension " + i + " is too large (" - + dimensions[i] + ")"); - } - } - return result; - } - - /** - * Converts the <var>dimensions</var> from <code>int[]</code> to <code>long[]</code>. - */ - public static long[] toLong(final int[] dimensions) - { - assert dimensions != null; - - final long[] result = new long[dimensions.length]; - for (int i = 0; i < result.length; ++i) - { - result[i] = dimensions[i]; - } - return result; - } - - /** - * Returns the one-dimensional length of the multi-dimensional array defined by - * <var>dimensions</var>. - * - * @throws IllegalArgumentException If <var>dimensions</var> overflow the <code>int</code> type. - */ - public static int getLength(final int[] dimensions) - { - return getLength(dimensions, 0); - } - - /** - * Returns the one-dimensional length of the multi-dimensional array defined by - * <var>dimensions</var>. If <code>capacityHyperRows > dimensions[0]</code>, then it will - * replace <var>dimensions[0]</var> by <var>capacityHyperRows</var> - * - * @throws IllegalArgumentException If <var>dimensions</var> overflow the <code>int</code> type. - */ - public static int getLength(final int[] dimensions, int capacityHyperRows) - { - assert dimensions != null; - - if (dimensions.length == 0) - { - return 0; - } - long length = Math.max(capacityHyperRows, dimensions[0]); - for (int i = 1; i < dimensions.length; ++i) - { - length *= dimensions[i]; - } - int intLength = (int) length; - if (length != intLength) - { - throw new IllegalArgumentException("Length is too large (" + length + ")"); - } - return intLength; - } - - /** - * Returns the one-dimensional length of the multi-dimensional array defined by - * <var>dimensions</var>. - * - * @throws IllegalArgumentException If <var>dimensions</var> overflow the <code>int</code> type. - */ - public static int getLength(final long[] dimensions) - { - return getLength(dimensions, 0); - } - - /** - * Returns the one-dimensional length of the multi-dimensional array defined by - * <var>dimensions</var>. If <code>capacityHyperRows > dimensions[0]</code>, then it will - * replace <var>dimensions[0]</var> by <var>capacityHyperRows</var> - * - * @throws IllegalArgumentException If <var>dimensions</var> overflow the <code>int</code> type. - */ - public static int getLength(final long[] dimensions, long capacityHyperRows) - { - assert dimensions != null; - - if (dimensions.length == 0) // NULL data space needs to be treated differently - { - return 0; - } - long length = Math.max(capacityHyperRows, dimensions[0]); - for (int i = 1; i < dimensions.length; ++i) - { - length *= dimensions[i]; - } - int intLength = (int) length; - if (length != intLength) - { - throw new IllegalArgumentException("Length is too large (" + length + ")"); - } - return intLength; - } - - // - // Iterable - // - - @Override - public Iterator<ArrayEntry> iterator() - { - return new Iterator<ArrayEntry>() - { - int linearIndex = 0; - - @Override - public boolean hasNext() - { - return linearIndex < size; - } - - @Override - public ArrayEntry next() - { - final ArrayEntry next = new ArrayEntry(linearIndex); - ++linearIndex; - return next; - } - - @Override - public void remove() - { - throw new UnsupportedOperationException(); - } - - }; - } - - // - // Object - // - - @Override - public String toString() - { - final int length = getLength(dimensions, 0); - final StringBuilder b = new StringBuilder(); - b.append(ClassUtils.getShortCanonicalName(this.getClass())); - b.append('('); - b.append(ArrayUtils.toString(dimensions)); - b.append(')'); - if (length <= 100) - { - b.append(": "); - if (dimensions[0] < capacityHyperRows) - { - b.append(ArrayUtils.toString(getCopyAsFlatArray())); - } else - { - b.append(ArrayUtils.toString(getAsFlatArray())); - } - } - return b.toString(); - } - -} diff --git a/base/source/java/ch/systemsx/cisd/base/mdarray/MDArray.java b/base/source/java/ch/systemsx/cisd/base/mdarray/MDArray.java deleted file mode 100644 index 1a4a2360b773c467ce3737ec9b23504773a7f931..0000000000000000000000000000000000000000 --- a/base/source/java/ch/systemsx/cisd/base/mdarray/MDArray.java +++ /dev/null @@ -1,352 +0,0 @@ -/* - * Copyright 2008 ETH Zuerich, CISD - * - * 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. - */ - -package ch.systemsx.cisd.base.mdarray; - -import java.io.IOException; -import java.io.ObjectInputStream; -import java.util.Arrays; - -import org.apache.commons.lang.ArrayUtils; - -/** - * A multi-dimensional array of generic type <code>T</code>. - * - * @author Bernd Rinn - */ -public class MDArray<T> extends MDAbstractArray<T> -{ - private static final long serialVersionUID = 1L; - - private T[] flattenedArray; - - /** - * Creates an empty {@link MDArray} with the <var>dimensions</var>. Convenience method if - * <var>dimensions</var> are available as {@code long[]}. - */ - public MDArray(Class<T> componentClass, long[] dimensions) - { - this(createArray(componentClass, getLength(dimensions, 0)), toInt(dimensions), false); - } - - /** - * Creates an empty {@link MDArray} with the <var>dimensions</var>. If - * <code>capacityHyperRows > dimensions[0]</code>, then it will create an array with a capacity - * of <var>capacityHyperRows</var> hyper-rows. Convenience method if <var>dimensions</var> are - * available as {@code long[]}. - */ - public MDArray(Class<T> componentClass, long[] dimensions, long capacityHyperRows) - { - this(createArray(componentClass, getLength(dimensions, capacityHyperRows)), - toInt(dimensions), false); - } - - /** - * Creates a {@link MDArray} from the given {@code flattenedArray} and {@code dimensions}. It is - * checked that the arguments are compatible. Convenience method if <var>dimensions</var> are - * available as {@code long[]}. - */ - public MDArray(T[] flattenedArray, long[] dimensions) - { - this(flattenedArray, toInt(dimensions), true); - } - - /** - * Creates a {@link MDArray} from the given <var>flattenedArray</var> and <var>dimensions</var>. - * If <var>checkDimensions</var> is {@code true}, it is checked that the arguments are - * compatible. Convenience method if <var>dimensions</var> are available as {@code long[]}. - */ - public MDArray(T[] flattenedArray, long[] dimensions, boolean checkdimensions) - { - this(flattenedArray, toInt(dimensions), checkdimensions); - } - - /** - * Creates an empty {@link MDArray} with the <var>dimensions</var>. - */ - public MDArray(Class<T> componentClass, int[] dimensions) - { - this(createArray(componentClass, getLength(dimensions, 0)), dimensions, false); - } - - /** - * Creates an empty {@link MDArray} with the <var>dimensions</var>. If - * <code>capacityHyperRows > dimensions[0]</code>, then it will create an array with a capacity - * of <var>capacityHyperRows</var> hyper-rows. - */ - public MDArray(Class<T> componentClass, int[] dimensions, int capacityHyperRows) - { - this(createArray(componentClass, getLength(dimensions, capacityHyperRows)), dimensions, - false); - } - - /** - * Creates a {@link MDArray} from the given {@code flattenedArray} and {@code dimensions}. It is - * checked that the arguments are compatible. - */ - public MDArray(T[] flattenedArray, int[] dimensions) - { - this(flattenedArray, dimensions, true); - } - - /** - * Creates a {@link MDArray} from the given <var>flattenedArray</var> and <var>dimensions</var>. - * If <var>checkDimensions</var> is {@code true}, it is checked that the arguments are - * compatible. - */ - public MDArray(T[] flattenedArray, int[] dimensions, boolean checkdimensions) - { - super(dimensions, flattenedArray.length, 0); - assert flattenedArray != null; - - if (checkdimensions) - { - final int expectedLength = getLength(dimensions, 0); - if (flattenedArray.length != expectedLength) - { - throw new IllegalArgumentException("Actual array length " + flattenedArray.length - + " does not match expected length " + expectedLength + "."); - } - } - this.flattenedArray = flattenedArray; - } - - @SuppressWarnings("unchecked") - private static <V> V[] createArray(Class<V> componentClass, final int vectorLength) - { - final V[] value = (V[]) java.lang.reflect.Array.newInstance(componentClass, vectorLength); - return value; - } - - @Override - public int capacity() - { - return flattenedArray.length; - } - - @Override - public T getAsObject(int... indices) - { - return get(indices); - } - - @Override - public void setToObject(T value, int... indices) - { - set(value, indices); - } - - @Override - public T getAsObject(int linearIndex) - { - return get(linearIndex); - } - - @Override - public void setToObject(T value, int linearIndex) - { - set(value, linearIndex); - } - - @Override - public T[] getAsFlatArray() - { - return flattenedArray; - } - - @Override - public T[] getCopyAsFlatArray() - { - return toTArray(ArrayUtils.subarray(flattenedArray, 0, dimensions[0] * hyperRowLength)); - } - - @Override - protected void adaptCapacityHyperRows() - { - final T[] oldArray = this.flattenedArray; - this.flattenedArray = - toTArray(createArray(oldArray.getClass().getComponentType(), capacityHyperRows - * hyperRowLength)); - System.arraycopy(oldArray, 0, flattenedArray, 0, - Math.min(oldArray.length, flattenedArray.length)); - } - - @SuppressWarnings("unchecked") - private T[] toTArray(Object obj) - { - return (T[]) obj; - } - - /** - * Returns the value of array at the position defined by <var>indices</var>. - */ - public T get(int... indices) - { - return flattenedArray[computeIndex(indices)]; - } - - /** - * Returns the value of a one-dimensional array at the position defined by <var>index</var>. - * <p> - * <b>Do not call for arrays other than one-dimensional!</b> - */ - public T get(int index) - { - return flattenedArray[index]; - } - - /** - * Returns the value of a two-dimensional array at the position defined by <var>indexX</var> and - * <var>indexY</var>. - * <p> - * <b>Do not call for arrays other than two-dimensional!</b> - */ - public T get(int indexX, int indexY) - { - return flattenedArray[computeIndex(indexX, indexY)]; - } - - /** - * Returns the value of a three-dimensional array at the position defined by <var>indexX</var>, - * <var>indexY</var> and <var>indexZ</var>. - * <p> - * <b>Do not call for arrays other than three-dimensional!</b> - */ - public T get(int indexX, int indexY, int indexZ) - { - return flattenedArray[computeIndex(indexX, indexY, indexZ)]; - } - - /** - * Sets the <var>value</var> of array at the position defined by <var>indices</var>. - */ - public void set(T value, int... indices) - { - flattenedArray[computeIndex(indices)] = value; - } - - /** - * Sets the <var>value</var> of a one-dimension array at the position defined by - * <var>index</var>. - * <p> - * <b>Do not call for arrays other than one-dimensional!</b> - */ - public void set(T value, int index) - { - flattenedArray[index] = value; - } - - /** - * Sets the <var>value</var> of a two-dimensional array at the position defined by - * <var>indexX</var> and <var>indexY</var>. - * <p> - * <b>Do not call for arrays other than two-dimensional!</b> - */ - public void set(T value, int indexX, int indexY) - { - flattenedArray[computeIndex(indexX, indexY)] = value; - } - - /** - * Sets the <var>value</var> of a three-dimensional array at the position defined by - * <var>indexX</var>, <var>indexY</var> and <var>indexZ</var>. - * <p> - * <b>Do not call for arrays other than three-dimensional!</b> - */ - public void set(T value, int indexX, int indexY, int indexZ) - { - flattenedArray[computeIndex(indexX, indexY, indexZ)] = value; - } - - /** - * Returns the component type of this array. - */ - @SuppressWarnings("unchecked") - public Class<T> getComponentClass() - { - return (Class<T>) flattenedArray.getClass().getComponentType(); - } - - // - // Object - // - - @Override - public int hashCode() - { - final int prime = 31; - int result = 1; - result = prime * result + Arrays.hashCode(getValuesAsFlatArray()); - result = prime * result + Arrays.hashCode(dimensions); - return result; - } - - @Override - public boolean equals(Object obj) - { - if (this == obj) - { - return true; - } - if (obj == null) - { - return false; - } - if (getClass() != obj.getClass()) - { - return false; - } - final MDArray<T> other = toMDArray(obj); - if (Arrays.equals(getValuesAsFlatArray(), other.getValuesAsFlatArray()) == false) - { - return false; - } - if (Arrays.equals(dimensions, other.dimensions) == false) - { - return false; - } - return true; - } - - private T[] getValuesAsFlatArray() - { - return (dimensions[0] < capacityHyperRows) ? getCopyAsFlatArray() : getAsFlatArray(); - } - - @SuppressWarnings("unchecked") - private MDArray<T> toMDArray(Object obj) - { - return (MDArray<T>) obj; - } - - private void readObject(ObjectInputStream stream) throws IOException, ClassNotFoundException - { - stream.defaultReadObject(); - if (hyperRowLength == 0) - { - this.hyperRowLength = computeHyperRowLength(dimensions); - } - if (capacityHyperRows == 0) - { - this.capacityHyperRows = dimensions[0]; - } - if (size == 0) - { - this.size = hyperRowLength * dimensions[0]; - } - } - -} diff --git a/base/source/java/ch/systemsx/cisd/base/mdarray/MDByteArray.java b/base/source/java/ch/systemsx/cisd/base/mdarray/MDByteArray.java deleted file mode 100644 index 4bb36ad7d583731524ef96d4ec3f371d5f375188..0000000000000000000000000000000000000000 --- a/base/source/java/ch/systemsx/cisd/base/mdarray/MDByteArray.java +++ /dev/null @@ -1,376 +0,0 @@ -/* - * Copyright 2008 ETH Zuerich, CISD - * - * 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. - */ - -package ch.systemsx.cisd.base.mdarray; - -import java.io.IOException; -import java.io.ObjectInputStream; -import java.util.Arrays; - -import org.apache.commons.lang.ArrayUtils; - -/** - * A multi-dimensional <code>byte</code> array. - * - * @author Bernd Rinn - */ -public final class MDByteArray extends MDAbstractArray<Byte> -{ - private static final long serialVersionUID = 1L; - - private byte[] flattenedArray; - - /** - * Creates an empty {@link MDIntArray} with the <var>dimensions</var>. Convenience method if - * <var>dimensions</var> are available as {@code long[]}. - */ - public MDByteArray(long[] dimensions) - { - this(new byte[getLength(dimensions, 0)], toInt(dimensions), false); - } - - /** - * Creates an empty {@link MDByteArray} with the <var>dimensions</var>. If - * <code>capacityHyperRows > dimensions[0]</code>, then it will create an array with a capacity - * of <var>capacityHyperRows</var> hyper-rows. Convenience method if <var>dimensions</var> are - * available as {@code long[]}. - */ - public MDByteArray(long[] dimensions, long capacityHyperRows) - { - this(new byte[getLength(dimensions, capacityHyperRows)], toInt(dimensions), false); - } - - /** - * Creates a {@link MDByteArray} from the given {@code flattenedArray} and {@code dimensions}. It - * is checked that the arguments are compatible. Convenience method if <var>dimensions</var> are - * available as {@code long[]}. - */ - public MDByteArray(byte[] flattenedArray, long[] dimensions) - { - this(flattenedArray, toInt(dimensions), true); - } - - /** - * Creates a {@link MDByteArray} from the given <var>flattenedArray</var> and - * <var>dimensions</var>. If <var>checkDimensions</var> is {@code true}, it is checked that the - * arguments are compatible. Convenience method if <var>dimensions</var> are available as - * {@code long[]}. - */ - public MDByteArray(byte[] flattenedArray, long[] dimensions, boolean checkdimensions) - { - this(flattenedArray, toInt(dimensions), checkdimensions); - } - - /** - * Creates an empty {@link MDByteArray} with the <var>dimensions</var>. - */ - public MDByteArray(int[] dimensions) - { - this(new byte[getLength(dimensions, 0)], dimensions, false); - } - - /** - * Creates an empty {@link MDByteArray} with the <var>dimensions</var>. If - * <code>capacityHyperRows > dimensions[0]</code>, then it will create an array with a capacity - * of <var>capacityHyperRows</var> hyper-rows. - */ - public MDByteArray(int[] dimensions, int capacityHyperRows) - { - this(new byte[getLength(dimensions, capacityHyperRows)], dimensions, false); - } - - /** - * Creates a {@link MDByteArray} from the given {@code flattenedArray} and {@code dimensions}. It - * is checked that the arguments are compatible. - */ - public MDByteArray(byte[] flattenedArray, int[] dimensions) - { - this(flattenedArray, dimensions, true); - } - - /** - * Creates a {@link MDByteArray} from the given <var>flattenedArray</var> and - * <var>dimensions</var>. If <var>checkDimensions</var> is {@code true}, it is checked that the - * arguments are compatible. - */ - public MDByteArray(byte[] flattenedArray, int[] dimensions, boolean checkdimensions) - { - super(dimensions, flattenedArray.length, 0); - assert flattenedArray != null; - - if (checkdimensions) - { - final int expectedLength = getLength(dimensions, 0); - if (flattenedArray.length != expectedLength) - { - throw new IllegalArgumentException("Actual array length " + flattenedArray.length - + " does not match expected length " + expectedLength + "."); - } - } - this.flattenedArray = flattenedArray; - } - - /** - * Creates a {@link MDByteArray} from the given <var>matrix</var> of rank 2. Note that the values - * in <var>matrix</var> will be copied and thus the created {@link MDIntArray} will be - * independent from <var>matrix</var> after construction. - */ - public MDByteArray(byte[][] matrix) - { - this(matrix, getDimensions(matrix)); - } - - /** - * Creates a {@link MDByteArray} from the given <var>matrix</var> of rank 2 and the - * <var>dimension</var> which need to be less or equal the dimensions of <var>matrix</var>. Note - * that the values in <var>matrix</var> will be copied and thus the created {@link MDIntArray} - * will be independent from <var>matrix</var> after construction. - */ - public MDByteArray(byte[][] matrix, int[] dimensions) - { - super(dimensions, 0, matrix.length); - - final int sizeX = dimensions[0]; - final int sizeY = dimensions[1]; - int length = getLength(dimensions, 0); - this.flattenedArray = new byte[length]; - for (int i = 0; i < sizeX; ++i) - { - System.arraycopy(matrix[i], 0, flattenedArray, i * sizeY, sizeY); - } - } - - private static int[] getDimensions(byte[][] matrix) - { - assert matrix != null; - - return new int[] - { matrix.length, matrix.length == 0 ? 0 : matrix[0].length }; - } - - @Override - public int capacity() - { - return flattenedArray.length; - } - - @Override - public Byte getAsObject(int... indices) - { - return get(indices); - } - - @Override - public void setToObject(Byte value, int... indices) - { - set(value, indices); - } - - @Override - public Byte getAsObject(int linearIndex) - { - return get(linearIndex); - } - - @Override - public void setToObject(Byte value, int linearIndex) - { - set(value, linearIndex); - } - - @Override - public byte[] getAsFlatArray() - { - return flattenedArray; - } - - @Override - public byte[] getCopyAsFlatArray() - { - return ArrayUtils.subarray(flattenedArray, 0, dimensions[0] * hyperRowLength); - } - - @Override - protected void adaptCapacityHyperRows() - { - final byte[] oldArray = this.flattenedArray; - this.flattenedArray = new byte[capacityHyperRows * hyperRowLength]; - System.arraycopy(oldArray, 0, flattenedArray, 0, - Math.min(oldArray.length, flattenedArray.length)); - } - - /** - * Returns the value of array at the position defined by <var>indices</var>. - */ - public byte get(int... indices) - { - return flattenedArray[computeIndex(indices)]; - } - - /** - * Returns the value of a one-dimensional array at the position defined by <var>index</var>. - * <p> - * <b>Do not call for arrays other than one-dimensional!</b> - */ - public byte get(int index) - { - return flattenedArray[index]; - } - - /** - * Returns the value of a two-dimensional array at the position defined by <var>indexX</var> and - * <var>indexY</var>. - * <p> - * <b>Do not call for arrays other than two-dimensional!</b> - */ - public byte get(int indexX, int indexY) - { - return flattenedArray[computeIndex(indexX, indexY)]; - } - - /** - * Returns the value of a three-dimensional array at the position defined by <var>indexX</var>, - * <var>indexY</var> and <var>indexZ</var>. - * <p> - * <b>Do not call for arrays other than three-dimensional!</b> - */ - public byte get(int indexX, int indexY, int indexZ) - { - return flattenedArray[computeIndex(indexX, indexY, indexZ)]; - } - - /** - * Sets the <var>value</var> of array at the position defined by <var>indices</var>. - */ - public void set(byte value, int... indices) - { - flattenedArray[computeIndex(indices)] = value; - } - - /** - * Sets the <var>value</var> of a one-dimension array at the position defined by - * <var>index</var>. - * <p> - * <b>Do not call for arrays other than one-dimensional!</b> - */ - public void set(byte value, int index) - { - flattenedArray[index] = value; - } - - /** - * Sets the <var>value</var> of a two-dimensional array at the position defined by - * <var>indexX</var> and <var>indexY</var>. - * <p> - * <b>Do not call for arrays other than two-dimensional!</b> - */ - public void set(byte value, int indexX, int indexY) - { - flattenedArray[computeIndex(indexX, indexY)] = value; - } - - /** - * Sets the <var>value</var> of a three-dimensional array at the position defined by - * <var>indexX</var>, <var>indexY</var> and <var>indexZ</var>. - * <p> - * <b>Do not call for arrays other than three-dimensional!</b> - */ - public void set(byte value, int indexX, int indexY, int indexZ) - { - flattenedArray[computeIndex(indexX, indexY, indexZ)] = value; - } - - /** - * Creates and returns a matrix from a two-dimensional array. - * <p> - * <b>Do not call for arrays other than two-dimensional!</b> - */ - public byte[][] toMatrix() - { - final int sizeX = dimensions[0]; - final int sizeY = dimensions[1]; - final byte[][] result = new byte[sizeX][sizeY]; - for (int i = 0; i < sizeX; ++i) - { - System.arraycopy(flattenedArray, i * sizeY, result[i], 0, sizeY); - } - return result; - } - - // - // Object - // - - @Override - public int hashCode() - { - final int prime = 31; - int result = 1; - result = prime * result + Arrays.hashCode(getValuesAsFlatArray()); - result = prime * result + Arrays.hashCode(dimensions); - return result; - } - - @Override - public boolean equals(Object obj) - { - if (this == obj) - { - return true; - } - if (obj == null) - { - return false; - } - if (getClass() != obj.getClass()) - { - return false; - } - MDByteArray other = (MDByteArray) obj; - if (Arrays.equals(getValuesAsFlatArray(), other.getValuesAsFlatArray()) == false) - { - return false; - } - if (Arrays.equals(dimensions, other.dimensions) == false) - { - return false; - } - return true; - } - - private byte[] getValuesAsFlatArray() - { - return (dimensions[0] < capacityHyperRows) ? getCopyAsFlatArray() : getAsFlatArray(); - } - - private void readObject(ObjectInputStream stream) throws IOException, ClassNotFoundException - { - stream.defaultReadObject(); - if (hyperRowLength == 0) - { - this.hyperRowLength = computeHyperRowLength(dimensions); - } - if (capacityHyperRows == 0) - { - this.capacityHyperRows = dimensions[0]; - } - if (size == 0) - { - this.size = hyperRowLength * dimensions[0]; - } - } - -} diff --git a/base/source/java/ch/systemsx/cisd/base/mdarray/MDDoubleArray.java b/base/source/java/ch/systemsx/cisd/base/mdarray/MDDoubleArray.java deleted file mode 100644 index 8a755f442abaa55a037468cbb5def08477711e2f..0000000000000000000000000000000000000000 --- a/base/source/java/ch/systemsx/cisd/base/mdarray/MDDoubleArray.java +++ /dev/null @@ -1,376 +0,0 @@ -/* - * Copyright 2008 ETH Zuerich, CISD - * - * 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. - */ - -package ch.systemsx.cisd.base.mdarray; - -import java.io.IOException; -import java.io.ObjectInputStream; -import java.util.Arrays; - -import org.apache.commons.lang.ArrayUtils; - -/** - * A multi-dimensional <code>double</code> array. - * - * @author Bernd Rinn - */ -public final class MDDoubleArray extends MDAbstractArray<Double> -{ - private static final long serialVersionUID = 1L; - - private double[] flattenedArray; - - /** - * Creates an empty {@link MDIntArray} with the <var>dimensions</var>. Convenience method if - * <var>dimensions</var> are available as {@code long[]}. - */ - public MDDoubleArray(long[] dimensions) - { - this(new double[getLength(dimensions, 0)], toInt(dimensions), false); - } - - /** - * Creates an empty {@link MDDoubleArray} with the <var>dimensions</var>. If - * <code>capacityHyperRows > dimensions[0]</code>, then it will create an array with a capacity - * of <var>capacityHyperRows</var> hyper-rows. Convenience method if <var>dimensions</var> are - * available as {@code long[]}. - */ - public MDDoubleArray(long[] dimensions, long capacityHyperRows) - { - this(new double[getLength(dimensions, capacityHyperRows)], toInt(dimensions), false); - } - - /** - * Creates a {@link MDDoubleArray} from the given {@code flattenedArray} and {@code dimensions}. It - * is checked that the arguments are compatible. Convenience method if <var>dimensions</var> are - * available as {@code long[]}. - */ - public MDDoubleArray(double[] flattenedArray, long[] dimensions) - { - this(flattenedArray, toInt(dimensions), true); - } - - /** - * Creates a {@link MDDoubleArray} from the given <var>flattenedArray</var> and - * <var>dimensions</var>. If <var>checkDimensions</var> is {@code true}, it is checked that the - * arguments are compatible. Convenience method if <var>dimensions</var> are available as - * {@code long[]}. - */ - public MDDoubleArray(double[] flattenedArray, long[] dimensions, boolean checkdimensions) - { - this(flattenedArray, toInt(dimensions), checkdimensions); - } - - /** - * Creates an empty {@link MDDoubleArray} with the <var>dimensions</var>. - */ - public MDDoubleArray(int[] dimensions) - { - this(new double[getLength(dimensions, 0)], dimensions, false); - } - - /** - * Creates an empty {@link MDDoubleArray} with the <var>dimensions</var>. If - * <code>capacityHyperRows > dimensions[0]</code>, then it will create an array with a capacity - * of <var>capacityHyperRows</var> hyper-rows. - */ - public MDDoubleArray(int[] dimensions, int capacityHyperRows) - { - this(new double[getLength(dimensions, capacityHyperRows)], dimensions, false); - } - - /** - * Creates a {@link MDDoubleArray} from the given {@code flattenedArray} and {@code dimensions}. It - * is checked that the arguments are compatible. - */ - public MDDoubleArray(double[] flattenedArray, int[] dimensions) - { - this(flattenedArray, dimensions, true); - } - - /** - * Creates a {@link MDDoubleArray} from the given <var>flattenedArray</var> and - * <var>dimensions</var>. If <var>checkDimensions</var> is {@code true}, it is checked that the - * arguments are compatible. - */ - public MDDoubleArray(double[] flattenedArray, int[] dimensions, boolean checkdimensions) - { - super(dimensions, flattenedArray.length, 0); - assert flattenedArray != null; - - if (checkdimensions) - { - final int expectedLength = getLength(dimensions, 0); - if (flattenedArray.length != expectedLength) - { - throw new IllegalArgumentException("Actual array length " + flattenedArray.length - + " does not match expected length " + expectedLength + "."); - } - } - this.flattenedArray = flattenedArray; - } - - /** - * Creates a {@link MDDoubleArray} from the given <var>matrix</var> of rank 2. Note that the values - * in <var>matrix</var> will be copied and thus the created {@link MDIntArray} will be - * independent from <var>matrix</var> after construction. - */ - public MDDoubleArray(double[][] matrix) - { - this(matrix, getDimensions(matrix)); - } - - /** - * Creates a {@link MDDoubleArray} from the given <var>matrix</var> of rank 2 and the - * <var>dimension</var> which need to be less or equal the dimensions of <var>matrix</var>. Note - * that the values in <var>matrix</var> will be copied and thus the created {@link MDIntArray} - * will be independent from <var>matrix</var> after construction. - */ - public MDDoubleArray(double[][] matrix, int[] dimensions) - { - super(dimensions, 0, matrix.length); - - final int sizeX = dimensions[0]; - final int sizeY = dimensions[1]; - int length = getLength(dimensions, 0); - this.flattenedArray = new double[length]; - for (int i = 0; i < sizeX; ++i) - { - System.arraycopy(matrix[i], 0, flattenedArray, i * sizeY, sizeY); - } - } - - private static int[] getDimensions(double[][] matrix) - { - assert matrix != null; - - return new int[] - { matrix.length, matrix.length == 0 ? 0 : matrix[0].length }; - } - - @Override - public int capacity() - { - return flattenedArray.length; - } - - @Override - public Double getAsObject(int... indices) - { - return get(indices); - } - - @Override - public void setToObject(Double value, int... indices) - { - set(value, indices); - } - - @Override - public Double getAsObject(int linearIndex) - { - return get(linearIndex); - } - - @Override - public void setToObject(Double value, int linearIndex) - { - set(value, linearIndex); - } - - @Override - public double[] getAsFlatArray() - { - return flattenedArray; - } - - @Override - public double[] getCopyAsFlatArray() - { - return ArrayUtils.subarray(flattenedArray, 0, dimensions[0] * hyperRowLength); - } - - @Override - protected void adaptCapacityHyperRows() - { - final double[] oldArray = this.flattenedArray; - this.flattenedArray = new double[capacityHyperRows * hyperRowLength]; - System.arraycopy(oldArray, 0, flattenedArray, 0, - Math.min(oldArray.length, flattenedArray.length)); - } - - /** - * Returns the value of array at the position defined by <var>indices</var>. - */ - public double get(int... indices) - { - return flattenedArray[computeIndex(indices)]; - } - - /** - * Returns the value of a one-dimensional array at the position defined by <var>index</var>. - * <p> - * <b>Do not call for arrays other than one-dimensional!</b> - */ - public double get(int index) - { - return flattenedArray[index]; - } - - /** - * Returns the value of a two-dimensional array at the position defined by <var>indexX</var> and - * <var>indexY</var>. - * <p> - * <b>Do not call for arrays other than two-dimensional!</b> - */ - public double get(int indexX, int indexY) - { - return flattenedArray[computeIndex(indexX, indexY)]; - } - - /** - * Returns the value of a three-dimensional array at the position defined by <var>indexX</var>, - * <var>indexY</var> and <var>indexZ</var>. - * <p> - * <b>Do not call for arrays other than three-dimensional!</b> - */ - public double get(int indexX, int indexY, int indexZ) - { - return flattenedArray[computeIndex(indexX, indexY, indexZ)]; - } - - /** - * Sets the <var>value</var> of array at the position defined by <var>indices</var>. - */ - public void set(double value, int... indices) - { - flattenedArray[computeIndex(indices)] = value; - } - - /** - * Sets the <var>value</var> of a one-dimension array at the position defined by - * <var>index</var>. - * <p> - * <b>Do not call for arrays other than one-dimensional!</b> - */ - public void set(double value, int index) - { - flattenedArray[index] = value; - } - - /** - * Sets the <var>value</var> of a two-dimensional array at the position defined by - * <var>indexX</var> and <var>indexY</var>. - * <p> - * <b>Do not call for arrays other than two-dimensional!</b> - */ - public void set(double value, int indexX, int indexY) - { - flattenedArray[computeIndex(indexX, indexY)] = value; - } - - /** - * Sets the <var>value</var> of a three-dimensional array at the position defined by - * <var>indexX</var>, <var>indexY</var> and <var>indexZ</var>. - * <p> - * <b>Do not call for arrays other than three-dimensional!</b> - */ - public void set(double value, int indexX, int indexY, int indexZ) - { - flattenedArray[computeIndex(indexX, indexY, indexZ)] = value; - } - - /** - * Creates and returns a matrix from a two-dimensional array. - * <p> - * <b>Do not call for arrays other than two-dimensional!</b> - */ - public double[][] toMatrix() - { - final int sizeX = dimensions[0]; - final int sizeY = dimensions[1]; - final double[][] result = new double[sizeX][sizeY]; - for (int i = 0; i < sizeX; ++i) - { - System.arraycopy(flattenedArray, i * sizeY, result[i], 0, sizeY); - } - return result; - } - - // - // Object - // - - @Override - public int hashCode() - { - final int prime = 31; - int result = 1; - result = prime * result + Arrays.hashCode(getValuesAsFlatArray()); - result = prime * result + Arrays.hashCode(dimensions); - return result; - } - - @Override - public boolean equals(Object obj) - { - if (this == obj) - { - return true; - } - if (obj == null) - { - return false; - } - if (getClass() != obj.getClass()) - { - return false; - } - MDDoubleArray other = (MDDoubleArray) obj; - if (Arrays.equals(getValuesAsFlatArray(), other.getValuesAsFlatArray()) == false) - { - return false; - } - if (Arrays.equals(dimensions, other.dimensions) == false) - { - return false; - } - return true; - } - - private double[] getValuesAsFlatArray() - { - return (dimensions[0] < capacityHyperRows) ? getCopyAsFlatArray() : getAsFlatArray(); - } - - private void readObject(ObjectInputStream stream) throws IOException, ClassNotFoundException - { - stream.defaultReadObject(); - if (hyperRowLength == 0) - { - this.hyperRowLength = computeHyperRowLength(dimensions); - } - if (capacityHyperRows == 0) - { - this.capacityHyperRows = dimensions[0]; - } - if (size == 0) - { - this.size = hyperRowLength * dimensions[0]; - } - } - -} diff --git a/base/source/java/ch/systemsx/cisd/base/mdarray/MDFloatArray.java b/base/source/java/ch/systemsx/cisd/base/mdarray/MDFloatArray.java deleted file mode 100644 index 4b10fb8da65dfb5bf68f5a34265b293657eb5ec4..0000000000000000000000000000000000000000 --- a/base/source/java/ch/systemsx/cisd/base/mdarray/MDFloatArray.java +++ /dev/null @@ -1,376 +0,0 @@ -/* - * Copyright 2008 ETH Zuerich, CISD - * - * 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. - */ - -package ch.systemsx.cisd.base.mdarray; - -import java.io.IOException; -import java.io.ObjectInputStream; -import java.util.Arrays; - -import org.apache.commons.lang.ArrayUtils; - -/** - * A multi-dimensional <code>float</code> array. - * - * @author Bernd Rinn - */ -public final class MDFloatArray extends MDAbstractArray<Float> -{ - private static final long serialVersionUID = 1L; - - private float[] flattenedArray; - - /** - * Creates an empty {@link MDIntArray} with the <var>dimensions</var>. Convenience method if - * <var>dimensions</var> are available as {@code long[]}. - */ - public MDFloatArray(long[] dimensions) - { - this(new float[getLength(dimensions, 0)], toInt(dimensions), false); - } - - /** - * Creates an empty {@link MDFloatArray} with the <var>dimensions</var>. If - * <code>capacityHyperRows > dimensions[0]</code>, then it will create an array with a capacity - * of <var>capacityHyperRows</var> hyper-rows. Convenience method if <var>dimensions</var> are - * available as {@code long[]}. - */ - public MDFloatArray(long[] dimensions, long capacityHyperRows) - { - this(new float[getLength(dimensions, capacityHyperRows)], toInt(dimensions), false); - } - - /** - * Creates a {@link MDFloatArray} from the given {@code flattenedArray} and {@code dimensions}. It - * is checked that the arguments are compatible. Convenience method if <var>dimensions</var> are - * available as {@code long[]}. - */ - public MDFloatArray(float[] flattenedArray, long[] dimensions) - { - this(flattenedArray, toInt(dimensions), true); - } - - /** - * Creates a {@link MDFloatArray} from the given <var>flattenedArray</var> and - * <var>dimensions</var>. If <var>checkDimensions</var> is {@code true}, it is checked that the - * arguments are compatible. Convenience method if <var>dimensions</var> are available as - * {@code long[]}. - */ - public MDFloatArray(float[] flattenedArray, long[] dimensions, boolean checkdimensions) - { - this(flattenedArray, toInt(dimensions), checkdimensions); - } - - /** - * Creates an empty {@link MDFloatArray} with the <var>dimensions</var>. - */ - public MDFloatArray(int[] dimensions) - { - this(new float[getLength(dimensions, 0)], dimensions, false); - } - - /** - * Creates an empty {@link MDFloatArray} with the <var>dimensions</var>. If - * <code>capacityHyperRows > dimensions[0]</code>, then it will create an array with a capacity - * of <var>capacityHyperRows</var> hyper-rows. - */ - public MDFloatArray(int[] dimensions, int capacityHyperRows) - { - this(new float[getLength(dimensions, capacityHyperRows)], dimensions, false); - } - - /** - * Creates a {@link MDFloatArray} from the given {@code flattenedArray} and {@code dimensions}. It - * is checked that the arguments are compatible. - */ - public MDFloatArray(float[] flattenedArray, int[] dimensions) - { - this(flattenedArray, dimensions, true); - } - - /** - * Creates a {@link MDFloatArray} from the given <var>flattenedArray</var> and - * <var>dimensions</var>. If <var>checkDimensions</var> is {@code true}, it is checked that the - * arguments are compatible. - */ - public MDFloatArray(float[] flattenedArray, int[] dimensions, boolean checkdimensions) - { - super(dimensions, flattenedArray.length, 0); - assert flattenedArray != null; - - if (checkdimensions) - { - final int expectedLength = getLength(dimensions, 0); - if (flattenedArray.length != expectedLength) - { - throw new IllegalArgumentException("Actual array length " + flattenedArray.length - + " does not match expected length " + expectedLength + "."); - } - } - this.flattenedArray = flattenedArray; - } - - /** - * Creates a {@link MDFloatArray} from the given <var>matrix</var> of rank 2. Note that the values - * in <var>matrix</var> will be copied and thus the created {@link MDIntArray} will be - * independent from <var>matrix</var> after construction. - */ - public MDFloatArray(float[][] matrix) - { - this(matrix, getDimensions(matrix)); - } - - /** - * Creates a {@link MDFloatArray} from the given <var>matrix</var> of rank 2 and the - * <var>dimension</var> which need to be less or equal the dimensions of <var>matrix</var>. Note - * that the values in <var>matrix</var> will be copied and thus the created {@link MDIntArray} - * will be independent from <var>matrix</var> after construction. - */ - public MDFloatArray(float[][] matrix, int[] dimensions) - { - super(dimensions, 0, matrix.length); - - final int sizeX = dimensions[0]; - final int sizeY = dimensions[1]; - int length = getLength(dimensions, 0); - this.flattenedArray = new float[length]; - for (int i = 0; i < sizeX; ++i) - { - System.arraycopy(matrix[i], 0, flattenedArray, i * sizeY, sizeY); - } - } - - private static int[] getDimensions(float[][] matrix) - { - assert matrix != null; - - return new int[] - { matrix.length, matrix.length == 0 ? 0 : matrix[0].length }; - } - - @Override - public int capacity() - { - return flattenedArray.length; - } - - @Override - public Float getAsObject(int... indices) - { - return get(indices); - } - - @Override - public void setToObject(Float value, int... indices) - { - set(value, indices); - } - - @Override - public Float getAsObject(int linearIndex) - { - return get(linearIndex); - } - - @Override - public void setToObject(Float value, int linearIndex) - { - set(value, linearIndex); - } - - @Override - public float[] getAsFlatArray() - { - return flattenedArray; - } - - @Override - public float[] getCopyAsFlatArray() - { - return ArrayUtils.subarray(flattenedArray, 0, dimensions[0] * hyperRowLength); - } - - @Override - protected void adaptCapacityHyperRows() - { - final float[] oldArray = this.flattenedArray; - this.flattenedArray = new float[capacityHyperRows * hyperRowLength]; - System.arraycopy(oldArray, 0, flattenedArray, 0, - Math.min(oldArray.length, flattenedArray.length)); - } - - /** - * Returns the value of array at the position defined by <var>indices</var>. - */ - public float get(int... indices) - { - return flattenedArray[computeIndex(indices)]; - } - - /** - * Returns the value of a one-dimensional array at the position defined by <var>index</var>. - * <p> - * <b>Do not call for arrays other than one-dimensional!</b> - */ - public float get(int index) - { - return flattenedArray[index]; - } - - /** - * Returns the value of a two-dimensional array at the position defined by <var>indexX</var> and - * <var>indexY</var>. - * <p> - * <b>Do not call for arrays other than two-dimensional!</b> - */ - public float get(int indexX, int indexY) - { - return flattenedArray[computeIndex(indexX, indexY)]; - } - - /** - * Returns the value of a three-dimensional array at the position defined by <var>indexX</var>, - * <var>indexY</var> and <var>indexZ</var>. - * <p> - * <b>Do not call for arrays other than three-dimensional!</b> - */ - public float get(int indexX, int indexY, int indexZ) - { - return flattenedArray[computeIndex(indexX, indexY, indexZ)]; - } - - /** - * Sets the <var>value</var> of array at the position defined by <var>indices</var>. - */ - public void set(float value, int... indices) - { - flattenedArray[computeIndex(indices)] = value; - } - - /** - * Sets the <var>value</var> of a one-dimension array at the position defined by - * <var>index</var>. - * <p> - * <b>Do not call for arrays other than one-dimensional!</b> - */ - public void set(float value, int index) - { - flattenedArray[index] = value; - } - - /** - * Sets the <var>value</var> of a two-dimensional array at the position defined by - * <var>indexX</var> and <var>indexY</var>. - * <p> - * <b>Do not call for arrays other than two-dimensional!</b> - */ - public void set(float value, int indexX, int indexY) - { - flattenedArray[computeIndex(indexX, indexY)] = value; - } - - /** - * Sets the <var>value</var> of a three-dimensional array at the position defined by - * <var>indexX</var>, <var>indexY</var> and <var>indexZ</var>. - * <p> - * <b>Do not call for arrays other than three-dimensional!</b> - */ - public void set(float value, int indexX, int indexY, int indexZ) - { - flattenedArray[computeIndex(indexX, indexY, indexZ)] = value; - } - - /** - * Creates and returns a matrix from a two-dimensional array. - * <p> - * <b>Do not call for arrays other than two-dimensional!</b> - */ - public float[][] toMatrix() - { - final int sizeX = dimensions[0]; - final int sizeY = dimensions[1]; - final float[][] result = new float[sizeX][sizeY]; - for (int i = 0; i < sizeX; ++i) - { - System.arraycopy(flattenedArray, i * sizeY, result[i], 0, sizeY); - } - return result; - } - - // - // Object - // - - @Override - public int hashCode() - { - final int prime = 31; - int result = 1; - result = prime * result + Arrays.hashCode(getValuesAsFlatArray()); - result = prime * result + Arrays.hashCode(dimensions); - return result; - } - - @Override - public boolean equals(Object obj) - { - if (this == obj) - { - return true; - } - if (obj == null) - { - return false; - } - if (getClass() != obj.getClass()) - { - return false; - } - MDFloatArray other = (MDFloatArray) obj; - if (Arrays.equals(getValuesAsFlatArray(), other.getValuesAsFlatArray()) == false) - { - return false; - } - if (Arrays.equals(dimensions, other.dimensions) == false) - { - return false; - } - return true; - } - - private float[] getValuesAsFlatArray() - { - return (dimensions[0] < capacityHyperRows) ? getCopyAsFlatArray() : getAsFlatArray(); - } - - private void readObject(ObjectInputStream stream) throws IOException, ClassNotFoundException - { - stream.defaultReadObject(); - if (hyperRowLength == 0) - { - this.hyperRowLength = computeHyperRowLength(dimensions); - } - if (capacityHyperRows == 0) - { - this.capacityHyperRows = dimensions[0]; - } - if (size == 0) - { - this.size = hyperRowLength * dimensions[0]; - } - } - -} diff --git a/base/source/java/ch/systemsx/cisd/base/mdarray/MDIntArray.java b/base/source/java/ch/systemsx/cisd/base/mdarray/MDIntArray.java deleted file mode 100644 index 76cbcd144e3814b0b754a1ba93dd46588b7e9e85..0000000000000000000000000000000000000000 --- a/base/source/java/ch/systemsx/cisd/base/mdarray/MDIntArray.java +++ /dev/null @@ -1,376 +0,0 @@ -/* - * Copyright 2008 ETH Zuerich, CISD - * - * 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. - */ - -package ch.systemsx.cisd.base.mdarray; - -import java.io.IOException; -import java.io.ObjectInputStream; -import java.util.Arrays; - -import org.apache.commons.lang.ArrayUtils; - -/** - * A multi-dimensional <code>int</code> array. - * - * @author Bernd Rinn - */ -public final class MDIntArray extends MDAbstractArray<Integer> -{ - private static final long serialVersionUID = 1L; - - private int[] flattenedArray; - - /** - * Creates an empty {@link MDIntArray} with the <var>dimensions</var>. Convenience method if - * <var>dimensions</var> are available as {@code long[]}. - */ - public MDIntArray(long[] dimensions) - { - this(new int[getLength(dimensions, 0)], toInt(dimensions), false); - } - - /** - * Creates an empty {@link MDIntArray} with the <var>dimensions</var>. If - * <code>capacityHyperRows > dimensions[0]</code>, then it will create an array with a capacity - * of <var>capacityHyperRows</var> hyper-rows. Convenience method if <var>dimensions</var> are - * available as {@code long[]}. - */ - public MDIntArray(long[] dimensions, long capacityHyperRows) - { - this(new int[getLength(dimensions, capacityHyperRows)], toInt(dimensions), false); - } - - /** - * Creates a {@link MDIntArray} from the given {@code flattenedArray} and {@code dimensions}. It - * is checked that the arguments are compatible. Convenience method if <var>dimensions</var> are - * available as {@code long[]}. - */ - public MDIntArray(int[] flattenedArray, long[] dimensions) - { - this(flattenedArray, toInt(dimensions), true); - } - - /** - * Creates a {@link MDIntArray} from the given <var>flattenedArray</var> and - * <var>dimensions</var>. If <var>checkDimensions</var> is {@code true}, it is checked that the - * arguments are compatible. Convenience method if <var>dimensions</var> are available as - * {@code long[]}. - */ - public MDIntArray(int[] flattenedArray, long[] dimensions, boolean checkdimensions) - { - this(flattenedArray, toInt(dimensions), checkdimensions); - } - - /** - * Creates an empty {@link MDIntArray} with the <var>dimensions</var>. - */ - public MDIntArray(int[] dimensions) - { - this(new int[getLength(dimensions, 0)], dimensions, false); - } - - /** - * Creates an empty {@link MDIntArray} with the <var>dimensions</var>. If - * <code>capacityHyperRows > dimensions[0]</code>, then it will create an array with a capacity - * of <var>capacityHyperRows</var> hyper-rows. - */ - public MDIntArray(int[] dimensions, int capacityHyperRows) - { - this(new int[getLength(dimensions, capacityHyperRows)], dimensions, false); - } - - /** - * Creates a {@link MDIntArray} from the given {@code flattenedArray} and {@code dimensions}. It - * is checked that the arguments are compatible. - */ - public MDIntArray(int[] flattenedArray, int[] dimensions) - { - this(flattenedArray, dimensions, true); - } - - /** - * Creates a {@link MDIntArray} from the given <var>flattenedArray</var> and - * <var>dimensions</var>. If <var>checkDimensions</var> is {@code true}, it is checked that the - * arguments are compatible. - */ - public MDIntArray(int[] flattenedArray, int[] dimensions, boolean checkdimensions) - { - super(dimensions, flattenedArray.length, 0); - assert flattenedArray != null; - - if (checkdimensions) - { - final int expectedLength = getLength(dimensions, 0); - if (flattenedArray.length != expectedLength) - { - throw new IllegalArgumentException("Actual array length " + flattenedArray.length - + " does not match expected length " + expectedLength + "."); - } - } - this.flattenedArray = flattenedArray; - } - - /** - * Creates a {@link MDIntArray} from the given <var>matrix</var> of rank 2. Note that the values - * in <var>matrix</var> will be copied and thus the created {@link MDIntArray} will be - * independent from <var>matrix</var> after construction. - */ - public MDIntArray(int[][] matrix) - { - this(matrix, getDimensions(matrix)); - } - - /** - * Creates a {@link MDIntArray} from the given <var>matrix</var> of rank 2 and the - * <var>dimension</var> which need to be less or equal the dimensions of <var>matrix</var>. Note - * that the values in <var>matrix</var> will be copied and thus the created {@link MDIntArray} - * will be independent from <var>matrix</var> after construction. - */ - public MDIntArray(int[][] matrix, int[] dimensions) - { - super(dimensions, 0, matrix.length); - - final int sizeX = dimensions[0]; - final int sizeY = dimensions[1]; - int length = getLength(dimensions, 0); - this.flattenedArray = new int[length]; - for (int i = 0; i < sizeX; ++i) - { - System.arraycopy(matrix[i], 0, flattenedArray, i * sizeY, sizeY); - } - } - - private static int[] getDimensions(int[][] matrix) - { - assert matrix != null; - - return new int[] - { matrix.length, matrix.length == 0 ? 0 : matrix[0].length }; - } - - @Override - public int capacity() - { - return flattenedArray.length; - } - - @Override - public Integer getAsObject(int... indices) - { - return get(indices); - } - - @Override - public void setToObject(Integer value, int... indices) - { - set(value, indices); - } - - @Override - public Integer getAsObject(int linearIndex) - { - return get(linearIndex); - } - - @Override - public void setToObject(Integer value, int linearIndex) - { - set(value, linearIndex); - } - - @Override - public int[] getAsFlatArray() - { - return flattenedArray; - } - - @Override - public int[] getCopyAsFlatArray() - { - return ArrayUtils.subarray(flattenedArray, 0, dimensions[0] * hyperRowLength); - } - - @Override - protected void adaptCapacityHyperRows() - { - final int[] oldArray = this.flattenedArray; - this.flattenedArray = new int[capacityHyperRows * hyperRowLength]; - System.arraycopy(oldArray, 0, flattenedArray, 0, - Math.min(oldArray.length, flattenedArray.length)); - } - - /** - * Returns the value of array at the position defined by <var>indices</var>. - */ - public int get(int... indices) - { - return flattenedArray[computeIndex(indices)]; - } - - /** - * Returns the value of a one-dimensional array at the position defined by <var>index</var>. - * <p> - * <b>Do not call for arrays other than one-dimensional!</b> - */ - public int get(int index) - { - return flattenedArray[index]; - } - - /** - * Returns the value of a two-dimensional array at the position defined by <var>indexX</var> and - * <var>indexY</var>. - * <p> - * <b>Do not call for arrays other than two-dimensional!</b> - */ - public int get(int indexX, int indexY) - { - return flattenedArray[computeIndex(indexX, indexY)]; - } - - /** - * Returns the value of a three-dimensional array at the position defined by <var>indexX</var>, - * <var>indexY</var> and <var>indexZ</var>. - * <p> - * <b>Do not call for arrays other than three-dimensional!</b> - */ - public int get(int indexX, int indexY, int indexZ) - { - return flattenedArray[computeIndex(indexX, indexY, indexZ)]; - } - - /** - * Sets the <var>value</var> of array at the position defined by <var>indices</var>. - */ - public void set(int value, int... indices) - { - flattenedArray[computeIndex(indices)] = value; - } - - /** - * Sets the <var>value</var> of a one-dimension array at the position defined by - * <var>index</var>. - * <p> - * <b>Do not call for arrays other than one-dimensional!</b> - */ - public void set(int value, int index) - { - flattenedArray[index] = value; - } - - /** - * Sets the <var>value</var> of a two-dimensional array at the position defined by - * <var>indexX</var> and <var>indexY</var>. - * <p> - * <b>Do not call for arrays other than two-dimensional!</b> - */ - public void set(int value, int indexX, int indexY) - { - flattenedArray[computeIndex(indexX, indexY)] = value; - } - - /** - * Sets the <var>value</var> of a three-dimensional array at the position defined by - * <var>indexX</var>, <var>indexY</var> and <var>indexZ</var>. - * <p> - * <b>Do not call for arrays other than three-dimensional!</b> - */ - public void set(int value, int indexX, int indexY, int indexZ) - { - flattenedArray[computeIndex(indexX, indexY, indexZ)] = value; - } - - /** - * Creates and returns a matrix from a two-dimensional array. - * <p> - * <b>Do not call for arrays other than two-dimensional!</b> - */ - public int[][] toMatrix() - { - final int sizeX = dimensions[0]; - final int sizeY = dimensions[1]; - final int[][] result = new int[sizeX][sizeY]; - for (int i = 0; i < sizeX; ++i) - { - System.arraycopy(flattenedArray, i * sizeY, result[i], 0, sizeY); - } - return result; - } - - // - // Object - // - - @Override - public int hashCode() - { - final int prime = 31; - int result = 1; - result = prime * result + Arrays.hashCode(getValuesAsFlatArray()); - result = prime * result + Arrays.hashCode(dimensions); - return result; - } - - @Override - public boolean equals(Object obj) - { - if (this == obj) - { - return true; - } - if (obj == null) - { - return false; - } - if (getClass() != obj.getClass()) - { - return false; - } - MDIntArray other = (MDIntArray) obj; - if (Arrays.equals(getValuesAsFlatArray(), other.getValuesAsFlatArray()) == false) - { - return false; - } - if (Arrays.equals(dimensions, other.dimensions) == false) - { - return false; - } - return true; - } - - private int[] getValuesAsFlatArray() - { - return (dimensions[0] < capacityHyperRows) ? getCopyAsFlatArray() : getAsFlatArray(); - } - - private void readObject(ObjectInputStream stream) throws IOException, ClassNotFoundException - { - stream.defaultReadObject(); - if (hyperRowLength == 0) - { - this.hyperRowLength = computeHyperRowLength(dimensions); - } - if (capacityHyperRows == 0) - { - this.capacityHyperRows = dimensions[0]; - } - if (size == 0) - { - this.size = hyperRowLength * dimensions[0]; - } - } - -} diff --git a/base/source/java/ch/systemsx/cisd/base/mdarray/MDLongArray.java b/base/source/java/ch/systemsx/cisd/base/mdarray/MDLongArray.java deleted file mode 100644 index 3b927b131fe4bbc0a87f088b2b65bf344553c958..0000000000000000000000000000000000000000 --- a/base/source/java/ch/systemsx/cisd/base/mdarray/MDLongArray.java +++ /dev/null @@ -1,376 +0,0 @@ -/* - * Copyright 2008 ETH Zuerich, CISD - * - * 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. - */ - -package ch.systemsx.cisd.base.mdarray; - -import java.io.IOException; -import java.io.ObjectInputStream; -import java.util.Arrays; - -import org.apache.commons.lang.ArrayUtils; - -/** - * A multi-dimensional <code>long</code> array. - * - * @author Bernd Rinn - */ -public final class MDLongArray extends MDAbstractArray<Long> -{ - private static final long serialVersionUID = 1L; - - private long[] flattenedArray; - - /** - * Creates an empty {@link MDIntArray} with the <var>dimensions</var>. Convenience method if - * <var>dimensions</var> are available as {@code long[]}. - */ - public MDLongArray(long[] dimensions) - { - this(new long[getLength(dimensions, 0)], toInt(dimensions), false); - } - - /** - * Creates an empty {@link MDLongArray} with the <var>dimensions</var>. If - * <code>capacityHyperRows > dimensions[0]</code>, then it will create an array with a capacity - * of <var>capacityHyperRows</var> hyper-rows. Convenience method if <var>dimensions</var> are - * available as {@code long[]}. - */ - public MDLongArray(long[] dimensions, long capacityHyperRows) - { - this(new long[getLength(dimensions, capacityHyperRows)], toInt(dimensions), false); - } - - /** - * Creates a {@link MDLongArray} from the given {@code flattenedArray} and {@code dimensions}. It - * is checked that the arguments are compatible. Convenience method if <var>dimensions</var> are - * available as {@code long[]}. - */ - public MDLongArray(long[] flattenedArray, long[] dimensions) - { - this(flattenedArray, toInt(dimensions), true); - } - - /** - * Creates a {@link MDLongArray} from the given <var>flattenedArray</var> and - * <var>dimensions</var>. If <var>checkDimensions</var> is {@code true}, it is checked that the - * arguments are compatible. Convenience method if <var>dimensions</var> are available as - * {@code long[]}. - */ - public MDLongArray(long[] flattenedArray, long[] dimensions, boolean checkdimensions) - { - this(flattenedArray, toInt(dimensions), checkdimensions); - } - - /** - * Creates an empty {@link MDLongArray} with the <var>dimensions</var>. - */ - public MDLongArray(int[] dimensions) - { - this(new long[getLength(dimensions, 0)], dimensions, false); - } - - /** - * Creates an empty {@link MDLongArray} with the <var>dimensions</var>. If - * <code>capacityHyperRows > dimensions[0]</code>, then it will create an array with a capacity - * of <var>capacityHyperRows</var> hyper-rows. - */ - public MDLongArray(int[] dimensions, int capacityHyperRows) - { - this(new long[getLength(dimensions, capacityHyperRows)], dimensions, false); - } - - /** - * Creates a {@link MDLongArray} from the given {@code flattenedArray} and {@code dimensions}. It - * is checked that the arguments are compatible. - */ - public MDLongArray(long[] flattenedArray, int[] dimensions) - { - this(flattenedArray, dimensions, true); - } - - /** - * Creates a {@link MDLongArray} from the given <var>flattenedArray</var> and - * <var>dimensions</var>. If <var>checkDimensions</var> is {@code true}, it is checked that the - * arguments are compatible. - */ - public MDLongArray(long[] flattenedArray, int[] dimensions, boolean checkdimensions) - { - super(dimensions, flattenedArray.length, 0); - assert flattenedArray != null; - - if (checkdimensions) - { - final int expectedLength = getLength(dimensions, 0); - if (flattenedArray.length != expectedLength) - { - throw new IllegalArgumentException("Actual array length " + flattenedArray.length - + " does not match expected length " + expectedLength + "."); - } - } - this.flattenedArray = flattenedArray; - } - - /** - * Creates a {@link MDLongArray} from the given <var>matrix</var> of rank 2. Note that the values - * in <var>matrix</var> will be copied and thus the created {@link MDIntArray} will be - * independent from <var>matrix</var> after construction. - */ - public MDLongArray(long[][] matrix) - { - this(matrix, getDimensions(matrix)); - } - - /** - * Creates a {@link MDLongArray} from the given <var>matrix</var> of rank 2 and the - * <var>dimension</var> which need to be less or equal the dimensions of <var>matrix</var>. Note - * that the values in <var>matrix</var> will be copied and thus the created {@link MDIntArray} - * will be independent from <var>matrix</var> after construction. - */ - public MDLongArray(long[][] matrix, int[] dimensions) - { - super(dimensions, 0, matrix.length); - - final int sizeX = dimensions[0]; - final int sizeY = dimensions[1]; - int length = getLength(dimensions, 0); - this.flattenedArray = new long[length]; - for (int i = 0; i < sizeX; ++i) - { - System.arraycopy(matrix[i], 0, flattenedArray, i * sizeY, sizeY); - } - } - - private static int[] getDimensions(long[][] matrix) - { - assert matrix != null; - - return new int[] - { matrix.length, matrix.length == 0 ? 0 : matrix[0].length }; - } - - @Override - public int capacity() - { - return flattenedArray.length; - } - - @Override - public Long getAsObject(int... indices) - { - return get(indices); - } - - @Override - public void setToObject(Long value, int... indices) - { - set(value, indices); - } - - @Override - public Long getAsObject(int linearIndex) - { - return get(linearIndex); - } - - @Override - public void setToObject(Long value, int linearIndex) - { - set(value, linearIndex); - } - - @Override - public long[] getAsFlatArray() - { - return flattenedArray; - } - - @Override - public long[] getCopyAsFlatArray() - { - return ArrayUtils.subarray(flattenedArray, 0, dimensions[0] * hyperRowLength); - } - - @Override - protected void adaptCapacityHyperRows() - { - final long[] oldArray = this.flattenedArray; - this.flattenedArray = new long[capacityHyperRows * hyperRowLength]; - System.arraycopy(oldArray, 0, flattenedArray, 0, - Math.min(oldArray.length, flattenedArray.length)); - } - - /** - * Returns the value of array at the position defined by <var>indices</var>. - */ - public long get(int... indices) - { - return flattenedArray[computeIndex(indices)]; - } - - /** - * Returns the value of a one-dimensional array at the position defined by <var>index</var>. - * <p> - * <b>Do not call for arrays other than one-dimensional!</b> - */ - public long get(int index) - { - return flattenedArray[index]; - } - - /** - * Returns the value of a two-dimensional array at the position defined by <var>indexX</var> and - * <var>indexY</var>. - * <p> - * <b>Do not call for arrays other than two-dimensional!</b> - */ - public long get(int indexX, int indexY) - { - return flattenedArray[computeIndex(indexX, indexY)]; - } - - /** - * Returns the value of a three-dimensional array at the position defined by <var>indexX</var>, - * <var>indexY</var> and <var>indexZ</var>. - * <p> - * <b>Do not call for arrays other than three-dimensional!</b> - */ - public long get(int indexX, int indexY, int indexZ) - { - return flattenedArray[computeIndex(indexX, indexY, indexZ)]; - } - - /** - * Sets the <var>value</var> of array at the position defined by <var>indices</var>. - */ - public void set(long value, int... indices) - { - flattenedArray[computeIndex(indices)] = value; - } - - /** - * Sets the <var>value</var> of a one-dimension array at the position defined by - * <var>index</var>. - * <p> - * <b>Do not call for arrays other than one-dimensional!</b> - */ - public void set(long value, int index) - { - flattenedArray[index] = value; - } - - /** - * Sets the <var>value</var> of a two-dimensional array at the position defined by - * <var>indexX</var> and <var>indexY</var>. - * <p> - * <b>Do not call for arrays other than two-dimensional!</b> - */ - public void set(long value, int indexX, int indexY) - { - flattenedArray[computeIndex(indexX, indexY)] = value; - } - - /** - * Sets the <var>value</var> of a three-dimensional array at the position defined by - * <var>indexX</var>, <var>indexY</var> and <var>indexZ</var>. - * <p> - * <b>Do not call for arrays other than three-dimensional!</b> - */ - public void set(long value, int indexX, int indexY, int indexZ) - { - flattenedArray[computeIndex(indexX, indexY, indexZ)] = value; - } - - /** - * Creates and returns a matrix from a two-dimensional array. - * <p> - * <b>Do not call for arrays other than two-dimensional!</b> - */ - public long[][] toMatrix() - { - final int sizeX = dimensions[0]; - final int sizeY = dimensions[1]; - final long[][] result = new long[sizeX][sizeY]; - for (int i = 0; i < sizeX; ++i) - { - System.arraycopy(flattenedArray, i * sizeY, result[i], 0, sizeY); - } - return result; - } - - // - // Object - // - - @Override - public int hashCode() - { - final int prime = 31; - int result = 1; - result = prime * result + Arrays.hashCode(getValuesAsFlatArray()); - result = prime * result + Arrays.hashCode(dimensions); - return result; - } - - @Override - public boolean equals(Object obj) - { - if (this == obj) - { - return true; - } - if (obj == null) - { - return false; - } - if (getClass() != obj.getClass()) - { - return false; - } - MDLongArray other = (MDLongArray) obj; - if (Arrays.equals(getValuesAsFlatArray(), other.getValuesAsFlatArray()) == false) - { - return false; - } - if (Arrays.equals(dimensions, other.dimensions) == false) - { - return false; - } - return true; - } - - private long[] getValuesAsFlatArray() - { - return (dimensions[0] < capacityHyperRows) ? getCopyAsFlatArray() : getAsFlatArray(); - } - - private void readObject(ObjectInputStream stream) throws IOException, ClassNotFoundException - { - stream.defaultReadObject(); - if (hyperRowLength == 0) - { - this.hyperRowLength = computeHyperRowLength(dimensions); - } - if (capacityHyperRows == 0) - { - this.capacityHyperRows = dimensions[0]; - } - if (size == 0) - { - this.size = hyperRowLength * dimensions[0]; - } - } - -} diff --git a/base/source/java/ch/systemsx/cisd/base/mdarray/MDShortArray.java b/base/source/java/ch/systemsx/cisd/base/mdarray/MDShortArray.java deleted file mode 100644 index eefb0b8459ffaa62e9cf33b037c2fdb4b6dd4f41..0000000000000000000000000000000000000000 --- a/base/source/java/ch/systemsx/cisd/base/mdarray/MDShortArray.java +++ /dev/null @@ -1,376 +0,0 @@ -/* - * Copyright 2008 ETH Zuerich, CISD - * - * 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. - */ - -package ch.systemsx.cisd.base.mdarray; - -import java.io.IOException; -import java.io.ObjectInputStream; -import java.util.Arrays; - -import org.apache.commons.lang.ArrayUtils; - -/** - * A multi-dimensional <code>short</code> array. - * - * @author Bernd Rinn - */ -public final class MDShortArray extends MDAbstractArray<Short> -{ - private static final long serialVersionUID = 1L; - - private short[] flattenedArray; - - /** - * Creates an empty {@link MDIntArray} with the <var>dimensions</var>. Convenience method if - * <var>dimensions</var> are available as {@code long[]}. - */ - public MDShortArray(long[] dimensions) - { - this(new short[getLength(dimensions, 0)], toInt(dimensions), false); - } - - /** - * Creates an empty {@link MDShortArray} with the <var>dimensions</var>. If - * <code>capacityHyperRows > dimensions[0]</code>, then it will create an array with a capacity - * of <var>capacityHyperRows</var> hyper-rows. Convenience method if <var>dimensions</var> are - * available as {@code long[]}. - */ - public MDShortArray(long[] dimensions, long capacityHyperRows) - { - this(new short[getLength(dimensions, capacityHyperRows)], toInt(dimensions), false); - } - - /** - * Creates a {@link MDShortArray} from the given {@code flattenedArray} and {@code dimensions}. It - * is checked that the arguments are compatible. Convenience method if <var>dimensions</var> are - * available as {@code long[]}. - */ - public MDShortArray(short[] flattenedArray, long[] dimensions) - { - this(flattenedArray, toInt(dimensions), true); - } - - /** - * Creates a {@link MDShortArray} from the given <var>flattenedArray</var> and - * <var>dimensions</var>. If <var>checkDimensions</var> is {@code true}, it is checked that the - * arguments are compatible. Convenience method if <var>dimensions</var> are available as - * {@code long[]}. - */ - public MDShortArray(short[] flattenedArray, long[] dimensions, boolean checkdimensions) - { - this(flattenedArray, toInt(dimensions), checkdimensions); - } - - /** - * Creates an empty {@link MDShortArray} with the <var>dimensions</var>. - */ - public MDShortArray(int[] dimensions) - { - this(new short[getLength(dimensions, 0)], dimensions, false); - } - - /** - * Creates an empty {@link MDShortArray} with the <var>dimensions</var>. If - * <code>capacityHyperRows > dimensions[0]</code>, then it will create an array with a capacity - * of <var>capacityHyperRows</var> hyper-rows. - */ - public MDShortArray(int[] dimensions, int capacityHyperRows) - { - this(new short[getLength(dimensions, capacityHyperRows)], dimensions, false); - } - - /** - * Creates a {@link MDShortArray} from the given {@code flattenedArray} and {@code dimensions}. It - * is checked that the arguments are compatible. - */ - public MDShortArray(short[] flattenedArray, int[] dimensions) - { - this(flattenedArray, dimensions, true); - } - - /** - * Creates a {@link MDShortArray} from the given <var>flattenedArray</var> and - * <var>dimensions</var>. If <var>checkDimensions</var> is {@code true}, it is checked that the - * arguments are compatible. - */ - public MDShortArray(short[] flattenedArray, int[] dimensions, boolean checkdimensions) - { - super(dimensions, flattenedArray.length, 0); - assert flattenedArray != null; - - if (checkdimensions) - { - final int expectedLength = getLength(dimensions, 0); - if (flattenedArray.length != expectedLength) - { - throw new IllegalArgumentException("Actual array length " + flattenedArray.length - + " does not match expected length " + expectedLength + "."); - } - } - this.flattenedArray = flattenedArray; - } - - /** - * Creates a {@link MDShortArray} from the given <var>matrix</var> of rank 2. Note that the values - * in <var>matrix</var> will be copied and thus the created {@link MDIntArray} will be - * independent from <var>matrix</var> after construction. - */ - public MDShortArray(short[][] matrix) - { - this(matrix, getDimensions(matrix)); - } - - /** - * Creates a {@link MDShortArray} from the given <var>matrix</var> of rank 2 and the - * <var>dimension</var> which need to be less or equal the dimensions of <var>matrix</var>. Note - * that the values in <var>matrix</var> will be copied and thus the created {@link MDIntArray} - * will be independent from <var>matrix</var> after construction. - */ - public MDShortArray(short[][] matrix, int[] dimensions) - { - super(dimensions, 0, matrix.length); - - final int sizeX = dimensions[0]; - final int sizeY = dimensions[1]; - int length = getLength(dimensions, 0); - this.flattenedArray = new short[length]; - for (int i = 0; i < sizeX; ++i) - { - System.arraycopy(matrix[i], 0, flattenedArray, i * sizeY, sizeY); - } - } - - private static int[] getDimensions(short[][] matrix) - { - assert matrix != null; - - return new int[] - { matrix.length, matrix.length == 0 ? 0 : matrix[0].length }; - } - - @Override - public int capacity() - { - return flattenedArray.length; - } - - @Override - public Short getAsObject(int... indices) - { - return get(indices); - } - - @Override - public void setToObject(Short value, int... indices) - { - set(value, indices); - } - - @Override - public Short getAsObject(int linearIndex) - { - return get(linearIndex); - } - - @Override - public void setToObject(Short value, int linearIndex) - { - set(value, linearIndex); - } - - @Override - public short[] getAsFlatArray() - { - return flattenedArray; - } - - @Override - public short[] getCopyAsFlatArray() - { - return ArrayUtils.subarray(flattenedArray, 0, dimensions[0] * hyperRowLength); - } - - @Override - protected void adaptCapacityHyperRows() - { - final short[] oldArray = this.flattenedArray; - this.flattenedArray = new short[capacityHyperRows * hyperRowLength]; - System.arraycopy(oldArray, 0, flattenedArray, 0, - Math.min(oldArray.length, flattenedArray.length)); - } - - /** - * Returns the value of array at the position defined by <var>indices</var>. - */ - public short get(int... indices) - { - return flattenedArray[computeIndex(indices)]; - } - - /** - * Returns the value of a one-dimensional array at the position defined by <var>index</var>. - * <p> - * <b>Do not call for arrays other than one-dimensional!</b> - */ - public short get(int index) - { - return flattenedArray[index]; - } - - /** - * Returns the value of a two-dimensional array at the position defined by <var>indexX</var> and - * <var>indexY</var>. - * <p> - * <b>Do not call for arrays other than two-dimensional!</b> - */ - public short get(int indexX, int indexY) - { - return flattenedArray[computeIndex(indexX, indexY)]; - } - - /** - * Returns the value of a three-dimensional array at the position defined by <var>indexX</var>, - * <var>indexY</var> and <var>indexZ</var>. - * <p> - * <b>Do not call for arrays other than three-dimensional!</b> - */ - public short get(int indexX, int indexY, int indexZ) - { - return flattenedArray[computeIndex(indexX, indexY, indexZ)]; - } - - /** - * Sets the <var>value</var> of array at the position defined by <var>indices</var>. - */ - public void set(short value, int... indices) - { - flattenedArray[computeIndex(indices)] = value; - } - - /** - * Sets the <var>value</var> of a one-dimension array at the position defined by - * <var>index</var>. - * <p> - * <b>Do not call for arrays other than one-dimensional!</b> - */ - public void set(short value, int index) - { - flattenedArray[index] = value; - } - - /** - * Sets the <var>value</var> of a two-dimensional array at the position defined by - * <var>indexX</var> and <var>indexY</var>. - * <p> - * <b>Do not call for arrays other than two-dimensional!</b> - */ - public void set(short value, int indexX, int indexY) - { - flattenedArray[computeIndex(indexX, indexY)] = value; - } - - /** - * Sets the <var>value</var> of a three-dimensional array at the position defined by - * <var>indexX</var>, <var>indexY</var> and <var>indexZ</var>. - * <p> - * <b>Do not call for arrays other than three-dimensional!</b> - */ - public void set(short value, int indexX, int indexY, int indexZ) - { - flattenedArray[computeIndex(indexX, indexY, indexZ)] = value; - } - - /** - * Creates and returns a matrix from a two-dimensional array. - * <p> - * <b>Do not call for arrays other than two-dimensional!</b> - */ - public short[][] toMatrix() - { - final int sizeX = dimensions[0]; - final int sizeY = dimensions[1]; - final short[][] result = new short[sizeX][sizeY]; - for (int i = 0; i < sizeX; ++i) - { - System.arraycopy(flattenedArray, i * sizeY, result[i], 0, sizeY); - } - return result; - } - - // - // Object - // - - @Override - public int hashCode() - { - final int prime = 31; - int result = 1; - result = prime * result + Arrays.hashCode(getValuesAsFlatArray()); - result = prime * result + Arrays.hashCode(dimensions); - return result; - } - - @Override - public boolean equals(Object obj) - { - if (this == obj) - { - return true; - } - if (obj == null) - { - return false; - } - if (getClass() != obj.getClass()) - { - return false; - } - MDShortArray other = (MDShortArray) obj; - if (Arrays.equals(getValuesAsFlatArray(), other.getValuesAsFlatArray()) == false) - { - return false; - } - if (Arrays.equals(dimensions, other.dimensions) == false) - { - return false; - } - return true; - } - - private short[] getValuesAsFlatArray() - { - return (dimensions[0] < capacityHyperRows) ? getCopyAsFlatArray() : getAsFlatArray(); - } - - private void readObject(ObjectInputStream stream) throws IOException, ClassNotFoundException - { - stream.defaultReadObject(); - if (hyperRowLength == 0) - { - this.hyperRowLength = computeHyperRowLength(dimensions); - } - if (capacityHyperRows == 0) - { - this.capacityHyperRows = dimensions[0]; - } - if (size == 0) - { - this.size = hyperRowLength * dimensions[0]; - } - } - -} diff --git a/base/source/java/ch/systemsx/cisd/base/mdarray/package.html b/base/source/java/ch/systemsx/cisd/base/mdarray/package.html deleted file mode 100644 index 1788c177d1300b1b2695fead39a39303d6121e3e..0000000000000000000000000000000000000000 --- a/base/source/java/ch/systemsx/cisd/base/mdarray/package.html +++ /dev/null @@ -1,19 +0,0 @@ -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" - "http://www.w3.org/TR/html4/loose.dtd"> -<html> -<head> -<title>Multi-dimensional arrays.</title> -</head> -<body> -<p> -This package provides an implementation of multi-dimensional numerical arrays in Java. Contrary to -the <i>array of arrays</i> representation that is built into the Java language, the classes in this -package use one contiguous array and appropriate index operations to access the elements of the -array. -</p> -<p> -The number of indices (or axis') of an array is called the <i>rank</i> of the array, the set of -extends of the array along each of its axis' are called the <i>dimensions</i> of the array. -</p> -</body> -</html> \ No newline at end of file diff --git a/base/source/java/ch/systemsx/cisd/base/namedthread/ICallableNameProvider.java b/base/source/java/ch/systemsx/cisd/base/namedthread/ICallableNameProvider.java deleted file mode 100644 index 061e213279c41667053baa3f34acaa665226a80f..0000000000000000000000000000000000000000 --- a/base/source/java/ch/systemsx/cisd/base/namedthread/ICallableNameProvider.java +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Copyright 2011 ETH Zuerich, CISD - * - * 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. - */ - -package ch.systemsx.cisd.base.namedthread; - -/** - * A name provider for a {@link java.util.concurrent.Callable}. - * - * @author Bernd Rinn - */ -public interface ICallableNameProvider -{ - /** Returns the name to be used for the thread name. */ - public String getCallableName(); - -} diff --git a/base/source/java/ch/systemsx/cisd/base/namedthread/IRunnableNameProvider.java b/base/source/java/ch/systemsx/cisd/base/namedthread/IRunnableNameProvider.java deleted file mode 100644 index adf021b750900aded2042ac5c19c602ce98ef000..0000000000000000000000000000000000000000 --- a/base/source/java/ch/systemsx/cisd/base/namedthread/IRunnableNameProvider.java +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Copyright 2011 ETH Zuerich, CISD - * - * 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. - */ - -package ch.systemsx.cisd.base.namedthread; - -/** - * A name provider for a {@link Runnable}. - * - * @author Bernd Rinn - */ -public interface IRunnableNameProvider -{ - /** Returns the name to be used for the thread name. */ - public String getRunnableName(); -} diff --git a/base/source/java/ch/systemsx/cisd/base/namedthread/NamedFutureTask.java b/base/source/java/ch/systemsx/cisd/base/namedthread/NamedFutureTask.java deleted file mode 100644 index 7114e2a97ebd6dc4da197d25789c5a4d091c4689..0000000000000000000000000000000000000000 --- a/base/source/java/ch/systemsx/cisd/base/namedthread/NamedFutureTask.java +++ /dev/null @@ -1,72 +0,0 @@ -/* - * Copyright 2008 ETH Zuerich, CISD - * - * 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. - */ - -package ch.systemsx.cisd.base.namedthread; - -import java.util.concurrent.Callable; -import java.util.concurrent.FutureTask; - -/** - * A {@link FutureTask} with a name. - * - * @author Bernd Rinn - */ -class NamedFutureTask<V> extends FutureTask<V> implements NamedRunnable -{ - private final String name; - - private Thread thread; - - private String oldThreadName; - - NamedFutureTask(Callable<V> callable) - { - super(callable); - this.name = - (callable instanceof ICallableNameProvider) ? ((ICallableNameProvider) callable) - .getCallableName() : null; - } - - NamedFutureTask(Runnable runnable, V result) - { - super(runnable, result); - this.name = - (runnable instanceof IRunnableNameProvider) ? ((IRunnableNameProvider) runnable) - .getRunnableName() : null; - } - - void restoreThreadName() - { - if (this.thread != null) - { - this.thread.setName(oldThreadName); - this.thread = null; - } - } - - void setThread(Thread thread) - { - this.thread = thread; - this.oldThreadName = thread.getName(); - } - - @Override - public String getRunnableName() - { - return name; - } - -} diff --git a/base/source/java/ch/systemsx/cisd/base/namedthread/NamedRunnable.java b/base/source/java/ch/systemsx/cisd/base/namedthread/NamedRunnable.java deleted file mode 100644 index e4ceec0edcee261880a72a510b482d2af54bf5de..0000000000000000000000000000000000000000 --- a/base/source/java/ch/systemsx/cisd/base/namedthread/NamedRunnable.java +++ /dev/null @@ -1,26 +0,0 @@ -/* - * Copyright 2008 ETH Zuerich, CISD - * - * 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. - */ - -package ch.systemsx.cisd.base.namedthread; - -/** - * A {@link Runnable} with a name. - * - * @author Bernd Rinn - */ -public interface NamedRunnable extends Runnable, IRunnableNameProvider -{ -} diff --git a/base/source/java/ch/systemsx/cisd/base/namedthread/NamingThreadFactory.java b/base/source/java/ch/systemsx/cisd/base/namedthread/NamingThreadFactory.java deleted file mode 100644 index f74e529556a1f9280b79be8ff101e1a527477d3b..0000000000000000000000000000000000000000 --- a/base/source/java/ch/systemsx/cisd/base/namedthread/NamingThreadFactory.java +++ /dev/null @@ -1,88 +0,0 @@ -/* - * Copyright 2008 ETH Zuerich, CISD - * - * 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. - */ - -package ch.systemsx.cisd.base.namedthread; - -import java.util.concurrent.ThreadFactory; - -/** - * A {@link ThreadFactory} that gives (non-standard) names to new threads. If a name is a - * {@link IRunnableNameProvider}, the name provided by - * {@link IRunnableNameProvider#getRunnableName()} will be used, otherwise the - * <var>defaultName</var>. The thread count (number of already created threads in this factory) will - * always be appended. - * - * @author Bernd Rinn - */ -public class NamingThreadFactory implements ThreadFactory -{ - - private final String poolName; - - private boolean createDaemonThreads; - - private boolean addPoolName; - - private int threadCount; - - public NamingThreadFactory(String poolName) - { - this.poolName = poolName; - this.addPoolName = true; - this.createDaemonThreads = false; - this.threadCount = 0; - } - - @Override - public Thread newThread(Runnable r) - { - ++threadCount; - final String completePoolName = poolName + "-T" + threadCount; - final Thread thread = new PoolNameThread(r, completePoolName, addPoolName); - thread.setDaemon(createDaemonThreads); - return thread; - } - - String getPoolName() - { - return poolName; - } - - public final boolean isCreateDaemonThreads() - { - return createDaemonThreads; - } - - public final void setCreateDaemonThreads(boolean createDaemonThreads) - { - this.createDaemonThreads = createDaemonThreads; - } - - public final int getThreadCount() - { - return threadCount; - } - - public final boolean isAddPoolName() - { - return addPoolName; - } - - public final void setAddPoolName(boolean addPoolName) - { - this.addPoolName = addPoolName; - } -} diff --git a/base/source/java/ch/systemsx/cisd/base/namedthread/NamingThreadPoolExecutor.java b/base/source/java/ch/systemsx/cisd/base/namedthread/NamingThreadPoolExecutor.java deleted file mode 100644 index 1cd26edbe32617acfc0a0e0c3946df23a36e7afa..0000000000000000000000000000000000000000 --- a/base/source/java/ch/systemsx/cisd/base/namedthread/NamingThreadPoolExecutor.java +++ /dev/null @@ -1,329 +0,0 @@ -/* - * Copyright 2008 ETH Zuerich, CISD - * - * 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. - */ - -package ch.systemsx.cisd.base.namedthread; - -import java.util.concurrent.BlockingQueue; -import java.util.concurrent.Callable; -import java.util.concurrent.Future; -import java.util.concurrent.FutureTask; -import java.util.concurrent.LinkedBlockingQueue; -import java.util.concurrent.RejectedExecutionHandler; -import java.util.concurrent.SynchronousQueue; -import java.util.concurrent.ThreadFactory; -import java.util.concurrent.ThreadPoolExecutor; -import java.util.concurrent.TimeUnit; - -/** - * A {@link ThreadPoolExecutor} that allows to attach names to the threads it manages. These names - * can come either from {@link IRunnableNameProvider}s or {@link ICallableNameProvider}s, or, if - * their standard counterparts are submitted, a default name is used. - * - * @author Bernd Rinn - */ -public class NamingThreadPoolExecutor extends ThreadPoolExecutor -{ - - /** - * The default time (in milli-seconds) to keep threads alive that are above the core pool size. - */ - public final static long DEFAULT_KEEP_ALIVE_TIME_MILLIS = 10000L; - - /** - * Creates a new (caching) <tt>NamingThreadPoolExecutor</tt> with the given initial parameters. - * This executor will create new threads as needed. - * - * @param poolName the default name for new threads - */ - public NamingThreadPoolExecutor(String poolName) - { - this(poolName, 0); - } - - /** - * Creates a new (caching) <tt>NamingThreadPoolExecutor</tt> with the given initial parameters. - * This executor will create new threads as needed. - * - * @param poolName The default name for new threads. - * @param workQueueSize The size of the work queue (0 for no queue). - * - */ - public NamingThreadPoolExecutor(String poolName, int workQueueSize) - { - super(1, Integer.MAX_VALUE, DEFAULT_KEEP_ALIVE_TIME_MILLIS, TimeUnit.MILLISECONDS, - workQueueSize == 0 ? new SynchronousQueue<Runnable>() - : new LinkedBlockingQueue<Runnable>(workQueueSize), - new NamingThreadFactory(poolName)); - } - - /** - * Creates a new <tt>NamingThreadPoolExecutor</tt> with the given initial parameters. - * - * @param poolName the default name for new threads - * @param corePoolSize the number of threads to keep in the pool, even if they are idle. - * @param maximumPoolSize the maximum number of threads to allow in the pool. - * @param keepAliveTime when the number of threads is greater than the core, this is the maximum - * time that excess idle threads will wait for new tasks before terminating. - * @param unit the time unit for the keepAliveTime argument. - * @param workQueue the queue to use for holding tasks before they are executed. This queue will - * hold only the <tt>Runnable</tt> tasks submitted by the <tt>execute</tt> method. - * @param handler the handler to use when execution is blocked because the thread bounds and - * queue capacities are reached. - * @throws IllegalArgumentException if corePoolSize, or keepAliveTime less than zero, or if - * maximumPoolSize less than or equal to zero, or if corePoolSize greater than - * maximumPoolSize. - * @throws NullPointerException if <tt>workQueue</tt> or <tt>threadFactory</tt> or - * <tt>handler</tt> are null. - */ - public NamingThreadPoolExecutor(String poolName, int corePoolSize, int maximumPoolSize, - long keepAliveTime, TimeUnit unit, BlockingQueue<Runnable> workQueue, - RejectedExecutionHandler handler) - { - super(corePoolSize, maximumPoolSize, keepAliveTime, unit, workQueue, - new NamingThreadFactory(poolName), handler); - } - - /** - * Creates a new <tt>NamingThreadPoolExecutor</tt> with the given initial parameters. - * - * @param poolName the default name for new threads - * @param corePoolSize the number of threads to keep in the pool, even if they are idle. - * @param maximumPoolSize the maximum number of threads to allow in the pool. - * @param keepAliveTime when the number of threads is greater than the core, this is the maximum - * time that excess idle threads will wait for new tasks before terminating. - * @param unit the time unit for the keepAliveTime argument. - * @param workQueue the queue to use for holding tasks before they are executed. This queue will - * hold only the <tt>Runnable</tt> tasks submitted by the <tt>execute</tt> method. - * @throws IllegalArgumentException if corePoolSize, or keepAliveTime less than zero, or if - * maximumPoolSize less than or equal to zero, or if corePoolSize greater than - * maximumPoolSize. - * @throws NullPointerException if <tt>workQueue</tt> or <tt>threadFactory</tt> are null. - */ - public NamingThreadPoolExecutor(String poolName, int corePoolSize, int maximumPoolSize, - long keepAliveTime, TimeUnit unit, BlockingQueue<Runnable> workQueue) - { - super(corePoolSize, maximumPoolSize, keepAliveTime, unit, workQueue, - new NamingThreadFactory(poolName)); - } - - /** - * Creates a new <tt>NamingThreadPoolExecutor</tt> with the given initial parameters. - * - * @param corePoolSize the number of threads to keep in the pool, even if they are idle. - * @param maximumPoolSize the maximum number of threads to allow in the pool. - * @param keepAliveTime when the number of threads is greater than the core, this is the maximum - * time that excess idle threads will wait for new tasks before terminating. - * @param unit the time unit for the keepAliveTime argument. - * @param workQueue the queue to use for holding tasks before they are executed. This queue will - * hold only the <tt>Runnable</tt> tasks submitted by the <tt>execute</tt> method. - * @param threadFactory the factory to use when the executor creates a new thread. - * @param handler the handler to use when execution is blocked because the thread bounds and - * queue capacities are reached. - * @throws IllegalArgumentException if corePoolSize, or keepAliveTime less than zero, or if - * maximumPoolSize less than or equal to zero, or if corePoolSize greater than - * maximumPoolSize. - * @throws NullPointerException if <tt>workQueue</tt> or <tt>threadFactory</tt> or - * <tt>handler</tt> are null. - */ - public NamingThreadPoolExecutor(int corePoolSize, int maximumPoolSize, long keepAliveTime, - TimeUnit unit, BlockingQueue<Runnable> workQueue, NamingThreadFactory threadFactory, - RejectedExecutionHandler handler) - { - super(corePoolSize, maximumPoolSize, keepAliveTime, unit, workQueue, threadFactory, handler); - } - - /** - * Creates a new <tt>NamingThreadPoolExecutor</tt> with the given initial parameters. - * - * @param corePoolSize the number of threads to keep in the pool, even if they are idle. - * @param maximumPoolSize the maximum number of threads to allow in the pool. - * @param keepAliveTime when the number of threads is greater than the core, this is the maximum - * time that excess idle threads will wait for new tasks before terminating. - * @param unit the time unit for the keepAliveTime argument. - * @param workQueue the queue to use for holding tasks before they are executed. This queue will - * hold only the <tt>Runnable</tt> tasks submitted by the <tt>execute</tt> method. - * @param threadFactory the factory to use when the executor creates a new thread. - * @throws IllegalArgumentException if corePoolSize, or keepAliveTime less than zero, or if - * maximumPoolSize less than or equal to zero, or if corePoolSize greater than - * maximumPoolSize. - * @throws NullPointerException if <tt>workQueue</tt> or <tt>threadFactory</tt> are null. - */ - public NamingThreadPoolExecutor(int corePoolSize, int maximumPoolSize, long keepAliveTime, - TimeUnit unit, BlockingQueue<Runnable> workQueue, NamingThreadFactory threadFactory) - { - super(corePoolSize, maximumPoolSize, keepAliveTime, unit, workQueue, threadFactory); - } - - /** - * Sets the thread factory of this pool executor to daemon creation mode. - * <p> - * This method is supposed to be used in chaining mode, i.e. - * - * <pre> - * final ExecutorService executor = new NamingThreadPoolExecutor("name").daemonize(); - * </pre> - * - * @return This class itself. - */ - public NamingThreadPoolExecutor daemonize() - { - getThreadFactory().setCreateDaemonThreads(true); - return this; - } - - /** - * Same as {@link #setCorePoolSize(int)}, but returns the object itself for chaining. - */ - public NamingThreadPoolExecutor corePoolSize(int corePoolSize) - { - setCorePoolSize(corePoolSize); - return this; - } - - /** - * Same as {@link #setMaximumPoolSize(int)}, but returns the object itself for chaining. - */ - public NamingThreadPoolExecutor maximumPoolSize(int maximumPoolSize) - { - setMaximumPoolSize(maximumPoolSize); - return this; - } - - /** - * Same as {@link #setKeepAliveTime(long, TimeUnit)}, but uses always - * {@link TimeUnit#MILLISECONDS} and returns the object itself for chaining. - */ - public NamingThreadPoolExecutor keepAliveTime(long keepAliveTimeMillis) - { - setKeepAliveTime(keepAliveTimeMillis, TimeUnit.MILLISECONDS); - return this; - } - - /** - * If <var>addPoolName</var> is <code>true</code>, the threads will contain the pool name as the - * first part of the thread names. - */ - public NamingThreadPoolExecutor addPoolName(boolean addPoolName) - { - getThreadFactory().setAddPoolName(addPoolName); - return this; - } - - @Override - public NamingThreadFactory getThreadFactory() - { - return (NamingThreadFactory) super.getThreadFactory(); - } - - /** - * Sets the thread factory of this pool executor. - */ - public void setThreadFactory(NamingThreadFactory threadFactory) - { - super.setThreadFactory(threadFactory); - } - - /** - * @deprecated Use {@link #setThreadFactory(NamingThreadFactory)} instead! - */ - @Override - @Deprecated - public void setThreadFactory(ThreadFactory threadFactory) - { - if (threadFactory instanceof NamingThreadFactory == false) - { - throw new IllegalArgumentException("thread factory is of type '" - + threadFactory.getClass().getCanonicalName() + ", but needs to be of type " - + NamingThreadFactory.class.getCanonicalName()); - } - super.setThreadFactory(threadFactory); - } - - @Override - protected void beforeExecute(Thread t, Runnable r) - { - if (r instanceof IRunnableNameProvider == false) - { - return; - } - final String runnableName = ((IRunnableNameProvider) r).getRunnableName(); - if (runnableName == null) - { - return; - } - if (r instanceof NamedFutureTask<?>) - { - ((NamedFutureTask<?>) r).setThread(t); - } - if (t instanceof PoolNameThread) - { - ((PoolNameThread) t).setRunnableName(runnableName); - } else - { - t.setName(runnableName); - } - super.beforeExecute(t, r); - } - - @Override - protected void afterExecute(Runnable r, Throwable t) - { - if (r instanceof NamedFutureTask<?>) - { - ((NamedFutureTask<?>) r).restoreThreadName(); - } - super.afterExecute(r, t); - } - - @Override - public Future<?> submit(Runnable task) - { - if (task == null) - { - throw new NullPointerException(); - } - - final FutureTask<Object> ftask = new NamedFutureTask<Object>(task, null); - execute(ftask); - return ftask; - } - - @Override - public <T> Future<T> submit(Runnable task, T result) - { - if (task == null) - { - throw new NullPointerException(); - } - - final FutureTask<T> ftask = new NamedFutureTask<T>(task, result); - execute(ftask); - return ftask; - } - - @Override - public <T> Future<T> submit(Callable<T> task) - { - if (task == null) - { - throw new NullPointerException(); - } - final FutureTask<T> ftask = new NamedFutureTask<T>(task); - execute(ftask); - return ftask; - } - -} diff --git a/base/source/java/ch/systemsx/cisd/base/namedthread/PoolNameThread.java b/base/source/java/ch/systemsx/cisd/base/namedthread/PoolNameThread.java deleted file mode 100644 index 550efeaf7f8bc5e70148357ce449a3fd2150c080..0000000000000000000000000000000000000000 --- a/base/source/java/ch/systemsx/cisd/base/namedthread/PoolNameThread.java +++ /dev/null @@ -1,57 +0,0 @@ -/* - * Copyright 2008 ETH Zuerich, CISD - * - * 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. - */ - -package ch.systemsx.cisd.base.namedthread; - -/** - * A {@link Thread} that knows its pool name. - * - * @author Bernd Rinn - */ -public class PoolNameThread extends Thread -{ - private final String poolName; - - private final boolean addPoolName; - - public PoolNameThread(Runnable target, String poolName, boolean addPoolName) - { - super(target, poolName); - this.poolName = poolName; - this.addPoolName = addPoolName; - } - - /** - * Sets the thread's name to the <var>runnableName</var>, possibly adding the pool name if - * <var>addPoolName</var> has been set to <code>true</code> in the constructor. - */ - public void setRunnableName(String runnableName) - { - if (addPoolName) - { - setName(poolName + "::" + runnableName); - } else - { - setName(runnableName); - } - } - - /** Clears the name of the runnable, setting the name of the thread to the pool name. */ - public void clearRunnableName() - { - setName(poolName); - } -} diff --git a/base/source/java/ch/systemsx/cisd/base/namedthread/package.html b/base/source/java/ch/systemsx/cisd/base/namedthread/package.html deleted file mode 100644 index d2a54d4999df6e1869c579c98f5cec676fb0555f..0000000000000000000000000000000000000000 --- a/base/source/java/ch/systemsx/cisd/base/namedthread/package.html +++ /dev/null @@ -1,14 +0,0 @@ -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" - "http://www.w3.org/TR/html4/loose.dtd"> -<html> -<head> -<title>Named pool threads.</title> -</head> -<body> -<p> -This package provides <i>named pool threads</i> when using an -{@code java.util.concurrent.ExecutorService}. This can be helpful in debugging and monitoring -multi-threaded Java applications. Start having a look at the {@code NamedThreadPoolExecutor}. -</p> -</body> -</html> \ No newline at end of file diff --git a/base/source/java/ch/systemsx/cisd/base/tests/AbstractFileSystemTestCase.java b/base/source/java/ch/systemsx/cisd/base/tests/AbstractFileSystemTestCase.java deleted file mode 100644 index b91323b16740744efc7ea6b8d29af2fdb4954ec7..0000000000000000000000000000000000000000 --- a/base/source/java/ch/systemsx/cisd/base/tests/AbstractFileSystemTestCase.java +++ /dev/null @@ -1,145 +0,0 @@ -/* - * Copyright 2007 ETH Zuerich, CISD - * - * 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. - */ - -package ch.systemsx.cisd.base.tests; - -import java.io.File; -import java.io.FileNotFoundException; -import java.io.IOException; -import java.util.Arrays; - -import org.apache.commons.io.FileUtils; -import org.testng.AssertJUnit; -import org.testng.annotations.AfterClass; -import org.testng.annotations.BeforeMethod; - -/** - * An <code>abstract</code> test case which accesses the file system. - * <p> - * It constructs an appropriate working directory which is test class specific. - * </p> - * - * @author Christian Ribeaud - */ -public abstract class AbstractFileSystemTestCase extends AssertJUnit -{ - protected static final String UNIT_TEST_WORKING_DIRECTORY = "unit-test-wd"; - - protected static final String TARGETS_DIRECTORY = "targets"; - - protected static final File UNIT_TEST_ROOT_DIRECTORY = new File(TARGETS_DIRECTORY - + File.separator + UNIT_TEST_WORKING_DIRECTORY); - - protected final File workingDirectory; - - private final boolean cleanAfterMethod; - - protected AbstractFileSystemTestCase() - { - this(true); - } - - protected AbstractFileSystemTestCase(final boolean cleanAfterMethod) - { - workingDirectory = createWorkingDirectory(); - this.cleanAfterMethod = cleanAfterMethod; - } - - /** - * Creates a {@link File} with <var>name</var> in the working directory. Ensure it doesn't - * exist and is deleted on exit. - */ - protected File create(String name) - { - final File file = new File(workingDirectory, name); - file.delete(); - file.deleteOnExit(); - return file; - } - - /** - * Creates a directory in the unit test root directory "targets/unit-test-wd" - */ - protected final File createDirectoryInUnitTestRoot(String dirName) - { - final File directory = new File(UNIT_TEST_ROOT_DIRECTORY, dirName); - directory.mkdirs(); - directory.deleteOnExit(); - return directory; - } - - private final File createWorkingDirectory() - { - return createDirectoryInUnitTestRoot(getClass().getName()); - } - - @BeforeMethod - public void setUp() throws IOException - { - cleanUpDirectoryBeforeTheTest(workingDirectory); - } - - /** - * Deletes, recreates and verifies that this is the empty directory - */ - protected void cleanUpDirectoryBeforeTheTest(File directory) - { - deleteDirectory(directory); - directory.mkdirs(); - assertEquals(true, directory.isDirectory()); - File[] files = directory.listFiles(); - if (files != null) - { - assertEquals("Unexpected files " + Arrays.asList(files), 0, files.length); - } - } - - private void deleteDirectory(File dir) - { - try - { - FileUtils.deleteDirectory(dir); - } catch (IOException e) - { - System.err.println("Could not delete the directory " + dir.getPath() + " because: " - + e.getMessage()); - try - { - FileUtils.deleteDirectory(dir); - } catch (IOException e2) - { - System.err.println("Could not delete the directory " + dir.getPath() - + " in second try because: " + e2.getMessage()); - } - } - } - - @AfterClass - public void afterClass() throws IOException - { - if (cleanAfterMethod == false) - { - return; - } - try - { - FileUtils.deleteDirectory(workingDirectory); - } catch (FileNotFoundException ex) - { - // Ignore - } - } -} diff --git a/base/source/java/ch/systemsx/cisd/base/tests/Retry10.java b/base/source/java/ch/systemsx/cisd/base/tests/Retry10.java deleted file mode 100644 index e3438e7750f9700346da0dc8bad3155a7e384d25..0000000000000000000000000000000000000000 --- a/base/source/java/ch/systemsx/cisd/base/tests/Retry10.java +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Copyright 2008 ETH Zuerich, CISD - * - * 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. - */ - -package ch.systemsx.cisd.base.tests; - -import org.testng.IRetryAnalyzer; -import org.testng.ITestResult; -import org.testng.util.RetryAnalyzerCount; - -/** - * An {@link RetryAnalyzerCount} extension which sets the count to <code>10</code>. - * <p> - * This {@link IRetryAnalyzer} should only be applied to methods we know they should run - * successfully but do not for some reason. The retry analyzer exits as soon as it made a successful - * call. - * </p> - * - * @author Christian Ribeaud - */ -public final class Retry10 extends RetryAnalyzerCount -{ - public Retry10() - { - setCount(10); - } - - // - // RetryAnalyzerCount - // - - @Override - public final boolean retryMethod(final ITestResult result) - { - return true; - } - -} diff --git a/base/source/java/ch/systemsx/cisd/base/tests/Retry50.java b/base/source/java/ch/systemsx/cisd/base/tests/Retry50.java deleted file mode 100644 index 60df88ef8563a4715989fc79deb517b3dd0a7c78..0000000000000000000000000000000000000000 --- a/base/source/java/ch/systemsx/cisd/base/tests/Retry50.java +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Copyright 2008 ETH Zuerich, CISD - * - * 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. - */ - -package ch.systemsx.cisd.base.tests; - -import org.testng.IRetryAnalyzer; -import org.testng.ITestResult; -import org.testng.util.RetryAnalyzerCount; - -/** - * An {@link RetryAnalyzerCount} extension which sets the count to <code>50</code>. - * <p> - * This {@link IRetryAnalyzer} should only be applied to methods we know they should run - * successfully but do not for some reason. The retry analyzer exits as soon as it made a successful - * call. - * </p> - * - * @author Bernd Rinn - */ -public final class Retry50 extends RetryAnalyzerCount -{ - public Retry50() - { - setCount(50); - } - - // - // RetryAnalyzerCount - // - - @Override - public final boolean retryMethod(final ITestResult result) - { - return true; - } - -} diff --git a/base/source/java/ch/systemsx/cisd/base/unix/FileLinkType.java b/base/source/java/ch/systemsx/cisd/base/unix/FileLinkType.java deleted file mode 100644 index 5a0f72eacd8256eab8f0750b1f39b1546eb33e19..0000000000000000000000000000000000000000 --- a/base/source/java/ch/systemsx/cisd/base/unix/FileLinkType.java +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Copyright 2008 ETH Zuerich, CISD - * - * 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. - */ - -package ch.systemsx.cisd.base.unix; - -import java.io.Serializable; - -/** - * The type of a link in the file system. - * - * @author Bernd Rinn - */ -public enum FileLinkType implements Serializable -{ - REGULAR_FILE, DIRECTORY, SYMLINK, OTHER; - - /** - * Returns <code>true</code> if the <var>linkMode</var> corresponds to a symbolic link. - */ - static boolean isSymLink(long linkMode) - { - return linkMode == SYMLINK.ordinal(); - } -} \ No newline at end of file diff --git a/base/source/java/ch/systemsx/cisd/base/unix/Unix.java b/base/source/java/ch/systemsx/cisd/base/unix/Unix.java deleted file mode 100644 index fc02834a5edcd28fa11d4e99e68b727aa378b317..0000000000000000000000000000000000000000 --- a/base/source/java/ch/systemsx/cisd/base/unix/Unix.java +++ /dev/null @@ -1,901 +0,0 @@ -/* - * Copyright 2008 ETH Zuerich, CISD - * - * 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. - */ - -package ch.systemsx.cisd.base.unix; - -import java.io.File; -import java.io.IOException; - -import ch.rinn.restrictions.Private; -import ch.systemsx.cisd.base.exceptions.CheckedExceptionTunnel; -import ch.systemsx.cisd.base.exceptions.IOExceptionUnchecked; -import ch.systemsx.cisd.base.utilities.NativeLibraryUtilities; - -/** - * A utility class that provides access to common Unix system calls. Obviously, this will only work - * on Unix platforms and it requires a native library to be loaded. - * <p> - * <i>Check with {@link #isOperational()} if this class is operational and only call the other - * methods if <code>Unix.isOperational() == true</code>.</i> - * - * @author Bernd Rinn - */ -public final class Unix -{ - - private enum ProcessDetection - { - PROCFS, PS, NONE - } - - private final static boolean operational; - - private final static ProcessDetection processDetection; - - static - { - operational = NativeLibraryUtilities.loadNativeLibrary("unix"); - if (operational) - { - init(); - final int myPid = getPid(); - if (isProcessRunningProcFS(myPid)) - { - processDetection = ProcessDetection.PROCFS; - } else if (isProcessRunningPS(myPid)) - { - processDetection = ProcessDetection.PS; - } else - { - processDetection = ProcessDetection.NONE; - } - } else - { - processDetection = ProcessDetection.NONE; - } - } - - /** set user ID on execution */ - public static final short S_ISUID = 04000; - - /** set group ID on execution */ - public static final short S_ISGID = 02000; - - /** sticky bit */ - public static final short S_ISVTX = 01000; - - /** read by owner */ - public static final short S_IRUSR = 00400; - - /** write by owner */ - public static final short S_IWUSR = 00200; - - /** execute/search by owner */ - public static final short S_IXUSR = 00100; - - /** read by group */ - public static final short S_IRGRP = 00040; - - /** write by group */ - public static final short S_IWGRP = 00020; - - /** execute/search by group */ - public static final short S_IXGRP = 00010; - - /** read by others */ - public static final short S_IROTH = 00004; - - /** write by others */ - public static final short S_IWOTH = 00002; - - /** execute/search by others */ - public static final short S_IXOTH = 00001; - - /** - * A class representing the Unix <code>stat</code> structure. - */ - public static final class Stat - { - private final long deviceId; - - private final long inode; - - private final short permissions; - - private final FileLinkType linkType; - - private String symbolicLinkOrNull; - - private final int numberOfHardLinks; - - private final int uid; - - private final int gid; - - private final long lastAccess; - - private final long lastModified; - - private final long lastStatusChange; - - private final long size; - - private final long numberOfBlocks; - - private final int blockSize; - - Stat(long deviceId, long inode, short permissions, byte linkType, int numberOfHardLinks, - int uid, int gid, long lastAccess, long lastModified, long lastStatusChange, - long size, long numberOfBlocks, int blockSize) - { - this.deviceId = deviceId; - this.inode = inode; - this.permissions = permissions; - this.linkType = FileLinkType.values()[linkType]; - this.numberOfHardLinks = numberOfHardLinks; - this.uid = uid; - this.gid = gid; - this.lastAccess = lastAccess; - this.lastModified = lastModified; - this.lastStatusChange = lastStatusChange; - this.size = size; - this.numberOfBlocks = numberOfBlocks; - this.blockSize = blockSize; - } - - void setSymbolicLinkOrNull(String symbolicLinkOrNull) - { - this.symbolicLinkOrNull = symbolicLinkOrNull; - } - - public String tryGetSymbolicLink() - { - return symbolicLinkOrNull; - } - - public long getDeviceId() - { - return deviceId; - } - - public long getInode() - { - return inode; - } - - public short getPermissions() - { - return permissions; - } - - public FileLinkType getLinkType() - { - return linkType; - } - - /** - * Returns <code>true</code>, if this link is a symbolic link. - */ - public final boolean isSymbolicLink() - { - return FileLinkType.SYMLINK == linkType; - } - - public int getNumberOfHardLinks() - { - return numberOfHardLinks; - } - - public int getUid() - { - return uid; - } - - public int getGid() - { - return gid; - } - - public long getLastAccess() - { - return lastAccess; - } - - public long getLastModified() - { - return lastModified; - } - - public long getLastStatusChange() - { - return lastStatusChange; - } - - public long getSize() - { - return size; - } - - public long getNumberOfBlocks() - { - return numberOfBlocks; - } - - public int getBlockSize() - { - return blockSize; - } - - } - - /** - * A class representing the Unix <code>group</code> struct. - */ - public static final class Group - { - private final String groupName; - - private final String groupPasswordHash; - - private final int gid; - - private final String[] groupMembers; - - Group(String groupName, String groupPasswordHash, int gid, String[] groupMembers) - { - this.groupName = groupName; - this.groupPasswordHash = groupPasswordHash; - this.gid = gid; - this.groupMembers = groupMembers; - } - - public String getGroupName() - { - return groupName; - } - - public String getGroupPasswordHash() - { - return groupPasswordHash; - } - - public int getGid() - { - return gid; - } - - public String[] getGroupMembers() - { - return groupMembers; - } - } - - /** - * A class representing the Unix <code>passwd</code> struct. - */ - public static final class Password - { - private final String userName; - - private final String passwordHash; - - private final int uid; - - private final int gid; - - private final String userFullName; - - private final String homeDirectory; - - private final String shell; - - Password(String userName, String passwordHash, int uid, int gid, String userFullName, - String homeDirectory, String shell) - { - this.userName = userName; - this.passwordHash = passwordHash; - this.uid = uid; - this.gid = gid; - this.userFullName = userFullName; - this.homeDirectory = homeDirectory; - this.shell = shell; - } - - public String getUserName() - { - return userName; - } - - public String getPasswordHash() - { - return passwordHash; - } - - public int getUid() - { - return uid; - } - - public int getGid() - { - return gid; - } - - public String getUserFullName() - { - return userFullName; - } - - public String getHomeDirectory() - { - return homeDirectory; - } - - public String getShell() - { - return shell; - } - } - - private static void throwLinkCreationException(String type, String source, String target, - String errorMessage) - { - throw new IOExceptionUnchecked(new IOException(String.format( - "Creating %s link '%s' -> '%s': %s", type, target, source, errorMessage))); - } - - private static void throwStatException(String filename, String errorMessage) - { - throw new IOExceptionUnchecked(new IOException(String.format( - "Cannot obtain inode info for file '%s': %s", filename, errorMessage))); - } - - private static void throwFileException(String operation, String filename, String errorMessage) - { - throw new IOExceptionUnchecked(new IOException(String.format("Cannot %s of file '%s': %s", - operation, filename, errorMessage))); - } - - private static native int init(); - - private static native int getpid(); - - private static native int getuid(); - - private static native int geteuid(); - - private static native int getgid(); - - private static native int getegid(); - - private static native int link(String filename, String linktarget); - - private static native int symlink(String filename, String linktarget); - - private static native Stat stat(String filename); - - private static native Stat lstat(String filename); - - private static native String readlink(String filename, int linkvallen); - - private static native int chmod(String filename, short mode); - - private static native int chown(String filename, int uid, int gid); - - private static native String getuser(int uid); - - private static native String getgroup(int gid); - - private static native int getuid(String user); - - private static native Password getpwnam(String user); - - private static native Password getpwuid(int uid); - - private static native int getgid(String group); - - private static native Group getgrnam(String group); - - private static native Group getgrgid(int gid); - - private static native String strerror(int errnum); - - private static native String strerror(); - - @Private - static boolean isProcessRunningProcFS(int pid) - { - return new File("/proc/" + pid).isDirectory(); - } - - @Private - static boolean isProcessRunningPS(int pid) - { - try - { - return Runtime.getRuntime().exec(new String[] - { "ps", "-p", Integer.toString(pid) }).waitFor() == 0; - } catch (IOException ex) - { - return false; - } catch (InterruptedException ex) - { - throw CheckedExceptionTunnel.wrapIfNecessary(ex); - } - } - - // - // Public - // - - /** - * Returns <code>true</code>, if the native library has been loaded successfully and the link - * utilities are operational, <code>false</code> otherwise. - */ - public static final boolean isOperational() - { - return operational; - } - - /** - * Returns <code>true</code>, if process detection is available on this system. - */ - public static boolean canDetectProcesses() - { - return processDetection != ProcessDetection.NONE; - } - - /** - * Returns the last error that occurred in this class. Use this to find out what went wrong - * after {@link #tryGetLinkInfo(String)} or {@link #tryGetFileInfo(String)} returned - * <code>null</code>. - */ - public static String getLastError() - { - return strerror(); - } - - // - // Process functions - // - - /** - * Returns the process identifier of the current process. - */ - public static int getPid() - { - return getpid(); - } - - /** - * Returns <code>true</code>, if the process with <var>pid</var> is currently running and - * <code>false</code>, if it is not running or if process detection is not available ( - * {@link #canDetectProcesses()} <code>== false</code>). - */ - public static boolean isProcessRunning(int pid) - { - switch (processDetection) - { - case PROCFS: - return isProcessRunningProcFS(pid); - case PS: - return isProcessRunningPS(pid); - default: - return false; - } - } - - /** - * Returns the uid of the user that started this process. - */ - public static final int getUid() - { - return getuid(); - } - - /** - * Returns the effective uid that determines the permissions of this process. - */ - public static final int getEuid() - { - return geteuid(); - } - - /** - * Returns the gid of the user that started this process. - */ - public static final int getGid() - { - return getgid(); - } - - /** - * Returns the effective gid that determines the permissions of this process. - */ - public static final int getEgid() - { - return getegid(); - } - - // - // File functions - // - - /** - * Creates a hard link <var>linkName</var> that points to <var>fileName</var>. - * - * @throws IOExceptionUnchecked If the underlying system call fails, e.g. because - * <var>linkName</var> already exists or <var>fileName</var> does not exist. - */ - public static final void createHardLink(String fileName, String linkName) - throws IOExceptionUnchecked - { - if (fileName == null) - { - throw new NullPointerException("fileName"); - } - if (linkName == null) - { - throw new NullPointerException("linkName"); - } - final int result = link(fileName, linkName); - if (result < 0) - { - throwLinkCreationException("hard", fileName, linkName, strerror(result)); - } - } - - /** - * Creates a symbolic link <var>linkName</var> that points to <var>fileName</var>. - * - * @throws IOExceptionUnchecked If the underlying system call fails, e.g. because - * <var>linkName</var> already exists. - */ - public static final void createSymbolicLink(String fileName, String linkName) - throws IOExceptionUnchecked - { - if (fileName == null) - { - throw new NullPointerException("fileName"); - } - if (linkName == null) - { - throw new NullPointerException("linkName"); - } - final int result = symlink(fileName, linkName); - if (result < 0) - { - throwLinkCreationException("symbolic", fileName, linkName, strerror(result)); - } - } - - private static Stat tryGetStat(String fileName) throws IOExceptionUnchecked - { - if (fileName == null) - { - throw new NullPointerException("fileName"); - } - return stat(fileName); - } - - private static Stat getStat(String fileName) throws IOExceptionUnchecked - { - if (fileName == null) - { - throw new NullPointerException("fileName"); - } - final Stat result = stat(fileName); - if (result == null) - { - throwStatException(fileName, strerror()); - } - return result; - } - - private static Stat tryGetLStat(String linkName) throws IOExceptionUnchecked - { - if (linkName == null) - { - throw new NullPointerException("linkName"); - } - return lstat(linkName); - } - - private static Stat getLStat(String linkName) throws IOExceptionUnchecked - { - if (linkName == null) - { - throw new NullPointerException("linkName"); - } - final Stat result = lstat(linkName); - if (result == null) - { - throwStatException(linkName, strerror()); - } - return result; - } - - /** - * Returns the inode for the <var>fileName</var>. - * - * @throws IOExceptionUnchecked If the information could not be obtained, e.g. because the link - * does not exist. - */ - public static final long getInode(String fileName) throws IOExceptionUnchecked - { - return getLStat(fileName).getInode(); - } - - /** - * Returns the number of hard links for the <var>fileName</var>. - * - * @throws IOExceptionUnchecked If the information could not be obtained, e.g. because the link - * does not exist. - */ - public static final int getNumberOfHardLinks(String fileName) throws IOExceptionUnchecked - { - return getLStat(fileName).getNumberOfHardLinks(); - } - - /** - * Returns <code>true</code> if <var>fileName</var> is a symbolic link and <code>false</code> - * otherwise. - * - * @throws IOExceptionUnchecked If the information could not be obtained, e.g. because the link - * does not exist. - */ - public static final boolean isSymbolicLink(String fileName) throws IOExceptionUnchecked - { - return getLStat(fileName).isSymbolicLink(); - } - - /** - * Returns the value of the symbolik link <var>linkName</var>, or <code>null</code>, if - * <var>linkName</var> is not a symbolic link. - * - * @throws IOExceptionUnchecked If the information could not be obtained, e.g. because the link - * does not exist. - */ - public static final String tryReadSymbolicLink(String linkName) throws IOExceptionUnchecked - { - final Stat stat = getLStat(linkName); - return stat.isSymbolicLink() ? readlink(linkName, (int) stat.getSize()) : null; - } - - /** - * Returns the information about <var>fileName</var>. - * - * @throws IOExceptionUnchecked If the information could not be obtained, e.g. because the file - * does not exist. - */ - public static final Stat getFileInfo(String fileName) throws IOExceptionUnchecked - { - return getStat(fileName); - } - - /** - * Returns the information about <var>fileName</var>, or {@link NullPointerException}, if the - * information could not be obtained, e.g. because the file does not exist (call - * {@link #getLastError()} to find out what went wrong). - */ - public static final Stat tryGetFileInfo(String fileName) throws IOExceptionUnchecked - { - return tryGetStat(fileName); - } - - /** - * Returns the information about <var>linkName</var>. - * - * @throws IOExceptionUnchecked If the information could not be obtained, e.g. because the link - * does not exist. - */ - public static final Stat getLinkInfo(String linkName) throws IOExceptionUnchecked - { - return getLinkInfo(linkName, true); - } - - /** - * Returns the information about <var>linkName</var>. If - * <code>readSymbolicLinkTarget == true</code>, then the symbolic link target is read when - * <var>linkName</var> is a symbolic link. - * - * @throws IOExceptionUnchecked If the information could not be obtained, e.g. because the link - * does not exist. - */ - public static final Stat getLinkInfo(String linkName, boolean readSymbolicLinkTarget) - throws IOExceptionUnchecked - { - final Stat stat = getLStat(linkName); - final String symbolicLinkOrNull = - (readSymbolicLinkTarget && stat.isSymbolicLink()) ? readlink(linkName, - (int) stat.getSize()) : null; - stat.setSymbolicLinkOrNull(symbolicLinkOrNull); - return stat; - } - - /** - * Returns the information about <var>linkName</var>, or {@link NullPointerException}, if the - * information could not be obtained, e.g. because the link does not exist (call - * {@link #getLastError()} to find out what went wrong). - */ - public static final Stat tryGetLinkInfo(String linkName) throws IOExceptionUnchecked - { - return tryGetLinkInfo(linkName, true); - } - - /** - * Returns the information about <var>linkName</var>, or <code>null</code> if the information - * can not be obtained, e.g. because the link does not exist (call {@link #getLastError()} to - * find out what went wrong). If <code>readSymbolicLinkTarget == true</code>, then the symbolic - * link target is read when <var>linkName</var> is a symbolic link. - */ - public static final Stat tryGetLinkInfo(String linkName, boolean readSymbolicLinkTarget) - throws IOExceptionUnchecked - { - final Stat stat = tryGetLStat(linkName); - if (stat == null) - { - return null; - } - final String symbolicLinkOrNull = - (readSymbolicLinkTarget && stat.isSymbolicLink()) ? readlink(linkName, - (int) stat.getSize()) : null; - stat.setSymbolicLinkOrNull(symbolicLinkOrNull); - return stat; - } - - /** - * Sets the access mode of <var>filename</var> to the specified <var>mode</var> value. - */ - public static final void setAccessMode(String fileName, short mode) throws IOExceptionUnchecked - { - if (fileName == null) - { - throw new NullPointerException("fileName"); - } - final int result = chmod(fileName, mode); - if (result < 0) - { - throwFileException("set mode", fileName, strerror(result)); - } - } - - /** - * Sets the owner of <var>filename</var> to the specified <var>uid</var> and <var>gid</var> - * values. - */ - public static final void setOwner(String fileName, int uid, int gid) - throws IOExceptionUnchecked - { - if (fileName == null) - { - throw new NullPointerException("fileName"); - } - final int result = chown(fileName, uid, gid); - if (result < 0) - { - throwFileException("set owner", fileName, strerror(result)); - } - } - - // - // User functions - // - - /** - * Returns the name of the user identified by <var>uid</var>. - */ - public static final String tryGetUserNameForUid(int uid) - { - return getuser(uid); - } - - /** - * Returns the uid of the <var>userName</var>, or <code>-1</code>, if no user with this name - * exists. - */ - public static final int getUidForUserName(String userName) - { - if (userName == null) - { - throw new NullPointerException("userName"); - } - return getuid(userName); - } - - /** - * Returns the {@link Password} for the given <var>userName</var>, or <code>null</code>, if no - * user with that name exists. - */ - public static final Password tryGetUserByName(String userName) - { - if (userName == null) - { - throw new NullPointerException("userName"); - } - return getpwnam(userName); - } - - /** - * Returns the {@link Password} for the given <var>userName</var>, or <code>null</code>, if no - * user with that name exists. - */ - public static final Password tryGetUserByUid(int uid) - { - return getpwuid(uid); - } - - // - // Group functions - // - - /** - * Returns the name of the group identified by <var>gid</var>, or <code>null</code>, if no group - * with that <var>gid</var> exists. - */ - public static final String tryGetGroupNameForGid(int gid) - { - return getgroup(gid); - } - - /** - * Returns the gid of the <var>groupName</var>, or <code>-1</code>, if no group with this name - * exists. - */ - public static final int getGidForGroupName(String groupName) - { - if (groupName == null) - { - throw new NullPointerException("groupName"); - } - return getgid(groupName); - } - - /** - * Returns the {@link Group} for the given <var>groupName</var>, or <code>null</code>, if no - * group with that name exists. - */ - public static final Group tryGetGroupByName(String groupName) - { - if (groupName == null) - { - throw new NullPointerException("groupName"); - } - return getgrnam(groupName); - } - - /** - * Returns the {@link Group} for the given <var>gid</var>, or <code>null</code>, if no group - * with that gid exists. - */ - public static final Group tryGetGroupByGid(int gid) - { - return getgrgid(gid); - } - - // - // Error - // - - /** - * Returns the error string for the given <var>errnum</var>. - */ - public static final String getErrorString(int errnum) - { - return strerror(errnum); - } - -} diff --git a/base/source/java/ch/systemsx/cisd/base/unix/package.html b/base/source/java/ch/systemsx/cisd/base/unix/package.html deleted file mode 100644 index f8a97519adf36bd99fc3458e0753412bcd0b904c..0000000000000000000000000000000000000000 --- a/base/source/java/ch/systemsx/cisd/base/unix/package.html +++ /dev/null @@ -1,12 +0,0 @@ -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" - "http://www.w3.org/TR/html4/loose.dtd"> -<html> -<head> -<title>Unix system calls.</title> -</head> -<body> -<p> -This package provides some basic (POSIX-compliant) Unix system calls. -</p> -</body> -</html> \ No newline at end of file diff --git a/base/source/java/ch/systemsx/cisd/base/utilities/AbstractBuildAndEnvironmentInfo.java b/base/source/java/ch/systemsx/cisd/base/utilities/AbstractBuildAndEnvironmentInfo.java deleted file mode 100644 index 1a9dae60537ec01dc252213ae8eb814a1494e453..0000000000000000000000000000000000000000 --- a/base/source/java/ch/systemsx/cisd/base/utilities/AbstractBuildAndEnvironmentInfo.java +++ /dev/null @@ -1,231 +0,0 @@ -/* - * Copyright 2007 ETH Zuerich, CISD - * - * 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. - */ - -package ch.systemsx.cisd.base.utilities; - -import java.io.BufferedReader; -import java.io.IOException; -import java.io.InputStream; -import java.io.InputStreamReader; -import java.util.ArrayList; -import java.util.List; -import java.util.StringTokenizer; - -/** - * Abstract of all classes providing build and environment information. - * <p> - * Does <em>not</em> depend on any library jar files. - * </p> - * - * @author Franz-Josef Elmer - */ -public abstract class AbstractBuildAndEnvironmentInfo -{ - private static final String UNKNOWN = "UNKNOWN"; - - private final String version; - - private final String revision; - - private final boolean cleanSources; - - private final String applicationName; - - protected AbstractBuildAndEnvironmentInfo(String applicationName) - { - this.applicationName = applicationName; - String extractedVersion = UNKNOWN; - String extractedRevision = UNKNOWN; - boolean extractedCleanFlag = false; - final InputStream stream = - AbstractBuildAndEnvironmentInfo.class.getResourceAsStream("/BUILD-" + applicationName - + ".INFO"); - if (stream != null) - { - BufferedReader reader = null; - try - { - reader = new BufferedReader(new InputStreamReader(stream)); - final String line = reader.readLine(); - if (line != null) - { - final StringTokenizer tokenizer = new StringTokenizer(line, ":"); - extractedVersion = tokenizer.nextToken(); - extractedRevision = tokenizer.nextToken(); - extractedCleanFlag = "clean".equals(tokenizer.nextToken()); - } - } catch (IOException ex) - { - // ignored - } finally - { - try - { - if (reader != null) - { - reader.close(); - } - } catch (IOException ioe) - { - // ignore - } - } - } - this.version = extractedVersion; - this.revision = extractedRevision; - this.cleanSources = extractedCleanFlag; - } - - private final static String getProperty(final String property) - { - return System.getProperty(property, UNKNOWN); - } - - private final static boolean isUnknown(final String property) - { - return property.equals(UNKNOWN); - } - - /** - * @return Name of the CPU architecture. - */ - public final String getCPUArchitecture() - { - return getProperty("os.arch"); - } - - /** - * @return Name and version of the operating system. - */ - public final String getOS() - { - final String osName = getProperty("os.name"); - final String osVersion = getProperty("os.version"); - if (isUnknown(osName) || isUnknown(osVersion)) - { - return osName; - } - return osName + " (v" + osVersion + ")"; - } - - /** - * @return Name and version of the Java Virtual Machine. - */ - public final String getJavaVM() - { - final String vmName = getProperty("java.vm.name"); - final String vmVersion = getProperty("java.vm.version"); - if (isUnknown(vmName) || isUnknown(vmVersion)) - { - return vmName; - } - return vmName + " (v" + vmVersion + ")"; - } - - /** - * @return The version of the software. - */ - public final String getVersion() - { - return version; - } - - /** - * @return <code>true</code> if the versioned entities of the working copy have been clean when - * this build has been made, in other words, whether the revision given by - * {@link #getRevision()} does really identify the source that is build has been - * produced from. - */ - public final boolean isCleanSources() - { - return cleanSources; - } - - /** - * @return The revision number. - */ - public final String getRevision() - { - return revision; - } - - /** - * Returns the version accompanied by the build number of the software (if known). - */ - public final String getFullVersion() - { - final StringBuilder builder = new StringBuilder(); - final String rev = getRevision(); - final boolean isDirty = isCleanSources() == false; - builder.append(getVersion()); - if (isUnknown(rev) == false) - { - builder.append(" (r").append(rev); - if (isDirty) - { - builder.append("*"); - } - builder.append(")"); - } else - { - if (isDirty) - { - builder.append("*"); - } - } - return builder.toString(); - } - - public String getApplicationName() - { - return applicationName; - } - - /** - * Returns version, build number, Java VM, and OS as a {@link List} with four entries. - */ - public final List<String> getEnvironmentInfo() - { - final List<String> environmentInfo = new ArrayList<String>(); - environmentInfo.add("Application: " + getApplicationName()); - environmentInfo.add("Version: " + getFullVersion()); - environmentInfo.add("Java VM: " + getJavaVM()); - environmentInfo.add("CPU Architecture: " + getCPUArchitecture()); - environmentInfo.add("OS: " + getOS()); - return environmentInfo; - } - - /** - * Returns version, build number, Java VM, and OS in a four-liner as one {@link String}. - */ - @Override - public final String toString() - { - final StringBuilder builder = new StringBuilder(); - final List<String> environmentInfo = getEnvironmentInfo(); - final int n = environmentInfo.size(); - for (int i = 0; i < n; i++) - { - builder.append(environmentInfo.get(i)); - if (i < n - 1) - { - builder.append(System.getProperty("line.separator")); - } - } - return builder.toString(); - } - -} diff --git a/base/source/java/ch/systemsx/cisd/base/utilities/NativeLibraryUtilities.java b/base/source/java/ch/systemsx/cisd/base/utilities/NativeLibraryUtilities.java deleted file mode 100644 index e336aeb6307977eb2553b77245f805084585fd98..0000000000000000000000000000000000000000 --- a/base/source/java/ch/systemsx/cisd/base/utilities/NativeLibraryUtilities.java +++ /dev/null @@ -1,156 +0,0 @@ -/* - * Copyright 2009 ETH Zuerich, CISD - * - * 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. - */ - -package ch.systemsx.cisd.base.utilities; - -import java.io.File; - -/** - * A library for loading native libraries. - * - * @author Bernd Rinn - */ -public final class NativeLibraryUtilities -{ - private static final String JNI_LIB_PREFIX = getJNILibPrefixForSystem(); - - private static final String JNI_LIB_EXTENSION = getJNILibExtensionForSystem(); - - private static String getJNILibPrefixForSystem() - { - return OSUtilities.isWindows() ? "" : "lib"; - } - - private static String getJNILibExtensionForSystem() - { - if (OSUtilities.isMacOS()) - { - return "jnilib"; - } else if (OSUtilities.isWindows()) - { - return "dll"; - } else - { - return "so"; - } - } - - /** - * Loads the native library <var>libraryName</var>. The native library will be searched for in - * this way: - * <ol> - * <li>Try to use {@link System#loadLibrary(String)}. If this fails, use the next method.</li> - * <li>The library path can either be provided as a Java property {@code - * native.libpath.<libraryName>}.</li> - * <li>Or a prefix on the filesystem can be provided by specifying the Java property {@code - * native.libpath} and then the library is expected to be in {@code - * <native.libpath>/<libraryName>/<platform_id>/<libraryName>.so}.</li> - * <li>Finally, the routine will try to find the library as a resource in the class path with - * resource name {@code /native/<libraryName>/<platform_id>/<libraryName>.so}.</li> - * </ol> - * - * @return <code>true</code> if the library has been loaded successfully and <code>false</code> - * otherwise. - */ - public static boolean loadNativeLibrary(final String libraryName) - { - // Try specific path - String linkLibNameOrNull = System.getProperty("native.libpath." + libraryName); - if (linkLibNameOrNull != null) - { - return loadLib(linkLibNameOrNull); - } - - // Try generic path - final String linkLibPathOrNull = System.getProperty("native.libpath"); - if (linkLibPathOrNull != null) - { - linkLibNameOrNull = getLibPath(linkLibPathOrNull, libraryName); - return loadLib(linkLibNameOrNull); - } - - // Try resource - linkLibNameOrNull = tryCopyNativeLibraryToTempFile(libraryName); - if (linkLibNameOrNull != null) - { - return loadLib(linkLibNameOrNull); - } - // Finally, try system dependent loading - return loadSystemLibrary(libraryName); - } - - private static boolean loadLib(String libPath) - { - final File linkLib = new File(libPath); - if (linkLib.exists() && linkLib.canRead() && linkLib.isFile()) - { - final String linkLibNameAbsolute = linkLib.getAbsolutePath(); - try - { - System.load(linkLibNameAbsolute); - return true; - } catch (final Throwable err) - { - System.err.printf("Native library '%s' failed to load:\n", linkLibNameAbsolute); - err.printStackTrace(); - return false; - } - } else - { - System.err.printf("Native library '%s' does not exist or is not readable.\n", linkLib - .getAbsolutePath()); - return false; - } - } - - private static boolean loadSystemLibrary(String libName) - { - try - { - System.loadLibrary(libName); - return true; - } catch (Throwable th) - { - // Silence this - we return failure back as boolean value. - return false; - } - } - - /** - * Tries to copy a native library which is available as a resource to a temporary file. It will - * use the following naming schema to locate the resource containing the native library: - * <p> - * {@code /native/<libraryName>/<platform_id>/<libraryName>.so}. - * - * @param libraryName The name of the library. - * @return The name of the temporary file, or <code>null</code>, if the resource could not be - * copied. - */ - public static String tryCopyNativeLibraryToTempFile(final String libraryName) - { - // Request clean-up of old native library temp files as under Windows the files are locked and - // cannot be deleted on regular shutdown. - return ResourceUtilities.tryCopyResourceToTempFile(getLibPath("/native", libraryName), - libraryName, ".so", true); - } - - private static String getLibPath(final String prefix, final String libraryName) - { - return String.format("%s/%s/%s/%s%s.%s", prefix, libraryName, OSUtilities - .getCompatibleComputerPlatform(), JNI_LIB_PREFIX, libraryName, JNI_LIB_EXTENSION); - } - -} diff --git a/base/source/java/ch/systemsx/cisd/base/utilities/OSUtilities.java b/base/source/java/ch/systemsx/cisd/base/utilities/OSUtilities.java deleted file mode 100644 index 11e848590516d8fe2fb8819dc85f8375afe1e43b..0000000000000000000000000000000000000000 --- a/base/source/java/ch/systemsx/cisd/base/utilities/OSUtilities.java +++ /dev/null @@ -1,257 +0,0 @@ -/* - * Copyright 2007 ETH Zuerich, CISD - * - * 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. - */ - -package ch.systemsx.cisd.base.utilities; - -import java.io.File; -import java.util.Arrays; -import java.util.LinkedHashSet; -import java.util.Set; -import java.util.regex.Pattern; - -/** - * Some useful methods related to the operating system. - * <p> - * Does <em>not</em> depend on any library jar files. But before using or extending this class and - * if you do not mind using <a href="http://jakarta.apache.org/commons/lang/">commons lang</a>, then - * have a look on <code>SystemUtils</code>. - * </p> - * - * @author Bernd Rinn - */ -public class OSUtilities -{ - - /** Platform specific line separator. */ - public static final String LINE_SEPARATOR = System.getProperty("line.separator"); - - /** - * @return <code>true</code> if the operating system is UNIX like. - */ - public static boolean isUnix() - { - return (File.separatorChar == '/'); - } - - /** - * @return <code>true</code> if the operating system is a MS Windows type. - */ - public static boolean isWindows() - { - return (File.separatorChar == '\\'); - } - - /** - * @return <code>true</code> if the the operating system is a flavor of Mac OS X. - */ - public static boolean isMacOS() - { - return "Mac OS X".equals(System.getProperty("os.name")); - } - - /** - * @return The name of the computer platform that is compatible with respect to executables (CPU - * architecture and OS name, both as precise as possible to be able to share libraries - * and binaries). - */ - public static String getCompatibleComputerPlatform() - { - String osName = System.getProperty("os.name"); - if (osName.startsWith("Windows")) - { - osName = "Windows"; - } - return System.getProperty("os.arch") + "-" + osName; - } - - /** - * @return The name of the CPU architecture. - */ - public static String getCPUArchitecture() - { - return System.getProperty("os.arch"); - } - - /** - * @return The name of the operating system. - */ - public static String getOSName() - { - return System.getProperty("os.name"); - } - - /** - * @return The name of the computer platform (CPU architecture and OS name). - */ - public static String getComputerPlatform() - { - return System.getProperty("os.arch") + "-" + System.getProperty("os.name"); - } - - /** - * @return The name of user that runs this program. - */ - public static String getUsername() - { - return System.getProperty("user.name"); - } - - /** - * @return <code>true</code> if the user that runs this program is known to have root privileges - * (based on his name). - */ - public static boolean isRoot() - { - if (isUnix()) - { - return "root".equals(getUsername()); - } else - { - return "Administrator".equals(getUsername()); - } - } - - /** - * @return The <var>PATH</var> as provided by the operating system. - */ - public static Set<String> getOSPath() - { - final String[] pathEntries = - System.getenv("PATH").split(Pattern.quote(System.getProperty("path.separator"))); - return new LinkedHashSet<String>(Arrays.asList(pathEntries)); - } - - /** - * @param root Whether the path should be prepared for root or not. - * @return The path as provided by the operating system plus some path entries that should - * always be available. - * @see #getOSPath() - */ - public static Set<String> getSafeOSPath(boolean root) - { - final Set<String> pathEntries = getOSPath(); - if (isUnix()) - { - if (isMacOS()) - { - pathEntries.add("/opt/local/bin"); // MacPorts - pathEntries.add("/sw/bin"); // Fink - if (root) - { - pathEntries.add("/opt/local/sbin"); - pathEntries.add("/sw/sbin"); - } - } - pathEntries.add("/usr/local/bin"); - pathEntries.add("/usr/bin"); - pathEntries.add("/bin"); - if (root) - { - pathEntries.add("/usr/local/sbin"); - pathEntries.add("/usr/sbin"); - pathEntries.add("/sbin"); - } - } - return pathEntries; - } - - /** - * Convenience method for {@link #getSafeOSPath(boolean)} with <code>root=false</code>. - * - * @return The path as provided by the operating system plus some path entries that should - * always be available. - * @see #getSafeOSPath(boolean) - */ - public static Set<String> getSafeOSPath() - { - return getSafeOSPath(false); - } - - /** - * Search for the binary program with name <code>binaryName</code> in the operating system - * path.. - * - * @param executableName The name of the executable to search for. Under Windows, a name with - * and without <code>.exe</code> appended will work, but the executable found needs - * to have the .exe extension. - * @return The binary file that has been found in the path, or <code>null</code>, if no binary - * file could be found. - */ - public static File findExecutable(String executableName) - { - return OSUtilities.findExecutable(executableName, getSafeOSPath()); - } - - /** - * Search for the binary program with name <code>binaryName</code> in the set of paths denoted - * by <code>pathSet</code>. - * - * @param executableName The name of the executable to search for. Under Windows, a name with - * and without <code>.exe</code> appended will work, but the executable found needs - * to have the .exe extension. - * @param pathSet The set of paths to search for. It is recommended to use an ordered set like - * the {@link LinkedHashSet} here in order to get results that are independent of the - * JRE implementation. - * @return The binary file that has been found in the path, or <code>null</code>, if no binary - * file could be found. - */ - public static File findExecutable(String executableName, Set<String> pathSet) - { - final String executableNameWithExtension = - addWindowsExecutableExtensionIfNecessary(executableName); - for (String dir : pathSet) - { - final File fileToCheck = new File(dir, executableNameWithExtension); - if (fileToCheck.exists()) - { - return fileToCheck; - } - } - return null; - } - - /** - * @return <code>true</code> if and only if an executable of name <var>executableName</var> - * exists. - */ - public static boolean executableExists(String executableName) - { - return (new File(OSUtilities.addWindowsExecutableExtensionIfNecessary(executableName))) - .exists(); - } - - /** - * @return <code>true</code> if and only if an executable of name <var>executableName</var> - * exists. - */ - public static boolean executableExists(File executable) - { - return (new File(OSUtilities.addWindowsExecutableExtensionIfNecessary(executable.getPath()))) - .exists(); - } - - private static String addWindowsExecutableExtensionIfNecessary(String executableName) - { - if (isWindows() && executableName.indexOf('.') < 0) - { - return executableName + ".exe"; - } else - { - return executableName; - } - } - -} diff --git a/base/source/java/ch/systemsx/cisd/base/utilities/ResourceUtilities.java b/base/source/java/ch/systemsx/cisd/base/utilities/ResourceUtilities.java deleted file mode 100644 index 404c75464bd847fd7a8e136b5ef66ee7a1ef5949..0000000000000000000000000000000000000000 --- a/base/source/java/ch/systemsx/cisd/base/utilities/ResourceUtilities.java +++ /dev/null @@ -1,158 +0,0 @@ -/* - * Copyright 2009 ETH Zuerich, CISD - * - * 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. - */ - -package ch.systemsx.cisd.base.utilities; - -import java.io.File; -import java.io.FileOutputStream; -import java.io.FilenameFilter; -import java.io.IOException; -import java.io.InputStream; -import java.io.OutputStream; - -import org.apache.commons.io.IOUtils; -import org.apache.commons.io.filefilter.WildcardFileFilter; - -import ch.systemsx.cisd.base.exceptions.CheckedExceptionTunnel; -import ch.systemsx.cisd.base.exceptions.IOExceptionUnchecked; - -/** - * Utilities for handling Java resources. - * - * @author Bernd Rinn - */ -public class ResourceUtilities -{ - - /** - * Tries to copy the resource with the given name to a temporary file. - * - * @param resource The name of the resource to copy. - * @param prefix The prefix to use for the temporary name. - * @param postfix The postfix to use for the temporary name. - * @return The name of the temporary file, or <code>null</code>, if the resource could not be - * copied. - */ - public static String tryCopyResourceToTempFile(final String resource, final String prefix, - final String postfix) - { - try - { - return copyResourceToTempFile(resource, prefix, postfix); - } catch (final Exception ex) - { - return null; - } - } - - /** - * Tries to copy the resource with the given name to a temporary file. - * - * @param resource The name of the resource to copy. - * @param prefix The prefix to use for the temporary name. - * @param postfix The postfix to use for the temporary name. - * @param cleanUpOldResources If <code>true</code>, remove old leftover temporary files for this - * <var>prefix</var> and <var>postfix</var>. - * @return The name of the temporary file, or <code>null</code>, if the resource could not be - * copied. - */ - public static String tryCopyResourceToTempFile(final String resource, final String prefix, - final String postfix, final boolean cleanUpOldResources) - { - try - { - return copyResourceToTempFile(resource, prefix, postfix, cleanUpOldResources); - } catch (final Exception ex) - { - return null; - } - } - - /** - * Copies the resource with the given name to a temporary file. The file will be deleted on - * program exit. - * - * @param resource The name of the resource to copy. - * @param prefix The prefix to use for the temporary name. - * @param postfix The postfix to use for the temporary name. - * @return The name of the temporary file. - * @throws IllegalArgumentException If the resource cannot be found in the class path. - * @throws IOExceptionUnchecked If an {@link IOException} occurs. - */ - public static String copyResourceToTempFile(final String resource, final String prefix, - final String postfix) throws IOExceptionUnchecked - { - return copyResourceToTempFile(resource, prefix, postfix, false); - } - - /** - * Copies the resource with the given name to a temporary file. The file will be deleted on - * program exit. - * - * @param resource The name of the resource to copy. - * @param prefix The prefix to use for the temporary name. - * @param postfix The postfix to use for the temporary name. - * @param cleanUpOldResources If <code>true</code>, remove old leftover temporary files for this - * <var>prefix</var> and <var>postfix</var>. - * @return The name of the temporary file. - * @throws IllegalArgumentException If the resource cannot be found in the class path. - * @throws IOExceptionUnchecked If an {@link IOException} occurs. - */ - public static String copyResourceToTempFile(final String resource, final String prefix, - final String postfix, final boolean cleanUpOldResources) throws IOExceptionUnchecked - { - if (cleanUpOldResources) - { - deleteOldResourceTempFiles(prefix, postfix); - } - final InputStream resourceStream = ResourceUtilities.class.getResourceAsStream(resource); - if (resourceStream == null) - { - throw new IllegalArgumentException("Resource '" + resource + "' not found."); - } - try - { - final File tempFile = File.createTempFile(prefix, postfix); - tempFile.deleteOnExit(); - final OutputStream fileStream = new FileOutputStream(tempFile); - try - { - IOUtils.copy(resourceStream, fileStream); - fileStream.close(); - } finally - { - IOUtils.closeQuietly(fileStream); - } - return tempFile.getAbsolutePath(); - } catch (final IOException ex) - { - throw CheckedExceptionTunnel.wrapIfNecessary(ex); - } finally - { - IOUtils.closeQuietly(resourceStream); - } - } - - private static void deleteOldResourceTempFiles(final String prefix, final String postfix) - { - final FilenameFilter filter = new WildcardFileFilter(prefix + "*" + postfix); - for (File file : new File(System.getProperty("java.io.tmpdir")).listFiles(filter)) - { - file.delete(); - } - } - -} diff --git a/base/source/java/ch/systemsx/cisd/base/utilities/package.html b/base/source/java/ch/systemsx/cisd/base/utilities/package.html deleted file mode 100644 index d7eda7fb3c8bcce965bd3dbec3509845f4bf49e9..0000000000000000000000000000000000000000 --- a/base/source/java/ch/systemsx/cisd/base/utilities/package.html +++ /dev/null @@ -1,12 +0,0 @@ -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" - "http://www.w3.org/TR/html4/loose.dtd"> -<html> -<head> -<title>Basic utilities.</title> -</head> -<body> -<p> -This package provides some basic utility classes. -</p> -</body> -</html> \ No newline at end of file diff --git a/base/sourceTest/java/ch/systemsx/cisd/base/AllTests.java b/base/sourceTest/java/ch/systemsx/cisd/base/AllTests.java deleted file mode 100644 index 3d6288f5f6f2edfc607c7f2707ce4ed347503246..0000000000000000000000000000000000000000 --- a/base/sourceTest/java/ch/systemsx/cisd/base/AllTests.java +++ /dev/null @@ -1,59 +0,0 @@ -/* - * Copyright 2010 ETH Zuerich, CISD - * - * 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. - */ - -package ch.systemsx.cisd.base; - -import ch.systemsx.cisd.base.convert.NativeDataTests; -import ch.systemsx.cisd.base.convert.NativeTaggedArrayTests; -import ch.systemsx.cisd.base.exceptions.IOExceptionUncheckedTests; -import ch.systemsx.cisd.base.io.ByteBufferRandomAccessFileTests; -import ch.systemsx.cisd.base.io.RandomAccessFileImplTests; -import ch.systemsx.cisd.base.mdarray.MDArrayTests; -import ch.systemsx.cisd.base.namedthread.NamingThreadPoolExecutorTest; -import ch.systemsx.cisd.base.unix.Unix; -import ch.systemsx.cisd.base.unix.UnixTests; - -/** - * Run all unit tests. - * - * @author Bernd Rinn - */ -public class AllTests -{ - - public static void main(String[] args) throws Throwable - { - NativeDataTests.main(args); - System.out.println(); - NativeTaggedArrayTests.main(args); - System.out.println(); - IOExceptionUncheckedTests.main(args); - System.out.println(); - ByteBufferRandomAccessFileTests.main(args); - System.out.println(); - RandomAccessFileImplTests.main(args); - System.out.println(); - MDArrayTests.main(args); - System.out.println(); - NamingThreadPoolExecutorTest.main(args); - System.out.println(); - if (Unix.isOperational()) - { - UnixTests.main(args); - } - } - -} diff --git a/base/sourceTest/java/ch/systemsx/cisd/base/convert/NativeDataTests.java b/base/sourceTest/java/ch/systemsx/cisd/base/convert/NativeDataTests.java deleted file mode 100644 index d4a68e28526d687b70fc237006103447690d2705..0000000000000000000000000000000000000000 --- a/base/sourceTest/java/ch/systemsx/cisd/base/convert/NativeDataTests.java +++ /dev/null @@ -1,504 +0,0 @@ -/* - * Copyright 2009 ETH Zuerich, CISD - * - * 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. - */ - -package ch.systemsx.cisd.base.convert; - -import static org.testng.AssertJUnit.assertEquals; -import static org.testng.AssertJUnit.assertFalse; -import static org.testng.AssertJUnit.assertTrue; - -import java.lang.reflect.InvocationTargetException; -import java.lang.reflect.Method; -import java.util.Arrays; - -import org.apache.commons.lang.ArrayUtils; -import org.testng.annotations.DataProvider; -import org.testng.annotations.Test; - -import ch.systemsx.cisd.base.BuildAndEnvironmentInfo; -import ch.systemsx.cisd.base.convert.NativeData.ByteOrder; - -/** - * Test cases for {@link NativeData}. - * - * @author Bernd Rinn - */ -public class NativeDataTests -{ - - @DataProvider(name = "getOfs") - private Object[][] getOfs() - { - return new Object[][] - { - { 0, 0 }, - { 0, 1 }, - { 0, 2 }, - { 0, 3 }, - { 1, 0 }, - { 1, 1 }, - { 1, 2 }, - { 1, 3 }, - { 2, 0 }, - { 2, 1 }, - { 2, 2 }, - { 2, 3 }, - { 3, 0 }, - { 3, 1 }, - { 3, 2 }, - { 3, 3 }, }; - } - - @Test(dataProvider = "getOfs") - public void testIntToByteToInt(int sourceOfs, int targetOfs) - { - final int sizeOfTarget = 4; - final int[] orignalArr = new int[] - { -1, 17, 100000, -1000000 }; - final int[] iarr = new int[sourceOfs + orignalArr.length]; - System.arraycopy(orignalArr, 0, iarr, sourceOfs, orignalArr.length); - final byte[] barr = new byte[iarr.length * sizeOfTarget + targetOfs]; - NativeData.copyIntToByte(iarr, sourceOfs, barr, targetOfs, orignalArr.length, - NativeData.ByteOrder.NATIVE); - final int[] iarr2 = new int[(barr.length - targetOfs) / sizeOfTarget]; - NativeData.copyByteToInt(barr, targetOfs, iarr2, sourceOfs, orignalArr.length, - NativeData.ByteOrder.NATIVE); - assertTrue(Arrays.equals(iarr, iarr2)); - } - - @Test - public void testIntChangeByteOrderAndBack() - { - assertEquals(0, NativeData.changeByteOrder(NativeData.changeByteOrder(0))); - assertEquals(1, NativeData.changeByteOrder(NativeData.changeByteOrder(1))); - assertEquals(-1, NativeData.changeByteOrder(NativeData.changeByteOrder(-1))); - assertEquals(Integer.MAX_VALUE, - NativeData.changeByteOrder(NativeData.changeByteOrder(Integer.MAX_VALUE))); - assertEquals(Integer.MIN_VALUE, - NativeData.changeByteOrder(NativeData.changeByteOrder(Integer.MIN_VALUE))); - } - - @Test - public void testShortChangeByteOrderAndBack() - { - assertEquals((short) 0, NativeData.changeByteOrder(NativeData.changeByteOrder((short) 0))); - assertEquals((short) 1, NativeData.changeByteOrder(NativeData.changeByteOrder((short) 1))); - assertEquals((short) -1, NativeData.changeByteOrder(NativeData.changeByteOrder((short) -1))); - assertEquals(Short.MAX_VALUE, - NativeData.changeByteOrder(NativeData.changeByteOrder(Short.MAX_VALUE))); - assertEquals(Short.MIN_VALUE, - NativeData.changeByteOrder(NativeData.changeByteOrder(Short.MIN_VALUE))); - } - - @Test - public void testCharChangeByteOrderAndBack() - { - assertEquals((char) 0, NativeData.changeByteOrder(NativeData.changeByteOrder((char) 0))); - assertEquals((char) 1, NativeData.changeByteOrder(NativeData.changeByteOrder((char) 1))); - assertEquals((char) -1, NativeData.changeByteOrder(NativeData.changeByteOrder((char) -1))); - assertEquals((char) Short.MAX_VALUE, - NativeData.changeByteOrder(NativeData.changeByteOrder((char) Short.MAX_VALUE))); - assertEquals((char) Short.MIN_VALUE, - NativeData.changeByteOrder(NativeData.changeByteOrder((char) Short.MIN_VALUE))); - } - - @Test - public void testLongChangeByteOrderAndBack() - { - assertEquals(0, NativeData.changeByteOrder(NativeData.changeByteOrder(0L))); - assertEquals(1, NativeData.changeByteOrder(NativeData.changeByteOrder(1L))); - assertEquals(-1, NativeData.changeByteOrder(NativeData.changeByteOrder(-1L))); - assertEquals(Long.MAX_VALUE, - NativeData.changeByteOrder(NativeData.changeByteOrder(Long.MAX_VALUE))); - assertEquals(Long.MIN_VALUE, - NativeData.changeByteOrder(NativeData.changeByteOrder(Long.MIN_VALUE))); - } - - @Test - public void testFloatChangeByteOrderAndBack() - { - assertEquals(0f, NativeData.changeByteOrder(NativeData.changeByteOrder(0f))); - assertEquals(1f, NativeData.changeByteOrder(NativeData.changeByteOrder(1f))); - assertEquals(-1f, NativeData.changeByteOrder(NativeData.changeByteOrder(-1f))); - assertEquals(Float.MAX_VALUE, - NativeData.changeByteOrder(NativeData.changeByteOrder(Float.MAX_VALUE))); - assertEquals(Float.MIN_VALUE, - NativeData.changeByteOrder(NativeData.changeByteOrder(Float.MIN_VALUE))); - assertEquals(-Float.MAX_VALUE, - NativeData.changeByteOrder(NativeData.changeByteOrder(-Float.MAX_VALUE))); - assertEquals(-Float.MIN_VALUE, - NativeData.changeByteOrder(NativeData.changeByteOrder(-Float.MIN_VALUE))); - } - - @Test - public void testDoubleChangeByteOrderAndBack() - { - assertEquals(0., NativeData.changeByteOrder(NativeData.changeByteOrder(0.))); - assertEquals(1., NativeData.changeByteOrder(NativeData.changeByteOrder(1.))); - assertEquals(-1., NativeData.changeByteOrder(NativeData.changeByteOrder(-1.))); - assertEquals(Double.MAX_VALUE, - NativeData.changeByteOrder(NativeData.changeByteOrder(Double.MAX_VALUE))); - assertEquals(Double.MIN_VALUE, - NativeData.changeByteOrder(NativeData.changeByteOrder(Double.MIN_VALUE))); - assertEquals(-Double.MAX_VALUE, - NativeData.changeByteOrder(NativeData.changeByteOrder(-Double.MAX_VALUE))); - assertEquals(-Double.MIN_VALUE, - NativeData.changeByteOrder(NativeData.changeByteOrder(-Double.MIN_VALUE))); - } - - @Test(dataProvider = "getOfs") - public void testLongToByteToLong(int sourceOfs, int targetOfs) - { - assertTrue(NativeData.isUseNativeLib()); - final int sizeOfTarget = 8; - final long[] orignalArr = new long[] - { -1, 17, 100000, -1000000 }; - final long[] iarr = new long[sourceOfs + orignalArr.length]; - System.arraycopy(orignalArr, 0, iarr, sourceOfs, orignalArr.length); - final byte[] barr = new byte[iarr.length * sizeOfTarget + targetOfs]; - NativeData.copyLongToByte(iarr, sourceOfs, barr, targetOfs, orignalArr.length, - NativeData.ByteOrder.NATIVE); - final long[] iarr2 = new long[(barr.length - targetOfs) / sizeOfTarget]; - NativeData.copyByteToLong(barr, targetOfs, iarr2, sourceOfs, orignalArr.length, - NativeData.ByteOrder.NATIVE); - assertTrue(Arrays.equals(iarr, iarr2)); - } - - @Test(dataProvider = "getOfs") - public void testShortToByteToShort(int sourceOfs, int targetOfs) - { - assertTrue(NativeData.isUseNativeLib()); - final int sizeOfTarget = 2; - final short[] orignalArr = new short[] - { -1, 17, 20000, (short) -50000 }; - final short[] iarr = new short[sourceOfs + orignalArr.length]; - System.arraycopy(orignalArr, 0, iarr, sourceOfs, orignalArr.length); - final byte[] barr = new byte[iarr.length * sizeOfTarget + targetOfs]; - NativeData.copyShortToByte(iarr, sourceOfs, barr, targetOfs, orignalArr.length, - NativeData.ByteOrder.NATIVE); - final short[] iarr2 = new short[(barr.length - targetOfs) / sizeOfTarget]; - NativeData.copyByteToShort(barr, targetOfs, iarr2, sourceOfs, orignalArr.length, - NativeData.ByteOrder.NATIVE); - assertTrue(Arrays.equals(iarr, iarr2)); - } - - @Test(dataProvider = "getOfs") - public void testCharToByteToChar(int sourceOfs, int targetOfs) - { - assertTrue(NativeData.isUseNativeLib()); - final int sizeOfTarget = 2; - final char[] orignalArr = new char[] - { 'c', ';', '\u0222', '\u1000' }; - final char[] iarr = new char[sourceOfs + orignalArr.length]; - System.arraycopy(orignalArr, 0, iarr, sourceOfs, orignalArr.length); - final byte[] barr = new byte[iarr.length * sizeOfTarget + targetOfs]; - NativeData.copyCharToByte(iarr, sourceOfs, barr, targetOfs, orignalArr.length, - NativeData.ByteOrder.NATIVE); - final char[] iarr2 = new char[(barr.length - targetOfs) / sizeOfTarget]; - NativeData.copyByteToChar(barr, targetOfs, iarr2, sourceOfs, orignalArr.length, - NativeData.ByteOrder.NATIVE); - assertTrue(Arrays.equals(iarr, iarr2)); - } - - @Test(dataProvider = "getOfs") - public void testFloatToByteToFloat(int sourceOfs, int targetOfs) - { - assertTrue(NativeData.isUseNativeLib()); - final int sizeOfTarget = 4; - final float[] orignalArr = new float[] - { -1, 17, 3.14159f, -1e6f }; - final float[] iarr = new float[sourceOfs + orignalArr.length]; - System.arraycopy(orignalArr, 0, iarr, sourceOfs, orignalArr.length); - final byte[] barr = new byte[iarr.length * sizeOfTarget + targetOfs]; - NativeData.copyFloatToByte(iarr, sourceOfs, barr, targetOfs, orignalArr.length, - NativeData.ByteOrder.NATIVE); - final float[] iarr2 = new float[(barr.length - targetOfs) / sizeOfTarget]; - NativeData.copyByteToFloat(barr, targetOfs, iarr2, sourceOfs, orignalArr.length, - NativeData.ByteOrder.NATIVE); - assertTrue(Arrays.equals(iarr, iarr2)); - } - - @Test(dataProvider = "getOfs") - public void testDoubleToByteToDouble(int sourceOfs, int targetOfs) - { - assertTrue(NativeData.isUseNativeLib()); - final int sizeOfTarget = 8; - final double[] orignalArr = new double[] - { -1, 17, 3.14159, -1e42 }; - final double[] iarr = new double[sourceOfs + orignalArr.length]; - System.arraycopy(orignalArr, 0, iarr, sourceOfs, orignalArr.length); - final byte[] barr = new byte[iarr.length * sizeOfTarget + targetOfs]; - NativeData.copyDoubleToByte(iarr, sourceOfs, barr, targetOfs, orignalArr.length, - NativeData.ByteOrder.NATIVE); - final double[] iarr2 = new double[(barr.length - targetOfs) / sizeOfTarget]; - NativeData.copyByteToDouble(barr, targetOfs, iarr2, sourceOfs, orignalArr.length, - NativeData.ByteOrder.NATIVE); - assertTrue(Arrays.equals(iarr, iarr2)); - } - - @Test - public void testShortEndianConversion() - { - assertTrue(NativeData.isUseNativeLib()); - final short[] values = new short[] - { 1, 2, 4, 8, 16, 256, 512 }; - final short[] convertedValuesExpected = new short[] - { 1 << 8, 1 << 9, 1 << 10, 1 << 11, 1 << 12, 1, 2 }; - final short[] convertedValuesFound = - NativeData.byteToShort(NativeData.shortToByte(values, ByteOrder.BIG_ENDIAN), - ByteOrder.LITTLE_ENDIAN); - assertTrue(Arrays.equals(convertedValuesExpected, convertedValuesFound)); - } - - @Test - public void testIntEndianConversion() - { - assertTrue(NativeData.isUseNativeLib()); - final int[] values = new int[] - { 1, 2, 4, 8, 16, 256, 1 << 16 }; - final int[] convertedValuesExpected = new int[] - { 1 << 24, 1 << 25, 1 << 26, 1 << 27, 1 << 28, 1 << 16, 256 }; - final int[] convertedValuesFound = - NativeData.byteToInt(NativeData.intToByte(values, ByteOrder.BIG_ENDIAN), - ByteOrder.LITTLE_ENDIAN); - assertTrue(Arrays.equals(convertedValuesExpected, convertedValuesFound)); - } - - @Test - public void testLongEndianConversion() - { - assertTrue(NativeData.isUseNativeLib()); - final long[] values = new long[] - { 1, 2, 4, 8, 16, 256, 1L << 16, 1L << 24 }; - final long[] convertedValuesExpected = new long[] - { 1L << 56, 1L << 57, 1L << 58, 1L << 59, 1L << 60, 1L << 48, 1L << 40, 1L << 32 }; - final long[] convertedValuesFound = - NativeData.byteToLong(NativeData.longToByte(values, ByteOrder.BIG_ENDIAN), - ByteOrder.LITTLE_ENDIAN); - assertTrue(Arrays.equals(convertedValuesExpected, convertedValuesFound)); - } - - @Test - public void testFloatLittleEndianRoundtrip() - { - assertTrue(NativeData.isUseNativeLib()); - final float[] values = new float[] - { 1.1f, 2.2f, 3.3f, 1e-25f, 1e25f }; - final float[] convertedValuesFound = - NativeData.byteToFloat(NativeData.floatToByte(values, ByteOrder.LITTLE_ENDIAN), - ByteOrder.LITTLE_ENDIAN); - assertTrue(Arrays.equals(values, convertedValuesFound)); - } - - @Test - public void testFloatBigEndianRoundtrip() - { - assertTrue(NativeData.isUseNativeLib()); - final float[] values = new float[] - { 1.1f, 2.2f, 3.3f, 1e-25f, 1e25f }; - final float[] convertedValuesFound = - NativeData.byteToFloat(NativeData.floatToByte(values, ByteOrder.BIG_ENDIAN), - ByteOrder.BIG_ENDIAN); - assertTrue(Arrays.equals(values, convertedValuesFound)); - } - - @Test - public void testDoubleLittleEndianRoundtrip() - { - assertTrue(NativeData.isUseNativeLib()); - final double[] values = new double[] - { 1.1f, 2.2f, 3.3f, 1e-25f, 1e25f }; - final double[] convertedValuesFound = - NativeData.byteToDouble(NativeData.doubleToByte(values, ByteOrder.LITTLE_ENDIAN), - ByteOrder.LITTLE_ENDIAN); - assertTrue(Arrays.equals(values, convertedValuesFound)); - } - - @Test - public void testDoubleBigEndianRoundtrip() - { - assertTrue(NativeData.isUseNativeLib()); - final double[] values = new double[] - { 1.1, 2.2, 3.3, 1e-25, 1e25 }; - final double[] convertedValuesFound = - NativeData.byteToDouble(NativeData.doubleToByte(values, ByteOrder.BIG_ENDIAN), - ByteOrder.BIG_ENDIAN); - assertTrue(Arrays.equals(values, convertedValuesFound)); - } - - @Test(expectedExceptions = NullPointerException.class) - public void testNPE() - { - assertTrue(NativeData.isUseNativeLib()); - NativeData.copyByteToLong(null, 0, null, 0, 0, ByteOrder.NATIVE); - } - - @Test(expectedExceptions = IndexOutOfBoundsException.class) - public void testIOOB() - { - assertTrue(NativeData.isUseNativeLib()); - NativeData.copyByteToLong(new byte[] {}, -1, new long[] {}, 0, 0, ByteOrder.NATIVE); - } - - @Test(expectedExceptions = IndexOutOfBoundsException.class) - public void testIOOB2() - { - assertTrue(NativeData.isUseNativeLib()); - NativeData.copyByteToLong(new byte[] {}, 0, new long[] {}, 10, 0, ByteOrder.NATIVE); - } - - @Test - public void testPlatformEndiness() - { - assertTrue(NativeData.isUseNativeLib()); - final double[] values = new double[] - { 1.1, 2.2, 3.3, 1e-200, 1e200 }; - final double[] valuesLE = - NativeData.byteToDouble(NativeData.doubleToByte(values, ByteOrder.LITTLE_ENDIAN), - ByteOrder.NATIVE); - final double[] valuesBE = - NativeData.byteToDouble(NativeData.doubleToByte(values, ByteOrder.BIG_ENDIAN), - ByteOrder.NATIVE); - if (Arrays.equals(values, valuesLE)) - { - assertEquals(NativeData.ByteOrder.LITTLE_ENDIAN, NativeData.getNativeByteOrder()); - assertFalse(Arrays.equals(values, valuesBE)); - } - if (Arrays.equals(values, valuesBE)) - { - assertEquals(NativeData.ByteOrder.BIG_ENDIAN, NativeData.getNativeByteOrder()); - assertFalse(Arrays.equals(values, valuesLE)); - } - } - - @Test - public void testFloatToByteNonNativeByteOrderPartialOutputArray() - { - assertTrue(NativeData.isUseNativeLib()); - final int sizeOfTarget = 4; - final ByteOrder nonNativeByteOrder = - (NativeData.getNativeByteOrder() == ByteOrder.LITTLE_ENDIAN) ? ByteOrder.BIG_ENDIAN - : ByteOrder.LITTLE_ENDIAN; - final float[] iarr = new float[] - { -1, 17, 3.14159f, -1e6f }; - final byte[] headerArray = new byte[] - { 1, 2, 3, 4 }; - final byte[] trailerArray = new byte[] - { 5, 6, 7, 8 }; - final byte[] barr = - new byte[iarr.length * sizeOfTarget + headerArray.length + trailerArray.length]; - System.arraycopy(headerArray, 0, barr, 0, headerArray.length); - System.arraycopy(trailerArray, 0, barr, headerArray.length + iarr.length * sizeOfTarget, - trailerArray.length); - NativeData.copyFloatToByte(iarr, 0, barr, headerArray.length, iarr.length, - nonNativeByteOrder); - final byte[] headerArray2 = ArrayUtils.subarray(barr, 0, headerArray.length); - final byte[] trailerArray2 = - ArrayUtils.subarray(barr, headerArray.length + iarr.length * sizeOfTarget, - barr.length); - assertTrue(Arrays.equals(headerArray, headerArray2)); - assertTrue(Arrays.equals(trailerArray, trailerArray2)); - } - - private void afterClass() - { - } - - private void setUp() - { - } - - public static void main(String[] args) throws Throwable - { - System.out.println(BuildAndEnvironmentInfo.INSTANCE); - System.out.println("Test class: " + NativeDataTests.class.getSimpleName()); - System.out.println(); - NativeData.ensureNativeLibIsLoaded(); - final NativeDataTests test = new NativeDataTests(); - try - { - for (Method m : NativeDataTests.class.getMethods()) - { - final Test testAnnotation = m.getAnnotation(Test.class); - if (testAnnotation == null) - { - continue; - } - if (m.getParameterTypes().length == 0) - { - System.out.println("Running " + m.getName()); - test.setUp(); - try - { - m.invoke(test); - } catch (InvocationTargetException wrapperThrowable) - { - final Throwable th = wrapperThrowable.getCause(); - boolean exceptionFound = false; - for (Class<?> expectedExClazz : testAnnotation.expectedExceptions()) - { - if (expectedExClazz == th.getClass()) - { - exceptionFound = true; - break; - } - } - if (exceptionFound == false) - { - throw th; - } - } - } - if (m.getParameterTypes().length == 2 - && "getOfs".equals(testAnnotation.dataProvider())) - { - System.out.println("Running " + m.getName()); - test.setUp(); - try - { - final Object[][] testArgs = test.getOfs(); - for (Object[] a : testArgs) - { - System.out.println(" Arguments: " + Arrays.toString(a)); - m.invoke(test, a); - } - } catch (InvocationTargetException wrapperThrowable) - { - final Throwable th = wrapperThrowable.getCause(); - boolean exceptionFound = false; - for (Class<?> expectedExClazz : testAnnotation.expectedExceptions()) - { - if (expectedExClazz == th.getClass()) - { - exceptionFound = true; - break; - } - } - if (exceptionFound == false) - { - throw th; - } - } - } - } - System.out.println("Tests OK!"); - } finally - { - test.afterClass(); - } - } - -} diff --git a/base/sourceTest/java/ch/systemsx/cisd/base/convert/NativeTaggedArrayTests.java b/base/sourceTest/java/ch/systemsx/cisd/base/convert/NativeTaggedArrayTests.java deleted file mode 100644 index 13b0115b979b66432736a9131e36e7b3242d25f8..0000000000000000000000000000000000000000 --- a/base/sourceTest/java/ch/systemsx/cisd/base/convert/NativeTaggedArrayTests.java +++ /dev/null @@ -1,470 +0,0 @@ -/* - * Copyright 2010 ETH Zuerich, CISD - * - * 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. - */ - -package ch.systemsx.cisd.base.convert; - -import java.lang.reflect.InvocationTargetException; -import java.lang.reflect.Method; -import java.util.Arrays; - -import org.testng.annotations.Test; - -import ch.systemsx.cisd.base.BuildAndEnvironmentInfo; -import ch.systemsx.cisd.base.convert.NativeData.ByteOrder; -import ch.systemsx.cisd.base.mdarray.MDDoubleArray; -import ch.systemsx.cisd.base.mdarray.MDFloatArray; -import ch.systemsx.cisd.base.mdarray.MDIntArray; -import ch.systemsx.cisd.base.mdarray.MDLongArray; -import ch.systemsx.cisd.base.mdarray.MDShortArray; - -import static org.testng.AssertJUnit.*; - -/** - * Test cases for {@link NativeTaggedArray}. - * - * @author Bernd Rinn - */ -public class NativeTaggedArrayTests -{ - - @Test - public static void testFloat1DArrayNativeByteOrder() - { - final float[] floatArr = new float[] - { 1.1f, -3.2f, 1001.5f }; - final byte[] taggedArr = NativeTaggedArray.toByteArray(floatArr); - assertEquals(3 * 4 + 4 + 4, taggedArr.length); - final float[] convertedFloatArr = NativeTaggedArray.tryToFloatArray1D(taggedArr); - final NativeTaggedArray.NativeArrayTag tag = NativeTaggedArray.tryGetArrayTag(taggedArr); - final NativeArrayEncoding encoding = tag.getEncoding(); - assertNotNull(encoding); - assertEquals(NativeData.getNativeByteOrder(), encoding.getByteOrder()); - assertEquals(4, encoding.getSizeInBytes()); - assertTrue(encoding.isFloatingPoint()); - assertFalse(encoding.isInteger()); - assertEquals(1, tag.getDimensions().length); - assertEquals(3, tag.getDimensions()[0]); - assertTrue(Arrays.equals(floatArr, convertedFloatArr)); - } - - @Test - public static void testFloat1DArrayNonNativeByteOrder() - { - final float[] floatArr = new float[] - { 1.1f, -3.2f, 1001.5f }; - final ByteOrder nonNativeByteOrder = - (NativeData.getNativeByteOrder() == ByteOrder.LITTLE_ENDIAN) ? ByteOrder.BIG_ENDIAN - : ByteOrder.LITTLE_ENDIAN; - final byte[] taggedArr = NativeTaggedArray.toByteArray(floatArr, nonNativeByteOrder); - assertEquals(3 * 4 + 4 + 4, taggedArr.length); - final float[] convertedFloatArr = NativeTaggedArray.tryToFloatArray1D(taggedArr); - final NativeArrayEncoding encoding = NativeArrayEncoding.tryGetEncoding(taggedArr); - assertNotNull(encoding); - assertEquals(nonNativeByteOrder, encoding.getByteOrder()); - assertEquals(4, encoding.getSizeInBytes()); - assertTrue(encoding.isFloatingPoint()); - assertFalse(encoding.isInteger()); - assertTrue(Arrays.equals(floatArr, convertedFloatArr)); - } - - @Test - public static void testFloat2DArrayNativeByteOrder() - { - final MDFloatArray floatArr = new MDFloatArray(new float[] - { 1, 2, 3, 4 }, new int[] { 2, 2 }); - final byte[] taggedArr = NativeTaggedArray.toByteArray(floatArr); - assertEquals(4 * 4 + 2 * 4 + 4, taggedArr.length); - final MDFloatArray convertedFloatArr = NativeTaggedArray.tryToFloatArray(taggedArr); - final NativeArrayEncoding encoding = NativeArrayEncoding.tryGetEncoding(taggedArr); - assertNotNull(encoding); - assertEquals(NativeData.getNativeByteOrder(), encoding.getByteOrder()); - assertEquals(4, encoding.getSizeInBytes()); - assertTrue(encoding.isFloatingPoint()); - assertFalse(encoding.isInteger()); - assertTrue(floatArr.equals(convertedFloatArr)); - } - - @Test - public static void testFloat2DArrayNonNativeByteOrder() - { - final MDFloatArray floatArr = new MDFloatArray(new float[] - { 1, 2, 3, 4 }, new int[] { 2, 2 }); - final ByteOrder nonNativeByteOrder = - (NativeData.getNativeByteOrder() == ByteOrder.LITTLE_ENDIAN) ? ByteOrder.BIG_ENDIAN - : ByteOrder.LITTLE_ENDIAN; - final byte[] taggedArr = NativeTaggedArray.toByteArray(floatArr, nonNativeByteOrder); - assertEquals(4 * 4 + 2 * 4 + 4, taggedArr.length); - final MDFloatArray convertedFloatArr = NativeTaggedArray.tryToFloatArray(taggedArr); - final NativeArrayEncoding encoding = NativeArrayEncoding.tryGetEncoding(taggedArr); - assertNotNull(encoding); - assertEquals(nonNativeByteOrder, encoding.getByteOrder()); - assertEquals(4, encoding.getSizeInBytes()); - assertTrue(encoding.isFloatingPoint()); - assertFalse(encoding.isInteger()); - assertTrue(floatArr.equals(convertedFloatArr)); - } - - @Test - public static void testDouble1DArrayNativeByteOrder() - { - final double[] doubleArr = new double[] - { 1.1, -3.2, 1001.5 }; - final byte[] taggedArr = NativeTaggedArray.toByteArray(doubleArr); - assertEquals(3 * 8 + 4 + 4, taggedArr.length); - final double[] convertedDoubleArr = NativeTaggedArray.tryToDoubleArray1D(taggedArr); - final NativeArrayEncoding encoding = NativeArrayEncoding.tryGetEncoding(taggedArr); - assertNotNull(encoding); - assertEquals(NativeData.getNativeByteOrder(), encoding.getByteOrder()); - assertEquals(8, encoding.getSizeInBytes()); - assertTrue(encoding.isFloatingPoint()); - assertFalse(encoding.isInteger()); - assertTrue(Arrays.equals(doubleArr, convertedDoubleArr)); - } - - @Test - public static void testDouble1DArrayNonNativeByteOrder() - { - final double[] doubleArr = new double[] - { 1.1, -3.2, 1001.5 }; - final ByteOrder nonNativeByteOrder = - (NativeData.getNativeByteOrder() == ByteOrder.LITTLE_ENDIAN) ? ByteOrder.BIG_ENDIAN - : ByteOrder.LITTLE_ENDIAN; - final byte[] taggedArr = NativeTaggedArray.toByteArray(doubleArr, nonNativeByteOrder); - assertEquals(3 * 8 + 4 + 4, taggedArr.length); - final double[] convertedDoubleArr = NativeTaggedArray.tryToDoubleArray1D(taggedArr); - final NativeArrayEncoding encoding = NativeArrayEncoding.tryGetEncoding(taggedArr); - assertNotNull(encoding); - assertEquals(nonNativeByteOrder, encoding.getByteOrder()); - assertEquals(8, encoding.getSizeInBytes()); - assertTrue(encoding.isFloatingPoint()); - assertFalse(encoding.isInteger()); - assertTrue(Arrays.equals(doubleArr, convertedDoubleArr)); - } - - @Test - public static void testDouble2DArrayNativeByteOrder() - { - final MDDoubleArray doubleArr = new MDDoubleArray(new double[] - { 1, 2, 3, 4 }, new int[] { 2, 2 }); - final byte[] taggedArr = NativeTaggedArray.toByteArray(doubleArr); - assertEquals(4 * 8 + 2 * 4 + 4, taggedArr.length); - final MDDoubleArray convertedDoubleArr = NativeTaggedArray.tryToDoubleArray(taggedArr); - final NativeArrayEncoding encoding = NativeArrayEncoding.tryGetEncoding(taggedArr); - assertNotNull(encoding); - assertEquals(NativeData.getNativeByteOrder(), encoding.getByteOrder()); - assertEquals(8, encoding.getSizeInBytes()); - assertTrue(encoding.isFloatingPoint()); - assertFalse(encoding.isInteger()); - assertTrue(doubleArr.equals(convertedDoubleArr)); - } - - @Test - public static void testDouble2DArrayNonNativeByteOrder() - { - final MDDoubleArray doubleArr = new MDDoubleArray(new double[] - { 1, 2, 3, 4 }, new int[] { 2, 2 }); - final ByteOrder nonNativeByteOrder = - (NativeData.getNativeByteOrder() == ByteOrder.LITTLE_ENDIAN) ? ByteOrder.BIG_ENDIAN - : ByteOrder.LITTLE_ENDIAN; - final byte[] taggedArr = NativeTaggedArray.toByteArray(doubleArr, nonNativeByteOrder); - assertEquals(4 * 8 + 2 * 4 + 4, taggedArr.length); - final MDDoubleArray convertedDoubleArr = NativeTaggedArray.tryToDoubleArray(taggedArr); - final NativeArrayEncoding encoding = NativeArrayEncoding.tryGetEncoding(taggedArr); - assertNotNull(encoding); - assertEquals(nonNativeByteOrder, encoding.getByteOrder()); - assertEquals(8, encoding.getSizeInBytes()); - assertTrue(encoding.isFloatingPoint()); - assertFalse(encoding.isInteger()); - assertTrue(doubleArr.equals(convertedDoubleArr)); - } - - @Test - public static void testShort1DArrayNativeByteOrder() - { - final short[] shortArr = new short[] - { 1, -3, 1001 }; - final byte[] taggedArr = NativeTaggedArray.toByteArray(shortArr); - assertEquals(3 * 2 + 4 + 4, taggedArr.length); - final short[] convertedShortArr = NativeTaggedArray.tryToShortArray1D(taggedArr); - final NativeArrayEncoding encoding = NativeArrayEncoding.tryGetEncoding(taggedArr); - assertNotNull(encoding); - assertEquals(NativeData.getNativeByteOrder(), encoding.getByteOrder()); - assertEquals(2, encoding.getSizeInBytes()); - assertFalse(encoding.isFloatingPoint()); - assertTrue(encoding.isInteger()); - assertTrue(Arrays.equals(shortArr, convertedShortArr)); - } - - @Test - public static void testShort1DArrayNonNativeByteOrder() - { - final short[] shortArr = new short[] - { 1, -3, 1001 }; - final ByteOrder nonNativeByteOrder = - (NativeData.getNativeByteOrder() == ByteOrder.LITTLE_ENDIAN) ? ByteOrder.BIG_ENDIAN - : ByteOrder.LITTLE_ENDIAN; - final byte[] taggedArr = NativeTaggedArray.toByteArray(shortArr, nonNativeByteOrder); - assertEquals(3 * 2 + 4 + 4, taggedArr.length); - final short[] convertedShortArr = NativeTaggedArray.tryToShortArray1D(taggedArr); - final NativeArrayEncoding encoding = NativeArrayEncoding.tryGetEncoding(taggedArr); - assertNotNull(encoding); - assertEquals(nonNativeByteOrder, encoding.getByteOrder()); - assertEquals(2, encoding.getSizeInBytes()); - assertFalse(encoding.isFloatingPoint()); - assertTrue(encoding.isInteger()); - assertTrue(Arrays.equals(shortArr, convertedShortArr)); - } - - @Test - public static void testShort2DArrayNativeByteOrder() - { - final MDShortArray shortArr = new MDShortArray(new short[] - { 1, 2, 3, 4 }, new int[] { 2, 2 }); - final byte[] taggedArr = NativeTaggedArray.toByteArray(shortArr); - assertEquals(4 * 2 + 2 * 4 + 4, taggedArr.length); - final MDShortArray convertedShortArr = NativeTaggedArray.tryToShortArray(taggedArr); - final NativeArrayEncoding encoding = NativeArrayEncoding.tryGetEncoding(taggedArr); - assertNotNull(encoding); - assertEquals(NativeData.getNativeByteOrder(), encoding.getByteOrder()); - assertEquals(2, encoding.getSizeInBytes()); - assertFalse(encoding.isFloatingPoint()); - assertTrue(encoding.isInteger()); - assertTrue(shortArr.equals(convertedShortArr)); - } - - @Test - public static void testShort2DArrayNonNativeByteOrder() - { - final MDShortArray shortArr = new MDShortArray(new short[] - { 1, 2, 3, 4 }, new int[] { 2, 2 }); - final ByteOrder nonNativeByteOrder = - (NativeData.getNativeByteOrder() == ByteOrder.LITTLE_ENDIAN) ? ByteOrder.BIG_ENDIAN - : ByteOrder.LITTLE_ENDIAN; - final byte[] taggedArr = NativeTaggedArray.toByteArray(shortArr, nonNativeByteOrder); - assertEquals(4 * 2 + 2 * 4 + 4, taggedArr.length); - final MDShortArray convertedShortArr = NativeTaggedArray.tryToShortArray(taggedArr); - final NativeArrayEncoding encoding = NativeArrayEncoding.tryGetEncoding(taggedArr); - assertNotNull(encoding); - assertEquals(nonNativeByteOrder, encoding.getByteOrder()); - assertEquals(2, encoding.getSizeInBytes()); - assertFalse(encoding.isFloatingPoint()); - assertTrue(encoding.isInteger()); - assertTrue(shortArr.equals(convertedShortArr)); - } - - @Test - public static void testInt1DArrayNativeByteOrder() - { - final int[] intArr = new int[] - { 1, -3, 1001 }; - final byte[] taggedArr = NativeTaggedArray.toByteArray(intArr); - assertEquals(3 * 4 + 4 + 4, taggedArr.length); - final int[] convertedIntArr = NativeTaggedArray.tryToIntArray1D(taggedArr); - final NativeArrayEncoding encoding = NativeArrayEncoding.tryGetEncoding(taggedArr); - assertNotNull(encoding); - assertEquals(NativeData.getNativeByteOrder(), encoding.getByteOrder()); - assertEquals(4, encoding.getSizeInBytes()); - assertFalse(encoding.isFloatingPoint()); - assertTrue(encoding.isInteger()); - assertTrue(Arrays.equals(intArr, convertedIntArr)); - } - - @Test - public static void testInt1DArrayNonNativeByteOrder() - { - final int[] intArr = new int[] - { 1, -3, 1001 }; - final ByteOrder nonNativeByteOrder = - (NativeData.getNativeByteOrder() == ByteOrder.LITTLE_ENDIAN) ? ByteOrder.BIG_ENDIAN - : ByteOrder.LITTLE_ENDIAN; - final byte[] taggedArr = NativeTaggedArray.toByteArray(intArr, nonNativeByteOrder); - assertEquals(3 * 4 + 4 + 4, taggedArr.length); - final int[] convertedIntArr = NativeTaggedArray.tryToIntArray1D(taggedArr); - final NativeArrayEncoding encoding = NativeArrayEncoding.tryGetEncoding(taggedArr); - assertNotNull(encoding); - assertEquals(nonNativeByteOrder, encoding.getByteOrder()); - assertEquals(4, encoding.getSizeInBytes()); - assertFalse(encoding.isFloatingPoint()); - assertTrue(encoding.isInteger()); - assertTrue(Arrays.equals(intArr, convertedIntArr)); - } - - @Test - public static void testInt2DArrayNativeByteOrder() - { - final MDIntArray intArr = new MDIntArray(new int[] - { 1, 2, 3, 4 }, new int[] { 2, 2 }); - final byte[] taggedArr = NativeTaggedArray.toByteArray(intArr); - assertEquals(4 * 4 + 2 * 4 + 4, taggedArr.length); - final MDIntArray convertedIntArr = NativeTaggedArray.tryToIntArray(taggedArr); - final NativeArrayEncoding encoding = NativeArrayEncoding.tryGetEncoding(taggedArr); - assertNotNull(encoding); - assertEquals(NativeData.getNativeByteOrder(), encoding.getByteOrder()); - assertEquals(4, encoding.getSizeInBytes()); - assertFalse(encoding.isFloatingPoint()); - assertTrue(encoding.isInteger()); - assertTrue(intArr.equals(convertedIntArr)); - } - - @Test - public static void testInt2DArrayNonNativeByteOrder() - { - final MDIntArray intArr = new MDIntArray(new int[] - { 1, 2, 3, 4 }, new int[] { 2, 2 }); - final ByteOrder nonNativeByteOrder = - (NativeData.getNativeByteOrder() == ByteOrder.LITTLE_ENDIAN) ? ByteOrder.BIG_ENDIAN - : ByteOrder.LITTLE_ENDIAN; - final byte[] taggedArr = NativeTaggedArray.toByteArray(intArr, nonNativeByteOrder); - assertEquals(4 * 4 + 2 * 4 + 4, taggedArr.length); - final MDIntArray convertedIntArr = NativeTaggedArray.tryToIntArray(taggedArr); - final NativeArrayEncoding encoding = NativeArrayEncoding.tryGetEncoding(taggedArr); - assertNotNull(encoding); - assertEquals(nonNativeByteOrder, encoding.getByteOrder()); - assertEquals(4, encoding.getSizeInBytes()); - assertFalse(encoding.isFloatingPoint()); - assertTrue(encoding.isInteger()); - assertTrue(intArr.equals(convertedIntArr)); - } - - @Test - public static void testLong1DArrayNativeByteOrder() - { - final long[] longArr = new long[] - { 1, -3, 1001 }; - final byte[] taggedArr = NativeTaggedArray.toByteArray(longArr); - assertEquals(3 * 8 + 4 + 4, taggedArr.length); - final long[] convertedLongArr = NativeTaggedArray.tryToLongArray1D(taggedArr); - final NativeArrayEncoding encoding = NativeArrayEncoding.tryGetEncoding(taggedArr); - assertNotNull(encoding); - assertEquals(NativeData.getNativeByteOrder(), encoding.getByteOrder()); - assertEquals(8, encoding.getSizeInBytes()); - assertFalse(encoding.isFloatingPoint()); - assertTrue(encoding.isInteger()); - assertTrue(Arrays.equals(longArr, convertedLongArr)); - } - - @Test - public static void testLong1DArrayNonNativeByteOrder() - { - final long[] longArr = new long[] - { 1, -3, 1001 }; - final ByteOrder nonNativeByteOrder = - (NativeData.getNativeByteOrder() == ByteOrder.LITTLE_ENDIAN) ? ByteOrder.BIG_ENDIAN - : ByteOrder.LITTLE_ENDIAN; - final byte[] taggedArr = NativeTaggedArray.toByteArray(longArr, nonNativeByteOrder); - assertEquals(3 * 8 + 4 + 4, taggedArr.length); - final long[] convertedLongArr = NativeTaggedArray.tryToLongArray1D(taggedArr); - final NativeArrayEncoding encoding = NativeArrayEncoding.tryGetEncoding(taggedArr); - assertNotNull(encoding); - assertEquals(nonNativeByteOrder, encoding.getByteOrder()); - assertEquals(8, encoding.getSizeInBytes()); - assertFalse(encoding.isFloatingPoint()); - assertTrue(encoding.isInteger()); - assertTrue(Arrays.equals(longArr, convertedLongArr)); - } - - @Test - public static void testLong2DArrayNativeByteOrder() - { - final MDLongArray longArr = new MDLongArray(new long[] - { 1, 2, 3, 4 }, new int[] { 2, 2 }); - final byte[] taggedArr = NativeTaggedArray.toByteArray(longArr); - assertEquals(4 * 8 + 2 * 4 + 4, taggedArr.length); - final MDLongArray convertedLongArr = NativeTaggedArray.tryToLongArray(taggedArr); - final NativeArrayEncoding encoding = NativeArrayEncoding.tryGetEncoding(taggedArr); - assertNotNull(encoding); - assertEquals(NativeData.getNativeByteOrder(), encoding.getByteOrder()); - assertEquals(8, encoding.getSizeInBytes()); - assertFalse(encoding.isFloatingPoint()); - assertTrue(encoding.isInteger()); - assertTrue(longArr.equals(convertedLongArr)); - } - - @Test - public static void testLong2DArrayNonNativeByteOrder() - { - final MDLongArray longArr = new MDLongArray(new long[] - { 1, 2, 3, 4 }, new int[] { 2, 2 }); - final ByteOrder nonNativeByteOrder = - (NativeData.getNativeByteOrder() == ByteOrder.LITTLE_ENDIAN) ? ByteOrder.BIG_ENDIAN - : ByteOrder.LITTLE_ENDIAN; - final byte[] taggedArr = NativeTaggedArray.toByteArray(longArr, nonNativeByteOrder); - assertEquals(4 * 8 + 2 * 4 + 4, taggedArr.length); - final MDLongArray convertedLongArr = NativeTaggedArray.tryToLongArray(taggedArr); - final NativeArrayEncoding encoding = NativeArrayEncoding.tryGetEncoding(taggedArr); - assertNotNull(encoding); - assertEquals(nonNativeByteOrder, encoding.getByteOrder()); - assertEquals(8, encoding.getSizeInBytes()); - assertFalse(encoding.isFloatingPoint()); - assertTrue(encoding.isInteger()); - assertTrue(longArr.equals(convertedLongArr)); - } - - private void afterClass() - { - } - - private void setUp() - { - } - - public static void main(String[] args) throws Throwable - { - System.out.println(BuildAndEnvironmentInfo.INSTANCE); - System.out.println("Test class: " + NativeTaggedArrayTests.class.getSimpleName()); - System.out.println(); - NativeData.ensureNativeLibIsLoaded(); - final NativeTaggedArrayTests test = new NativeTaggedArrayTests(); - try - { - for (Method m : NativeTaggedArrayTests.class.getMethods()) - { - final Test testAnnotation = m.getAnnotation(Test.class); - if (testAnnotation == null || m.getParameterTypes().length > 0) - { - continue; - } - System.out.println("Running " + m.getName()); - test.setUp(); - try - { - m.invoke(test); - } catch (InvocationTargetException wrapperThrowable) - { - final Throwable th = wrapperThrowable.getCause(); - boolean exceptionFound = false; - for (Class<?> expectedExClazz : testAnnotation.expectedExceptions()) - { - if (expectedExClazz == th.getClass()) - { - exceptionFound = true; - break; - } - } - if (exceptionFound == false) - { - throw th; - } - } - } - System.out.println("Tests OK!"); - } finally - { - test.afterClass(); - } - } - -} diff --git a/base/sourceTest/java/ch/systemsx/cisd/base/exceptions/CheckedExceptionTunnelTest.java b/base/sourceTest/java/ch/systemsx/cisd/base/exceptions/CheckedExceptionTunnelTest.java deleted file mode 100644 index 04e34ebe933fde3ece17f97e7e38de91e2a40b92..0000000000000000000000000000000000000000 --- a/base/sourceTest/java/ch/systemsx/cisd/base/exceptions/CheckedExceptionTunnelTest.java +++ /dev/null @@ -1,88 +0,0 @@ -/* - * Copyright 2012 ETH Zuerich, CISD - * - * 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. - */ - -package ch.systemsx.cisd.base.exceptions; - -import java.io.IOException; -import java.io.PrintWriter; -import java.io.StringWriter; - -import org.apache.commons.lang.StringUtils; -import org.testng.annotations.Test; - -import static org.testng.AssertJUnit.*; - -/** - * Test cases for {@link CheckedExceptionTunnel} - * - * @author Bernd Rinn - */ -public class CheckedExceptionTunnelTest -{ - - @Test - public void testGetMessage() - { - final IOException ioe = new IOException("This is the message"); - final RuntimeException re = CheckedExceptionTunnel.wrapIfNecessary(ioe); - assertEquals("This is the message", re.getMessage()); - } - - @Test - public void testToString() - { - final InterruptedException ioe = new InterruptedException("Somehow got interrupted"); - final RuntimeException re = CheckedExceptionTunnel.wrapIfNecessary(ioe); - assertEquals("java.lang.InterruptedException: Somehow got interrupted", re.toString()); - } - - @Test - public void testPrintStackTrace() - { - final InterruptedException ie = new InterruptedException("Somehow got interrupted"); - ie.fillInStackTrace(); - final RuntimeException re = CheckedExceptionTunnel.wrapIfNecessary(ie); - StringWriter sw = new StringWriter(); - PrintWriter pw = new PrintWriter(sw); - re.printStackTrace(pw); - final String[] lines = StringUtils.split(sw.toString(), '\n'); - assertEquals("java.lang.InterruptedException: Somehow got interrupted", lines[0]); - assertTrue( - lines[1], - lines[1].startsWith("\tat ch.systemsx.cisd.base.exceptions.CheckedExceptionTunnelTest." - + "testPrintStackTrace(CheckedExceptionTunnelTest.java")); - } - - @Test - public void testPrintFullStackTrace() - { - final Exception e = new Exception("Some exceptional condition"); - e.fillInStackTrace(); - final CheckedExceptionTunnel re = new CheckedExceptionTunnel(e); - StringWriter sw = new StringWriter(); - PrintWriter pw = new PrintWriter(sw); - re.printFullStackTrace(); - re.printFullStackTrace(pw); - final String[] lines = StringUtils.split(sw.toString(), '\n'); - assertEquals( - "ch.systemsx.cisd.base.exceptions.CheckedExceptionTunnel: Some exceptional condition", - lines[0]); - assertTrue( - lines[1], - lines[1].startsWith("\tat ch.systemsx.cisd.base.exceptions.CheckedExceptionTunnelTest." - + "testPrintFullStackTrace(CheckedExceptionTunnelTest.java:")); - } -} diff --git a/base/sourceTest/java/ch/systemsx/cisd/base/exceptions/IOExceptionUncheckedTests.java b/base/sourceTest/java/ch/systemsx/cisd/base/exceptions/IOExceptionUncheckedTests.java deleted file mode 100644 index 76db02d4909760a6119a2dc2d87228c4038454b3..0000000000000000000000000000000000000000 --- a/base/sourceTest/java/ch/systemsx/cisd/base/exceptions/IOExceptionUncheckedTests.java +++ /dev/null @@ -1,144 +0,0 @@ -/* - * Copyright 2011 ETH Zuerich, CISD - * - * 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. - */ - -package ch.systemsx.cisd.base.exceptions; - -import static org.testng.AssertJUnit.assertEquals; -import static org.testng.AssertJUnit.assertNotNull; -import static org.testng.AssertJUnit.assertNull; -import static org.testng.AssertJUnit.assertTrue; -import static org.testng.AssertJUnit.fail; - -import java.io.File; -import java.io.FileInputStream; -import java.io.FileNotFoundException; -import java.io.IOException; -import java.lang.reflect.InvocationTargetException; -import java.lang.reflect.Method; - -import org.testng.annotations.Test; - -import ch.systemsx.cisd.base.BuildAndEnvironmentInfo; -import ch.systemsx.cisd.base.exceptions.CheckedExceptionTunnel; -import ch.systemsx.cisd.base.exceptions.IOExceptionUnchecked; - -/** - * Test cases for {@link IOExceptionUnchecked}. - * - * @author Bernd Rinn - */ -public class IOExceptionUncheckedTests -{ - private void generateFileNotFoundException() throws IOExceptionUnchecked - { - try - { - new FileInputStream(new File("doesnt.exist")); - } catch (IOException ex) - { - throw CheckedExceptionTunnel.wrapIfNecessary(ex); - } - } - - @Test - public void testWrapUnwrapIOException() - { - try - { - generateFileNotFoundException(); - fail("No IOException thrown"); - } catch (IOExceptionUnchecked e) - { - final Exception ex = CheckedExceptionTunnel.unwrapIfNecessary(e); - assertTrue(ex instanceof FileNotFoundException); - assertTrue(ex.getMessage().startsWith("doesnt.exist")); - } - } - - @Test - public void testWrapUnwrapNonIOException() - { - try - { - throw new IOExceptionUnchecked(new IllegalStateException("Don't like this state")); - } catch (CheckedExceptionTunnel e) - { - final Exception ex = CheckedExceptionTunnel.unwrapIfNecessary(e); - assertTrue(ex instanceof IOException); - assertEquals("IllegalStateException: Don't like this state", ex.getMessage()); - assertNotNull(ex.getCause()); - assertTrue(ex.getCause() instanceof IllegalStateException); - assertEquals("Don't like this state", ex.getCause().getMessage()); - } - } - - @Test - public void testWrapUnwrapIOExceptionGivingMsg() - { - try - { - throw new IOExceptionUnchecked("Some message"); - } catch (CheckedExceptionTunnel e) - { - final Exception ex = CheckedExceptionTunnel.unwrapIfNecessary(e); - assertTrue(ex instanceof IOException); - assertEquals("Some message", ex.getMessage()); - assertNull(ex.getCause()); - } - } - - public static void main(String[] args) throws Throwable - { - System.out.println(BuildAndEnvironmentInfo.INSTANCE); - System.out.println("Test class: " + IOExceptionUncheckedTests.class.getSimpleName()); - System.out.println(); - final IOExceptionUncheckedTests test = new IOExceptionUncheckedTests(); - for (Method m : IOExceptionUncheckedTests.class.getMethods()) - { - final Test testAnnotation = m.getAnnotation(Test.class); - if (testAnnotation == null) - { - continue; - } - if (m.getParameterTypes().length == 0) - { - System.out.println("Running " + m.getName()); - try - { - m.invoke(test); - } catch (InvocationTargetException wrapperThrowable) - { - final Throwable th = wrapperThrowable.getCause(); - boolean exceptionFound = false; - for (Class<?> expectedExClazz : testAnnotation.expectedExceptions()) - { - if (expectedExClazz == th.getClass()) - { - exceptionFound = true; - break; - } - } - if (exceptionFound == false) - { - throw th; - } - } - } - } - System.out.println("Tests OK!"); - } - -} diff --git a/base/sourceTest/java/ch/systemsx/cisd/base/io/ByteBufferRandomAccessFileTests.java b/base/sourceTest/java/ch/systemsx/cisd/base/io/ByteBufferRandomAccessFileTests.java deleted file mode 100644 index 0987c3474fae2f85ba536fd3664c94472cdff1ff..0000000000000000000000000000000000000000 --- a/base/sourceTest/java/ch/systemsx/cisd/base/io/ByteBufferRandomAccessFileTests.java +++ /dev/null @@ -1,94 +0,0 @@ -/* - * Copyright 2011 ETH Zuerich, CISD - * - * 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. - */ - -package ch.systemsx.cisd.base.io; - -import java.lang.reflect.InvocationTargetException; -import java.lang.reflect.Method; - -import org.testng.annotations.Test; - -import ch.systemsx.cisd.base.BuildAndEnvironmentInfo; - -/** - * Test cases for {@link RandomAccessFileImpl}. - * - * @author Bernd Rinn - */ -public class ByteBufferRandomAccessFileTests extends IRandomAccessFileTests -{ - - @Override - protected IRandomAccessFile createRandomAccessFile(String name) - { - return new ByteBufferRandomAccessFile(4096); - } - - @Override - protected IRandomAccessFile createRandomAccessFile(String name, byte[] content) - { - return new ByteBufferRandomAccessFile(content); - } - - public static void main(String[] args) throws Throwable - { - System.out.println(BuildAndEnvironmentInfo.INSTANCE); - System.out.println("Test class: " + ByteBufferRandomAccessFileTests.class.getSimpleName()); - System.out.println(); - final ByteBufferRandomAccessFileTests test = new ByteBufferRandomAccessFileTests(); - try - { - for (Method m : ByteBufferRandomAccessFileTests.class.getMethods()) - { - final Test testAnnotation = m.getAnnotation(Test.class); - if (testAnnotation == null) - { - continue; - } - if (m.getParameterTypes().length == 0) - { - System.out.println("Running " + m.getName()); - test.setUp(); - try - { - m.invoke(test); - } catch (InvocationTargetException wrapperThrowable) - { - final Throwable th = wrapperThrowable.getCause(); - boolean exceptionFound = false; - for (Class<?> expectedExClazz : testAnnotation.expectedExceptions()) - { - if (expectedExClazz == th.getClass()) - { - exceptionFound = true; - break; - } - } - if (exceptionFound == false) - { - throw th; - } - } - } - } - System.out.println("Tests OK!"); - } finally - { - test.afterClass(); - } - } - -} diff --git a/base/sourceTest/java/ch/systemsx/cisd/base/io/IRandomAccessFileTests.java b/base/sourceTest/java/ch/systemsx/cisd/base/io/IRandomAccessFileTests.java deleted file mode 100644 index 57ddec176d4b476a81fbdd1418c7a80317bb48a4..0000000000000000000000000000000000000000 --- a/base/sourceTest/java/ch/systemsx/cisd/base/io/IRandomAccessFileTests.java +++ /dev/null @@ -1,196 +0,0 @@ -/* - * Copyright 2011 ETH Zuerich, CISD - * - * 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. - */ - -package ch.systemsx.cisd.base.io; - -import java.io.IOException; -import java.nio.ByteOrder; - -import org.apache.commons.io.IOUtils; -import org.testng.annotations.Test; - -import ch.systemsx.cisd.base.convert.NativeData; -import ch.systemsx.cisd.base.tests.AbstractFileSystemTestCase; - -/** - * Test cases for {@link IRandomAccessFile} implementations. - * - * @author Bernd Rinn - */ -public abstract class IRandomAccessFileTests extends AbstractFileSystemTestCase -{ - - abstract protected IRandomAccessFile createRandomAccessFile(String name); - - abstract protected IRandomAccessFile createRandomAccessFile(String name, byte[] content); - - @Test - public void testSkip() - { - final IRandomAccessFile raf = createRandomAccessFile("testSkip"); - final byte[] b = new byte[4096]; - for (int i = 0; i < b.length; ++i) - { - b[i] = (byte) i; - } - raf.write(b); - raf.seek(0); - assertEquals(509, raf.skip(509)); - assertEquals(509, raf.getFilePointer()); - assertEquals(-3, raf.readByte()); - assertEquals(4096 - 509 - 1, raf.skip(4096)); - assertEquals(4096, raf.getFilePointer()); - raf.close(); - } - - @Test - public void testLongByteOrder() - { - final IRandomAccessFile raf = createRandomAccessFile("testLongByteOrder"); - raf.writeLong(1); - final byte[] buf = new byte[8]; - raf.seek(0); - raf.read(buf); - // Default is big endian - assertEquals(0, buf[0]); - assertEquals(1, buf[7]); - - raf.seek(0); - raf.setByteOrder(ByteOrder.LITTLE_ENDIAN); - raf.writeLong(1); - raf.seek(0); - raf.read(buf); - assertEquals(1, buf[0]); - assertEquals(0, buf[7]); - raf.close(); - } - - @Test - public void testMark() - { - final IRandomAccessFile raf = createRandomAccessFile("testMark"); - final byte[] buf = new byte[128]; - raf.write(buf); - raf.seek(0); - assertTrue(raf.markSupported()); - raf.mark(0); - raf.read(); - assertEquals(1, raf.getFilePointer()); - raf.reset(); - assertEquals(0, raf.getFilePointer()); - raf.read(); - raf.read(); - raf.read(); - raf.mark(0); - raf.read(); - raf.read(); - raf.read(); - raf.reset(); - assertEquals(3, raf.getFilePointer()); - raf.close(); - } - - @Test - public void testWriteReadByte() - { - final IRandomAccessFile raf = createRandomAccessFile("testWriteReadByte"); - raf.write(254); - raf.seek(0); - assertEquals(-2, raf.readByte()); - raf.seek(0); - assertEquals(254, raf.read()); - raf.seek(0); - assertEquals(254, raf.readUnsignedByte()); - raf.close(); - } - - @Test - public void testWriteReadShort() - { - final IRandomAccessFile raf = createRandomAccessFile("testWriteReadShort"); - raf.writeShort(65534); - raf.seek(0); - assertEquals(-2, raf.readShort()); - raf.seek(0); - assertEquals(65534, raf.readUnsignedShort()); - raf.close(); - } - - @Test - public void testAvailable() - { - final IRandomAccessFile raf = createRandomAccessFile("testAvailable"); - assertEquals(0, raf.available()); - raf.writeDouble(5.5); - raf.seek(0); - assertEquals(8, raf.available()); - raf.close(); - } - - @Test - public void testWriteReadStringBytes() - { - final String s = "teststring"; - final IRandomAccessFile raf = createRandomAccessFile("testWriteReadStringBytes"); - raf.writeBytes(s); - raf.seek(0); - assertEquals(s.length(), raf.available()); - final byte[] buf = new byte[raf.available()]; - raf.read(buf); - assertEquals(s, new String(buf)); - raf.close(); - } - - @Test - public void testWriteReadStringChars() - { - final String s = "teststring"; - final IRandomAccessFile raf = createRandomAccessFile("testWriteReadStringChars"); - raf.writeChars(s); - raf.seek(0); - assertEquals(2 * s.length(), raf.available()); - final byte[] buf = new byte[raf.available()]; - raf.read(buf); - assertEquals( - s, - new String(NativeData.byteToChar(buf, - ch.systemsx.cisd.base.convert.NativeData.ByteOrder.BIG_ENDIAN))); - raf.close(); - } - - @Test - public void testReadLine() throws IOException - { - final byte[] bytes = "hello world".getBytes(); - final IRandomAccessFile raf = createRandomAccessFile("testWriteReadStringChars", bytes); - final AdapterIInputStreamToInputStream is = new AdapterIInputStreamToInputStream(raf); - - assertEquals("[hello world]", IOUtils.readLines(is).toString()); - raf.close(); - } - - @Test - public void testToByteArray() throws IOException - { - final byte[] bytes = "hello world".getBytes(); - final IRandomAccessFile raf = createRandomAccessFile("testWriteReadStringChars", bytes); - final AdapterIInputStreamToInputStream is = new AdapterIInputStreamToInputStream(raf); - - assertEquals(bytes, IOUtils.toByteArray(is)); - raf.close(); - } - -} diff --git a/base/sourceTest/java/ch/systemsx/cisd/base/io/RandomAccessFileImplTests.java b/base/sourceTest/java/ch/systemsx/cisd/base/io/RandomAccessFileImplTests.java deleted file mode 100644 index 2bc200b3d2c300e34b7d78f01da47263229ef09d..0000000000000000000000000000000000000000 --- a/base/sourceTest/java/ch/systemsx/cisd/base/io/RandomAccessFileImplTests.java +++ /dev/null @@ -1,97 +0,0 @@ -/* - * Copyright 2011 ETH Zuerich, CISD - * - * 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. - */ - -package ch.systemsx.cisd.base.io; - -import java.lang.reflect.InvocationTargetException; -import java.lang.reflect.Method; - -import org.testng.annotations.Test; - -import ch.systemsx.cisd.base.BuildAndEnvironmentInfo; - -/** - * Test cases for {@link RandomAccessFileImpl}. - * - * @author Bernd Rinn - */ -public class RandomAccessFileImplTests extends IRandomAccessFileTests -{ - - @Override - protected IRandomAccessFile createRandomAccessFile(String name) - { - return new RandomAccessFileImpl(create(name), "rw"); - } - - @Override - protected IRandomAccessFile createRandomAccessFile(String name, byte[] content) - { - final IRandomAccessFile f = new RandomAccessFileImpl(create(name), "rw"); - f.write(content); - f.seek(0L); - return f; - } - - public static void main(String[] args) throws Throwable - { - System.out.println(BuildAndEnvironmentInfo.INSTANCE); - System.out.println("Test class: " + RandomAccessFileImplTests.class.getSimpleName()); - System.out.println(); - final RandomAccessFileImplTests test = new RandomAccessFileImplTests(); - try - { - for (Method m : RandomAccessFileImplTests.class.getMethods()) - { - final Test testAnnotation = m.getAnnotation(Test.class); - if (testAnnotation == null) - { - continue; - } - if (m.getParameterTypes().length == 0) - { - System.out.println("Running " + m.getName()); - test.setUp(); - try - { - m.invoke(test); - } catch (InvocationTargetException wrapperThrowable) - { - final Throwable th = wrapperThrowable.getCause(); - boolean exceptionFound = false; - for (Class<?> expectedExClazz : testAnnotation.expectedExceptions()) - { - if (expectedExClazz == th.getClass()) - { - exceptionFound = true; - break; - } - } - if (exceptionFound == false) - { - throw th; - } - } - } - } - System.out.println("Tests OK!"); - } finally - { - test.afterClass(); - } - } - -} diff --git a/base/sourceTest/java/ch/systemsx/cisd/base/mdarray/MDArrayTests.java b/base/sourceTest/java/ch/systemsx/cisd/base/mdarray/MDArrayTests.java deleted file mode 100644 index 38a918209660b43add73f25952dcf0fcff182c65..0000000000000000000000000000000000000000 --- a/base/sourceTest/java/ch/systemsx/cisd/base/mdarray/MDArrayTests.java +++ /dev/null @@ -1,332 +0,0 @@ -/* - * Copyright 2008 ETH Zuerich, CISD - * - * 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. - */ - -package ch.systemsx.cisd.base.mdarray; - -import static org.testng.AssertJUnit.assertEquals; -import static org.testng.AssertJUnit.assertTrue; - -import java.lang.reflect.InvocationTargetException; -import java.lang.reflect.Method; -import java.util.Arrays; - -import org.testng.annotations.Test; - -import ch.systemsx.cisd.base.BuildAndEnvironmentInfo; - -/** - * Test cases for {@link MDAbstractArray}. - * - * @author Bernd Rinn - */ -public class MDArrayTests -{ - @Test - public void testGetLength() - { - assertEquals(0, MDAbstractArray.getLength(new int[] - { 0 }, 0)); - assertEquals(1, MDAbstractArray.getLength(new int[] - { 1 }, 0)); - assertEquals(2, MDAbstractArray.getLength(new int[] - { 1 }, 2)); - assertEquals(15, MDAbstractArray.getLength(new int[] - { 5, 3 }, 0)); - assertEquals(21, MDAbstractArray.getLength(new int[] - { 5, 3 }, 7)); - assertEquals(15, MDAbstractArray.getLength(new int[] - { 5, 3 }, 3)); - assertEquals(1, MDAbstractArray.getLength(new int[] - { 1, 1, 1 }, 0)); - assertEquals(3, MDAbstractArray.getLength(new int[] - { 1, 1, 1 }, 3)); - assertEquals(8, MDAbstractArray.getLength(new int[] - { 2, 2, 2 }, 0)); - assertEquals(20, MDAbstractArray.getLength(new int[] - { 2, 2, 2 }, 5)); - assertEquals(2, MDAbstractArray.getLength(new int[] - { 1, 1, 2 }, 0)); - assertEquals(2, MDAbstractArray.getLength(new int[] - { 1, 2, 1 }, 0)); - assertEquals(2, MDAbstractArray.getLength(new int[] - { 2, 1, 1 }, 0)); - assertEquals(50, MDAbstractArray.getLength(new int[] - { 10, 1, 5 }, 0)); - assertEquals(50, MDAbstractArray.getLength(new long[] - { 10, 1, 5 }, 0)); - } - - @Test - public void testToInt() - { - assertTrue(Arrays.equals(new int[] - { 1, 2, 3 }, MDAbstractArray.toInt(new long[] - { 1, 2, 3 }))); - assertTrue(Arrays.equals(new int[] {}, MDAbstractArray.toInt(new long[] {}))); - } - - @Test - public void testComputeIndex() - { - MDArray<Object> array; - array = new MDArray<Object>(Object.class, new int[] - { 33 }); - assertEquals(17, array.computeIndex(new int[] - { 17 })); - assertTrue(Arrays.toString(array.computeReverseIndex(17)), Arrays.equals(new int[] - { 17 }, array.computeReverseIndex(17))); - array = new MDArray<Object>(Object.class, new int[] - { 100, 10 }); - assertEquals(10 * 42 + 8, array.computeIndex(new int[] - { 42, 8 })); - assertTrue(Arrays.toString(array.computeReverseIndex(10 * 42 + 8)), - Arrays.equals(new int[] - { 42, 8 }, array.computeReverseIndex(10 * 42 + 8))); - array = new MDArray<Object>(Object.class, new int[] - { 2, 7, 3 }); - assertEquals(3 * 7 * 1 + 3 * 3 + 2, array.computeIndex(new int[] - { 1, 3, 2 })); - assertTrue(Arrays.toString(array.computeReverseIndex(3 * 7 * 1 + 3 * 3 + 2)), - Arrays.equals(new int[] - { 1, 3, 2 }, array.computeReverseIndex(3 * 7 * 1 + 3 * 3 + 2))); - } - - @Test - public void testComputeIndex2D() - { - MDArray<Object> array; - array = new MDArray<Object>(Object.class, new int[] - { 100, 10 }); - assertEquals(array.computeIndex(new int[] - { 5, 8, }), array.computeIndex(5, 8)); - assertEquals(array.computeIndex(new int[] - { 9, 1, }), array.computeIndex(9, 1)); - array = new MDArray<Object>(Object.class, new int[] - { 101, 11 }); - assertEquals(array.computeIndex(new int[] - { 5, 8, }), array.computeIndex(5, 8)); - assertEquals(array.computeIndex(new int[] - { 9, 1, }), array.computeIndex(9, 1)); - } - - @Test - public void testComputeIndex3() - { - MDArray<Object> array; - array = new MDArray<Object>(Object.class, new int[] - { 100, 10, 17 }); - assertEquals(array.computeIndex(new int[] - { 5, 8, 16 }), array.computeIndex(5, 8, 16)); - assertEquals(array.computeIndex(new int[] - { 9, 1, 5 }), array.computeIndex(9, 1, 5)); - array = new MDArray<Object>(Object.class, new int[] - { 101, 11, 3 }); - assertEquals(array.computeIndex(new int[] - { 5, 8, 0 }), array.computeIndex(5, 8, 0)); - assertEquals(array.computeIndex(new int[] - { 9, 1, 2 }), array.computeIndex(9, 1, 2)); - } - - @Test - public void testEmptyMatrix() - { - final MDFloatArray arr = new MDFloatArray(new float[0][0]); - assertEquals(0, arr.dimensions()[0]); - assertEquals(0, arr.dimensions()[1]); - } - - @Test - public void testChangeHyperRowCountIntArray() - { - final MDIntArray arr = new MDIntArray(new int[] - { 2, 2 }, 3); - assertEquals(2, arr.dimensions[0]); - assertEquals(2, arr.dimensions[1]); - arr.set(1, 0, 0); - arr.set(2, 0, 1); - arr.set(3, 1, 0); - arr.set(4, 1, 1); - - final MDIntArray arr2 = new MDIntArray(arr.getCopyAsFlatArray(), arr.dimensions()); - assertTrue(arr2.equals(arr)); - - arr.incNumberOfHyperRows(1); - assertEquals(3, arr.dimensions[0]); - assertEquals(1, arr.get(0, 0)); - assertEquals(2, arr.get(0, 1)); - assertEquals(3, arr.get(1, 0)); - assertEquals(4, arr.get(1, 1)); - arr.set(5, 2, 0); - arr.set(6, 2, 1); - arr.incNumberOfHyperRows(2); - assertEquals(5, arr.dimensions[0]); - assertEquals(1, arr.get(0, 0)); - assertEquals(2, arr.get(0, 1)); - assertEquals(3, arr.get(1, 0)); - assertEquals(4, arr.get(1, 1)); - assertEquals(5, arr.get(2, 0)); - assertEquals(6, arr.get(2, 1)); - arr.set(7, 3, 0); - arr.set(8, 3, 1); - arr.decNumberOfHyperRows(1); - assertEquals(4, arr.dimensions[0]); - assertEquals(1, arr.get(0, 0)); - assertEquals(2, arr.get(0, 1)); - assertEquals(3, arr.get(1, 0)); - assertEquals(4, arr.get(1, 1)); - assertEquals(5, arr.get(2, 0)); - assertEquals(6, arr.get(2, 1)); - assertEquals(7, arr.get(3, 0)); - assertEquals(8, arr.get(3, 1)); - } - - @Test - public void testChangeHyperRowCountIntArrayFromZero() - { - final MDIntArray arr = new MDIntArray(new int[] - { 0 }); - assertEquals(0, arr.size(0)); - arr.incNumberOfHyperRows(1); - assertEquals(1, arr.size(0)); - arr.set(17, 0); - assertEquals(17, arr.get(0)); - arr.incNumberOfHyperRows(1); - arr.incNumberOfHyperRows(1); - assertEquals(3, arr.size()); - } - - @Test - public void testChangeHyperRowCountTArray() - { - final MDArray<Integer> arr = new MDArray<Integer>(Integer.class, new int[] - { 2, 2 }, 3); - assertEquals(2, arr.dimensions[0]); - assertEquals(2, arr.dimensions[1]); - arr.set(1, 0, 0); - arr.set(2, 0, 1); - arr.set(3, 1, 0); - arr.set(4, 1, 1); - arr.incNumberOfHyperRows(1); - assertEquals(3, arr.dimensions[0]); - assertEquals(1, (int) arr.get(0, 0)); - assertEquals(2, (int) arr.get(0, 1)); - assertEquals(3, (int) arr.get(1, 0)); - assertEquals(4, (int) arr.get(1, 1)); - arr.set(5, 2, 0); - arr.set(6, 2, 1); - arr.incNumberOfHyperRows(2); - assertEquals(5, arr.dimensions[0]); - assertEquals(1, (int) arr.get(0, 0)); - assertEquals(2, (int) arr.get(0, 1)); - assertEquals(3, (int) arr.get(1, 0)); - assertEquals(4, (int) arr.get(1, 1)); - assertEquals(5, (int) arr.get(2, 0)); - assertEquals(6, (int) arr.get(2, 1)); - arr.set(7, 3, 0); - arr.set(8, 3, 1); - arr.decNumberOfHyperRows(1); - assertEquals(4, arr.dimensions[0]); - assertEquals(1, (int) arr.get(0, 0)); - assertEquals(2, (int) arr.get(0, 1)); - assertEquals(3, (int) arr.get(1, 0)); - assertEquals(4, (int) arr.get(1, 1)); - assertEquals(5, (int) arr.get(2, 0)); - assertEquals(6, (int) arr.get(2, 1)); - assertEquals(7, (int) arr.get(3, 0)); - assertEquals(8, (int) arr.get(3, 1)); - } - - @Test - public void testMDIntArrayIterator() - { - final int[] linArray = new int[120]; - for (int i = 0; i < linArray.length; ++i) - { - linArray[i] = i; - } - final MDIntArray array = new MDIntArray(linArray, new int[] - { 2, 3, 4, 5 }); - for (MDIntArray.ArrayEntry e : array) - { - assertEquals(e.getLinearIndex(), e.getValue().intValue()); - assertEquals(e.getLinearIndex(), array.computeIndex(e.getIndex())); - } - } - - @Test - public void testMDFloatArrayMatrix() - { - final float[][] matrix1 = new float[][] - { - { 1f, 2f, 3f, 4f }, - { 5f, 6f, 7f, 8f }, - { 9f, 10f, 11f, 12f } }; - final MDFloatArray array = new MDFloatArray(matrix1); - assertEquals(2, array.rank()); - assertEquals(12, array.size()); - assertEquals(3, array.size(0)); - assertEquals(4, array.size(1)); - assertEquals(7f, array.get(1, 2)); - final float[][] matrix2 = array.toMatrix(); - assertEquals(matrix1.length, matrix2.length); - for (int i = 0; i < matrix1.length; ++i) - { - assertTrue(Arrays.equals(matrix1[i], matrix2[i])); - } - } - - public static void main(String[] args) throws Throwable - { - System.out.println(BuildAndEnvironmentInfo.INSTANCE); - System.out.println("Test class: " + MDArrayTests.class.getSimpleName()); - System.out.println(); - final MDArrayTests test = new MDArrayTests(); - for (Method m : MDArrayTests.class.getMethods()) - { - final Test testAnnotation = m.getAnnotation(Test.class); - if (testAnnotation == null) - { - continue; - } - if (m.getParameterTypes().length == 0) - { - System.out.println("Running " + m.getName()); - try - { - m.invoke(test); - } catch (InvocationTargetException wrapperThrowable) - { - final Throwable th = wrapperThrowable.getCause(); - boolean exceptionFound = false; - for (Class<?> expectedExClazz : testAnnotation.expectedExceptions()) - { - if (expectedExClazz == th.getClass()) - { - exceptionFound = true; - break; - } - } - if (exceptionFound == false) - { - throw th; - } - } - } - } - System.out.println("Tests OK!"); - } - -} diff --git a/base/sourceTest/java/ch/systemsx/cisd/base/namedthread/NamingThreadPoolExecutorTest.java b/base/sourceTest/java/ch/systemsx/cisd/base/namedthread/NamingThreadPoolExecutorTest.java deleted file mode 100644 index 582a02aebccb10bb73f911c6391d7e0f1d9ee638..0000000000000000000000000000000000000000 --- a/base/sourceTest/java/ch/systemsx/cisd/base/namedthread/NamingThreadPoolExecutorTest.java +++ /dev/null @@ -1,481 +0,0 @@ -/* - * Copyright 2008 ETH Zuerich, CISD - * - * 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. - */ - -package ch.systemsx.cisd.base.namedthread; - -import static org.testng.AssertJUnit.assertEquals; -import static org.testng.AssertJUnit.assertFalse; -import static org.testng.AssertJUnit.assertTrue; -import static org.testng.AssertJUnit.fail; - -import java.lang.reflect.InvocationTargetException; -import java.lang.reflect.Method; -import java.util.Collections; -import java.util.HashSet; -import java.util.Set; -import java.util.concurrent.Callable; -import java.util.concurrent.ExecutionException; -import java.util.concurrent.Future; -import java.util.concurrent.Semaphore; -import java.util.concurrent.ThreadFactory; -import java.util.concurrent.ThreadPoolExecutor; -import java.util.concurrent.TimeUnit; - -import org.testng.annotations.Test; - -import ch.systemsx.cisd.base.BuildAndEnvironmentInfo; -import ch.systemsx.cisd.base.tests.Retry10; - -/** - * Test cases for the {@link NamingThreadPoolExecutor}. - * - * @author Bernd Rinn - */ -public class NamingThreadPoolExecutorTest -{ - - private final static String name = "This is the pool name"; - - @Test - public void testNamedPool() throws Throwable - { - final ThreadPoolExecutor eservice = - new NamingThreadPoolExecutor(name).corePoolSize(1).maximumPoolSize(2).daemonize(); - assertEquals(1, eservice.getCorePoolSize()); - assertEquals(2, eservice.getMaximumPoolSize()); - final Future<?> future = eservice.submit(new Runnable() - { - @Override - public void run() - { - assertEquals(name + "-T1", Thread.currentThread().getName()); - } - }); - try - { - future.get(200L, TimeUnit.MILLISECONDS); - } catch (ExecutionException ex) - { - throw ex.getCause(); - } - } - - @Test - public void testDaemonize() - { - final NamingThreadPoolExecutor eservice = - new NamingThreadPoolExecutor(name).corePoolSize(1).maximumPoolSize(2); - assertFalse(eservice.getThreadFactory().isCreateDaemonThreads()); - eservice.daemonize(); - assertTrue(eservice.getThreadFactory().isCreateDaemonThreads()); - } - - @Test - public void testSetNamedThreadFactory() - { - final NamingThreadPoolExecutor eservice = - new NamingThreadPoolExecutor(name).corePoolSize(1).maximumPoolSize(2).daemonize(); - final NamingThreadFactory factory = new NamingThreadFactory("name"); - eservice.setThreadFactory(factory); - assertEquals(factory, eservice.getThreadFactory()); - } - - @Test - public void testSetThreadFactory() - { - final ThreadPoolExecutor eservice = - new NamingThreadPoolExecutor(name).corePoolSize(1).maximumPoolSize(2).daemonize(); - final ThreadFactory factory = new NamingThreadFactory("name"); - eservice.setThreadFactory(factory); - assertEquals(factory, eservice.getThreadFactory()); - } - - @Test(expectedExceptions = IllegalArgumentException.class) - public void testSetThreadFactoryFailed() - { - final ThreadPoolExecutor eservice = - new NamingThreadPoolExecutor(name).corePoolSize(1).maximumPoolSize(2).daemonize(); - final ThreadFactory factory = new ThreadFactory() - { - @Override - public Thread newThread(Runnable r) - { - return null; // Doesn't matter, never used - } - }; - // It needs to be NamingThreadFactory, thus it will throw an IllegalArgumentException. - eservice.setThreadFactory(factory); - } - - @Test(groups = "slow") - public void testThreadDefaultNames() throws Throwable - { - final int max = 10; - final ThreadPoolExecutor eservice = - new NamingThreadPoolExecutor(name).corePoolSize(max).maximumPoolSize(max).daemonize(); - assertEquals(max, eservice.getCorePoolSize()); - assertEquals(max, eservice.getMaximumPoolSize()); - final Set<String> expectedThreadNameSet = new HashSet<String>(); - for (int i = 1; i <= max; ++i) - { - expectedThreadNameSet.add(name + "-T" + i); - } - final Set<String> threadNameSet = Collections.synchronizedSet(new HashSet<String>()); - final Set<Future<?>> futureSet = new HashSet<Future<?>>(); - for (int i = 0; i < max; ++i) - { - futureSet.add(eservice.submit(new Runnable() - { - @Override - public void run() - { - threadNameSet.add(Thread.currentThread().getName()); - try - { - Thread.sleep(20L); - } catch (InterruptedException ex) - { - fail("We got interrupted."); - } - } - })); - } - for (Future<?> future : futureSet) - { - try - { - future.get(400L, TimeUnit.MILLISECONDS); - } catch (ExecutionException ex) - { - throw ex.getCause(); - } - } - assertEquals(expectedThreadNameSet, threadNameSet); - } - - @Test(groups = "slow") - public void testSubmitNamedRunnable() throws Throwable - { - final String runnableName = "This is the special runnable name"; - final ThreadPoolExecutor eservice = - new NamingThreadPoolExecutor(name).corePoolSize(1).maximumPoolSize(1).daemonize(); - assertEquals(1, eservice.getCorePoolSize()); - assertEquals(1, eservice.getMaximumPoolSize()); - final Future<?> future = eservice.submit(new NamedRunnable() - { - @Override - public void run() - { - assertEquals(name + "-T1::" + runnableName, Thread.currentThread().getName()); - } - - @Override - public String getRunnableName() - { - return runnableName; - } - }); - try - { - future.get(200L, TimeUnit.MILLISECONDS); - } catch (ExecutionException ex) - { - throw ex.getCause(); - } - } - - @Test(groups = "slow") - public void testExecuteNamedRunnable() throws Throwable - { - final String runnableName = "This is the special runnable name"; - final ThreadPoolExecutor eservice = - new NamingThreadPoolExecutor(name).corePoolSize(1).maximumPoolSize(1).daemonize(); - assertEquals(1, eservice.getCorePoolSize()); - assertEquals(1, eservice.getMaximumPoolSize()); - final Semaphore sem = new Semaphore(0); - eservice.execute(new NamedRunnable() - { - @Override - public void run() - { - assertEquals(name + "-T1::" + runnableName, Thread.currentThread().getName()); - sem.release(); - } - - @Override - public String getRunnableName() - { - return runnableName; - } - }); - assertTrue(sem.tryAcquire(200L, TimeUnit.MILLISECONDS)); - } - - interface MyRunnable extends Runnable, IRunnableNameProvider - { - } - - @Test(groups = "slow") - public void testExecuteNamedMyRunnable() throws Throwable - { - final String runnableName = "This is the special runnable name"; - final ThreadPoolExecutor eservice = - new NamingThreadPoolExecutor(name).corePoolSize(1).maximumPoolSize(1).daemonize(); - assertEquals(1, eservice.getCorePoolSize()); - assertEquals(1, eservice.getMaximumPoolSize()); - final Semaphore sem = new Semaphore(0); - eservice.execute(new MyRunnable() - { - @Override - public void run() - { - assertEquals(name + "-T1::" + runnableName, Thread.currentThread().getName()); - sem.release(); - } - - @Override - public String getRunnableName() - { - return runnableName; - } - }); - assertTrue(sem.tryAcquire(200L, TimeUnit.MILLISECONDS)); - } - - @Test(groups = "slow") - public void testSubmitNamedCallable() throws Throwable - { - final String callableName = "This is the special callable name"; - final ThreadPoolExecutor eservice = - new NamingThreadPoolExecutor(name).corePoolSize(1).maximumPoolSize(1).daemonize(); - assertEquals(1, eservice.getCorePoolSize()); - assertEquals(1, eservice.getMaximumPoolSize()); - final Future<?> future = eservice.submit(new NamedCallable<Object>() - { - @Override - public Object call() throws Exception - { - assertEquals(name + "-T1::" + callableName, Thread.currentThread().getName()); - return null; - } - - @Override - public String getCallableName() - { - return callableName; - } - }); - try - { - future.get(200L, TimeUnit.MILLISECONDS); - } catch (ExecutionException ex) - { - throw ex.getCause(); - } - } - - interface MyCallable extends Callable<Object>, ICallableNameProvider - { - } - - @Test(groups = "slow") - public void testSubmitMyNamedCallable() throws Throwable - { - final String callableName = "This is the special callable name"; - final ThreadPoolExecutor eservice = - new NamingThreadPoolExecutor(name).corePoolSize(1).maximumPoolSize(1).daemonize(); - assertEquals(1, eservice.getCorePoolSize()); - assertEquals(1, eservice.getMaximumPoolSize()); - final Future<?> future = eservice.submit(new MyCallable() - { - @Override - public Object call() throws Exception - { - assertEquals(name + "-T1::" + callableName, Thread.currentThread().getName()); - return null; - } - - @Override - public String getCallableName() - { - return callableName; - } - }); - try - { - future.get(200L, TimeUnit.MILLISECONDS); - } catch (ExecutionException ex) - { - throw ex.getCause(); - } - } - - @Test(groups = "slow", retryAnalyzer = Retry10.class) - public void testSubmitNamedCallables() throws Throwable - { - final String callableName1 = "This is the first special callable name"; - final ThreadPoolExecutor eservice = - new NamingThreadPoolExecutor(name).corePoolSize(1).maximumPoolSize(1).daemonize(); - assertEquals(1, eservice.getCorePoolSize()); - assertEquals(1, eservice.getMaximumPoolSize()); - final Future<?> future1 = eservice.submit(new NamedCallable<Object>() - { - @Override - public Object call() throws Exception - { - assertEquals(name + "-T1::" + callableName1, Thread.currentThread().getName()); - return null; - } - - @Override - public String getCallableName() - { - return callableName1; - } - }); - try - { - future1.get(200L, TimeUnit.MILLISECONDS); - } catch (ExecutionException ex) - { - throw ex.getCause(); - } - // On Linux x64, Java 1.6 we get a RejectedExecutionException if we continue immediately. - Thread.sleep(200L); - final String callableName2 = "This is the second special callable name"; - final Future<?> future2 = eservice.submit(new NamedCallable<Object>() - { - @Override - public Object call() throws Exception - { - assertEquals(name + "-T1::" + callableName2, Thread.currentThread().getName()); - return null; - } - - @Override - public String getCallableName() - { - return callableName2; - } - }); - try - { - future2.get(200L, TimeUnit.MILLISECONDS); - } catch (ExecutionException ex) - { - throw ex.getCause(); - } - } - - - @Test(groups = "slow", retryAnalyzer = Retry10.class) - public void testSubmitQueuedNamedCallables() throws Throwable - { - final String callableName1 = "This is the first special callable name"; - final ThreadPoolExecutor eservice = - new NamingThreadPoolExecutor(name, 1).corePoolSize(1).maximumPoolSize(1).daemonize(); - assertEquals(1, eservice.getCorePoolSize()); - assertEquals(1, eservice.getMaximumPoolSize()); - final Future<?> future1 = eservice.submit(new NamedCallable<Object>() - { - @Override - public Object call() throws Exception - { - assertEquals(name + "-T1::" + callableName1, Thread.currentThread().getName()); - Thread.sleep(100L); - return null; - } - - @Override - public String getCallableName() - { - return callableName1; - } - }); - final Future<?> future2 = eservice.submit(new NamedCallable<Object>() - { - @Override - public Object call() throws Exception - { - assertEquals(name + "-T1::" + callableName1, Thread.currentThread().getName()); - Thread.sleep(100L); - return null; - } - - @Override - public String getCallableName() - { - return callableName1; - } - }); - try - { - future1.get(200L, TimeUnit.MILLISECONDS); - } catch (ExecutionException ex) - { - throw ex.getCause(); - } - try - { - future2.get(200L, TimeUnit.MILLISECONDS); - } catch (ExecutionException ex) - { - throw ex.getCause(); - } - } - - public static void main(String[] args) throws Throwable - { - System.out.println(BuildAndEnvironmentInfo.INSTANCE); - System.out.println("Test class: " + NamingThreadPoolExecutorTest.class.getSimpleName()); - System.out.println(); - final NamingThreadPoolExecutorTest test = new NamingThreadPoolExecutorTest(); - for (Method m : NamingThreadPoolExecutorTest.class.getMethods()) - { - final Test testAnnotation = m.getAnnotation(Test.class); - if (testAnnotation == null) - { - continue; - } - if (m.getParameterTypes().length == 0) - { - System.out.println("Running " + m.getName()); - try - { - m.invoke(test); - } catch (InvocationTargetException wrapperThrowable) - { - final Throwable th = wrapperThrowable.getCause(); - boolean exceptionFound = false; - for (Class<?> expectedExClazz : testAnnotation.expectedExceptions()) - { - if (expectedExClazz == th.getClass()) - { - exceptionFound = true; - break; - } - } - if (exceptionFound == false) - { - throw th; - } - } - } - } - System.out.println("Tests OK!"); - } - -} diff --git a/base/sourceTest/java/ch/systemsx/cisd/base/unix/UnixTests.java b/base/sourceTest/java/ch/systemsx/cisd/base/unix/UnixTests.java deleted file mode 100644 index 33714885700ddbd3b0d778180d22986b7e2f21cc..0000000000000000000000000000000000000000 --- a/base/sourceTest/java/ch/systemsx/cisd/base/unix/UnixTests.java +++ /dev/null @@ -1,351 +0,0 @@ -/* - * Copyright 2008 ETH Zuerich, CISD - * - * 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. - */ - -package ch.systemsx.cisd.base.unix; - -import java.io.File; -import java.io.IOException; -import java.lang.reflect.InvocationTargetException; -import java.lang.reflect.Method; - -import org.apache.commons.io.FileUtils; -import org.testng.annotations.Test; - -import ch.rinn.restrictions.Friend; -import ch.systemsx.cisd.base.BuildAndEnvironmentInfo; -import ch.systemsx.cisd.base.tests.AbstractFileSystemTestCase; -import ch.systemsx.cisd.base.unix.Unix.Group; -import ch.systemsx.cisd.base.unix.Unix.Password; -import ch.systemsx.cisd.base.unix.Unix.Stat; - -/** - * Test cases for the {@link Unix} system calls. - * - * @author Bernd Rinn - */ -@Friend(toClasses = Unix.class) -public class UnixTests extends AbstractFileSystemTestCase -{ - - @Test(groups = - { "requires_unix" }) - public void testGetLinkInfoRegularFile() throws IOException - { - final short accessMode = (short) 0777; - final String content = "someText\n"; - final File f = new File(workingDirectory, "someFile"); - FileUtils.writeStringToFile(f, content); - Unix.setAccessMode(f.getAbsolutePath(), accessMode); - final Stat info = Unix.getLinkInfo(f.getAbsolutePath()); - Unix.setOwner(f.getAbsolutePath(), info.getUid(), info.getGid()); - assertEquals(1, info.getNumberOfHardLinks()); - assertEquals(content.length(), info.getSize()); - assertEquals(accessMode, info.getPermissions()); - assertEquals("root", Unix.tryGetUserNameForUid(0)); - assertEquals(FileLinkType.REGULAR_FILE, info.getLinkType()); - assertFalse(info.isSymbolicLink()); - assertEquals(f.lastModified(), 1000 * info.getLastModified()); - } - - @Test(groups = - { "requires_unix" }, expectedExceptions = NullPointerException.class) - public void testGetLinkNull() throws IOException - { - Unix.getLinkInfo(null); - } - - @Test(groups = - { "requires_unix" }) - public void testGetLinkInfoDirectory() throws IOException - { - final File d = new File(workingDirectory, "someDir"); - d.mkdir(); - final Stat info = Unix.getLinkInfo(d.getAbsolutePath()); - assertEquals(2, info.getNumberOfHardLinks()); - assertEquals(FileLinkType.DIRECTORY, info.getLinkType()); - assertFalse(info.isSymbolicLink()); - } - - @Test(groups = - { "requires_unix" }) - public void testGetLinkInfoSymLink() throws IOException - { - final File f = new File(workingDirectory, "someOtherFile"); - final String content = "someMoreText\n"; - FileUtils.writeStringToFile(f, content); - final File s = new File(workingDirectory, "someLink"); - Unix.createSymbolicLink(f.getAbsolutePath(), s.getAbsolutePath()); - final Stat info = Unix.getLinkInfo(s.getAbsolutePath()); - assertEquals(1, info.getNumberOfHardLinks()); - assertEquals(FileLinkType.SYMLINK, info.getLinkType()); - assertTrue(info.isSymbolicLink()); - assertEquals(f.getAbsolutePath(), info.tryGetSymbolicLink()); - assertEquals(f.getAbsolutePath(), Unix.tryReadSymbolicLink(s.getAbsolutePath())); - assertNull(Unix.getLinkInfo(s.getAbsolutePath(), false).tryGetSymbolicLink()); - - final Stat info2 = Unix.getFileInfo(s.getAbsolutePath()); - assertEquals(1, info2.getNumberOfHardLinks()); - assertEquals(content.length(), info2.getSize()); - assertEquals(FileLinkType.REGULAR_FILE, info2.getLinkType()); - assertFalse(info2.isSymbolicLink()); - assertNull(info2.tryGetSymbolicLink()); - } - - @Test(groups = - { "requires_unix" }) - public void testGetLinkInfoSymLinkDanglingLink() throws IOException - { - final File s = new File(workingDirectory, "someDanglingLink"); - Unix.createSymbolicLink("link_to_nowhere", s.getAbsolutePath()); - final Stat info = Unix.tryGetLinkInfo(s.getAbsolutePath()); - assertNotNull(info); - assertEquals(1, info.getNumberOfHardLinks()); - assertEquals(FileLinkType.SYMLINK, info.getLinkType()); - assertTrue(info.isSymbolicLink()); - final Stat info2 = Unix.tryGetFileInfo(s.getAbsolutePath()); - assertNull(info2); - assertEquals("No such file or directory", Unix.getLastError()); - } - - @Test(groups = - { "requires_unix" }) - public void testGetLinkInfoNonExistent() throws IOException - { - final File s = new File(workingDirectory, "nonExistent"); - final Stat info = Unix.tryGetLinkInfo(s.getAbsolutePath()); - assertNull(info); - assertEquals("No such file or directory", Unix.getLastError()); - final Stat info2 = Unix.tryGetFileInfo(s.getAbsolutePath()); - assertNull(info2); - assertEquals("No such file or directory", Unix.getLastError()); - } - - @Test(groups = - { "requires_unix" }, expectedExceptions = NullPointerException.class) - public void testCreateSymbolicLinkNull() throws IOException - { - Unix.createSymbolicLink(null, null); - } - - @Test(groups = - { "requires_unix" }, expectedExceptions = NullPointerException.class) - public void testCreateHardLinkNull() throws IOException - { - Unix.createHardLink(null, null); - } - - @Test(groups = - { "requires_unix" }) - public void testGetLinkInfoHardLink() throws IOException - { - final File f = new File(workingDirectory, "someOtherFile"); - f.createNewFile(); - final File s = new File(workingDirectory, "someLink"); - Unix.createHardLink(f.getAbsolutePath(), s.getAbsolutePath()); - final Stat info = Unix.getLinkInfo(s.getAbsolutePath()); - assertEquals(2, info.getNumberOfHardLinks()); - assertEquals(FileLinkType.REGULAR_FILE, info.getLinkType()); - assertFalse(info.isSymbolicLink()); - assertNull(info.tryGetSymbolicLink()); - } - - @Test(groups = - { "requires_unix" }) - public void testGetUid() - { - assertTrue(Unix.getUid() > 0); - } - - @Test(groups = - { "requires_unix" }) - public void testGetEuid() - { - assertTrue(Unix.getEuid() > 0); - assertEquals(Unix.getUid(), Unix.getEuid()); - } - - @Test(groups = - { "requires_unix" }) - public void testGetGid() - { - assertTrue(Unix.getGid() > 0); - } - - @Test(groups = - { "requires_unix" }) - public void testGetEgid() - { - assertTrue(Unix.getEgid() > 0); - assertEquals(Unix.getGid(), Unix.getEgid()); - } - - @Test(groups = - { "requires_unix" }) - public void testGetUidForUserName() - { - assertEquals(0, Unix.getUidForUserName("root")); - } - - @Test(groups = - { "requires_unix" }, expectedExceptions = NullPointerException.class) - public void testGetUidForUserNameNull() throws IOException - { - Unix.getUidForUserName(null); - } - - @Test(groups = - { "requires_unix" }) - public void testGetGidForGroupName() - { - final String rootGroup = Unix.tryGetGroupNameForGid(0); - assertTrue(rootGroup, "root".equals(rootGroup) || "wheel".equals(rootGroup)); - assertEquals(0, Unix.getGidForGroupName(rootGroup)); - } - - @Test(groups = - { "requires_unix" }, expectedExceptions = NullPointerException.class) - public void testGetGidForGroupNameNull() throws IOException - { - Unix.getGidForGroupName(null); - } - - @Test(groups = - { "requires_unix" }) - public void testTryGetGroupByName() - { - final String rootGroup = Unix.tryGetGroupNameForGid(0); - final Group group = Unix.tryGetGroupByName(rootGroup); - assertNotNull(group); - assertEquals(rootGroup, group.getGroupName()); - assertEquals(0, group.getGid()); - assertNotNull(group.getGroupMembers()); - } - - @Test(groups = - { "requires_unix" }, expectedExceptions = NullPointerException.class) - public void testTryGetGroupByNameNull() throws IOException - { - Unix.tryGetGroupByName(null); - } - - @Test(groups = - { "requires_unix" }) - public void testTryGetGroupByGid() - { - final Group group = Unix.tryGetGroupByGid(0); - assertNotNull(group); - final String rootGroup = group.getGroupName(); - assertTrue(rootGroup, "root".equals(rootGroup) || "wheel".equals(rootGroup)); - assertEquals(0, group.getGid()); - assertNotNull(group.getGroupMembers()); - } - - @Test(groups = - { "requires_unix" }) - public void testTryGetUserByName() - { - final Password user = Unix.tryGetUserByName("root"); - assertNotNull(user); - assertEquals("root", user.getUserName()); - assertEquals(0, user.getUid()); - assertEquals(0, user.getGid()); - assertNotNull(user.getUserFullName()); - assertNotNull(user.getHomeDirectory()); - assertNotNull(user.getShell()); - assertTrue(user.getShell().startsWith("/")); - } - - @Test(groups = - { "requires_unix" }, expectedExceptions = NullPointerException.class) - public void testTryGetUserByNameNull() throws IOException - { - Unix.tryGetUserByName(null); - } - - @Test(groups = - { "requires_unix" }) - public void testTryGetUserByUid() - { - final Password user = Unix.tryGetUserByUid(0); - assertNotNull(user); - assertEquals("root", user.getUserName()); - assertEquals(0, user.getUid()); - assertEquals(0, user.getGid()); - assertNotNull(user.getUserFullName()); - assertNotNull(user.getHomeDirectory()); - assertNotNull(user.getShell()); - assertTrue(user.getShell().startsWith("/")); - } - - @Test(groups = - { "requires_unix" }) - public void testDetectProcess() - { - assertTrue(Unix.canDetectProcesses()); - assertTrue(Unix.isProcessRunningPS(Unix.getPid())); - } - - public static void main(String[] args) throws Throwable - { - System.out.println(BuildAndEnvironmentInfo.INSTANCE); - System.out.println("Test class: " + UnixTests.class.getSimpleName()); - System.out.println(); - if (Unix.isOperational() == false) - { - System.err.println("No unix library found."); - System.exit(1); - } - final UnixTests test = new UnixTests(); - try - { - for (Method m : UnixTests.class.getMethods()) - { - final Test testAnnotation = m.getAnnotation(Test.class); - if (testAnnotation == null) - { - continue; - } - System.out.println("Running " + m.getName()); - test.setUp(); - try - { - m.invoke(test); - } catch (InvocationTargetException wrapperThrowable) - { - final Throwable th = wrapperThrowable.getCause(); - boolean exceptionFound = false; - for (Class<?> expectedExClazz : testAnnotation.expectedExceptions()) - { - if (expectedExClazz == th.getClass()) - { - exceptionFound = true; - break; - } - } - if (exceptionFound == false) - { - throw th; - } - } - } - System.out.println("Tests OK!"); - } finally - { - test.afterClass(); - } - } - -} diff --git a/base/sourceTest/java/tests.xml b/base/sourceTest/java/tests.xml deleted file mode 100644 index 0a6ff5bdd40eb771c41d2d694e989a7d92957f58..0000000000000000000000000000000000000000 --- a/base/sourceTest/java/tests.xml +++ /dev/null @@ -1,12 +0,0 @@ -<suite name="All" verbose="1"> - <test name="All"> - <groups> - <run> - <exclude name="broken" /> - </run> - </groups> - <packages> - <package name="ch.systemsx.cisd.base.*" /> - </packages> - </test> -</suite> diff --git a/microservice-server/.gitignore b/big_data_link_server/.gitignore similarity index 100% rename from microservice-server/.gitignore rename to big_data_link_server/.gitignore diff --git a/microservice-server/README.md b/big_data_link_server/README.md similarity index 98% rename from microservice-server/README.md rename to big_data_link_server/README.md index d7dcb22b8631c79d9433a3bfbbbaa53de520fb14..e7b846c3697d25f6ed79cd2e15f10823797bf5d3 100644 --- a/microservice-server/README.md +++ b/big_data_link_server/README.md @@ -12,13 +12,13 @@ A json file with the configuration should be given during the startup as an argu ./gradlew distZip -The build will be found at ./build/distributions/microservice-server.zip +The build will be found at ./build/distributions/big_data_link_server.zip ## Startup ## Unzip the build and execute -./bin/microservice-server +./bin/big_data_link_server ## Main packages ## diff --git a/microservice-server/build.gradle b/big_data_link_server/build.gradle similarity index 92% rename from microservice-server/build.gradle rename to big_data_link_server/build.gradle index 8b613b08ab52f702a7c241de1661191a14e53fa3..174044d4a72831451fdd0f83ab8fd44d1c2e20fb 100644 --- a/microservice-server/build.gradle +++ b/big_data_link_server/build.gradle @@ -32,4 +32,8 @@ distZip { from './conf' include '*' } + into(project.name) { + from './' + include 'README.md' + } } \ No newline at end of file diff --git a/microservice-server/conf/config.json b/big_data_link_server/conf/config.json similarity index 100% rename from microservice-server/conf/config.json rename to big_data_link_server/conf/config.json diff --git a/microservice-server/config.json b/big_data_link_server/config.json similarity index 73% rename from microservice-server/config.json rename to big_data_link_server/config.json index 44f4444e74b4c2bac44e55f10ee11c2c28a26f4f..04fd8cc316d97c0fdaeca7fc48a5d5646f7e33fb 100644 --- a/microservice-server/config.json +++ b/big_data_link_server/config.json @@ -8,8 +8,8 @@ "openbis-url" : "http://localhost:8888/openbis/openbis/rmi-application-server-v3", "datastore-url" : "http://localhost:8889/datastore_server/rmi-data-store-server-v3", "services-timeout" : "10000", - "allowedExternalDMSCode" : "ADMIN-BS-MBPR28.D.ETHZ.CH-E96954A7", - "allowedContentCopyPath" : "/Users/localadmin/obis_data/" + "allowedExternalDMSCode" : "ADMIN-BSSE-BS-DOCK-DHCP-033.ETHZ.CH-14597944", + "allowedContentCopyPath" : "/Users/ynoir/obis_data/" } }, { @@ -19,8 +19,8 @@ "openbis-url" : "http://localhost:8888/openbis/openbis/rmi-application-server-v3", "datastore-url" : "http://localhost:8889/datastore_server/rmi-data-store-server-v3", "services-timeout" : "10000", - "allowedExternalDMSCode" : "ADMIN-BS-MBPR28.D.ETHZ.CH-E96954A7", - "allowedContentCopyPath" : "/Users/localadmin/obis_data/" + "allowedExternalDMSCode" : "ADMIN-BSSE-BS-DOCK-DHCP-033.ETHZ.CH-14597944", + "allowedContentCopyPath" : "/Users/ynoir/obis_data/" } } ] diff --git a/microservice-server/gradle/wrapper/gradle-wrapper.jar b/big_data_link_server/gradle/wrapper/gradle-wrapper.jar similarity index 100% rename from microservice-server/gradle/wrapper/gradle-wrapper.jar rename to big_data_link_server/gradle/wrapper/gradle-wrapper.jar diff --git a/microservice-server/gradle/wrapper/gradle-wrapper.properties b/big_data_link_server/gradle/wrapper/gradle-wrapper.properties similarity index 100% rename from microservice-server/gradle/wrapper/gradle-wrapper.properties rename to big_data_link_server/gradle/wrapper/gradle-wrapper.properties diff --git a/base/gradlew b/big_data_link_server/gradlew similarity index 100% rename from base/gradlew rename to big_data_link_server/gradlew diff --git a/base/gradlew.bat b/big_data_link_server/gradlew.bat similarity index 100% rename from base/gradlew.bat rename to big_data_link_server/gradlew.bat diff --git a/microservice-server/src/main/java/ch/ethz/sis/microservices/download/api/configuration/Config.java b/big_data_link_server/src/main/java/ch/ethz/sis/microservices/download/api/configuration/Config.java similarity index 100% rename from microservice-server/src/main/java/ch/ethz/sis/microservices/download/api/configuration/Config.java rename to big_data_link_server/src/main/java/ch/ethz/sis/microservices/download/api/configuration/Config.java diff --git a/microservice-server/src/main/java/ch/ethz/sis/microservices/download/api/configuration/ServiceConfig.java b/big_data_link_server/src/main/java/ch/ethz/sis/microservices/download/api/configuration/ServiceConfig.java similarity index 100% rename from microservice-server/src/main/java/ch/ethz/sis/microservices/download/api/configuration/ServiceConfig.java rename to big_data_link_server/src/main/java/ch/ethz/sis/microservices/download/api/configuration/ServiceConfig.java diff --git a/microservice-server/src/main/java/ch/ethz/sis/microservices/download/server/json/JSONObjectMapper.java b/big_data_link_server/src/main/java/ch/ethz/sis/microservices/download/server/json/JSONObjectMapper.java similarity index 100% rename from microservice-server/src/main/java/ch/ethz/sis/microservices/download/server/json/JSONObjectMapper.java rename to big_data_link_server/src/main/java/ch/ethz/sis/microservices/download/server/json/JSONObjectMapper.java diff --git a/microservice-server/src/main/java/ch/ethz/sis/microservices/download/server/json/jackson/JacksonObjectMapper.java b/big_data_link_server/src/main/java/ch/ethz/sis/microservices/download/server/json/jackson/JacksonObjectMapper.java similarity index 100% rename from microservice-server/src/main/java/ch/ethz/sis/microservices/download/server/json/jackson/JacksonObjectMapper.java rename to big_data_link_server/src/main/java/ch/ethz/sis/microservices/download/server/json/jackson/JacksonObjectMapper.java diff --git a/microservice-server/src/main/java/ch/ethz/sis/microservices/download/server/logging/LogFactory.java b/big_data_link_server/src/main/java/ch/ethz/sis/microservices/download/server/logging/LogFactory.java similarity index 100% rename from microservice-server/src/main/java/ch/ethz/sis/microservices/download/server/logging/LogFactory.java rename to big_data_link_server/src/main/java/ch/ethz/sis/microservices/download/server/logging/LogFactory.java diff --git a/microservice-server/src/main/java/ch/ethz/sis/microservices/download/server/logging/LogFactoryFactory.java b/big_data_link_server/src/main/java/ch/ethz/sis/microservices/download/server/logging/LogFactoryFactory.java similarity index 100% rename from microservice-server/src/main/java/ch/ethz/sis/microservices/download/server/logging/LogFactoryFactory.java rename to big_data_link_server/src/main/java/ch/ethz/sis/microservices/download/server/logging/LogFactoryFactory.java diff --git a/microservice-server/src/main/java/ch/ethz/sis/microservices/download/server/logging/LogManager.java b/big_data_link_server/src/main/java/ch/ethz/sis/microservices/download/server/logging/LogManager.java similarity index 100% rename from microservice-server/src/main/java/ch/ethz/sis/microservices/download/server/logging/LogManager.java rename to big_data_link_server/src/main/java/ch/ethz/sis/microservices/download/server/logging/LogManager.java diff --git a/microservice-server/src/main/java/ch/ethz/sis/microservices/download/server/logging/Logger.java b/big_data_link_server/src/main/java/ch/ethz/sis/microservices/download/server/logging/Logger.java similarity index 100% rename from microservice-server/src/main/java/ch/ethz/sis/microservices/download/server/logging/Logger.java rename to big_data_link_server/src/main/java/ch/ethz/sis/microservices/download/server/logging/Logger.java diff --git a/microservice-server/src/main/java/ch/ethz/sis/microservices/download/server/logging/log4j/Log4J2LogFactory.java b/big_data_link_server/src/main/java/ch/ethz/sis/microservices/download/server/logging/log4j/Log4J2LogFactory.java similarity index 100% rename from microservice-server/src/main/java/ch/ethz/sis/microservices/download/server/logging/log4j/Log4J2LogFactory.java rename to big_data_link_server/src/main/java/ch/ethz/sis/microservices/download/server/logging/log4j/Log4J2LogFactory.java diff --git a/microservice-server/src/main/java/ch/ethz/sis/microservices/download/server/logging/log4j/Log4JLogger.java b/big_data_link_server/src/main/java/ch/ethz/sis/microservices/download/server/logging/log4j/Log4JLogger.java similarity index 100% rename from microservice-server/src/main/java/ch/ethz/sis/microservices/download/server/logging/log4j/Log4JLogger.java rename to big_data_link_server/src/main/java/ch/ethz/sis/microservices/download/server/logging/log4j/Log4JLogger.java diff --git a/microservice-server/src/main/java/ch/ethz/sis/microservices/download/server/services/Service.java b/big_data_link_server/src/main/java/ch/ethz/sis/microservices/download/server/services/Service.java similarity index 100% rename from microservice-server/src/main/java/ch/ethz/sis/microservices/download/server/services/Service.java rename to big_data_link_server/src/main/java/ch/ethz/sis/microservices/download/server/services/Service.java diff --git a/microservice-server/src/main/java/ch/ethz/sis/microservices/download/server/services/store/AbstractFileServiceHandler.java b/big_data_link_server/src/main/java/ch/ethz/sis/microservices/download/server/services/store/AbstractFileServiceHandler.java similarity index 100% rename from microservice-server/src/main/java/ch/ethz/sis/microservices/download/server/services/store/AbstractFileServiceHandler.java rename to big_data_link_server/src/main/java/ch/ethz/sis/microservices/download/server/services/store/AbstractFileServiceHandler.java diff --git a/microservice-server/src/main/java/ch/ethz/sis/microservices/download/server/services/store/AbstractFileServiceTest.java b/big_data_link_server/src/main/java/ch/ethz/sis/microservices/download/server/services/store/AbstractFileServiceTest.java similarity index 100% rename from microservice-server/src/main/java/ch/ethz/sis/microservices/download/server/services/store/AbstractFileServiceTest.java rename to big_data_link_server/src/main/java/ch/ethz/sis/microservices/download/server/services/store/AbstractFileServiceTest.java diff --git a/microservice-server/src/main/java/ch/ethz/sis/microservices/download/server/services/store/DownloadHandler.java b/big_data_link_server/src/main/java/ch/ethz/sis/microservices/download/server/services/store/DownloadHandler.java similarity index 100% rename from microservice-server/src/main/java/ch/ethz/sis/microservices/download/server/services/store/DownloadHandler.java rename to big_data_link_server/src/main/java/ch/ethz/sis/microservices/download/server/services/store/DownloadHandler.java diff --git a/microservice-server/src/main/java/ch/ethz/sis/microservices/download/server/services/store/DownloadHandlerTest.java b/big_data_link_server/src/main/java/ch/ethz/sis/microservices/download/server/services/store/DownloadHandlerTest.java similarity index 100% rename from microservice-server/src/main/java/ch/ethz/sis/microservices/download/server/services/store/DownloadHandlerTest.java rename to big_data_link_server/src/main/java/ch/ethz/sis/microservices/download/server/services/store/DownloadHandlerTest.java diff --git a/microservice-server/src/main/java/ch/ethz/sis/microservices/download/server/services/store/DownloadHandlerWithOffsetTest.java b/big_data_link_server/src/main/java/ch/ethz/sis/microservices/download/server/services/store/DownloadHandlerWithOffsetTest.java similarity index 100% rename from microservice-server/src/main/java/ch/ethz/sis/microservices/download/server/services/store/DownloadHandlerWithOffsetTest.java rename to big_data_link_server/src/main/java/ch/ethz/sis/microservices/download/server/services/store/DownloadHandlerWithOffsetTest.java diff --git a/microservice-server/src/main/java/ch/ethz/sis/microservices/download/server/services/store/FileInfoHandler.java b/big_data_link_server/src/main/java/ch/ethz/sis/microservices/download/server/services/store/FileInfoHandler.java similarity index 100% rename from microservice-server/src/main/java/ch/ethz/sis/microservices/download/server/services/store/FileInfoHandler.java rename to big_data_link_server/src/main/java/ch/ethz/sis/microservices/download/server/services/store/FileInfoHandler.java diff --git a/microservice-server/src/main/java/ch/ethz/sis/microservices/download/server/services/store/FileInfoHandlerTest.java b/big_data_link_server/src/main/java/ch/ethz/sis/microservices/download/server/services/store/FileInfoHandlerTest.java similarity index 100% rename from microservice-server/src/main/java/ch/ethz/sis/microservices/download/server/services/store/FileInfoHandlerTest.java rename to big_data_link_server/src/main/java/ch/ethz/sis/microservices/download/server/services/store/FileInfoHandlerTest.java diff --git a/microservice-server/src/main/java/ch/ethz/sis/microservices/download/server/startup/HttpClient.java b/big_data_link_server/src/main/java/ch/ethz/sis/microservices/download/server/startup/HttpClient.java similarity index 100% rename from microservice-server/src/main/java/ch/ethz/sis/microservices/download/server/startup/HttpClient.java rename to big_data_link_server/src/main/java/ch/ethz/sis/microservices/download/server/startup/HttpClient.java diff --git a/microservice-server/src/main/java/ch/ethz/sis/microservices/download/server/startup/Main.java b/big_data_link_server/src/main/java/ch/ethz/sis/microservices/download/server/startup/Main.java similarity index 100% rename from microservice-server/src/main/java/ch/ethz/sis/microservices/download/server/startup/Main.java rename to big_data_link_server/src/main/java/ch/ethz/sis/microservices/download/server/startup/Main.java diff --git a/microservice-server/src/main/java/ch/ethz/sis/microservices/download/server/startup/ServerLauncher.java b/big_data_link_server/src/main/java/ch/ethz/sis/microservices/download/server/startup/ServerLauncher.java similarity index 100% rename from microservice-server/src/main/java/ch/ethz/sis/microservices/download/server/startup/ServerLauncher.java rename to big_data_link_server/src/main/java/ch/ethz/sis/microservices/download/server/startup/ServerLauncher.java diff --git a/datastore_server/resource/eclipse/Data Store Server.launch b/datastore_server/resource/eclipse/Data Store Server.launch index f4a22739a518ea019cada0f842b88f7825a07dd4..71a1d5c6adec331c71ab7321db339bb075d367fc 100644 --- a/datastore_server/resource/eclipse/Data Store Server.launch +++ b/datastore_server/resource/eclipse/Data Store Server.launch @@ -1,13 +1,14 @@ -<?xml version="1.0" encoding="UTF-8" standalone="no"?> -<launchConfiguration type="org.eclipse.jdt.launching.localJavaApplication"> -<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS"> -<listEntry value="/datastore_server/source/java/ch/systemsx/cisd/openbis/dss/generic/DataStoreServer.java"/> -</listAttribute> -<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES"> -<listEntry value="1"/> -</listAttribute> -<booleanAttribute key="org.eclipse.debug.core.appendEnvironmentVariables" value="true"/> -<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="ch.systemsx.cisd.openbis.dss.generic.DataStoreServer"/> -<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="datastore_server"/> -<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-ea -Dpython.path=../libraries/jython/jython-lib"/> -</launchConfiguration> +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<launchConfiguration type="org.eclipse.jdt.launching.localJavaApplication"> +<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS"> +<listEntry value="/datastore_server/source/java/ch/systemsx/cisd/openbis/dss/generic/DataStoreServer.java"/> +</listAttribute> +<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES"> +<listEntry value="1"/> +</listAttribute> +<booleanAttribute key="org.eclipse.debug.core.appendEnvironmentVariables" value="true"/> +<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="ch.systemsx.cisd.openbis.dss.generic.DataStoreServer"/> +<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="datastore_server"/> +<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-ea -Dpython.path=../libraries/jython/jython-lib"/> +<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-ea -Dpython.path=../libraries/jython/jython-lib -Dorg.eclipse.jetty.util.log.class=org.eclipse.jetty.util.log.StrErrLog"/> +</launchConfiguration> diff --git a/datastore_server/source/java/ch/ethz/sis/openbis/generic/server/dss/plugins/sync/common/MasterDataExtractor.java b/datastore_server/source/java/ch/ethz/sis/openbis/generic/server/dss/plugins/sync/common/MasterDataExtractor.java index 25602431e239705e119090c2142f4c575cd6ae9e..9a9f2ea10f731b6618d1e2becdf27b47ca5f5000 100644 --- a/datastore_server/source/java/ch/ethz/sis/openbis/generic/server/dss/plugins/sync/common/MasterDataExtractor.java +++ b/datastore_server/source/java/ch/ethz/sis/openbis/generic/server/dss/plugins/sync/common/MasterDataExtractor.java @@ -190,8 +190,10 @@ public class MasterDataExtractor { String code = (propertyTypeImmutable.isInternalNamespace() - && propertyTypeImmutable.getCode().startsWith(INTERNAL_NAMESPACE_PREFIX)) ? CodeConverter.tryToDatabase(propertyTypeImmutable - .getCode()) : propertyTypeImmutable.getCode(); + && propertyTypeImmutable.getCode().startsWith(INTERNAL_NAMESPACE_PREFIX)) + ? CodeConverter.tryToDatabase(propertyTypeImmutable + .getCode()) + : propertyTypeImmutable.getCode(); Element propertyTypeElement = doc.createElement("xmd:propertyType"); propertyTypeElement.setAttribute("code", code); propertyTypeElement.setAttribute("label", propertyTypeImmutable.getLabel()); @@ -202,14 +204,12 @@ public class MasterDataExtractor if (propertyTypeImmutable.getDataType().name().equals(DataType.CONTROLLEDVOCABULARY.name())) { propertyTypeElement.setAttribute("vocabulary", propertyTypeImmutable.getVocabulary().getCode()); - } - else if (propertyTypeImmutable.getDataType().name().equals(DataType.MATERIAL.name())) + } else if (propertyTypeImmutable.getDataType().name().equals(DataType.MATERIAL.name())) { if (propertyTypeImmutable.getMaterialType() != null) { propertyTypeElement.setAttribute("material", propertyTypeImmutable.getMaterialType().getCode()); - } - else + } else { // for properties like "inhibitor_of" where it is of Material of Any Type propertyTypeElement.setAttribute("material", ""); @@ -231,7 +231,7 @@ public class MasterDataExtractor Element vocabElement = doc.createElement("xmd:controlledVocabulary"); String code = vocabImmutable.isInternalNamespace() && vocabImmutable.getCode().startsWith(INTERNAL_NAMESPACE_PREFIX) ? CodeConverter.tryToDatabase(vocabImmutable.getCode()) - : vocabImmutable.getCode(); + : vocabImmutable.getCode(); vocabElement.setAttribute("code", code); vocabElement.setAttribute("description", vocabImmutable.getDescription()); vocabElement.setAttribute("urlTemplate", vocabImmutable.getUrlTemplate()); @@ -307,7 +307,8 @@ public class MasterDataExtractor { Element experimentTypeElement = getEntityTypeXML(doc, expType, "xmd:collectionType"); experimentTypeElement.setAttribute("description", expType.getDescription()); - experimentTypesElement.setAttribute("validationPlugin", expType.getValidationScript()!= null ? expType.getValidationScript().getName() : ""); + experimentTypesElement.setAttribute("validationPlugin", + expType.getValidationScript() != null ? expType.getValidationScript().getName() : ""); experimentTypesElement.appendChild(experimentTypeElement); Element propertyAssignmentsElement = getPropertyAssignmentXML(doc, expTypeCodePropAssignmentMap.get(expType.getCode())); experimentTypeElement.appendChild(propertyAssignmentsElement); @@ -358,8 +359,7 @@ public class MasterDataExtractor { Element propertyAssignmentElement = doc.createElement("xmd:propertyAssignment"); propertyAssignmentsElement.appendChild(propertyAssignmentElement); - propertyAssignmentElement.setAttribute("propertyTypeCode", CodeConverter.tryToBusinessLayer(propAssignment.getPropertyType().getCode(), - propAssignment.getPropertyType().isInternalNameSpace())); + propertyAssignmentElement.setAttribute("propertyTypeCode", propAssignment.getPropertyType().getCode()); propertyAssignmentElement.setAttribute("ordinal", String.valueOf(propAssignment.getOrdinal())); propertyAssignmentElement.setAttribute("section", propAssignment.getSection()); propertyAssignmentElement.setAttribute("showInEdit", String.valueOf(propAssignment.isShowInEditView())); diff --git a/datastore_server/source/java/ch/systemsx/cisd/etlserver/path/AbstractPathInfoDatabaseFeedingTask.java b/datastore_server/source/java/ch/systemsx/cisd/etlserver/path/AbstractPathInfoDatabaseFeedingTask.java index 31d44f0bfe4aa2a5926b23d77fbb1ff9b321f70b..b99bcd6debc590801335d9383aabcea51bd7191a 100644 --- a/datastore_server/source/java/ch/systemsx/cisd/etlserver/path/AbstractPathInfoDatabaseFeedingTask.java +++ b/datastore_server/source/java/ch/systemsx/cisd/etlserver/path/AbstractPathInfoDatabaseFeedingTask.java @@ -64,12 +64,13 @@ abstract class AbstractPathInfoDatabaseFeedingTask extends AbstractMaintenanceTa protected String checksumType; - protected void feedPathInfoDatabase(IDatasetLocation dataSet, boolean h5Folders, boolean h5arFolders) + protected Long feedPathInfoDatabase(IDatasetLocation dataSet, boolean h5Folders, boolean h5arFolders) { IShareIdManager shareIdManager = directoryProvider.getShareIdManager(); String dataSetCode = dataSet.getDataSetCode(); shareIdManager.lock(dataSetCode); + Long size = null; try { @@ -79,7 +80,7 @@ abstract class AbstractPathInfoDatabaseFeedingTask extends AbstractMaintenanceTa getOperationLog().error("Root directory of data set " + dataSetCode + " does not exists: " + dataSetRoot); shareIdManager.releaseLocks(); - return; + return size; } DatabaseBasedDataSetPathsInfoFeeder feeder = new DatabaseBasedDataSetPathsInfoFeeder(dao, new Hdf5AwareHierarchicalContentFactory(h5Folders, h5arFolders), computeChecksum, @@ -87,10 +88,10 @@ abstract class AbstractPathInfoDatabaseFeedingTask extends AbstractMaintenanceTa Long id = dao.tryGetDataSetId(dataSetCode); if (id == null) { - feeder.addPaths(dataSetCode, dataSet.getDataSetLocation(), dataSetRoot); + size = feeder.addPaths(dataSetCode, dataSet.getDataSetLocation(), dataSetRoot); feeder.commit(); getOperationLog().info("Paths inside data set " + dataSetCode - + " successfully added to database."); + + " successfully added to database. Data set size: " + size); } } catch (Exception ex) { @@ -100,6 +101,7 @@ abstract class AbstractPathInfoDatabaseFeedingTask extends AbstractMaintenanceTa { shareIdManager.releaseLocks(); } + return size; } protected abstract Logger getOperationLog(); diff --git a/datastore_server/source/java/ch/systemsx/cisd/etlserver/path/PathInfoDatabaseFeedingTask.java b/datastore_server/source/java/ch/systemsx/cisd/etlserver/path/PathInfoDatabaseFeedingTask.java index 0329f849873b1a78d55877cd9c8fb57d9a031a7d..179c8073a0090bdbb1368e101a7f073a636b2704 100644 --- a/datastore_server/source/java/ch/systemsx/cisd/etlserver/path/PathInfoDatabaseFeedingTask.java +++ b/datastore_server/source/java/ch/systemsx/cisd/etlserver/path/PathInfoDatabaseFeedingTask.java @@ -17,6 +17,7 @@ package ch.systemsx.cisd.etlserver.path; import java.util.ArrayList; +import java.util.Collections; import java.util.Date; import java.util.HashSet; import java.util.List; @@ -340,7 +341,11 @@ public class PathInfoDatabaseFeedingTask extends AbstractPathInfoDatabaseFeeding } IDatasetLocation dataSetLocation = dataSet.tryGetAsDataSet(); - feedPathInfoDatabase(dataSetLocation, h5Folders, h5arFolders); + Long size = feedPathInfoDatabase(dataSetLocation, h5Folders, h5arFolders); + if (size != null) + { + service.updatePhysicalDataSetsSize(Collections.singletonMap(dataSet.getCode(), size)); + } } } }; diff --git a/datastore_server/source/java/ch/systemsx/cisd/etlserver/plugins/AutoArchiverTask.java b/datastore_server/source/java/ch/systemsx/cisd/etlserver/plugins/AutoArchiverTask.java index ed5e2708f3c7f3c5478666a3d383ba70ae61446e..b86503f4ad75f1ec54f03d3f663434f967510c0b 100644 --- a/datastore_server/source/java/ch/systemsx/cisd/etlserver/plugins/AutoArchiverTask.java +++ b/datastore_server/source/java/ch/systemsx/cisd/etlserver/plugins/AutoArchiverTask.java @@ -16,6 +16,7 @@ package ch.systemsx.cisd.etlserver.plugins; +import java.util.HashMap; import java.util.List; import java.util.Properties; @@ -93,7 +94,7 @@ public class AutoArchiverTask implements IMaintenanceTask { operationLog.info("archiving: " + CollectionUtils.abbreviate(Code.extractCodes(dataSets), 10)); - openBISService.archiveDataSets(Code.extractCodes(dataSets), removeFromDataStore); + openBISService.archiveDataSets(Code.extractCodes(dataSets), removeFromDataStore, new HashMap<>()); } } diff --git a/datastore_server/source/java/ch/systemsx/cisd/etlserver/plugins/ExperimentBasedArchivingTask.java b/datastore_server/source/java/ch/systemsx/cisd/etlserver/plugins/ExperimentBasedArchivingTask.java index b71be48ac2953e0beb9faebf0d953279de3117f0..903c110365e13fac2cab1c954f3dffb1db62d66c 100644 --- a/datastore_server/source/java/ch/systemsx/cisd/etlserver/plugins/ExperimentBasedArchivingTask.java +++ b/datastore_server/source/java/ch/systemsx/cisd/etlserver/plugins/ExperimentBasedArchivingTask.java @@ -332,7 +332,7 @@ public class ExperimentBasedArchivingTask implements IDataStoreLockingMaintenanc "#" + dataSetCodes.size() + " data sets of experiment " + info.getExperimentIdentifier() + ": " + dataSetCodes; operationLog.info("Starting archiving " + message); - service.archiveDataSets(dataSetCodes, true); + service.archiveDataSets(dataSetCodes, true, new HashMap<>()); builder.addArchivingMessage(message); return true; } diff --git a/datastore_server/source/java/ch/systemsx/cisd/openbis/dss/generic/server/DataStoreService.java b/datastore_server/source/java/ch/systemsx/cisd/openbis/dss/generic/server/DataStoreService.java index 32d1315ffca90ccab82c62b80da49aabafc569df..f667b269920a8f8f0b4b185db93e539ca86e9b38 100644 --- a/datastore_server/source/java/ch/systemsx/cisd/openbis/dss/generic/server/DataStoreService.java +++ b/datastore_server/source/java/ch/systemsx/cisd/openbis/dss/generic/server/DataStoreService.java @@ -333,7 +333,7 @@ public class DataStoreService extends AbstractServiceWithLogger<IDataStoreServic IProcessingPluginTask task = new UnarchiveProcessingPluginTask(getArchiverPlugin()); scheduleTask(sessionToken, userSessionToken, UNARCHIVING_PROCESSING_PLUGIN_KEY, task, datasets, userId, - userEmailOrNull); + userEmailOrNull, new HashMap<>()); } @Override @@ -344,14 +344,14 @@ public class DataStoreService extends AbstractServiceWithLogger<IDataStoreServic } @Override - public void archiveDatasets(String sessionToken, String userSessionToken, - List<DatasetDescription> datasets, String userId, String userEmailOrNull, - boolean removeFromDataStore) + public void archiveDatasets(String sessionToken, String userSessionToken, List<DatasetDescription> datasets, String userId, + String userEmailOrNull, boolean removeFromDataStore, Map<String, String> options) { String description = removeFromDataStore ? ARCHIVING_PROCESSING_PLUGIN_KEY : COPYING_TO_ARCHIVE_PROCESSING_PLUGIN_KEY; IProcessingPluginTask task = new ArchiveProcessingPluginTask(getArchiverPlugin(), removeFromDataStore); + System.err.println("archive "+datasets+" options:"+options); - scheduleTask(sessionToken, userSessionToken, description, task, datasets, userId, userEmailOrNull); + scheduleTask(sessionToken, userSessionToken, description, task, datasets, userId, userEmailOrNull, options); } @Override @@ -392,15 +392,13 @@ public class DataStoreService extends AbstractServiceWithLogger<IDataStoreServic private void scheduleTask(String sessionToken, String userSessionToken, String description, IProcessingPluginTask processingTask, List<DatasetDescription> datasets, String userId, - String userEmailOrNull) + String userEmailOrNull, Map<String, String> options) { sessionTokenManager.assertValidSessionToken(sessionToken); DatastoreServiceDescription pluginDescription = DatastoreServiceDescription.processing(description, description, null, null); - Map<String, String> parameterBindings = new HashMap<String, String>(); - // parameterBindings.put("sessionToken", sessionToken); scheduleTask(userSessionToken, description, processingTask, datasets, userId, userEmailOrNull, - pluginDescription, parameterBindings); + pluginDescription, options); } @Override @@ -474,6 +472,7 @@ public class DataStoreService extends AbstractServiceWithLogger<IDataStoreServic archiverTaskContext.setUserId(context.getUserId()); archiverTaskContext.setUserEmail(context.getUserEmailOrNull()); archiverTaskContext.setUserSessionToken(context.trySessionToken()); + archiverTaskContext.setOptions(context.getParameterBindings()); return archiverTaskContext; } diff --git a/datastore_server/source/java/ch/systemsx/cisd/openbis/dss/generic/server/DataStoreServiceLogger.java b/datastore_server/source/java/ch/systemsx/cisd/openbis/dss/generic/server/DataStoreServiceLogger.java index 6c92fd418cbe88a6f98a69cc6619a6f3abdc9b3a..01f2e14ad76354c544cb5e07aaf6aa40404e4963 100644 --- a/datastore_server/source/java/ch/systemsx/cisd/openbis/dss/generic/server/DataStoreServiceLogger.java +++ b/datastore_server/source/java/ch/systemsx/cisd/openbis/dss/generic/server/DataStoreServiceLogger.java @@ -143,7 +143,7 @@ class DataStoreServiceLogger implements IDataStoreService, IInitializable { log("processDatasets", "USER_SESSION(%s) TASK_ID(%s) NO_OF_DATASETS(%s) PARAMETERS(%s) USER_ID (%s) USER_EMAIL(%s)", - userSessionToken, serviceKey, datasets.size(), parameterBindings, userId, + userSessionToken, serviceKey, datasets.size(), parameterBindings.keySet(), userId, userEmailOrNull); } @@ -156,8 +156,8 @@ class DataStoreServiceLogger implements IDataStoreService, IInitializable } @Override - public void archiveDatasets(String sessionToken, String userSessionToken, List<DatasetDescription> datasets, - String userId, String userEmailOrNull, boolean removeFromDataStore) + public void archiveDatasets(String sessionToken, String userSessionToken, List<DatasetDescription> datasets, String userId, + String userEmailOrNull, boolean removeFromDataStore, Map<String, String> options) { log("archiveDatasets", "NO_OF_DATASETS(%s) USER_ID (%s) USER_EMAIL(%s) REMOVE_FROM_DATA_STORE(%s)", @@ -186,7 +186,7 @@ class DataStoreServiceLogger implements IDataStoreService, IInitializable { log("createReportFromAggregationService", "USER_SESSION(%s) SERVICE(%s) PARAMETERS(%s) USER_ID(%s) EMAIL(%s)", - userSessionToken, serviceKey, parameters, userId, userEmailOrNull); + userSessionToken, serviceKey, parameters.keySet(), userId, userEmailOrNull); return null; } diff --git a/datastore_server/source/java/ch/systemsx/cisd/openbis/dss/generic/server/EncapsulatedOpenBISService.java b/datastore_server/source/java/ch/systemsx/cisd/openbis/dss/generic/server/EncapsulatedOpenBISService.java index f0cfaea0cf64b92d61cd0b07bb17026f4b23e6bd..5dd99b7571a0946b290ee3957a517cefc30b4bf8 100644 --- a/datastore_server/source/java/ch/systemsx/cisd/openbis/dss/generic/server/EncapsulatedOpenBISService.java +++ b/datastore_server/source/java/ch/systemsx/cisd/openbis/dss/generic/server/EncapsulatedOpenBISService.java @@ -766,10 +766,10 @@ public final class EncapsulatedOpenBISService implements IEncapsulatedOpenBISSer } @Override - public void archiveDataSets(List<String> dataSetCodes, boolean removeFromDataStore) + public void archiveDataSets(List<String> dataSetCodes, boolean removeFromDataStore, Map<String, String> options) throws UserFailureException { - service.archiveDatasets(session.getSessionToken(), dataSetCodes, removeFromDataStore); + service.archiveDatasets(session.getSessionToken(), dataSetCodes, removeFromDataStore, options); } @Override diff --git a/datastore_server/source/java/ch/systemsx/cisd/openbis/dss/generic/server/plugins/jython/JythonAggregationService.java b/datastore_server/source/java/ch/systemsx/cisd/openbis/dss/generic/server/plugins/jython/JythonAggregationService.java index 65199787eff52d41e76824c6f93610ea4e35995f..47bdc1a0002f0d3293c2f46ae679287a87ec2379 100644 --- a/datastore_server/source/java/ch/systemsx/cisd/openbis/dss/generic/server/plugins/jython/JythonAggregationService.java +++ b/datastore_server/source/java/ch/systemsx/cisd/openbis/dss/generic/server/plugins/jython/JythonAggregationService.java @@ -71,7 +71,7 @@ public class JythonAggregationService extends AggregationService public void create(ISimpleTableModelBuilderAdaptor builder) { operationLog.info("Aggregation report for the following parameters " - + "has been requested: " + parameters); + + "has been requested: " + parameters.keySet()); IAggregationServiceReportingPluginScriptRunner runner = scriptRunnerFactory .createAggregationServiceReportingPluginRunner(context); diff --git a/datastore_server/source/java/ch/systemsx/cisd/openbis/dss/generic/server/plugins/jython/JythonIngestionService.java b/datastore_server/source/java/ch/systemsx/cisd/openbis/dss/generic/server/plugins/jython/JythonIngestionService.java index 2641ce68e99092b54685d0a8709df33c6288aa00..ae4d5cc4b8cd0bf88dea372a290c45fe7337362a 100644 --- a/datastore_server/source/java/ch/systemsx/cisd/openbis/dss/generic/server/plugins/jython/JythonIngestionService.java +++ b/datastore_server/source/java/ch/systemsx/cisd/openbis/dss/generic/server/plugins/jython/JythonIngestionService.java @@ -75,7 +75,7 @@ public class JythonIngestionService extends public void create(ISimpleTableModelBuilderAdaptor builder) { operationLog.info("Aggregation report for the following parameters " - + "has been requested: " + parameters); + + "has been requested: " + parameters.keySet()); IDbModifyingAggregationServiceReportingPluginScriptRunner runner = scriptRunnerFactory .createDbModifyingAggregationServiceReportingPluginRunner(context); diff --git a/datastore_server/source/java/ch/systemsx/cisd/openbis/dss/generic/server/plugins/standard/AbstractArchiverProcessingPlugin.java b/datastore_server/source/java/ch/systemsx/cisd/openbis/dss/generic/server/plugins/standard/AbstractArchiverProcessingPlugin.java index 6c1e72e62897486f2dae432ac79813e7948ea2e4..087b6ede0e680686e1333f127c503eb116a7c704 100644 --- a/datastore_server/source/java/ch/systemsx/cisd/openbis/dss/generic/server/plugins/standard/AbstractArchiverProcessingPlugin.java +++ b/datastore_server/source/java/ch/systemsx/cisd/openbis/dss/generic/server/plugins/standard/AbstractArchiverProcessingPlugin.java @@ -357,7 +357,6 @@ public abstract class AbstractArchiverProcessingPlugin extends AbstractDatastore : isDataSetPresentInArchive(dataset); (upToDateStatus.isSuccess() ? upToDateInArchive : differentInArchive).add(dataset); } - return new GroupedDatasets(upToDateInArchive, differentInArchive); } diff --git a/datastore_server/source/java/ch/systemsx/cisd/openbis/dss/generic/server/plugins/standard/IngestionService.java b/datastore_server/source/java/ch/systemsx/cisd/openbis/dss/generic/server/plugins/standard/IngestionService.java index cc1993dbaaec4283d58e55beb0bbb87d341b5440..389df12ed0717340124cf4291e3ea92ed6fb697d 100644 --- a/datastore_server/source/java/ch/systemsx/cisd/openbis/dss/generic/server/plugins/standard/IngestionService.java +++ b/datastore_server/source/java/ch/systemsx/cisd/openbis/dss/generic/server/plugins/standard/IngestionService.java @@ -433,7 +433,7 @@ public abstract class IngestionService<T extends DataSetInformation> extends Agg sb.append(getClass().getName()); sb.append("\n"); sb.append("Parameters: "); - sb.append(parameters); + sb.append(parameters.keySet()); operationLog.error(sb.toString(), e); } diff --git a/datastore_server/source/java/ch/systemsx/cisd/openbis/dss/generic/server/plugins/standard/archiver/MultiDataSetArchiver.java b/datastore_server/source/java/ch/systemsx/cisd/openbis/dss/generic/server/plugins/standard/archiver/MultiDataSetArchiver.java index cf023735deff9d384b621c32d48d35de25c0e36c..3e994031a2c96d61fc8a3ba80aaf6102a3e63492 100644 --- a/datastore_server/source/java/ch/systemsx/cisd/openbis/dss/generic/server/plugins/standard/archiver/MultiDataSetArchiver.java +++ b/datastore_server/source/java/ch/systemsx/cisd/openbis/dss/generic/server/plugins/standard/archiver/MultiDataSetArchiver.java @@ -25,6 +25,7 @@ import java.util.LinkedHashMap; import java.util.LinkedHashSet; import java.util.LinkedList; import java.util.List; +import java.util.Map; import java.util.Properties; import java.util.Set; @@ -71,6 +72,7 @@ import ch.systemsx.cisd.openbis.dss.generic.shared.ServiceProvider; import ch.systemsx.cisd.openbis.dss.generic.shared.utils.SegmentedStoreUtils; import ch.systemsx.cisd.openbis.dss.generic.shared.utils.SegmentedStoreUtils.FilterOptions; import ch.systemsx.cisd.openbis.dss.generic.shared.utils.Share; +import ch.systemsx.cisd.openbis.generic.server.task.ArchivingByRequestTask; import ch.systemsx.cisd.openbis.generic.shared.basic.dto.AbstractExternalData; import ch.systemsx.cisd.openbis.generic.shared.basic.dto.DataSetArchivingStatus; import ch.systemsx.cisd.openbis.generic.shared.basic.dto.IDatasetLocation; @@ -223,6 +225,7 @@ public class MultiDataSetArchiver extends AbstractArchiverProcessingPlugin } result.addResult(dataSets, Status.createError(e.getMessage()), Operation.ARCHIVE); } + operationLog.info("archiving done. result: " + ((MultiDataSetArchiver.MultiDataSetProcessingStatuses) result).getDataSetsWaitingForReplication()); return result; } @@ -280,8 +283,7 @@ public class MultiDataSetArchiver extends AbstractArchiverProcessingPlugin + FileUtilities.byteCountToDisplaySize(minimumContainerSize) + "."); } // if single dataset is bigger than specified maximum, we should still allow it being - } - else + } else { if (datasetSize < minimumContainerSize) { @@ -289,8 +291,7 @@ public class MultiDataSetArchiver extends AbstractArchiverProcessingPlugin + FileUtilities.byteCountToDisplaySize(datasetSize) + ") to be archived with multi dataset archiver because minimum size is " + FileUtilities.byteCountToDisplaySize(minimumContainerSize) + "."); - } - else if (datasetSize > maximumContainerSize) + } else if (datasetSize > maximumContainerSize) { throw new IllegalArgumentException("Set of data sets specified for archiving is too big (" + FileUtilities.byteCountToDisplaySize(datasetSize) @@ -306,8 +307,9 @@ public class MultiDataSetArchiver extends AbstractArchiverProcessingPlugin MultiDataSetProcessingStatuses statuses = new MultiDataSetProcessingStatuses(); // for sharding we use the location of the first datast - String containerPath = getFileOperations().generateContainerPath(dataSets); - establishContainerDataSetMapping(dataSets, containerPath, transaction); + String containerPath = createContainerPath(dataSets, context); + + long containerId = establishContainerDataSetMapping(dataSets, containerPath, transaction); IHierarchicalContent archivedContent = null; try @@ -321,7 +323,7 @@ public class MultiDataSetArchiver extends AbstractArchiverProcessingPlugin archivedContent = getFileOperations().getContainerAsHierarchicalContent(containerPath, dataSets); checkArchivedDataSets(archivedContent, dataSets, context, statuses); - scheduleFinalizer(containerPath, dataSets, context, removeFromDataStore, statuses); + scheduleFinalizer(containerPath, containerId, dataSets, context, removeFromDataStore, statuses); } catch (Exception ex) { getFileOperations().deleteContainerFromFinalDestination(getCleaner(), containerPath); @@ -341,7 +343,24 @@ public class MultiDataSetArchiver extends AbstractArchiverProcessingPlugin return statuses; } - private void establishContainerDataSetMapping(List<DatasetDescription> dataSets, String containerPath, + private String createContainerPath(List<DatasetDescription> dataSets, ArchiverTaskContext context) + { + String containerPath = getFileOperations().generateContainerPath(dataSets); + String subDirectory = tryGetSubDirectory(context); + if (subDirectory != null) + { + containerPath = subDirectory + "/" + containerPath; + } + return containerPath; + } + + private String tryGetSubDirectory(ArchiverTaskContext context) + { + Map<String, String> options = context.getOptions(); + return options != null ? options.get(ArchivingByRequestTask.SUB_DIR_KEY) : null; + } + + private long establishContainerDataSetMapping(List<DatasetDescription> dataSets, String containerPath, IMultiDataSetArchiverDBTransaction transaction) { MultiDataSetArchiverContainerDTO container = transaction.createContainer(containerPath); @@ -349,9 +368,10 @@ public class MultiDataSetArchiver extends AbstractArchiverProcessingPlugin { transaction.insertDataset(dataSet, container); } + return container.getId(); } - private void scheduleFinalizer(String containerPath, List<DatasetDescription> dataSets, + private void scheduleFinalizer(String containerPath, long containerId, List<DatasetDescription> dataSets, ArchiverTaskContext archiverContext, boolean removeFromDataStore, MultiDataSetProcessingStatuses statuses) { @@ -367,6 +387,12 @@ public class MultiDataSetArchiver extends AbstractArchiverProcessingPlugin String userSessionToken = archiverContext.getUserSessionToken(); HashMap<String, String> parameterBindings = new LinkedHashMap<String, String>(); IMultiDataSetFileOperationsManager operations = getFileOperations(); + String groupKey = tryGetSubDirectory(archiverContext); + if (groupKey != null) + { + parameterBindings.put(ArchivingByRequestTask.SUB_DIR_KEY, groupKey); + } + parameterBindings.put(MultiDataSetArchivingFinalizer.CONTAINER_ID_KEY, Long.toString(containerId)); parameterBindings.put(MultiDataSetArchivingFinalizer.ORIGINAL_FILE_PATH_KEY, operations.getOriginalArchiveFilePath(containerPath)); parameterBindings.put(MultiDataSetArchivingFinalizer.REPLICATED_FILE_PATH_KEY, @@ -568,7 +594,7 @@ public class MultiDataSetArchiver extends AbstractArchiverProcessingPlugin return result; } } - + IHierarchicalContentProvider contentProvider = context.getHierarchicalContentProvider(); for (String dataSetCode : dataSetCodes) { @@ -656,8 +682,7 @@ public class MultiDataSetArchiver extends AbstractArchiverProcessingPlugin if (dataSet.tryGetAsDataSet() != null) { result.add(dataSet.tryGetAsDataSet()); - } - else + } else { throw new IllegalStateException("All data sets in container are expected to be physical datasets, but data set '" + dataSet.getCode() + "' is not "); diff --git a/datastore_server/source/java/ch/systemsx/cisd/openbis/dss/generic/server/plugins/standard/archiver/MultiDataSetArchivingFinalizer.java b/datastore_server/source/java/ch/systemsx/cisd/openbis/dss/generic/server/plugins/standard/archiver/MultiDataSetArchivingFinalizer.java index b8cabaf1c151f0ff1bd0472040441f1251e8f14e..b7bf3a72dc07af6321e5e3238842e3c7774aeb39 100644 --- a/datastore_server/source/java/ch/systemsx/cisd/openbis/dss/generic/server/plugins/standard/archiver/MultiDataSetArchivingFinalizer.java +++ b/datastore_server/source/java/ch/systemsx/cisd/openbis/dss/generic/server/plugins/standard/archiver/MultiDataSetArchivingFinalizer.java @@ -20,6 +20,7 @@ import java.io.File; import java.text.ParseException; import java.text.SimpleDateFormat; import java.util.ArrayList; +import java.util.HashMap; import java.util.List; import java.util.Map; import java.util.Properties; @@ -46,6 +47,7 @@ import ch.systemsx.cisd.openbis.dss.generic.shared.IProcessingPluginTask; import ch.systemsx.cisd.openbis.dss.generic.shared.ProcessingStatus; import ch.systemsx.cisd.openbis.dss.generic.shared.ServiceProvider; import ch.systemsx.cisd.openbis.dss.generic.shared.dto.DataSetCodesWithStatus; +import ch.systemsx.cisd.openbis.generic.server.task.ArchivingByRequestTask; import ch.systemsx.cisd.openbis.generic.shared.basic.dto.DataSetArchivingStatus; import ch.systemsx.cisd.openbis.generic.shared.dto.DatasetDescription; @@ -58,8 +60,10 @@ class MultiDataSetArchivingFinalizer implements IProcessingPluginTask { private static final long serialVersionUID = 1L; - public static final String ORIGINAL_FILE_PATH_KEY = "original-file-path"; + public static final String CONTAINER_ID_KEY = "container-id"; + public static final String ORIGINAL_FILE_PATH_KEY = "original-file-path"; + public static final String REPLICATED_FILE_PATH_KEY = "replicated-file-path"; public static final String FINALIZER_POLLING_TIME_KEY = "finalizer-polling-time"; @@ -148,18 +152,29 @@ class MultiDataSetArchivingFinalizer implements IProcessingPluginTask Status status = Status.createError(message); getCleaner().delete(originalFile); getCleaner().delete(parameters.getReplicatedFile()); - removeFromMapping(originalFile); + removeFromMapping(parameters.getContainerId(), originalFile); updateStatus(new DataSetCodesWithStatus(dataSetCodes, DataSetArchivingStatus.AVAILABLE, false)); - ServiceProvider.getOpenBISService().archiveDataSets(dataSetCodes, removeFromDataStore); + HashMap<String, String> options = new HashMap<>(); + if (parameters.getSubDirectory() != null) + { + options.put(ArchivingByRequestTask.SUB_DIR_KEY, parameters.getSubDirectory()); + } + ServiceProvider.getOpenBISService().archiveDataSets(dataSetCodes, removeFromDataStore, options); return status; } - private void removeFromMapping(File originalFile) + private void removeFromMapping(Long containerId, File originalFile) { IMultiDataSetArchiverDBTransaction transaction = getTransaction(); try { - transaction.deleteContainer(originalFile.getName()); + if (containerId != null) + { + transaction.deleteContainer(containerId); + } else + { + transaction.deleteContainer(originalFile.getName()); + } transaction.commit(); } catch (Exception ex) { @@ -232,12 +247,17 @@ class MultiDataSetArchivingFinalizer implements IProcessingPluginTask Map<String, String> parameterBindings = context.getParameterBindings(); operationLog.info("Parameters: " + parameterBindings); Parameters parameters = new Parameters(); + if (parameterBindings.containsKey(CONTAINER_ID_KEY)) + { + parameters.setContainerId(getNumber(parameterBindings, CONTAINER_ID_KEY)); + } parameters.setOriginalFile(new File(getProperty(parameterBindings, ORIGINAL_FILE_PATH_KEY))); parameters.setReplicatedFile(new File(getProperty(parameterBindings, REPLICATED_FILE_PATH_KEY))); parameters.setPollingTime(getNumber(parameterBindings, FINALIZER_POLLING_TIME_KEY)); parameters.setStartTime(getTimestamp(parameterBindings, START_TIME_KEY)); parameters.setWaitingTime(getNumber(parameterBindings, FINALIZER_MAX_WAITING_TIME_KEY)); parameters.setStatus(DataSetArchivingStatus.valueOf(getProperty(parameterBindings, STATUS_KEY))); + parameters.setSubDirectory(parameterBindings.get(ArchivingByRequestTask.SUB_DIR_KEY)); return parameters; } @@ -290,6 +310,10 @@ class MultiDataSetArchivingFinalizer implements IProcessingPluginTask private long waitingTime; private DataSetArchivingStatus status; + + private String subDirectory; + + private Long containerId; public void setOriginalFile(File file) { @@ -350,6 +374,26 @@ class MultiDataSetArchivingFinalizer implements IProcessingPluginTask { return status; } + + public String getSubDirectory() + { + return subDirectory; + } + + public void setSubDirectory(String groupKey) + { + this.subDirectory = groupKey; + } + + public Long getContainerId() + { + return containerId; + } + + public void setContainerId(Long containerId) + { + this.containerId = containerId; + } } } diff --git a/datastore_server/source/java/ch/systemsx/cisd/openbis/dss/generic/server/plugins/standard/archiver/dataaccess/IMultiDataSetArchiverDBTransaction.java b/datastore_server/source/java/ch/systemsx/cisd/openbis/dss/generic/server/plugins/standard/archiver/dataaccess/IMultiDataSetArchiverDBTransaction.java index 391c786bfb119ca7cd8259f8819b004b84123a9c..ba13fcea3691b2b82e0b7e04c0bb222a415576d5 100644 --- a/datastore_server/source/java/ch/systemsx/cisd/openbis/dss/generic/server/plugins/standard/archiver/dataaccess/IMultiDataSetArchiverDBTransaction.java +++ b/datastore_server/source/java/ch/systemsx/cisd/openbis/dss/generic/server/plugins/standard/archiver/dataaccess/IMultiDataSetArchiverDBTransaction.java @@ -43,6 +43,8 @@ public interface IMultiDataSetArchiverDBTransaction public void requestUnarchiving(List<String> dataSetCodes); public void resetRequestUnarchiving(long containerId); + + public void deleteContainer(long containerId); public void commit(); diff --git a/datastore_server/source/java/ch/systemsx/cisd/openbis/dss/generic/server/plugins/standard/archiver/dataaccess/IMultiDataSetArchiverQueryDAO.java b/datastore_server/source/java/ch/systemsx/cisd/openbis/dss/generic/server/plugins/standard/archiver/dataaccess/IMultiDataSetArchiverQueryDAO.java index 99b6b11412ddc159a877a54b9339b38a71536203..7ad1e54f5f763de54c3c4212d669f983ca7bcca4 100644 --- a/datastore_server/source/java/ch/systemsx/cisd/openbis/dss/generic/server/plugins/standard/archiver/dataaccess/IMultiDataSetArchiverQueryDAO.java +++ b/datastore_server/source/java/ch/systemsx/cisd/openbis/dss/generic/server/plugins/standard/archiver/dataaccess/IMultiDataSetArchiverQueryDAO.java @@ -64,11 +64,15 @@ public interface IMultiDataSetArchiverQueryDAO extends TransactionQuery, IMultiD @Update(sql = DELETE_CONTAINER) public void deleteContainer(String containerPath); + final static String DELETE_CONTAINER_BY_ID = "DELETE FROM containers where id = ?{1}"; + + @Update(sql = DELETE_CONTAINER_BY_ID) + public void deleteContainer(long containerId); + final static String REQUEST_UNARCHIVING = "UPDATE containers SET unarchiving_requested = 't' " + "WHERE id in (SELECT ctnr_id FROM data_sets WHERE code = any(?{1}))"; - @Update(sql = REQUEST_UNARCHIVING, parameterBindings = - { StringArrayMapper.class }) + @Update(sql = REQUEST_UNARCHIVING, parameterBindings = { StringArrayMapper.class }) public void requestUnarchiving(String[] dataSetCodes); final static String RESET_REQUEST_UNARCHIVING = "UPDATE containers SET unarchiving_requested = 'f' WHERE id = ?{1}"; diff --git a/datastore_server/source/java/ch/systemsx/cisd/openbis/dss/generic/server/plugins/standard/archiver/dataaccess/MultiDataSetArchiverDBTransaction.java b/datastore_server/source/java/ch/systemsx/cisd/openbis/dss/generic/server/plugins/standard/archiver/dataaccess/MultiDataSetArchiverDBTransaction.java index 4c4339ff7995bd1c82c3bb3bfed416c9a455c6e3..f65b06ad3f539784f50371f8699f02fb615c6f1f 100644 --- a/datastore_server/source/java/ch/systemsx/cisd/openbis/dss/generic/server/plugins/standard/archiver/dataaccess/MultiDataSetArchiverDBTransaction.java +++ b/datastore_server/source/java/ch/systemsx/cisd/openbis/dss/generic/server/plugins/standard/archiver/dataaccess/MultiDataSetArchiverDBTransaction.java @@ -55,6 +55,12 @@ public class MultiDataSetArchiverDBTransaction implements IMultiDataSetArchiverD return container; } + @Override + public void deleteContainer(long containerId) + { + transaction.deleteContainer(containerId); + } + @Override public void deleteContainer(String container) { diff --git a/datastore_server/source/java/ch/systemsx/cisd/openbis/dss/generic/shared/ArchiverTaskContext.java b/datastore_server/source/java/ch/systemsx/cisd/openbis/dss/generic/shared/ArchiverTaskContext.java index 13df5a8fbfeff55a53db56228a10d69cab89811d..531347247ac146a64acec979bec306bfee2df25a 100644 --- a/datastore_server/source/java/ch/systemsx/cisd/openbis/dss/generic/shared/ArchiverTaskContext.java +++ b/datastore_server/source/java/ch/systemsx/cisd/openbis/dss/generic/shared/ArchiverTaskContext.java @@ -17,6 +17,7 @@ package ch.systemsx.cisd.openbis.dss.generic.shared; import java.util.List; +import java.util.Map; import ch.systemsx.cisd.openbis.generic.shared.dto.DatasetDescription; @@ -47,6 +48,8 @@ public class ArchiverTaskContext private boolean forceUnarchiving; + private Map<String, String> options; + public ArchiverTaskContext(IDataSetDirectoryProvider directoryProvider, IHierarchicalContentProvider hierarchicalContentProvider) { @@ -118,4 +121,14 @@ public class ArchiverTaskContext this.forceUnarchiving = delayedUnarchiving; } + public Map<String, String> getOptions() + { + return options; + } + + public void setOptions(Map<String, String> options) + { + this.options = options; + } + } diff --git a/datastore_server/source/java/ch/systemsx/cisd/openbis/dss/generic/shared/IEncapsulatedOpenBISService.java b/datastore_server/source/java/ch/systemsx/cisd/openbis/dss/generic/shared/IEncapsulatedOpenBISService.java index 0e706309078ca5d82a1548668d1494ae21a4b8f4..0e8d0e1bb594e0fc739f5c901ea9b5db3a3604e8 100644 --- a/datastore_server/source/java/ch/systemsx/cisd/openbis/dss/generic/shared/IEncapsulatedOpenBISService.java +++ b/datastore_server/source/java/ch/systemsx/cisd/openbis/dss/generic/shared/IEncapsulatedOpenBISService.java @@ -382,7 +382,7 @@ public interface IEncapsulatedOpenBISService extends IEncapsulatedBasicOpenBISSe /** See {@link IServiceForDataStoreServer#archiveDatasets(String, List, boolean)} */ @ManagedAuthentication - public void archiveDataSets(List<String> dataSetCodes, boolean removeFromDataStore) + public void archiveDataSets(List<String> dataSetCodes, boolean removeFromDataStore, Map<String, String> options) throws UserFailureException; /** See {@link IServiceForDataStoreServer#unarchiveDatasets(String, List)} */ diff --git a/datastore_server/sourceTest/java/ch/ethz/sis/openbis/generic/dss/systemtest/api/v3/GeneralImportTestResources/materials_excel_97_2003.xls b/datastore_server/sourceTest/java/ch/ethz/sis/openbis/generic/dss/systemtest/api/v3/GeneralImportTestResources/materials_excel_97_2003.xls index f28e4bc61e5ff50507b38448768ead1206014c2f..0e20e03225e61020d1d67c39cff109150fc20c5d 100644 Binary files a/datastore_server/sourceTest/java/ch/ethz/sis/openbis/generic/dss/systemtest/api/v3/GeneralImportTestResources/materials_excel_97_2003.xls and b/datastore_server/sourceTest/java/ch/ethz/sis/openbis/generic/dss/systemtest/api/v3/GeneralImportTestResources/materials_excel_97_2003.xls differ diff --git a/datastore_server/sourceTest/java/ch/systemsx/cisd/etlserver/path/PathInfoDatabaseFeedingTaskTest.java b/datastore_server/sourceTest/java/ch/systemsx/cisd/etlserver/path/PathInfoDatabaseFeedingTaskTest.java index 55a42c5035bd73f24986afb2a0ef229eb0dba271..3e2a2ec259fd7add8d4d435c2c9d3ec6d1d12399 100644 --- a/datastore_server/sourceTest/java/ch/systemsx/cisd/etlserver/path/PathInfoDatabaseFeedingTaskTest.java +++ b/datastore_server/sourceTest/java/ch/systemsx/cisd/etlserver/path/PathInfoDatabaseFeedingTaskTest.java @@ -19,6 +19,7 @@ package ch.systemsx.cisd.etlserver.path; import java.io.File; import java.lang.reflect.Method; import java.util.Arrays; +import java.util.Collections; import java.util.Date; import org.jmock.Expectations; @@ -96,7 +97,7 @@ public class PathInfoDatabaseFeedingTaskTest extends AbstractFileSystemTestCase dataSetFolder = new File(workingDirectory, "ds1"); dataSetFolder.mkdirs(); } - + @AfterMethod public void tearDown(Method method) { @@ -129,7 +130,7 @@ public class PathInfoDatabaseFeedingTaskTest extends AbstractFileSystemTestCase MockPathsInfoDAO pathsInfoDAO = new MockPathsInfoDAO(); createTask(pathsInfoDAO, "SHA1", 12, 3, 0).execute(); - + assertEquals("createDataSet(code=ds1, location=2)\n" + "createDataSetFile(0, parent=null, 2 (, 3, d))\n" + "createDataSetFiles:\n" @@ -139,7 +140,7 @@ public class PathInfoDatabaseFeedingTaskTest extends AbstractFileSystemTestCase + "createLastFeedingEvent(Thu Jan 01 01:01:18 CET 1970)\n" + "commit()\n", pathsInfoDAO.getLog()); } - + @Test public void testH5AndH5arFolderDisabled() { @@ -159,7 +160,7 @@ public class PathInfoDatabaseFeedingTaskTest extends AbstractFileSystemTestCase MockPathsInfoDAO pathsInfoDAO = new MockPathsInfoDAO(); createTask(pathsInfoDAO, 12, 3, 0).execute(); - + assertEquals("createDataSet(code=ds1, location=1)\n" + "createDataSetFile(0, parent=null, 1 (, 1025784, d))\n" + "createDataSetFile(0, parent=1, test-data (test-data, 1025774, d))\n" @@ -173,7 +174,7 @@ public class PathInfoDatabaseFeedingTaskTest extends AbstractFileSystemTestCase + "createLastFeedingEvent(Thu Jan 01 01:01:18 CET 1970)\n" + "commit()\n", pathsInfoDAO.getLog()); } - + @Test public void testH5FolderEnabledWithSHA1() { @@ -194,11 +195,11 @@ public class PathInfoDatabaseFeedingTaskTest extends AbstractFileSystemTestCase MockPathsInfoDAO pathsInfoDAO = new MockPathsInfoDAO(); createTask(pathsInfoDAO, "SHA1", 12, 3, 0).execute(); - + assertEquals("createDataSet(code=ds1, location=1)\n" + "createDataSetFile(0, parent=null, 1 (, 1007978, d))\n" + "createDataSetFile(0, parent=1, test-data (test-data, 1007968, d))\n" - + "createDataSetFile(0, parent=2, thumbnails2.h5 (test-data/thumbnails2.h5, 490761, d, checksumCRC32=9fb9b84a, checksum=SHA1:cfb5c11ae566a094c3d950ac0fd89057e3eecf56))\n" + + "createDataSetFile(0, parent=2, thumbnails2.h5 (test-data/thumbnails2.h5, 490761, d, checksumCRC32=9fb9b84a, checksum=SHA1:cfb5c11ae566a094c3d950ac0fd89057e3eecf56))\n" + "createDataSetFiles:\n" + " 0, parent=1, info.txt (info.txt, 10, f, checksumCRC32=176bdc9d, checksum=SHA1:a5105d3fcba551031e7abdb25f9bbdb2ad3a9ffa)\n" + " 0, parent=2, farray.h5 (test-data/farray.h5, 8640, f, checksumCRC32=47dedeef, checksum=SHA1:8f463b0c828b993efd441f602a0907d1bccb0234)\n" @@ -247,11 +248,11 @@ public class PathInfoDatabaseFeedingTaskTest extends AbstractFileSystemTestCase MockPathsInfoDAO pathsInfoDAO = new MockPathsInfoDAO(); createTask(pathsInfoDAO, 12, 3, 0).execute(); - + assertEquals("createDataSet(code=ds1, location=1)\n" + "createDataSetFile(0, parent=null, 1 (, 1007978, d))\n" + "createDataSetFile(0, parent=1, test-data (test-data, 1007968, d))\n" - + "createDataSetFile(0, parent=2, thumbnails.h5ar (test-data/thumbnails.h5ar, 490761, d, checksumCRC32=9fb9b84a))\n" + + "createDataSetFile(0, parent=2, thumbnails.h5ar (test-data/thumbnails.h5ar, 490761, d, checksumCRC32=9fb9b84a))\n" + "createDataSetFiles:\n" + " 0, parent=1, info.txt (info.txt, 10, f, checksumCRC32=176bdc9d)\n" + " 0, parent=2, farray.h5 (test-data/farray.h5, 8640, f, checksumCRC32=47dedeef)\n" @@ -279,7 +280,7 @@ public class PathInfoDatabaseFeedingTaskTest extends AbstractFileSystemTestCase + "createLastFeedingEvent(Thu Jan 01 01:01:18 CET 1970)\n" + "commit()\n", pathsInfoDAO.getLog()); } - + @Test public void testAsMaintenanceTask() { @@ -299,7 +300,7 @@ public class PathInfoDatabaseFeedingTaskTest extends AbstractFileSystemTestCase MockPathsInfoDAO pathsInfoDAO = new MockPathsInfoDAO(); createTask(pathsInfoDAO, 12, 3, 0).execute(); - + assertEquals("createDataSet(code=ds1, location=2)\n" + "createDataSetFile(0, parent=null, 2 (, 3, d))\n" + "createDataSetFiles:\n" @@ -339,7 +340,7 @@ public class PathInfoDatabaseFeedingTaskTest extends AbstractFileSystemTestCase MockPathsInfoDAO pathsInfoDAO = new MockPathsInfoDAO(); createTask(pathsInfoDAO, 12, 3, 0).execute(); - + assertEquals("createDataSet(code=ds1, location=2)\n" + "createDataSetFile(0, parent=null, 2 (, 3, d))\n" + "createDataSetFiles:\n" @@ -379,7 +380,7 @@ public class PathInfoDatabaseFeedingTaskTest extends AbstractFileSystemTestCase MockPathsInfoDAO pathsInfoDAO = new MockPathsInfoDAO(); createTask(pathsInfoDAO, 2, 3, 0).execute(); - + assertEquals("createDataSet(code=DS-1000, location=3)\n" + "createDataSetFile(0, parent=null, 3 (, 16, d))\n" + "createDataSetFiles:\n" @@ -445,7 +446,7 @@ public class PathInfoDatabaseFeedingTaskTest extends AbstractFileSystemTestCase MockPathsInfoDAO pathsInfoDAO = new MockPathsInfoDAO(); createTask(pathsInfoDAO, 2, 0, 1500).execute(); - + assertEquals("createDataSet(code=DS-1000, location=3)\n" + "createDataSetFile(0, parent=null, 3 (, 16, d))\n" + "createDataSetFiles:\n" @@ -552,7 +553,7 @@ public class PathInfoDatabaseFeedingTaskTest extends AbstractFileSystemTestCase MockPathsInfoDAO pathsInfoDAO = new MockPathsInfoDAO(); createTask(pathsInfoDAO, 2, 0, 0).execute(); - + assertEquals("createDataSet(code=ds1, location=3)\n" + "createDataSetFile(0, parent=null, 3 (, 16, d))\n" + "createDataSetFiles:\n" @@ -639,11 +640,12 @@ public class PathInfoDatabaseFeedingTaskTest extends AbstractFileSystemTestCase one(service).tryGetDataSet(DATA_SET_CODE); will(returnValue(dataSet)); + one(service).updatePhysicalDataSetsSize(Collections.singletonMap(DATA_SET_CODE, 3L)); } }); task.createExecutor(DATA_SET_CODE, false).execute(); - + assertEquals("createDataSet(code=ds1, location=2)\n" + "createDataSetFile(0, parent=null, 2 (, 3, d))\n" + "createDataSetFiles:\n" @@ -661,6 +663,8 @@ public class PathInfoDatabaseFeedingTaskTest extends AbstractFileSystemTestCase { one(service).tryGetDataSet(DATA_SET_CODE); will(returnValue(dataSet)); + + one(service).updatePhysicalDataSetsSize(Collections.singletonMap(DATA_SET_CODE, 3L)); } }); @@ -688,7 +692,7 @@ public class PathInfoDatabaseFeedingTaskTest extends AbstractFileSystemTestCase }); task.createExecutor(DATA_SET_CODE, false).execute(); - + assertEquals("", mockPathsInfoDAO.getLog()); } @@ -708,7 +712,7 @@ public class PathInfoDatabaseFeedingTaskTest extends AbstractFileSystemTestCase mockPathsInfoDAO.setDataSetId(42); task.createExecutor(DATA_SET_CODE, false).execute(); - + assertEquals("", mockPathsInfoDAO.getLog()); } @@ -732,16 +736,16 @@ public class PathInfoDatabaseFeedingTaskTest extends AbstractFileSystemTestCase return dataSet; } - private PathInfoDatabaseFeedingTask createTask(IPathsInfoDAO pathsInfoDAO, + private PathInfoDatabaseFeedingTask createTask(IPathsInfoDAO pathsInfoDAO, int chunkSize, int maxNumberOfChunks, long timeLimite) { return createTask(pathsInfoDAO, null, chunkSize, maxNumberOfChunks, timeLimite); } - private PathInfoDatabaseFeedingTask createTask(IPathsInfoDAO pathsInfoDAO, String checksumType, + private PathInfoDatabaseFeedingTask createTask(IPathsInfoDAO pathsInfoDAO, String checksumType, int chunkSize, int maxNumberOfChunks, long timeLimite) { - return new PathInfoDatabaseFeedingTask(service, directoryProvider, pathsInfoDAO, + return new PathInfoDatabaseFeedingTask(service, directoryProvider, pathsInfoDAO, new MockTimeProvider(0, 1000), true, checksumType, chunkSize, maxNumberOfChunks, timeLimite); } diff --git a/datastore_server/sourceTest/java/ch/systemsx/cisd/etlserver/path/PathInfoDatabaseRefreshingTaskTest.java b/datastore_server/sourceTest/java/ch/systemsx/cisd/etlserver/path/PathInfoDatabaseRefreshingTaskTest.java index 36a9c870b6f7c00d0465b3038af66e08b40b0d23..4b8abb28f6de7a5254e42ec0cfee3f39a64dbf98 100644 --- a/datastore_server/sourceTest/java/ch/systemsx/cisd/etlserver/path/PathInfoDatabaseRefreshingTaskTest.java +++ b/datastore_server/sourceTest/java/ch/systemsx/cisd/etlserver/path/PathInfoDatabaseRefreshingTaskTest.java @@ -203,8 +203,8 @@ public class PathInfoDatabaseRefreshingTaskTest extends AbstractFileSystemTestCa + "ATTRIBUTE,REGISTRATION_DATE," + T4 + ",LESS_THAN_OR_EQUAL]],[]]", criteriaMatcher.recordedObject().toString()); AssertionUtil.assertContainsLines(LOG_PREFIX + "Refresh path info for 2 physical data sets.\n" + - LOG_PREFIX + "Paths inside data set ds-5 successfully added to database.\n" + - LOG_PREFIX + "Paths inside data set ds-3 successfully added to database.\n" + + LOG_PREFIX + "Paths inside data set ds-5 successfully added to database. Data set size: 0\n" + + LOG_PREFIX + "Paths inside data set ds-3 successfully added to database. Data set size: 0\n" + LOG_PREFIX + "Path info for 2 physical data sets refreshed in 0 secs.", logRecorder.getLogContent()); File stateFile = createDefaultStateFile(); @@ -238,8 +238,8 @@ public class PathInfoDatabaseRefreshingTaskTest extends AbstractFileSystemTestCa + "SearchCriteria.AttributeMatchClause[ATTRIBUTE,TYPE,A,EQUALS]],[]]", criteriaMatcher.recordedObject().toString()); AssertionUtil.assertContainsLines(LOG_PREFIX + "Refresh path info for 2 physical data sets.\n" + - LOG_PREFIX + "Paths inside data set ds-2 successfully added to database.\n" + - LOG_PREFIX + "Paths inside data set ds-1 successfully added to database.\n" + + LOG_PREFIX + "Paths inside data set ds-2 successfully added to database. Data set size: 0\n" + + LOG_PREFIX + "Paths inside data set ds-1 successfully added to database. Data set size: 0\n" + LOG_PREFIX + "Path info for 2 physical data sets refreshed in 0 secs.", logRecorder.getLogContent()); assertEquals(T1 + " [ds-1]", FileUtilities.loadToString(stateFile).trim()); @@ -268,8 +268,8 @@ public class PathInfoDatabaseRefreshingTaskTest extends AbstractFileSystemTestCa + "ATTRIBUTE,REGISTRATION_DATE," + T4 + ",LESS_THAN_OR_EQUAL]],[]]", criteriaMatcher.recordedObject().toString()); AssertionUtil.assertContainsLines(LOG_PREFIX + "Refresh path info for 2 physical data sets.\n" + - LOG_PREFIX + "Paths inside data set ds-3 successfully added to database.\n" + - LOG_PREFIX + "Paths inside data set ds-2 successfully added to database.\n" + + LOG_PREFIX + "Paths inside data set ds-3 successfully added to database. Data set size: 0\n" + + LOG_PREFIX + "Paths inside data set ds-2 successfully added to database. Data set size: 0\n" + LOG_PREFIX + "Path info for 2 physical data sets refreshed in 0 secs.", logRecorder.getLogContent()); File stateFile = createDefaultStateFile(); @@ -299,8 +299,8 @@ public class PathInfoDatabaseRefreshingTaskTest extends AbstractFileSystemTestCa + "ATTRIBUTE,REGISTRATION_DATE," + T4 + ",LESS_THAN_OR_EQUAL]],[]]", criteriaMatcher.recordedObject().toString()); AssertionUtil.assertContainsLines(LOG_PREFIX + "Refresh path info for 2 physical data sets.\n" + - LOG_PREFIX + "Paths inside data set ds-3 successfully added to database.\n" + - LOG_PREFIX + "Paths inside data set ds-2 successfully added to database.\n" + + LOG_PREFIX + "Paths inside data set ds-3 successfully added to database. Data set size: 0\n" + + LOG_PREFIX + "Paths inside data set ds-2 successfully added to database. Data set size: 0\n" + LOG_PREFIX + "Path info for 2 physical data sets refreshed in 0 secs.", logRecorder.getLogContent()); File stateFile = createDefaultStateFile(); @@ -315,11 +315,11 @@ public class PathInfoDatabaseRefreshingTaskTest extends AbstractFileSystemTestCa + "ATTRIBUTE,REGISTRATION_DATE," + T2 + ",LESS_THAN_OR_EQUAL]],[]]", criteriaMatcher.recordedObject().toString()); AssertionUtil.assertContainsLines(LOG_PREFIX + "Refresh path info for 2 physical data sets.\n" + - LOG_PREFIX + "Paths inside data set ds-3 successfully added to database.\n" + - LOG_PREFIX + "Paths inside data set ds-2 successfully added to database.\n" + + LOG_PREFIX + "Paths inside data set ds-3 successfully added to database. Data set size: 0\n" + + LOG_PREFIX + "Paths inside data set ds-2 successfully added to database. Data set size: 0\n" + LOG_PREFIX + "Path info for 2 physical data sets refreshed in 0 secs.\n" + LOG_PREFIX + "Refresh path info for 1 physical data sets.\n" + - LOG_PREFIX + "Paths inside data set ds-1 successfully added to database.\n" + + LOG_PREFIX + "Paths inside data set ds-1 successfully added to database. Data set size: 0\n" + LOG_PREFIX + "Path info for 1 physical data sets refreshed in 0 secs.", logRecorder.getLogContent()); assertEquals(T1 + " [ds-1]", FileUtilities.loadToString(stateFile).trim()); @@ -332,11 +332,11 @@ public class PathInfoDatabaseRefreshingTaskTest extends AbstractFileSystemTestCa + "ATTRIBUTE,REGISTRATION_DATE," + T1 + ",LESS_THAN_OR_EQUAL]],[]]", criteriaMatcher.recordedObject().toString()); AssertionUtil.assertContainsLines(LOG_PREFIX + "Refresh path info for 2 physical data sets.\n" + - LOG_PREFIX + "Paths inside data set ds-3 successfully added to database.\n" + - LOG_PREFIX + "Paths inside data set ds-2 successfully added to database.\n" + + LOG_PREFIX + "Paths inside data set ds-3 successfully added to database. Data set size: 0\n" + + LOG_PREFIX + "Paths inside data set ds-2 successfully added to database. Data set size: 0\n" + LOG_PREFIX + "Path info for 2 physical data sets refreshed in 0 secs.\n" + LOG_PREFIX + "Refresh path info for 1 physical data sets.\n" + - LOG_PREFIX + "Paths inside data set ds-1 successfully added to database.\n" + + LOG_PREFIX + "Paths inside data set ds-1 successfully added to database. Data set size: 0\n" + LOG_PREFIX + "Path info for 1 physical data sets refreshed in 0 secs.", logRecorder.getLogContent()); assertEquals(T1 + " [ds-1]", FileUtilities.loadToString(stateFile).trim()); diff --git a/datastore_server/sourceTest/java/ch/systemsx/cisd/etlserver/plugins/AutoArchiverTaskTest.java b/datastore_server/sourceTest/java/ch/systemsx/cisd/etlserver/plugins/AutoArchiverTaskTest.java index be7228da8255657dcc4b45d412cf10de922d6ca2..0c780d3710c8978732913d85a9ed10eb29979b3b 100644 --- a/datastore_server/sourceTest/java/ch/systemsx/cisd/etlserver/plugins/AutoArchiverTaskTest.java +++ b/datastore_server/sourceTest/java/ch/systemsx/cisd/etlserver/plugins/AutoArchiverTaskTest.java @@ -20,10 +20,12 @@ import java.util.ArrayList; import java.util.Arrays; import java.util.HashSet; import java.util.List; +import java.util.Map; import java.util.Properties; import java.util.Set; import org.apache.log4j.Level; +import org.hamcrest.core.IsAnything; import org.jmock.Expectations; import org.jmock.Mockery; import org.springframework.beans.factory.BeanFactory; @@ -217,7 +219,7 @@ public class AutoArchiverTaskTest extends AssertJUnit context.checking(new Expectations() { { - one(service).archiveDataSets(dataSetCodes, removeFromDataStore); + one(service).archiveDataSets(with(dataSetCodes), with(removeFromDataStore), with(new IsAnything<Map<String, String>>())); } }); } diff --git a/datastore_server/sourceTest/java/ch/systemsx/cisd/etlserver/plugins/ExperimentBasedArchivingTaskTest.java b/datastore_server/sourceTest/java/ch/systemsx/cisd/etlserver/plugins/ExperimentBasedArchivingTaskTest.java index 340ad85a823c6a2245ff1d1cae24c063f84743cc..8d790e409efc3b1231f338653f9d4f765e962c71 100644 --- a/datastore_server/sourceTest/java/ch/systemsx/cisd/etlserver/plugins/ExperimentBasedArchivingTaskTest.java +++ b/datastore_server/sourceTest/java/ch/systemsx/cisd/etlserver/plugins/ExperimentBasedArchivingTaskTest.java @@ -22,9 +22,11 @@ import java.util.ArrayList; import java.util.Arrays; import java.util.Date; import java.util.List; +import java.util.Map; import java.util.Properties; import org.apache.log4j.Level; +import org.hamcrest.core.IsAnything; import org.jmock.Expectations; import org.jmock.Mockery; import org.testng.annotations.AfterMethod; @@ -507,7 +509,7 @@ public class ExperimentBasedArchivingTaskTest extends AbstractFileSystemTestCase context.checking(new Expectations() { { - one(service).archiveDataSets(dataSetCodes, true); + one(service).archiveDataSets(with(dataSetCodes), with(true), with(new IsAnything<Map<String, String>>())); } }); } diff --git a/datastore_server/sourceTest/java/ch/systemsx/cisd/openbis/dss/generic/server/plugins/standard/archiver/MultiDataSetArchiverTest.java b/datastore_server/sourceTest/java/ch/systemsx/cisd/openbis/dss/generic/server/plugins/standard/archiver/MultiDataSetArchiverTest.java index bcc768f4cfb3866da31687875a45035ba88fc48b..a065997b064aaa571298997ba3f28a3b91ea383e 100644 --- a/datastore_server/sourceTest/java/ch/systemsx/cisd/openbis/dss/generic/server/plugins/standard/archiver/MultiDataSetArchiverTest.java +++ b/datastore_server/sourceTest/java/ch/systemsx/cisd/openbis/dss/generic/server/plugins/standard/archiver/MultiDataSetArchiverTest.java @@ -285,6 +285,11 @@ public class MultiDataSetArchiverTest extends AbstractFileSystemTestCase getContainerForId(containerId).setUnarchivingRequested(false); } + @Override + public void deleteContainer(long containerId) + { + } + @Override public void commit() { @@ -752,7 +757,7 @@ public class MultiDataSetArchiverTest extends AbstractFileSystemTestCase + "committed: true, rolledBack: false", removeTimeInformationFromContent(transaction.toString())); assertEquals(archive.getAbsolutePath(), freeSpaceRecorder.getRecordedObjects().get(0).getPath()); assertEquals(1, freeSpaceRecorder.getRecordedObjects().size()); - assertEquals("{original-file-path=" + archive.getAbsolutePath() + "/ds2-yyyyMMdd-HHmmss.tar, " + assertEquals("{container-id=0, original-file-path=" + archive.getAbsolutePath() + "/ds2-yyyyMMdd-HHmmss.tar, " + "replicated-file-path=" + replicate.getAbsolutePath() + "/ds2-yyyyMMdd-HHmmss.tar, " + "finalizer-polling-time=300000, start-time=yyyyMMdd-HHmmss, " + "finalizer-max-waiting-time=172800000, status=ARCHIVED}", @@ -838,7 +843,7 @@ public class MultiDataSetArchiverTest extends AbstractFileSystemTestCase "committed: true, rolledBack: false", removeTimeInformationFromContent(transaction.toString())); assertEquals(archive.getAbsolutePath(), freeSpaceRecorder.getRecordedObjects().get(0).getPath()); assertEquals(1, freeSpaceRecorder.getRecordedObjects().size()); - assertEquals("{original-file-path=" + archive.getAbsolutePath() + "/ds2-yyyyMMdd-HHmmss.tar, " + assertEquals("{container-id=2, original-file-path=" + archive.getAbsolutePath() + "/ds2-yyyyMMdd-HHmmss.tar, " + "replicated-file-path=" + replicate.getAbsolutePath() + "/ds2-yyyyMMdd-HHmmss.tar, " + "finalizer-polling-time=300000, start-time=yyyyMMdd-HHmmss, " + "finalizer-max-waiting-time=172800000, status=ARCHIVED}", diff --git a/datastore_server/sourceTest/java/ch/systemsx/cisd/openbis/dss/generic/server/plugins/standard/archiver/MultiDataSetArchivingFinalizerTest.java b/datastore_server/sourceTest/java/ch/systemsx/cisd/openbis/dss/generic/server/plugins/standard/archiver/MultiDataSetArchivingFinalizerTest.java index 8c7cd791262951d31961ab157aa564d9c4a558d0..39ce8c655c6e1ad1ad63c38795d0c8578776b249 100644 --- a/datastore_server/sourceTest/java/ch/systemsx/cisd/openbis/dss/generic/server/plugins/standard/archiver/MultiDataSetArchivingFinalizerTest.java +++ b/datastore_server/sourceTest/java/ch/systemsx/cisd/openbis/dss/generic/server/plugins/standard/archiver/MultiDataSetArchivingFinalizerTest.java @@ -41,6 +41,7 @@ import ch.systemsx.cisd.common.action.IDelegatedAction; import ch.systemsx.cisd.common.filesystem.FileUtilities; import ch.systemsx.cisd.common.logging.BufferedAppender; import ch.systemsx.cisd.common.test.AssertionUtil; +import ch.systemsx.cisd.common.test.RecordingMatcher; import ch.systemsx.cisd.common.time.TimingParameters; import ch.systemsx.cisd.common.utilities.ITimeAndWaitingProvider; import ch.systemsx.cisd.common.utilities.MockTimeProvider; @@ -52,6 +53,7 @@ import ch.systemsx.cisd.openbis.dss.generic.shared.IEncapsulatedOpenBISService; import ch.systemsx.cisd.openbis.dss.generic.shared.ProcessingStatus; import ch.systemsx.cisd.openbis.dss.generic.shared.ServiceProviderTestWrapper; import ch.systemsx.cisd.openbis.dss.generic.shared.dto.DataSetCodesWithStatus; +import ch.systemsx.cisd.openbis.generic.server.task.ArchivingByRequestTask; import ch.systemsx.cisd.openbis.generic.shared.basic.dto.DataSetArchivingStatus; import ch.systemsx.cisd.openbis.generic.shared.dto.DatasetDescription; import ch.systemsx.cisd.openbis.generic.shared.dto.builders.DatasetDescriptionBuilder; @@ -63,6 +65,8 @@ import ch.systemsx.cisd.openbis.util.LogRecordingUtils; public class MultiDataSetArchivingFinalizerTest extends AbstractFileSystemTestCase { + private static final String MY_GROUP = "my-group"; + private static final long START_TIME = 123456789012l; private static final String START_TIME_AS_STRING = new SimpleDateFormat(MultiDataSetArchivingFinalizer.TIME_STAMP_FORMAT).format(START_TIME); @@ -128,6 +132,7 @@ public class MultiDataSetArchivingFinalizerTest extends AbstractFileSystemTestCa parameterBindings.put(MultiDataSetArchivingFinalizer.START_TIME_KEY, START_TIME_AS_STRING); parameterBindings.put(MultiDataSetArchivingFinalizer.FINALIZER_MAX_WAITING_TIME_KEY, "300000"); parameterBindings.put(MultiDataSetArchivingFinalizer.STATUS_KEY, DataSetArchivingStatus.ARCHIVED.toString()); + parameterBindings.put(ArchivingByRequestTask.SUB_DIR_KEY, MY_GROUP); processingContext = new DataSetProcessingContext(null, null, parameterBindings, null, USER_ID, USER_EMAIL); updatedStatus = new ArrayList<DataSetCodesWithStatus>(); @@ -160,6 +165,7 @@ public class MultiDataSetArchivingFinalizerTest extends AbstractFileSystemTestCa public void testReplicationFailDueToMissingArchiveFile() { final DatasetDescription ds1 = new DatasetDescriptionBuilder("ds1").getDatasetDescription(); + final RecordingMatcher<Map<String, String>> optionsMatcher = new RecordingMatcher<Map<String, String>>(); dataFileInArchive.delete(); @@ -169,7 +175,8 @@ public class MultiDataSetArchivingFinalizerTest extends AbstractFileSystemTestCa one(transaction).deleteContainer(dataFileInArchive.getName()); one(transaction).commit(); one(transaction).close(); - one(openBISService).archiveDataSets(Arrays.asList(ds1.getDataSetCode()), true); + one(openBISService).archiveDataSets(with(Arrays.asList(ds1.getDataSetCode())), with(true), + with(optionsMatcher)); } }); @@ -179,7 +186,7 @@ public class MultiDataSetArchivingFinalizerTest extends AbstractFileSystemTestCa + "Parameters: {original-file-path=" + dataFileInArchive.getPath() + ", replicated-file-path=" + dataFileReplicated.getPath() + ", " + "finalizer-polling-time=20000, start-time=" + START_TIME_AS_STRING + ", " - + "finalizer-max-waiting-time=300000, status=ARCHIVED}\n" + + "finalizer-max-waiting-time=300000, status=ARCHIVED, sub-directory=my-group}\n" + "ERROR OPERATION.MultiDataSetArchivingFinalizer - Replication of " + "'" + dataFileInArchive.getPath() + "' failed because the original file does not exist.", logRecorder.getLogContent()); @@ -188,6 +195,7 @@ public class MultiDataSetArchivingFinalizerTest extends AbstractFileSystemTestCa assertEquals("[[ds1] - AVAILABLE]", updatedStatus.toString()); assertEquals(false, updatedStatus.get(0).isPresentInArchive()); assertEquals(Arrays.asList(dataFileInArchive, dataFileReplicated).toString(), cleaner.toString()); + assertEquals("{" + ArchivingByRequestTask.SUB_DIR_KEY + "=" + MY_GROUP + "}", optionsMatcher.recordedObject().toString()); context.assertIsSatisfied(); } @@ -203,7 +211,7 @@ public class MultiDataSetArchivingFinalizerTest extends AbstractFileSystemTestCa + "Parameters: {original-file-path=" + dataFileInArchive.getPath() + ", replicated-file-path=" + dataFileReplicated.getPath() + ", " + "finalizer-polling-time=20000, start-time=" + START_TIME_AS_STRING + ", " - + "finalizer-max-waiting-time=300000, status=ARCHIVED}\n" + + "finalizer-max-waiting-time=300000, status=ARCHIVED, sub-directory=my-group}\n" + "INFO OPERATION.MultiDataSetArchivingFinalizer - Waiting for replication of archive " + "'" + dataFileInArchive.getPath() + "' containing the following data sets: [ds1]\n" + "INFO OPERATION.MultiDataSetArchivingFinalizer - Condition fulfilled after < 1sec, condition: " @@ -228,7 +236,7 @@ public class MultiDataSetArchivingFinalizerTest extends AbstractFileSystemTestCa + "Parameters: {original-file-path=" + dataFileInArchive.getPath() + ", replicated-file-path=" + dataFileReplicated.getPath() + ", " + "finalizer-polling-time=20000, start-time=" + START_TIME_AS_STRING + ", " - + "finalizer-max-waiting-time=300000, status=AVAILABLE}\n" + + "finalizer-max-waiting-time=300000, status=AVAILABLE, sub-directory=my-group}\n" + "INFO OPERATION.MultiDataSetArchivingFinalizer - Waiting for replication of archive " + "'" + dataFileInArchive.getPath() + "' containing the following data sets: [ds1]\n" + "INFO OPERATION.MultiDataSetArchivingFinalizer - Condition fulfilled after < 1sec, condition: " @@ -246,6 +254,7 @@ public class MultiDataSetArchivingFinalizerTest extends AbstractFileSystemTestCa { final DatasetDescription ds1 = new DatasetDescriptionBuilder("ds1").getDatasetDescription(); final DatasetDescription ds2 = new DatasetDescriptionBuilder("ds2").getDatasetDescription(); + final RecordingMatcher<Map<String, String>> optionsMatcher = new RecordingMatcher<Map<String, String>>(); parameterBindings.put(MultiDataSetArchivingFinalizer.REPLICATED_FILE_PATH_KEY, dataFilePartiallyReplicated.getPath()); context.checking(new Expectations() { @@ -253,7 +262,8 @@ public class MultiDataSetArchivingFinalizerTest extends AbstractFileSystemTestCa one(transaction).deleteContainer(dataFileInArchive.getName()); one(transaction).commit(); one(transaction).close(); - one(openBISService).archiveDataSets(Arrays.asList(ds1.getDataSetCode(), ds2.getDataSetCode()), true); + one(openBISService).archiveDataSets(with(Arrays.asList(ds1.getDataSetCode(), ds2.getDataSetCode())), + with(true), with(optionsMatcher)); } }); MockTimeProviderWithActions timeProviderWithActions = new MockTimeProviderWithActions(START_TIME, 1000); @@ -281,7 +291,7 @@ public class MultiDataSetArchivingFinalizerTest extends AbstractFileSystemTestCa + "Parameters: {original-file-path=" + dataFileInArchive.getPath() + ", replicated-file-path=" + dataFilePartiallyReplicated.getPath() + ", " + "finalizer-polling-time=20000, start-time=" + START_TIME_AS_STRING + ", " - + "finalizer-max-waiting-time=300000, status=ARCHIVED}\n" + + "finalizer-max-waiting-time=300000, status=ARCHIVED, sub-directory=my-group}\n" + "INFO OPERATION.MultiDataSetArchivingFinalizer - Waiting for replication of archive " + "'" + dataFileInArchive.getPath() + "' containing the following data sets: [ds1, ds2]\n" + "INFO OPERATION.MultiDataSetArchivingFinalizer - Condition still not fulfilled after < 1sec, " @@ -305,6 +315,7 @@ public class MultiDataSetArchivingFinalizerTest extends AbstractFileSystemTestCa assertEquals("[[ds1, ds2] - AVAILABLE]", updatedStatus.toString()); assertEquals(false, updatedStatus.get(0).isPresentInArchive()); assertEquals(Arrays.asList(dataFileInArchive, dataFilePartiallyReplicated).toString(), cleaner.toString()); + assertEquals("{" + ArchivingByRequestTask.SUB_DIR_KEY + "=" + MY_GROUP + "}", optionsMatcher.recordedObject().toString()); context.assertIsSatisfied(); } @@ -313,6 +324,7 @@ public class MultiDataSetArchivingFinalizerTest extends AbstractFileSystemTestCa { final DatasetDescription ds1 = new DatasetDescriptionBuilder("ds1").getDatasetDescription(); final DatasetDescription ds2 = new DatasetDescriptionBuilder("ds2").getDatasetDescription(); + final RecordingMatcher<Map<String, String>> optionsMatcher = new RecordingMatcher<Map<String, String>>(); parameterBindings.put(MultiDataSetArchivingFinalizer.REPLICATED_FILE_PATH_KEY, dataFilePartiallyReplicated.getPath()); parameterBindings.put(MultiDataSetArchivingFinalizer.STATUS_KEY, DataSetArchivingStatus.AVAILABLE.toString()); context.checking(new Expectations() @@ -321,7 +333,8 @@ public class MultiDataSetArchivingFinalizerTest extends AbstractFileSystemTestCa one(transaction).deleteContainer(dataFileInArchive.getName()); one(transaction).commit(); one(transaction).close(); - one(openBISService).archiveDataSets(Arrays.asList(ds1.getDataSetCode(), ds2.getDataSetCode()), false); + one(openBISService).archiveDataSets(with(Arrays.asList(ds1.getDataSetCode(), ds2.getDataSetCode())), + with(false), with(optionsMatcher)); } }); @@ -331,7 +344,7 @@ public class MultiDataSetArchivingFinalizerTest extends AbstractFileSystemTestCa + "Parameters: {original-file-path=" + dataFileInArchive.getPath() + ", replicated-file-path=" + dataFilePartiallyReplicated.getPath() + ", " + "finalizer-polling-time=20000, start-time=" + START_TIME_AS_STRING + ", " - + "finalizer-max-waiting-time=300000, status=AVAILABLE}\n" + + "finalizer-max-waiting-time=300000, status=AVAILABLE, sub-directory=my-group}\n" + "INFO OPERATION.MultiDataSetArchivingFinalizer - Waiting for replication of archive " + "'" + dataFileInArchive.getPath() + "' containing the following data sets: [ds1, ds2]\n" + "INFO OPERATION.MultiDataSetArchivingFinalizer - Condition still not fulfilled after < 1sec, " @@ -349,6 +362,7 @@ public class MultiDataSetArchivingFinalizerTest extends AbstractFileSystemTestCa assertEquals("[[ds1, ds2] - AVAILABLE]", updatedStatus.toString()); assertEquals(false, updatedStatus.get(0).isPresentInArchive()); assertEquals(Arrays.asList(dataFileInArchive, dataFilePartiallyReplicated).toString(), cleaner.toString()); + assertEquals("{" + ArchivingByRequestTask.SUB_DIR_KEY + "=" + MY_GROUP + "}", optionsMatcher.recordedObject().toString()); context.assertIsSatisfied(); } diff --git a/gradle/build.gradle b/gradle/build.gradle index 29025b4ba47a8370422f7f1abeb162b37df86397..0e4ce2edeecaf1767e69dd072898d187fd604d08 100644 --- a/gradle/build.gradle +++ b/gradle/build.gradle @@ -16,5 +16,6 @@ evaluationDependsOn(':ui-test') evaluationDependsOn(':js-test') evaluationDependsOn(':image_readers') evaluationDependsOn(':openbis_oai_pmh') +evaluationDependsOn(':big_data_link_server') apply from: '../gradle/javaproject.gradle' diff --git a/gradle/javaproject.gradle b/gradle/javaproject.gradle index 73ce694547e581f20c30e468e97a9cd41e8d05ae..cadd6d7e1cafdfb1546aa420cfb6920e98c26864 100644 --- a/gradle/javaproject.gradle +++ b/gradle/javaproject.gradle @@ -150,11 +150,13 @@ def calculateBuildInfo() { } else if (isGitProject()) { def gitlogoutput = execute_working_dir('git', ['log', '-1', '--format=%at'], '../' + project.name) project.ext.revisionNumber = Integer.parseInt(gitlogoutput[0]) - def tag = 'git describe --tags --exclude "pybis*"'.execute().text.trim() + def tag = 'git tag -l --points-at HEAD'.execute().text.trim() if (tag == null || tag.isEmpty()) { project.ext.versionNumber = 'SNAPSHOT' + } else if (tag.contains('pybis')) { + throw new GradleException("project must contain a readme file") } else { - project.ext.versionNumber = tag + project.ext.versionNumber = tag } } else { project.ext.revisionNumber = 1 diff --git a/gradle/settings.gradle b/gradle/settings.gradle index bd43b1206319b849e9855c0098d13a5b5c2370ac..94053b08c09bf8d3f178fed9c7981fcc80f24364 100644 --- a/gradle/settings.gradle +++ b/gradle/settings.gradle @@ -1,4 +1,4 @@ includeFlat 'commonbase', 'common', 'openbis_api', 'openbis-common', 'authentication', 'dbmigration', 'openbis', 'datastore_server', 'screening', 'rtd_phosphonetx', 'deep_sequencing_unit', 'rtd_yeastx', 'openbis_standard_technologies', 'installation', 'image_readers', 'ui-test', 'js-test', 'datamover', - 'plasmid', 'rtd_cina', 'openbis_oai_pmh', 'openbis_all' + 'plasmid', 'rtd_cina', 'openbis_oai_pmh', 'big_data_link_server' diff --git a/installation/build.gradle b/installation/build.gradle index 22f373cbdc05f336afd3694c0c69f5d7c09af65e..0744bd71035a3f94336ca5636be8ac34e3c6acd8 100644 --- a/installation/build.gradle +++ b/installation/build.gradle @@ -52,11 +52,13 @@ println "installerDir:${installerDistDir}" println "buildDir:${buildDir}" println "installer:${project.projectDir}/resource/installer" -task copyResources(type: Copy, dependsOn: [compileJava, ':openbis_standard_technologies:zip', ':openbis_standard_technologies:zipDss']) { +task copyResources(type: Copy, dependsOn: [compileJava, ':openbis_standard_technologies:zip', ':openbis_standard_technologies:zipDss', 'openbis_standard_technologies:zipBdlServer']) { from "${project.projectDir}/resource/installer" from "${project.projectDir}/../openbis_standard_technologies/dist/tarball/installer" from zipTree(project(':openbis_standard_technologies').zipDss.archivePath) into installerDistDir + from zipTree(project(':openbis_standard_technologies').zipBdlServer.archivePath) + into installerDistDir from (zipTree(project(':openbis_standard_technologies').zip.archivePath)) { into "openBIS-server" } diff --git a/installation/resource/installer/bin/backup-config.sh b/installation/resource/installer/bin/backup-config.sh index 7c9fa19065b04c51fa42b50f717925b03ee249fd..4fed6f50d32e5c68678330a92c43588210d4a32f 100755 --- a/installation/resource/installer/bin/backup-config.sh +++ b/installation/resource/installer/bin/backup-config.sh @@ -37,6 +37,7 @@ if [ -d $ROOT/openBIS-server ]; then copyFileIfExists $ROOT/openBIS-server/jetty/etc/openbis.conf $CONF/ copyFileIfExists $ROOT/openBIS-server/jetty/bin/jetty.properties $CONF/ copyFileIfExists $ROOT/openBIS-server/jetty/etc/jetty.properties $CONF/ + copyFileIfExists $ROOT/big_data_link_server/config.json $CONF/ cp $ROOT/openBIS-server/jetty/webapps/openbis/custom/welcomePageSimpleGeneric.html $CONF/ # not always present copyIfExists $ROOT/openBIS-server/jetty/etc/openBIS.keystore $CONF/.keystore diff --git a/installation/resource/installer/bin/backup-installation.sh b/installation/resource/installer/bin/backup-installation.sh index 250c3914d9666f2c5aad8e906e8c6b99aaa423c5..2eb5bfc6ae9e5280bd80f7e7a09bd2bdf3585bf5 100755 --- a/installation/resource/installer/bin/backup-installation.sh +++ b/installation/resource/installer/bin/backup-installation.sh @@ -51,6 +51,11 @@ fi echo "mv $ROOT_DIR/datastore_server $BACKUP_DIR/datastore_server" mv $ROOT_DIR/datastore_server $BACKUP_DIR/datastore_server +if [ -d $ROOT_DIR/big_data_link_server ]; then + echo "mv $ROOT_DIR/big_data_link_server $BACKUP_DIR/big_data_link_server" + mv $ROOT_DIR/big_data_link_server $BACKUP_DIR/big_data_link_server +fi + echo "cp -R $ROOT_DIR/core-plugins $BACKUP_DIR/core-plugins" cp -R $ROOT_DIR/core-plugins $BACKUP_DIR/core-plugins rm -rf $BACKUP_DIR/core-plugins/eln-lims/bin diff --git a/installation/resource/installer/bin/chmodx-all-scripts.sh b/installation/resource/installer/bin/chmodx-all-scripts.sh index 72026d62eb2dd88c23ba1546733f63d450076d49..d52c07b00ba806ef27036eaea1e24c4cd3d6a59b 100644 --- a/installation/resource/installer/bin/chmodx-all-scripts.sh +++ b/installation/resource/installer/bin/chmodx-all-scripts.sh @@ -11,3 +11,6 @@ fi # set all scripts executable find $BASE/.. -type f -name "*.sh" -exec chmod 744 {} \; + +# scripts which don't end in .sh +find $BASE/.. -type f -name "big_data_link_server" -exec chmod 744 {} \; diff --git a/installation/resource/installer/bin/restore-config-from-backup.sh b/installation/resource/installer/bin/restore-config-from-backup.sh index 1df8a1f10763629bbebbfcf790791d0c71e5b5b4..0f3b651a728f2b12bc87e3e905f319c3a8687654 100755 --- a/installation/resource/installer/bin/restore-config-from-backup.sh +++ b/installation/resource/installer/bin/restore-config-from-backup.sh @@ -41,6 +41,7 @@ if [ -d $ROOT/openBIS-server ]; then restore $CONF/dss-datasource-mapping $ROOT/openBIS-server/jetty/etc dss-datasource-mapping restore $CONF/capabilities $ROOT/openBIS-server/jetty/etc capabilities restore $CONF/../openBIS-server/jetty/webapps/openbis/custom/welcomePageSimpleGeneric.html $ROOT/openBIS-server/jetty/webapps/openbis/custom welcomePageSimpleGeneric.html + restore $CONF/config.json $ROOT/big_data_link_server config.json copyConfig $CONF/core-plugins "html/etc$" $ROOT/core-plugins copyFolderIfExists $CONF/start.d $ROOT/openBIS-server/jetty/start.d @@ -52,4 +53,4 @@ restore $CONF/dss-service.properties $ROOT/datastore_server/etc service.properti restore $CONF/dss-log.xml $ROOT/datastore_server/etc log.xml restore $CONF/datastore_server.conf $ROOT/datastore_server/etc datastore_server.conf restore $CONF/.keystore $ROOT/datastore_server/etc openBIS.keystore -copyIfExists $CONF/ext-lib $ROOT/datastore_server \ No newline at end of file +copyIfExists $CONF/ext-lib $ROOT/datastore_server diff --git a/installation/resource/installer/install.xml b/installation/resource/installer/install.xml index bc5a002a0c50d96e4c8ed9112ccc2450b883de8d..59ba7cc969eb29fa7b570098c20d5c809b437390 100644 --- a/installation/resource/installer/install.xml +++ b/installation/resource/installer/install.xml @@ -213,6 +213,12 @@ <file src="@{installer.dist.dir}/data" targetdir="$DATA_TMPEXTRACT" condition="isFirstTimeInstallation"/> <parsable targetfile="$DATA_TMPEXTRACT/data/doc/getting-started-with-openBIS.html" condition="isFirstTimeInstallation"/> </pack> + + <pack name="Big Data Link Server" required="no" loose="yes"> + <description>The distributed data store server managing raw data</description> + <file src="@{installer.dist.dir}/big_data_link_server" targetdir="$INSTALL_PATH/servers"/> + </pack> + <pack name="Administration Scripts" required="yes" loose="yes"> <description>Scripts to facilitate openBIS administration</description> diff --git a/installation/settings.gradle b/installation/settings.gradle index f3ba18dec2f78ecabfeff424434de6de820f9cdc..f4f7784b74b2f9f07a0cfe2bdcb319264b4e13e9 100644 --- a/installation/settings.gradle +++ b/installation/settings.gradle @@ -1,4 +1,4 @@ includeFlat 'commonbase', 'common', 'openbis_api', 'openbis-common', 'authentication', 'dbmigration', 'openbis', 'datastore_server', 'screening', 'rtd_yeastx', 'rtd_phosphonetx', 'deep_sequencing_unit', 'plasmid', - 'openbis_standard_technologies' + 'openbis_standard_technologies', 'big_data_link_server' diff --git a/integration-tests/templates/test_openbis_sync/disabled b/integration-tests/templates/test_openbis_sync/disabled deleted file mode 100644 index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0000000000000000000000000000000000000000 diff --git a/integration-tests/test_3v.py b/integration-tests/test_3v.py index 6dcb11c26bf83de61488bcc9eee24de2d5223930..5daf69764644c030e614295bed8eefdf40ef1632 100755 --- a/integration-tests/test_3v.py +++ b/integration-tests/test_3v.py @@ -12,6 +12,7 @@ class TestCase(systemtest.testcase.TestCase): self.installOpenbis('openbis1') self.cloneOpenbisInstance('openbis1', 'openbis2', dataStoreServerOnly=True) openbis1 = self.createOpenbisController('openbis1') + openbis1.asProperties['project-samples-enabled'] = 'true' openbis1.setDummyAuthentication() openbis1.setDataStoreServerUsername('etlserver1') openbis1.createTestDatabase('openbis') diff --git a/integration-tests/test_multi_data_set_archiving.py b/integration-tests/test_multi_data_set_archiving.py index 2abbb964c24a992216e84206ef2e2979b1966f63..c1f45331236ada382921b5bc785a3ca820793949 100755 --- a/integration-tests/test_multi_data_set_archiving.py +++ b/integration-tests/test_multi_data_set_archiving.py @@ -33,6 +33,7 @@ class TestCase(systemtest.testcase.TestCase): util.printWhoAmI() self.installOpenbis() openbisController = self.createOpenbisController(databasesToDrop=['openbis', 'pathinfo', DATASET_MAPPING_DB]) + openbisController.asProperties['project-samples-enabled'] = 'true' openbisController.dssProperties['data-set-command-queue-mapping'] = \ 'archiving:Archiving|Copying data sets to archive|Archiving Finalizer, unarchiving:Unarchiving' os.makedirs("%s/data/archive/tmp" % openbisController.installPath) diff --git a/integration-tests/test_openbis_sync.py b/integration-tests/test_openbis_sync.py index b7fc3a26f9577f581536b0743d38e8090ddd4101..2d5c3850b9ee64b485cc0979475d81d0da7143c1 100755 --- a/integration-tests/test_openbis_sync.py +++ b/integration-tests/test_openbis_sync.py @@ -363,4 +363,4 @@ class GitLabArtifactRepository(GitArtifactRepository): with open('targets/sissource_private-token.txt', 'r') as f: return f.readline().strip() -TestCase(settings, __file__).runTest() \ No newline at end of file +TestCase(settings, __file__).runTest() diff --git a/integration-tests/test_screening.py b/integration-tests/test_screening.py index ca7fed3637fc2cc98ecd88186b951c37408deba6..605b12c79b2b243f8302af43e924e391847949dc 100755 --- a/integration-tests/test_screening.py +++ b/integration-tests/test_screening.py @@ -7,6 +7,7 @@ class TestCase(systemtest.testcase.TestCase): def execute(self): self.installOpenbis(technologies = ['screening']) openbisController = self.createOpenbisController() + openbisController.asProperties['project-samples-enabled'] = 'true' openbisController.createTestDatabase('openbis') openbisController.allUp() openbisController.dropAndWait('data-incoming-analysis.zip', 'incoming-analysis') diff --git a/js-test/servers/common/core-plugins/tests/1/as/webapps/openbis-v3-api-test/html/test/common.js b/js-test/servers/common/core-plugins/tests/1/as/webapps/openbis-v3-api-test/html/test/common.js index a1e3bae12bf103b5bb2753ebf6b18be3b9e82d0f..5819a298be25716525e5f83b98f0b06c8d86b5af 100644 --- a/js-test/servers/common/core-plugins/tests/1/as/webapps/openbis-v3-api-test/html/test/common.js +++ b/js-test/servers/common/core-plugins/tests/1/as/webapps/openbis-v3-api-test/html/test/common.js @@ -224,6 +224,7 @@ define([ 'jquery', 'openbis', 'underscore', 'test/dtos' ], function($, defaultOp this.GetPersonsOperation = dtos.GetPersonsOperation; this.GetExternalDmsOperation = dtos.GetExternalDmsOperation; this.GetSemanticAnnotationsOperation = dtos.GetSemanticAnnotationsOperation; + this.GetServerInformationOperation = dtos.GetServerInformationOperation; this.CreateSpacesOperation = dtos.CreateSpacesOperation; this.CreateProjectsOperation = dtos.CreateProjectsOperation; @@ -247,6 +248,7 @@ define([ 'jquery', 'openbis', 'underscore', 'test/dtos' ], function($, defaultOp this.CreateExternalDmsOperation = dtos.CreateExternalDmsOperation; this.CreateQueriesOperation = dtos.CreateQueriesOperation; this.CreateCodesOperation = dtos.CreateCodesOperation; + this.CreatePermIdsOperation = dtos.CreatePermIdsOperation; this.UpdateSpacesOperation = dtos.UpdateSpacesOperation; this.UpdateProjectsOperation = dtos.UpdateProjectsOperation; diff --git a/js-test/servers/common/core-plugins/tests/1/as/webapps/openbis-v3-api-test/html/test/dtos.js b/js-test/servers/common/core-plugins/tests/1/as/webapps/openbis-v3-api-test/html/test/dtos.js index 2ba17e714118eb15221a2cfddaf94b0a66ca5859..8312d6f8fa81129a81066bc9472010aeba7d05a8 100644 --- a/js-test/servers/common/core-plugins/tests/1/as/webapps/openbis-v3-api-test/html/test/dtos.js +++ b/js-test/servers/common/core-plugins/tests/1/as/webapps/openbis-v3-api-test/html/test/dtos.js @@ -121,6 +121,8 @@ var sources = [ 'as/dto/common/fetchoptions/EntityWithPropertiesSortOptions', 'as/dto/common/fetchoptions/Sorting', 'as/dto/common/fetchoptions/SortOrder', + 'as/dto/common/get/GetServerInformationOperation', + 'as/dto/common/get/GetServerInformationOperationResult', 'as/dto/common/id/CreationId', 'as/dto/common/search/AnyFieldSearchCriteria', 'as/dto/common/search/AnyPropertySearchCriteria', @@ -236,6 +238,7 @@ var sources = [ 'as/dto/dataset/search/LocationSearchCriteria', 'as/dto/dataset/search/LocatorTypeSearchCriteria', 'as/dto/dataset/search/PhysicalDataSearchCriteria', + 'as/dto/dataset/search/ArchivingRequestedSearchCriteria', 'as/dto/dataset/search/PresentInArchiveSearchCriteria', 'as/dto/dataset/search/ShareIdSearchCriteria', 'as/dto/dataset/search/SizeSearchCriteria', @@ -281,6 +284,8 @@ var sources = [ 'as/dto/entity/create/CreateCodesOperation', 'as/dto/entity/create/CreateCodesOperationResult', + 'as/dto/entity/create/CreatePermIdsOperation', + 'as/dto/entity/create/CreatePermIdsOperationResult', 'as/dto/entitytype/id/EntityTypePermId', 'as/dto/entitytype/fetchoptions/EntityTypeFetchOptions', diff --git a/js-test/servers/common/core-plugins/tests/1/as/webapps/openbis-v3-api-test/html/test/openbis-execute-operations.js b/js-test/servers/common/core-plugins/tests/1/as/webapps/openbis-v3-api-test/html/test/openbis-execute-operations.js index e8c850f1d779473122e5980c183df2a8b7243336..3bab206b13bd1d66e70c40e3d07198913dea4ccb 100644 --- a/js-test/servers/common/core-plugins/tests/1/as/webapps/openbis-v3-api-test/html/test/openbis-execute-operations.js +++ b/js-test/servers/common/core-plugins/tests/1/as/webapps/openbis-v3-api-test/html/test/openbis-execute-operations.js @@ -78,10 +78,15 @@ define([ 'jquery', 'openbis', 'test/common' ], function($, openbis, common) { }); } + this.getServerInformation = function() { + return this._executeOperation(new c.GetServerInformationOperation()).then(function() { + return results.getResults()[0].getServerInformation(); + }); + } + this.createPermIdStrings = function(count) { - var thisFacade = this; - return this._openbis.createPermIdStrings(count).done(function(permIds) { - return permIds; + return this._executeOperation(new c.CreatePermIdsOperation(count)).then(function(results) { + return results.getResults()[0].getPermIds(); }); } diff --git a/js-test/servers/common/core-plugins/tests/1/as/webapps/openbis-v3-api-test/html/test/test-get.js b/js-test/servers/common/core-plugins/tests/1/as/webapps/openbis-v3-api-test/html/test/test-get.js index 0472909ea1c7d5c8d68abc04fb8bf16df2651683..0a42cbbdbad41033fb37180a53ab0c500162caf4 100644 --- a/js-test/servers/common/core-plugins/tests/1/as/webapps/openbis-v3-api-test/html/test/test-get.js +++ b/js-test/servers/common/core-plugins/tests/1/as/webapps/openbis-v3-api-test/html/test/test-get.js @@ -811,6 +811,23 @@ define([ 'jquery', 'underscore', 'openbis', 'test/openbis-execute-operations', ' testGet(c, fCreate, fGet, fGetEmptyFetchOptions, fechOptionsTestConfig); }); + QUnit.test("getServerInformation()", function(assert) { + var c = new common(assert); + c.start(); + + c.createFacadeAndLogin().then(function(facade) { + return facade.getServerInformation().then(function(serverInformation) { + c.assertTrue(serverInformation != null); + c.assertEqual(serverInformation["api-version"], "3.5", "api-version"); + c.assertEqual(serverInformation["project-samples-enabled"], "false", "project-samples-enabled"); + c.finish(); + }); + }).fail(function(error) { + c.fail(error.message); + c.finish(); + }); + }); + } return function() { diff --git a/js-test/servers/common/core-plugins/tests/1/as/webapps/openbis-v3-api-test/html/test/test-search.js b/js-test/servers/common/core-plugins/tests/1/as/webapps/openbis-v3-api-test/html/test/test-search.js index 28af639aeb993940b1da8df63ce063fbd3e9ede5..53ef0783e6cc36e5a04c828ce77b97393437e5a6 100644 --- a/js-test/servers/common/core-plugins/tests/1/as/webapps/openbis-v3-api-test/html/test/test-search.js +++ b/js-test/servers/common/core-plugins/tests/1/as/webapps/openbis-v3-api-test/html/test/test-search.js @@ -929,6 +929,25 @@ define([ 'jquery', 'underscore', 'openbis', 'test/openbis-execute-operations', ' testSearch(c, fSearch, fCheck); }); + QUnit.test("searchDataSets() withPhysicalData with archiving requested", function(assert) { + var c = new common(assert, openbis); + + var fSearch = function(facade) { + var criteria = new c.DataSetSearchCriteria(); + criteria.withCode().thatStartsWith("2013"); + var pdCriteria = criteria.withPhysicalData(); + pdCriteria.withArchivingRequested().thatEquals(true); + + return facade.searchDataSets(criteria, c.createDataSetFetchOptions()); + } + + var fCheck = function(facade, dataSets) { + c.assertObjectsWithValues(dataSets, "code", [ "20130412152036861-380" ]); + } + + testSearch(c, fSearch, fCheck); + }); + QUnit.test("searchDataSets() withLinkedData", function(assert) { var c = new common(assert, openbis); diff --git a/js-test/servers/common/core-plugins/tests/1/as/webapps/openbis-v3-api-test/html/test/test-update.js b/js-test/servers/common/core-plugins/tests/1/as/webapps/openbis-v3-api-test/html/test/test-update.js index c98212f2919685e8eb87fed46e7587851649181e..5bb5f20e5057bab871a129e1782d6f135b1b74d3 100644 --- a/js-test/servers/common/core-plugins/tests/1/as/webapps/openbis-v3-api-test/html/test/test-update.js +++ b/js-test/servers/common/core-plugins/tests/1/as/webapps/openbis-v3-api-test/html/test/test-update.js @@ -518,6 +518,7 @@ define([ 'jquery', 'underscore', 'openbis', 'test/openbis-execute-operations', ' var fUpdate = function(facade, permId) { var physicalUpdate = new c.PhysicalDataUpdate(); physicalUpdate.setFileFormatTypeId(new c.FileFormatTypePermId("TIFF")); + physicalUpdate.setArchivingRequested(true); var update = new c.DataSetUpdate(); update.setDataSetId(permId); @@ -531,6 +532,7 @@ define([ 'jquery', 'underscore', 'openbis', 'test/openbis-execute-operations', ' c.assertEqual(dataSet.getCode(), code, "Code"); c.assertEqual(dataSet.getProperties()["NOTES"], "new 409 description", "Property NOTES"); c.assertEqual(dataSet.getPhysicalData().getFileFormatType().getCode(), "TIFF", "File format type"); + c.assertEqual(dataSet.getPhysicalData().isArchivingRequested(), true, "Archiving requested"); } testUpdate(c, fCreate, fUpdate, c.findDataSet, fCheck); diff --git a/js-test/servers/common/openBIS-server/db/openbis_test_js_common.sql b/js-test/servers/common/openBIS-server/db/openbis_test_js_common.sql index e7fd3b516b65b97cc8f6fcbacb52d3cefe62371a..d2c41870e712b0f94ab7a7b0350c7a7a8a1dcc22 100644 --- a/js-test/servers/common/openBIS-server/db/openbis_test_js_common.sql +++ b/js-test/servers/common/openBIS-server/db/openbis_test_js_common.sql @@ -2,13 +2,15 @@ -- PostgreSQL database dump -- --- Dumped from database version 9.5.0 --- Dumped by pg_dump version 9.5.0 +-- Dumped from database version 9.6.9 +-- Dumped by pg_dump version 9.6.9 SET statement_timeout = 0; SET lock_timeout = 0; +SET idle_in_transaction_session_timeout = 0; SET client_encoding = 'UTF8'; SET standard_conforming_strings = on; +SELECT pg_catalog.set_config('search_path', '', false); SET check_function_bodies = false; SET client_min_messages = warning; SET row_security = off; @@ -27,13 +29,11 @@ CREATE EXTENSION IF NOT EXISTS plpgsql WITH SCHEMA pg_catalog; COMMENT ON EXTENSION plpgsql IS 'PL/pgSQL procedural language'; -SET search_path = public, pg_catalog; - -- -- Name: archiving_status; Type: DOMAIN; Schema: public; Owner: - -- -CREATE DOMAIN archiving_status AS character varying(100) +CREATE DOMAIN public.archiving_status AS character varying(100) CONSTRAINT archiving_status_check CHECK (((VALUE)::text = ANY (ARRAY[('LOCKED'::character varying)::text, ('AVAILABLE'::character varying)::text, ('ARCHIVED'::character varying)::text, ('ARCHIVE_PENDING'::character varying)::text, ('UNARCHIVE_PENDING'::character varying)::text, ('BACKUP_PENDING'::character varying)::text]))); @@ -41,7 +41,7 @@ CREATE DOMAIN archiving_status AS character varying(100) -- Name: authorization_role; Type: DOMAIN; Schema: public; Owner: - -- -CREATE DOMAIN authorization_role AS character varying(40) +CREATE DOMAIN public.authorization_role AS character varying(40) CONSTRAINT authorization_role_check CHECK (((VALUE)::text = ANY (ARRAY[('ADMIN'::character varying)::text, ('POWER_USER'::character varying)::text, ('USER'::character varying)::text, ('OBSERVER'::character varying)::text, ('ETL_SERVER'::character varying)::text]))); @@ -49,14 +49,14 @@ CREATE DOMAIN authorization_role AS character varying(40) -- Name: boolean_char; Type: DOMAIN; Schema: public; Owner: - -- -CREATE DOMAIN boolean_char AS boolean DEFAULT false; +CREATE DOMAIN public.boolean_char AS boolean DEFAULT false; -- -- Name: boolean_char_or_unknown; Type: DOMAIN; Schema: public; Owner: - -- -CREATE DOMAIN boolean_char_or_unknown AS character(1) DEFAULT 'U'::bpchar +CREATE DOMAIN public.boolean_char_or_unknown AS character(1) DEFAULT 'U'::bpchar CONSTRAINT boolean_char_or_unknown_check CHECK ((VALUE = ANY (ARRAY['F'::bpchar, 'T'::bpchar, 'U'::bpchar]))); @@ -64,21 +64,21 @@ CREATE DOMAIN boolean_char_or_unknown AS character(1) DEFAULT 'U'::bpchar -- Name: code; Type: DOMAIN; Schema: public; Owner: - -- -CREATE DOMAIN code AS character varying(60); +CREATE DOMAIN public.code AS character varying(100); -- -- Name: column_label; Type: DOMAIN; Schema: public; Owner: - -- -CREATE DOMAIN column_label AS character varying(128); +CREATE DOMAIN public.column_label AS character varying(128); -- -- Name: data_set_kind; Type: DOMAIN; Schema: public; Owner: - -- -CREATE DOMAIN data_set_kind AS character varying(40) +CREATE DOMAIN public.data_set_kind AS character varying(40) CONSTRAINT data_set_kind_check CHECK (((VALUE)::text = ANY (ARRAY[('PHYSICAL'::character varying)::text, ('LINK'::character varying)::text, ('CONTAINER'::character varying)::text]))); @@ -86,7 +86,7 @@ CREATE DOMAIN data_set_kind AS character varying(40) -- Name: data_store_service_kind; Type: DOMAIN; Schema: public; Owner: - -- -CREATE DOMAIN data_store_service_kind AS character varying(40) +CREATE DOMAIN public.data_store_service_kind AS character varying(40) CONSTRAINT data_store_service_kind_check CHECK (((VALUE)::text = ANY (ARRAY[('PROCESSING'::character varying)::text, ('QUERIES'::character varying)::text]))); @@ -94,7 +94,7 @@ CREATE DOMAIN data_store_service_kind AS character varying(40) -- Name: data_store_service_reporting_plugin_type; Type: DOMAIN; Schema: public; Owner: - -- -CREATE DOMAIN data_store_service_reporting_plugin_type AS character varying(40) +CREATE DOMAIN public.data_store_service_reporting_plugin_type AS character varying(40) CONSTRAINT data_store_service_reporting_plugin_type_check CHECK (((VALUE)::text = ANY (ARRAY[('TABLE_MODEL'::character varying)::text, ('DSS_LINK'::character varying)::text, ('AGGREGATION_TABLE_MODEL'::character varying)::text]))); @@ -102,14 +102,14 @@ CREATE DOMAIN data_store_service_reporting_plugin_type AS character varying(40) -- Name: description_2000; Type: DOMAIN; Schema: public; Owner: - -- -CREATE DOMAIN description_2000 AS character varying(2000); +CREATE DOMAIN public.description_2000 AS character varying(2000); -- -- Name: edms_address_type; Type: DOMAIN; Schema: public; Owner: - -- -CREATE DOMAIN edms_address_type AS text +CREATE DOMAIN public.edms_address_type AS text CONSTRAINT edms_address_type_check CHECK ((VALUE = ANY (ARRAY['OPENBIS'::text, 'URL'::text, 'FILE_SYSTEM'::text]))); @@ -117,7 +117,7 @@ CREATE DOMAIN edms_address_type AS text -- Name: entity_kind; Type: DOMAIN; Schema: public; Owner: - -- -CREATE DOMAIN entity_kind AS character varying(40) +CREATE DOMAIN public.entity_kind AS character varying(40) CONSTRAINT entity_kind_check CHECK (((VALUE)::text = ANY (ARRAY[('SAMPLE'::character varying)::text, ('EXPERIMENT'::character varying)::text, ('DATA_SET'::character varying)::text, ('MATERIAL'::character varying)::text]))); @@ -125,7 +125,7 @@ CREATE DOMAIN entity_kind AS character varying(40) -- Name: event_type; Type: DOMAIN; Schema: public; Owner: - -- -CREATE DOMAIN event_type AS character varying(40) +CREATE DOMAIN public.event_type AS character varying(40) CONSTRAINT event_type_check CHECK (((VALUE)::text = ANY (ARRAY[('DELETION'::character varying)::text, ('MOVEMENT'::character varying)::text]))); @@ -133,42 +133,42 @@ CREATE DOMAIN event_type AS character varying(40) -- Name: file; Type: DOMAIN; Schema: public; Owner: - -- -CREATE DOMAIN file AS bytea; +CREATE DOMAIN public.file AS bytea; -- -- Name: file_name; Type: DOMAIN; Schema: public; Owner: - -- -CREATE DOMAIN file_name AS character varying(255); +CREATE DOMAIN public.file_name AS character varying(255); -- -- Name: grid_expression; Type: DOMAIN; Schema: public; Owner: - -- -CREATE DOMAIN grid_expression AS character varying(2000); +CREATE DOMAIN public.grid_expression AS character varying(2000); -- -- Name: grid_id; Type: DOMAIN; Schema: public; Owner: - -- -CREATE DOMAIN grid_id AS character varying(200); +CREATE DOMAIN public.grid_id AS character varying(200); -- -- Name: identifier; Type: DOMAIN; Schema: public; Owner: - -- -CREATE DOMAIN identifier AS character varying(200); +CREATE DOMAIN public.identifier AS character varying(200); -- -- Name: location_type; Type: DOMAIN; Schema: public; Owner: - -- -CREATE DOMAIN location_type AS text +CREATE DOMAIN public.location_type AS text CONSTRAINT location_type_check CHECK ((VALUE = ANY (ARRAY['OPENBIS'::text, 'URL'::text, 'FILE_SYSTEM_PLAIN'::text, 'FILE_SYSTEM_GIT'::text]))); @@ -176,30 +176,30 @@ CREATE DOMAIN location_type AS text -- Name: object_name; Type: DOMAIN; Schema: public; Owner: - -- -CREATE DOMAIN object_name AS character varying(50); +CREATE DOMAIN public.object_name AS character varying(50); -- -- Name: operation_execution_availability; Type: DOMAIN; Schema: public; Owner: - -- -CREATE DOMAIN operation_execution_availability AS character varying(40) - CONSTRAINT operation_execution_availability_check CHECK (((VALUE)::text = ANY ((ARRAY['AVAILABLE'::character varying, 'DELETE_PENDING'::character varying, 'DELETED'::character varying, 'TIME_OUT_PENDING'::character varying, 'TIMED_OUT'::character varying])::text[]))); +CREATE DOMAIN public.operation_execution_availability AS character varying(40) + CONSTRAINT operation_execution_availability_check CHECK (((VALUE)::text = ANY (ARRAY[('AVAILABLE'::character varying)::text, ('DELETE_PENDING'::character varying)::text, ('DELETED'::character varying)::text, ('TIME_OUT_PENDING'::character varying)::text, ('TIMED_OUT'::character varying)::text]))); -- -- Name: operation_execution_state; Type: DOMAIN; Schema: public; Owner: - -- -CREATE DOMAIN operation_execution_state AS character varying(40) - CONSTRAINT operation_execution_state_check CHECK (((VALUE)::text = ANY ((ARRAY['NEW'::character varying, 'SCHEDULED'::character varying, 'RUNNING'::character varying, 'FINISHED'::character varying, 'FAILED'::character varying])::text[]))); +CREATE DOMAIN public.operation_execution_state AS character varying(40) + CONSTRAINT operation_execution_state_check CHECK (((VALUE)::text = ANY (ARRAY[('NEW'::character varying)::text, ('SCHEDULED'::character varying)::text, ('RUNNING'::character varying)::text, ('FINISHED'::character varying)::text, ('FAILED'::character varying)::text]))); -- -- Name: ordinal_int; Type: DOMAIN; Schema: public; Owner: - -- -CREATE DOMAIN ordinal_int AS bigint +CREATE DOMAIN public.ordinal_int AS bigint CONSTRAINT ordinal_int_check CHECK ((VALUE > 0)); @@ -207,7 +207,7 @@ CREATE DOMAIN ordinal_int AS bigint -- Name: plugin_type; Type: DOMAIN; Schema: public; Owner: - -- -CREATE DOMAIN plugin_type AS character varying(40) +CREATE DOMAIN public.plugin_type AS character varying(40) CONSTRAINT plugin_type_check CHECK (((VALUE)::text = ANY (ARRAY[('JYTHON'::character varying)::text, ('PREDEPLOYED'::character varying)::text]))); @@ -215,7 +215,7 @@ CREATE DOMAIN plugin_type AS character varying(40) -- Name: query_type; Type: DOMAIN; Schema: public; Owner: - -- -CREATE DOMAIN query_type AS character varying(40) +CREATE DOMAIN public.query_type AS character varying(40) CONSTRAINT query_type_check CHECK (((VALUE)::text = ANY (ARRAY[('GENERIC'::character varying)::text, ('EXPERIMENT'::character varying)::text, ('SAMPLE'::character varying)::text, ('DATA_SET'::character varying)::text, ('MATERIAL'::character varying)::text]))); @@ -223,14 +223,14 @@ CREATE DOMAIN query_type AS character varying(40) -- Name: real_value; Type: DOMAIN; Schema: public; Owner: - -- -CREATE DOMAIN real_value AS real; +CREATE DOMAIN public.real_value AS real; -- -- Name: script_type; Type: DOMAIN; Schema: public; Owner: - -- -CREATE DOMAIN script_type AS character varying(40) +CREATE DOMAIN public.script_type AS character varying(40) CONSTRAINT script_type_check CHECK (((VALUE)::text = ANY (ARRAY[('DYNAMIC_PROPERTY'::character varying)::text, ('MANAGED_PROPERTY'::character varying)::text, ('ENTITY_VALIDATION'::character varying)::text]))); @@ -238,49 +238,49 @@ CREATE DOMAIN script_type AS character varying(40) -- Name: tech_id; Type: DOMAIN; Schema: public; Owner: - -- -CREATE DOMAIN tech_id AS bigint; +CREATE DOMAIN public.tech_id AS bigint; -- -- Name: text_value; Type: DOMAIN; Schema: public; Owner: - -- -CREATE DOMAIN text_value AS text; +CREATE DOMAIN public.text_value AS text; -- -- Name: time_stamp; Type: DOMAIN; Schema: public; Owner: - -- -CREATE DOMAIN time_stamp AS timestamp with time zone; +CREATE DOMAIN public.time_stamp AS timestamp with time zone; -- -- Name: time_stamp_dfl; Type: DOMAIN; Schema: public; Owner: - -- -CREATE DOMAIN time_stamp_dfl AS timestamp with time zone NOT NULL DEFAULT now(); +CREATE DOMAIN public.time_stamp_dfl AS timestamp with time zone NOT NULL DEFAULT now(); -- -- Name: title_100; Type: DOMAIN; Schema: public; Owner: - -- -CREATE DOMAIN title_100 AS character varying(100); +CREATE DOMAIN public.title_100 AS character varying(100); -- -- Name: user_id; Type: DOMAIN; Schema: public; Owner: - -- -CREATE DOMAIN user_id AS character varying(50); +CREATE DOMAIN public.user_id AS character varying(50); -- -- Name: check_created_or_modified_data_set_owner_is_alive(); Type: FUNCTION; Schema: public; Owner: - -- -CREATE FUNCTION check_created_or_modified_data_set_owner_is_alive() RETURNS trigger +CREATE FUNCTION public.check_created_or_modified_data_set_owner_is_alive() RETURNS trigger LANGUAGE plpgsql AS $$ DECLARE @@ -320,28 +320,28 @@ $$; -- Name: check_created_or_modified_sample_owner_is_alive(); Type: FUNCTION; Schema: public; Owner: - -- -CREATE FUNCTION check_created_or_modified_sample_owner_is_alive() RETURNS trigger +CREATE FUNCTION public.check_created_or_modified_sample_owner_is_alive() RETURNS trigger LANGUAGE plpgsql AS $$ DECLARE - owner_code CODE; - owner_del_id TECH_ID; + owner_code CODE; + owner_del_id TECH_ID; BEGIN - IF (NEW.del_id IS NOT NULL) THEN - RETURN NEW; - END IF; + IF (NEW.del_id IS NOT NULL) THEN + RETURN NEW; + END IF; -- check experiment (can't be deleted) IF (NEW.expe_id IS NOT NULL) THEN - SELECT del_id, code INTO owner_del_id, owner_code - FROM experiments - WHERE id = NEW.expe_id; - IF (owner_del_id IS NOT NULL) THEN - RAISE EXCEPTION 'Sample (Code: %) cannot be connected to an Experiment (Code: %) %.', - NEW.code, owner_code, deletion_description(owner_del_id); - END IF; - END IF; - RETURN NEW; + SELECT del_id, code INTO owner_del_id, owner_code + FROM experiments + WHERE id = NEW.expe_id; + IF (owner_del_id IS NOT NULL) THEN + RAISE EXCEPTION 'Sample (Code: %) cannot be connected to an Experiment (Code: %) %.', + NEW.code, owner_code, deletion_description(owner_del_id); + END IF; + END IF; + RETURN NEW; END; $$; @@ -350,7 +350,7 @@ $$; -- Name: check_data_set_kind_link(); Type: FUNCTION; Schema: public; Owner: - -- -CREATE FUNCTION check_data_set_kind_link() RETURNS trigger +CREATE FUNCTION public.check_data_set_kind_link() RETURNS trigger LANGUAGE plpgsql AS $$ DECLARE @@ -358,10 +358,10 @@ DECLARE BEGIN SELECT data_set_kind INTO kind FROM data_all - WHERE id = NEW.data_id; + WHERE id = NEW.id; IF (kind <> 'LINK') THEN RAISE EXCEPTION 'Link data (Data Set Code: %) must reference a data set of kind LINK (is %).', - NEW.data_id, kind; + NEW.id, kind; END IF; RETURN NEW; END; @@ -372,7 +372,7 @@ $$; -- Name: check_data_set_kind_physical(); Type: FUNCTION; Schema: public; Owner: - -- -CREATE FUNCTION check_data_set_kind_physical() RETURNS trigger +CREATE FUNCTION public.check_data_set_kind_physical() RETURNS trigger LANGUAGE plpgsql AS $$ DECLARE @@ -380,10 +380,10 @@ DECLARE BEGIN SELECT data_set_kind INTO kind FROM data_all - WHERE id = NEW.data_id; + WHERE id = NEW.id; IF (kind <> 'PHYSICAL') THEN RAISE EXCEPTION 'External data (Data Set Code: %) must reference a data set of kind PHYSICAL (is %).', - NEW.data_id, kind; + NEW.id, kind; END IF; RETURN NEW; END; @@ -394,7 +394,7 @@ $$; -- Name: check_deletion_consistency_on_experiment_deletion(); Type: FUNCTION; Schema: public; Owner: - -- -CREATE FUNCTION check_deletion_consistency_on_experiment_deletion() RETURNS trigger +CREATE FUNCTION public.check_deletion_consistency_on_experiment_deletion() RETURNS trigger LANGUAGE plpgsql AS $$ DECLARE @@ -427,7 +427,7 @@ $$; -- Name: check_deletion_consistency_on_sample_deletion(); Type: FUNCTION; Schema: public; Owner: - -- -CREATE FUNCTION check_deletion_consistency_on_sample_deletion() RETURNS trigger +CREATE FUNCTION public.check_deletion_consistency_on_sample_deletion() RETURNS trigger LANGUAGE plpgsql AS $$ DECLARE @@ -461,7 +461,7 @@ $$; -- Name: content_copies_location_type_check(); Type: FUNCTION; Schema: public; Owner: - -- -CREATE FUNCTION content_copies_location_type_check() RETURNS trigger +CREATE FUNCTION public.content_copies_location_type_check() RETURNS trigger LANGUAGE plpgsql AS $$ DECLARE @@ -486,7 +486,7 @@ $$; -- Name: content_copies_uniqueness_check(); Type: FUNCTION; Schema: public; Owner: - -- -CREATE FUNCTION content_copies_uniqueness_check() RETURNS trigger +CREATE FUNCTION public.content_copies_uniqueness_check() RETURNS trigger LANGUAGE plpgsql AS $$ BEGIN @@ -505,7 +505,7 @@ $$; -- Name: controlled_vocabulary_check(); Type: FUNCTION; Schema: public; Owner: - -- -CREATE FUNCTION controlled_vocabulary_check() RETURNS trigger +CREATE FUNCTION public.controlled_vocabulary_check() RETURNS trigger LANGUAGE plpgsql AS $$ DECLARE @@ -531,7 +531,7 @@ $$; -- Name: data_exp_or_sample_link_check(); Type: FUNCTION; Schema: public; Owner: - -- -CREATE FUNCTION data_exp_or_sample_link_check() RETURNS trigger +CREATE FUNCTION public.data_exp_or_sample_link_check() RETURNS trigger LANGUAGE plpgsql AS $$ DECLARE @@ -557,7 +557,7 @@ $$; -- Name: data_set_property_with_material_data_type_check(); Type: FUNCTION; Schema: public; Owner: - -- -CREATE FUNCTION data_set_property_with_material_data_type_check() RETURNS trigger +CREATE FUNCTION public.data_set_property_with_material_data_type_check() RETURNS trigger LANGUAGE plpgsql AS $$ DECLARE @@ -565,21 +565,21 @@ DECLARE v_type_id_prop CODE; BEGIN if NEW.mate_prop_id IS NOT NULL then - -- find material type id of the property type - select pt.maty_prop_id into v_type_id_prop - from data_set_type_property_types dstpt, property_types pt - where NEW.dstpt_id = dstpt.id AND dstpt.prty_id = pt.id; - - if v_type_id_prop IS NOT NULL then - -- find material type id of the material which consists the entity's property value - select entity.maty_id into v_type_id - from materials entity - where NEW.mate_prop_id = entity.id; - if v_type_id != v_type_id_prop then - RAISE EXCEPTION 'Insert/Update of property value referencing material (id: %) failed, as referenced material type is different than expected (id %, expected id: %).', - NEW.mate_prop_id, v_type_id, v_type_id_prop; - end if; - end if; + -- find material type id of the property type + select pt.maty_prop_id into v_type_id_prop + from data_set_type_property_types dstpt, property_types pt + where NEW.dstpt_id = dstpt.id AND dstpt.prty_id = pt.id; + + if v_type_id_prop IS NOT NULL then + -- find material type id of the material which consists the entity's property value + select entity.maty_id into v_type_id + from materials entity + where NEW.mate_prop_id = entity.id; + if v_type_id != v_type_id_prop then + RAISE EXCEPTION 'Insert/Update of property value referencing material (id: %) failed, as referenced material type is different than expected (id %, expected id: %).', + NEW.mate_prop_id, v_type_id, v_type_id_prop; + end if; + end if; end if; RETURN NEW; END; @@ -587,10 +587,10 @@ $$; -- --- Name: deletion_description(tech_id); Type: FUNCTION; Schema: public; Owner: - +-- Name: deletion_description(public.tech_id); Type: FUNCTION; Schema: public; Owner: - -- -CREATE FUNCTION deletion_description(del_id tech_id) RETURNS character varying +CREATE FUNCTION public.deletion_description(del_id public.tech_id) RETURNS character varying LANGUAGE plpgsql AS $$ DECLARE @@ -611,7 +611,7 @@ $$; -- Name: disable_project_level_samples(); Type: FUNCTION; Schema: public; Owner: - -- -CREATE FUNCTION disable_project_level_samples() RETURNS trigger +CREATE FUNCTION public.disable_project_level_samples() RETURNS trigger LANGUAGE plpgsql AS $$ BEGIN @@ -628,7 +628,7 @@ $$; -- Name: experiment_property_with_material_data_type_check(); Type: FUNCTION; Schema: public; Owner: - -- -CREATE FUNCTION experiment_property_with_material_data_type_check() RETURNS trigger +CREATE FUNCTION public.experiment_property_with_material_data_type_check() RETURNS trigger LANGUAGE plpgsql AS $$ DECLARE @@ -636,21 +636,21 @@ DECLARE v_type_id_prop CODE; BEGIN if NEW.mate_prop_id IS NOT NULL then - -- find material type id of the property type - select pt.maty_prop_id into v_type_id_prop - from experiment_type_property_types etpt, property_types pt - where NEW.etpt_id = etpt.id AND etpt.prty_id = pt.id; - - if v_type_id_prop IS NOT NULL then - -- find material type id of the material which consists the entity's property value - select entity.maty_id into v_type_id - from materials entity - where NEW.mate_prop_id = entity.id; - if v_type_id != v_type_id_prop then - RAISE EXCEPTION 'Insert/Update of property value referencing material (id: %) failed, as referenced material type is different than expected (id %, expected id: %).', - NEW.mate_prop_id, v_type_id, v_type_id_prop; - end if; - end if; + -- find material type id of the property type + select pt.maty_prop_id into v_type_id_prop + from experiment_type_property_types etpt, property_types pt + where NEW.etpt_id = etpt.id AND etpt.prty_id = pt.id; + + if v_type_id_prop IS NOT NULL then + -- find material type id of the material which consists the entity's property value + select entity.maty_id into v_type_id + from materials entity + where NEW.mate_prop_id = entity.id; + if v_type_id != v_type_id_prop then + RAISE EXCEPTION 'Insert/Update of property value referencing material (id: %) failed, as referenced material type is different than expected (id %, expected id: %).', + NEW.mate_prop_id, v_type_id, v_type_id_prop; + end if; + end if; end if; RETURN NEW; END; @@ -661,7 +661,7 @@ $$; -- Name: external_data_storage_format_check(); Type: FUNCTION; Schema: public; Owner: - -- -CREATE FUNCTION external_data_storage_format_check() RETURNS trigger +CREATE FUNCTION public.external_data_storage_format_check() RETURNS trigger LANGUAGE plpgsql AS $$ DECLARE @@ -674,7 +674,7 @@ BEGIN id = (select covo_id from controlled_vocabulary_terms where id = NEW.cvte_id_stor_fmt); -- Check if the data storage format is a term of the controlled vocabulary "STORAGE_FORMAT" if v_covo_code != 'STORAGE_FORMAT' then - select code into data_code from data_all where id = NEW.data_id; + select code into data_code from data_all where id = NEW.id; RAISE EXCEPTION 'Insert/Update of Data (Code: %) failed, as its Storage Format is %, but is required to be STORAGE_FORMAT.', data_code, v_covo_code; end if; @@ -688,7 +688,7 @@ $$; -- Name: material_property_with_material_data_type_check(); Type: FUNCTION; Schema: public; Owner: - -- -CREATE FUNCTION material_property_with_material_data_type_check() RETURNS trigger +CREATE FUNCTION public.material_property_with_material_data_type_check() RETURNS trigger LANGUAGE plpgsql AS $$ DECLARE @@ -696,21 +696,21 @@ DECLARE v_type_id_prop CODE; BEGIN if NEW.mate_prop_id IS NOT NULL then - -- find material type id of the property type - select pt.maty_prop_id into v_type_id_prop - from material_type_property_types etpt, property_types pt - where NEW.mtpt_id = etpt.id AND etpt.prty_id = pt.id; - - if v_type_id_prop IS NOT NULL then - -- find material type id of the material which consists the entity's property value - select entity.maty_id into v_type_id - from materials entity - where NEW.mate_prop_id = entity.id; - if v_type_id != v_type_id_prop then - RAISE EXCEPTION 'Insert/Update of property value referencing material (id: %) failed, as referenced material type is different than expected (id %, expected id: %).', - NEW.mate_prop_id, v_type_id, v_type_id_prop; - end if; - end if; + -- find material type id of the property type + select pt.maty_prop_id into v_type_id_prop + from material_type_property_types etpt, property_types pt + where NEW.mtpt_id = etpt.id AND etpt.prty_id = pt.id; + + if v_type_id_prop IS NOT NULL then + -- find material type id of the material which consists the entity's property value + select entity.maty_id into v_type_id + from materials entity + where NEW.mate_prop_id = entity.id; + if v_type_id != v_type_id_prop then + RAISE EXCEPTION 'Insert/Update of property value referencing material (id: %) failed, as referenced material type is different than expected (id %, expected id: %).', + NEW.mate_prop_id, v_type_id, v_type_id_prop; + end if; + end if; end if; RETURN NEW; END; @@ -721,7 +721,7 @@ $$; -- Name: preserve_deletion_consistency_on_data_set_relationships(); Type: FUNCTION; Schema: public; Owner: - -- -CREATE FUNCTION preserve_deletion_consistency_on_data_set_relationships() RETURNS trigger +CREATE FUNCTION public.preserve_deletion_consistency_on_data_set_relationships() RETURNS trigger LANGUAGE plpgsql AS $$ DECLARE @@ -749,7 +749,7 @@ $$; -- Name: preserve_deletion_consistency_on_sample_relationships(); Type: FUNCTION; Schema: public; Owner: - -- -CREATE FUNCTION preserve_deletion_consistency_on_sample_relationships() RETURNS trigger +CREATE FUNCTION public.preserve_deletion_consistency_on_sample_relationships() RETURNS trigger LANGUAGE plpgsql AS $$ DECLARE @@ -777,7 +777,7 @@ $$; -- Name: rename_sequence(character varying, character varying); Type: FUNCTION; Schema: public; Owner: - -- -CREATE FUNCTION rename_sequence(old_name character varying, new_name character varying) RETURNS integer +CREATE FUNCTION public.rename_sequence(old_name character varying, new_name character varying) RETURNS integer LANGUAGE plpgsql AS $$ DECLARE @@ -795,7 +795,7 @@ $$; -- Name: sample_fill_code_unique_check(); Type: FUNCTION; Schema: public; Owner: - -- -CREATE FUNCTION sample_fill_code_unique_check() RETURNS trigger +CREATE FUNCTION public.sample_fill_code_unique_check() RETURNS trigger LANGUAGE plpgsql AS $$ BEGIN @@ -809,7 +809,7 @@ $$; -- Name: sample_fill_subcode_unique_check(); Type: FUNCTION; Schema: public; Owner: - -- -CREATE FUNCTION sample_fill_subcode_unique_check() RETURNS trigger +CREATE FUNCTION public.sample_fill_subcode_unique_check() RETURNS trigger LANGUAGE plpgsql AS $$ DECLARE @@ -832,7 +832,7 @@ $$; -- Name: sample_property_with_material_data_type_check(); Type: FUNCTION; Schema: public; Owner: - -- -CREATE FUNCTION sample_property_with_material_data_type_check() RETURNS trigger +CREATE FUNCTION public.sample_property_with_material_data_type_check() RETURNS trigger LANGUAGE plpgsql AS $$ DECLARE @@ -840,21 +840,21 @@ DECLARE v_type_id_prop CODE; BEGIN if NEW.mate_prop_id IS NOT NULL then - -- find material type id of the property type - select pt.maty_prop_id into v_type_id_prop - from sample_type_property_types etpt, property_types pt - where NEW.stpt_id = etpt.id AND etpt.prty_id = pt.id; - - if v_type_id_prop IS NOT NULL then - -- find material type id of the material which consists the entity's property value - select entity.maty_id into v_type_id - from materials entity - where NEW.mate_prop_id = entity.id; - if v_type_id != v_type_id_prop then - RAISE EXCEPTION 'Insert/Update of property value referencing material (id: %) failed, as referenced material type is different than expected (id %, expected id: %).', - NEW.mate_prop_id, v_type_id, v_type_id_prop; - end if; - end if; + -- find material type id of the property type + select pt.maty_prop_id into v_type_id_prop + from sample_type_property_types etpt, property_types pt + where NEW.stpt_id = etpt.id AND etpt.prty_id = pt.id; + + if v_type_id_prop IS NOT NULL then + -- find material type id of the material which consists the entity's property value + select entity.maty_id into v_type_id + from materials entity + where NEW.mate_prop_id = entity.id; + if v_type_id != v_type_id_prop then + RAISE EXCEPTION 'Insert/Update of property value referencing material (id: %) failed, as referenced material type is different than expected (id %, expected id: %).', + NEW.mate_prop_id, v_type_id, v_type_id_prop; + end if; + end if; end if; RETURN NEW; END; @@ -865,7 +865,7 @@ $$; -- Name: sample_type_fill_subcode_unique_check(); Type: FUNCTION; Schema: public; Owner: - -- -CREATE FUNCTION sample_type_fill_subcode_unique_check() RETURNS trigger +CREATE FUNCTION public.sample_type_fill_subcode_unique_check() RETURNS trigger LANGUAGE plpgsql AS $$ BEGIN @@ -881,7 +881,7 @@ $$; -- Name: attachment_content_id_seq; Type: SEQUENCE; Schema: public; Owner: - -- -CREATE SEQUENCE attachment_content_id_seq +CREATE SEQUENCE public.attachment_content_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE @@ -897,9 +897,9 @@ SET default_with_oids = false; -- Name: attachment_contents; Type: TABLE; Schema: public; Owner: - -- -CREATE TABLE attachment_contents ( - id tech_id NOT NULL, - value file NOT NULL +CREATE TABLE public.attachment_contents ( + id public.tech_id NOT NULL, + value public.file NOT NULL ); @@ -907,7 +907,7 @@ CREATE TABLE attachment_contents ( -- Name: attachment_id_seq; Type: SEQUENCE; Schema: public; Owner: - -- -CREATE SEQUENCE attachment_id_seq +CREATE SEQUENCE public.attachment_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE @@ -919,18 +919,18 @@ CREATE SEQUENCE attachment_id_seq -- Name: attachments; Type: TABLE; Schema: public; Owner: - -- -CREATE TABLE attachments ( - id tech_id NOT NULL, - expe_id tech_id, - samp_id tech_id, - proj_id tech_id, - exac_id tech_id NOT NULL, - file_name file_name NOT NULL, - registration_timestamp time_stamp_dfl DEFAULT now() NOT NULL, +CREATE TABLE public.attachments ( + id public.tech_id NOT NULL, + expe_id public.tech_id, + samp_id public.tech_id, + proj_id public.tech_id, + exac_id public.tech_id NOT NULL, + file_name public.file_name NOT NULL, + registration_timestamp public.time_stamp_dfl DEFAULT now() NOT NULL, version integer NOT NULL, - pers_id_registerer tech_id NOT NULL, - title title_100, - description description_2000, + pers_id_registerer public.tech_id NOT NULL, + title public.title_100, + description public.description_2000, CONSTRAINT atta_arc_ck CHECK ((((expe_id IS NOT NULL) AND (proj_id IS NULL) AND (samp_id IS NULL)) OR ((expe_id IS NULL) AND (proj_id IS NOT NULL) AND (samp_id IS NULL)) OR ((expe_id IS NULL) AND (proj_id IS NULL) AND (samp_id IS NOT NULL)))) ); @@ -939,7 +939,7 @@ CREATE TABLE attachments ( -- Name: authorization_group_id_seq; Type: SEQUENCE; Schema: public; Owner: - -- -CREATE SEQUENCE authorization_group_id_seq +CREATE SEQUENCE public.authorization_group_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE @@ -951,9 +951,9 @@ CREATE SEQUENCE authorization_group_id_seq -- Name: authorization_group_persons; Type: TABLE; Schema: public; Owner: - -- -CREATE TABLE authorization_group_persons ( - ag_id tech_id NOT NULL, - pers_id tech_id NOT NULL +CREATE TABLE public.authorization_group_persons ( + ag_id public.tech_id NOT NULL, + pers_id public.tech_id NOT NULL ); @@ -961,13 +961,13 @@ CREATE TABLE authorization_group_persons ( -- Name: authorization_groups; Type: TABLE; Schema: public; Owner: - -- -CREATE TABLE authorization_groups ( - id tech_id NOT NULL, - code code NOT NULL, - description description_2000, - registration_timestamp time_stamp_dfl DEFAULT now() NOT NULL, - pers_id_registerer tech_id NOT NULL, - modification_timestamp time_stamp DEFAULT now() +CREATE TABLE public.authorization_groups ( + id public.tech_id NOT NULL, + code public.code NOT NULL, + description public.description_2000, + registration_timestamp public.time_stamp_dfl DEFAULT now() NOT NULL, + pers_id_registerer public.tech_id NOT NULL, + modification_timestamp public.time_stamp DEFAULT now() ); @@ -975,7 +975,7 @@ CREATE TABLE authorization_groups ( -- Name: code_seq; Type: SEQUENCE; Schema: public; Owner: - -- -CREATE SEQUENCE code_seq +CREATE SEQUENCE public.code_seq START WITH 1 INCREMENT BY 1 NO MINVALUE @@ -987,18 +987,18 @@ CREATE SEQUENCE code_seq -- Name: content_copies; Type: TABLE; Schema: public; Owner: - -- -CREATE TABLE content_copies ( - data_id tech_id NOT NULL, - edms_id tech_id NOT NULL, - external_code text_value, - id tech_id NOT NULL, - location_type location_type NOT NULL, - path text_value, - git_commit_hash text_value, - location_unique_check text_value NOT NULL, - pers_id_registerer tech_id, - registration_timestamp time_stamp_dfl DEFAULT now() NOT NULL, - git_repository_id text_value +CREATE TABLE public.content_copies ( + data_id public.tech_id NOT NULL, + edms_id public.tech_id NOT NULL, + external_code public.text_value, + id public.tech_id NOT NULL, + location_type public.location_type NOT NULL, + path public.text_value, + git_commit_hash public.text_value, + location_unique_check public.text_value NOT NULL, + pers_id_registerer public.tech_id, + registration_timestamp public.time_stamp_dfl DEFAULT now() NOT NULL, + git_repository_id public.text_value ); @@ -1006,7 +1006,7 @@ CREATE TABLE content_copies ( -- Name: content_copies_id_seq; Type: SEQUENCE; Schema: public; Owner: - -- -CREATE SEQUENCE content_copies_id_seq +CREATE SEQUENCE public.content_copies_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE @@ -1018,16 +1018,16 @@ CREATE SEQUENCE content_copies_id_seq -- Name: controlled_vocabularies; Type: TABLE; Schema: public; Owner: - -- -CREATE TABLE controlled_vocabularies ( - id tech_id NOT NULL, - code code NOT NULL, - description description_2000, - registration_timestamp time_stamp_dfl DEFAULT now() NOT NULL, - pers_id_registerer tech_id NOT NULL, - is_managed_internally boolean_char DEFAULT false NOT NULL, - is_internal_namespace boolean_char DEFAULT false NOT NULL, - modification_timestamp time_stamp DEFAULT now(), - is_chosen_from_list boolean_char DEFAULT true NOT NULL, +CREATE TABLE public.controlled_vocabularies ( + id public.tech_id NOT NULL, + code public.code NOT NULL, + description public.description_2000, + registration_timestamp public.time_stamp_dfl DEFAULT now() NOT NULL, + pers_id_registerer public.tech_id NOT NULL, + is_managed_internally public.boolean_char DEFAULT false NOT NULL, + is_internal_namespace public.boolean_char DEFAULT false NOT NULL, + modification_timestamp public.time_stamp DEFAULT now(), + is_chosen_from_list public.boolean_char DEFAULT true NOT NULL, source_uri character varying(250) ); @@ -1036,7 +1036,7 @@ CREATE TABLE controlled_vocabularies ( -- Name: controlled_vocabulary_id_seq; Type: SEQUENCE; Schema: public; Owner: - -- -CREATE SEQUENCE controlled_vocabulary_id_seq +CREATE SEQUENCE public.controlled_vocabulary_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE @@ -1048,16 +1048,16 @@ CREATE SEQUENCE controlled_vocabulary_id_seq -- Name: controlled_vocabulary_terms; Type: TABLE; Schema: public; Owner: - -- -CREATE TABLE controlled_vocabulary_terms ( - id tech_id NOT NULL, - code object_name NOT NULL, - registration_timestamp time_stamp_dfl DEFAULT now() NOT NULL, - covo_id tech_id NOT NULL, - pers_id_registerer tech_id NOT NULL, - label column_label, - description description_2000, - ordinal ordinal_int NOT NULL, - is_official boolean_char DEFAULT true NOT NULL, +CREATE TABLE public.controlled_vocabulary_terms ( + id public.tech_id NOT NULL, + code public.object_name NOT NULL, + registration_timestamp public.time_stamp_dfl DEFAULT now() NOT NULL, + covo_id public.tech_id NOT NULL, + pers_id_registerer public.tech_id NOT NULL, + label public.column_label, + description public.description_2000, + ordinal public.ordinal_int NOT NULL, + is_official public.boolean_char DEFAULT true NOT NULL, CONSTRAINT cvte_ck CHECK (((ordinal)::bigint > 0)) ); @@ -1066,7 +1066,7 @@ CREATE TABLE controlled_vocabulary_terms ( -- Name: core_plugin_id_seq; Type: SEQUENCE; Schema: public; Owner: - -- -CREATE SEQUENCE core_plugin_id_seq +CREATE SEQUENCE public.core_plugin_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE @@ -1078,12 +1078,12 @@ CREATE SEQUENCE core_plugin_id_seq -- Name: core_plugins; Type: TABLE; Schema: public; Owner: - -- -CREATE TABLE core_plugins ( - id tech_id NOT NULL, +CREATE TABLE public.core_plugins ( + id public.tech_id NOT NULL, name character varying(200) NOT NULL, version integer NOT NULL, - registration_timestamp time_stamp_dfl DEFAULT now() NOT NULL, - master_reg_script text_value + registration_timestamp public.time_stamp_dfl DEFAULT now() NOT NULL, + master_reg_script public.text_value ); @@ -1091,7 +1091,7 @@ CREATE TABLE core_plugins ( -- Name: cvte_id_seq; Type: SEQUENCE; Schema: public; Owner: - -- -CREATE SEQUENCE cvte_id_seq +CREATE SEQUENCE public.cvte_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE @@ -1103,26 +1103,26 @@ CREATE SEQUENCE cvte_id_seq -- Name: data_all; Type: TABLE; Schema: public; Owner: - -- -CREATE TABLE data_all ( - id tech_id NOT NULL, - code code, - dsty_id tech_id NOT NULL, - dast_id tech_id NOT NULL, - expe_id tech_id, - data_producer_code code, - production_timestamp time_stamp, - samp_id tech_id, - registration_timestamp time_stamp_dfl DEFAULT now() NOT NULL, - pers_id_registerer tech_id, - is_valid boolean_char DEFAULT true, - modification_timestamp time_stamp DEFAULT now(), - is_derived boolean_char NOT NULL, - del_id tech_id, - orig_del tech_id, - pers_id_modifier tech_id, +CREATE TABLE public.data_all ( + id public.tech_id NOT NULL, + code public.code, + dsty_id public.tech_id NOT NULL, + dast_id public.tech_id NOT NULL, + expe_id public.tech_id, + data_producer_code public.code, + production_timestamp public.time_stamp, + samp_id public.tech_id, + registration_timestamp public.time_stamp_dfl DEFAULT now() NOT NULL, + pers_id_registerer public.tech_id, + is_valid public.boolean_char DEFAULT true, + modification_timestamp public.time_stamp DEFAULT now(), + is_derived public.boolean_char NOT NULL, + del_id public.tech_id, + orig_del public.tech_id, + pers_id_modifier public.tech_id, version integer DEFAULT 0, - access_timestamp time_stamp_dfl DEFAULT now() NOT NULL, - data_set_kind data_set_kind DEFAULT 'PHYSICAL'::character varying NOT NULL, + access_timestamp public.time_stamp_dfl DEFAULT now() NOT NULL, + data_set_kind public.data_set_kind DEFAULT 'PHYSICAL'::character varying NOT NULL, CONSTRAINT data_ck CHECK (((expe_id IS NOT NULL) OR (samp_id IS NOT NULL))) ); @@ -1131,7 +1131,7 @@ CREATE TABLE data_all ( -- Name: data; Type: VIEW; Schema: public; Owner: - -- -CREATE VIEW data AS +CREATE VIEW public.data AS SELECT data_all.id, data_all.code, data_all.dsty_id, @@ -1151,7 +1151,7 @@ CREATE VIEW data AS data_all.orig_del, data_all.version, data_all.data_set_kind - FROM data_all + FROM public.data_all WHERE (data_all.del_id IS NULL); @@ -1159,7 +1159,7 @@ CREATE VIEW data AS -- Name: data_deleted; Type: VIEW; Schema: public; Owner: - -- -CREATE VIEW data_deleted AS +CREATE VIEW public.data_deleted AS SELECT data_all.id, data_all.code, data_all.dsty_id, @@ -1179,7 +1179,7 @@ CREATE VIEW data_deleted AS data_all.orig_del, data_all.version, data_all.data_set_kind - FROM data_all + FROM public.data_all WHERE (data_all.del_id IS NOT NULL); @@ -1187,7 +1187,7 @@ CREATE VIEW data_deleted AS -- Name: data_id_seq; Type: SEQUENCE; Schema: public; Owner: - -- -CREATE SEQUENCE data_id_seq +CREATE SEQUENCE public.data_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE @@ -1199,18 +1199,21 @@ CREATE SEQUENCE data_id_seq -- Name: data_set_copies_history; Type: TABLE; Schema: public; Owner: - -- -CREATE TABLE data_set_copies_history ( - id tech_id NOT NULL, - cc_id tech_id NOT NULL, - data_id tech_id NOT NULL, - external_code text_value, - path text_value, - git_commit_hash text_value, - edms_id tech_id NOT NULL, - pers_id_author tech_id, - valid_from_timestamp time_stamp NOT NULL, - valid_until_timestamp time_stamp, - git_repository_id text_value +CREATE TABLE public.data_set_copies_history ( + id public.tech_id NOT NULL, + cc_id public.tech_id NOT NULL, + data_id public.tech_id NOT NULL, + external_code public.text_value, + path public.text_value, + git_commit_hash public.text_value, + edms_id public.tech_id NOT NULL, + pers_id_author public.tech_id, + valid_from_timestamp public.time_stamp NOT NULL, + valid_until_timestamp public.time_stamp, + git_repository_id public.text_value, + edms_code public.code, + edms_label public.text_value, + edms_address public.text_value ); @@ -1218,7 +1221,7 @@ CREATE TABLE data_set_copies_history ( -- Name: data_set_copies_history_id_seq; Type: SEQUENCE; Schema: public; Owner: - -- -CREATE SEQUENCE data_set_copies_history_id_seq +CREATE SEQUENCE public.data_set_copies_history_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE @@ -1230,16 +1233,16 @@ CREATE SEQUENCE data_set_copies_history_id_seq -- Name: data_set_properties_history; Type: TABLE; Schema: public; Owner: - -- -CREATE TABLE data_set_properties_history ( - id tech_id NOT NULL, - ds_id tech_id NOT NULL, - dstpt_id tech_id NOT NULL, - value text_value, - vocabulary_term identifier, - material identifier, - pers_id_author tech_id NOT NULL, - valid_from_timestamp time_stamp NOT NULL, - valid_until_timestamp time_stamp DEFAULT now(), +CREATE TABLE public.data_set_properties_history ( + id public.tech_id NOT NULL, + ds_id public.tech_id NOT NULL, + dstpt_id public.tech_id NOT NULL, + value public.text_value, + vocabulary_term public.identifier, + material public.identifier, + pers_id_author public.tech_id NOT NULL, + valid_from_timestamp public.time_stamp NOT NULL, + valid_until_timestamp public.time_stamp DEFAULT now(), CONSTRAINT dsprh_ck CHECK ((((value IS NOT NULL) AND (vocabulary_term IS NULL) AND (material IS NULL)) OR ((value IS NULL) AND (vocabulary_term IS NOT NULL) AND (material IS NULL)) OR ((value IS NULL) AND (vocabulary_term IS NULL) AND (material IS NOT NULL)))) ); @@ -1248,17 +1251,17 @@ CREATE TABLE data_set_properties_history ( -- Name: data_set_relationships_history; Type: TABLE; Schema: public; Owner: - -- -CREATE TABLE data_set_relationships_history ( - id tech_id NOT NULL, - main_data_id tech_id NOT NULL, - relation_type text_value, - expe_id tech_id, - samp_id tech_id, - data_id tech_id, - entity_perm_id text_value, - pers_id_author tech_id, - valid_from_timestamp time_stamp NOT NULL, - valid_until_timestamp time_stamp, +CREATE TABLE public.data_set_relationships_history ( + id public.tech_id NOT NULL, + main_data_id public.tech_id NOT NULL, + relation_type public.text_value, + expe_id public.tech_id, + samp_id public.tech_id, + data_id public.tech_id, + entity_perm_id public.text_value, + pers_id_author public.tech_id, + valid_from_timestamp public.time_stamp NOT NULL, + valid_until_timestamp public.time_stamp, ordinal integer ); @@ -1267,7 +1270,7 @@ CREATE TABLE data_set_relationships_history ( -- Name: data_set_history_view; Type: VIEW; Schema: public; Owner: - -- -CREATE VIEW data_set_history_view AS +CREATE VIEW public.data_set_history_view AS SELECT (3 * (data_set_relationships_history.id)::bigint) AS id, data_set_relationships_history.main_data_id, data_set_relationships_history.relation_type, @@ -1284,11 +1287,14 @@ CREATE VIEW data_set_history_view AS NULL::text AS path, NULL::text AS git_commit_hash, NULL::text AS git_repository_id, - (NULL::bigint)::tech_id AS edms_id, + (NULL::bigint)::public.tech_id AS edms_id, + NULL::text AS edms_code, + NULL::text AS edms_label, + NULL::text AS edms_address, data_set_relationships_history.pers_id_author, data_set_relationships_history.valid_from_timestamp, data_set_relationships_history.valid_until_timestamp - FROM data_set_relationships_history + FROM public.data_set_relationships_history WHERE (data_set_relationships_history.valid_until_timestamp IS NOT NULL) UNION SELECT ((3 * (data_set_properties_history.id)::bigint) + 1) AS id, @@ -1308,10 +1314,13 @@ UNION NULL::text AS git_commit_hash, NULL::text AS git_repository_id, NULL::bigint AS edms_id, + NULL::text AS edms_code, + NULL::text AS edms_label, + NULL::text AS edms_address, data_set_properties_history.pers_id_author, data_set_properties_history.valid_from_timestamp, data_set_properties_history.valid_until_timestamp - FROM data_set_properties_history + FROM public.data_set_properties_history UNION SELECT ((3 * (data_set_copies_history.id)::bigint) + 2) AS id, data_set_copies_history.data_id AS main_data_id, @@ -1330,10 +1339,13 @@ UNION data_set_copies_history.git_commit_hash, data_set_copies_history.git_repository_id, data_set_copies_history.edms_id, + data_set_copies_history.edms_code, + data_set_copies_history.edms_label, + data_set_copies_history.edms_address, data_set_copies_history.pers_id_author, data_set_copies_history.valid_from_timestamp, data_set_copies_history.valid_until_timestamp - FROM data_set_copies_history + FROM public.data_set_copies_history WHERE (data_set_copies_history.valid_until_timestamp IS NOT NULL); @@ -1341,17 +1353,17 @@ UNION -- Name: data_set_properties; Type: TABLE; Schema: public; Owner: - -- -CREATE TABLE data_set_properties ( - id tech_id NOT NULL, - ds_id tech_id NOT NULL, - dstpt_id tech_id NOT NULL, - value text_value, - cvte_id tech_id, - mate_prop_id tech_id, - pers_id_registerer tech_id NOT NULL, - registration_timestamp time_stamp_dfl DEFAULT now() NOT NULL, - pers_id_author tech_id NOT NULL, - modification_timestamp time_stamp DEFAULT now(), +CREATE TABLE public.data_set_properties ( + id public.tech_id NOT NULL, + ds_id public.tech_id NOT NULL, + dstpt_id public.tech_id NOT NULL, + value public.text_value, + cvte_id public.tech_id, + mate_prop_id public.tech_id, + pers_id_registerer public.tech_id NOT NULL, + registration_timestamp public.time_stamp_dfl DEFAULT now() NOT NULL, + pers_id_author public.tech_id NOT NULL, + modification_timestamp public.time_stamp DEFAULT now(), CONSTRAINT dspr_ck CHECK ((((value IS NOT NULL) AND (cvte_id IS NULL) AND (mate_prop_id IS NULL)) OR ((value IS NULL) AND (cvte_id IS NOT NULL) AND (mate_prop_id IS NULL)) OR ((value IS NULL) AND (cvte_id IS NULL) AND (mate_prop_id IS NOT NULL)))) ); @@ -1360,7 +1372,7 @@ CREATE TABLE data_set_properties ( -- Name: data_set_property_id_seq; Type: SEQUENCE; Schema: public; Owner: - -- -CREATE SEQUENCE data_set_property_id_seq +CREATE SEQUENCE public.data_set_property_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE @@ -1372,7 +1384,7 @@ CREATE SEQUENCE data_set_property_id_seq -- Name: data_set_relationship_id_seq; Type: SEQUENCE; Schema: public; Owner: - -- -CREATE SEQUENCE data_set_relationship_id_seq +CREATE SEQUENCE public.data_set_relationship_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE @@ -1384,14 +1396,14 @@ CREATE SEQUENCE data_set_relationship_id_seq -- Name: data_set_relationships_all; Type: TABLE; Schema: public; Owner: - -- -CREATE TABLE data_set_relationships_all ( - data_id_parent tech_id NOT NULL, - data_id_child tech_id NOT NULL, - del_id tech_id, - pers_id_author tech_id, - registration_timestamp time_stamp_dfl DEFAULT now() NOT NULL, - modification_timestamp time_stamp DEFAULT now(), - relationship_id tech_id NOT NULL, +CREATE TABLE public.data_set_relationships_all ( + data_id_parent public.tech_id NOT NULL, + data_id_child public.tech_id NOT NULL, + del_id public.tech_id, + pers_id_author public.tech_id, + registration_timestamp public.time_stamp_dfl DEFAULT now() NOT NULL, + modification_timestamp public.time_stamp DEFAULT now(), + relationship_id public.tech_id NOT NULL, ordinal integer ); @@ -1400,7 +1412,7 @@ CREATE TABLE data_set_relationships_all ( -- Name: data_set_relationships; Type: VIEW; Schema: public; Owner: - -- -CREATE VIEW data_set_relationships AS +CREATE VIEW public.data_set_relationships AS SELECT data_set_relationships_all.data_id_parent, data_set_relationships_all.data_id_child, data_set_relationships_all.relationship_id, @@ -1409,7 +1421,7 @@ CREATE VIEW data_set_relationships AS data_set_relationships_all.pers_id_author, data_set_relationships_all.registration_timestamp, data_set_relationships_all.modification_timestamp - FROM data_set_relationships_all + FROM public.data_set_relationships_all WHERE (data_set_relationships_all.del_id IS NULL); @@ -1417,7 +1429,7 @@ CREATE VIEW data_set_relationships AS -- Name: data_set_relationships_history_id_seq; Type: SEQUENCE; Schema: public; Owner: - -- -CREATE SEQUENCE data_set_relationships_history_id_seq +CREATE SEQUENCE public.data_set_relationships_history_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE @@ -1429,7 +1441,7 @@ CREATE SEQUENCE data_set_relationships_history_id_seq -- Name: data_set_type_id_seq; Type: SEQUENCE; Schema: public; Owner: - -- -CREATE SEQUENCE data_set_type_id_seq +CREATE SEQUENCE public.data_set_type_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE @@ -1441,19 +1453,19 @@ CREATE SEQUENCE data_set_type_id_seq -- Name: data_set_type_property_types; Type: TABLE; Schema: public; Owner: - -- -CREATE TABLE data_set_type_property_types ( - id tech_id NOT NULL, - dsty_id tech_id NOT NULL, - prty_id tech_id NOT NULL, - is_mandatory boolean_char DEFAULT false NOT NULL, - is_managed_internally boolean_char DEFAULT false NOT NULL, - pers_id_registerer tech_id NOT NULL, - registration_timestamp time_stamp_dfl DEFAULT now() NOT NULL, - ordinal ordinal_int NOT NULL, - section description_2000, - script_id tech_id, - is_shown_edit boolean_char DEFAULT true NOT NULL, - show_raw_value boolean_char DEFAULT false NOT NULL +CREATE TABLE public.data_set_type_property_types ( + id public.tech_id NOT NULL, + dsty_id public.tech_id NOT NULL, + prty_id public.tech_id NOT NULL, + is_mandatory public.boolean_char DEFAULT false NOT NULL, + is_managed_internally public.boolean_char DEFAULT false NOT NULL, + pers_id_registerer public.tech_id NOT NULL, + registration_timestamp public.time_stamp_dfl DEFAULT now() NOT NULL, + ordinal public.ordinal_int NOT NULL, + section public.description_2000, + script_id public.tech_id, + is_shown_edit public.boolean_char DEFAULT true NOT NULL, + show_raw_value public.boolean_char DEFAULT false NOT NULL ); @@ -1461,15 +1473,15 @@ CREATE TABLE data_set_type_property_types ( -- Name: data_set_types; Type: TABLE; Schema: public; Owner: - -- -CREATE TABLE data_set_types ( - id tech_id NOT NULL, - code code NOT NULL, - description description_2000, - modification_timestamp time_stamp DEFAULT now(), +CREATE TABLE public.data_set_types ( + id public.tech_id NOT NULL, + code public.code NOT NULL, + description public.description_2000, + modification_timestamp public.time_stamp DEFAULT now(), main_ds_pattern character varying(300), main_ds_path character varying(1000), - deletion_disallow boolean_char DEFAULT false, - validation_script_id tech_id + deletion_disallow public.boolean_char DEFAULT false, + validation_script_id public.tech_id ); @@ -1477,7 +1489,7 @@ CREATE TABLE data_set_types ( -- Name: data_store_id_seq; Type: SEQUENCE; Schema: public; Owner: - -- -CREATE SEQUENCE data_store_id_seq +CREATE SEQUENCE public.data_store_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE @@ -1489,9 +1501,9 @@ CREATE SEQUENCE data_store_id_seq -- Name: data_store_service_data_set_types; Type: TABLE; Schema: public; Owner: - -- -CREATE TABLE data_store_service_data_set_types ( - data_store_service_id tech_id NOT NULL, - data_set_type_id tech_id NOT NULL +CREATE TABLE public.data_store_service_data_set_types ( + data_store_service_id public.tech_id NOT NULL, + data_set_type_id public.tech_id NOT NULL ); @@ -1499,13 +1511,13 @@ CREATE TABLE data_store_service_data_set_types ( -- Name: data_store_services; Type: TABLE; Schema: public; Owner: - -- -CREATE TABLE data_store_services ( - id tech_id NOT NULL, +CREATE TABLE public.data_store_services ( + id public.tech_id NOT NULL, key character varying(256) NOT NULL, label character varying(256) NOT NULL, - kind data_store_service_kind NOT NULL, - data_store_id tech_id NOT NULL, - reporting_plugin_type data_store_service_reporting_plugin_type + kind public.data_store_service_kind NOT NULL, + data_store_id public.tech_id NOT NULL, + reporting_plugin_type public.data_store_service_reporting_plugin_type ); @@ -1513,7 +1525,7 @@ CREATE TABLE data_store_services ( -- Name: data_store_services_id_seq; Type: SEQUENCE; Schema: public; Owner: - -- -CREATE SEQUENCE data_store_services_id_seq +CREATE SEQUENCE public.data_store_services_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE @@ -1525,17 +1537,17 @@ CREATE SEQUENCE data_store_services_id_seq -- Name: data_stores; Type: TABLE; Schema: public; Owner: - -- -CREATE TABLE data_stores ( - id tech_id NOT NULL, - code code NOT NULL, +CREATE TABLE public.data_stores ( + id public.tech_id NOT NULL, + code public.code NOT NULL, download_url character varying(1024) NOT NULL, remote_url character varying(250) NOT NULL, session_token character varying(50) NOT NULL, - registration_timestamp time_stamp_dfl DEFAULT now() NOT NULL, - modification_timestamp time_stamp DEFAULT now(), - is_archiver_configured boolean_char DEFAULT false NOT NULL, - data_source_definitions text_value, - uuid code NOT NULL + registration_timestamp public.time_stamp_dfl DEFAULT now() NOT NULL, + modification_timestamp public.time_stamp DEFAULT now(), + is_archiver_configured public.boolean_char DEFAULT false NOT NULL, + data_source_definitions public.text_value, + uuid public.code NOT NULL ); @@ -1543,7 +1555,7 @@ CREATE TABLE data_stores ( -- Name: data_type_id_seq; Type: SEQUENCE; Schema: public; Owner: - -- -CREATE SEQUENCE data_type_id_seq +CREATE SEQUENCE public.data_type_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE @@ -1555,10 +1567,10 @@ CREATE SEQUENCE data_type_id_seq -- Name: data_types; Type: TABLE; Schema: public; Owner: - -- -CREATE TABLE data_types ( - id tech_id NOT NULL, - code code NOT NULL, - description description_2000 NOT NULL +CREATE TABLE public.data_types ( + id public.tech_id NOT NULL, + code public.code NOT NULL, + description public.description_2000 NOT NULL ); @@ -1566,7 +1578,7 @@ CREATE TABLE data_types ( -- Name: database_instance_id_seq; Type: SEQUENCE; Schema: public; Owner: - -- -CREATE SEQUENCE database_instance_id_seq +CREATE SEQUENCE public.database_instance_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE @@ -1578,7 +1590,7 @@ CREATE SEQUENCE database_instance_id_seq -- Name: database_version_logs; Type: TABLE; Schema: public; Owner: - -- -CREATE TABLE database_version_logs ( +CREATE TABLE public.database_version_logs ( db_version character varying(4) NOT NULL, module_name character varying(250), run_status character varying(10), @@ -1592,7 +1604,7 @@ CREATE TABLE database_version_logs ( -- Name: deletion_id_seq; Type: SEQUENCE; Schema: public; Owner: - -- -CREATE SEQUENCE deletion_id_seq +CREATE SEQUENCE public.deletion_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE @@ -1604,11 +1616,11 @@ CREATE SEQUENCE deletion_id_seq -- Name: deletions; Type: TABLE; Schema: public; Owner: - -- -CREATE TABLE deletions ( - id tech_id NOT NULL, - pers_id_registerer tech_id NOT NULL, - registration_timestamp time_stamp_dfl DEFAULT now() NOT NULL, - reason description_2000 NOT NULL +CREATE TABLE public.deletions ( + id public.tech_id NOT NULL, + pers_id_registerer public.tech_id NOT NULL, + registration_timestamp public.time_stamp_dfl DEFAULT now() NOT NULL, + reason public.description_2000 NOT NULL ); @@ -1616,7 +1628,7 @@ CREATE TABLE deletions ( -- Name: dstpt_id_seq; Type: SEQUENCE; Schema: public; Owner: - -- -CREATE SEQUENCE dstpt_id_seq +CREATE SEQUENCE public.dstpt_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE @@ -1628,9 +1640,9 @@ CREATE SEQUENCE dstpt_id_seq -- Name: entity_operations_log; Type: TABLE; Schema: public; Owner: - -- -CREATE TABLE entity_operations_log ( - id tech_id NOT NULL, - registration_id tech_id NOT NULL +CREATE TABLE public.entity_operations_log ( + id public.tech_id NOT NULL, + registration_id public.tech_id NOT NULL ); @@ -1638,7 +1650,7 @@ CREATE TABLE entity_operations_log ( -- Name: entity_operations_log_id_seq; Type: SEQUENCE; Schema: public; Owner: - -- -CREATE SEQUENCE entity_operations_log_id_seq +CREATE SEQUENCE public.entity_operations_log_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE @@ -1650,7 +1662,7 @@ CREATE SEQUENCE entity_operations_log_id_seq -- Name: etpt_id_seq; Type: SEQUENCE; Schema: public; Owner: - -- -CREATE SEQUENCE etpt_id_seq +CREATE SEQUENCE public.etpt_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE @@ -1662,7 +1674,7 @@ CREATE SEQUENCE etpt_id_seq -- Name: event_id_seq; Type: SEQUENCE; Schema: public; Owner: - -- -CREATE SEQUENCE event_id_seq +CREATE SEQUENCE public.event_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE @@ -1674,17 +1686,17 @@ CREATE SEQUENCE event_id_seq -- Name: events; Type: TABLE; Schema: public; Owner: - -- -CREATE TABLE events ( - id tech_id NOT NULL, - event_type event_type NOT NULL, - description text_value, - reason description_2000, - pers_id_registerer tech_id NOT NULL, - registration_timestamp time_stamp_dfl DEFAULT now() NOT NULL, +CREATE TABLE public.events ( + id public.tech_id NOT NULL, + event_type public.event_type NOT NULL, + description public.text_value, + reason public.description_2000, + pers_id_registerer public.tech_id NOT NULL, + registration_timestamp public.time_stamp_dfl DEFAULT now() NOT NULL, entity_type character varying(80) NOT NULL, - identifiers text_value NOT NULL, - content text_value, - exac_id tech_id, + identifiers public.text_value NOT NULL, + content public.text_value, + exac_id public.tech_id, CONSTRAINT evnt_et_enum_ck CHECK (((entity_type)::text = ANY (ARRAY[('ATTACHMENT'::character varying)::text, ('DATASET'::character varying)::text, ('EXPERIMENT'::character varying)::text, ('SPACE'::character varying)::text, ('MATERIAL'::character varying)::text, ('PROJECT'::character varying)::text, ('PROPERTY_TYPE'::character varying)::text, ('SAMPLE'::character varying)::text, ('VOCABULARY'::character varying)::text, ('AUTHORIZATION_GROUP'::character varying)::text, ('METAPROJECT'::character varying)::text]))) ); @@ -1693,7 +1705,7 @@ CREATE TABLE events ( -- Name: experiment_code_seq; Type: SEQUENCE; Schema: public; Owner: - -- -CREATE SEQUENCE experiment_code_seq +CREATE SEQUENCE public.experiment_code_seq START WITH 1 INCREMENT BY 1 NO MINVALUE @@ -1705,16 +1717,16 @@ CREATE SEQUENCE experiment_code_seq -- Name: experiment_properties_history; Type: TABLE; Schema: public; Owner: - -- -CREATE TABLE experiment_properties_history ( - id tech_id NOT NULL, - expe_id tech_id NOT NULL, - etpt_id tech_id NOT NULL, - value text_value, - vocabulary_term identifier, - material identifier, - pers_id_author tech_id NOT NULL, - valid_from_timestamp time_stamp NOT NULL, - valid_until_timestamp time_stamp DEFAULT now(), +CREATE TABLE public.experiment_properties_history ( + id public.tech_id NOT NULL, + expe_id public.tech_id NOT NULL, + etpt_id public.tech_id NOT NULL, + value public.text_value, + vocabulary_term public.identifier, + material public.identifier, + pers_id_author public.tech_id NOT NULL, + valid_from_timestamp public.time_stamp NOT NULL, + valid_until_timestamp public.time_stamp DEFAULT now(), CONSTRAINT exprh_ck CHECK ((((value IS NOT NULL) AND (vocabulary_term IS NULL) AND (material IS NULL)) OR ((value IS NULL) AND (vocabulary_term IS NOT NULL) AND (material IS NULL)) OR ((value IS NULL) AND (vocabulary_term IS NULL) AND (material IS NOT NULL)))) ); @@ -1723,17 +1735,17 @@ CREATE TABLE experiment_properties_history ( -- Name: experiment_relationships_history; Type: TABLE; Schema: public; Owner: - -- -CREATE TABLE experiment_relationships_history ( - id tech_id NOT NULL, - main_expe_id tech_id NOT NULL, - relation_type text_value, - samp_id tech_id, - data_id tech_id, - entity_perm_id text_value, - pers_id_author tech_id, - valid_from_timestamp time_stamp NOT NULL, - valid_until_timestamp time_stamp, - proj_id tech_id +CREATE TABLE public.experiment_relationships_history ( + id public.tech_id NOT NULL, + main_expe_id public.tech_id NOT NULL, + relation_type public.text_value, + samp_id public.tech_id, + data_id public.tech_id, + entity_perm_id public.text_value, + pers_id_author public.tech_id, + valid_from_timestamp public.time_stamp NOT NULL, + valid_until_timestamp public.time_stamp, + proj_id public.tech_id ); @@ -1741,7 +1753,7 @@ CREATE TABLE experiment_relationships_history ( -- Name: experiment_history_view; Type: VIEW; Schema: public; Owner: - -- -CREATE VIEW experiment_history_view AS +CREATE VIEW public.experiment_history_view AS SELECT (2 * (experiment_relationships_history.id)::bigint) AS id, experiment_relationships_history.main_expe_id, experiment_relationships_history.relation_type, @@ -1756,7 +1768,7 @@ CREATE VIEW experiment_history_view AS experiment_relationships_history.pers_id_author, experiment_relationships_history.valid_from_timestamp, experiment_relationships_history.valid_until_timestamp - FROM experiment_relationships_history + FROM public.experiment_relationships_history WHERE (experiment_relationships_history.valid_until_timestamp IS NOT NULL) UNION SELECT ((2 * (experiment_properties_history.id)::bigint) + 1) AS id, @@ -1773,14 +1785,14 @@ UNION experiment_properties_history.pers_id_author, experiment_properties_history.valid_from_timestamp, experiment_properties_history.valid_until_timestamp - FROM experiment_properties_history; + FROM public.experiment_properties_history; -- -- Name: experiment_id_seq; Type: SEQUENCE; Schema: public; Owner: - -- -CREATE SEQUENCE experiment_id_seq +CREATE SEQUENCE public.experiment_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE @@ -1792,17 +1804,17 @@ CREATE SEQUENCE experiment_id_seq -- Name: experiment_properties; Type: TABLE; Schema: public; Owner: - -- -CREATE TABLE experiment_properties ( - id tech_id NOT NULL, - expe_id tech_id NOT NULL, - etpt_id tech_id NOT NULL, - value text_value, - cvte_id tech_id, - mate_prop_id tech_id, - pers_id_registerer tech_id NOT NULL, - registration_timestamp time_stamp_dfl DEFAULT now() NOT NULL, - pers_id_author tech_id NOT NULL, - modification_timestamp time_stamp DEFAULT now(), +CREATE TABLE public.experiment_properties ( + id public.tech_id NOT NULL, + expe_id public.tech_id NOT NULL, + etpt_id public.tech_id NOT NULL, + value public.text_value, + cvte_id public.tech_id, + mate_prop_id public.tech_id, + pers_id_registerer public.tech_id NOT NULL, + registration_timestamp public.time_stamp_dfl DEFAULT now() NOT NULL, + pers_id_author public.tech_id NOT NULL, + modification_timestamp public.time_stamp DEFAULT now(), CONSTRAINT expr_ck CHECK ((((value IS NOT NULL) AND (cvte_id IS NULL) AND (mate_prop_id IS NULL)) OR ((value IS NULL) AND (cvte_id IS NOT NULL) AND (mate_prop_id IS NULL)) OR ((value IS NULL) AND (cvte_id IS NULL) AND (mate_prop_id IS NOT NULL)))) ); @@ -1811,7 +1823,7 @@ CREATE TABLE experiment_properties ( -- Name: experiment_property_id_seq; Type: SEQUENCE; Schema: public; Owner: - -- -CREATE SEQUENCE experiment_property_id_seq +CREATE SEQUENCE public.experiment_property_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE @@ -1823,7 +1835,7 @@ CREATE SEQUENCE experiment_property_id_seq -- Name: experiment_relationships_history_id_seq; Type: SEQUENCE; Schema: public; Owner: - -- -CREATE SEQUENCE experiment_relationships_history_id_seq +CREATE SEQUENCE public.experiment_relationships_history_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE @@ -1835,7 +1847,7 @@ CREATE SEQUENCE experiment_relationships_history_id_seq -- Name: experiment_type_id_seq; Type: SEQUENCE; Schema: public; Owner: - -- -CREATE SEQUENCE experiment_type_id_seq +CREATE SEQUENCE public.experiment_type_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE @@ -1847,19 +1859,19 @@ CREATE SEQUENCE experiment_type_id_seq -- Name: experiment_type_property_types; Type: TABLE; Schema: public; Owner: - -- -CREATE TABLE experiment_type_property_types ( - id tech_id NOT NULL, - exty_id tech_id NOT NULL, - prty_id tech_id NOT NULL, - is_mandatory boolean_char DEFAULT false NOT NULL, - is_managed_internally boolean_char DEFAULT false NOT NULL, - pers_id_registerer tech_id NOT NULL, - registration_timestamp time_stamp_dfl DEFAULT now() NOT NULL, - ordinal ordinal_int NOT NULL, - section description_2000, - script_id tech_id, - is_shown_edit boolean_char DEFAULT true NOT NULL, - show_raw_value boolean_char DEFAULT false NOT NULL +CREATE TABLE public.experiment_type_property_types ( + id public.tech_id NOT NULL, + exty_id public.tech_id NOT NULL, + prty_id public.tech_id NOT NULL, + is_mandatory public.boolean_char DEFAULT false NOT NULL, + is_managed_internally public.boolean_char DEFAULT false NOT NULL, + pers_id_registerer public.tech_id NOT NULL, + registration_timestamp public.time_stamp_dfl DEFAULT now() NOT NULL, + ordinal public.ordinal_int NOT NULL, + section public.description_2000, + script_id public.tech_id, + is_shown_edit public.boolean_char DEFAULT true NOT NULL, + show_raw_value public.boolean_char DEFAULT false NOT NULL ); @@ -1867,12 +1879,12 @@ CREATE TABLE experiment_type_property_types ( -- Name: experiment_types; Type: TABLE; Schema: public; Owner: - -- -CREATE TABLE experiment_types ( - id tech_id NOT NULL, - code code NOT NULL, - description description_2000, - modification_timestamp time_stamp DEFAULT now(), - validation_script_id tech_id +CREATE TABLE public.experiment_types ( + id public.tech_id NOT NULL, + code public.code NOT NULL, + description public.description_2000, + modification_timestamp public.time_stamp DEFAULT now(), + validation_script_id public.tech_id ); @@ -1880,19 +1892,19 @@ CREATE TABLE experiment_types ( -- Name: experiments_all; Type: TABLE; Schema: public; Owner: - -- -CREATE TABLE experiments_all ( - id tech_id NOT NULL, - perm_id code NOT NULL, - code code NOT NULL, - exty_id tech_id NOT NULL, - pers_id_registerer tech_id NOT NULL, - registration_timestamp time_stamp_dfl DEFAULT now() NOT NULL, - modification_timestamp time_stamp DEFAULT now(), - proj_id tech_id NOT NULL, - del_id tech_id, - orig_del tech_id, - is_public boolean_char DEFAULT false NOT NULL, - pers_id_modifier tech_id, +CREATE TABLE public.experiments_all ( + id public.tech_id NOT NULL, + perm_id public.code NOT NULL, + code public.code NOT NULL, + exty_id public.tech_id NOT NULL, + pers_id_registerer public.tech_id NOT NULL, + registration_timestamp public.time_stamp_dfl DEFAULT now() NOT NULL, + modification_timestamp public.time_stamp DEFAULT now(), + proj_id public.tech_id NOT NULL, + del_id public.tech_id, + orig_del public.tech_id, + is_public public.boolean_char DEFAULT false NOT NULL, + pers_id_modifier public.tech_id, version integer DEFAULT 0 ); @@ -1901,7 +1913,7 @@ CREATE TABLE experiments_all ( -- Name: experiments; Type: VIEW; Schema: public; Owner: - -- -CREATE VIEW experiments AS +CREATE VIEW public.experiments AS SELECT experiments_all.id, experiments_all.perm_id, experiments_all.code, @@ -1915,7 +1927,7 @@ CREATE VIEW experiments AS experiments_all.orig_del, experiments_all.is_public, experiments_all.version - FROM experiments_all + FROM public.experiments_all WHERE (experiments_all.del_id IS NULL); @@ -1923,7 +1935,7 @@ CREATE VIEW experiments AS -- Name: experiments_deleted; Type: VIEW; Schema: public; Owner: - -- -CREATE VIEW experiments_deleted AS +CREATE VIEW public.experiments_deleted AS SELECT experiments_all.id, experiments_all.perm_id, experiments_all.code, @@ -1937,7 +1949,7 @@ CREATE VIEW experiments_deleted AS experiments_all.orig_del, experiments_all.is_public, experiments_all.version - FROM experiments_all + FROM public.experiments_all WHERE (experiments_all.del_id IS NOT NULL); @@ -1945,22 +1957,23 @@ CREATE VIEW experiments_deleted AS -- Name: external_data; Type: TABLE; Schema: public; Owner: - -- -CREATE TABLE external_data ( - data_id tech_id NOT NULL, - share_id code, - size ordinal_int, +CREATE TABLE public.external_data ( + id public.tech_id NOT NULL, + share_id public.code, + size public.ordinal_int, location character varying(1024) NOT NULL, - ffty_id tech_id NOT NULL, - loty_id tech_id NOT NULL, - cvte_id_stor_fmt tech_id NOT NULL, - is_complete boolean_char_or_unknown DEFAULT 'U'::bpchar NOT NULL, - cvte_id_store tech_id, - status archiving_status DEFAULT 'AVAILABLE'::character varying NOT NULL, - present_in_archive boolean_char DEFAULT false, + ffty_id public.tech_id NOT NULL, + loty_id public.tech_id NOT NULL, + cvte_id_stor_fmt public.tech_id NOT NULL, + is_complete public.boolean_char_or_unknown DEFAULT 'U'::bpchar NOT NULL, + cvte_id_store public.tech_id, + status public.archiving_status DEFAULT 'AVAILABLE'::character varying NOT NULL, + present_in_archive public.boolean_char DEFAULT false, speed_hint integer DEFAULT '-50'::integer NOT NULL, - storage_confirmation boolean_char DEFAULT false NOT NULL, - h5_folders boolean_char NOT NULL, - h5ar_folders boolean_char NOT NULL + storage_confirmation public.boolean_char DEFAULT false NOT NULL, + h5_folders public.boolean_char NOT NULL, + h5ar_folders public.boolean_char NOT NULL, + archiving_requested public.boolean_char DEFAULT false NOT NULL ); @@ -1968,7 +1981,7 @@ CREATE TABLE external_data ( -- Name: external_data_management_system_id_seq; Type: SEQUENCE; Schema: public; Owner: - -- -CREATE SEQUENCE external_data_management_system_id_seq +CREATE SEQUENCE public.external_data_management_system_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE @@ -1980,12 +1993,12 @@ CREATE SEQUENCE external_data_management_system_id_seq -- Name: external_data_management_systems; Type: TABLE; Schema: public; Owner: - -- -CREATE TABLE external_data_management_systems ( - id tech_id NOT NULL, - code code NOT NULL, - label text_value, - address text_value NOT NULL, - address_type edms_address_type NOT NULL +CREATE TABLE public.external_data_management_systems ( + id public.tech_id NOT NULL, + code public.code NOT NULL, + label public.text_value, + address public.text_value NOT NULL, + address_type public.edms_address_type NOT NULL ); @@ -1993,7 +2006,7 @@ CREATE TABLE external_data_management_systems ( -- Name: file_format_type_id_seq; Type: SEQUENCE; Schema: public; Owner: - -- -CREATE SEQUENCE file_format_type_id_seq +CREATE SEQUENCE public.file_format_type_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE @@ -2005,10 +2018,10 @@ CREATE SEQUENCE file_format_type_id_seq -- Name: file_format_types; Type: TABLE; Schema: public; Owner: - -- -CREATE TABLE file_format_types ( - id tech_id NOT NULL, - code code NOT NULL, - description description_2000 +CREATE TABLE public.file_format_types ( + id public.tech_id NOT NULL, + code public.code NOT NULL, + description public.description_2000 ); @@ -2016,7 +2029,7 @@ CREATE TABLE file_format_types ( -- Name: filter_id_seq; Type: SEQUENCE; Schema: public; Owner: - -- -CREATE SEQUENCE filter_id_seq +CREATE SEQUENCE public.filter_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE @@ -2028,13 +2041,13 @@ CREATE SEQUENCE filter_id_seq -- Name: filters; Type: TABLE; Schema: public; Owner: - -- -CREATE TABLE filters ( - id tech_id NOT NULL, +CREATE TABLE public.filters ( + id public.tech_id NOT NULL, name character varying(200) NOT NULL, - description description_2000, - registration_timestamp time_stamp_dfl DEFAULT now() NOT NULL, - pers_id_registerer tech_id NOT NULL, - modification_timestamp time_stamp DEFAULT now(), + description public.description_2000, + registration_timestamp public.time_stamp_dfl DEFAULT now() NOT NULL, + pers_id_registerer public.tech_id NOT NULL, + modification_timestamp public.time_stamp DEFAULT now(), expression text NOT NULL, is_public boolean NOT NULL, grid_id character varying(200) NOT NULL @@ -2045,17 +2058,17 @@ CREATE TABLE filters ( -- Name: grid_custom_columns; Type: TABLE; Schema: public; Owner: - -- -CREATE TABLE grid_custom_columns ( - id tech_id NOT NULL, +CREATE TABLE public.grid_custom_columns ( + id public.tech_id NOT NULL, code character varying(200) NOT NULL, - label column_label NOT NULL, - description description_2000, - registration_timestamp time_stamp_dfl DEFAULT now() NOT NULL, - pers_id_registerer tech_id NOT NULL, - modification_timestamp time_stamp DEFAULT now(), - expression grid_expression NOT NULL, + label public.column_label NOT NULL, + description public.description_2000, + registration_timestamp public.time_stamp_dfl DEFAULT now() NOT NULL, + pers_id_registerer public.tech_id NOT NULL, + modification_timestamp public.time_stamp DEFAULT now(), + expression public.grid_expression NOT NULL, is_public boolean NOT NULL, - grid_id grid_id NOT NULL + grid_id public.grid_id NOT NULL ); @@ -2063,7 +2076,7 @@ CREATE TABLE grid_custom_columns ( -- Name: grid_custom_columns_id_seq; Type: SEQUENCE; Schema: public; Owner: - -- -CREATE SEQUENCE grid_custom_columns_id_seq +CREATE SEQUENCE public.grid_custom_columns_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE @@ -2075,8 +2088,8 @@ CREATE SEQUENCE grid_custom_columns_id_seq -- Name: link_data; Type: TABLE; Schema: public; Owner: - -- -CREATE TABLE link_data ( - data_id tech_id NOT NULL +CREATE TABLE public.link_data ( + id public.tech_id NOT NULL ); @@ -2084,7 +2097,7 @@ CREATE TABLE link_data ( -- Name: locator_type_id_seq; Type: SEQUENCE; Schema: public; Owner: - -- -CREATE SEQUENCE locator_type_id_seq +CREATE SEQUENCE public.locator_type_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE @@ -2096,10 +2109,10 @@ CREATE SEQUENCE locator_type_id_seq -- Name: locator_types; Type: TABLE; Schema: public; Owner: - -- -CREATE TABLE locator_types ( - id tech_id NOT NULL, - code code NOT NULL, - description description_2000 +CREATE TABLE public.locator_types ( + id public.tech_id NOT NULL, + code public.code NOT NULL, + description public.description_2000 ); @@ -2107,7 +2120,7 @@ CREATE TABLE locator_types ( -- Name: material_id_seq; Type: SEQUENCE; Schema: public; Owner: - -- -CREATE SEQUENCE material_id_seq +CREATE SEQUENCE public.material_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE @@ -2119,17 +2132,17 @@ CREATE SEQUENCE material_id_seq -- Name: material_properties; Type: TABLE; Schema: public; Owner: - -- -CREATE TABLE material_properties ( - id tech_id NOT NULL, - mate_id tech_id NOT NULL, - mtpt_id tech_id NOT NULL, - value text_value, - registration_timestamp time_stamp_dfl DEFAULT now() NOT NULL, - pers_id_author tech_id NOT NULL, - modification_timestamp time_stamp DEFAULT now(), - pers_id_registerer tech_id NOT NULL, - cvte_id tech_id, - mate_prop_id tech_id, +CREATE TABLE public.material_properties ( + id public.tech_id NOT NULL, + mate_id public.tech_id NOT NULL, + mtpt_id public.tech_id NOT NULL, + value public.text_value, + registration_timestamp public.time_stamp_dfl DEFAULT now() NOT NULL, + pers_id_author public.tech_id NOT NULL, + modification_timestamp public.time_stamp DEFAULT now(), + pers_id_registerer public.tech_id NOT NULL, + cvte_id public.tech_id, + mate_prop_id public.tech_id, CONSTRAINT mapr_ck CHECK ((((value IS NOT NULL) AND (cvte_id IS NULL) AND (mate_prop_id IS NULL)) OR ((value IS NULL) AND (cvte_id IS NOT NULL) AND (mate_prop_id IS NULL)) OR ((value IS NULL) AND (cvte_id IS NULL) AND (mate_prop_id IS NOT NULL)))) ); @@ -2138,16 +2151,16 @@ CREATE TABLE material_properties ( -- Name: material_properties_history; Type: TABLE; Schema: public; Owner: - -- -CREATE TABLE material_properties_history ( - id tech_id NOT NULL, - mate_id tech_id NOT NULL, - mtpt_id tech_id NOT NULL, - value text_value, - vocabulary_term identifier, - material identifier, - pers_id_author tech_id NOT NULL, - valid_from_timestamp time_stamp NOT NULL, - valid_until_timestamp time_stamp DEFAULT now(), +CREATE TABLE public.material_properties_history ( + id public.tech_id NOT NULL, + mate_id public.tech_id NOT NULL, + mtpt_id public.tech_id NOT NULL, + value public.text_value, + vocabulary_term public.identifier, + material public.identifier, + pers_id_author public.tech_id NOT NULL, + valid_from_timestamp public.time_stamp NOT NULL, + valid_until_timestamp public.time_stamp DEFAULT now(), CONSTRAINT maprh_ck CHECK ((((value IS NOT NULL) AND (vocabulary_term IS NULL) AND (material IS NULL)) OR ((value IS NULL) AND (vocabulary_term IS NOT NULL) AND (material IS NULL)) OR ((value IS NULL) AND (vocabulary_term IS NULL) AND (material IS NOT NULL)))) ); @@ -2156,7 +2169,7 @@ CREATE TABLE material_properties_history ( -- Name: material_property_id_seq; Type: SEQUENCE; Schema: public; Owner: - -- -CREATE SEQUENCE material_property_id_seq +CREATE SEQUENCE public.material_property_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE @@ -2168,7 +2181,7 @@ CREATE SEQUENCE material_property_id_seq -- Name: material_type_id_seq; Type: SEQUENCE; Schema: public; Owner: - -- -CREATE SEQUENCE material_type_id_seq +CREATE SEQUENCE public.material_type_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE @@ -2180,19 +2193,19 @@ CREATE SEQUENCE material_type_id_seq -- Name: material_type_property_types; Type: TABLE; Schema: public; Owner: - -- -CREATE TABLE material_type_property_types ( - id tech_id NOT NULL, - maty_id tech_id NOT NULL, - prty_id tech_id NOT NULL, - is_mandatory boolean_char DEFAULT false NOT NULL, - is_managed_internally boolean_char DEFAULT false NOT NULL, - registration_timestamp time_stamp_dfl DEFAULT now() NOT NULL, - pers_id_registerer tech_id NOT NULL, - ordinal ordinal_int NOT NULL, - section description_2000, - script_id tech_id, - is_shown_edit boolean_char DEFAULT true NOT NULL, - show_raw_value boolean_char DEFAULT false NOT NULL +CREATE TABLE public.material_type_property_types ( + id public.tech_id NOT NULL, + maty_id public.tech_id NOT NULL, + prty_id public.tech_id NOT NULL, + is_mandatory public.boolean_char DEFAULT false NOT NULL, + is_managed_internally public.boolean_char DEFAULT false NOT NULL, + registration_timestamp public.time_stamp_dfl DEFAULT now() NOT NULL, + pers_id_registerer public.tech_id NOT NULL, + ordinal public.ordinal_int NOT NULL, + section public.description_2000, + script_id public.tech_id, + is_shown_edit public.boolean_char DEFAULT true NOT NULL, + show_raw_value public.boolean_char DEFAULT false NOT NULL ); @@ -2200,12 +2213,12 @@ CREATE TABLE material_type_property_types ( -- Name: material_types; Type: TABLE; Schema: public; Owner: - -- -CREATE TABLE material_types ( - id tech_id NOT NULL, - code code NOT NULL, - description description_2000, - modification_timestamp time_stamp DEFAULT now(), - validation_script_id tech_id +CREATE TABLE public.material_types ( + id public.tech_id NOT NULL, + code public.code NOT NULL, + description public.description_2000, + modification_timestamp public.time_stamp DEFAULT now(), + validation_script_id public.tech_id ); @@ -2213,13 +2226,13 @@ CREATE TABLE material_types ( -- Name: materials; Type: TABLE; Schema: public; Owner: - -- -CREATE TABLE materials ( - id tech_id NOT NULL, - code code NOT NULL, - maty_id tech_id NOT NULL, - pers_id_registerer tech_id NOT NULL, - registration_timestamp time_stamp_dfl DEFAULT now() NOT NULL, - modification_timestamp time_stamp DEFAULT now() +CREATE TABLE public.materials ( + id public.tech_id NOT NULL, + code public.code NOT NULL, + maty_id public.tech_id NOT NULL, + pers_id_registerer public.tech_id NOT NULL, + registration_timestamp public.time_stamp_dfl DEFAULT now() NOT NULL, + modification_timestamp public.time_stamp DEFAULT now() ); @@ -2227,7 +2240,7 @@ CREATE TABLE materials ( -- Name: metaproject_assignment_id_seq; Type: SEQUENCE; Schema: public; Owner: - -- -CREATE SEQUENCE metaproject_assignment_id_seq +CREATE SEQUENCE public.metaproject_assignment_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE @@ -2239,15 +2252,15 @@ CREATE SEQUENCE metaproject_assignment_id_seq -- Name: metaproject_assignments_all; Type: TABLE; Schema: public; Owner: - -- -CREATE TABLE metaproject_assignments_all ( - id tech_id NOT NULL, - mepr_id tech_id NOT NULL, - expe_id tech_id, - samp_id tech_id, - data_id tech_id, - mate_id tech_id, - del_id tech_id, - creation_date time_stamp_dfl DEFAULT now() NOT NULL, +CREATE TABLE public.metaproject_assignments_all ( + id public.tech_id NOT NULL, + mepr_id public.tech_id NOT NULL, + expe_id public.tech_id, + samp_id public.tech_id, + data_id public.tech_id, + mate_id public.tech_id, + del_id public.tech_id, + creation_date public.time_stamp_dfl DEFAULT now() NOT NULL, CONSTRAINT metaproject_assignments_all_check_nn CHECK ((((expe_id IS NOT NULL) AND (samp_id IS NULL) AND (data_id IS NULL) AND (mate_id IS NULL)) OR ((expe_id IS NULL) AND (samp_id IS NOT NULL) AND (data_id IS NULL) AND (mate_id IS NULL)) OR ((expe_id IS NULL) AND (samp_id IS NULL) AND (data_id IS NOT NULL) AND (mate_id IS NULL)) OR ((expe_id IS NULL) AND (samp_id IS NULL) AND (data_id IS NULL) AND (mate_id IS NOT NULL)))) ); @@ -2256,7 +2269,7 @@ CREATE TABLE metaproject_assignments_all ( -- Name: metaproject_assignments; Type: VIEW; Schema: public; Owner: - -- -CREATE VIEW metaproject_assignments AS +CREATE VIEW public.metaproject_assignments AS SELECT metaproject_assignments_all.id, metaproject_assignments_all.mepr_id, metaproject_assignments_all.expe_id, @@ -2265,7 +2278,7 @@ CREATE VIEW metaproject_assignments AS metaproject_assignments_all.mate_id, metaproject_assignments_all.del_id, metaproject_assignments_all.creation_date - FROM metaproject_assignments_all + FROM public.metaproject_assignments_all WHERE (metaproject_assignments_all.del_id IS NULL); @@ -2273,7 +2286,7 @@ CREATE VIEW metaproject_assignments AS -- Name: metaproject_id_seq; Type: SEQUENCE; Schema: public; Owner: - -- -CREATE SEQUENCE metaproject_id_seq +CREATE SEQUENCE public.metaproject_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE @@ -2285,13 +2298,13 @@ CREATE SEQUENCE metaproject_id_seq -- Name: metaprojects; Type: TABLE; Schema: public; Owner: - -- -CREATE TABLE metaprojects ( - id tech_id NOT NULL, - name code NOT NULL, - description description_2000, - owner tech_id NOT NULL, - private boolean_char DEFAULT true NOT NULL, - creation_date time_stamp_dfl DEFAULT now() NOT NULL +CREATE TABLE public.metaprojects ( + id public.tech_id NOT NULL, + name public.code NOT NULL, + description public.description_2000, + owner public.tech_id NOT NULL, + private public.boolean_char DEFAULT true NOT NULL, + creation_date public.time_stamp_dfl DEFAULT now() NOT NULL ); @@ -2299,7 +2312,7 @@ CREATE TABLE metaprojects ( -- Name: mtpt_id_seq; Type: SEQUENCE; Schema: public; Owner: - -- -CREATE SEQUENCE mtpt_id_seq +CREATE SEQUENCE public.mtpt_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE @@ -2311,29 +2324,29 @@ CREATE SEQUENCE mtpt_id_seq -- Name: operation_executions; Type: TABLE; Schema: public; Owner: - -- -CREATE TABLE operation_executions ( - id tech_id NOT NULL, - code code NOT NULL, - state operation_execution_state DEFAULT 'NEW'::character varying NOT NULL, - owner tech_id NOT NULL, - description text_value, - notification text_value, - availability operation_execution_availability DEFAULT 'AVAILABLE'::character varying NOT NULL, +CREATE TABLE public.operation_executions ( + id public.tech_id NOT NULL, + code public.code NOT NULL, + state public.operation_execution_state DEFAULT 'NEW'::character varying NOT NULL, + owner public.tech_id NOT NULL, + description public.text_value, + notification public.text_value, + availability public.operation_execution_availability DEFAULT 'AVAILABLE'::character varying NOT NULL, availability_time bigint DEFAULT 1 NOT NULL, - summary_operations text_value, - summary_progress text_value, - summary_error text_value, - summary_results text_value, - summary_availability operation_execution_availability DEFAULT 'AVAILABLE'::character varying NOT NULL, + summary_operations public.text_value, + summary_progress public.text_value, + summary_error public.text_value, + summary_results public.text_value, + summary_availability public.operation_execution_availability DEFAULT 'AVAILABLE'::character varying NOT NULL, summary_availability_time bigint DEFAULT 1 NOT NULL, details_path character varying(1000), - details_availability operation_execution_availability DEFAULT 'AVAILABLE'::character varying NOT NULL, + details_availability public.operation_execution_availability DEFAULT 'AVAILABLE'::character varying NOT NULL, details_availability_time bigint DEFAULT 1 NOT NULL, - creation_date time_stamp_dfl NOT NULL, - start_date time_stamp, - finish_date time_stamp, - CONSTRAINT operation_executions_state_finish_date_check CHECK (((((state)::text = ANY ((ARRAY['NEW'::character varying, 'SCHEDULED'::character varying, 'RUNNING'::character varying])::text[])) AND (finish_date IS NULL)) OR (((state)::text = ANY ((ARRAY['FINISHED'::character varying, 'FAILED'::character varying])::text[])) AND (finish_date IS NOT NULL)))), - CONSTRAINT operation_executions_state_start_date_check CHECK (((((state)::text = ANY ((ARRAY['NEW'::character varying, 'SCHEDULED'::character varying])::text[])) AND (start_date IS NULL)) OR (((state)::text = ANY ((ARRAY['RUNNING'::character varying, 'FINISHED'::character varying, 'FAILED'::character varying])::text[])) AND (start_date IS NOT NULL)))) + creation_date public.time_stamp_dfl NOT NULL, + start_date public.time_stamp, + finish_date public.time_stamp, + CONSTRAINT operation_executions_state_finish_date_check CHECK (((((state)::text = ANY (ARRAY[('NEW'::character varying)::text, ('SCHEDULED'::character varying)::text, ('RUNNING'::character varying)::text])) AND (finish_date IS NULL)) OR (((state)::text = ANY (ARRAY[('FINISHED'::character varying)::text, ('FAILED'::character varying)::text])) AND (finish_date IS NOT NULL)))), + CONSTRAINT operation_executions_state_start_date_check CHECK (((((state)::text = ANY (ARRAY[('NEW'::character varying)::text, ('SCHEDULED'::character varying)::text])) AND (start_date IS NULL)) OR (((state)::text = ANY (ARRAY[('RUNNING'::character varying)::text, ('FINISHED'::character varying)::text, ('FAILED'::character varying)::text])) AND (start_date IS NOT NULL)))) ); @@ -2341,7 +2354,7 @@ CREATE TABLE operation_executions ( -- Name: operation_executions_id_seq; Type: SEQUENCE; Schema: public; Owner: - -- -CREATE SEQUENCE operation_executions_id_seq +CREATE SEQUENCE public.operation_executions_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE @@ -2353,7 +2366,7 @@ CREATE SEQUENCE operation_executions_id_seq -- Name: perm_id_seq; Type: SEQUENCE; Schema: public; Owner: - -- -CREATE SEQUENCE perm_id_seq +CREATE SEQUENCE public.perm_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE @@ -2365,7 +2378,7 @@ CREATE SEQUENCE perm_id_seq -- Name: person_id_seq; Type: SEQUENCE; Schema: public; Owner: - -- -CREATE SEQUENCE person_id_seq +CREATE SEQUENCE public.person_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE @@ -2377,16 +2390,16 @@ CREATE SEQUENCE person_id_seq -- Name: persons; Type: TABLE; Schema: public; Owner: - -- -CREATE TABLE persons ( - id tech_id NOT NULL, +CREATE TABLE public.persons ( + id public.tech_id NOT NULL, first_name character varying(30), last_name character varying(30), - user_id user_id NOT NULL, - email object_name, - space_id tech_id, - registration_timestamp time_stamp_dfl DEFAULT now() NOT NULL, - pers_id_registerer tech_id, - display_settings file, + user_id public.user_id NOT NULL, + email public.object_name, + space_id public.tech_id, + registration_timestamp public.time_stamp_dfl DEFAULT now() NOT NULL, + pers_id_registerer public.tech_id, + display_settings public.file, is_active boolean DEFAULT true ); @@ -2395,9 +2408,9 @@ CREATE TABLE persons ( -- Name: post_registration_dataset_queue; Type: TABLE; Schema: public; Owner: - -- -CREATE TABLE post_registration_dataset_queue ( - id tech_id NOT NULL, - ds_id tech_id NOT NULL +CREATE TABLE public.post_registration_dataset_queue ( + id public.tech_id NOT NULL, + ds_id public.tech_id NOT NULL ); @@ -2405,7 +2418,7 @@ CREATE TABLE post_registration_dataset_queue ( -- Name: post_registration_dataset_queue_id_seq; Type: SEQUENCE; Schema: public; Owner: - -- -CREATE SEQUENCE post_registration_dataset_queue_id_seq +CREATE SEQUENCE public.post_registration_dataset_queue_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE @@ -2417,7 +2430,7 @@ CREATE SEQUENCE post_registration_dataset_queue_id_seq -- Name: project_id_seq; Type: SEQUENCE; Schema: public; Owner: - -- -CREATE SEQUENCE project_id_seq +CREATE SEQUENCE public.project_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE @@ -2429,16 +2442,16 @@ CREATE SEQUENCE project_id_seq -- Name: project_relationships_history; Type: TABLE; Schema: public; Owner: - -- -CREATE TABLE project_relationships_history ( - id tech_id NOT NULL, - main_proj_id tech_id NOT NULL, - relation_type text_value, - expe_id tech_id, - space_id tech_id, - entity_perm_id text_value, - pers_id_author tech_id, - valid_from_timestamp time_stamp NOT NULL, - valid_until_timestamp time_stamp +CREATE TABLE public.project_relationships_history ( + id public.tech_id NOT NULL, + main_proj_id public.tech_id NOT NULL, + relation_type public.text_value, + expe_id public.tech_id, + space_id public.tech_id, + entity_perm_id public.text_value, + pers_id_author public.tech_id, + valid_from_timestamp public.time_stamp NOT NULL, + valid_until_timestamp public.time_stamp ); @@ -2446,7 +2459,7 @@ CREATE TABLE project_relationships_history ( -- Name: project_relationships_history_id_seq; Type: SEQUENCE; Schema: public; Owner: - -- -CREATE SEQUENCE project_relationships_history_id_seq +CREATE SEQUENCE public.project_relationships_history_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE @@ -2458,17 +2471,17 @@ CREATE SEQUENCE project_relationships_history_id_seq -- Name: projects; Type: TABLE; Schema: public; Owner: - -- -CREATE TABLE projects ( - id tech_id NOT NULL, - perm_id code NOT NULL, - code code NOT NULL, - space_id tech_id NOT NULL, - pers_id_leader tech_id, - description text_value, - pers_id_registerer tech_id NOT NULL, - registration_timestamp time_stamp_dfl DEFAULT now() NOT NULL, - modification_timestamp time_stamp DEFAULT now(), - pers_id_modifier tech_id, +CREATE TABLE public.projects ( + id public.tech_id NOT NULL, + perm_id public.code NOT NULL, + code public.code NOT NULL, + space_id public.tech_id NOT NULL, + pers_id_leader public.tech_id, + description public.text_value, + pers_id_registerer public.tech_id NOT NULL, + registration_timestamp public.time_stamp_dfl DEFAULT now() NOT NULL, + modification_timestamp public.time_stamp DEFAULT now(), + pers_id_modifier public.tech_id, version integer DEFAULT 0 ); @@ -2477,7 +2490,7 @@ CREATE TABLE projects ( -- Name: property_type_id_seq; Type: SEQUENCE; Schema: public; Owner: - -- -CREATE SEQUENCE property_type_id_seq +CREATE SEQUENCE public.property_type_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE @@ -2489,20 +2502,20 @@ CREATE SEQUENCE property_type_id_seq -- Name: property_types; Type: TABLE; Schema: public; Owner: - -- -CREATE TABLE property_types ( - id tech_id NOT NULL, - code code NOT NULL, - description description_2000 NOT NULL, - label column_label NOT NULL, - daty_id tech_id NOT NULL, - registration_timestamp time_stamp_dfl DEFAULT now() NOT NULL, - pers_id_registerer tech_id NOT NULL, - covo_id tech_id, - is_managed_internally boolean_char DEFAULT false NOT NULL, - is_internal_namespace boolean_char DEFAULT false NOT NULL, - maty_prop_id tech_id, - schema text_value, - transformation text_value +CREATE TABLE public.property_types ( + id public.tech_id NOT NULL, + code public.code NOT NULL, + description public.description_2000 NOT NULL, + label public.column_label NOT NULL, + daty_id public.tech_id NOT NULL, + registration_timestamp public.time_stamp_dfl DEFAULT now() NOT NULL, + pers_id_registerer public.tech_id NOT NULL, + covo_id public.tech_id, + is_managed_internally public.boolean_char DEFAULT false NOT NULL, + is_internal_namespace public.boolean_char DEFAULT false NOT NULL, + maty_prop_id public.tech_id, + schema public.text_value, + transformation public.text_value ); @@ -2510,18 +2523,18 @@ CREATE TABLE property_types ( -- Name: queries; Type: TABLE; Schema: public; Owner: - -- -CREATE TABLE queries ( - id tech_id NOT NULL, +CREATE TABLE public.queries ( + id public.tech_id NOT NULL, name character varying(200) NOT NULL, - description description_2000, - registration_timestamp time_stamp_dfl DEFAULT now() NOT NULL, - pers_id_registerer tech_id NOT NULL, - modification_timestamp time_stamp DEFAULT now(), + description public.description_2000, + registration_timestamp public.time_stamp_dfl DEFAULT now() NOT NULL, + pers_id_registerer public.tech_id NOT NULL, + modification_timestamp public.time_stamp DEFAULT now(), expression text NOT NULL, is_public boolean NOT NULL, - query_type query_type NOT NULL, - entity_type_code code, - db_key code DEFAULT '1'::character varying NOT NULL + query_type public.query_type NOT NULL, + entity_type_code public.code, + db_key public.code DEFAULT '1'::character varying NOT NULL ); @@ -2529,7 +2542,7 @@ CREATE TABLE queries ( -- Name: query_id_seq; Type: SEQUENCE; Schema: public; Owner: - -- -CREATE SEQUENCE query_id_seq +CREATE SEQUENCE public.query_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE @@ -2541,7 +2554,7 @@ CREATE SEQUENCE query_id_seq -- Name: relationship_type_id_seq; Type: SEQUENCE; Schema: public; Owner: - -- -CREATE SEQUENCE relationship_type_id_seq +CREATE SEQUENCE public.relationship_type_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE @@ -2553,17 +2566,17 @@ CREATE SEQUENCE relationship_type_id_seq -- Name: relationship_types; Type: TABLE; Schema: public; Owner: - -- -CREATE TABLE relationship_types ( - id tech_id NOT NULL, - code code NOT NULL, - label column_label, - parent_label column_label, - child_label column_label, - description description_2000, - registration_timestamp time_stamp_dfl DEFAULT now() NOT NULL, - pers_id_registerer tech_id NOT NULL, - is_managed_internally boolean_char DEFAULT false NOT NULL, - is_internal_namespace boolean_char DEFAULT false NOT NULL +CREATE TABLE public.relationship_types ( + id public.tech_id NOT NULL, + code public.code NOT NULL, + label public.column_label, + parent_label public.column_label, + child_label public.column_label, + description public.description_2000, + registration_timestamp public.time_stamp_dfl DEFAULT now() NOT NULL, + pers_id_registerer public.tech_id NOT NULL, + is_managed_internally public.boolean_char DEFAULT false NOT NULL, + is_internal_namespace public.boolean_char DEFAULT false NOT NULL ); @@ -2571,7 +2584,7 @@ CREATE TABLE relationship_types ( -- Name: role_assignment_id_seq; Type: SEQUENCE; Schema: public; Owner: - -- -CREATE SEQUENCE role_assignment_id_seq +CREATE SEQUENCE public.role_assignment_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE @@ -2583,15 +2596,15 @@ CREATE SEQUENCE role_assignment_id_seq -- Name: role_assignments; Type: TABLE; Schema: public; Owner: - -- -CREATE TABLE role_assignments ( - id tech_id NOT NULL, - role_code authorization_role NOT NULL, - space_id tech_id, - pers_id_grantee tech_id, - ag_id_grantee tech_id, - pers_id_registerer tech_id NOT NULL, - registration_timestamp time_stamp_dfl DEFAULT now() NOT NULL, - project_id tech_id, +CREATE TABLE public.role_assignments ( + id public.tech_id NOT NULL, + role_code public.authorization_role NOT NULL, + space_id public.tech_id, + pers_id_grantee public.tech_id, + ag_id_grantee public.tech_id, + pers_id_registerer public.tech_id NOT NULL, + registration_timestamp public.time_stamp_dfl DEFAULT now() NOT NULL, + project_id public.tech_id, CONSTRAINT roas_ag_pers_arc_ck CHECK ((((ag_id_grantee IS NOT NULL) AND (pers_id_grantee IS NULL)) OR ((ag_id_grantee IS NULL) AND (pers_id_grantee IS NOT NULL)))), CONSTRAINT roas_space_project_ck CHECK (((space_id IS NULL) OR (project_id IS NULL))) ); @@ -2601,7 +2614,7 @@ CREATE TABLE role_assignments ( -- Name: sample_code_seq; Type: SEQUENCE; Schema: public; Owner: - -- -CREATE SEQUENCE sample_code_seq +CREATE SEQUENCE public.sample_code_seq START WITH 1 INCREMENT BY 1 NO MINVALUE @@ -2613,16 +2626,16 @@ CREATE SEQUENCE sample_code_seq -- Name: sample_properties_history; Type: TABLE; Schema: public; Owner: - -- -CREATE TABLE sample_properties_history ( - id tech_id NOT NULL, - samp_id tech_id NOT NULL, - stpt_id tech_id NOT NULL, - value text_value, - vocabulary_term identifier, - material identifier, - pers_id_author tech_id NOT NULL, - valid_from_timestamp time_stamp NOT NULL, - valid_until_timestamp time_stamp DEFAULT now(), +CREATE TABLE public.sample_properties_history ( + id public.tech_id NOT NULL, + samp_id public.tech_id NOT NULL, + stpt_id public.tech_id NOT NULL, + value public.text_value, + vocabulary_term public.identifier, + material public.identifier, + pers_id_author public.tech_id NOT NULL, + valid_from_timestamp public.time_stamp NOT NULL, + valid_until_timestamp public.time_stamp DEFAULT now(), CONSTRAINT saprh_ck CHECK ((((value IS NOT NULL) AND (vocabulary_term IS NULL) AND (material IS NULL)) OR ((value IS NULL) AND (vocabulary_term IS NOT NULL) AND (material IS NULL)) OR ((value IS NULL) AND (vocabulary_term IS NULL) AND (material IS NOT NULL)))) ); @@ -2631,19 +2644,19 @@ CREATE TABLE sample_properties_history ( -- Name: sample_relationships_history; Type: TABLE; Schema: public; Owner: - -- -CREATE TABLE sample_relationships_history ( - id tech_id NOT NULL, - main_samp_id tech_id NOT NULL, - relation_type text_value, - expe_id tech_id, - samp_id tech_id, - data_id tech_id, - entity_perm_id text_value, - pers_id_author tech_id, - valid_from_timestamp time_stamp NOT NULL, - valid_until_timestamp time_stamp, - space_id tech_id, - proj_id tech_id +CREATE TABLE public.sample_relationships_history ( + id public.tech_id NOT NULL, + main_samp_id public.tech_id NOT NULL, + relation_type public.text_value, + expe_id public.tech_id, + samp_id public.tech_id, + data_id public.tech_id, + entity_perm_id public.text_value, + pers_id_author public.tech_id, + valid_from_timestamp public.time_stamp NOT NULL, + valid_until_timestamp public.time_stamp, + space_id public.tech_id, + proj_id public.tech_id ); @@ -2651,7 +2664,7 @@ CREATE TABLE sample_relationships_history ( -- Name: sample_history_view; Type: VIEW; Schema: public; Owner: - -- -CREATE VIEW sample_history_view AS +CREATE VIEW public.sample_history_view AS SELECT (2 * (sample_relationships_history.id)::bigint) AS id, sample_relationships_history.main_samp_id, sample_relationships_history.relation_type, @@ -2668,7 +2681,7 @@ CREATE VIEW sample_history_view AS sample_relationships_history.pers_id_author, sample_relationships_history.valid_from_timestamp, sample_relationships_history.valid_until_timestamp - FROM sample_relationships_history + FROM public.sample_relationships_history WHERE (sample_relationships_history.valid_until_timestamp IS NOT NULL) UNION SELECT ((2 * (sample_properties_history.id)::bigint) + 1) AS id, @@ -2687,14 +2700,14 @@ UNION sample_properties_history.pers_id_author, sample_properties_history.valid_from_timestamp, sample_properties_history.valid_until_timestamp - FROM sample_properties_history; + FROM public.sample_properties_history; -- -- Name: sample_id_seq; Type: SEQUENCE; Schema: public; Owner: - -- -CREATE SEQUENCE sample_id_seq +CREATE SEQUENCE public.sample_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE @@ -2706,17 +2719,17 @@ CREATE SEQUENCE sample_id_seq -- Name: sample_properties; Type: TABLE; Schema: public; Owner: - -- -CREATE TABLE sample_properties ( - id tech_id NOT NULL, - samp_id tech_id NOT NULL, - stpt_id tech_id NOT NULL, - value text_value, - cvte_id tech_id, - mate_prop_id tech_id, - pers_id_registerer tech_id NOT NULL, - registration_timestamp time_stamp_dfl DEFAULT now() NOT NULL, - pers_id_author tech_id NOT NULL, - modification_timestamp time_stamp DEFAULT now(), +CREATE TABLE public.sample_properties ( + id public.tech_id NOT NULL, + samp_id public.tech_id NOT NULL, + stpt_id public.tech_id NOT NULL, + value public.text_value, + cvte_id public.tech_id, + mate_prop_id public.tech_id, + pers_id_registerer public.tech_id NOT NULL, + registration_timestamp public.time_stamp_dfl DEFAULT now() NOT NULL, + pers_id_author public.tech_id NOT NULL, + modification_timestamp public.time_stamp DEFAULT now(), CONSTRAINT sapr_ck CHECK ((((value IS NOT NULL) AND (cvte_id IS NULL) AND (mate_prop_id IS NULL)) OR ((value IS NULL) AND (cvte_id IS NOT NULL) AND (mate_prop_id IS NULL)) OR ((value IS NULL) AND (cvte_id IS NULL) AND (mate_prop_id IS NOT NULL)))) ); @@ -2725,7 +2738,7 @@ CREATE TABLE sample_properties ( -- Name: sample_property_id_seq; Type: SEQUENCE; Schema: public; Owner: - -- -CREATE SEQUENCE sample_property_id_seq +CREATE SEQUENCE public.sample_property_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE @@ -2737,7 +2750,7 @@ CREATE SEQUENCE sample_property_id_seq -- Name: sample_relationship_id_seq; Type: SEQUENCE; Schema: public; Owner: - -- -CREATE SEQUENCE sample_relationship_id_seq +CREATE SEQUENCE public.sample_relationship_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE @@ -2749,15 +2762,15 @@ CREATE SEQUENCE sample_relationship_id_seq -- Name: sample_relationships_all; Type: TABLE; Schema: public; Owner: - -- -CREATE TABLE sample_relationships_all ( - id tech_id NOT NULL, - sample_id_parent tech_id NOT NULL, - relationship_id tech_id NOT NULL, - sample_id_child tech_id NOT NULL, - del_id tech_id, - pers_id_author tech_id, - registration_timestamp time_stamp_dfl DEFAULT now() NOT NULL, - modification_timestamp time_stamp DEFAULT now() +CREATE TABLE public.sample_relationships_all ( + id public.tech_id NOT NULL, + sample_id_parent public.tech_id NOT NULL, + relationship_id public.tech_id NOT NULL, + sample_id_child public.tech_id NOT NULL, + del_id public.tech_id, + pers_id_author public.tech_id, + registration_timestamp public.time_stamp_dfl DEFAULT now() NOT NULL, + modification_timestamp public.time_stamp DEFAULT now() ); @@ -2765,7 +2778,7 @@ CREATE TABLE sample_relationships_all ( -- Name: sample_relationships; Type: VIEW; Schema: public; Owner: - -- -CREATE VIEW sample_relationships AS +CREATE VIEW public.sample_relationships AS SELECT sample_relationships_all.id, sample_relationships_all.sample_id_parent, sample_relationships_all.relationship_id, @@ -2774,7 +2787,7 @@ CREATE VIEW sample_relationships AS sample_relationships_all.pers_id_author, sample_relationships_all.registration_timestamp, sample_relationships_all.modification_timestamp - FROM sample_relationships_all + FROM public.sample_relationships_all WHERE (sample_relationships_all.del_id IS NULL); @@ -2782,7 +2795,7 @@ CREATE VIEW sample_relationships AS -- Name: sample_relationships_history_id_seq; Type: SEQUENCE; Schema: public; Owner: - -- -CREATE SEQUENCE sample_relationships_history_id_seq +CREATE SEQUENCE public.sample_relationships_history_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE @@ -2794,7 +2807,7 @@ CREATE SEQUENCE sample_relationships_history_id_seq -- Name: sample_type_id_seq; Type: SEQUENCE; Schema: public; Owner: - -- -CREATE SEQUENCE sample_type_id_seq +CREATE SEQUENCE public.sample_type_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE @@ -2806,20 +2819,20 @@ CREATE SEQUENCE sample_type_id_seq -- Name: sample_type_property_types; Type: TABLE; Schema: public; Owner: - -- -CREATE TABLE sample_type_property_types ( - id tech_id NOT NULL, - saty_id tech_id NOT NULL, - prty_id tech_id NOT NULL, - is_mandatory boolean_char DEFAULT false NOT NULL, - is_managed_internally boolean_char DEFAULT false NOT NULL, - pers_id_registerer tech_id NOT NULL, - registration_timestamp time_stamp_dfl DEFAULT now() NOT NULL, - is_displayed boolean_char DEFAULT true NOT NULL, - ordinal ordinal_int NOT NULL, - section description_2000, - script_id tech_id, - is_shown_edit boolean_char DEFAULT true NOT NULL, - show_raw_value boolean_char DEFAULT false NOT NULL +CREATE TABLE public.sample_type_property_types ( + id public.tech_id NOT NULL, + saty_id public.tech_id NOT NULL, + prty_id public.tech_id NOT NULL, + is_mandatory public.boolean_char DEFAULT false NOT NULL, + is_managed_internally public.boolean_char DEFAULT false NOT NULL, + pers_id_registerer public.tech_id NOT NULL, + registration_timestamp public.time_stamp_dfl DEFAULT now() NOT NULL, + is_displayed public.boolean_char DEFAULT true NOT NULL, + ordinal public.ordinal_int NOT NULL, + section public.description_2000, + script_id public.tech_id, + is_shown_edit public.boolean_char DEFAULT true NOT NULL, + show_raw_value public.boolean_char DEFAULT false NOT NULL ); @@ -2827,20 +2840,20 @@ CREATE TABLE sample_type_property_types ( -- Name: sample_types; Type: TABLE; Schema: public; Owner: - -- -CREATE TABLE sample_types ( - id tech_id NOT NULL, - code code NOT NULL, - description description_2000, - is_listable boolean_char DEFAULT true NOT NULL, +CREATE TABLE public.sample_types ( + id public.tech_id NOT NULL, + code public.code NOT NULL, + description public.description_2000, + is_listable public.boolean_char DEFAULT true NOT NULL, generated_from_depth integer DEFAULT 0 NOT NULL, part_of_depth integer DEFAULT 0 NOT NULL, - modification_timestamp time_stamp DEFAULT now(), - is_auto_generated_code boolean_char DEFAULT false NOT NULL, - generated_code_prefix code DEFAULT 'S'::character varying NOT NULL, - is_subcode_unique boolean_char DEFAULT false NOT NULL, - inherit_properties boolean_char DEFAULT false NOT NULL, - validation_script_id tech_id, - show_parent_metadata boolean_char DEFAULT false NOT NULL + modification_timestamp public.time_stamp DEFAULT now(), + is_auto_generated_code public.boolean_char DEFAULT false NOT NULL, + generated_code_prefix public.code DEFAULT 'S'::character varying NOT NULL, + is_subcode_unique public.boolean_char DEFAULT false NOT NULL, + inherit_properties public.boolean_char DEFAULT false NOT NULL, + validation_script_id public.tech_id, + show_parent_metadata public.boolean_char DEFAULT false NOT NULL ); @@ -2848,24 +2861,24 @@ CREATE TABLE sample_types ( -- Name: samples_all; Type: TABLE; Schema: public; Owner: - -- -CREATE TABLE samples_all ( - id tech_id NOT NULL, - perm_id code NOT NULL, - code code NOT NULL, - expe_id tech_id, - saty_id tech_id NOT NULL, - registration_timestamp time_stamp_dfl DEFAULT now() NOT NULL, - modification_timestamp time_stamp DEFAULT now(), - pers_id_registerer tech_id NOT NULL, - del_id tech_id, - orig_del tech_id, - space_id tech_id, - samp_id_part_of tech_id, - pers_id_modifier tech_id, +CREATE TABLE public.samples_all ( + id public.tech_id NOT NULL, + perm_id public.code NOT NULL, + code public.code NOT NULL, + expe_id public.tech_id, + saty_id public.tech_id NOT NULL, + registration_timestamp public.time_stamp_dfl DEFAULT now() NOT NULL, + modification_timestamp public.time_stamp DEFAULT now(), + pers_id_registerer public.tech_id NOT NULL, + del_id public.tech_id, + orig_del public.tech_id, + space_id public.tech_id, + samp_id_part_of public.tech_id, + pers_id_modifier public.tech_id, code_unique_check character varying(300), subcode_unique_check character varying(300), version integer DEFAULT 0, - proj_id tech_id + proj_id public.tech_id ); @@ -2873,7 +2886,7 @@ CREATE TABLE samples_all ( -- Name: samples; Type: VIEW; Schema: public; Owner: - -- -CREATE VIEW samples AS +CREATE VIEW public.samples AS SELECT samples_all.id, samples_all.perm_id, samples_all.code, @@ -2889,7 +2902,7 @@ CREATE VIEW samples AS samples_all.space_id, samples_all.samp_id_part_of, samples_all.version - FROM samples_all + FROM public.samples_all WHERE (samples_all.del_id IS NULL); @@ -2897,7 +2910,7 @@ CREATE VIEW samples AS -- Name: samples_deleted; Type: VIEW; Schema: public; Owner: - -- -CREATE VIEW samples_deleted AS +CREATE VIEW public.samples_deleted AS SELECT samples_all.id, samples_all.perm_id, samples_all.code, @@ -2913,7 +2926,7 @@ CREATE VIEW samples_deleted AS samples_all.proj_id, samples_all.samp_id_part_of, samples_all.version - FROM samples_all + FROM public.samples_all WHERE (samples_all.del_id IS NOT NULL); @@ -2921,7 +2934,7 @@ CREATE VIEW samples_deleted AS -- Name: script_id_seq; Type: SEQUENCE; Schema: public; Owner: - -- -CREATE SEQUENCE script_id_seq +CREATE SEQUENCE public.script_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE @@ -2933,17 +2946,17 @@ CREATE SEQUENCE script_id_seq -- Name: scripts; Type: TABLE; Schema: public; Owner: - -- -CREATE TABLE scripts ( - id tech_id NOT NULL, +CREATE TABLE public.scripts ( + id public.tech_id NOT NULL, name character varying(200) NOT NULL, - script_type script_type NOT NULL, - description description_2000, - script text_value, - registration_timestamp time_stamp_dfl DEFAULT now() NOT NULL, - pers_id_registerer tech_id NOT NULL, - entity_kind entity_kind, - plugin_type plugin_type DEFAULT 'JYTHON'::character varying NOT NULL, - is_available boolean_char DEFAULT true NOT NULL, + script_type public.script_type NOT NULL, + description public.description_2000, + script public.text_value, + registration_timestamp public.time_stamp_dfl DEFAULT now() NOT NULL, + pers_id_registerer public.tech_id NOT NULL, + entity_kind public.entity_kind, + plugin_type public.plugin_type DEFAULT 'JYTHON'::character varying NOT NULL, + is_available public.boolean_char DEFAULT true NOT NULL, CONSTRAINT script_nn_ck CHECK ((((plugin_type)::text = 'PREDEPLOYED'::text) OR (script IS NOT NULL))) ); @@ -2952,7 +2965,7 @@ CREATE TABLE scripts ( -- Name: semantic_annotation_id_seq; Type: SEQUENCE; Schema: public; Owner: - -- -CREATE SEQUENCE semantic_annotation_id_seq +CREATE SEQUENCE public.semantic_annotation_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE @@ -2964,19 +2977,19 @@ CREATE SEQUENCE semantic_annotation_id_seq -- Name: semantic_annotations; Type: TABLE; Schema: public; Owner: - -- -CREATE TABLE semantic_annotations ( - id tech_id NOT NULL, - perm_id code NOT NULL, - saty_id tech_id, - stpt_id tech_id, - prty_id tech_id, +CREATE TABLE public.semantic_annotations ( + id public.tech_id NOT NULL, + perm_id public.code NOT NULL, + saty_id public.tech_id, + stpt_id public.tech_id, + prty_id public.tech_id, predicate_ontology_id text, predicate_ontology_version text, predicate_accession_id text, descriptor_ontology_id text, descriptor_ontology_version text, descriptor_accession_id text, - creation_date time_stamp_dfl NOT NULL, + creation_date public.time_stamp_dfl NOT NULL, CONSTRAINT semantic_annotations_ssp_ck CHECK ((((saty_id IS NOT NULL) AND (stpt_id IS NULL) AND (prty_id IS NULL)) OR ((saty_id IS NULL) AND (stpt_id IS NOT NULL) AND (prty_id IS NULL)) OR ((saty_id IS NULL) AND (stpt_id IS NULL) AND (prty_id IS NOT NULL)))) ); @@ -2985,7 +2998,7 @@ CREATE TABLE semantic_annotations ( -- Name: space_id_seq; Type: SEQUENCE; Schema: public; Owner: - -- -CREATE SEQUENCE space_id_seq +CREATE SEQUENCE public.space_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE @@ -2997,12 +3010,12 @@ CREATE SEQUENCE space_id_seq -- Name: spaces; Type: TABLE; Schema: public; Owner: - -- -CREATE TABLE spaces ( - id tech_id NOT NULL, - code code NOT NULL, - description description_2000, - registration_timestamp time_stamp_dfl DEFAULT now() NOT NULL, - pers_id_registerer tech_id NOT NULL +CREATE TABLE public.spaces ( + id public.tech_id NOT NULL, + code public.code NOT NULL, + description public.description_2000, + registration_timestamp public.time_stamp_dfl DEFAULT now() NOT NULL, + pers_id_registerer public.tech_id NOT NULL ); @@ -3010,7 +3023,7 @@ CREATE TABLE spaces ( -- Name: stpt_id_seq; Type: SEQUENCE; Schema: public; Owner: - -- -CREATE SEQUENCE stpt_id_seq +CREATE SEQUENCE public.stpt_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE @@ -3022,14 +3035,14 @@ CREATE SEQUENCE stpt_id_seq -- Name: attachment_content_id_seq; Type: SEQUENCE SET; Schema: public; Owner: - -- -SELECT pg_catalog.setval('attachment_content_id_seq', 4, true); +SELECT pg_catalog.setval('public.attachment_content_id_seq', 4, true); -- -- Data for Name: attachment_contents; Type: TABLE DATA; Schema: public; Owner: - -- -COPY attachment_contents (id, value) FROM stdin; +COPY public.attachment_contents (id, value) FROM stdin; 2 \\x70726f6a656374206174746163686d656e74 3 \\x6578706572696d656e74206174746163686d656e74 4 \\x73616d706c65206174746163686d656e74 @@ -3040,14 +3053,14 @@ COPY attachment_contents (id, value) FROM stdin; -- Name: attachment_id_seq; Type: SEQUENCE SET; Schema: public; Owner: - -- -SELECT pg_catalog.setval('attachment_id_seq', 4, true); +SELECT pg_catalog.setval('public.attachment_id_seq', 4, true); -- -- Data for Name: attachments; Type: TABLE DATA; Schema: public; Owner: - -- -COPY attachments (id, expe_id, samp_id, proj_id, exac_id, file_name, registration_timestamp, version, pers_id_registerer, title, description) FROM stdin; +COPY public.attachments (id, expe_id, samp_id, proj_id, exac_id, file_name, registration_timestamp, version, pers_id_registerer, title, description) FROM stdin; 2 \N \N 4 2 projectAttachment 2013-04-15 11:16:02.251138+02 1 3 TEST-PROJECT attachment \N 3 3 \N \N 3 experimentAttachment 2013-04-15 11:16:25.045499+02 1 3 TEST-EXPERIMENT attachment \N 4 \N 345 \N 4 sampleAttachment 2013-04-15 11:17:39.816868+02 1 3 TEST-SAMPLE-2 attachment \N @@ -3058,14 +3071,14 @@ COPY attachments (id, expe_id, samp_id, proj_id, exac_id, file_name, registratio -- Name: authorization_group_id_seq; Type: SEQUENCE SET; Schema: public; Owner: - -- -SELECT pg_catalog.setval('authorization_group_id_seq', 2, false); +SELECT pg_catalog.setval('public.authorization_group_id_seq', 2, false); -- -- Data for Name: authorization_group_persons; Type: TABLE DATA; Schema: public; Owner: - -- -COPY authorization_group_persons (ag_id, pers_id) FROM stdin; +COPY public.authorization_group_persons (ag_id, pers_id) FROM stdin; \. @@ -3073,7 +3086,7 @@ COPY authorization_group_persons (ag_id, pers_id) FROM stdin; -- Data for Name: authorization_groups; Type: TABLE DATA; Schema: public; Owner: - -- -COPY authorization_groups (id, code, description, registration_timestamp, pers_id_registerer, modification_timestamp) FROM stdin; +COPY public.authorization_groups (id, code, description, registration_timestamp, pers_id_registerer, modification_timestamp) FROM stdin; 1 TEST-GROUP myDescription 2008-11-05 09:18:10.893+01 2 2008-11-05 09:18:10.893+01 \. @@ -3082,14 +3095,14 @@ COPY authorization_groups (id, code, description, registration_timestamp, pers_i -- Name: code_seq; Type: SEQUENCE SET; Schema: public; Owner: - -- -SELECT pg_catalog.setval('code_seq', 21, true); +SELECT pg_catalog.setval('public.code_seq', 21, true); -- -- Data for Name: content_copies; Type: TABLE DATA; Schema: public; Owner: - -- -COPY content_copies (data_id, edms_id, external_code, id, location_type, path, git_commit_hash, location_unique_check, pers_id_registerer, registration_timestamp, git_repository_id) FROM stdin; +COPY public.content_copies (data_id, edms_id, external_code, id, location_type, path, git_commit_hash, location_unique_check, pers_id_registerer, registration_timestamp, git_repository_id) FROM stdin; 33 1 EXTERNAL_CODE_1 1 URL \N \N 33,1,,,EXTERNAL_CODE_1 2 2016-06-13 19:54:37.233702+02 \N 34 2 EXTERNAL_CODE_2 2 OPENBIS \N \N 34,2,,,EXTERNAL_CODE_2 2 2016-06-13 19:54:44.452762+02 \N \. @@ -3099,14 +3112,14 @@ COPY content_copies (data_id, edms_id, external_code, id, location_type, path, g -- Name: content_copies_id_seq; Type: SEQUENCE SET; Schema: public; Owner: - -- -SELECT pg_catalog.setval('content_copies_id_seq', 2, true); +SELECT pg_catalog.setval('public.content_copies_id_seq', 2, true); -- -- Data for Name: controlled_vocabularies; Type: TABLE DATA; Schema: public; Owner: - -- -COPY controlled_vocabularies (id, code, description, registration_timestamp, pers_id_registerer, is_managed_internally, is_internal_namespace, modification_timestamp, is_chosen_from_list, source_uri) FROM stdin; +COPY public.controlled_vocabularies (id, code, description, registration_timestamp, pers_id_registerer, is_managed_internally, is_internal_namespace, modification_timestamp, is_chosen_from_list, source_uri) FROM stdin; 1 STORAGE_FORMAT The on-disk storage format of a data set 2013-04-12 10:04:52.629266+02 1 t t 2013-04-12 10:04:52.629266+02 t \N 2 AGILENT_KIT \N 2013-04-12 10:04:56.658885+02 1 f f 2013-04-12 10:05:36.622+02 t \N 3 ALIGNMENT_SOFTWARE If an alignment is requested, which software package should be use? 2013-04-12 10:04:56.658885+02 1 f f 2013-04-12 10:05:36.636+02 t \N @@ -3139,14 +3152,14 @@ COPY controlled_vocabularies (id, code, description, registration_timestamp, per -- Name: controlled_vocabulary_id_seq; Type: SEQUENCE SET; Schema: public; Owner: - -- -SELECT pg_catalog.setval('controlled_vocabulary_id_seq', 25, true); +SELECT pg_catalog.setval('public.controlled_vocabulary_id_seq', 25, true); -- -- Data for Name: controlled_vocabulary_terms; Type: TABLE DATA; Schema: public; Owner: - -- -COPY controlled_vocabulary_terms (id, code, registration_timestamp, covo_id, pers_id_registerer, label, description, ordinal, is_official) FROM stdin; +COPY public.controlled_vocabulary_terms (id, code, registration_timestamp, covo_id, pers_id_registerer, label, description, ordinal, is_official) FROM stdin; 1 PROPRIETARY 2013-04-12 10:04:52.629266+02 1 1 \N \N 1 t 2 BDS_DIRECTORY 2013-04-12 10:04:52.629266+02 1 1 \N \N 2 t 3 AGILENT_DNA_KIT_1000 2013-04-12 10:04:56.658885+02 2 1 \N \N 1 t @@ -3418,14 +3431,14 @@ COPY controlled_vocabulary_terms (id, code, registration_timestamp, covo_id, per -- Name: core_plugin_id_seq; Type: SEQUENCE SET; Schema: public; Owner: - -- -SELECT pg_catalog.setval('core_plugin_id_seq', 3, true); +SELECT pg_catalog.setval('public.core_plugin_id_seq', 3, true); -- -- Data for Name: core_plugins; Type: TABLE DATA; Schema: public; Owner: - -- -COPY core_plugins (id, name, version, registration_timestamp, master_reg_script) FROM stdin; +COPY public.core_plugins (id, name, version, registration_timestamp, master_reg_script) FROM stdin; 1 illumina-ngs 2 2013-04-12 10:04:56.658885+02 # -*- coding: utf-8 -*-\nimport ch.systemsx.cisd.openbis.generic.server.jython.api.v1.DataType as DataType\n\nprint ("Importing Master Data...")\n\ntr = service.transaction()\n\n\nfile_type_FASTQ_PHRED_64 = tr.getOrCreateNewFileFormatType('FASTQ_PHRED_64')\nfile_type_FASTQ_PHRED_64.setDescription('FastQ Format with PHRED+64 quality values (as deliverd by Illumina GA Pipeline >= 1.3)')\n \nprint "Imported 7 File Formats" \nvocabulary_AGILENT_KIT = tr.getOrCreateNewVocabulary('AGILENT_KIT')\nvocabulary_AGILENT_KIT.setDescription(None)\nvocabulary_AGILENT_KIT.setUrlTemplate(None)\nvocabulary_AGILENT_KIT.setManagedInternally(False)\nvocabulary_AGILENT_KIT.setInternalNamespace(False)\nvocabulary_AGILENT_KIT.setChosenFromList(True)\n \nvocabulary_term_AGILENT_KIT_AGILENT_DNA_KIT_1000 = tr.createNewVocabularyTerm('AGILENT_DNA_KIT_1000')\nvocabulary_term_AGILENT_KIT_AGILENT_DNA_KIT_1000.setDescription(None)\nvocabulary_term_AGILENT_KIT_AGILENT_DNA_KIT_1000.setLabel(None)\nvocabulary_term_AGILENT_KIT_AGILENT_DNA_KIT_1000.setOrdinal(1)\nvocabulary_AGILENT_KIT.addTerm(vocabulary_term_AGILENT_KIT_AGILENT_DNA_KIT_1000)\n \nvocabulary_term_AGILENT_KIT_AGILENT_HIGH_SENSITIVITY_DNA_KIT = tr.createNewVocabularyTerm('AGILENT_HIGH_SENSITIVITY_DNA_KIT')\nvocabulary_term_AGILENT_KIT_AGILENT_HIGH_SENSITIVITY_DNA_KIT.setDescription(None)\nvocabulary_term_AGILENT_KIT_AGILENT_HIGH_SENSITIVITY_DNA_KIT.setLabel(None)\nvocabulary_term_AGILENT_KIT_AGILENT_HIGH_SENSITIVITY_DNA_KIT.setOrdinal(2)\nvocabulary_AGILENT_KIT.addTerm(vocabulary_term_AGILENT_KIT_AGILENT_HIGH_SENSITIVITY_DNA_KIT)\n \nvocabulary_ALIGNMENT_SOFTWARE = tr.getOrCreateNewVocabulary('ALIGNMENT_SOFTWARE')\nvocabulary_ALIGNMENT_SOFTWARE.setDescription('If an alignment is requested, which software package should be use?')\nvocabulary_ALIGNMENT_SOFTWARE.setUrlTemplate(None)\nvocabulary_ALIGNMENT_SOFTWARE.setManagedInternally(False)\nvocabulary_ALIGNMENT_SOFTWARE.setInternalNamespace(False)\nvocabulary_ALIGNMENT_SOFTWARE.setChosenFromList(True)\n \nvocabulary_term_ALIGNMENT_SOFTWARE_NOT_NEEDED = tr.createNewVocabularyTerm('NOT_NEEDED')\nvocabulary_term_ALIGNMENT_SOFTWARE_NOT_NEEDED.setDescription(None)\nvocabulary_term_ALIGNMENT_SOFTWARE_NOT_NEEDED.setLabel(None)\nvocabulary_term_ALIGNMENT_SOFTWARE_NOT_NEEDED.setOrdinal(1)\nvocabulary_ALIGNMENT_SOFTWARE.addTerm(vocabulary_term_ALIGNMENT_SOFTWARE_NOT_NEEDED)\n \nvocabulary_term_ALIGNMENT_SOFTWARE_ELAND = tr.createNewVocabularyTerm('ELAND')\nvocabulary_term_ALIGNMENT_SOFTWARE_ELAND.setDescription(None)\nvocabulary_term_ALIGNMENT_SOFTWARE_ELAND.setLabel(None)\nvocabulary_term_ALIGNMENT_SOFTWARE_ELAND.setOrdinal(2)\nvocabulary_ALIGNMENT_SOFTWARE.addTerm(vocabulary_term_ALIGNMENT_SOFTWARE_ELAND)\n \nvocabulary_term_ALIGNMENT_SOFTWARE_MAQ = tr.createNewVocabularyTerm('MAQ')\nvocabulary_term_ALIGNMENT_SOFTWARE_MAQ.setDescription(None)\nvocabulary_term_ALIGNMENT_SOFTWARE_MAQ.setLabel(None)\nvocabulary_term_ALIGNMENT_SOFTWARE_MAQ.setOrdinal(3)\nvocabulary_ALIGNMENT_SOFTWARE.addTerm(vocabulary_term_ALIGNMENT_SOFTWARE_MAQ)\n \nvocabulary_term_ALIGNMENT_SOFTWARE_BWA = tr.createNewVocabularyTerm('BWA')\nvocabulary_term_ALIGNMENT_SOFTWARE_BWA.setDescription(None)\nvocabulary_term_ALIGNMENT_SOFTWARE_BWA.setLabel(None)\nvocabulary_term_ALIGNMENT_SOFTWARE_BWA.setOrdinal(4)\nvocabulary_ALIGNMENT_SOFTWARE.addTerm(vocabulary_term_ALIGNMENT_SOFTWARE_BWA)\n \nvocabulary_term_ALIGNMENT_SOFTWARE_NOVOALIGN = tr.createNewVocabularyTerm('NOVOALIGN')\nvocabulary_term_ALIGNMENT_SOFTWARE_NOVOALIGN.setDescription(None)\nvocabulary_term_ALIGNMENT_SOFTWARE_NOVOALIGN.setLabel(None)\nvocabulary_term_ALIGNMENT_SOFTWARE_NOVOALIGN.setOrdinal(6)\nvocabulary_ALIGNMENT_SOFTWARE.addTerm(vocabulary_term_ALIGNMENT_SOFTWARE_NOVOALIGN)\n \nvocabulary_term_ALIGNMENT_SOFTWARE_BOWTIE = tr.createNewVocabularyTerm('BOWTIE')\nvocabulary_term_ALIGNMENT_SOFTWARE_BOWTIE.setDescription(None)\nvocabulary_term_ALIGNMENT_SOFTWARE_BOWTIE.setLabel(None)\nvocabulary_term_ALIGNMENT_SOFTWARE_BOWTIE.setOrdinal(7)\nvocabulary_ALIGNMENT_SOFTWARE.addTerm(vocabulary_term_ALIGNMENT_SOFTWARE_BOWTIE)\n \nvocabulary_CASAVA_VERSION = tr.getOrCreateNewVocabulary('CASAVA_VERSION')\nvocabulary_CASAVA_VERSION.setDescription('Post analyzing software')\nvocabulary_CASAVA_VERSION.setUrlTemplate(None)\nvocabulary_CASAVA_VERSION.setManagedInternally(False)\nvocabulary_CASAVA_VERSION.setInternalNamespace(False)\nvocabulary_CASAVA_VERSION.setChosenFromList(True)\n \nvocabulary_term_CASAVA_VERSION_18 = tr.createNewVocabularyTerm('1.8')\nvocabulary_term_CASAVA_VERSION_18.setDescription(None)\nvocabulary_term_CASAVA_VERSION_18.setLabel(None)\nvocabulary_term_CASAVA_VERSION_18.setOrdinal(1)\nvocabulary_CASAVA_VERSION.addTerm(vocabulary_term_CASAVA_VERSION_18)\n \nvocabulary_term_CASAVA_VERSION_17 = tr.createNewVocabularyTerm('1.7')\nvocabulary_term_CASAVA_VERSION_17.setDescription(None)\nvocabulary_term_CASAVA_VERSION_17.setLabel(None)\nvocabulary_term_CASAVA_VERSION_17.setOrdinal(2)\nvocabulary_CASAVA_VERSION.addTerm(vocabulary_term_CASAVA_VERSION_17)\n \nvocabulary_CLUSTER_GENERATION_KIT_VERSION = tr.getOrCreateNewVocabulary('CLUSTER_GENERATION_KIT_VERSION')\nvocabulary_CLUSTER_GENERATION_KIT_VERSION.setDescription('Version of the Cluster Generation Kit')\nvocabulary_CLUSTER_GENERATION_KIT_VERSION.setUrlTemplate(None)\nvocabulary_CLUSTER_GENERATION_KIT_VERSION.setManagedInternally(False)\nvocabulary_CLUSTER_GENERATION_KIT_VERSION.setInternalNamespace(False)\nvocabulary_CLUSTER_GENERATION_KIT_VERSION.setChosenFromList(True)\n \nvocabulary_term_CLUSTER_GENERATION_KIT_VERSION_TRUSEQ_CBOT_HS_V3 = tr.createNewVocabularyTerm('TRUSEQ_CBOT_HS_V3')\nvocabulary_term_CLUSTER_GENERATION_KIT_VERSION_TRUSEQ_CBOT_HS_V3.setDescription(None)\nvocabulary_term_CLUSTER_GENERATION_KIT_VERSION_TRUSEQ_CBOT_HS_V3.setLabel('TruSeq cBot-HS v3')\nvocabulary_term_CLUSTER_GENERATION_KIT_VERSION_TRUSEQ_CBOT_HS_V3.setOrdinal(1)\nvocabulary_CLUSTER_GENERATION_KIT_VERSION.addTerm(vocabulary_term_CLUSTER_GENERATION_KIT_VERSION_TRUSEQ_CBOT_HS_V3)\n \nvocabulary_term_CLUSTER_GENERATION_KIT_VERSION_TRUSEQ_CBOT_HS_V25 = tr.createNewVocabularyTerm('TRUSEQ_CBOT_HS_V2.5')\nvocabulary_term_CLUSTER_GENERATION_KIT_VERSION_TRUSEQ_CBOT_HS_V25.setDescription(None)\nvocabulary_term_CLUSTER_GENERATION_KIT_VERSION_TRUSEQ_CBOT_HS_V25.setLabel('TruSeq cBot-HS v2.5')\nvocabulary_term_CLUSTER_GENERATION_KIT_VERSION_TRUSEQ_CBOT_HS_V25.setOrdinal(2)\nvocabulary_CLUSTER_GENERATION_KIT_VERSION.addTerm(vocabulary_term_CLUSTER_GENERATION_KIT_VERSION_TRUSEQ_CBOT_HS_V25)\n \nvocabulary_term_CLUSTER_GENERATION_KIT_VERSION_TRUSEQ_CBOT_GA_V2 = tr.createNewVocabularyTerm('TRUSEQ_CBOT_GA_V2')\nvocabulary_term_CLUSTER_GENERATION_KIT_VERSION_TRUSEQ_CBOT_GA_V2.setDescription(None)\nvocabulary_term_CLUSTER_GENERATION_KIT_VERSION_TRUSEQ_CBOT_GA_V2.setLabel('TrueSeq cBot-GA v2')\nvocabulary_term_CLUSTER_GENERATION_KIT_VERSION_TRUSEQ_CBOT_GA_V2.setOrdinal(3)\nvocabulary_CLUSTER_GENERATION_KIT_VERSION.addTerm(vocabulary_term_CLUSTER_GENERATION_KIT_VERSION_TRUSEQ_CBOT_GA_V2)\n \nvocabulary_term_CLUSTER_GENERATION_KIT_VERSION_TRUSEQ_CS_GA_V5 = tr.createNewVocabularyTerm('TRUSEQ_CS_GA_V5')\nvocabulary_term_CLUSTER_GENERATION_KIT_VERSION_TRUSEQ_CS_GA_V5.setDescription(None)\nvocabulary_term_CLUSTER_GENERATION_KIT_VERSION_TRUSEQ_CS_GA_V5.setLabel('TrueSeq CS-GA v5')\nvocabulary_term_CLUSTER_GENERATION_KIT_VERSION_TRUSEQ_CS_GA_V5.setOrdinal(4)\nvocabulary_CLUSTER_GENERATION_KIT_VERSION.addTerm(vocabulary_term_CLUSTER_GENERATION_KIT_VERSION_TRUSEQ_CS_GA_V5)\n \nvocabulary_term_CLUSTER_GENERATION_KIT_VERSION_V5 = tr.createNewVocabularyTerm('V5')\nvocabulary_term_CLUSTER_GENERATION_KIT_VERSION_V5.setDescription(None)\nvocabulary_term_CLUSTER_GENERATION_KIT_VERSION_V5.setLabel(None)\nvocabulary_term_CLUSTER_GENERATION_KIT_VERSION_V5.setOrdinal(5)\nvocabulary_CLUSTER_GENERATION_KIT_VERSION.addTerm(vocabulary_term_CLUSTER_GENERATION_KIT_VERSION_V5)\n \nvocabulary_term_CLUSTER_GENERATION_KIT_VERSION_V4 = tr.createNewVocabularyTerm('V4')\nvocabulary_term_CLUSTER_GENERATION_KIT_VERSION_V4.setDescription(None)\nvocabulary_term_CLUSTER_GENERATION_KIT_VERSION_V4.setLabel(None)\nvocabulary_term_CLUSTER_GENERATION_KIT_VERSION_V4.setOrdinal(6)\nvocabulary_CLUSTER_GENERATION_KIT_VERSION.addTerm(vocabulary_term_CLUSTER_GENERATION_KIT_VERSION_V4)\n \nvocabulary_term_CLUSTER_GENERATION_KIT_VERSION_V2 = tr.createNewVocabularyTerm('V2')\nvocabulary_term_CLUSTER_GENERATION_KIT_VERSION_V2.setDescription(None)\nvocabulary_term_CLUSTER_GENERATION_KIT_VERSION_V2.setLabel(None)\nvocabulary_term_CLUSTER_GENERATION_KIT_VERSION_V2.setOrdinal(7)\nvocabulary_CLUSTER_GENERATION_KIT_VERSION.addTerm(vocabulary_term_CLUSTER_GENERATION_KIT_VERSION_V2)\n \nvocabulary_CLUSTER_STATION = tr.getOrCreateNewVocabulary('CLUSTER_STATION')\nvocabulary_CLUSTER_STATION.setDescription('Cluster Station')\nvocabulary_CLUSTER_STATION.setUrlTemplate(None)\nvocabulary_CLUSTER_STATION.setManagedInternally(False)\nvocabulary_CLUSTER_STATION.setInternalNamespace(False)\nvocabulary_CLUSTER_STATION.setChosenFromList(True)\n \nvocabulary_term_CLUSTER_STATION_CBOT = tr.createNewVocabularyTerm('CBOT')\nvocabulary_term_CLUSTER_STATION_CBOT.setDescription(None)\nvocabulary_term_CLUSTER_STATION_CBOT.setLabel('cBot')\nvocabulary_term_CLUSTER_STATION_CBOT.setOrdinal(1)\nvocabulary_CLUSTER_STATION.addTerm(vocabulary_term_CLUSTER_STATION_CBOT)\n \nvocabulary_term_CLUSTER_STATION_CBOT2 = tr.createNewVocabularyTerm('CBOT2')\nvocabulary_term_CLUSTER_STATION_CBOT2.setDescription('Second cBot')\nvocabulary_term_CLUSTER_STATION_CBOT2.setLabel('cBot2')\nvocabulary_term_CLUSTER_STATION_CBOT2.setOrdinal(2)\nvocabulary_CLUSTER_STATION.addTerm(vocabulary_term_CLUSTER_STATION_CBOT2)\n \nvocabulary_CONTROL_LANE = tr.getOrCreateNewVocabulary('CONTROL_LANE')\nvocabulary_CONTROL_LANE.setDescription(None)\nvocabulary_CONTROL_LANE.setUrlTemplate(None)\nvocabulary_CONTROL_LANE.setManagedInternally(False)\nvocabulary_CONTROL_LANE.setInternalNamespace(False)\nvocabulary_CONTROL_LANE.setChosenFromList(True)\n \nvocabulary_term_CONTROL_LANE_1 = tr.createNewVocabularyTerm('1')\nvocabulary_term_CONTROL_LANE_1.setDescription(None)\nvocabulary_term_CONTROL_LANE_1.setLabel(None)\nvocabulary_term_CONTROL_LANE_1.setOrdinal(1)\nvocabulary_CONTROL_LANE.addTerm(vocabulary_term_CONTROL_LANE_1)\n \nvocabulary_term_CONTROL_LANE_2 = tr.createNewVocabularyTerm('2')\nvocabulary_term_CONTROL_LANE_2.setDescription(None)\nvocabulary_term_CONTROL_LANE_2.setLabel(None)\nvocabulary_term_CONTROL_LANE_2.setOrdinal(2)\nvocabulary_CONTROL_LANE.addTerm(vocabulary_term_CONTROL_LANE_2)\n \nvocabulary_term_CONTROL_LANE_3 = tr.createNewVocabularyTerm('3')\nvocabulary_term_CONTROL_LANE_3.setDescription(None)\nvocabulary_term_CONTROL_LANE_3.setLabel(None)\nvocabulary_term_CONTROL_LANE_3.setOrdinal(3)\nvocabulary_CONTROL_LANE.addTerm(vocabulary_term_CONTROL_LANE_3)\n \nvocabulary_term_CONTROL_LANE_4 = tr.createNewVocabularyTerm('4')\nvocabulary_term_CONTROL_LANE_4.setDescription(None)\nvocabulary_term_CONTROL_LANE_4.setLabel(None)\nvocabulary_term_CONTROL_LANE_4.setOrdinal(4)\nvocabulary_CONTROL_LANE.addTerm(vocabulary_term_CONTROL_LANE_4)\n \nvocabulary_term_CONTROL_LANE_5 = tr.createNewVocabularyTerm('5')\nvocabulary_term_CONTROL_LANE_5.setDescription(None)\nvocabulary_term_CONTROL_LANE_5.setLabel(None)\nvocabulary_term_CONTROL_LANE_5.setOrdinal(5)\nvocabulary_CONTROL_LANE.addTerm(vocabulary_term_CONTROL_LANE_5)\n \nvocabulary_term_CONTROL_LANE_6 = tr.createNewVocabularyTerm('6')\nvocabulary_term_CONTROL_LANE_6.setDescription(None)\nvocabulary_term_CONTROL_LANE_6.setLabel(None)\nvocabulary_term_CONTROL_LANE_6.setOrdinal(6)\nvocabulary_CONTROL_LANE.addTerm(vocabulary_term_CONTROL_LANE_6)\n \nvocabulary_term_CONTROL_LANE_7 = tr.createNewVocabularyTerm('7')\nvocabulary_term_CONTROL_LANE_7.setDescription(None)\nvocabulary_term_CONTROL_LANE_7.setLabel(None)\nvocabulary_term_CONTROL_LANE_7.setOrdinal(7)\nvocabulary_CONTROL_LANE.addTerm(vocabulary_term_CONTROL_LANE_7)\n \nvocabulary_term_CONTROL_LANE_8 = tr.createNewVocabularyTerm('8')\nvocabulary_term_CONTROL_LANE_8.setDescription(None)\nvocabulary_term_CONTROL_LANE_8.setLabel(None)\nvocabulary_term_CONTROL_LANE_8.setOrdinal(8)\nvocabulary_CONTROL_LANE.addTerm(vocabulary_term_CONTROL_LANE_8)\n \nvocabulary_term_CONTROL_LANE_NONE = tr.createNewVocabularyTerm('NONE')\nvocabulary_term_CONTROL_LANE_NONE.setDescription(None)\nvocabulary_term_CONTROL_LANE_NONE.setLabel(None)\nvocabulary_term_CONTROL_LANE_NONE.setOrdinal(9)\nvocabulary_CONTROL_LANE.addTerm(vocabulary_term_CONTROL_LANE_NONE)\n \nvocabulary_term_CONTROL_LANE_0 = tr.createNewVocabularyTerm('0')\nvocabulary_term_CONTROL_LANE_0.setDescription(None)\nvocabulary_term_CONTROL_LANE_0.setLabel(None)\nvocabulary_term_CONTROL_LANE_0.setOrdinal(10)\nvocabulary_CONTROL_LANE.addTerm(vocabulary_term_CONTROL_LANE_0)\n \nvocabulary_END_TYPE = tr.getOrCreateNewVocabulary('END_TYPE')\nvocabulary_END_TYPE.setDescription('Sequencing method')\nvocabulary_END_TYPE.setUrlTemplate(None)\nvocabulary_END_TYPE.setManagedInternally(False)\nvocabulary_END_TYPE.setInternalNamespace(False)\nvocabulary_END_TYPE.setChosenFromList(True)\n \nvocabulary_term_END_TYPE_SINGLE_READ = tr.createNewVocabularyTerm('SINGLE_READ')\nvocabulary_term_END_TYPE_SINGLE_READ.setDescription(None)\nvocabulary_term_END_TYPE_SINGLE_READ.setLabel(None)\nvocabulary_term_END_TYPE_SINGLE_READ.setOrdinal(1)\nvocabulary_END_TYPE.addTerm(vocabulary_term_END_TYPE_SINGLE_READ)\n \nvocabulary_term_END_TYPE_PAIRED_END = tr.createNewVocabularyTerm('PAIRED_END')\nvocabulary_term_END_TYPE_PAIRED_END.setDescription(None)\nvocabulary_term_END_TYPE_PAIRED_END.setLabel(None)\nvocabulary_term_END_TYPE_PAIRED_END.setOrdinal(2)\nvocabulary_END_TYPE.addTerm(vocabulary_term_END_TYPE_PAIRED_END)\n \nvocabulary_EXPERIMENT_DESIGN = tr.getOrCreateNewVocabulary('EXPERIMENT_DESIGN')\nvocabulary_EXPERIMENT_DESIGN.setDescription('General Intent')\nvocabulary_EXPERIMENT_DESIGN.setUrlTemplate(None)\nvocabulary_EXPERIMENT_DESIGN.setManagedInternally(False)\nvocabulary_EXPERIMENT_DESIGN.setInternalNamespace(False)\nvocabulary_EXPERIMENT_DESIGN.setChosenFromList(True)\n \nvocabulary_term_EXPERIMENT_DESIGN_BINDING_SITE_IDENTIFICATION = tr.createNewVocabularyTerm('BINDING_SITE_IDENTIFICATION')\nvocabulary_term_EXPERIMENT_DESIGN_BINDING_SITE_IDENTIFICATION.setDescription(None)\nvocabulary_term_EXPERIMENT_DESIGN_BINDING_SITE_IDENTIFICATION.setLabel('Binding Site Identification')\nvocabulary_term_EXPERIMENT_DESIGN_BINDING_SITE_IDENTIFICATION.setOrdinal(1)\nvocabulary_EXPERIMENT_DESIGN.addTerm(vocabulary_term_EXPERIMENT_DESIGN_BINDING_SITE_IDENTIFICATION)\n \nvocabulary_term_EXPERIMENT_DESIGN_CHROMATIN_MARKS = tr.createNewVocabularyTerm('CHROMATIN_MARKS')\nvocabulary_term_EXPERIMENT_DESIGN_CHROMATIN_MARKS.setDescription(None)\nvocabulary_term_EXPERIMENT_DESIGN_CHROMATIN_MARKS.setLabel('Chromatin Marks')\nvocabulary_term_EXPERIMENT_DESIGN_CHROMATIN_MARKS.setOrdinal(2)\nvocabulary_EXPERIMENT_DESIGN.addTerm(vocabulary_term_EXPERIMENT_DESIGN_CHROMATIN_MARKS)\n \nvocabulary_term_EXPERIMENT_DESIGN_COMPARATIVE_GENOMIC_HYBRIDIZATION = tr.createNewVocabularyTerm('COMPARATIVE_GENOMIC_HYBRIDIZATION')\nvocabulary_term_EXPERIMENT_DESIGN_COMPARATIVE_GENOMIC_HYBRIDIZATION.setDescription(None)\nvocabulary_term_EXPERIMENT_DESIGN_COMPARATIVE_GENOMIC_HYBRIDIZATION.setLabel('Comparative Genomic Hybridization')\nvocabulary_term_EXPERIMENT_DESIGN_COMPARATIVE_GENOMIC_HYBRIDIZATION.setOrdinal(3)\nvocabulary_EXPERIMENT_DESIGN.addTerm(vocabulary_term_EXPERIMENT_DESIGN_COMPARATIVE_GENOMIC_HYBRIDIZATION)\n \nvocabulary_term_EXPERIMENT_DESIGN_DIFFERENTIAL_EXPRESSION = tr.createNewVocabularyTerm('DIFFERENTIAL_EXPRESSION')\nvocabulary_term_EXPERIMENT_DESIGN_DIFFERENTIAL_EXPRESSION.setDescription(None)\nvocabulary_term_EXPERIMENT_DESIGN_DIFFERENTIAL_EXPRESSION.setLabel('Differential Expression')\nvocabulary_term_EXPERIMENT_DESIGN_DIFFERENTIAL_EXPRESSION.setOrdinal(4)\nvocabulary_EXPERIMENT_DESIGN.addTerm(vocabulary_term_EXPERIMENT_DESIGN_DIFFERENTIAL_EXPRESSION)\n \nvocabulary_term_EXPERIMENT_DESIGN_DIFFERENTIAL_SPLICING = tr.createNewVocabularyTerm('DIFFERENTIAL_SPLICING')\nvocabulary_term_EXPERIMENT_DESIGN_DIFFERENTIAL_SPLICING.setDescription(None)\nvocabulary_term_EXPERIMENT_DESIGN_DIFFERENTIAL_SPLICING.setLabel('Differential Splicing')\nvocabulary_term_EXPERIMENT_DESIGN_DIFFERENTIAL_SPLICING.setOrdinal(5)\nvocabulary_EXPERIMENT_DESIGN.addTerm(vocabulary_term_EXPERIMENT_DESIGN_DIFFERENTIAL_SPLICING)\n \nvocabulary_term_EXPERIMENT_DESIGN_EXPRESSION = tr.createNewVocabularyTerm('EXPRESSION')\nvocabulary_term_EXPERIMENT_DESIGN_EXPRESSION.setDescription(None)\nvocabulary_term_EXPERIMENT_DESIGN_EXPRESSION.setLabel('Expression')\nvocabulary_term_EXPERIMENT_DESIGN_EXPRESSION.setOrdinal(6)\nvocabulary_EXPERIMENT_DESIGN.addTerm(vocabulary_term_EXPERIMENT_DESIGN_EXPRESSION)\n \nvocabulary_term_EXPERIMENT_DESIGN_SEQUENCE_ENRICHMENT = tr.createNewVocabularyTerm('SEQUENCE_ENRICHMENT')\nvocabulary_term_EXPERIMENT_DESIGN_SEQUENCE_ENRICHMENT.setDescription(None)\nvocabulary_term_EXPERIMENT_DESIGN_SEQUENCE_ENRICHMENT.setLabel('Sequence Enrichment')\nvocabulary_term_EXPERIMENT_DESIGN_SEQUENCE_ENRICHMENT.setOrdinal(7)\nvocabulary_EXPERIMENT_DESIGN.addTerm(vocabulary_term_EXPERIMENT_DESIGN_SEQUENCE_ENRICHMENT)\n \nvocabulary_term_EXPERIMENT_DESIGN_TRANSCRIPT_IDENTIFICATION = tr.createNewVocabularyTerm('TRANSCRIPT_IDENTIFICATION')\nvocabulary_term_EXPERIMENT_DESIGN_TRANSCRIPT_IDENTIFICATION.setDescription(None)\nvocabulary_term_EXPERIMENT_DESIGN_TRANSCRIPT_IDENTIFICATION.setLabel('Transcript Identification')\nvocabulary_term_EXPERIMENT_DESIGN_TRANSCRIPT_IDENTIFICATION.setOrdinal(8)\nvocabulary_EXPERIMENT_DESIGN.addTerm(vocabulary_term_EXPERIMENT_DESIGN_TRANSCRIPT_IDENTIFICATION)\n \nvocabulary_term_EXPERIMENT_DESIGN_OTHER = tr.createNewVocabularyTerm('OTHER')\nvocabulary_term_EXPERIMENT_DESIGN_OTHER.setDescription(None)\nvocabulary_term_EXPERIMENT_DESIGN_OTHER.setLabel('Other')\nvocabulary_term_EXPERIMENT_DESIGN_OTHER.setOrdinal(9)\nvocabulary_EXPERIMENT_DESIGN.addTerm(vocabulary_term_EXPERIMENT_DESIGN_OTHER)\n \nvocabulary_INDEX1 = tr.getOrCreateNewVocabulary('INDEX1')\nvocabulary_INDEX1.setDescription('Index 1 for Illumina Indexing')\nvocabulary_INDEX1.setUrlTemplate(None)\nvocabulary_INDEX1.setManagedInternally(False)\nvocabulary_INDEX1.setInternalNamespace(False)\nvocabulary_INDEX1.setChosenFromList(True)\n \nvocabulary_term_INDEX1_NONE = tr.createNewVocabularyTerm('NONE')\nvocabulary_term_INDEX1_NONE.setDescription('No Index')\nvocabulary_term_INDEX1_NONE.setLabel(' None')\nvocabulary_term_INDEX1_NONE.setOrdinal(1)\nvocabulary_INDEX1.addTerm(vocabulary_term_INDEX1_NONE)\n \nvocabulary_term_INDEX1_ATCACGA = tr.createNewVocabularyTerm('ATCACGA')\nvocabulary_term_INDEX1_ATCACGA.setDescription('Illumina, Nextera or Scriptseq')\nvocabulary_term_INDEX1_ATCACGA.setLabel('Index1 ATCACGA')\nvocabulary_term_INDEX1_ATCACGA.setOrdinal(2)\nvocabulary_INDEX1.addTerm(vocabulary_term_INDEX1_ATCACGA)\n \nvocabulary_term_INDEX1_CGATGTA = tr.createNewVocabularyTerm('CGATGTA')\nvocabulary_term_INDEX1_CGATGTA.setDescription('Illumina, Nextera or Scriptseq')\nvocabulary_term_INDEX1_CGATGTA.setLabel('Index2 CGATGTA')\nvocabulary_term_INDEX1_CGATGTA.setOrdinal(3)\nvocabulary_INDEX1.addTerm(vocabulary_term_INDEX1_CGATGTA)\n \nvocabulary_term_INDEX1_TTAGGCA = tr.createNewVocabularyTerm('TTAGGCA')\nvocabulary_term_INDEX1_TTAGGCA.setDescription('Illumina, Nextera or Scriptseq')\nvocabulary_term_INDEX1_TTAGGCA.setLabel('Index3 TTAGGCA')\nvocabulary_term_INDEX1_TTAGGCA.setOrdinal(4)\nvocabulary_INDEX1.addTerm(vocabulary_term_INDEX1_TTAGGCA)\n \nvocabulary_term_INDEX1_TGACCAA = tr.createNewVocabularyTerm('TGACCAA')\nvocabulary_term_INDEX1_TGACCAA.setDescription('Illumina, Nextera or Scriptseq')\nvocabulary_term_INDEX1_TGACCAA.setLabel('Index4 TGACCAA')\nvocabulary_term_INDEX1_TGACCAA.setOrdinal(5)\nvocabulary_INDEX1.addTerm(vocabulary_term_INDEX1_TGACCAA)\n \nvocabulary_term_INDEX1_ACAGTGA = tr.createNewVocabularyTerm('ACAGTGA')\nvocabulary_term_INDEX1_ACAGTGA.setDescription('Illumina, Nextera or Scriptseq')\nvocabulary_term_INDEX1_ACAGTGA.setLabel('Index5 ACAGTGA')\nvocabulary_term_INDEX1_ACAGTGA.setOrdinal(6)\nvocabulary_INDEX1.addTerm(vocabulary_term_INDEX1_ACAGTGA)\n \nvocabulary_term_INDEX1_GCCAATA = tr.createNewVocabularyTerm('GCCAATA')\nvocabulary_term_INDEX1_GCCAATA.setDescription('Illumina, Nextera or Scriptseq')\nvocabulary_term_INDEX1_GCCAATA.setLabel('Index6 GCCAATA')\nvocabulary_term_INDEX1_GCCAATA.setOrdinal(7)\nvocabulary_INDEX1.addTerm(vocabulary_term_INDEX1_GCCAATA)\n \nvocabulary_term_INDEX1_CAGATCA = tr.createNewVocabularyTerm('CAGATCA')\nvocabulary_term_INDEX1_CAGATCA.setDescription('Illumina, Nextera or Scriptseq')\nvocabulary_term_INDEX1_CAGATCA.setLabel('Index7 CAGATCA')\nvocabulary_term_INDEX1_CAGATCA.setOrdinal(8)\nvocabulary_INDEX1.addTerm(vocabulary_term_INDEX1_CAGATCA)\n \nvocabulary_term_INDEX1_ACTTGAA = tr.createNewVocabularyTerm('ACTTGAA')\nvocabulary_term_INDEX1_ACTTGAA.setDescription('Illumina, Nextera or Scriptseq')\nvocabulary_term_INDEX1_ACTTGAA.setLabel('Index8 ACTTGAA')\nvocabulary_term_INDEX1_ACTTGAA.setOrdinal(9)\nvocabulary_INDEX1.addTerm(vocabulary_term_INDEX1_ACTTGAA)\n \nvocabulary_term_INDEX1_GATCAGA = tr.createNewVocabularyTerm('GATCAGA')\nvocabulary_term_INDEX1_GATCAGA.setDescription('Illumina, Nextera or Scriptseq')\nvocabulary_term_INDEX1_GATCAGA.setLabel('Index9 GATCAGA')\nvocabulary_term_INDEX1_GATCAGA.setOrdinal(10)\nvocabulary_INDEX1.addTerm(vocabulary_term_INDEX1_GATCAGA)\n \nvocabulary_term_INDEX1_TAGCTTA = tr.createNewVocabularyTerm('TAGCTTA')\nvocabulary_term_INDEX1_TAGCTTA.setDescription('Illumina, Nextera or Scriptseq')\nvocabulary_term_INDEX1_TAGCTTA.setLabel('Index10 TAGCTTA')\nvocabulary_term_INDEX1_TAGCTTA.setOrdinal(11)\nvocabulary_INDEX1.addTerm(vocabulary_term_INDEX1_TAGCTTA)\n \nvocabulary_term_INDEX1_GGCTACA = tr.createNewVocabularyTerm('GGCTACA')\nvocabulary_term_INDEX1_GGCTACA.setDescription('Illumina, Nextera or Scriptseq')\nvocabulary_term_INDEX1_GGCTACA.setLabel('Index11 GGCTACA')\nvocabulary_term_INDEX1_GGCTACA.setOrdinal(12)\nvocabulary_INDEX1.addTerm(vocabulary_term_INDEX1_GGCTACA)\n \nvocabulary_term_INDEX1_CTTGTAA = tr.createNewVocabularyTerm('CTTGTAA')\nvocabulary_term_INDEX1_CTTGTAA.setDescription('Illumina, Nextera or Scriptseq')\nvocabulary_term_INDEX1_CTTGTAA.setLabel('Index12 CTTGTAA')\nvocabulary_term_INDEX1_CTTGTAA.setOrdinal(13)\nvocabulary_INDEX1.addTerm(vocabulary_term_INDEX1_CTTGTAA)\n \nvocabulary_term_INDEX1_AGATACA = tr.createNewVocabularyTerm('AGATACA')\nvocabulary_term_INDEX1_AGATACA.setDescription('Illumina, Nextera or Scriptseq')\nvocabulary_term_INDEX1_AGATACA.setLabel('Index13 AGATAC')\nvocabulary_term_INDEX1_AGATACA.setOrdinal(14)\nvocabulary_INDEX1.addTerm(vocabulary_term_INDEX1_AGATACA)\n \nvocabulary_term_INDEX1_AGTTCCG = tr.createNewVocabularyTerm('AGTTCCG')\nvocabulary_term_INDEX1_AGTTCCG.setDescription('Illumina, Nextera or Scriptseq')\nvocabulary_term_INDEX1_AGTTCCG.setLabel('Index14 AGTTCCG')\nvocabulary_term_INDEX1_AGTTCCG.setOrdinal(15)\nvocabulary_INDEX1.addTerm(vocabulary_term_INDEX1_AGTTCCG)\n \nvocabulary_term_INDEX1_ATGTCAG = tr.createNewVocabularyTerm('ATGTCAG')\nvocabulary_term_INDEX1_ATGTCAG.setDescription('Illumina, Nextera or Scriptseq')\nvocabulary_term_INDEX1_ATGTCAG.setLabel('Index15 ATGTCAG')\nvocabulary_term_INDEX1_ATGTCAG.setOrdinal(16)\nvocabulary_INDEX1.addTerm(vocabulary_term_INDEX1_ATGTCAG)\n \nvocabulary_term_INDEX1_CCGTCCC = tr.createNewVocabularyTerm('CCGTCCC')\nvocabulary_term_INDEX1_CCGTCCC.setDescription('Illumina, Nextera or Scriptseq')\nvocabulary_term_INDEX1_CCGTCCC.setLabel('Index16 CCGTCCC')\nvocabulary_term_INDEX1_CCGTCCC.setOrdinal(17)\nvocabulary_INDEX1.addTerm(vocabulary_term_INDEX1_CCGTCCC)\n \nvocabulary_term_INDEX1_GTCCGCA = tr.createNewVocabularyTerm('GTCCGCA')\nvocabulary_term_INDEX1_GTCCGCA.setDescription('Illumina, Nextera or Scriptseq')\nvocabulary_term_INDEX1_GTCCGCA.setLabel('Index18 GTCCGCA')\nvocabulary_term_INDEX1_GTCCGCA.setOrdinal(18)\nvocabulary_INDEX1.addTerm(vocabulary_term_INDEX1_GTCCGCA)\n \nvocabulary_term_INDEX1_GTGAAAC = tr.createNewVocabularyTerm('GTGAAAC')\nvocabulary_term_INDEX1_GTGAAAC.setDescription('Illumina, Nextera or Scriptseq')\nvocabulary_term_INDEX1_GTGAAAC.setLabel('Index19 GTGAAAC')\nvocabulary_term_INDEX1_GTGAAAC.setOrdinal(19)\nvocabulary_INDEX1.addTerm(vocabulary_term_INDEX1_GTGAAAC)\n \nvocabulary_term_INDEX1_GTGGCCT = tr.createNewVocabularyTerm('GTGGCCT')\nvocabulary_term_INDEX1_GTGGCCT.setDescription('Illumina, Nextera or Scriptseq')\nvocabulary_term_INDEX1_GTGGCCT.setLabel('Index20 GTGGCCT')\nvocabulary_term_INDEX1_GTGGCCT.setOrdinal(20)\nvocabulary_INDEX1.addTerm(vocabulary_term_INDEX1_GTGGCCT)\n \nvocabulary_term_INDEX1_GTTTCGG = tr.createNewVocabularyTerm('GTTTCGG')\nvocabulary_term_INDEX1_GTTTCGG.setDescription('Illumina, Nextera or Scriptseq')\nvocabulary_term_INDEX1_GTTTCGG.setLabel('Index21 GTTTCGG')\nvocabulary_term_INDEX1_GTTTCGG.setOrdinal(21)\nvocabulary_INDEX1.addTerm(vocabulary_term_INDEX1_GTTTCGG)\n \nvocabulary_term_INDEX1_CGTACGT = tr.createNewVocabularyTerm('CGTACGT')\nvocabulary_term_INDEX1_CGTACGT.setDescription('Illumina, Nextera or Scriptseq')\nvocabulary_term_INDEX1_CGTACGT.setLabel('Index22 CGTACGT')\nvocabulary_term_INDEX1_CGTACGT.setOrdinal(22)\nvocabulary_INDEX1.addTerm(vocabulary_term_INDEX1_CGTACGT)\n \nvocabulary_term_INDEX1_GAGTGGA = tr.createNewVocabularyTerm('GAGTGGA')\nvocabulary_term_INDEX1_GAGTGGA.setDescription('Illumina, Nextera or Scriptseq')\nvocabulary_term_INDEX1_GAGTGGA.setLabel('Index23 GAGTGGA')\nvocabulary_term_INDEX1_GAGTGGA.setOrdinal(23)\nvocabulary_INDEX1.addTerm(vocabulary_term_INDEX1_GAGTGGA)\n \nvocabulary_term_INDEX1_ACTGATA = tr.createNewVocabularyTerm('ACTGATA')\nvocabulary_term_INDEX1_ACTGATA.setDescription('Illumina, Nextera or Scriptseq')\nvocabulary_term_INDEX1_ACTGATA.setLabel('Index25 ACTGATA')\nvocabulary_term_INDEX1_ACTGATA.setOrdinal(24)\nvocabulary_INDEX1.addTerm(vocabulary_term_INDEX1_ACTGATA)\n \nvocabulary_term_INDEX1_ATTCCTT = tr.createNewVocabularyTerm('ATTCCTT')\nvocabulary_term_INDEX1_ATTCCTT.setDescription('Illumina, Nextera or Scriptseq')\nvocabulary_term_INDEX1_ATTCCTT.setLabel('Index27 ATTCCTT')\nvocabulary_term_INDEX1_ATTCCTT.setOrdinal(25)\nvocabulary_INDEX1.addTerm(vocabulary_term_INDEX1_ATTCCTT)\n \nvocabulary_term_INDEX1_TAAGGCGA = tr.createNewVocabularyTerm('TAAGGCGA')\nvocabulary_term_INDEX1_TAAGGCGA.setDescription('Nextera DNA')\nvocabulary_term_INDEX1_TAAGGCGA.setLabel('Index1 (i7) N701 TAAGGCGA')\nvocabulary_term_INDEX1_TAAGGCGA.setOrdinal(26)\nvocabulary_INDEX1.addTerm(vocabulary_term_INDEX1_TAAGGCGA)\n \nvocabulary_term_INDEX1_CGTACTAG = tr.createNewVocabularyTerm('CGTACTAG')\nvocabulary_term_INDEX1_CGTACTAG.setDescription('Nextera DNA')\nvocabulary_term_INDEX1_CGTACTAG.setLabel('Index1 (i7) N702 CGTACTAG')\nvocabulary_term_INDEX1_CGTACTAG.setOrdinal(27)\nvocabulary_INDEX1.addTerm(vocabulary_term_INDEX1_CGTACTAG)\n \nvocabulary_term_INDEX1_AGGCAGAA = tr.createNewVocabularyTerm('AGGCAGAA')\nvocabulary_term_INDEX1_AGGCAGAA.setDescription('Nextera DNA')\nvocabulary_term_INDEX1_AGGCAGAA.setLabel('Index1 (i7) N703 AGGCAGAA')\nvocabulary_term_INDEX1_AGGCAGAA.setOrdinal(28)\nvocabulary_INDEX1.addTerm(vocabulary_term_INDEX1_AGGCAGAA)\n \nvocabulary_term_INDEX1_TCCTGAGC = tr.createNewVocabularyTerm('TCCTGAGC')\nvocabulary_term_INDEX1_TCCTGAGC.setDescription('Nextera DNA')\nvocabulary_term_INDEX1_TCCTGAGC.setLabel('Index1 (i7) N704 TCCTGAGC')\nvocabulary_term_INDEX1_TCCTGAGC.setOrdinal(29)\nvocabulary_INDEX1.addTerm(vocabulary_term_INDEX1_TCCTGAGC)\n \nvocabulary_term_INDEX1_GGACTCCT = tr.createNewVocabularyTerm('GGACTCCT')\nvocabulary_term_INDEX1_GGACTCCT.setDescription('Nextera DNA')\nvocabulary_term_INDEX1_GGACTCCT.setLabel('Index1 (i7) N705 GGACTCCT')\nvocabulary_term_INDEX1_GGACTCCT.setOrdinal(30)\nvocabulary_INDEX1.addTerm(vocabulary_term_INDEX1_GGACTCCT)\n \nvocabulary_term_INDEX1_TAGGCATG = tr.createNewVocabularyTerm('TAGGCATG')\nvocabulary_term_INDEX1_TAGGCATG.setDescription('Nextera DNA')\nvocabulary_term_INDEX1_TAGGCATG.setLabel('Index1 (i7) N706 TAGGCATG')\nvocabulary_term_INDEX1_TAGGCATG.setOrdinal(31)\nvocabulary_INDEX1.addTerm(vocabulary_term_INDEX1_TAGGCATG)\n \nvocabulary_term_INDEX1_CTCTCTAC = tr.createNewVocabularyTerm('CTCTCTAC')\nvocabulary_term_INDEX1_CTCTCTAC.setDescription('Nextera DNA')\nvocabulary_term_INDEX1_CTCTCTAC.setLabel('Index1 (i7) N707 CTCTCTAC')\nvocabulary_term_INDEX1_CTCTCTAC.setOrdinal(32)\nvocabulary_INDEX1.addTerm(vocabulary_term_INDEX1_CTCTCTAC)\n \nvocabulary_term_INDEX1_CAGAGAGG = tr.createNewVocabularyTerm('CAGAGAGG')\nvocabulary_term_INDEX1_CAGAGAGG.setDescription('Nextera DNA')\nvocabulary_term_INDEX1_CAGAGAGG.setLabel('Index1 (i7) N708 CAGAGAGG')\nvocabulary_term_INDEX1_CAGAGAGG.setOrdinal(33)\nvocabulary_INDEX1.addTerm(vocabulary_term_INDEX1_CAGAGAGG)\n \nvocabulary_term_INDEX1_GCTACGCT = tr.createNewVocabularyTerm('GCTACGCT')\nvocabulary_term_INDEX1_GCTACGCT.setDescription('Nextera DNA')\nvocabulary_term_INDEX1_GCTACGCT.setLabel('Index1 (i7) N709 GCTACGCT')\nvocabulary_term_INDEX1_GCTACGCT.setOrdinal(34)\nvocabulary_INDEX1.addTerm(vocabulary_term_INDEX1_GCTACGCT)\n \nvocabulary_term_INDEX1_CGAGGCTG = tr.createNewVocabularyTerm('CGAGGCTG')\nvocabulary_term_INDEX1_CGAGGCTG.setDescription('Nextera DNA')\nvocabulary_term_INDEX1_CGAGGCTG.setLabel('Index1 (i7) N710 CGAGGCTG')\nvocabulary_term_INDEX1_CGAGGCTG.setOrdinal(35)\nvocabulary_INDEX1.addTerm(vocabulary_term_INDEX1_CGAGGCTG)\n \nvocabulary_term_INDEX1_AAGAGGCA = tr.createNewVocabularyTerm('AAGAGGCA')\nvocabulary_term_INDEX1_AAGAGGCA.setDescription('Nextera DNA')\nvocabulary_term_INDEX1_AAGAGGCA.setLabel('Index1 (i7) N711 AAGAGGCA')\nvocabulary_term_INDEX1_AAGAGGCA.setOrdinal(36)\nvocabulary_INDEX1.addTerm(vocabulary_term_INDEX1_AAGAGGCA)\n \nvocabulary_term_INDEX1_GTAGAGGA = tr.createNewVocabularyTerm('GTAGAGGA')\nvocabulary_term_INDEX1_GTAGAGGA.setDescription('Nextera DNA')\nvocabulary_term_INDEX1_GTAGAGGA.setLabel('Index1 (i7) N712 GTAGAGGA')\nvocabulary_term_INDEX1_GTAGAGGA.setOrdinal(37)\nvocabulary_INDEX1.addTerm(vocabulary_term_INDEX1_GTAGAGGA)\n \nvocabulary_term_INDEX1_AAGACTA = tr.createNewVocabularyTerm('AAGACTA')\nvocabulary_term_INDEX1_AAGACTA.setDescription(None)\nvocabulary_term_INDEX1_AAGACTA.setLabel('02 AAGACT')\nvocabulary_term_INDEX1_AAGACTA.setOrdinal(38)\nvocabulary_INDEX1.addTerm(vocabulary_term_INDEX1_AAGACTA)\n \nvocabulary_term_INDEX1_ACTTCAA = tr.createNewVocabularyTerm('ACTTCAA')\nvocabulary_term_INDEX1_ACTTCAA.setDescription(None)\nvocabulary_term_INDEX1_ACTTCAA.setLabel('10 ACTTCA')\nvocabulary_term_INDEX1_ACTTCAA.setOrdinal(39)\nvocabulary_INDEX1.addTerm(vocabulary_term_INDEX1_ACTTCAA)\n \nvocabulary_term_INDEX1_AGGTTGA = tr.createNewVocabularyTerm('AGGTTGA')\nvocabulary_term_INDEX1_AGGTTGA.setDescription(None)\nvocabulary_term_INDEX1_AGGTTGA.setLabel('17 AGGTTG')\nvocabulary_term_INDEX1_AGGTTGA.setOrdinal(40)\nvocabulary_INDEX1.addTerm(vocabulary_term_INDEX1_AGGTTGA)\n \nvocabulary_term_INDEX1_TTCGTCA = tr.createNewVocabularyTerm('TTCGTCA')\nvocabulary_term_INDEX1_TTCGTCA.setDescription(None)\nvocabulary_term_INDEX1_TTCGTCA.setLabel('17 TTCGTCA')\nvocabulary_term_INDEX1_TTCGTCA.setOrdinal(41)\nvocabulary_INDEX1.addTerm(vocabulary_term_INDEX1_TTCGTCA)\n \nvocabulary_term_INDEX1_AGCATAA = tr.createNewVocabularyTerm('AGCATAA')\nvocabulary_term_INDEX1_AGCATAA.setDescription(None)\nvocabulary_term_INDEX1_AGCATAA.setLabel('20 AGCATAA')\nvocabulary_term_INDEX1_AGCATAA.setOrdinal(42)\nvocabulary_INDEX1.addTerm(vocabulary_term_INDEX1_AGCATAA)\n \nvocabulary_term_INDEX1_ATACGCA = tr.createNewVocabularyTerm('ATACGCA')\nvocabulary_term_INDEX1_ATACGCA.setDescription(None)\nvocabulary_term_INDEX1_ATACGCA.setLabel('20 ATACGC')\nvocabulary_term_INDEX1_ATACGCA.setOrdinal(43)\nvocabulary_INDEX1.addTerm(vocabulary_term_INDEX1_ATACGCA)\n \nvocabulary_term_INDEX1_CAGATGA = tr.createNewVocabularyTerm('CAGATGA')\nvocabulary_term_INDEX1_CAGATGA.setDescription(None)\nvocabulary_term_INDEX1_CAGATGA.setLabel('28 CAGATG')\nvocabulary_term_INDEX1_CAGATGA.setOrdinal(44)\nvocabulary_INDEX1.addTerm(vocabulary_term_INDEX1_CAGATGA)\n \nvocabulary_term_INDEX1_CCGAATA = tr.createNewVocabularyTerm('CCGAATA')\nvocabulary_term_INDEX1_CCGAATA.setDescription(None)\nvocabulary_term_INDEX1_CCGAATA.setLabel('34 CCGAAT')\nvocabulary_term_INDEX1_CCGAATA.setOrdinal(45)\nvocabulary_INDEX1.addTerm(vocabulary_term_INDEX1_CCGAATA)\n \nvocabulary_term_INDEX1_CGCTCGA = tr.createNewVocabularyTerm('CGCTCGA')\nvocabulary_term_INDEX1_CGCTCGA.setDescription(None)\nvocabulary_term_INDEX1_CGCTCGA.setLabel('43 CGCTCG')\nvocabulary_term_INDEX1_CGCTCGA.setOrdinal(46)\nvocabulary_INDEX1.addTerm(vocabulary_term_INDEX1_CGCTCGA)\n \nvocabulary_term_INDEX1_CGTATTA = tr.createNewVocabularyTerm('CGTATTA')\nvocabulary_term_INDEX1_CGTATTA.setDescription(None)\nvocabulary_term_INDEX1_CGTATTA.setLabel('45 CGTATT')\nvocabulary_term_INDEX1_CGTATTA.setOrdinal(47)\nvocabulary_INDEX1.addTerm(vocabulary_term_INDEX1_CGTATTA)\n \nvocabulary_term_INDEX1_CCATGAA = tr.createNewVocabularyTerm('CCATGAA')\nvocabulary_term_INDEX1_CCATGAA.setDescription(None)\nvocabulary_term_INDEX1_CCATGAA.setLabel('50 CCATGAA')\nvocabulary_term_INDEX1_CCATGAA.setOrdinal(48)\nvocabulary_INDEX1.addTerm(vocabulary_term_INDEX1_CCATGAA)\n \nvocabulary_term_INDEX1_CTGACCA = tr.createNewVocabularyTerm('CTGACCA')\nvocabulary_term_INDEX1_CTGACCA.setDescription(None)\nvocabulary_term_INDEX1_CTGACCA.setLabel('50 CTGACC')\nvocabulary_term_INDEX1_CTGACCA.setOrdinal(49)\nvocabulary_INDEX1.addTerm(vocabulary_term_INDEX1_CTGACCA)\n \nvocabulary_term_INDEX1_GAAGCCA = tr.createNewVocabularyTerm('GAAGCCA')\nvocabulary_term_INDEX1_GAAGCCA.setDescription(None)\nvocabulary_term_INDEX1_GAAGCCA.setLabel('52 GAAGCC')\nvocabulary_term_INDEX1_GAAGCCA.setOrdinal(50)\nvocabulary_INDEX1.addTerm(vocabulary_term_INDEX1_GAAGCCA)\n \nvocabulary_term_INDEX1_NOINDEX = tr.createNewVocabularyTerm('NOINDEX')\nvocabulary_term_INDEX1_NOINDEX.setDescription(None)\nvocabulary_term_INDEX1_NOINDEX.setLabel(None)\nvocabulary_term_INDEX1_NOINDEX.setOrdinal(51)\nvocabulary_INDEX1.addTerm(vocabulary_term_INDEX1_NOINDEX)\n \nvocabulary_term_INDEX1_GCTGAAA = tr.createNewVocabularyTerm('GCTGAAA')\nvocabulary_term_INDEX1_GCTGAAA.setDescription(None)\nvocabulary_term_INDEX1_GCTGAAA.setLabel('59 GCTGAA')\nvocabulary_term_INDEX1_GCTGAAA.setOrdinal(52)\nvocabulary_INDEX1.addTerm(vocabulary_term_INDEX1_GCTGAAA)\n \nvocabulary_term_INDEX1_GTCGCGA = tr.createNewVocabularyTerm('GTCGCGA')\nvocabulary_term_INDEX1_GTCGCGA.setDescription(None)\nvocabulary_term_INDEX1_GTCGCGA.setLabel('64 GTCGCG')\nvocabulary_term_INDEX1_GTCGCGA.setOrdinal(53)\nvocabulary_INDEX1.addTerm(vocabulary_term_INDEX1_GTCGCGA)\n \nvocabulary_term_INDEX1_TAAGATA = tr.createNewVocabularyTerm('TAAGATA')\nvocabulary_term_INDEX1_TAAGATA.setDescription(None)\nvocabulary_term_INDEX1_TAAGATA.setLabel('65 TAAGAT')\nvocabulary_term_INDEX1_TAAGATA.setOrdinal(54)\nvocabulary_INDEX1.addTerm(vocabulary_term_INDEX1_TAAGATA)\n \nvocabulary_term_INDEX1_GCGCTGA = tr.createNewVocabularyTerm('GCGCTGA')\nvocabulary_term_INDEX1_GCGCTGA.setDescription(None)\nvocabulary_term_INDEX1_GCGCTGA.setLabel('66 GCGCTGA')\nvocabulary_term_INDEX1_GCGCTGA.setOrdinal(55)\nvocabulary_INDEX1.addTerm(vocabulary_term_INDEX1_GCGCTGA)\n \nvocabulary_term_INDEX1_TATCGTA = tr.createNewVocabularyTerm('TATCGTA')\nvocabulary_term_INDEX1_TATCGTA.setDescription(None)\nvocabulary_term_INDEX1_TATCGTA.setLabel('66 TATCGT')\nvocabulary_term_INDEX1_TATCGTA.setOrdinal(56)\nvocabulary_INDEX1.addTerm(vocabulary_term_INDEX1_TATCGTA)\n \nvocabulary_term_INDEX1_TCCTACA = tr.createNewVocabularyTerm('TCCTACA')\nvocabulary_term_INDEX1_TCCTACA.setDescription(None)\nvocabulary_term_INDEX1_TCCTACA.setLabel('68 TCCTAC')\nvocabulary_term_INDEX1_TCCTACA.setOrdinal(57)\nvocabulary_INDEX1.addTerm(vocabulary_term_INDEX1_TCCTACA)\n \nvocabulary_term_INDEX1_TCTATAA = tr.createNewVocabularyTerm('TCTATAA')\nvocabulary_term_INDEX1_TCTATAA.setDescription(None)\nvocabulary_term_INDEX1_TCTATAA.setLabel('70 TCTATA')\nvocabulary_term_INDEX1_TCTATAA.setOrdinal(58)\nvocabulary_INDEX1.addTerm(vocabulary_term_INDEX1_TCTATAA)\n \nvocabulary_term_INDEX1_TTACTTA = tr.createNewVocabularyTerm('TTACTTA')\nvocabulary_term_INDEX1_TTACTTA.setDescription(None)\nvocabulary_term_INDEX1_TTACTTA.setLabel('74 TTACTT')\nvocabulary_term_INDEX1_TTACTTA.setOrdinal(59)\nvocabulary_INDEX1.addTerm(vocabulary_term_INDEX1_TTACTTA)\n \nvocabulary_term_INDEX1_TTCCGAA = tr.createNewVocabularyTerm('TTCCGAA')\nvocabulary_term_INDEX1_TTCCGAA.setDescription(None)\nvocabulary_term_INDEX1_TTCCGAA.setLabel('75 TTCCGA')\nvocabulary_term_INDEX1_TTCCGAA.setOrdinal(60)\nvocabulary_INDEX1.addTerm(vocabulary_term_INDEX1_TTCCGAA)\n \nvocabulary_term_INDEX1_ATGTCAA = tr.createNewVocabularyTerm('ATGTCAA')\nvocabulary_term_INDEX1_ATGTCAA.setDescription(None)\nvocabulary_term_INDEX1_ATGTCAA.setLabel('DNA Adapter 15')\nvocabulary_term_INDEX1_ATGTCAA.setOrdinal(61)\nvocabulary_INDEX1.addTerm(vocabulary_term_INDEX1_ATGTCAA)\n \nvocabulary_term_INDEX1_CCGTCCA = tr.createNewVocabularyTerm('CCGTCCA')\nvocabulary_term_INDEX1_CCGTCCA.setDescription(None)\nvocabulary_term_INDEX1_CCGTCCA.setLabel('DNA Adapter 16')\nvocabulary_term_INDEX1_CCGTCCA.setOrdinal(62)\nvocabulary_INDEX1.addTerm(vocabulary_term_INDEX1_CCGTCCA)\n \nvocabulary_term_INDEX1_GTAGAGA = tr.createNewVocabularyTerm('GTAGAGA')\nvocabulary_term_INDEX1_GTAGAGA.setDescription(None)\nvocabulary_term_INDEX1_GTAGAGA.setLabel('DNA Adapter 17')\nvocabulary_term_INDEX1_GTAGAGA.setOrdinal(63)\nvocabulary_INDEX1.addTerm(vocabulary_term_INDEX1_GTAGAGA)\n \nvocabulary_term_INDEX1_GTGAAAA = tr.createNewVocabularyTerm('GTGAAAA')\nvocabulary_term_INDEX1_GTGAAAA.setDescription(None)\nvocabulary_term_INDEX1_GTGAAAA.setLabel('DNA Adapter 19')\nvocabulary_term_INDEX1_GTGAAAA.setOrdinal(64)\nvocabulary_INDEX1.addTerm(vocabulary_term_INDEX1_GTGAAAA)\n \nvocabulary_term_INDEX1_GTGGCCA = tr.createNewVocabularyTerm('GTGGCCA')\nvocabulary_term_INDEX1_GTGGCCA.setDescription(None)\nvocabulary_term_INDEX1_GTGGCCA.setLabel('DNA Adapter 20')\nvocabulary_term_INDEX1_GTGGCCA.setOrdinal(65)\nvocabulary_INDEX1.addTerm(vocabulary_term_INDEX1_GTGGCCA)\n \nvocabulary_term_INDEX1_GTTTCGA = tr.createNewVocabularyTerm('GTTTCGA')\nvocabulary_term_INDEX1_GTTTCGA.setDescription(None)\nvocabulary_term_INDEX1_GTTTCGA.setLabel('DNA Adapter 21')\nvocabulary_term_INDEX1_GTTTCGA.setOrdinal(66)\nvocabulary_INDEX1.addTerm(vocabulary_term_INDEX1_GTTTCGA)\n \nvocabulary_term_INDEX1_CGTACGA = tr.createNewVocabularyTerm('CGTACGA')\nvocabulary_term_INDEX1_CGTACGA.setDescription(None)\nvocabulary_term_INDEX1_CGTACGA.setLabel('DNA Adapter 22')\nvocabulary_term_INDEX1_CGTACGA.setOrdinal(67)\nvocabulary_INDEX1.addTerm(vocabulary_term_INDEX1_CGTACGA)\n \nvocabulary_term_INDEX1_GGTAGCA = tr.createNewVocabularyTerm('GGTAGCA')\nvocabulary_term_INDEX1_GGTAGCA.setDescription(None)\nvocabulary_term_INDEX1_GGTAGCA.setLabel('DNA Adapter 24')\nvocabulary_term_INDEX1_GGTAGCA.setOrdinal(68)\nvocabulary_INDEX1.addTerm(vocabulary_term_INDEX1_GGTAGCA)\n \nvocabulary_term_INDEX1_ATGAGCA = tr.createNewVocabularyTerm('ATGAGCA')\nvocabulary_term_INDEX1_ATGAGCA.setDescription(None)\nvocabulary_term_INDEX1_ATGAGCA.setLabel('DNA Adapter 26')\nvocabulary_term_INDEX1_ATGAGCA.setOrdinal(69)\nvocabulary_INDEX1.addTerm(vocabulary_term_INDEX1_ATGAGCA)\n \nvocabulary_term_INDEX1_ATTCCTA = tr.createNewVocabularyTerm('ATTCCTA')\nvocabulary_term_INDEX1_ATTCCTA.setDescription(None)\nvocabulary_term_INDEX1_ATTCCTA.setLabel('DNA Adapter 27')\nvocabulary_term_INDEX1_ATTCCTA.setOrdinal(70)\nvocabulary_INDEX1.addTerm(vocabulary_term_INDEX1_ATTCCTA)\n \nvocabulary_term_INDEX1_CAAAAGA = tr.createNewVocabularyTerm('CAAAAGA')\nvocabulary_term_INDEX1_CAAAAGA.setDescription(None)\nvocabulary_term_INDEX1_CAAAAGA.setLabel('DNA Adapter 28')\nvocabulary_term_INDEX1_CAAAAGA.setOrdinal(71)\nvocabulary_INDEX1.addTerm(vocabulary_term_INDEX1_CAAAAGA)\n \nvocabulary_term_INDEX1_CAACTAA = tr.createNewVocabularyTerm('CAACTAA')\nvocabulary_term_INDEX1_CAACTAA.setDescription(None)\nvocabulary_term_INDEX1_CAACTAA.setLabel('DNA Adapter 29')\nvocabulary_term_INDEX1_CAACTAA.setOrdinal(72)\nvocabulary_INDEX1.addTerm(vocabulary_term_INDEX1_CAACTAA)\n \nvocabulary_term_INDEX1_CACCGGA = tr.createNewVocabularyTerm('CACCGGA')\nvocabulary_term_INDEX1_CACCGGA.setDescription(None)\nvocabulary_term_INDEX1_CACCGGA.setLabel('DNA Adapter 30')\nvocabulary_term_INDEX1_CACCGGA.setOrdinal(73)\nvocabulary_INDEX1.addTerm(vocabulary_term_INDEX1_CACCGGA)\n \nvocabulary_term_INDEX1_CACGATA = tr.createNewVocabularyTerm('CACGATA')\nvocabulary_term_INDEX1_CACGATA.setDescription(None)\nvocabulary_term_INDEX1_CACGATA.setLabel('DNA Adapter 31')\nvocabulary_term_INDEX1_CACGATA.setOrdinal(74)\nvocabulary_INDEX1.addTerm(vocabulary_term_INDEX1_CACGATA)\n \nvocabulary_term_INDEX1_CACTCAA = tr.createNewVocabularyTerm('CACTCAA')\nvocabulary_term_INDEX1_CACTCAA.setDescription(None)\nvocabulary_term_INDEX1_CACTCAA.setLabel('DNA Adapter 32')\nvocabulary_term_INDEX1_CACTCAA.setOrdinal(75)\nvocabulary_INDEX1.addTerm(vocabulary_term_INDEX1_CACTCAA)\n \nvocabulary_term_INDEX1_CAGGCGA = tr.createNewVocabularyTerm('CAGGCGA')\nvocabulary_term_INDEX1_CAGGCGA.setDescription(None)\nvocabulary_term_INDEX1_CAGGCGA.setLabel('DNA Adapter 33')\nvocabulary_term_INDEX1_CAGGCGA.setOrdinal(76)\nvocabulary_INDEX1.addTerm(vocabulary_term_INDEX1_CAGGCGA)\n \nvocabulary_term_INDEX1_CATGGCA = tr.createNewVocabularyTerm('CATGGCA')\nvocabulary_term_INDEX1_CATGGCA.setDescription(None)\nvocabulary_term_INDEX1_CATGGCA.setLabel('DNA Adapter 34')\nvocabulary_term_INDEX1_CATGGCA.setOrdinal(77)\nvocabulary_INDEX1.addTerm(vocabulary_term_INDEX1_CATGGCA)\n \nvocabulary_term_INDEX1_CATTTTA = tr.createNewVocabularyTerm('CATTTTA')\nvocabulary_term_INDEX1_CATTTTA.setDescription(None)\nvocabulary_term_INDEX1_CATTTTA.setLabel('DNA Adapter 35')\nvocabulary_term_INDEX1_CATTTTA.setOrdinal(78)\nvocabulary_INDEX1.addTerm(vocabulary_term_INDEX1_CATTTTA)\n \nvocabulary_term_INDEX1_CCAACAA = tr.createNewVocabularyTerm('CCAACAA')\nvocabulary_term_INDEX1_CCAACAA.setDescription(None)\nvocabulary_term_INDEX1_CCAACAA.setLabel('DNA Adapter 36')\nvocabulary_term_INDEX1_CCAACAA.setOrdinal(79)\nvocabulary_INDEX1.addTerm(vocabulary_term_INDEX1_CCAACAA)\n \nvocabulary_term_INDEX1_CGGAATA = tr.createNewVocabularyTerm('CGGAATA')\nvocabulary_term_INDEX1_CGGAATA.setDescription(None)\nvocabulary_term_INDEX1_CGGAATA.setLabel('DNA Adapter 37')\nvocabulary_term_INDEX1_CGGAATA.setOrdinal(80)\nvocabulary_INDEX1.addTerm(vocabulary_term_INDEX1_CGGAATA)\n \nvocabulary_term_INDEX1_CTAGCTA = tr.createNewVocabularyTerm('CTAGCTA')\nvocabulary_term_INDEX1_CTAGCTA.setDescription(None)\nvocabulary_term_INDEX1_CTAGCTA.setLabel('DNA Adapter 38')\nvocabulary_term_INDEX1_CTAGCTA.setOrdinal(81)\nvocabulary_INDEX1.addTerm(vocabulary_term_INDEX1_CTAGCTA)\n \nvocabulary_term_INDEX1_CTATACA = tr.createNewVocabularyTerm('CTATACA')\nvocabulary_term_INDEX1_CTATACA.setDescription(None)\nvocabulary_term_INDEX1_CTATACA.setLabel('DNA Adapter 39')\nvocabulary_term_INDEX1_CTATACA.setOrdinal(82)\nvocabulary_INDEX1.addTerm(vocabulary_term_INDEX1_CTATACA)\n \nvocabulary_term_INDEX1_CTCAGAA = tr.createNewVocabularyTerm('CTCAGAA')\nvocabulary_term_INDEX1_CTCAGAA.setDescription(None)\nvocabulary_term_INDEX1_CTCAGAA.setLabel('DNA Adapter 40')\nvocabulary_term_INDEX1_CTCAGAA.setOrdinal(83)\nvocabulary_INDEX1.addTerm(vocabulary_term_INDEX1_CTCAGAA)\n \nvocabulary_term_INDEX1_GACGACA = tr.createNewVocabularyTerm('GACGACA')\nvocabulary_term_INDEX1_GACGACA.setDescription(None)\nvocabulary_term_INDEX1_GACGACA.setLabel('DNA Adapter 41')\nvocabulary_term_INDEX1_GACGACA.setOrdinal(84)\nvocabulary_INDEX1.addTerm(vocabulary_term_INDEX1_GACGACA)\n \nvocabulary_term_INDEX1_TAATCGA = tr.createNewVocabularyTerm('TAATCGA')\nvocabulary_term_INDEX1_TAATCGA.setDescription(None)\nvocabulary_term_INDEX1_TAATCGA.setLabel('DNA Adapter 42')\nvocabulary_term_INDEX1_TAATCGA.setOrdinal(85)\nvocabulary_INDEX1.addTerm(vocabulary_term_INDEX1_TAATCGA)\n \nvocabulary_term_INDEX1_TACAGCA = tr.createNewVocabularyTerm('TACAGCA')\nvocabulary_term_INDEX1_TACAGCA.setDescription(None)\nvocabulary_term_INDEX1_TACAGCA.setLabel('DNA Adapter 43')\nvocabulary_term_INDEX1_TACAGCA.setOrdinal(86)\nvocabulary_INDEX1.addTerm(vocabulary_term_INDEX1_TACAGCA)\n \nvocabulary_term_INDEX1_TATAATA = tr.createNewVocabularyTerm('TATAATA')\nvocabulary_term_INDEX1_TATAATA.setDescription(None)\nvocabulary_term_INDEX1_TATAATA.setLabel('DNA Adapter 44')\nvocabulary_term_INDEX1_TATAATA.setOrdinal(87)\nvocabulary_INDEX1.addTerm(vocabulary_term_INDEX1_TATAATA)\n \nvocabulary_term_INDEX1_TCATTCA = tr.createNewVocabularyTerm('TCATTCA')\nvocabulary_term_INDEX1_TCATTCA.setDescription(None)\nvocabulary_term_INDEX1_TCATTCA.setLabel('DNA Adapter 45')\nvocabulary_term_INDEX1_TCATTCA.setOrdinal(88)\nvocabulary_INDEX1.addTerm(vocabulary_term_INDEX1_TCATTCA)\n \nvocabulary_term_INDEX1_TCCCGAA = tr.createNewVocabularyTerm('TCCCGAA')\nvocabulary_term_INDEX1_TCCCGAA.setDescription(None)\nvocabulary_term_INDEX1_TCCCGAA.setLabel('DNA Adapter 46')\nvocabulary_term_INDEX1_TCCCGAA.setOrdinal(89)\nvocabulary_INDEX1.addTerm(vocabulary_term_INDEX1_TCCCGAA)\n \nvocabulary_term_INDEX1_TCGAAGA = tr.createNewVocabularyTerm('TCGAAGA')\nvocabulary_term_INDEX1_TCGAAGA.setDescription(None)\nvocabulary_term_INDEX1_TCGAAGA.setLabel('DNA Adapter 47')\nvocabulary_term_INDEX1_TCGAAGA.setOrdinal(90)\nvocabulary_INDEX1.addTerm(vocabulary_term_INDEX1_TCGAAGA)\n \nvocabulary_term_INDEX1_TCGGCAA = tr.createNewVocabularyTerm('TCGGCAA')\nvocabulary_term_INDEX1_TCGGCAA.setDescription(None)\nvocabulary_term_INDEX1_TCGGCAA.setLabel('DNA Adapter 48')\nvocabulary_term_INDEX1_TCGGCAA.setOrdinal(91)\nvocabulary_INDEX1.addTerm(vocabulary_term_INDEX1_TCGGCAA)\n \nvocabulary_term_INDEX1_AGTCAAC = tr.createNewVocabularyTerm('AGTCAAC')\nvocabulary_term_INDEX1_AGTCAAC.setDescription(None)\nvocabulary_term_INDEX1_AGTCAAC.setLabel('Index13 AGTCAAC')\nvocabulary_term_INDEX1_AGTCAAC.setOrdinal(92)\nvocabulary_INDEX1.addTerm(vocabulary_term_INDEX1_AGTCAAC)\n \nvocabulary_term_INDEX1_AATGCGA = tr.createNewVocabularyTerm('AATGCGA')\nvocabulary_term_INDEX1_AATGCGA.setDescription(None)\nvocabulary_term_INDEX1_AATGCGA.setLabel('Lib AATGCGA')\nvocabulary_term_INDEX1_AATGCGA.setOrdinal(93)\nvocabulary_INDEX1.addTerm(vocabulary_term_INDEX1_AATGCGA)\n \nvocabulary_INDEX2 = tr.getOrCreateNewVocabulary('INDEX2')\nvocabulary_INDEX2.setDescription('Index 2 for Illumina Dual Indexing')\nvocabulary_INDEX2.setUrlTemplate(None)\nvocabulary_INDEX2.setManagedInternally(False)\nvocabulary_INDEX2.setInternalNamespace(False)\nvocabulary_INDEX2.setChosenFromList(True)\n \nvocabulary_term_INDEX2_NONE = tr.createNewVocabularyTerm('NONE')\nvocabulary_term_INDEX2_NONE.setDescription('No Index')\nvocabulary_term_INDEX2_NONE.setLabel('None')\nvocabulary_term_INDEX2_NONE.setOrdinal(1)\nvocabulary_INDEX2.addTerm(vocabulary_term_INDEX2_NONE)\n \nvocabulary_term_INDEX2_TAGATCGC = tr.createNewVocabularyTerm('TAGATCGC')\nvocabulary_term_INDEX2_TAGATCGC.setDescription('Nextera DNA')\nvocabulary_term_INDEX2_TAGATCGC.setLabel('Index2 (i5) N501 TAGATCGC')\nvocabulary_term_INDEX2_TAGATCGC.setOrdinal(2)\nvocabulary_INDEX2.addTerm(vocabulary_term_INDEX2_TAGATCGC)\n \nvocabulary_term_INDEX2_CTCTCTAT = tr.createNewVocabularyTerm('CTCTCTAT')\nvocabulary_term_INDEX2_CTCTCTAT.setDescription('Nextera DNA')\nvocabulary_term_INDEX2_CTCTCTAT.setLabel('Index2 (i5) N502 CTCTCTAT')\nvocabulary_term_INDEX2_CTCTCTAT.setOrdinal(3)\nvocabulary_INDEX2.addTerm(vocabulary_term_INDEX2_CTCTCTAT)\n \nvocabulary_term_INDEX2_TATCCTCT = tr.createNewVocabularyTerm('TATCCTCT')\nvocabulary_term_INDEX2_TATCCTCT.setDescription('Nextera DNA')\nvocabulary_term_INDEX2_TATCCTCT.setLabel('Index2 (i5) N503 TATCCTCT')\nvocabulary_term_INDEX2_TATCCTCT.setOrdinal(4)\nvocabulary_INDEX2.addTerm(vocabulary_term_INDEX2_TATCCTCT)\n \nvocabulary_term_INDEX2_AGAGTAGA = tr.createNewVocabularyTerm('AGAGTAGA')\nvocabulary_term_INDEX2_AGAGTAGA.setDescription('Nextera DNA')\nvocabulary_term_INDEX2_AGAGTAGA.setLabel('Index2 (i5) N504 AGAGTAGA')\nvocabulary_term_INDEX2_AGAGTAGA.setOrdinal(5)\nvocabulary_INDEX2.addTerm(vocabulary_term_INDEX2_AGAGTAGA)\n \nvocabulary_term_INDEX2_GTAAGGAG = tr.createNewVocabularyTerm('GTAAGGAG')\nvocabulary_term_INDEX2_GTAAGGAG.setDescription('Nextera DNA')\nvocabulary_term_INDEX2_GTAAGGAG.setLabel('Index2 (i5) N505 GTAAGGAG')\nvocabulary_term_INDEX2_GTAAGGAG.setOrdinal(6)\nvocabulary_INDEX2.addTerm(vocabulary_term_INDEX2_GTAAGGAG)\n \nvocabulary_term_INDEX2_ACTGCATA = tr.createNewVocabularyTerm('ACTGCATA')\nvocabulary_term_INDEX2_ACTGCATA.setDescription('Nextera DNA')\nvocabulary_term_INDEX2_ACTGCATA.setLabel('Index2 (i5) N506 ACTGCATA')\nvocabulary_term_INDEX2_ACTGCATA.setOrdinal(7)\nvocabulary_INDEX2.addTerm(vocabulary_term_INDEX2_ACTGCATA)\n \nvocabulary_term_INDEX2_AAGGAGTA = tr.createNewVocabularyTerm('AAGGAGTA')\nvocabulary_term_INDEX2_AAGGAGTA.setDescription('Nextera DNA')\nvocabulary_term_INDEX2_AAGGAGTA.setLabel('Index2 (i5) N507 AAGGAGTA')\nvocabulary_term_INDEX2_AAGGAGTA.setOrdinal(8)\nvocabulary_INDEX2.addTerm(vocabulary_term_INDEX2_AAGGAGTA)\n \nvocabulary_term_INDEX2_CTAAGCCT = tr.createNewVocabularyTerm('CTAAGCCT')\nvocabulary_term_INDEX2_CTAAGCCT.setDescription('Nextera DNA')\nvocabulary_term_INDEX2_CTAAGCCT.setLabel('Index2 (i5) N508 CTAAGCCT')\nvocabulary_term_INDEX2_CTAAGCCT.setOrdinal(9)\nvocabulary_INDEX2.addTerm(vocabulary_term_INDEX2_CTAAGCCT)\n \nvocabulary_term_INDEX2_NOINDEX = tr.createNewVocabularyTerm('NOINDEX')\nvocabulary_term_INDEX2_NOINDEX.setDescription(None)\nvocabulary_term_INDEX2_NOINDEX.setLabel(None)\nvocabulary_term_INDEX2_NOINDEX.setOrdinal(10)\nvocabulary_INDEX2.addTerm(vocabulary_term_INDEX2_NOINDEX)\n \nvocabulary_KIT = tr.getOrCreateNewVocabulary('KIT')\nvocabulary_KIT.setDescription('Illumina Kit used for preparation')\nvocabulary_KIT.setUrlTemplate(None)\nvocabulary_KIT.setManagedInternally(False)\nvocabulary_KIT.setInternalNamespace(False)\nvocabulary_KIT.setChosenFromList(True)\n \nvocabulary_term_KIT_CHIP_SEQ_SAMPLE_PREP = tr.createNewVocabularyTerm('CHIP_SEQ_SAMPLE_PREP')\nvocabulary_term_KIT_CHIP_SEQ_SAMPLE_PREP.setDescription(None)\nvocabulary_term_KIT_CHIP_SEQ_SAMPLE_PREP.setLabel('ChIP-Seq Sample Preparation Kit')\nvocabulary_term_KIT_CHIP_SEQ_SAMPLE_PREP.setOrdinal(1)\nvocabulary_KIT.addTerm(vocabulary_term_KIT_CHIP_SEQ_SAMPLE_PREP)\n \nvocabulary_term_KIT_NEBNEXT_DNA_SAMPLE_PREP_MASTER_MIX_SET1 = tr.createNewVocabularyTerm('NEBNEXT_DNA_SAMPLE_PREP_MASTER_MIX_SET1')\nvocabulary_term_KIT_NEBNEXT_DNA_SAMPLE_PREP_MASTER_MIX_SET1.setDescription(None)\nvocabulary_term_KIT_NEBNEXT_DNA_SAMPLE_PREP_MASTER_MIX_SET1.setLabel('NEB Genomic DNA Sample Preparation Kit')\nvocabulary_term_KIT_NEBNEXT_DNA_SAMPLE_PREP_MASTER_MIX_SET1.setOrdinal(2)\nvocabulary_KIT.addTerm(vocabulary_term_KIT_NEBNEXT_DNA_SAMPLE_PREP_MASTER_MIX_SET1)\n \nvocabulary_term_KIT_NEB_CHIP_SEQ_SAMPLE_PREPARATION_KIT = tr.createNewVocabularyTerm('NEB_CHIP_SEQ_SAMPLE_PREPARATION_KIT')\nvocabulary_term_KIT_NEB_CHIP_SEQ_SAMPLE_PREPARATION_KIT.setDescription(None)\nvocabulary_term_KIT_NEB_CHIP_SEQ_SAMPLE_PREPARATION_KIT.setLabel('NEB_ChIP_Seq_Sample_Preparation_Kit')\nvocabulary_term_KIT_NEB_CHIP_SEQ_SAMPLE_PREPARATION_KIT.setOrdinal(3)\nvocabulary_KIT.addTerm(vocabulary_term_KIT_NEB_CHIP_SEQ_SAMPLE_PREPARATION_KIT)\n \nvocabulary_term_KIT_GENOMICDNA_SAMPLE_PREP = tr.createNewVocabularyTerm('GENOMICDNA_SAMPLE_PREP')\nvocabulary_term_KIT_GENOMICDNA_SAMPLE_PREP.setDescription(None)\nvocabulary_term_KIT_GENOMICDNA_SAMPLE_PREP.setLabel('Illumina Genomic DNA Sample Preparation Kit')\nvocabulary_term_KIT_GENOMICDNA_SAMPLE_PREP.setOrdinal(4)\nvocabulary_KIT.addTerm(vocabulary_term_KIT_GENOMICDNA_SAMPLE_PREP)\n \nvocabulary_term_KIT_PAIRED_END_DNA_SAMPLE_PREP = tr.createNewVocabularyTerm('PAIRED_END_DNA_SAMPLE_PREP')\nvocabulary_term_KIT_PAIRED_END_DNA_SAMPLE_PREP.setDescription(None)\nvocabulary_term_KIT_PAIRED_END_DNA_SAMPLE_PREP.setLabel('Paired End DNA Sample Prep Oligo Kit')\nvocabulary_term_KIT_PAIRED_END_DNA_SAMPLE_PREP.setOrdinal(5)\nvocabulary_KIT.addTerm(vocabulary_term_KIT_PAIRED_END_DNA_SAMPLE_PREP)\n \nvocabulary_term_KIT_MRNA_SEQ_SAMPLE_PREP = tr.createNewVocabularyTerm('MRNA_SEQ_SAMPLE_PREP')\nvocabulary_term_KIT_MRNA_SEQ_SAMPLE_PREP.setDescription(None)\nvocabulary_term_KIT_MRNA_SEQ_SAMPLE_PREP.setLabel('mRNA-Seq Sample Preparation Kit')\nvocabulary_term_KIT_MRNA_SEQ_SAMPLE_PREP.setOrdinal(6)\nvocabulary_KIT.addTerm(vocabulary_term_KIT_MRNA_SEQ_SAMPLE_PREP)\n \nvocabulary_term_KIT_RIBOZERO_SCRIPTSEQ_MRNASEQ_KIT = tr.createNewVocabularyTerm('RIBOZERO_SCRIPTSEQ_MRNA-SEQ_KIT')\nvocabulary_term_KIT_RIBOZERO_SCRIPTSEQ_MRNASEQ_KIT.setDescription(None)\nvocabulary_term_KIT_RIBOZERO_SCRIPTSEQ_MRNASEQ_KIT.setLabel('RiboZero ScriptSeq mRNA-Seq_Epicentre-kit')\nvocabulary_term_KIT_RIBOZERO_SCRIPTSEQ_MRNASEQ_KIT.setOrdinal(7)\nvocabulary_KIT.addTerm(vocabulary_term_KIT_RIBOZERO_SCRIPTSEQ_MRNASEQ_KIT)\n \nvocabulary_term_KIT_POLYA_SCRIPTSEQ_MRNASEQ_KIT = tr.createNewVocabularyTerm('POLYA_SCRIPTSEQ_MRNA-SEQ_KIT')\nvocabulary_term_KIT_POLYA_SCRIPTSEQ_MRNASEQ_KIT.setDescription(None)\nvocabulary_term_KIT_POLYA_SCRIPTSEQ_MRNASEQ_KIT.setLabel('PolyA(Beads) ScriptSeq mRNA-Seq_Epicentre-kit')\nvocabulary_term_KIT_POLYA_SCRIPTSEQ_MRNASEQ_KIT.setOrdinal(8)\nvocabulary_KIT.addTerm(vocabulary_term_KIT_POLYA_SCRIPTSEQ_MRNASEQ_KIT)\n \nvocabulary_term_KIT_NEXTERA_DNA_SAMPLE_PREP_KITS = tr.createNewVocabularyTerm('NEXTERA_DNA_SAMPLE_PREP_KITS')\nvocabulary_term_KIT_NEXTERA_DNA_SAMPLE_PREP_KITS.setDescription(None)\nvocabulary_term_KIT_NEXTERA_DNA_SAMPLE_PREP_KITS.setLabel('Nextera Genomic DNA Sample Preparation Kit BufferLMW(Epicentre)')\nvocabulary_term_KIT_NEXTERA_DNA_SAMPLE_PREP_KITS.setOrdinal(9)\nvocabulary_KIT.addTerm(vocabulary_term_KIT_NEXTERA_DNA_SAMPLE_PREP_KITS)\n \nvocabulary_term_KIT_NEXTERA_DNA_SAMPLE_PREP_KIT_BUFFER_HMW = tr.createNewVocabularyTerm('NEXTERA_DNA_SAMPLE_PREP_KIT_BUFFER_HMW')\nvocabulary_term_KIT_NEXTERA_DNA_SAMPLE_PREP_KIT_BUFFER_HMW.setDescription(None)\nvocabulary_term_KIT_NEXTERA_DNA_SAMPLE_PREP_KIT_BUFFER_HMW.setLabel('Nextera Genomic DNA Sample Preparation Kit BufferHMW(Epicentre)')\nvocabulary_term_KIT_NEXTERA_DNA_SAMPLE_PREP_KIT_BUFFER_HMW.setOrdinal(10)\nvocabulary_KIT.addTerm(vocabulary_term_KIT_NEXTERA_DNA_SAMPLE_PREP_KIT_BUFFER_HMW)\n \nvocabulary_term_KIT_AGILENT_SURESELECT_ENRICHMENTSYSTEM = tr.createNewVocabularyTerm('AGILENT_SURESELECT_ENRICHMENTSYSTEM')\nvocabulary_term_KIT_AGILENT_SURESELECT_ENRICHMENTSYSTEM.setDescription(None)\nvocabulary_term_KIT_AGILENT_SURESELECT_ENRICHMENTSYSTEM.setLabel('Agilent_SureSelect_EnrichmentSystem')\nvocabulary_term_KIT_AGILENT_SURESELECT_ENRICHMENTSYSTEM.setOrdinal(11)\nvocabulary_KIT.addTerm(vocabulary_term_KIT_AGILENT_SURESELECT_ENRICHMENTSYSTEM)\n \nvocabulary_term_KIT_TRUSEQRNA_SAMPLE_PREP_KIT = tr.createNewVocabularyTerm('TRUSEQRNA_SAMPLE_PREP_KIT')\nvocabulary_term_KIT_TRUSEQRNA_SAMPLE_PREP_KIT.setDescription(None)\nvocabulary_term_KIT_TRUSEQRNA_SAMPLE_PREP_KIT.setLabel('TruSeq_RNA_SamplePrepKit_Illumina')\nvocabulary_term_KIT_TRUSEQRNA_SAMPLE_PREP_KIT.setOrdinal(12)\nvocabulary_KIT.addTerm(vocabulary_term_KIT_TRUSEQRNA_SAMPLE_PREP_KIT)\n \nvocabulary_term_KIT_TRUESEQ_CHIP_SAMPLE_PREP_KIT = tr.createNewVocabularyTerm('TRUESEQ_CHIP_SAMPLE_PREP_KIT')\nvocabulary_term_KIT_TRUESEQ_CHIP_SAMPLE_PREP_KIT.setDescription(None)\nvocabulary_term_KIT_TRUESEQ_CHIP_SAMPLE_PREP_KIT.setLabel(None)\nvocabulary_term_KIT_TRUESEQ_CHIP_SAMPLE_PREP_KIT.setOrdinal(13)\nvocabulary_KIT.addTerm(vocabulary_term_KIT_TRUESEQ_CHIP_SAMPLE_PREP_KIT)\n \nvocabulary_term_KIT_TRUSEQ_DNA_SAMPLE_PREP_KIT = tr.createNewVocabularyTerm('TRUSEQ_DNA_SAMPLE_PREP_KIT')\nvocabulary_term_KIT_TRUSEQ_DNA_SAMPLE_PREP_KIT.setDescription(None)\nvocabulary_term_KIT_TRUSEQ_DNA_SAMPLE_PREP_KIT.setLabel('TruSeq_DNA_SamplePrepKit_Illumina')\nvocabulary_term_KIT_TRUSEQ_DNA_SAMPLE_PREP_KIT.setOrdinal(14)\nvocabulary_KIT.addTerm(vocabulary_term_KIT_TRUSEQ_DNA_SAMPLE_PREP_KIT)\n \nvocabulary_term_KIT_NONE = tr.createNewVocabularyTerm('NONE')\nvocabulary_term_KIT_NONE.setDescription(None)\nvocabulary_term_KIT_NONE.setLabel('None (Already prepared)')\nvocabulary_term_KIT_NONE.setOrdinal(15)\nvocabulary_KIT.addTerm(vocabulary_term_KIT_NONE)\n \nvocabulary_MACS_VERSION = tr.getOrCreateNewVocabulary('MACS_VERSION')\nvocabulary_MACS_VERSION.setDescription('Used MACS version for Peak Calling')\nvocabulary_MACS_VERSION.setUrlTemplate(None)\nvocabulary_MACS_VERSION.setManagedInternally(False)\nvocabulary_MACS_VERSION.setInternalNamespace(False)\nvocabulary_MACS_VERSION.setChosenFromList(True)\n \nvocabulary_term_MACS_VERSION_140RC2 = tr.createNewVocabularyTerm('1.4.0RC2')\nvocabulary_term_MACS_VERSION_140RC2.setDescription(None)\nvocabulary_term_MACS_VERSION_140RC2.setLabel('macs14 1.4.0rc2 20110214 (Valentine)')\nvocabulary_term_MACS_VERSION_140RC2.setOrdinal(1)\nvocabulary_MACS_VERSION.addTerm(vocabulary_term_MACS_VERSION_140RC2)\n \nvocabulary_term_MACS_VERSION_1371 = tr.createNewVocabularyTerm('1.3.7.1')\nvocabulary_term_MACS_VERSION_1371.setDescription(None)\nvocabulary_term_MACS_VERSION_1371.setLabel('macs 1.3.7.1 (Oktoberfest, bug fixed #1)')\nvocabulary_term_MACS_VERSION_1371.setOrdinal(2)\nvocabulary_MACS_VERSION.addTerm(vocabulary_term_MACS_VERSION_1371)\n \nvocabulary_MISMATCH_IN_INDEX = tr.getOrCreateNewVocabulary('MISMATCH_IN_INDEX')\nvocabulary_MISMATCH_IN_INDEX.setDescription('Mismatch in Index allowed')\nvocabulary_MISMATCH_IN_INDEX.setUrlTemplate(None)\nvocabulary_MISMATCH_IN_INDEX.setManagedInternally(False)\nvocabulary_MISMATCH_IN_INDEX.setInternalNamespace(False)\nvocabulary_MISMATCH_IN_INDEX.setChosenFromList(True)\n \nvocabulary_term_MISMATCH_IN_INDEX_NONE = tr.createNewVocabularyTerm('NONE')\nvocabulary_term_MISMATCH_IN_INDEX_NONE.setDescription(None)\nvocabulary_term_MISMATCH_IN_INDEX_NONE.setLabel(None)\nvocabulary_term_MISMATCH_IN_INDEX_NONE.setOrdinal(1)\nvocabulary_MISMATCH_IN_INDEX.addTerm(vocabulary_term_MISMATCH_IN_INDEX_NONE)\n \nvocabulary_term_MISMATCH_IN_INDEX_ONE = tr.createNewVocabularyTerm('ONE')\nvocabulary_term_MISMATCH_IN_INDEX_ONE.setDescription(None)\nvocabulary_term_MISMATCH_IN_INDEX_ONE.setLabel(None)\nvocabulary_term_MISMATCH_IN_INDEX_ONE.setOrdinal(2)\nvocabulary_MISMATCH_IN_INDEX.addTerm(vocabulary_term_MISMATCH_IN_INDEX_ONE)\n \nvocabulary_NANO_DROP = tr.getOrCreateNewVocabulary('NANO_DROP')\nvocabulary_NANO_DROP.setDescription('Device for measuring the total amount of genetic material contained in the probe')\nvocabulary_NANO_DROP.setUrlTemplate(None)\nvocabulary_NANO_DROP.setManagedInternally(False)\nvocabulary_NANO_DROP.setInternalNamespace(False)\nvocabulary_NANO_DROP.setChosenFromList(True)\n \nvocabulary_term_NANO_DROP_CONCND3300 = tr.createNewVocabularyTerm('CONCND3300')\nvocabulary_term_NANO_DROP_CONCND3300.setDescription(None)\nvocabulary_term_NANO_DROP_CONCND3300.setLabel('Conc Nano Drop 3300')\nvocabulary_term_NANO_DROP_CONCND3300.setOrdinal(1)\nvocabulary_NANO_DROP.addTerm(vocabulary_term_NANO_DROP_CONCND3300)\n \nvocabulary_term_NANO_DROP_CONCND1000 = tr.createNewVocabularyTerm('CONCND1000')\nvocabulary_term_NANO_DROP_CONCND1000.setDescription(None)\nvocabulary_term_NANO_DROP_CONCND1000.setLabel('Conc Nano Drop 1000')\nvocabulary_term_NANO_DROP_CONCND1000.setOrdinal(2)\nvocabulary_NANO_DROP.addTerm(vocabulary_term_NANO_DROP_CONCND1000)\n \nvocabulary_term_NANO_DROP_CONCND2000 = tr.createNewVocabularyTerm('CONCND2000')\nvocabulary_term_NANO_DROP_CONCND2000.setDescription(None)\nvocabulary_term_NANO_DROP_CONCND2000.setLabel('Conc Nano Drop 2000')\nvocabulary_term_NANO_DROP_CONCND2000.setOrdinal(3)\nvocabulary_NANO_DROP.addTerm(vocabulary_term_NANO_DROP_CONCND2000)\n \nvocabulary_NCBI_TAXONOMY = tr.getOrCreateNewVocabulary('NCBI_TAXONOMY')\nvocabulary_NCBI_TAXONOMY.setDescription(None)\nvocabulary_NCBI_TAXONOMY.setUrlTemplate('http://www.ncbi.nlm.nih.gov/Taxonomy/Browser/wwwtax.cgi?id=$term$')\nvocabulary_NCBI_TAXONOMY.setManagedInternally(False)\nvocabulary_NCBI_TAXONOMY.setInternalNamespace(False)\nvocabulary_NCBI_TAXONOMY.setChosenFromList(True)\n \nvocabulary_term_NCBI_TAXONOMY_10090 = tr.createNewVocabularyTerm('10090')\nvocabulary_term_NCBI_TAXONOMY_10090.setDescription('Genbank common name: house mouse\\ Inherited blast name: rodents')\nvocabulary_term_NCBI_TAXONOMY_10090.setLabel('Mus musculus')\nvocabulary_term_NCBI_TAXONOMY_10090.setOrdinal(1)\nvocabulary_NCBI_TAXONOMY.addTerm(vocabulary_term_NCBI_TAXONOMY_10090)\n \nvocabulary_term_NCBI_TAXONOMY_9606 = tr.createNewVocabularyTerm('9606')\nvocabulary_term_NCBI_TAXONOMY_9606.setDescription('Genbank common name: human\\ Inherited blast name: primates')\nvocabulary_term_NCBI_TAXONOMY_9606.setLabel('Homo sapiens')\nvocabulary_term_NCBI_TAXONOMY_9606.setOrdinal(2)\nvocabulary_NCBI_TAXONOMY.addTerm(vocabulary_term_NCBI_TAXONOMY_9606)\n \nvocabulary_term_NCBI_TAXONOMY_7227 = tr.createNewVocabularyTerm('7227')\nvocabulary_term_NCBI_TAXONOMY_7227.setDescription('Genbank common name: fruit fly\\ Inherited blast name: flies')\nvocabulary_term_NCBI_TAXONOMY_7227.setLabel('Drosophila melanogaster')\nvocabulary_term_NCBI_TAXONOMY_7227.setOrdinal(3)\nvocabulary_NCBI_TAXONOMY.addTerm(vocabulary_term_NCBI_TAXONOMY_7227)\n \nvocabulary_term_NCBI_TAXONOMY_6239 = tr.createNewVocabularyTerm('6239')\nvocabulary_term_NCBI_TAXONOMY_6239.setDescription('Inherited blast name: nematodes')\nvocabulary_term_NCBI_TAXONOMY_6239.setLabel('Caenorhabditis elegans')\nvocabulary_term_NCBI_TAXONOMY_6239.setOrdinal(4)\nvocabulary_NCBI_TAXONOMY.addTerm(vocabulary_term_NCBI_TAXONOMY_6239)\n \nvocabulary_term_NCBI_TAXONOMY_4932 = tr.createNewVocabularyTerm('4932')\nvocabulary_term_NCBI_TAXONOMY_4932.setDescription('Genbank common name: baker\\'s yeast\\ Inherited blast name: ascomycetes')\nvocabulary_term_NCBI_TAXONOMY_4932.setLabel('Saccharomyces cerevisiae')\nvocabulary_term_NCBI_TAXONOMY_4932.setOrdinal(5)\nvocabulary_NCBI_TAXONOMY.addTerm(vocabulary_term_NCBI_TAXONOMY_4932)\n \nvocabulary_term_NCBI_TAXONOMY_10116 = tr.createNewVocabularyTerm('10116')\nvocabulary_term_NCBI_TAXONOMY_10116.setDescription('Genbank common name: Norway rat\\ Inherited blast name: rodents')\nvocabulary_term_NCBI_TAXONOMY_10116.setLabel('Rattus norvegicus')\nvocabulary_term_NCBI_TAXONOMY_10116.setOrdinal(6)\nvocabulary_NCBI_TAXONOMY.addTerm(vocabulary_term_NCBI_TAXONOMY_10116)\n \nvocabulary_term_NCBI_TAXONOMY_6669 = tr.createNewVocabularyTerm('6669')\nvocabulary_term_NCBI_TAXONOMY_6669.setDescription('Genbank common name: common water flea\\ Inherited blast name: crustaceans')\nvocabulary_term_NCBI_TAXONOMY_6669.setLabel('Daphnia pulex')\nvocabulary_term_NCBI_TAXONOMY_6669.setOrdinal(7)\nvocabulary_NCBI_TAXONOMY.addTerm(vocabulary_term_NCBI_TAXONOMY_6669)\n \nvocabulary_term_NCBI_TAXONOMY_562 = tr.createNewVocabularyTerm('562')\nvocabulary_term_NCBI_TAXONOMY_562.setDescription('Inherited blast name: enterobacteria')\nvocabulary_term_NCBI_TAXONOMY_562.setLabel('Escherichia coli')\nvocabulary_term_NCBI_TAXONOMY_562.setOrdinal(8)\nvocabulary_NCBI_TAXONOMY.addTerm(vocabulary_term_NCBI_TAXONOMY_562)\n \nvocabulary_term_NCBI_TAXONOMY_623 = tr.createNewVocabularyTerm('623')\nvocabulary_term_NCBI_TAXONOMY_623.setDescription('Inherited blast name: enterobacteria')\nvocabulary_term_NCBI_TAXONOMY_623.setLabel('Shigella flexneri')\nvocabulary_term_NCBI_TAXONOMY_623.setOrdinal(9)\nvocabulary_NCBI_TAXONOMY.addTerm(vocabulary_term_NCBI_TAXONOMY_623)\n \nvocabulary_term_NCBI_TAXONOMY_10847 = tr.createNewVocabularyTerm('10847')\nvocabulary_term_NCBI_TAXONOMY_10847.setDescription('Inherited blast name: viruses')\nvocabulary_term_NCBI_TAXONOMY_10847.setLabel('Enterobacteria phage phiX174')\nvocabulary_term_NCBI_TAXONOMY_10847.setOrdinal(10)\nvocabulary_NCBI_TAXONOMY.addTerm(vocabulary_term_NCBI_TAXONOMY_10847)\n \nvocabulary_term_NCBI_TAXONOMY_190650 = tr.createNewVocabularyTerm('190650')\nvocabulary_term_NCBI_TAXONOMY_190650.setDescription('Inherited blast name: a-proteobacteria')\nvocabulary_term_NCBI_TAXONOMY_190650.setLabel('Caulobacter crescentus CB15')\nvocabulary_term_NCBI_TAXONOMY_190650.setOrdinal(11)\nvocabulary_NCBI_TAXONOMY.addTerm(vocabulary_term_NCBI_TAXONOMY_190650)\n \nvocabulary_term_NCBI_TAXONOMY_8113 = tr.createNewVocabularyTerm('8113')\nvocabulary_term_NCBI_TAXONOMY_8113.setDescription('Genbank common name: cichlids\\ Inherited blast name: bony fishes')\nvocabulary_term_NCBI_TAXONOMY_8113.setLabel('Cichlidae')\nvocabulary_term_NCBI_TAXONOMY_8113.setOrdinal(12)\nvocabulary_NCBI_TAXONOMY.addTerm(vocabulary_term_NCBI_TAXONOMY_8113)\n \nvocabulary_term_NCBI_TAXONOMY_481459 = tr.createNewVocabularyTerm('481459')\nvocabulary_term_NCBI_TAXONOMY_481459.setDescription('Genbank common name: three-spined stickleback\\ Inherited blast name: bony fishes')\nvocabulary_term_NCBI_TAXONOMY_481459.setLabel('Gasterosteus aculeatus aculeatus')\nvocabulary_term_NCBI_TAXONOMY_481459.setOrdinal(13)\nvocabulary_NCBI_TAXONOMY.addTerm(vocabulary_term_NCBI_TAXONOMY_481459)\n \nvocabulary_term_NCBI_TAXONOMY_282301 = tr.createNewVocabularyTerm('282301')\nvocabulary_term_NCBI_TAXONOMY_282301.setDescription('Inherited blast name: flatworms')\nvocabulary_term_NCBI_TAXONOMY_282301.setLabel('Macrostomum lignano')\nvocabulary_term_NCBI_TAXONOMY_282301.setOrdinal(14)\nvocabulary_NCBI_TAXONOMY.addTerm(vocabulary_term_NCBI_TAXONOMY_282301)\n \nvocabulary_term_NCBI_TAXONOMY_99287 = tr.createNewVocabularyTerm('99287')\nvocabulary_term_NCBI_TAXONOMY_99287.setDescription('Inherited blast name: enterobacteria')\nvocabulary_term_NCBI_TAXONOMY_99287.setLabel('Salmonella enterica subsp. enterica serovar Typhimurium str. LT2')\nvocabulary_term_NCBI_TAXONOMY_99287.setOrdinal(15)\nvocabulary_NCBI_TAXONOMY.addTerm(vocabulary_term_NCBI_TAXONOMY_99287)\n \nvocabulary_term_NCBI_TAXONOMY_4896 = tr.createNewVocabularyTerm('4896')\nvocabulary_term_NCBI_TAXONOMY_4896.setDescription('Genbank common name: fission yeast\\ Inherited blast name: ascomycetes')\nvocabulary_term_NCBI_TAXONOMY_4896.setLabel('Schizosaccharomyces pombe')\nvocabulary_term_NCBI_TAXONOMY_4896.setOrdinal(16)\nvocabulary_NCBI_TAXONOMY.addTerm(vocabulary_term_NCBI_TAXONOMY_4896)\n \nvocabulary_term_NCBI_TAXONOMY_4897 = tr.createNewVocabularyTerm('4897')\nvocabulary_term_NCBI_TAXONOMY_4897.setDescription('Inherited blast name: ascomycetes')\nvocabulary_term_NCBI_TAXONOMY_4897.setLabel('Schizosaccharomyces japonicus')\nvocabulary_term_NCBI_TAXONOMY_4897.setOrdinal(17)\nvocabulary_NCBI_TAXONOMY.addTerm(vocabulary_term_NCBI_TAXONOMY_4897)\n \nvocabulary_term_NCBI_TAXONOMY_7955 = tr.createNewVocabularyTerm('7955')\nvocabulary_term_NCBI_TAXONOMY_7955.setDescription('Genbank common name: zebrafish\\ Inherited blast name: bony fishes')\nvocabulary_term_NCBI_TAXONOMY_7955.setLabel('Danio rerio')\nvocabulary_term_NCBI_TAXONOMY_7955.setOrdinal(18)\nvocabulary_NCBI_TAXONOMY.addTerm(vocabulary_term_NCBI_TAXONOMY_7955)\n \nvocabulary_term_NCBI_TAXONOMY_3702 = tr.createNewVocabularyTerm('3702')\nvocabulary_term_NCBI_TAXONOMY_3702.setDescription('Genbank common name: thale cress\\ Inherited blast name: eudicots')\nvocabulary_term_NCBI_TAXONOMY_3702.setLabel('Arabidopsis thaliana')\nvocabulary_term_NCBI_TAXONOMY_3702.setOrdinal(19)\nvocabulary_NCBI_TAXONOMY.addTerm(vocabulary_term_NCBI_TAXONOMY_3702)\n \nvocabulary_term_NCBI_TAXONOMY_225322 = tr.createNewVocabularyTerm('225322')\nvocabulary_term_NCBI_TAXONOMY_225322.setDescription('Bacterium which infects Daphnia\\ Pasteuria ramosa Metchnikoff 1888 (Approved Lists 1980) emend. Starr et al. 1986\\ Ebert D, Rainey P, Embley TM, Scholz D. Development, life\\ cycle, ultrastructure and phylogenetic position of Pasteuria ramosa Metchnikoff 1888: rediscovery of an obligate \\ endoparasite of Daphnia magna Straus. Philos Trans R Soc \\ Lond Ser B. 1996;351:1689.')\nvocabulary_term_NCBI_TAXONOMY_225322.setLabel('Pasteuria ramosa')\nvocabulary_term_NCBI_TAXONOMY_225322.setOrdinal(20)\nvocabulary_NCBI_TAXONOMY.addTerm(vocabulary_term_NCBI_TAXONOMY_225322)\n \nvocabulary_term_NCBI_TAXONOMY_9913 = tr.createNewVocabularyTerm('9913')\nvocabulary_term_NCBI_TAXONOMY_9913.setDescription('Genbank common name: cattle\\ Inherited blast name: even-toed ungulates')\nvocabulary_term_NCBI_TAXONOMY_9913.setLabel('Bos taurus')\nvocabulary_term_NCBI_TAXONOMY_9913.setOrdinal(21)\nvocabulary_NCBI_TAXONOMY.addTerm(vocabulary_term_NCBI_TAXONOMY_9913)\n \nvocabulary_term_NCBI_TAXONOMY_9823 = tr.createNewVocabularyTerm('9823')\nvocabulary_term_NCBI_TAXONOMY_9823.setDescription('Genbank common name: pig\\ Inherited blast name: even-toed ungulates')\nvocabulary_term_NCBI_TAXONOMY_9823.setLabel('Sus scrofa')\nvocabulary_term_NCBI_TAXONOMY_9823.setOrdinal(22)\nvocabulary_NCBI_TAXONOMY.addTerm(vocabulary_term_NCBI_TAXONOMY_9823)\n \nvocabulary_term_NCBI_TAXONOMY_9940 = tr.createNewVocabularyTerm('9940')\nvocabulary_term_NCBI_TAXONOMY_9940.setDescription('Genbank common name: sheep\\ Inherited blast name: even-toed ungulates')\nvocabulary_term_NCBI_TAXONOMY_9940.setLabel('Ovis aries')\nvocabulary_term_NCBI_TAXONOMY_9940.setOrdinal(23)\nvocabulary_NCBI_TAXONOMY.addTerm(vocabulary_term_NCBI_TAXONOMY_9940)\n \nvocabulary_term_NCBI_TAXONOMY_9925 = tr.createNewVocabularyTerm('9925')\nvocabulary_term_NCBI_TAXONOMY_9925.setDescription('Genbank common name: goat\\ Inherited blast name: even-toed ungulates')\nvocabulary_term_NCBI_TAXONOMY_9925.setLabel('Capra hircus')\nvocabulary_term_NCBI_TAXONOMY_9925.setOrdinal(24)\nvocabulary_NCBI_TAXONOMY.addTerm(vocabulary_term_NCBI_TAXONOMY_9925)\n \nvocabulary_term_NCBI_TAXONOMY_8153 = tr.createNewVocabularyTerm('8153')\nvocabulary_term_NCBI_TAXONOMY_8153.setDescription('Common name: cichlid fish')\nvocabulary_term_NCBI_TAXONOMY_8153.setLabel('Haplochromis burtoni')\nvocabulary_term_NCBI_TAXONOMY_8153.setOrdinal(25)\nvocabulary_NCBI_TAXONOMY.addTerm(vocabulary_term_NCBI_TAXONOMY_8153)\n \nvocabulary_term_NCBI_TAXONOMY_61818 = tr.createNewVocabularyTerm('61818')\nvocabulary_term_NCBI_TAXONOMY_61818.setDescription('Common name: bony fish')\nvocabulary_term_NCBI_TAXONOMY_61818.setLabel('Amphilophus (nicaraguan)')\nvocabulary_term_NCBI_TAXONOMY_61818.setOrdinal(26)\nvocabulary_NCBI_TAXONOMY.addTerm(vocabulary_term_NCBI_TAXONOMY_61818)\n \nvocabulary_term_NCBI_TAXONOMY_35525 = tr.createNewVocabularyTerm('35525')\nvocabulary_term_NCBI_TAXONOMY_35525.setDescription('Common name: water flea')\nvocabulary_term_NCBI_TAXONOMY_35525.setLabel('Daphnia Magna')\nvocabulary_term_NCBI_TAXONOMY_35525.setOrdinal(27)\nvocabulary_NCBI_TAXONOMY.addTerm(vocabulary_term_NCBI_TAXONOMY_35525)\n \nvocabulary_term_NCBI_TAXONOMY_4081 = tr.createNewVocabularyTerm('4081')\nvocabulary_term_NCBI_TAXONOMY_4081.setDescription('Common Name: tomato')\nvocabulary_term_NCBI_TAXONOMY_4081.setLabel('Solanum lycopersicum (tomato)')\nvocabulary_term_NCBI_TAXONOMY_4081.setOrdinal(28)\nvocabulary_NCBI_TAXONOMY.addTerm(vocabulary_term_NCBI_TAXONOMY_4081)\n \nvocabulary_term_NCBI_TAXONOMY_13068 = tr.createNewVocabularyTerm('13068')\nvocabulary_term_NCBI_TAXONOMY_13068.setDescription('Common name: earwig')\nvocabulary_term_NCBI_TAXONOMY_13068.setLabel('Forficula auricularia (earwig)')\nvocabulary_term_NCBI_TAXONOMY_13068.setOrdinal(29)\nvocabulary_NCBI_TAXONOMY.addTerm(vocabulary_term_NCBI_TAXONOMY_13068)\n \nvocabulary_term_NCBI_TAXONOMY_3569 = tr.createNewVocabularyTerm('3569')\nvocabulary_term_NCBI_TAXONOMY_3569.setDescription('Genbank common name: clove pink')\nvocabulary_term_NCBI_TAXONOMY_3569.setLabel('Dianthus')\nvocabulary_term_NCBI_TAXONOMY_3569.setOrdinal(30)\nvocabulary_NCBI_TAXONOMY.addTerm(vocabulary_term_NCBI_TAXONOMY_3569)\n \nvocabulary_term_NCBI_TAXONOMY_3573 = tr.createNewVocabularyTerm('3573')\nvocabulary_term_NCBI_TAXONOMY_3573.setDescription('Genbank common name: campions\\ Inherited blast name: eudicots')\nvocabulary_term_NCBI_TAXONOMY_3573.setLabel('Silene')\nvocabulary_term_NCBI_TAXONOMY_3573.setOrdinal(31)\nvocabulary_NCBI_TAXONOMY.addTerm(vocabulary_term_NCBI_TAXONOMY_3573)\n \nvocabulary_term_NCBI_TAXONOMY_32644 = tr.createNewVocabularyTerm('32644')\nvocabulary_term_NCBI_TAXONOMY_32644.setDescription('Inherited blast name: unclassified')\nvocabulary_term_NCBI_TAXONOMY_32644.setLabel('unidentified')\nvocabulary_term_NCBI_TAXONOMY_32644.setOrdinal(32)\nvocabulary_NCBI_TAXONOMY.addTerm(vocabulary_term_NCBI_TAXONOMY_32644)\n \nvocabulary_term_NCBI_TAXONOMY_0000 = tr.createNewVocabularyTerm('0000')\nvocabulary_term_NCBI_TAXONOMY_0000.setDescription(None)\nvocabulary_term_NCBI_TAXONOMY_0000.setLabel('OTHER')\nvocabulary_term_NCBI_TAXONOMY_0000.setOrdinal(33)\nvocabulary_NCBI_TAXONOMY.addTerm(vocabulary_term_NCBI_TAXONOMY_0000)\n \nvocabulary_PIPELINE_VERSION = tr.getOrCreateNewVocabulary('PIPELINE_VERSION')\nvocabulary_PIPELINE_VERSION.setDescription('With which pipeline version has the data been analyzed?')\nvocabulary_PIPELINE_VERSION.setUrlTemplate(None)\nvocabulary_PIPELINE_VERSION.setManagedInternally(False)\nvocabulary_PIPELINE_VERSION.setInternalNamespace(False)\nvocabulary_PIPELINE_VERSION.setChosenFromList(True)\n \nvocabulary_term_PIPELINE_VERSION_11348 = tr.createNewVocabularyTerm('1.13.48')\nvocabulary_term_PIPELINE_VERSION_11348.setDescription(None)\nvocabulary_term_PIPELINE_VERSION_11348.setLabel('RTA 1.13.48')\nvocabulary_term_PIPELINE_VERSION_11348.setOrdinal(1)\nvocabulary_PIPELINE_VERSION.addTerm(vocabulary_term_PIPELINE_VERSION_11348)\n \nvocabulary_term_PIPELINE_VERSION_11242 = tr.createNewVocabularyTerm('1.12.4.2')\nvocabulary_term_PIPELINE_VERSION_11242.setDescription('Real Time Analysis in combination with HCS 1.4.8')\nvocabulary_term_PIPELINE_VERSION_11242.setLabel('RTA 1.12.4.2 (HiSeq 2000)')\nvocabulary_term_PIPELINE_VERSION_11242.setOrdinal(2)\nvocabulary_PIPELINE_VERSION.addTerm(vocabulary_term_PIPELINE_VERSION_11242)\n \nvocabulary_term_PIPELINE_VERSION_112 = tr.createNewVocabularyTerm('1.12')\nvocabulary_term_PIPELINE_VERSION_112.setDescription('Real Time Analysis 1.12 HiSeq 2000')\nvocabulary_term_PIPELINE_VERSION_112.setLabel('RTA 1.12')\nvocabulary_term_PIPELINE_VERSION_112.setOrdinal(3)\nvocabulary_PIPELINE_VERSION.addTerm(vocabulary_term_PIPELINE_VERSION_112)\n \nvocabulary_term_PIPELINE_VERSION_19 = tr.createNewVocabularyTerm('1.9')\nvocabulary_term_PIPELINE_VERSION_19.setDescription('Real Time Analysis 1.9')\nvocabulary_term_PIPELINE_VERSION_19.setLabel('RTA 1.9 (GA IIx)')\nvocabulary_term_PIPELINE_VERSION_19.setOrdinal(4)\nvocabulary_PIPELINE_VERSION.addTerm(vocabulary_term_PIPELINE_VERSION_19)\n \nvocabulary_term_PIPELINE_VERSION_RTA_18 = tr.createNewVocabularyTerm('RTA_1.8')\nvocabulary_term_PIPELINE_VERSION_RTA_18.setDescription('Real Time Analysis 1.8')\nvocabulary_term_PIPELINE_VERSION_RTA_18.setLabel('RTA 1.8')\nvocabulary_term_PIPELINE_VERSION_RTA_18.setOrdinal(5)\nvocabulary_PIPELINE_VERSION.addTerm(vocabulary_term_PIPELINE_VERSION_RTA_18)\n \nvocabulary_term_PIPELINE_VERSION_RTA_16 = tr.createNewVocabularyTerm('RTA_1.6')\nvocabulary_term_PIPELINE_VERSION_RTA_16.setDescription('Real Time Analysis 1.6')\nvocabulary_term_PIPELINE_VERSION_RTA_16.setLabel('RTA 1.6')\nvocabulary_term_PIPELINE_VERSION_RTA_16.setOrdinal(6)\nvocabulary_PIPELINE_VERSION.addTerm(vocabulary_term_PIPELINE_VERSION_RTA_16)\n \nvocabulary_term_PIPELINE_VERSION_RTA_15 = tr.createNewVocabularyTerm('RTA_1.5')\nvocabulary_term_PIPELINE_VERSION_RTA_15.setDescription(None)\nvocabulary_term_PIPELINE_VERSION_RTA_15.setLabel('RTA 1.5')\nvocabulary_term_PIPELINE_VERSION_RTA_15.setOrdinal(7)\nvocabulary_PIPELINE_VERSION.addTerm(vocabulary_term_PIPELINE_VERSION_RTA_15)\n \nvocabulary_term_PIPELINE_VERSION_RTA_14150 = tr.createNewVocabularyTerm('RTA_1.4.15.0')\nvocabulary_term_PIPELINE_VERSION_RTA_14150.setDescription(None)\nvocabulary_term_PIPELINE_VERSION_RTA_14150.setLabel('RTA 1.4.15.0')\nvocabulary_term_PIPELINE_VERSION_RTA_14150.setOrdinal(8)\nvocabulary_PIPELINE_VERSION.addTerm(vocabulary_term_PIPELINE_VERSION_RTA_14150)\n \nvocabulary_term_PIPELINE_VERSION_15 = tr.createNewVocabularyTerm('1.5')\nvocabulary_term_PIPELINE_VERSION_15.setDescription(None)\nvocabulary_term_PIPELINE_VERSION_15.setLabel(None)\nvocabulary_term_PIPELINE_VERSION_15.setOrdinal(9)\nvocabulary_PIPELINE_VERSION.addTerm(vocabulary_term_PIPELINE_VERSION_15)\n \nvocabulary_term_PIPELINE_VERSION_14 = tr.createNewVocabularyTerm('1.4')\nvocabulary_term_PIPELINE_VERSION_14.setDescription(None)\nvocabulary_term_PIPELINE_VERSION_14.setLabel(None)\nvocabulary_term_PIPELINE_VERSION_14.setOrdinal(10)\nvocabulary_PIPELINE_VERSION.addTerm(vocabulary_term_PIPELINE_VERSION_14)\n \nvocabulary_term_PIPELINE_VERSION_132 = tr.createNewVocabularyTerm('1.3.2')\nvocabulary_term_PIPELINE_VERSION_132.setDescription(None)\nvocabulary_term_PIPELINE_VERSION_132.setLabel(None)\nvocabulary_term_PIPELINE_VERSION_132.setOrdinal(11)\nvocabulary_PIPELINE_VERSION.addTerm(vocabulary_term_PIPELINE_VERSION_132)\n \nvocabulary_term_PIPELINE_VERSION_10 = tr.createNewVocabularyTerm('1.0')\nvocabulary_term_PIPELINE_VERSION_10.setDescription(None)\nvocabulary_term_PIPELINE_VERSION_10.setLabel(None)\nvocabulary_term_PIPELINE_VERSION_10.setOrdinal(12)\nvocabulary_PIPELINE_VERSION.addTerm(vocabulary_term_PIPELINE_VERSION_10)\n \nvocabulary_term_PIPELINE_VERSION_PRE_10 = tr.createNewVocabularyTerm('PRE_1.0')\nvocabulary_term_PIPELINE_VERSION_PRE_10.setDescription('Before Pipeline Version 1.0')\nvocabulary_term_PIPELINE_VERSION_PRE_10.setLabel(None)\nvocabulary_term_PIPELINE_VERSION_PRE_10.setOrdinal(13)\nvocabulary_PIPELINE_VERSION.addTerm(vocabulary_term_PIPELINE_VERSION_PRE_10)\n \nvocabulary_term_PIPELINE_VERSION_NONE = tr.createNewVocabularyTerm('NONE')\nvocabulary_term_PIPELINE_VERSION_NONE.setDescription(None)\nvocabulary_term_PIPELINE_VERSION_NONE.setLabel(None)\nvocabulary_term_PIPELINE_VERSION_NONE.setOrdinal(14)\nvocabulary_PIPELINE_VERSION.addTerm(vocabulary_term_PIPELINE_VERSION_NONE)\n \nvocabulary_SAMPLE_TYPE = tr.getOrCreateNewVocabulary('SAMPLE_TYPE')\nvocabulary_SAMPLE_TYPE.setDescription('Type of sample delivered by the customer')\nvocabulary_SAMPLE_TYPE.setUrlTemplate(None)\nvocabulary_SAMPLE_TYPE.setManagedInternally(False)\nvocabulary_SAMPLE_TYPE.setInternalNamespace(False)\nvocabulary_SAMPLE_TYPE.setChosenFromList(True)\n \nvocabulary_term_SAMPLE_TYPE_PROCESSED_DNA_LIBRARY = tr.createNewVocabularyTerm('PROCESSED_DNA_LIBRARY')\nvocabulary_term_SAMPLE_TYPE_PROCESSED_DNA_LIBRARY.setDescription(None)\nvocabulary_term_SAMPLE_TYPE_PROCESSED_DNA_LIBRARY.setLabel(None)\nvocabulary_term_SAMPLE_TYPE_PROCESSED_DNA_LIBRARY.setOrdinal(1)\nvocabulary_SAMPLE_TYPE.addTerm(vocabulary_term_SAMPLE_TYPE_PROCESSED_DNA_LIBRARY)\n \nvocabulary_term_SAMPLE_TYPE_POOLED_SAMPLE = tr.createNewVocabularyTerm('POOLED_SAMPLE')\nvocabulary_term_SAMPLE_TYPE_POOLED_SAMPLE.setDescription(None)\nvocabulary_term_SAMPLE_TYPE_POOLED_SAMPLE.setLabel(None)\nvocabulary_term_SAMPLE_TYPE_POOLED_SAMPLE.setOrdinal(2)\nvocabulary_SAMPLE_TYPE.addTerm(vocabulary_term_SAMPLE_TYPE_POOLED_SAMPLE)\n \nvocabulary_term_SAMPLE_TYPE_GENOMIC_DNA = tr.createNewVocabularyTerm('GENOMIC_DNA')\nvocabulary_term_SAMPLE_TYPE_GENOMIC_DNA.setDescription(None)\nvocabulary_term_SAMPLE_TYPE_GENOMIC_DNA.setLabel(None)\nvocabulary_term_SAMPLE_TYPE_GENOMIC_DNA.setOrdinal(3)\nvocabulary_SAMPLE_TYPE.addTerm(vocabulary_term_SAMPLE_TYPE_GENOMIC_DNA)\n \nvocabulary_term_SAMPLE_TYPE_SMALL_RNA = tr.createNewVocabularyTerm('SMALL_RNA')\nvocabulary_term_SAMPLE_TYPE_SMALL_RNA.setDescription(None)\nvocabulary_term_SAMPLE_TYPE_SMALL_RNA.setLabel(None)\nvocabulary_term_SAMPLE_TYPE_SMALL_RNA.setOrdinal(4)\nvocabulary_SAMPLE_TYPE.addTerm(vocabulary_term_SAMPLE_TYPE_SMALL_RNA)\n \nvocabulary_term_SAMPLE_TYPE_TOTAL_RNA = tr.createNewVocabularyTerm('TOTAL_RNA')\nvocabulary_term_SAMPLE_TYPE_TOTAL_RNA.setDescription(None)\nvocabulary_term_SAMPLE_TYPE_TOTAL_RNA.setLabel(None)\nvocabulary_term_SAMPLE_TYPE_TOTAL_RNA.setOrdinal(5)\nvocabulary_SAMPLE_TYPE.addTerm(vocabulary_term_SAMPLE_TYPE_TOTAL_RNA)\n \nvocabulary_term_SAMPLE_TYPE_CHIP = tr.createNewVocabularyTerm('CHIP')\nvocabulary_term_SAMPLE_TYPE_CHIP.setDescription(None)\nvocabulary_term_SAMPLE_TYPE_CHIP.setLabel(None)\nvocabulary_term_SAMPLE_TYPE_CHIP.setOrdinal(6)\nvocabulary_SAMPLE_TYPE.addTerm(vocabulary_term_SAMPLE_TYPE_CHIP)\n \nvocabulary_term_SAMPLE_TYPE_VIRAL = tr.createNewVocabularyTerm('VIRAL')\nvocabulary_term_SAMPLE_TYPE_VIRAL.setDescription(None)\nvocabulary_term_SAMPLE_TYPE_VIRAL.setLabel(None)\nvocabulary_term_SAMPLE_TYPE_VIRAL.setOrdinal(7)\nvocabulary_SAMPLE_TYPE.addTerm(vocabulary_term_SAMPLE_TYPE_VIRAL)\n \nvocabulary_term_SAMPLE_TYPE_SYNTHETIC = tr.createNewVocabularyTerm('SYNTHETIC')\nvocabulary_term_SAMPLE_TYPE_SYNTHETIC.setDescription(None)\nvocabulary_term_SAMPLE_TYPE_SYNTHETIC.setLabel(None)\nvocabulary_term_SAMPLE_TYPE_SYNTHETIC.setOrdinal(8)\nvocabulary_SAMPLE_TYPE.addTerm(vocabulary_term_SAMPLE_TYPE_SYNTHETIC)\n \nvocabulary_term_SAMPLE_TYPE_FRAGMENTED_GENOMIC_DNA = tr.createNewVocabularyTerm('FRAGMENTED_GENOMIC_DNA')\nvocabulary_term_SAMPLE_TYPE_FRAGMENTED_GENOMIC_DNA.setDescription(None)\nvocabulary_term_SAMPLE_TYPE_FRAGMENTED_GENOMIC_DNA.setLabel(None)\nvocabulary_term_SAMPLE_TYPE_FRAGMENTED_GENOMIC_DNA.setOrdinal(9)\nvocabulary_SAMPLE_TYPE.addTerm(vocabulary_term_SAMPLE_TYPE_FRAGMENTED_GENOMIC_DNA)\n \nvocabulary_term_SAMPLE_TYPE_MRNA = tr.createNewVocabularyTerm('MRNA')\nvocabulary_term_SAMPLE_TYPE_MRNA.setDescription(None)\nvocabulary_term_SAMPLE_TYPE_MRNA.setLabel(None)\nvocabulary_term_SAMPLE_TYPE_MRNA.setOrdinal(10)\nvocabulary_SAMPLE_TYPE.addTerm(vocabulary_term_SAMPLE_TYPE_MRNA)\n \nvocabulary_term_SAMPLE_TYPE_OTHER = tr.createNewVocabularyTerm('OTHER')\nvocabulary_term_SAMPLE_TYPE_OTHER.setDescription(None)\nvocabulary_term_SAMPLE_TYPE_OTHER.setLabel(None)\nvocabulary_term_SAMPLE_TYPE_OTHER.setOrdinal(11)\nvocabulary_SAMPLE_TYPE.addTerm(vocabulary_term_SAMPLE_TYPE_OTHER)\n \nvocabulary_term_SAMPLE_TYPE_BISULFITE_CHIP = tr.createNewVocabularyTerm('BISULFITE_CHIP')\nvocabulary_term_SAMPLE_TYPE_BISULFITE_CHIP.setDescription(None)\nvocabulary_term_SAMPLE_TYPE_BISULFITE_CHIP.setLabel(None)\nvocabulary_term_SAMPLE_TYPE_BISULFITE_CHIP.setOrdinal(13)\nvocabulary_SAMPLE_TYPE.addTerm(vocabulary_term_SAMPLE_TYPE_BISULFITE_CHIP)\n \nvocabulary_term_SAMPLE_TYPE_NONGENOMIC = tr.createNewVocabularyTerm('NON-GENOMIC')\nvocabulary_term_SAMPLE_TYPE_NONGENOMIC.setDescription(None)\nvocabulary_term_SAMPLE_TYPE_NONGENOMIC.setLabel(None)\nvocabulary_term_SAMPLE_TYPE_NONGENOMIC.setOrdinal(14)\nvocabulary_SAMPLE_TYPE.addTerm(vocabulary_term_SAMPLE_TYPE_NONGENOMIC)\n \nvocabulary_term_SAMPLE_TYPE_BISULFITE_TREATED = tr.createNewVocabularyTerm('BISULFITE_TREATED')\nvocabulary_term_SAMPLE_TYPE_BISULFITE_TREATED.setDescription(None)\nvocabulary_term_SAMPLE_TYPE_BISULFITE_TREATED.setLabel(None)\nvocabulary_term_SAMPLE_TYPE_BISULFITE_TREATED.setOrdinal(15)\nvocabulary_SAMPLE_TYPE.addTerm(vocabulary_term_SAMPLE_TYPE_BISULFITE_TREATED)\n \nvocabulary_SBS_SEQUENCING_KIT_VERSION = tr.getOrCreateNewVocabulary('SBS_SEQUENCING_KIT_VERSION')\nvocabulary_SBS_SEQUENCING_KIT_VERSION.setDescription('Version of the Sequencing by Synthesis (SBS) Kit')\nvocabulary_SBS_SEQUENCING_KIT_VERSION.setUrlTemplate(None)\nvocabulary_SBS_SEQUENCING_KIT_VERSION.setManagedInternally(False)\nvocabulary_SBS_SEQUENCING_KIT_VERSION.setInternalNamespace(False)\nvocabulary_SBS_SEQUENCING_KIT_VERSION.setChosenFromList(True)\n \nvocabulary_term_SBS_SEQUENCING_KIT_VERSION_TRUSEQ_V5 = tr.createNewVocabularyTerm('TRUSEQ_V5')\nvocabulary_term_SBS_SEQUENCING_KIT_VERSION_TRUSEQ_V5.setDescription(None)\nvocabulary_term_SBS_SEQUENCING_KIT_VERSION_TRUSEQ_V5.setLabel('TruSeq v5')\nvocabulary_term_SBS_SEQUENCING_KIT_VERSION_TRUSEQ_V5.setOrdinal(1)\nvocabulary_SBS_SEQUENCING_KIT_VERSION.addTerm(vocabulary_term_SBS_SEQUENCING_KIT_VERSION_TRUSEQ_V5)\n \nvocabulary_term_SBS_SEQUENCING_KIT_VERSION_V5 = tr.createNewVocabularyTerm('V5')\nvocabulary_term_SBS_SEQUENCING_KIT_VERSION_V5.setDescription(None)\nvocabulary_term_SBS_SEQUENCING_KIT_VERSION_V5.setLabel(None)\nvocabulary_term_SBS_SEQUENCING_KIT_VERSION_V5.setOrdinal(2)\nvocabulary_SBS_SEQUENCING_KIT_VERSION.addTerm(vocabulary_term_SBS_SEQUENCING_KIT_VERSION_V5)\n \nvocabulary_term_SBS_SEQUENCING_KIT_VERSION_V4 = tr.createNewVocabularyTerm('V4')\nvocabulary_term_SBS_SEQUENCING_KIT_VERSION_V4.setDescription(None)\nvocabulary_term_SBS_SEQUENCING_KIT_VERSION_V4.setLabel(None)\nvocabulary_term_SBS_SEQUENCING_KIT_VERSION_V4.setOrdinal(3)\nvocabulary_SBS_SEQUENCING_KIT_VERSION.addTerm(vocabulary_term_SBS_SEQUENCING_KIT_VERSION_V4)\n \nvocabulary_term_SBS_SEQUENCING_KIT_VERSION_V3 = tr.createNewVocabularyTerm('V3')\nvocabulary_term_SBS_SEQUENCING_KIT_VERSION_V3.setDescription(None)\nvocabulary_term_SBS_SEQUENCING_KIT_VERSION_V3.setLabel(None)\nvocabulary_term_SBS_SEQUENCING_KIT_VERSION_V3.setOrdinal(4)\nvocabulary_SBS_SEQUENCING_KIT_VERSION.addTerm(vocabulary_term_SBS_SEQUENCING_KIT_VERSION_V3)\n \nvocabulary_term_SBS_SEQUENCING_KIT_VERSION_SBS_HS_V3 = tr.createNewVocabularyTerm('SBS_HS_V3')\nvocabulary_term_SBS_SEQUENCING_KIT_VERSION_SBS_HS_V3.setDescription(None)\nvocabulary_term_SBS_SEQUENCING_KIT_VERSION_SBS_HS_V3.setLabel('TruSeq SBS HS v3')\nvocabulary_term_SBS_SEQUENCING_KIT_VERSION_SBS_HS_V3.setOrdinal(5)\nvocabulary_SBS_SEQUENCING_KIT_VERSION.addTerm(vocabulary_term_SBS_SEQUENCING_KIT_VERSION_SBS_HS_V3)\n \nvocabulary_SEQUENCER = tr.getOrCreateNewVocabulary('SEQUENCER')\nvocabulary_SEQUENCER.setDescription('Which Sequencer was used?')\nvocabulary_SEQUENCER.setUrlTemplate(None)\nvocabulary_SEQUENCER.setManagedInternally(False)\nvocabulary_SEQUENCER.setInternalNamespace(False)\nvocabulary_SEQUENCER.setChosenFromList(True)\n \nvocabulary_term_SEQUENCER_M00721 = tr.createNewVocabularyTerm('M00721')\nvocabulary_term_SEQUENCER_M00721.setDescription(None)\nvocabulary_term_SEQUENCER_M00721.setLabel('MiSeq')\nvocabulary_term_SEQUENCER_M00721.setOrdinal(6)\nvocabulary_SEQUENCER.addTerm(vocabulary_term_SEQUENCER_M00721)\n \nvocabulary_term_SEQUENCER_SN792 = tr.createNewVocabularyTerm('SN792')\nvocabulary_term_SEQUENCER_SN792.setDescription(None)\nvocabulary_term_SEQUENCER_SN792.setLabel('HiSeq 2000')\nvocabulary_term_SEQUENCER_SN792.setOrdinal(7)\nvocabulary_SEQUENCER.addTerm(vocabulary_term_SEQUENCER_SN792)\n \nvocabulary_SEQUENCING_APPLICATION = tr.getOrCreateNewVocabulary('SEQUENCING_APPLICATION')\nvocabulary_SEQUENCING_APPLICATION.setDescription('Type of experiment of the High Throughput Sequencing applications')\nvocabulary_SEQUENCING_APPLICATION.setUrlTemplate(None)\nvocabulary_SEQUENCING_APPLICATION.setManagedInternally(False)\nvocabulary_SEQUENCING_APPLICATION.setInternalNamespace(False)\nvocabulary_SEQUENCING_APPLICATION.setChosenFromList(True)\n \nvocabulary_term_SEQUENCING_APPLICATION_SMALL_RNA_SEQ = tr.createNewVocabularyTerm('SMALL_RNA_SEQ')\nvocabulary_term_SEQUENCING_APPLICATION_SMALL_RNA_SEQ.setDescription(None)\nvocabulary_term_SEQUENCING_APPLICATION_SMALL_RNA_SEQ.setLabel(None)\nvocabulary_term_SEQUENCING_APPLICATION_SMALL_RNA_SEQ.setOrdinal(1)\nvocabulary_SEQUENCING_APPLICATION.addTerm(vocabulary_term_SEQUENCING_APPLICATION_SMALL_RNA_SEQ)\n \nvocabulary_term_SEQUENCING_APPLICATION_RNA_SEQ = tr.createNewVocabularyTerm('RNA_SEQ')\nvocabulary_term_SEQUENCING_APPLICATION_RNA_SEQ.setDescription(None)\nvocabulary_term_SEQUENCING_APPLICATION_RNA_SEQ.setLabel(None)\nvocabulary_term_SEQUENCING_APPLICATION_RNA_SEQ.setOrdinal(2)\nvocabulary_SEQUENCING_APPLICATION.addTerm(vocabulary_term_SEQUENCING_APPLICATION_RNA_SEQ)\n \nvocabulary_term_SEQUENCING_APPLICATION_GENOMIC_DNA_SEQ = tr.createNewVocabularyTerm('GENOMIC_DNA_SEQ')\nvocabulary_term_SEQUENCING_APPLICATION_GENOMIC_DNA_SEQ.setDescription(None)\nvocabulary_term_SEQUENCING_APPLICATION_GENOMIC_DNA_SEQ.setLabel(None)\nvocabulary_term_SEQUENCING_APPLICATION_GENOMIC_DNA_SEQ.setOrdinal(3)\nvocabulary_SEQUENCING_APPLICATION.addTerm(vocabulary_term_SEQUENCING_APPLICATION_GENOMIC_DNA_SEQ)\n \nvocabulary_term_SEQUENCING_APPLICATION_CHIP_SEQ = tr.createNewVocabularyTerm('CHIP_SEQ')\nvocabulary_term_SEQUENCING_APPLICATION_CHIP_SEQ.setDescription(None)\nvocabulary_term_SEQUENCING_APPLICATION_CHIP_SEQ.setLabel(None)\nvocabulary_term_SEQUENCING_APPLICATION_CHIP_SEQ.setOrdinal(4)\nvocabulary_SEQUENCING_APPLICATION.addTerm(vocabulary_term_SEQUENCING_APPLICATION_CHIP_SEQ)\n \nvocabulary_YES_NO = tr.getOrCreateNewVocabulary('YES_NO')\nvocabulary_YES_NO.setDescription('Just offers YES or NO')\nvocabulary_YES_NO.setUrlTemplate(None)\nvocabulary_YES_NO.setManagedInternally(False)\nvocabulary_YES_NO.setInternalNamespace(False)\nvocabulary_YES_NO.setChosenFromList(True)\n \nvocabulary_term_YES_NO_YES = tr.createNewVocabularyTerm('YES')\nvocabulary_term_YES_NO_YES.setDescription(None)\nvocabulary_term_YES_NO_YES.setLabel(None)\nvocabulary_term_YES_NO_YES.setOrdinal(1)\nvocabulary_YES_NO.addTerm(vocabulary_term_YES_NO_YES)\n \nvocabulary_term_YES_NO_NO = tr.createNewVocabularyTerm('NO')\nvocabulary_term_YES_NO_NO.setDescription(None)\nvocabulary_term_YES_NO_NO.setLabel(None)\nvocabulary_term_YES_NO_NO.setOrdinal(2)\nvocabulary_YES_NO.addTerm(vocabulary_term_YES_NO_NO)\n\nprint "Imported 22 Vocabularies" \nscript_Diff_time = tr.getOrCreateNewScript('Diff_time')\nscript_Diff_time.setName('Diff_time')\nscript_Diff_time.setDescription('Calculates the difference of two given dates')\nscript_Diff_time.setScript('''from datetime import datetime\n\ndef dateTimeSplitter(openbisDate):\n dateAndTime, tz = openbisDate.rsplit(" ", 1)\n pythonDateTime = datetime.strptime(dateAndTime, "%Y-%m-%d %H:%M:%S") \n return pythonDateTime\n\ndef calculate():\n \n try:\n start = dateTimeSplitter(entity.propertyValue('FLOW_CELL_SEQUENCED_ON'))\n end = dateTimeSplitter(entity.propertyValue('SEQUENCER_FINISHED'))\n diffTime = end-start\n return str(diffTime)\n except:\n return "N/A"\n''')\nscript_Diff_time.setEntityForScript('SAMPLE')\nscript_Diff_time.setScriptType('DYNAMIC_PROPERTY')\n\nscript_Has_Parents = tr.getOrCreateNewScript('Has_Parents')\nscript_Has_Parents.setName('Has_Parents')\nscript_Has_Parents.setDescription('Check if the Entity has a parent')\nscript_Has_Parents.setScript('''def validate(entity, isNew):\n parents = entity.entityPE().parents\n if parents:\n return None\n else:\n return "No Parents have been selected!"\n''')\nscript_Has_Parents.setEntityForScript('SAMPLE')\nscript_Has_Parents.setScriptType('ENTITY_VALIDATION')\n\nprint "Imported 2 Scripts" \nexp_type_HT_SEQUENCING = tr.getOrCreateNewExperimentType('HT_SEQUENCING')\nexp_type_HT_SEQUENCING.setDescription('High Throughput Sequencing (e.g. Illumina HiSeq, Illumina GA)')\n\n\nprint "Imported 1 Experiment Types" \nsamp_type_ILLUMINA_FLOW_CELL = tr.getOrCreateNewSampleType('ILLUMINA_FLOW_CELL')\nsamp_type_ILLUMINA_FLOW_CELL.setDescription('Container of ILLUMINA_FLOW_LANES\\ Can be created automatically by a drop box and the properties can be filled from the RunInfo.xml and runParameters.xml files')\nsamp_type_ILLUMINA_FLOW_CELL.setListable(True)\nsamp_type_ILLUMINA_FLOW_CELL.setShowContainer(False)\nsamp_type_ILLUMINA_FLOW_CELL.setShowParents(False)\nsamp_type_ILLUMINA_FLOW_CELL.setSubcodeUnique(False)\nsamp_type_ILLUMINA_FLOW_CELL.setAutoGeneratedCode(False)\nsamp_type_ILLUMINA_FLOW_CELL.setShowParentMetadata(False)\nsamp_type_ILLUMINA_FLOW_CELL.setGeneratedCodePrefix('FLOWCELL-')\n\n\nsamp_type_ILLUMINA_FLOW_LANE = tr.getOrCreateNewSampleType('ILLUMINA_FLOW_LANE')\nsamp_type_ILLUMINA_FLOW_LANE.setDescription('Child of LIBRARY or POOL')\nsamp_type_ILLUMINA_FLOW_LANE.setListable(True)\nsamp_type_ILLUMINA_FLOW_LANE.setShowContainer(True)\nsamp_type_ILLUMINA_FLOW_LANE.setShowParents(True)\nsamp_type_ILLUMINA_FLOW_LANE.setSubcodeUnique(False)\nsamp_type_ILLUMINA_FLOW_LANE.setAutoGeneratedCode(False)\nsamp_type_ILLUMINA_FLOW_LANE.setShowParentMetadata(True)\nsamp_type_ILLUMINA_FLOW_LANE.setGeneratedCodePrefix('FLOWLANE-')\n\n\nsamp_type_LIBRARY = tr.getOrCreateNewSampleType('LIBRARY')\nsamp_type_LIBRARY.setDescription('Child of RAW and potential parent of POOL')\nsamp_type_LIBRARY.setListable(True)\nsamp_type_LIBRARY.setShowContainer(False)\nsamp_type_LIBRARY.setShowParents(True)\nsamp_type_LIBRARY.setSubcodeUnique(False)\nsamp_type_LIBRARY.setAutoGeneratedCode(True)\nsamp_type_LIBRARY.setShowParentMetadata(True)\nsamp_type_LIBRARY.setGeneratedCodePrefix('BSSE-QGF-LIBRARY-')\nsamp_type_LIBRARY.setValidationScript(script_Has_Parents)\n\nsamp_type_LIBRARY_POOL = tr.getOrCreateNewSampleType('LIBRARY_POOL')\nsamp_type_LIBRARY_POOL.setDescription('Child of several LIBRARY samples, used for multiplexing')\nsamp_type_LIBRARY_POOL.setListable(True)\nsamp_type_LIBRARY_POOL.setShowContainer(False)\nsamp_type_LIBRARY_POOL.setShowParents(True)\nsamp_type_LIBRARY_POOL.setSubcodeUnique(False)\nsamp_type_LIBRARY_POOL.setAutoGeneratedCode(True)\nsamp_type_LIBRARY_POOL.setShowParentMetadata(True)\nsamp_type_LIBRARY_POOL.setGeneratedCodePrefix('BSSE-QGF-POOL-')\nsamp_type_LIBRARY_POOL.setValidationScript(script_Has_Parents)\n\nsamp_type_MASTER_SAMPLE = tr.getOrCreateNewSampleType('MASTER_SAMPLE')\nsamp_type_MASTER_SAMPLE.setDescription('Sample Type holding Master Data and a parent to RAW')\nsamp_type_MASTER_SAMPLE.setListable(True)\nsamp_type_MASTER_SAMPLE.setShowContainer(False)\nsamp_type_MASTER_SAMPLE.setShowParents(False)\nsamp_type_MASTER_SAMPLE.setSubcodeUnique(False)\nsamp_type_MASTER_SAMPLE.setAutoGeneratedCode(True)\nsamp_type_MASTER_SAMPLE.setShowParentMetadata(False)\nsamp_type_MASTER_SAMPLE.setGeneratedCodePrefix('BSSE-QGF-MASTER-')\n\n\nsamp_type_RAW_SAMPLE = tr.getOrCreateNewSampleType('RAW_SAMPLE')\nsamp_type_RAW_SAMPLE.setDescription('Child of MASTER')\nsamp_type_RAW_SAMPLE.setListable(True)\nsamp_type_RAW_SAMPLE.setShowContainer(False)\nsamp_type_RAW_SAMPLE.setShowParents(True)\nsamp_type_RAW_SAMPLE.setSubcodeUnique(False)\nsamp_type_RAW_SAMPLE.setAutoGeneratedCode(True)\nsamp_type_RAW_SAMPLE.setShowParentMetadata(True)\nsamp_type_RAW_SAMPLE.setGeneratedCodePrefix('BSSE-QGF-RAW-')\nsamp_type_RAW_SAMPLE.setValidationScript(script_Has_Parents)\n\nprint "Imported 6 Sample Types" \ndata_set_type_ALIGNMENT = tr.getOrCreateNewDataSetType('ALIGNMENT')\ndata_set_type_ALIGNMENT.setDescription('Aligner ouput, ideally bam/sam')\ndata_set_type_ALIGNMENT.setDataSetKind('PHYSICAL')\ndata_set_type_ALIGNMENT.setMainDataSetPattern(None)\ndata_set_type_ALIGNMENT.setMainDataSetPath(None)\ndata_set_type_ALIGNMENT.setDeletionDisallowed(False)\n\n\ndata_set_type_BASECALL_STATS = tr.getOrCreateNewDataSetType('BASECALL_STATS')\ndata_set_type_BASECALL_STATS.setDescription('Base Call Statistics from the Illumina Pipeline (configureBclToFastq.pl)')\ndata_set_type_BASECALL_STATS.setDataSetKind('PHYSICAL')\ndata_set_type_BASECALL_STATS.setMainDataSetPattern('original/.*/.*/Demultiplex_Stats.htm')\ndata_set_type_BASECALL_STATS.setMainDataSetPath(None)\ndata_set_type_BASECALL_STATS.setDeletionDisallowed(False)\n\n\ndata_set_type_BIGWIGGLE = tr.getOrCreateNewDataSetType('BIGWIGGLE')\ndata_set_type_BIGWIGGLE.setDescription('Visualization')\ndata_set_type_BIGWIGGLE.setDataSetKind('PHYSICAL')\ndata_set_type_BIGWIGGLE.setMainDataSetPattern(None)\ndata_set_type_BIGWIGGLE.setMainDataSetPath(None)\ndata_set_type_BIGWIGGLE.setDeletionDisallowed(False)\n\n\ndata_set_type_ELAND_ALIGNMENT = tr.getOrCreateNewDataSetType('ELAND_ALIGNMENT')\ndata_set_type_ELAND_ALIGNMENT.setDescription('Illumina Eland Alignment Output')\ndata_set_type_ELAND_ALIGNMENT.setDataSetKind('PHYSICAL')\ndata_set_type_ELAND_ALIGNMENT.setMainDataSetPattern(None)\ndata_set_type_ELAND_ALIGNMENT.setMainDataSetPath(None)\ndata_set_type_ELAND_ALIGNMENT.setDeletionDisallowed(False)\n\n\ndata_set_type_FASTQ_GZ = tr.getOrCreateNewDataSetType('FASTQ_GZ')\ndata_set_type_FASTQ_GZ.setDescription('Gzipped Fastq file produced by Casava 1.8+')\ndata_set_type_FASTQ_GZ.setDataSetKind('PHYSICAL')\ndata_set_type_FASTQ_GZ.setMainDataSetPattern(None)\ndata_set_type_FASTQ_GZ.setMainDataSetPath(None)\ndata_set_type_FASTQ_GZ.setDeletionDisallowed(False)\n\n\ndata_set_type_ILLUMINA_HISEQ_OUTPUT = tr.getOrCreateNewDataSetType('ILLUMINA_HISEQ_OUTPUT')\ndata_set_type_ILLUMINA_HISEQ_OUTPUT.setDescription('HiSeq2000 Output')\ndata_set_type_ILLUMINA_HISEQ_OUTPUT.setDataSetKind('PHYSICAL')\ndata_set_type_ILLUMINA_HISEQ_OUTPUT.setMainDataSetPattern(None)\ndata_set_type_ILLUMINA_HISEQ_OUTPUT.setMainDataSetPath(None)\ndata_set_type_ILLUMINA_HISEQ_OUTPUT.setDeletionDisallowed(False)\n\n\ndata_set_type_ILLUMINA_MISEQ_OUTPUT = tr.getOrCreateNewDataSetType('ILLUMINA_MISEQ_OUTPUT')\ndata_set_type_ILLUMINA_MISEQ_OUTPUT.setDescription('MiSeq Output')\ndata_set_type_ILLUMINA_MISEQ_OUTPUT.setDataSetKind('PHYSICAL')\ndata_set_type_ILLUMINA_MISEQ_OUTPUT.setMainDataSetPattern(None)\ndata_set_type_ILLUMINA_MISEQ_OUTPUT.setMainDataSetPath(None)\ndata_set_type_ILLUMINA_MISEQ_OUTPUT.setDeletionDisallowed(False)\n\n\ndata_set_type_MACS_OUTPUT = tr.getOrCreateNewDataSetType('MACS_OUTPUT')\ndata_set_type_MACS_OUTPUT.setDescription('MACS Peak Caller output')\ndata_set_type_MACS_OUTPUT.setDataSetKind('PHYSICAL')\ndata_set_type_MACS_OUTPUT.setMainDataSetPattern(None)\ndata_set_type_MACS_OUTPUT.setMainDataSetPath(None)\ndata_set_type_MACS_OUTPUT.setDeletionDisallowed(False)\n\n\ndata_set_type_QUALITY_JPGS = tr.getOrCreateNewDataSetType('QUALITY_JPGS')\ndata_set_type_QUALITY_JPGS.setDescription('R generated Quality plots')\ndata_set_type_QUALITY_JPGS.setDataSetKind('PHYSICAL')\ndata_set_type_QUALITY_JPGS.setMainDataSetPattern(None)\ndata_set_type_QUALITY_JPGS.setMainDataSetPath(None)\ndata_set_type_QUALITY_JPGS.setDeletionDisallowed(False)\n\n\ndata_set_type_QUALITY_PDFS = tr.getOrCreateNewDataSetType('QUALITY_PDFS')\ndata_set_type_QUALITY_PDFS.setDescription('R generated pdfs showing quality data')\ndata_set_type_QUALITY_PDFS.setDataSetKind('PHYSICAL')\ndata_set_type_QUALITY_PDFS.setMainDataSetPattern(None)\ndata_set_type_QUALITY_PDFS.setMainDataSetPath(None)\ndata_set_type_QUALITY_PDFS.setDeletionDisallowed(False)\n\n\ndata_set_type_QUALITY_SVG = tr.getOrCreateNewDataSetType('QUALITY_SVG')\ndata_set_type_QUALITY_SVG.setDescription('R generated Quality plots')\ndata_set_type_QUALITY_SVG.setDataSetKind('PHYSICAL')\ndata_set_type_QUALITY_SVG.setMainDataSetPattern(None)\ndata_set_type_QUALITY_SVG.setMainDataSetPath(None)\ndata_set_type_QUALITY_SVG.setDeletionDisallowed(False)\n\n\ndata_set_type_RUNINFO = tr.getOrCreateNewDataSetType('RUNINFO')\ndata_set_type_RUNINFO.setDescription('Run statstics: Status.html and Status_Files folder')\ndata_set_type_RUNINFO.setDataSetKind('PHYSICAL')\ndata_set_type_RUNINFO.setMainDataSetPattern('original/.*/Data/Status.htm')\ndata_set_type_RUNINFO.setMainDataSetPath(None)\ndata_set_type_RUNINFO.setDeletionDisallowed(False)\n\n\ndata_set_type_THUMBNAILS = tr.getOrCreateNewDataSetType('THUMBNAILS')\ndata_set_type_THUMBNAILS.setDescription('Thumbnails provided by the Illumina software')\ndata_set_type_THUMBNAILS.setDataSetKind('PHYSICAL')\ndata_set_type_THUMBNAILS.setMainDataSetPattern(None)\ndata_set_type_THUMBNAILS.setMainDataSetPath(None)\ndata_set_type_THUMBNAILS.setDeletionDisallowed(False)\n\n\ndata_set_type_TSV = tr.getOrCreateNewDataSetType('TSV')\ndata_set_type_TSV.setDescription('Tab separated files')\ndata_set_type_TSV.setDataSetKind('PHYSICAL')\ndata_set_type_TSV.setMainDataSetPattern(None)\ndata_set_type_TSV.setMainDataSetPath(None)\ndata_set_type_TSV.setDeletionDisallowed(False)\n\n\nprint "Imported 15 Data Set Types" \nprint "Imported 0 Material Types" \nprop_type_AGILENT_KIT = tr.getOrCreateNewPropertyType('AGILENT_KIT', DataType.CONTROLLEDVOCABULARY)\nprop_type_AGILENT_KIT.setLabel('Agilent Kit')\nprop_type_AGILENT_KIT.setManagedInternally(False)\nprop_type_AGILENT_KIT.setInternalNamespace(False)\n\nprop_type_AGILENT_KIT.setVocabulary(vocabulary_AGILENT_KIT)\n\nprop_type_ALIGNMENT_SOFTWARE = tr.getOrCreateNewPropertyType('ALIGNMENT_SOFTWARE', DataType.CONTROLLEDVOCABULARY)\nprop_type_ALIGNMENT_SOFTWARE.setLabel('Alignment software')\nprop_type_ALIGNMENT_SOFTWARE.setManagedInternally(False)\nprop_type_ALIGNMENT_SOFTWARE.setInternalNamespace(False)\n\nprop_type_ALIGNMENT_SOFTWARE.setVocabulary(vocabulary_ALIGNMENT_SOFTWARE)\n\nprop_type_ANALYSIS_FINISHED = tr.getOrCreateNewPropertyType('ANALYSIS_FINISHED', DataType.TIMESTAMP)\nprop_type_ANALYSIS_FINISHED.setLabel('Analysis finished')\nprop_type_ANALYSIS_FINISHED.setManagedInternally(False)\nprop_type_ANALYSIS_FINISHED.setInternalNamespace(False)\n\n\nprop_type_BARCODE_COMPLEXITY_CHECKER = tr.getOrCreateNewPropertyType('BARCODE_COMPLEXITY_CHECKER', DataType.MULTILINE_VARCHAR)\nprop_type_BARCODE_COMPLEXITY_CHECKER.setLabel('Barcode_Complexity_Checker')\nprop_type_BARCODE_COMPLEXITY_CHECKER.setManagedInternally(False)\nprop_type_BARCODE_COMPLEXITY_CHECKER.setInternalNamespace(False)\n\n\nprop_type_BASESCOVERED = tr.getOrCreateNewPropertyType('BASESCOVERED', DataType.INTEGER)\nprop_type_BASESCOVERED.setLabel('bases Covered')\nprop_type_BASESCOVERED.setManagedInternally(False)\nprop_type_BASESCOVERED.setInternalNamespace(False)\n\n\nprop_type_BIOLOGICAL_SAMPLE_ARRIVED = tr.getOrCreateNewPropertyType('BIOLOGICAL_SAMPLE_ARRIVED', DataType.TIMESTAMP)\nprop_type_BIOLOGICAL_SAMPLE_ARRIVED.setLabel('Arrival Date of Biological Sample')\nprop_type_BIOLOGICAL_SAMPLE_ARRIVED.setManagedInternally(False)\nprop_type_BIOLOGICAL_SAMPLE_ARRIVED.setInternalNamespace(False)\n\n\nprop_type_CASAVA_VERSION = tr.getOrCreateNewPropertyType('CASAVA_VERSION', DataType.CONTROLLEDVOCABULARY)\nprop_type_CASAVA_VERSION.setLabel('Casava Version')\nprop_type_CASAVA_VERSION.setManagedInternally(False)\nprop_type_CASAVA_VERSION.setInternalNamespace(False)\n\nprop_type_CASAVA_VERSION.setVocabulary(vocabulary_CASAVA_VERSION)\n\nprop_type_CELL_PLASTICITY_SYSTEMSX = tr.getOrCreateNewPropertyType('CELL_PLASTICITY_SYSTEMSX', DataType.BOOLEAN)\nprop_type_CELL_PLASTICITY_SYSTEMSX.setLabel('Cell Plasticity (SystemsX)')\nprop_type_CELL_PLASTICITY_SYSTEMSX.setManagedInternally(False)\nprop_type_CELL_PLASTICITY_SYSTEMSX.setInternalNamespace(False)\n\n\nprop_type_CHROMCOUNT = tr.getOrCreateNewPropertyType('CHROMCOUNT', DataType.INTEGER)\nprop_type_CHROMCOUNT.setLabel('chrom Count')\nprop_type_CHROMCOUNT.setManagedInternally(False)\nprop_type_CHROMCOUNT.setInternalNamespace(False)\n\n\nprop_type_CLUSTER_GENERATION_KIT_VERSION = tr.getOrCreateNewPropertyType('CLUSTER_GENERATION_KIT_VERSION', DataType.CONTROLLEDVOCABULARY)\nprop_type_CLUSTER_GENERATION_KIT_VERSION.setLabel('CS Generation Kit Version')\nprop_type_CLUSTER_GENERATION_KIT_VERSION.setManagedInternally(False)\nprop_type_CLUSTER_GENERATION_KIT_VERSION.setInternalNamespace(False)\n\nprop_type_CLUSTER_GENERATION_KIT_VERSION.setVocabulary(vocabulary_CLUSTER_GENERATION_KIT_VERSION)\n\nprop_type_CLUSTER_STATION = tr.getOrCreateNewPropertyType('CLUSTER_STATION', DataType.CONTROLLEDVOCABULARY)\nprop_type_CLUSTER_STATION.setLabel('Cluster Station')\nprop_type_CLUSTER_STATION.setManagedInternally(False)\nprop_type_CLUSTER_STATION.setInternalNamespace(False)\n\nprop_type_CLUSTER_STATION.setVocabulary(vocabulary_CLUSTER_STATION)\n\nprop_type_CONCENTRATION = tr.getOrCreateNewPropertyType('CONCENTRATION', DataType.REAL)\nprop_type_CONCENTRATION.setLabel(u'Conc. [ng/\\u03bcl]')\nprop_type_CONCENTRATION.setManagedInternally(False)\nprop_type_CONCENTRATION.setInternalNamespace(False)\n\n\nprop_type_CONCENTRATION_FLOWLANE = tr.getOrCreateNewPropertyType('CONCENTRATION_FLOWLANE', DataType.REAL)\nprop_type_CONCENTRATION_FLOWLANE.setLabel('Concentration in flow lane [pM]')\nprop_type_CONCENTRATION_FLOWLANE.setManagedInternally(False)\nprop_type_CONCENTRATION_FLOWLANE.setInternalNamespace(False)\n\n\nprop_type_CONCENTRATION_ORIGINAL_ILLUMINA = tr.getOrCreateNewPropertyType('CONCENTRATION_ORIGINAL_ILLUMINA', DataType.REAL)\nprop_type_CONCENTRATION_ORIGINAL_ILLUMINA.setLabel(u'Concentration (original) [ng/\\u03bcl]')\nprop_type_CONCENTRATION_ORIGINAL_ILLUMINA.setManagedInternally(False)\nprop_type_CONCENTRATION_ORIGINAL_ILLUMINA.setInternalNamespace(False)\n\n\nprop_type_CONCENTRATION_PREPARED_ILLUMINA = tr.getOrCreateNewPropertyType('CONCENTRATION_PREPARED_ILLUMINA', DataType.REAL)\nprop_type_CONCENTRATION_PREPARED_ILLUMINA.setLabel(u'Concentration (prepared) [ng/\\u03bcl]')\nprop_type_CONCENTRATION_PREPARED_ILLUMINA.setManagedInternally(False)\nprop_type_CONCENTRATION_PREPARED_ILLUMINA.setInternalNamespace(False)\n\n\nprop_type_CONTACT_PERSON_EMAIL = tr.getOrCreateNewPropertyType('CONTACT_PERSON_EMAIL', DataType.VARCHAR)\nprop_type_CONTACT_PERSON_EMAIL.setLabel('Email of Contact Person')\nprop_type_CONTACT_PERSON_EMAIL.setManagedInternally(False)\nprop_type_CONTACT_PERSON_EMAIL.setInternalNamespace(False)\n\n\nprop_type_CONTACT_PERSON_NAME = tr.getOrCreateNewPropertyType('CONTACT_PERSON_NAME', DataType.VARCHAR)\nprop_type_CONTACT_PERSON_NAME.setLabel('Name of Contact Person')\nprop_type_CONTACT_PERSON_NAME.setManagedInternally(False)\nprop_type_CONTACT_PERSON_NAME.setInternalNamespace(False)\n\n\nprop_type_CONTROL_LANE = tr.getOrCreateNewPropertyType('CONTROL_LANE', DataType.CONTROLLEDVOCABULARY)\nprop_type_CONTROL_LANE.setLabel('Control Lane')\nprop_type_CONTROL_LANE.setManagedInternally(False)\nprop_type_CONTROL_LANE.setInternalNamespace(False)\n\nprop_type_CONTROL_LANE.setVocabulary(vocabulary_CONTROL_LANE)\n\nprop_type_CREATED_ON_CS = tr.getOrCreateNewPropertyType('CREATED_ON_CS', DataType.TIMESTAMP)\nprop_type_CREATED_ON_CS.setLabel('Clustering date')\nprop_type_CREATED_ON_CS.setManagedInternally(False)\nprop_type_CREATED_ON_CS.setInternalNamespace(False)\n\n\nprop_type_CS_PROTOCOL_VERSION = tr.getOrCreateNewPropertyType('CS_PROTOCOL_VERSION', DataType.VARCHAR)\nprop_type_CS_PROTOCOL_VERSION.setLabel('CS Protocol Version')\nprop_type_CS_PROTOCOL_VERSION.setManagedInternally(False)\nprop_type_CS_PROTOCOL_VERSION.setInternalNamespace(False)\n\n\nprop_type_CYCLES = tr.getOrCreateNewPropertyType('CYCLES', DataType.INTEGER)\nprop_type_CYCLES.setLabel('Cycles')\nprop_type_CYCLES.setManagedInternally(False)\nprop_type_CYCLES.setInternalNamespace(False)\n\n\nprop_type_DATA_TRANSFERRED = tr.getOrCreateNewPropertyType('DATA_TRANSFERRED', DataType.TIMESTAMP)\nprop_type_DATA_TRANSFERRED.setLabel('Data transferred')\nprop_type_DATA_TRANSFERRED.setManagedInternally(False)\nprop_type_DATA_TRANSFERRED.setInternalNamespace(False)\n\n\nprop_type_DNA_CONCENTRATION_OF_LIBRARY = tr.getOrCreateNewPropertyType('DNA_CONCENTRATION_OF_LIBRARY', DataType.INTEGER)\nprop_type_DNA_CONCENTRATION_OF_LIBRARY.setLabel('DNA concentration of library (nM)')\nprop_type_DNA_CONCENTRATION_OF_LIBRARY.setManagedInternally(False)\nprop_type_DNA_CONCENTRATION_OF_LIBRARY.setInternalNamespace(False)\n\n\nprop_type_DNA_CONCENTRATION_POOL = tr.getOrCreateNewPropertyType('DNA_CONCENTRATION_POOL', DataType.REAL)\nprop_type_DNA_CONCENTRATION_POOL.setLabel('DNA conc. [nM] - customer value')\nprop_type_DNA_CONCENTRATION_POOL.setManagedInternally(False)\nprop_type_DNA_CONCENTRATION_POOL.setInternalNamespace(False)\n\n\nprop_type_DNA_CONCENTRATION_QGF = tr.getOrCreateNewPropertyType('DNA_CONCENTRATION_QGF', DataType.REAL)\nprop_type_DNA_CONCENTRATION_QGF.setLabel('DNA concentration of Pool [nM]')\nprop_type_DNA_CONCENTRATION_QGF.setManagedInternally(False)\nprop_type_DNA_CONCENTRATION_QGF.setInternalNamespace(False)\n\n\nprop_type_END_TYPE = tr.getOrCreateNewPropertyType('END_TYPE', DataType.CONTROLLEDVOCABULARY)\nprop_type_END_TYPE.setLabel('Paired End / Single Read')\nprop_type_END_TYPE.setManagedInternally(False)\nprop_type_END_TYPE.setInternalNamespace(False)\n\nprop_type_END_TYPE.setVocabulary(vocabulary_END_TYPE)\n\nprop_type_EXPERIMENT_DESIGN = tr.getOrCreateNewPropertyType('EXPERIMENT_DESIGN', DataType.CONTROLLEDVOCABULARY)\nprop_type_EXPERIMENT_DESIGN.setLabel('Experiment Design')\nprop_type_EXPERIMENT_DESIGN.setManagedInternally(False)\nprop_type_EXPERIMENT_DESIGN.setInternalNamespace(False)\n\nprop_type_EXPERIMENT_DESIGN.setVocabulary(vocabulary_EXPERIMENT_DESIGN)\n\nprop_type_EXTERNAL_SAMPLE_NAME = tr.getOrCreateNewPropertyType('EXTERNAL_SAMPLE_NAME', DataType.VARCHAR)\nprop_type_EXTERNAL_SAMPLE_NAME.setLabel('External Sample Name')\nprop_type_EXTERNAL_SAMPLE_NAME.setManagedInternally(False)\nprop_type_EXTERNAL_SAMPLE_NAME.setInternalNamespace(False)\n\n\nprop_type_FLOWCELLTYPE = tr.getOrCreateNewPropertyType('FLOWCELLTYPE', DataType.VARCHAR)\nprop_type_FLOWCELLTYPE.setLabel('Flow Cell Type')\nprop_type_FLOWCELLTYPE.setManagedInternally(False)\nprop_type_FLOWCELLTYPE.setInternalNamespace(False)\n\n\nprop_type_FLOW_CELL_SEQUENCED_ON = tr.getOrCreateNewPropertyType('FLOW_CELL_SEQUENCED_ON', DataType.TIMESTAMP)\nprop_type_FLOW_CELL_SEQUENCED_ON.setLabel('Sequencing started')\nprop_type_FLOW_CELL_SEQUENCED_ON.setManagedInternally(False)\nprop_type_FLOW_CELL_SEQUENCED_ON.setInternalNamespace(False)\n\n\nprop_type_FRAGMENT_SIZE_BASE_PAIRS = tr.getOrCreateNewPropertyType('FRAGMENT_SIZE_BASE_PAIRS', DataType.INTEGER)\nprop_type_FRAGMENT_SIZE_BASE_PAIRS.setLabel('Fragment Size [base pairs]')\nprop_type_FRAGMENT_SIZE_BASE_PAIRS.setManagedInternally(False)\nprop_type_FRAGMENT_SIZE_BASE_PAIRS.setInternalNamespace(False)\n\n\nprop_type_FRAGMENT_SIZE_PREPARED_ILLUMINA = tr.getOrCreateNewPropertyType('FRAGMENT_SIZE_PREPARED_ILLUMINA', DataType.INTEGER)\nprop_type_FRAGMENT_SIZE_PREPARED_ILLUMINA.setLabel('Fragment Size (prepared) [base (pairs)]')\nprop_type_FRAGMENT_SIZE_PREPARED_ILLUMINA.setManagedInternally(False)\nprop_type_FRAGMENT_SIZE_PREPARED_ILLUMINA.setInternalNamespace(False)\n\n\nprop_type_ILLUMINA_PIPELINE_VERSION = tr.getOrCreateNewPropertyType('ILLUMINA_PIPELINE_VERSION', DataType.CONTROLLEDVOCABULARY)\nprop_type_ILLUMINA_PIPELINE_VERSION.setLabel('Pipeline Version')\nprop_type_ILLUMINA_PIPELINE_VERSION.setManagedInternally(False)\nprop_type_ILLUMINA_PIPELINE_VERSION.setInternalNamespace(False)\n\nprop_type_ILLUMINA_PIPELINE_VERSION.setVocabulary(vocabulary_PIPELINE_VERSION)\n\nprop_type_INDEX1 = tr.getOrCreateNewPropertyType('INDEX1', DataType.CONTROLLEDVOCABULARY)\nprop_type_INDEX1.setLabel('Index 1')\nprop_type_INDEX1.setManagedInternally(False)\nprop_type_INDEX1.setInternalNamespace(False)\n\nprop_type_INDEX1.setVocabulary(vocabulary_INDEX1)\n\nprop_type_INDEX2 = tr.getOrCreateNewPropertyType('INDEX2', DataType.CONTROLLEDVOCABULARY)\nprop_type_INDEX2.setLabel('Index 2')\nprop_type_INDEX2.setManagedInternally(False)\nprop_type_INDEX2.setInternalNamespace(False)\n\nprop_type_INDEX2.setVocabulary(vocabulary_INDEX2)\n\nprop_type_INDEXREAD = tr.getOrCreateNewPropertyType('INDEXREAD', DataType.INTEGER)\nprop_type_INDEXREAD.setLabel('Length of Index Read1')\nprop_type_INDEXREAD.setManagedInternally(False)\nprop_type_INDEXREAD.setInternalNamespace(False)\n\n\nprop_type_INDEXREAD2 = tr.getOrCreateNewPropertyType('INDEXREAD2', DataType.INTEGER)\nprop_type_INDEXREAD2.setLabel('Length of Index Read2')\nprop_type_INDEXREAD2.setManagedInternally(False)\nprop_type_INDEXREAD2.setInternalNamespace(False)\n\n\nprop_type_INVOICE = tr.getOrCreateNewPropertyType('INVOICE', DataType.BOOLEAN)\nprop_type_INVOICE.setLabel('Invoice sent?')\nprop_type_INVOICE.setManagedInternally(False)\nprop_type_INVOICE.setInternalNamespace(False)\n\n\nprop_type_ISCOMPRESSED = tr.getOrCreateNewPropertyType('ISCOMPRESSED', DataType.BOOLEAN)\nprop_type_ISCOMPRESSED.setLabel('Is Compressed')\nprop_type_ISCOMPRESSED.setManagedInternally(False)\nprop_type_ISCOMPRESSED.setInternalNamespace(False)\n\n\nprop_type_ISSUED_COMMAND = tr.getOrCreateNewPropertyType('ISSUED_COMMAND', DataType.MULTILINE_VARCHAR)\nprop_type_ISSUED_COMMAND.setLabel('Issued Command')\nprop_type_ISSUED_COMMAND.setManagedInternally(False)\nprop_type_ISSUED_COMMAND.setInternalNamespace(False)\n\n\nprop_type_ISSWAPPED = tr.getOrCreateNewPropertyType('ISSWAPPED', DataType.INTEGER)\nprop_type_ISSWAPPED.setLabel('Is byte swapped')\nprop_type_ISSWAPPED.setManagedInternally(False)\nprop_type_ISSWAPPED.setInternalNamespace(False)\n\n\nprop_type_KIT = tr.getOrCreateNewPropertyType('KIT', DataType.CONTROLLEDVOCABULARY)\nprop_type_KIT.setLabel('Library preparation kit')\nprop_type_KIT.setManagedInternally(False)\nprop_type_KIT.setInternalNamespace(False)\n\nprop_type_KIT.setVocabulary(vocabulary_KIT)\n\nprop_type_KIT_PREPARED = tr.getOrCreateNewPropertyType('KIT_PREPARED', DataType.TIMESTAMP)\nprop_type_KIT_PREPARED.setLabel('Sample processed')\nprop_type_KIT_PREPARED.setManagedInternally(False)\nprop_type_KIT_PREPARED.setInternalNamespace(False)\n\n\nprop_type_LANECOUNT = tr.getOrCreateNewPropertyType('LANECOUNT', DataType.INTEGER)\nprop_type_LANECOUNT.setLabel('Lane Count')\nprop_type_LANECOUNT.setManagedInternally(False)\nprop_type_LANECOUNT.setInternalNamespace(False)\n\n\nprop_type_LIBRARY_PROCESSING_FAILED = tr.getOrCreateNewPropertyType('LIBRARY_PROCESSING_FAILED', DataType.BOOLEAN)\nprop_type_LIBRARY_PROCESSING_FAILED.setLabel('Library processing failed')\nprop_type_LIBRARY_PROCESSING_FAILED.setManagedInternally(False)\nprop_type_LIBRARY_PROCESSING_FAILED.setInternalNamespace(False)\n\n\nprop_type_LIBRARY_PROCESSING_POSSIBLE_YES_NO = tr.getOrCreateNewPropertyType('LIBRARY_PROCESSING_POSSIBLE_YES_NO', DataType.CONTROLLEDVOCABULARY)\nprop_type_LIBRARY_PROCESSING_POSSIBLE_YES_NO.setLabel('Library processing possible')\nprop_type_LIBRARY_PROCESSING_POSSIBLE_YES_NO.setManagedInternally(False)\nprop_type_LIBRARY_PROCESSING_POSSIBLE_YES_NO.setInternalNamespace(False)\n\nprop_type_LIBRARY_PROCESSING_POSSIBLE_YES_NO.setVocabulary(vocabulary_YES_NO)\n\nprop_type_LIBRARY_PROCESSING_SUCCESSFUL = tr.getOrCreateNewPropertyType('LIBRARY_PROCESSING_SUCCESSFUL', DataType.BOOLEAN)\nprop_type_LIBRARY_PROCESSING_SUCCESSFUL.setLabel('Library processing successful')\nprop_type_LIBRARY_PROCESSING_SUCCESSFUL.setManagedInternally(False)\nprop_type_LIBRARY_PROCESSING_SUCCESSFUL.setInternalNamespace(False)\n\n\nprop_type_LOT = tr.getOrCreateNewPropertyType('LOT', DataType.INTEGER)\nprop_type_LOT.setLabel('Kit Lot #')\nprop_type_LOT.setManagedInternally(False)\nprop_type_LOT.setInternalNamespace(False)\n\n\nprop_type_MACS_VERSION = tr.getOrCreateNewPropertyType('MACS_VERSION', DataType.CONTROLLEDVOCABULARY)\nprop_type_MACS_VERSION.setLabel('MACS VERSION')\nprop_type_MACS_VERSION.setManagedInternally(False)\nprop_type_MACS_VERSION.setInternalNamespace(False)\n\nprop_type_MACS_VERSION.setVocabulary(vocabulary_MACS_VERSION)\n\nprop_type_MAPPED_READS = tr.getOrCreateNewPropertyType('MAPPED_READS', DataType.INTEGER)\nprop_type_MAPPED_READS.setLabel('Mapped reads')\nprop_type_MAPPED_READS.setManagedInternally(False)\nprop_type_MAPPED_READS.setInternalNamespace(False)\n\n\nprop_type_MAX = tr.getOrCreateNewPropertyType('MAX', DataType.REAL)\nprop_type_MAX.setLabel('Maximum')\nprop_type_MAX.setManagedInternally(False)\nprop_type_MAX.setInternalNamespace(False)\n\n\nprop_type_MEAN = tr.getOrCreateNewPropertyType('MEAN', DataType.REAL)\nprop_type_MEAN.setLabel('Mean')\nprop_type_MEAN.setManagedInternally(False)\nprop_type_MEAN.setInternalNamespace(False)\n\n\nprop_type_MIN = tr.getOrCreateNewPropertyType('MIN', DataType.REAL)\nprop_type_MIN.setLabel('Minimum')\nprop_type_MIN.setManagedInternally(False)\nprop_type_MIN.setInternalNamespace(False)\n\n\nprop_type_MISMATCH_IN_INDEX = tr.getOrCreateNewPropertyType('MISMATCH_IN_INDEX', DataType.CONTROLLEDVOCABULARY)\nprop_type_MISMATCH_IN_INDEX.setLabel('Mismatch in Index')\nprop_type_MISMATCH_IN_INDEX.setManagedInternally(False)\nprop_type_MISMATCH_IN_INDEX.setInternalNamespace(False)\n\nprop_type_MISMATCH_IN_INDEX.setVocabulary(vocabulary_MISMATCH_IN_INDEX)\n\nprop_type_NANO_DROP = tr.getOrCreateNewPropertyType('NANO_DROP', DataType.CONTROLLEDVOCABULARY)\nprop_type_NANO_DROP.setLabel('Nano Drop')\nprop_type_NANO_DROP.setManagedInternally(False)\nprop_type_NANO_DROP.setInternalNamespace(False)\n\nprop_type_NANO_DROP.setVocabulary(vocabulary_NANO_DROP)\n\nprop_type_NCBI_ORGANISM_TAXONOMY = tr.getOrCreateNewPropertyType('NCBI_ORGANISM_TAXONOMY', DataType.CONTROLLEDVOCABULARY)\nprop_type_NCBI_ORGANISM_TAXONOMY.setLabel('Organism (NCBI Taxonomy)')\nprop_type_NCBI_ORGANISM_TAXONOMY.setManagedInternally(False)\nprop_type_NCBI_ORGANISM_TAXONOMY.setInternalNamespace(False)\n\nprop_type_NCBI_ORGANISM_TAXONOMY.setVocabulary(vocabulary_NCBI_TAXONOMY)\n\nprop_type_NM_DNA = tr.getOrCreateNewPropertyType('NM_DNA', DataType.REAL)\nprop_type_NM_DNA.setLabel('Calculated DNA concentration of library (nM)')\nprop_type_NM_DNA.setManagedInternally(False)\nprop_type_NM_DNA.setInternalNamespace(False)\n\n\nprop_type_NOTES = tr.getOrCreateNewPropertyType('NOTES', DataType.MULTILINE_VARCHAR)\nprop_type_NOTES.setLabel('Notes')\nprop_type_NOTES.setManagedInternally(False)\nprop_type_NOTES.setInternalNamespace(False)\n\n\nprop_type_NUMBER_OF_ATTACHMENTS = tr.getOrCreateNewPropertyType('NUMBER_OF_ATTACHMENTS', DataType.INTEGER)\nprop_type_NUMBER_OF_ATTACHMENTS.setLabel('Number of Attachments')\nprop_type_NUMBER_OF_ATTACHMENTS.setManagedInternally(False)\nprop_type_NUMBER_OF_ATTACHMENTS.setInternalNamespace(False)\n\n\nprop_type_PAIRED_END_KIT = tr.getOrCreateNewPropertyType('PAIRED_END_KIT', DataType.VARCHAR)\nprop_type_PAIRED_END_KIT.setLabel('Paired End Kit')\nprop_type_PAIRED_END_KIT.setManagedInternally(False)\nprop_type_PAIRED_END_KIT.setInternalNamespace(False)\n\n\nprop_type_PERCENTAGE_ONE_MISMATCH_READS_INDEX = tr.getOrCreateNewPropertyType('PERCENTAGE_ONE_MISMATCH_READS_INDEX', DataType.REAL)\nprop_type_PERCENTAGE_ONE_MISMATCH_READS_INDEX.setLabel('% One Mismatch Reads (Index)')\nprop_type_PERCENTAGE_ONE_MISMATCH_READS_INDEX.setManagedInternally(False)\nprop_type_PERCENTAGE_ONE_MISMATCH_READS_INDEX.setInternalNamespace(False)\n\n\nprop_type_PERCENTAGE_PASSED_FILTERING = tr.getOrCreateNewPropertyType('PERCENTAGE_PASSED_FILTERING', DataType.REAL)\nprop_type_PERCENTAGE_PASSED_FILTERING.setLabel('% Passes Illumina Filtering (PF)')\nprop_type_PERCENTAGE_PASSED_FILTERING.setManagedInternally(False)\nprop_type_PERCENTAGE_PASSED_FILTERING.setInternalNamespace(False)\n\n\nprop_type_PERCENTAGE_PERFECT_INDEX_READS = tr.getOrCreateNewPropertyType('PERCENTAGE_PERFECT_INDEX_READS', DataType.REAL)\nprop_type_PERCENTAGE_PERFECT_INDEX_READS.setLabel('% Perfect Index Reads')\nprop_type_PERCENTAGE_PERFECT_INDEX_READS.setManagedInternally(False)\nprop_type_PERCENTAGE_PERFECT_INDEX_READS.setInternalNamespace(False)\n\n\nprop_type_PERCENTAGE_RAW_CLUSTERS_PER_LANE = tr.getOrCreateNewPropertyType('PERCENTAGE_RAW_CLUSTERS_PER_LANE', DataType.REAL)\nprop_type_PERCENTAGE_RAW_CLUSTERS_PER_LANE.setLabel('% of raw clusters per lane')\nprop_type_PERCENTAGE_RAW_CLUSTERS_PER_LANE.setManagedInternally(False)\nprop_type_PERCENTAGE_RAW_CLUSTERS_PER_LANE.setInternalNamespace(False)\n\n\nprop_type_PREPARED_BY = tr.getOrCreateNewPropertyType('PREPARED_BY', DataType.VARCHAR)\nprop_type_PREPARED_BY.setLabel('Prepared by')\nprop_type_PREPARED_BY.setManagedInternally(False)\nprop_type_PREPARED_BY.setInternalNamespace(False)\n\n\nprop_type_PRIMARYDATASIZE = tr.getOrCreateNewPropertyType('PRIMARYDATASIZE', DataType.INTEGER)\nprop_type_PRIMARYDATASIZE.setLabel('primary Data Size')\nprop_type_PRIMARYDATASIZE.setManagedInternally(False)\nprop_type_PRIMARYDATASIZE.setInternalNamespace(False)\n\n\nprop_type_PRIMARYINDEXSIZE = tr.getOrCreateNewPropertyType('PRIMARYINDEXSIZE', DataType.INTEGER)\nprop_type_PRIMARYINDEXSIZE.setLabel('primary Index Size')\nprop_type_PRIMARYINDEXSIZE.setManagedInternally(False)\nprop_type_PRIMARYINDEXSIZE.setInternalNamespace(False)\n\n\nprop_type_PRINCIPAL_INVESTIGATOR_EMAIL = tr.getOrCreateNewPropertyType('PRINCIPAL_INVESTIGATOR_EMAIL', DataType.VARCHAR)\nprop_type_PRINCIPAL_INVESTIGATOR_EMAIL.setLabel('Email of Principal Investigator')\nprop_type_PRINCIPAL_INVESTIGATOR_EMAIL.setManagedInternally(False)\nprop_type_PRINCIPAL_INVESTIGATOR_EMAIL.setInternalNamespace(False)\n\n\nprop_type_PRINCIPAL_INVESTIGATOR_NAME = tr.getOrCreateNewPropertyType('PRINCIPAL_INVESTIGATOR_NAME', DataType.VARCHAR)\nprop_type_PRINCIPAL_INVESTIGATOR_NAME.setLabel('Name of Principal Investigator')\nprop_type_PRINCIPAL_INVESTIGATOR_NAME.setManagedInternally(False)\nprop_type_PRINCIPAL_INVESTIGATOR_NAME.setInternalNamespace(False)\n\n\nprop_type_QC_AT_DBSSE = tr.getOrCreateNewPropertyType('QC_AT_DBSSE', DataType.CONTROLLEDVOCABULARY)\nprop_type_QC_AT_DBSSE.setLabel('QC at D-BSSE')\nprop_type_QC_AT_DBSSE.setManagedInternally(False)\nprop_type_QC_AT_DBSSE.setInternalNamespace(False)\n\nprop_type_QC_AT_DBSSE.setVocabulary(vocabulary_YES_NO)\n\nprop_type_QC_REQUIRED = tr.getOrCreateNewPropertyType('QC_REQUIRED', DataType.CONTROLLEDVOCABULARY)\nprop_type_QC_REQUIRED.setLabel('QC required')\nprop_type_QC_REQUIRED.setManagedInternally(False)\nprop_type_QC_REQUIRED.setInternalNamespace(False)\n\nprop_type_QC_REQUIRED.setVocabulary(vocabulary_YES_NO)\n\nprop_type_RUNNINGTIME = tr.getOrCreateNewPropertyType('RUNNINGTIME', DataType.VARCHAR)\nprop_type_RUNNINGTIME.setLabel('Running Time')\nprop_type_RUNNINGTIME.setManagedInternally(False)\nprop_type_RUNNINGTIME.setInternalNamespace(False)\n\n\nprop_type_RUN_FOLDER_NAME = tr.getOrCreateNewPropertyType('RUN_FOLDER_NAME', DataType.VARCHAR)\nprop_type_RUN_FOLDER_NAME.setLabel('Run Folder Name')\nprop_type_RUN_FOLDER_NAME.setManagedInternally(False)\nprop_type_RUN_FOLDER_NAME.setInternalNamespace(False)\n\n\nprop_type_SAMPLE_KIND = tr.getOrCreateNewPropertyType('SAMPLE_KIND', DataType.CONTROLLEDVOCABULARY)\nprop_type_SAMPLE_KIND.setLabel('Sample Kind')\nprop_type_SAMPLE_KIND.setManagedInternally(False)\nprop_type_SAMPLE_KIND.setInternalNamespace(False)\n\nprop_type_SAMPLE_KIND.setVocabulary(vocabulary_SAMPLE_TYPE)\n\nprop_type_SAMTOOLS_FLAGSTAT = tr.getOrCreateNewPropertyType('SAMTOOLS_FLAGSTAT', DataType.MULTILINE_VARCHAR)\nprop_type_SAMTOOLS_FLAGSTAT.setLabel('Samtools Flagstat Output')\nprop_type_SAMTOOLS_FLAGSTAT.setManagedInternally(False)\nprop_type_SAMTOOLS_FLAGSTAT.setInternalNamespace(False)\n\n\nprop_type_SBS_KIT = tr.getOrCreateNewPropertyType('SBS_KIT', DataType.VARCHAR)\nprop_type_SBS_KIT.setLabel('SBS Kit')\nprop_type_SBS_KIT.setManagedInternally(False)\nprop_type_SBS_KIT.setInternalNamespace(False)\n\n\nprop_type_SBS_SEQUENCING_KIT_VERSION = tr.getOrCreateNewPropertyType('SBS_SEQUENCING_KIT_VERSION', DataType.CONTROLLEDVOCABULARY)\nprop_type_SBS_SEQUENCING_KIT_VERSION.setLabel('SBS Sequencing Kit Version')\nprop_type_SBS_SEQUENCING_KIT_VERSION.setManagedInternally(False)\nprop_type_SBS_SEQUENCING_KIT_VERSION.setInternalNamespace(False)\n\nprop_type_SBS_SEQUENCING_KIT_VERSION.setVocabulary(vocabulary_SBS_SEQUENCING_KIT_VERSION)\n\nprop_type_SEQUENCER = tr.getOrCreateNewPropertyType('SEQUENCER', DataType.CONTROLLEDVOCABULARY)\nprop_type_SEQUENCER.setLabel('Sequencer')\nprop_type_SEQUENCER.setManagedInternally(False)\nprop_type_SEQUENCER.setInternalNamespace(False)\n\nprop_type_SEQUENCER.setVocabulary(vocabulary_SEQUENCER)\n\nprop_type_SEQUENCER_FINISHED = tr.getOrCreateNewPropertyType('SEQUENCER_FINISHED', DataType.TIMESTAMP)\nprop_type_SEQUENCER_FINISHED.setLabel('Sequencer finished')\nprop_type_SEQUENCER_FINISHED.setManagedInternally(False)\nprop_type_SEQUENCER_FINISHED.setInternalNamespace(False)\n\n\nprop_type_STARTING_AMOUNT_OF_SAMPLE_IN_NG = tr.getOrCreateNewPropertyType('STARTING_AMOUNT_OF_SAMPLE_IN_NG', DataType.REAL)\nprop_type_STARTING_AMOUNT_OF_SAMPLE_IN_NG.setLabel('Starting amount of sample (ng)')\nprop_type_STARTING_AMOUNT_OF_SAMPLE_IN_NG.setManagedInternally(False)\nprop_type_STARTING_AMOUNT_OF_SAMPLE_IN_NG.setInternalNamespace(False)\n\n\nprop_type_STD = tr.getOrCreateNewPropertyType('STD', DataType.REAL)\nprop_type_STD.setLabel('Standard deviation')\nprop_type_STD.setManagedInternally(False)\nprop_type_STD.setInternalNamespace(False)\n\n\nprop_type_SURFACECOUNT = tr.getOrCreateNewPropertyType('SURFACECOUNT', DataType.INTEGER)\nprop_type_SURFACECOUNT.setLabel('Surface Count')\nprop_type_SURFACECOUNT.setManagedInternally(False)\nprop_type_SURFACECOUNT.setInternalNamespace(False)\n\n\nprop_type_SWATHCOUNT = tr.getOrCreateNewPropertyType('SWATHCOUNT', DataType.INTEGER)\nprop_type_SWATHCOUNT.setLabel('Swath Count')\nprop_type_SWATHCOUNT.setManagedInternally(False)\nprop_type_SWATHCOUNT.setInternalNamespace(False)\n\n\nprop_type_TILECOUNT = tr.getOrCreateNewPropertyType('TILECOUNT', DataType.INTEGER)\nprop_type_TILECOUNT.setLabel('Tile Count')\nprop_type_TILECOUNT.setManagedInternally(False)\nprop_type_TILECOUNT.setInternalNamespace(False)\n\n\nprop_type_TOTAL_READS = tr.getOrCreateNewPropertyType('TOTAL_READS', DataType.INTEGER)\nprop_type_TOTAL_READS.setLabel('Total reads')\nprop_type_TOTAL_READS.setManagedInternally(False)\nprop_type_TOTAL_READS.setInternalNamespace(False)\n\n\nprop_type_UL_DNA = tr.getOrCreateNewPropertyType('UL_DNA', DataType.REAL)\nprop_type_UL_DNA.setLabel('Calculated ul DNA for 2nM stock')\nprop_type_UL_DNA.setManagedInternally(False)\nprop_type_UL_DNA.setInternalNamespace(False)\n\n\nprop_type_UL_EB = tr.getOrCreateNewPropertyType('UL_EB', DataType.REAL)\nprop_type_UL_EB.setLabel('Calculated ul EB for 2nM stock ')\nprop_type_UL_EB.setManagedInternally(False)\nprop_type_UL_EB.setInternalNamespace(False)\n\n\nprop_type_UL_STOCK = tr.getOrCreateNewPropertyType('UL_STOCK', DataType.INTEGER)\nprop_type_UL_STOCK.setLabel('ul of 2nM stock')\nprop_type_UL_STOCK.setManagedInternally(False)\nprop_type_UL_STOCK.setInternalNamespace(False)\n\n\nprop_type_UNIQUE_BARCODES = tr.getOrCreateNewPropertyType('UNIQUE_BARCODES', DataType.VARCHAR)\nprop_type_UNIQUE_BARCODES.setLabel('Unique Barcodes in Pool?')\nprop_type_UNIQUE_BARCODES.setManagedInternally(False)\nprop_type_UNIQUE_BARCODES.setInternalNamespace(False)\n\n\nprop_type_VERSION = tr.getOrCreateNewPropertyType('VERSION', DataType.VARCHAR)\nprop_type_VERSION.setLabel('Version')\nprop_type_VERSION.setManagedInternally(False)\nprop_type_VERSION.setInternalNamespace(False)\n\n\nprop_type_YIELD_MBASES = tr.getOrCreateNewPropertyType('YIELD_MBASES', DataType.INTEGER)\nprop_type_YIELD_MBASES.setLabel('Yield(Mbases)')\nprop_type_YIELD_MBASES.setManagedInternally(False)\nprop_type_YIELD_MBASES.setInternalNamespace(False)\n\n\nprop_type_ZOOMLEVELS = tr.getOrCreateNewPropertyType('ZOOMLEVELS', DataType.INTEGER)\nprop_type_ZOOMLEVELS.setLabel('zoom Levels')\nprop_type_ZOOMLEVELS.setManagedInternally(False)\nprop_type_ZOOMLEVELS.setInternalNamespace(False)\n\n\nprint "Imported 92 Property Types" \nassignment_DATA_SET_ALIGNMENT_ALIGNMENT_SOFTWARE = tr.assignPropertyType(data_set_type_ALIGNMENT, prop_type_ALIGNMENT_SOFTWARE)\nassignment_DATA_SET_ALIGNMENT_ALIGNMENT_SOFTWARE.setMandatory(False)\nassignment_DATA_SET_ALIGNMENT_ALIGNMENT_SOFTWARE.setSection(None)\nassignment_DATA_SET_ALIGNMENT_ALIGNMENT_SOFTWARE.setPositionInForms(3)\n\nassignment_DATA_SET_ALIGNMENT_VERSION = tr.assignPropertyType(data_set_type_ALIGNMENT, prop_type_VERSION)\nassignment_DATA_SET_ALIGNMENT_VERSION.setMandatory(False)\nassignment_DATA_SET_ALIGNMENT_VERSION.setSection(None)\nassignment_DATA_SET_ALIGNMENT_VERSION.setPositionInForms(4)\n\nassignment_DATA_SET_ALIGNMENT_NOTES = tr.assignPropertyType(data_set_type_ALIGNMENT, prop_type_NOTES)\nassignment_DATA_SET_ALIGNMENT_NOTES.setMandatory(False)\nassignment_DATA_SET_ALIGNMENT_NOTES.setSection(None)\nassignment_DATA_SET_ALIGNMENT_NOTES.setPositionInForms(5)\n\nassignment_DATA_SET_ALIGNMENT_SAMTOOLS_FLAGSTAT = tr.assignPropertyType(data_set_type_ALIGNMENT, prop_type_SAMTOOLS_FLAGSTAT)\nassignment_DATA_SET_ALIGNMENT_SAMTOOLS_FLAGSTAT.setMandatory(False)\nassignment_DATA_SET_ALIGNMENT_SAMTOOLS_FLAGSTAT.setSection(None)\nassignment_DATA_SET_ALIGNMENT_SAMTOOLS_FLAGSTAT.setPositionInForms(6)\n\nassignment_DATA_SET_ALIGNMENT_MAPPED_READS = tr.assignPropertyType(data_set_type_ALIGNMENT, prop_type_MAPPED_READS)\nassignment_DATA_SET_ALIGNMENT_MAPPED_READS.setMandatory(False)\nassignment_DATA_SET_ALIGNMENT_MAPPED_READS.setSection(None)\nassignment_DATA_SET_ALIGNMENT_MAPPED_READS.setPositionInForms(7)\n\nassignment_DATA_SET_ALIGNMENT_TOTAL_READS = tr.assignPropertyType(data_set_type_ALIGNMENT, prop_type_TOTAL_READS)\nassignment_DATA_SET_ALIGNMENT_TOTAL_READS.setMandatory(False)\nassignment_DATA_SET_ALIGNMENT_TOTAL_READS.setSection(None)\nassignment_DATA_SET_ALIGNMENT_TOTAL_READS.setPositionInForms(8)\n\nassignment_DATA_SET_ALIGNMENT_ISSUED_COMMAND = tr.assignPropertyType(data_set_type_ALIGNMENT, prop_type_ISSUED_COMMAND)\nassignment_DATA_SET_ALIGNMENT_ISSUED_COMMAND.setMandatory(False)\nassignment_DATA_SET_ALIGNMENT_ISSUED_COMMAND.setSection(None)\nassignment_DATA_SET_ALIGNMENT_ISSUED_COMMAND.setPositionInForms(9)\n\nassignment_DATA_SET_BASECALL_STATS_MISMATCH_IN_INDEX = tr.assignPropertyType(data_set_type_BASECALL_STATS, prop_type_MISMATCH_IN_INDEX)\nassignment_DATA_SET_BASECALL_STATS_MISMATCH_IN_INDEX.setMandatory(False)\nassignment_DATA_SET_BASECALL_STATS_MISMATCH_IN_INDEX.setSection(None)\nassignment_DATA_SET_BASECALL_STATS_MISMATCH_IN_INDEX.setPositionInForms(3)\n\nassignment_DATA_SET_BIGWIGGLE_NOTES = tr.assignPropertyType(data_set_type_BIGWIGGLE, prop_type_NOTES)\nassignment_DATA_SET_BIGWIGGLE_NOTES.setMandatory(False)\nassignment_DATA_SET_BIGWIGGLE_NOTES.setSection(None)\nassignment_DATA_SET_BIGWIGGLE_NOTES.setPositionInForms(3)\n\nassignment_DATA_SET_BIGWIGGLE_VERSION = tr.assignPropertyType(data_set_type_BIGWIGGLE, prop_type_VERSION)\nassignment_DATA_SET_BIGWIGGLE_VERSION.setMandatory(False)\nassignment_DATA_SET_BIGWIGGLE_VERSION.setSection(None)\nassignment_DATA_SET_BIGWIGGLE_VERSION.setPositionInForms(4)\n\nassignment_DATA_SET_BIGWIGGLE_ISCOMPRESSED = tr.assignPropertyType(data_set_type_BIGWIGGLE, prop_type_ISCOMPRESSED)\nassignment_DATA_SET_BIGWIGGLE_ISCOMPRESSED.setMandatory(False)\nassignment_DATA_SET_BIGWIGGLE_ISCOMPRESSED.setSection(None)\nassignment_DATA_SET_BIGWIGGLE_ISCOMPRESSED.setPositionInForms(5)\n\nassignment_DATA_SET_BIGWIGGLE_ISSWAPPED = tr.assignPropertyType(data_set_type_BIGWIGGLE, prop_type_ISSWAPPED)\nassignment_DATA_SET_BIGWIGGLE_ISSWAPPED.setMandatory(False)\nassignment_DATA_SET_BIGWIGGLE_ISSWAPPED.setSection(None)\nassignment_DATA_SET_BIGWIGGLE_ISSWAPPED.setPositionInForms(6)\n\nassignment_DATA_SET_BIGWIGGLE_PRIMARYDATASIZE = tr.assignPropertyType(data_set_type_BIGWIGGLE, prop_type_PRIMARYDATASIZE)\nassignment_DATA_SET_BIGWIGGLE_PRIMARYDATASIZE.setMandatory(False)\nassignment_DATA_SET_BIGWIGGLE_PRIMARYDATASIZE.setSection(None)\nassignment_DATA_SET_BIGWIGGLE_PRIMARYDATASIZE.setPositionInForms(7)\n\nassignment_DATA_SET_BIGWIGGLE_PRIMARYINDEXSIZE = tr.assignPropertyType(data_set_type_BIGWIGGLE, prop_type_PRIMARYINDEXSIZE)\nassignment_DATA_SET_BIGWIGGLE_PRIMARYINDEXSIZE.setMandatory(False)\nassignment_DATA_SET_BIGWIGGLE_PRIMARYINDEXSIZE.setSection(None)\nassignment_DATA_SET_BIGWIGGLE_PRIMARYINDEXSIZE.setPositionInForms(8)\n\nassignment_DATA_SET_BIGWIGGLE_ZOOMLEVELS = tr.assignPropertyType(data_set_type_BIGWIGGLE, prop_type_ZOOMLEVELS)\nassignment_DATA_SET_BIGWIGGLE_ZOOMLEVELS.setMandatory(False)\nassignment_DATA_SET_BIGWIGGLE_ZOOMLEVELS.setSection(None)\nassignment_DATA_SET_BIGWIGGLE_ZOOMLEVELS.setPositionInForms(9)\n\nassignment_DATA_SET_BIGWIGGLE_CHROMCOUNT = tr.assignPropertyType(data_set_type_BIGWIGGLE, prop_type_CHROMCOUNT)\nassignment_DATA_SET_BIGWIGGLE_CHROMCOUNT.setMandatory(False)\nassignment_DATA_SET_BIGWIGGLE_CHROMCOUNT.setSection(None)\nassignment_DATA_SET_BIGWIGGLE_CHROMCOUNT.setPositionInForms(10)\n\nassignment_DATA_SET_BIGWIGGLE_BASESCOVERED = tr.assignPropertyType(data_set_type_BIGWIGGLE, prop_type_BASESCOVERED)\nassignment_DATA_SET_BIGWIGGLE_BASESCOVERED.setMandatory(False)\nassignment_DATA_SET_BIGWIGGLE_BASESCOVERED.setSection(None)\nassignment_DATA_SET_BIGWIGGLE_BASESCOVERED.setPositionInForms(11)\n\nassignment_DATA_SET_BIGWIGGLE_MEAN = tr.assignPropertyType(data_set_type_BIGWIGGLE, prop_type_MEAN)\nassignment_DATA_SET_BIGWIGGLE_MEAN.setMandatory(False)\nassignment_DATA_SET_BIGWIGGLE_MEAN.setSection(None)\nassignment_DATA_SET_BIGWIGGLE_MEAN.setPositionInForms(12)\n\nassignment_DATA_SET_BIGWIGGLE_MIN = tr.assignPropertyType(data_set_type_BIGWIGGLE, prop_type_MIN)\nassignment_DATA_SET_BIGWIGGLE_MIN.setMandatory(False)\nassignment_DATA_SET_BIGWIGGLE_MIN.setSection(None)\nassignment_DATA_SET_BIGWIGGLE_MIN.setPositionInForms(13)\n\nassignment_DATA_SET_BIGWIGGLE_MAX = tr.assignPropertyType(data_set_type_BIGWIGGLE, prop_type_MAX)\nassignment_DATA_SET_BIGWIGGLE_MAX.setMandatory(False)\nassignment_DATA_SET_BIGWIGGLE_MAX.setSection(None)\nassignment_DATA_SET_BIGWIGGLE_MAX.setPositionInForms(14)\n\nassignment_DATA_SET_BIGWIGGLE_STD = tr.assignPropertyType(data_set_type_BIGWIGGLE, prop_type_STD)\nassignment_DATA_SET_BIGWIGGLE_STD.setMandatory(False)\nassignment_DATA_SET_BIGWIGGLE_STD.setSection(None)\nassignment_DATA_SET_BIGWIGGLE_STD.setPositionInForms(15)\n\nassignment_DATA_SET_FASTQ_GZ_NOTES = tr.assignPropertyType(data_set_type_FASTQ_GZ, prop_type_NOTES)\nassignment_DATA_SET_FASTQ_GZ_NOTES.setMandatory(False)\nassignment_DATA_SET_FASTQ_GZ_NOTES.setSection(None)\nassignment_DATA_SET_FASTQ_GZ_NOTES.setPositionInForms(3)\n\nassignment_DATA_SET_FASTQ_GZ_YIELD_MBASES = tr.assignPropertyType(data_set_type_FASTQ_GZ, prop_type_YIELD_MBASES)\nassignment_DATA_SET_FASTQ_GZ_YIELD_MBASES.setMandatory(False)\nassignment_DATA_SET_FASTQ_GZ_YIELD_MBASES.setSection(None)\nassignment_DATA_SET_FASTQ_GZ_YIELD_MBASES.setPositionInForms(4)\n\nassignment_DATA_SET_FASTQ_GZ_PERCENTAGE_PASSED_FILTERING = tr.assignPropertyType(data_set_type_FASTQ_GZ, prop_type_PERCENTAGE_PASSED_FILTERING)\nassignment_DATA_SET_FASTQ_GZ_PERCENTAGE_PASSED_FILTERING.setMandatory(False)\nassignment_DATA_SET_FASTQ_GZ_PERCENTAGE_PASSED_FILTERING.setSection(None)\nassignment_DATA_SET_FASTQ_GZ_PERCENTAGE_PASSED_FILTERING.setPositionInForms(5)\n\nassignment_DATA_SET_FASTQ_GZ_INDEX1 = tr.assignPropertyType(data_set_type_FASTQ_GZ, prop_type_INDEX1)\nassignment_DATA_SET_FASTQ_GZ_INDEX1.setMandatory(False)\nassignment_DATA_SET_FASTQ_GZ_INDEX1.setSection(None)\nassignment_DATA_SET_FASTQ_GZ_INDEX1.setPositionInForms(6)\n\nassignment_DATA_SET_FASTQ_GZ_INDEX2 = tr.assignPropertyType(data_set_type_FASTQ_GZ, prop_type_INDEX2)\nassignment_DATA_SET_FASTQ_GZ_INDEX2.setMandatory(False)\nassignment_DATA_SET_FASTQ_GZ_INDEX2.setSection(None)\nassignment_DATA_SET_FASTQ_GZ_INDEX2.setPositionInForms(7)\n\nassignment_DATA_SET_FASTQ_GZ_PERCENTAGE_RAW_CLUSTERS_PER_LANE = tr.assignPropertyType(data_set_type_FASTQ_GZ, prop_type_PERCENTAGE_RAW_CLUSTERS_PER_LANE)\nassignment_DATA_SET_FASTQ_GZ_PERCENTAGE_RAW_CLUSTERS_PER_LANE.setMandatory(False)\nassignment_DATA_SET_FASTQ_GZ_PERCENTAGE_RAW_CLUSTERS_PER_LANE.setSection(None)\nassignment_DATA_SET_FASTQ_GZ_PERCENTAGE_RAW_CLUSTERS_PER_LANE.setPositionInForms(8)\n\nassignment_DATA_SET_FASTQ_GZ_PERCENTAGE_PERFECT_INDEX_READS = tr.assignPropertyType(data_set_type_FASTQ_GZ, prop_type_PERCENTAGE_PERFECT_INDEX_READS)\nassignment_DATA_SET_FASTQ_GZ_PERCENTAGE_PERFECT_INDEX_READS.setMandatory(False)\nassignment_DATA_SET_FASTQ_GZ_PERCENTAGE_PERFECT_INDEX_READS.setSection(None)\nassignment_DATA_SET_FASTQ_GZ_PERCENTAGE_PERFECT_INDEX_READS.setPositionInForms(9)\n\nassignment_DATA_SET_FASTQ_GZ_PERCENTAGE_ONE_MISMATCH_READS_INDEX = tr.assignPropertyType(data_set_type_FASTQ_GZ, prop_type_PERCENTAGE_ONE_MISMATCH_READS_INDEX)\nassignment_DATA_SET_FASTQ_GZ_PERCENTAGE_ONE_MISMATCH_READS_INDEX.setMandatory(False)\nassignment_DATA_SET_FASTQ_GZ_PERCENTAGE_ONE_MISMATCH_READS_INDEX.setSection(None)\nassignment_DATA_SET_FASTQ_GZ_PERCENTAGE_ONE_MISMATCH_READS_INDEX.setPositionInForms(10)\n\nassignment_EXPERIMENT_HT_SEQUENCING_EXPERIMENT_DESIGN = tr.assignPropertyType(exp_type_HT_SEQUENCING, prop_type_EXPERIMENT_DESIGN)\nassignment_EXPERIMENT_HT_SEQUENCING_EXPERIMENT_DESIGN.setMandatory(False)\nassignment_EXPERIMENT_HT_SEQUENCING_EXPERIMENT_DESIGN.setSection(None)\nassignment_EXPERIMENT_HT_SEQUENCING_EXPERIMENT_DESIGN.setPositionInForms(3)\n\nassignment_SAMPLE_ILLUMINA_FLOW_CELL_RUN_FOLDER_NAME = tr.assignPropertyType(samp_type_ILLUMINA_FLOW_CELL, prop_type_RUN_FOLDER_NAME)\nassignment_SAMPLE_ILLUMINA_FLOW_CELL_RUN_FOLDER_NAME.setMandatory(False)\nassignment_SAMPLE_ILLUMINA_FLOW_CELL_RUN_FOLDER_NAME.setSection(None)\nassignment_SAMPLE_ILLUMINA_FLOW_CELL_RUN_FOLDER_NAME.setPositionInForms(1)\n\nassignment_SAMPLE_ILLUMINA_FLOW_CELL_SEQUENCER = tr.assignPropertyType(samp_type_ILLUMINA_FLOW_CELL, prop_type_SEQUENCER)\nassignment_SAMPLE_ILLUMINA_FLOW_CELL_SEQUENCER.setMandatory(False)\nassignment_SAMPLE_ILLUMINA_FLOW_CELL_SEQUENCER.setSection(None)\nassignment_SAMPLE_ILLUMINA_FLOW_CELL_SEQUENCER.setPositionInForms(5)\n\nassignment_SAMPLE_ILLUMINA_FLOW_CELL_END_TYPE = tr.assignPropertyType(samp_type_ILLUMINA_FLOW_CELL, prop_type_END_TYPE)\nassignment_SAMPLE_ILLUMINA_FLOW_CELL_END_TYPE.setMandatory(False)\nassignment_SAMPLE_ILLUMINA_FLOW_CELL_END_TYPE.setSection(None)\nassignment_SAMPLE_ILLUMINA_FLOW_CELL_END_TYPE.setPositionInForms(7)\n\nassignment_SAMPLE_ILLUMINA_FLOW_CELL_FLOW_CELL_SEQUENCED_ON = tr.assignPropertyType(samp_type_ILLUMINA_FLOW_CELL, prop_type_FLOW_CELL_SEQUENCED_ON)\nassignment_SAMPLE_ILLUMINA_FLOW_CELL_FLOW_CELL_SEQUENCED_ON.setMandatory(False)\nassignment_SAMPLE_ILLUMINA_FLOW_CELL_FLOW_CELL_SEQUENCED_ON.setSection(None)\nassignment_SAMPLE_ILLUMINA_FLOW_CELL_FLOW_CELL_SEQUENCED_ON.setPositionInForms(8)\n\nassignment_SAMPLE_ILLUMINA_FLOW_CELL_SEQUENCER_FINISHED = tr.assignPropertyType(samp_type_ILLUMINA_FLOW_CELL, prop_type_SEQUENCER_FINISHED)\nassignment_SAMPLE_ILLUMINA_FLOW_CELL_SEQUENCER_FINISHED.setMandatory(False)\nassignment_SAMPLE_ILLUMINA_FLOW_CELL_SEQUENCER_FINISHED.setSection(None)\nassignment_SAMPLE_ILLUMINA_FLOW_CELL_SEQUENCER_FINISHED.setPositionInForms(9)\n\nassignment_SAMPLE_ILLUMINA_FLOW_CELL_RUNNINGTIME = tr.assignPropertyType(samp_type_ILLUMINA_FLOW_CELL, prop_type_RUNNINGTIME)\nassignment_SAMPLE_ILLUMINA_FLOW_CELL_RUNNINGTIME.setMandatory(False)\nassignment_SAMPLE_ILLUMINA_FLOW_CELL_RUNNINGTIME.setSection(None)\nassignment_SAMPLE_ILLUMINA_FLOW_CELL_RUNNINGTIME.setPositionInForms(10)\nassignment_SAMPLE_ILLUMINA_FLOW_CELL_RUNNINGTIME.setScriptName('Diff_time')\nassignment_SAMPLE_ILLUMINA_FLOW_CELL_RUNNINGTIME.setDynamic(True)\nassignment_SAMPLE_ILLUMINA_FLOW_CELL_RUNNINGTIME.setManaged(False)\nassignment_SAMPLE_ILLUMINA_FLOW_CELL_RUNNINGTIME.setShownEdit(False)\n\nassignment_SAMPLE_ILLUMINA_FLOW_CELL_ILLUMINA_PIPELINE_VERSION = tr.assignPropertyType(samp_type_ILLUMINA_FLOW_CELL, prop_type_ILLUMINA_PIPELINE_VERSION)\nassignment_SAMPLE_ILLUMINA_FLOW_CELL_ILLUMINA_PIPELINE_VERSION.setMandatory(False)\nassignment_SAMPLE_ILLUMINA_FLOW_CELL_ILLUMINA_PIPELINE_VERSION.setSection(None)\nassignment_SAMPLE_ILLUMINA_FLOW_CELL_ILLUMINA_PIPELINE_VERSION.setPositionInForms(11)\n\nassignment_SAMPLE_ILLUMINA_FLOW_CELL_CYCLES = tr.assignPropertyType(samp_type_ILLUMINA_FLOW_CELL, prop_type_CYCLES)\nassignment_SAMPLE_ILLUMINA_FLOW_CELL_CYCLES.setMandatory(False)\nassignment_SAMPLE_ILLUMINA_FLOW_CELL_CYCLES.setSection(None)\nassignment_SAMPLE_ILLUMINA_FLOW_CELL_CYCLES.setPositionInForms(14)\n\nassignment_SAMPLE_ILLUMINA_FLOW_CELL_INDEXREAD = tr.assignPropertyType(samp_type_ILLUMINA_FLOW_CELL, prop_type_INDEXREAD)\nassignment_SAMPLE_ILLUMINA_FLOW_CELL_INDEXREAD.setMandatory(False)\nassignment_SAMPLE_ILLUMINA_FLOW_CELL_INDEXREAD.setSection(None)\nassignment_SAMPLE_ILLUMINA_FLOW_CELL_INDEXREAD.setPositionInForms(17)\n\nassignment_SAMPLE_ILLUMINA_FLOW_CELL_INDEXREAD2 = tr.assignPropertyType(samp_type_ILLUMINA_FLOW_CELL, prop_type_INDEXREAD2)\nassignment_SAMPLE_ILLUMINA_FLOW_CELL_INDEXREAD2.setMandatory(False)\nassignment_SAMPLE_ILLUMINA_FLOW_CELL_INDEXREAD2.setSection(None)\nassignment_SAMPLE_ILLUMINA_FLOW_CELL_INDEXREAD2.setPositionInForms(18)\n\nassignment_SAMPLE_ILLUMINA_FLOW_CELL_CONTROL_LANE = tr.assignPropertyType(samp_type_ILLUMINA_FLOW_CELL, prop_type_CONTROL_LANE)\nassignment_SAMPLE_ILLUMINA_FLOW_CELL_CONTROL_LANE.setMandatory(False)\nassignment_SAMPLE_ILLUMINA_FLOW_CELL_CONTROL_LANE.setSection(None)\nassignment_SAMPLE_ILLUMINA_FLOW_CELL_CONTROL_LANE.setPositionInForms(19)\n\nassignment_SAMPLE_ILLUMINA_FLOW_CELL_FLOWCELLTYPE = tr.assignPropertyType(samp_type_ILLUMINA_FLOW_CELL, prop_type_FLOWCELLTYPE)\nassignment_SAMPLE_ILLUMINA_FLOW_CELL_FLOWCELLTYPE.setMandatory(False)\nassignment_SAMPLE_ILLUMINA_FLOW_CELL_FLOWCELLTYPE.setSection(None)\nassignment_SAMPLE_ILLUMINA_FLOW_CELL_FLOWCELLTYPE.setPositionInForms(20)\n\nassignment_SAMPLE_ILLUMINA_FLOW_CELL_LANECOUNT = tr.assignPropertyType(samp_type_ILLUMINA_FLOW_CELL, prop_type_LANECOUNT)\nassignment_SAMPLE_ILLUMINA_FLOW_CELL_LANECOUNT.setMandatory(False)\nassignment_SAMPLE_ILLUMINA_FLOW_CELL_LANECOUNT.setSection(None)\nassignment_SAMPLE_ILLUMINA_FLOW_CELL_LANECOUNT.setPositionInForms(21)\n\nassignment_SAMPLE_ILLUMINA_FLOW_CELL_SURFACECOUNT = tr.assignPropertyType(samp_type_ILLUMINA_FLOW_CELL, prop_type_SURFACECOUNT)\nassignment_SAMPLE_ILLUMINA_FLOW_CELL_SURFACECOUNT.setMandatory(False)\nassignment_SAMPLE_ILLUMINA_FLOW_CELL_SURFACECOUNT.setSection(None)\nassignment_SAMPLE_ILLUMINA_FLOW_CELL_SURFACECOUNT.setPositionInForms(22)\n\nassignment_SAMPLE_ILLUMINA_FLOW_CELL_SWATHCOUNT = tr.assignPropertyType(samp_type_ILLUMINA_FLOW_CELL, prop_type_SWATHCOUNT)\nassignment_SAMPLE_ILLUMINA_FLOW_CELL_SWATHCOUNT.setMandatory(False)\nassignment_SAMPLE_ILLUMINA_FLOW_CELL_SWATHCOUNT.setSection(None)\nassignment_SAMPLE_ILLUMINA_FLOW_CELL_SWATHCOUNT.setPositionInForms(23)\n\nassignment_SAMPLE_ILLUMINA_FLOW_CELL_TILECOUNT = tr.assignPropertyType(samp_type_ILLUMINA_FLOW_CELL, prop_type_TILECOUNT)\nassignment_SAMPLE_ILLUMINA_FLOW_CELL_TILECOUNT.setMandatory(False)\nassignment_SAMPLE_ILLUMINA_FLOW_CELL_TILECOUNT.setSection(None)\nassignment_SAMPLE_ILLUMINA_FLOW_CELL_TILECOUNT.setPositionInForms(24)\n\nassignment_SAMPLE_ILLUMINA_FLOW_CELL_SBS_KIT = tr.assignPropertyType(samp_type_ILLUMINA_FLOW_CELL, prop_type_SBS_KIT)\nassignment_SAMPLE_ILLUMINA_FLOW_CELL_SBS_KIT.setMandatory(False)\nassignment_SAMPLE_ILLUMINA_FLOW_CELL_SBS_KIT.setSection(None)\nassignment_SAMPLE_ILLUMINA_FLOW_CELL_SBS_KIT.setPositionInForms(25)\n\nassignment_SAMPLE_ILLUMINA_FLOW_CELL_PAIRED_END_KIT = tr.assignPropertyType(samp_type_ILLUMINA_FLOW_CELL, prop_type_PAIRED_END_KIT)\nassignment_SAMPLE_ILLUMINA_FLOW_CELL_PAIRED_END_KIT.setMandatory(False)\nassignment_SAMPLE_ILLUMINA_FLOW_CELL_PAIRED_END_KIT.setSection(None)\nassignment_SAMPLE_ILLUMINA_FLOW_CELL_PAIRED_END_KIT.setPositionInForms(26)\n\nassignment_SAMPLE_ILLUMINA_FLOW_CELL_CLUSTER_STATION = tr.assignPropertyType(samp_type_ILLUMINA_FLOW_CELL, prop_type_CLUSTER_STATION)\nassignment_SAMPLE_ILLUMINA_FLOW_CELL_CLUSTER_STATION.setMandatory(False)\nassignment_SAMPLE_ILLUMINA_FLOW_CELL_CLUSTER_STATION.setSection('Clustering')\nassignment_SAMPLE_ILLUMINA_FLOW_CELL_CLUSTER_STATION.setPositionInForms(27)\n\nassignment_SAMPLE_ILLUMINA_FLOW_CELL_CREATED_ON_CS = tr.assignPropertyType(samp_type_ILLUMINA_FLOW_CELL, prop_type_CREATED_ON_CS)\nassignment_SAMPLE_ILLUMINA_FLOW_CELL_CREATED_ON_CS.setMandatory(False)\nassignment_SAMPLE_ILLUMINA_FLOW_CELL_CREATED_ON_CS.setSection('Clustering')\nassignment_SAMPLE_ILLUMINA_FLOW_CELL_CREATED_ON_CS.setPositionInForms(28)\n\nassignment_SAMPLE_ILLUMINA_FLOW_CELL_CS_PROTOCOL_VERSION = tr.assignPropertyType(samp_type_ILLUMINA_FLOW_CELL, prop_type_CS_PROTOCOL_VERSION)\nassignment_SAMPLE_ILLUMINA_FLOW_CELL_CS_PROTOCOL_VERSION.setMandatory(False)\nassignment_SAMPLE_ILLUMINA_FLOW_CELL_CS_PROTOCOL_VERSION.setSection('Clustering')\nassignment_SAMPLE_ILLUMINA_FLOW_CELL_CS_PROTOCOL_VERSION.setPositionInForms(29)\n\nassignment_SAMPLE_ILLUMINA_FLOW_CELL_CLUSTER_GENERATION_KIT_VERSION = tr.assignPropertyType(samp_type_ILLUMINA_FLOW_CELL, prop_type_CLUSTER_GENERATION_KIT_VERSION)\nassignment_SAMPLE_ILLUMINA_FLOW_CELL_CLUSTER_GENERATION_KIT_VERSION.setMandatory(False)\nassignment_SAMPLE_ILLUMINA_FLOW_CELL_CLUSTER_GENERATION_KIT_VERSION.setSection('Clustering')\nassignment_SAMPLE_ILLUMINA_FLOW_CELL_CLUSTER_GENERATION_KIT_VERSION.setPositionInForms(30)\n\nassignment_SAMPLE_ILLUMINA_FLOW_CELL_SBS_SEQUENCING_KIT_VERSION = tr.assignPropertyType(samp_type_ILLUMINA_FLOW_CELL, prop_type_SBS_SEQUENCING_KIT_VERSION)\nassignment_SAMPLE_ILLUMINA_FLOW_CELL_SBS_SEQUENCING_KIT_VERSION.setMandatory(False)\nassignment_SAMPLE_ILLUMINA_FLOW_CELL_SBS_SEQUENCING_KIT_VERSION.setSection(None)\nassignment_SAMPLE_ILLUMINA_FLOW_CELL_SBS_SEQUENCING_KIT_VERSION.setPositionInForms(32)\n\nassignment_SAMPLE_ILLUMINA_FLOW_CELL_ANALYSIS_FINISHED = tr.assignPropertyType(samp_type_ILLUMINA_FLOW_CELL, prop_type_ANALYSIS_FINISHED)\nassignment_SAMPLE_ILLUMINA_FLOW_CELL_ANALYSIS_FINISHED.setMandatory(False)\nassignment_SAMPLE_ILLUMINA_FLOW_CELL_ANALYSIS_FINISHED.setSection(None)\nassignment_SAMPLE_ILLUMINA_FLOW_CELL_ANALYSIS_FINISHED.setPositionInForms(34)\n\nassignment_SAMPLE_ILLUMINA_FLOW_CELL_NOTES = tr.assignPropertyType(samp_type_ILLUMINA_FLOW_CELL, prop_type_NOTES)\nassignment_SAMPLE_ILLUMINA_FLOW_CELL_NOTES.setMandatory(False)\nassignment_SAMPLE_ILLUMINA_FLOW_CELL_NOTES.setSection(None)\nassignment_SAMPLE_ILLUMINA_FLOW_CELL_NOTES.setPositionInForms(35)\n\nassignment_SAMPLE_ILLUMINA_FLOW_LANE_CONCENTRATION_FLOWLANE = tr.assignPropertyType(samp_type_ILLUMINA_FLOW_LANE, prop_type_CONCENTRATION_FLOWLANE)\nassignment_SAMPLE_ILLUMINA_FLOW_LANE_CONCENTRATION_FLOWLANE.setMandatory(False)\nassignment_SAMPLE_ILLUMINA_FLOW_LANE_CONCENTRATION_FLOWLANE.setSection(None)\nassignment_SAMPLE_ILLUMINA_FLOW_LANE_CONCENTRATION_FLOWLANE.setPositionInForms(20)\n\nassignment_SAMPLE_ILLUMINA_FLOW_LANE_NOTES = tr.assignPropertyType(samp_type_ILLUMINA_FLOW_LANE, prop_type_NOTES)\nassignment_SAMPLE_ILLUMINA_FLOW_LANE_NOTES.setMandatory(False)\nassignment_SAMPLE_ILLUMINA_FLOW_LANE_NOTES.setSection(None)\nassignment_SAMPLE_ILLUMINA_FLOW_LANE_NOTES.setPositionInForms(23)\n\nassignment_DATA_SET_ILLUMINA_HISEQ_OUTPUT_CASAVA_VERSION = tr.assignPropertyType(data_set_type_ILLUMINA_HISEQ_OUTPUT, prop_type_CASAVA_VERSION)\nassignment_DATA_SET_ILLUMINA_HISEQ_OUTPUT_CASAVA_VERSION.setMandatory(False)\nassignment_DATA_SET_ILLUMINA_HISEQ_OUTPUT_CASAVA_VERSION.setSection(None)\nassignment_DATA_SET_ILLUMINA_HISEQ_OUTPUT_CASAVA_VERSION.setPositionInForms(3)\n\nassignment_SAMPLE_LIBRARY_EXTERNAL_SAMPLE_NAME = tr.assignPropertyType(samp_type_LIBRARY, prop_type_EXTERNAL_SAMPLE_NAME)\nassignment_SAMPLE_LIBRARY_EXTERNAL_SAMPLE_NAME.setMandatory(False)\nassignment_SAMPLE_LIBRARY_EXTERNAL_SAMPLE_NAME.setSection(None)\nassignment_SAMPLE_LIBRARY_EXTERNAL_SAMPLE_NAME.setPositionInForms(1)\n\nassignment_SAMPLE_LIBRARY_KIT = tr.assignPropertyType(samp_type_LIBRARY, prop_type_KIT)\nassignment_SAMPLE_LIBRARY_KIT.setMandatory(False)\nassignment_SAMPLE_LIBRARY_KIT.setSection(None)\nassignment_SAMPLE_LIBRARY_KIT.setPositionInForms(2)\n\nassignment_SAMPLE_LIBRARY_PREPARED_BY = tr.assignPropertyType(samp_type_LIBRARY, prop_type_PREPARED_BY)\nassignment_SAMPLE_LIBRARY_PREPARED_BY.setMandatory(False)\nassignment_SAMPLE_LIBRARY_PREPARED_BY.setSection(None)\nassignment_SAMPLE_LIBRARY_PREPARED_BY.setPositionInForms(3)\n\nassignment_SAMPLE_LIBRARY_STARTING_AMOUNT_OF_SAMPLE_IN_NG = tr.assignPropertyType(samp_type_LIBRARY, prop_type_STARTING_AMOUNT_OF_SAMPLE_IN_NG)\nassignment_SAMPLE_LIBRARY_STARTING_AMOUNT_OF_SAMPLE_IN_NG.setMandatory(False)\nassignment_SAMPLE_LIBRARY_STARTING_AMOUNT_OF_SAMPLE_IN_NG.setSection(None)\nassignment_SAMPLE_LIBRARY_STARTING_AMOUNT_OF_SAMPLE_IN_NG.setPositionInForms(4)\n\nassignment_SAMPLE_LIBRARY_INDEX1 = tr.assignPropertyType(samp_type_LIBRARY, prop_type_INDEX1)\nassignment_SAMPLE_LIBRARY_INDEX1.setMandatory(False)\nassignment_SAMPLE_LIBRARY_INDEX1.setSection(None)\nassignment_SAMPLE_LIBRARY_INDEX1.setPositionInForms(7)\n\nassignment_SAMPLE_LIBRARY_INDEX2 = tr.assignPropertyType(samp_type_LIBRARY, prop_type_INDEX2)\nassignment_SAMPLE_LIBRARY_INDEX2.setMandatory(False)\nassignment_SAMPLE_LIBRARY_INDEX2.setSection(None)\nassignment_SAMPLE_LIBRARY_INDEX2.setPositionInForms(8)\n\nassignment_SAMPLE_LIBRARY_LOT = tr.assignPropertyType(samp_type_LIBRARY, prop_type_LOT)\nassignment_SAMPLE_LIBRARY_LOT.setMandatory(False)\nassignment_SAMPLE_LIBRARY_LOT.setSection(None)\nassignment_SAMPLE_LIBRARY_LOT.setPositionInForms(9)\n\nassignment_SAMPLE_LIBRARY_AGILENT_KIT = tr.assignPropertyType(samp_type_LIBRARY, prop_type_AGILENT_KIT)\nassignment_SAMPLE_LIBRARY_AGILENT_KIT.setMandatory(False)\nassignment_SAMPLE_LIBRARY_AGILENT_KIT.setSection('QC Data')\nassignment_SAMPLE_LIBRARY_AGILENT_KIT.setPositionInForms(10)\n\nassignment_SAMPLE_LIBRARY_FRAGMENT_SIZE_PREPARED_ILLUMINA = tr.assignPropertyType(samp_type_LIBRARY, prop_type_FRAGMENT_SIZE_PREPARED_ILLUMINA)\nassignment_SAMPLE_LIBRARY_FRAGMENT_SIZE_PREPARED_ILLUMINA.setMandatory(False)\nassignment_SAMPLE_LIBRARY_FRAGMENT_SIZE_PREPARED_ILLUMINA.setSection('QC Data')\nassignment_SAMPLE_LIBRARY_FRAGMENT_SIZE_PREPARED_ILLUMINA.setPositionInForms(11)\n\nassignment_SAMPLE_LIBRARY_NANO_DROP = tr.assignPropertyType(samp_type_LIBRARY, prop_type_NANO_DROP)\nassignment_SAMPLE_LIBRARY_NANO_DROP.setMandatory(False)\nassignment_SAMPLE_LIBRARY_NANO_DROP.setSection('QC Data')\nassignment_SAMPLE_LIBRARY_NANO_DROP.setPositionInForms(12)\n\nassignment_SAMPLE_LIBRARY_CONCENTRATION_PREPARED_ILLUMINA = tr.assignPropertyType(samp_type_LIBRARY, prop_type_CONCENTRATION_PREPARED_ILLUMINA)\nassignment_SAMPLE_LIBRARY_CONCENTRATION_PREPARED_ILLUMINA.setMandatory(False)\nassignment_SAMPLE_LIBRARY_CONCENTRATION_PREPARED_ILLUMINA.setSection('QC Data')\nassignment_SAMPLE_LIBRARY_CONCENTRATION_PREPARED_ILLUMINA.setPositionInForms(13)\n\nassignment_SAMPLE_LIBRARY_DNA_CONCENTRATION_OF_LIBRARY = tr.assignPropertyType(samp_type_LIBRARY, prop_type_DNA_CONCENTRATION_OF_LIBRARY)\nassignment_SAMPLE_LIBRARY_DNA_CONCENTRATION_OF_LIBRARY.setMandatory(False)\nassignment_SAMPLE_LIBRARY_DNA_CONCENTRATION_OF_LIBRARY.setSection('QC Data')\nassignment_SAMPLE_LIBRARY_DNA_CONCENTRATION_OF_LIBRARY.setPositionInForms(14)\n\nassignment_SAMPLE_LIBRARY_LIBRARY_PROCESSING_SUCCESSFUL = tr.assignPropertyType(samp_type_LIBRARY, prop_type_LIBRARY_PROCESSING_SUCCESSFUL)\nassignment_SAMPLE_LIBRARY_LIBRARY_PROCESSING_SUCCESSFUL.setMandatory(False)\nassignment_SAMPLE_LIBRARY_LIBRARY_PROCESSING_SUCCESSFUL.setSection('QC Data')\nassignment_SAMPLE_LIBRARY_LIBRARY_PROCESSING_SUCCESSFUL.setPositionInForms(15)\n\nassignment_SAMPLE_LIBRARY_LIBRARY_PROCESSING_FAILED = tr.assignPropertyType(samp_type_LIBRARY, prop_type_LIBRARY_PROCESSING_FAILED)\nassignment_SAMPLE_LIBRARY_LIBRARY_PROCESSING_FAILED.setMandatory(False)\nassignment_SAMPLE_LIBRARY_LIBRARY_PROCESSING_FAILED.setSection('QC Data')\nassignment_SAMPLE_LIBRARY_LIBRARY_PROCESSING_FAILED.setPositionInForms(16)\n\nassignment_SAMPLE_LIBRARY_QC_AT_DBSSE = tr.assignPropertyType(samp_type_LIBRARY, prop_type_QC_AT_DBSSE)\nassignment_SAMPLE_LIBRARY_QC_AT_DBSSE.setMandatory(False)\nassignment_SAMPLE_LIBRARY_QC_AT_DBSSE.setSection('QC Data')\nassignment_SAMPLE_LIBRARY_QC_AT_DBSSE.setPositionInForms(17)\n\nassignment_SAMPLE_LIBRARY_KIT_PREPARED = tr.assignPropertyType(samp_type_LIBRARY, prop_type_KIT_PREPARED)\nassignment_SAMPLE_LIBRARY_KIT_PREPARED.setMandatory(False)\nassignment_SAMPLE_LIBRARY_KIT_PREPARED.setSection(None)\nassignment_SAMPLE_LIBRARY_KIT_PREPARED.setPositionInForms(18)\n\nassignment_SAMPLE_LIBRARY_DATA_TRANSFERRED = tr.assignPropertyType(samp_type_LIBRARY, prop_type_DATA_TRANSFERRED)\nassignment_SAMPLE_LIBRARY_DATA_TRANSFERRED.setMandatory(False)\nassignment_SAMPLE_LIBRARY_DATA_TRANSFERRED.setSection(None)\nassignment_SAMPLE_LIBRARY_DATA_TRANSFERRED.setPositionInForms(19)\n\nassignment_SAMPLE_LIBRARY_INVOICE = tr.assignPropertyType(samp_type_LIBRARY, prop_type_INVOICE)\nassignment_SAMPLE_LIBRARY_INVOICE.setMandatory(False)\nassignment_SAMPLE_LIBRARY_INVOICE.setSection(None)\nassignment_SAMPLE_LIBRARY_INVOICE.setPositionInForms(20)\n\nassignment_SAMPLE_LIBRARY_NOTES = tr.assignPropertyType(samp_type_LIBRARY, prop_type_NOTES)\nassignment_SAMPLE_LIBRARY_NOTES.setMandatory(False)\nassignment_SAMPLE_LIBRARY_NOTES.setSection(None)\nassignment_SAMPLE_LIBRARY_NOTES.setPositionInForms(33)\n\nassignment_SAMPLE_LIBRARY_POOL_EXTERNAL_SAMPLE_NAME = tr.assignPropertyType(samp_type_LIBRARY_POOL, prop_type_EXTERNAL_SAMPLE_NAME)\nassignment_SAMPLE_LIBRARY_POOL_EXTERNAL_SAMPLE_NAME.setMandatory(False)\nassignment_SAMPLE_LIBRARY_POOL_EXTERNAL_SAMPLE_NAME.setSection(None)\nassignment_SAMPLE_LIBRARY_POOL_EXTERNAL_SAMPLE_NAME.setPositionInForms(1)\n\nassignment_SAMPLE_LIBRARY_POOL_PREPARED_BY = tr.assignPropertyType(samp_type_LIBRARY_POOL, prop_type_PREPARED_BY)\nassignment_SAMPLE_LIBRARY_POOL_PREPARED_BY.setMandatory(False)\nassignment_SAMPLE_LIBRARY_POOL_PREPARED_BY.setSection(None)\nassignment_SAMPLE_LIBRARY_POOL_PREPARED_BY.setPositionInForms(2)\n\nassignment_SAMPLE_LIBRARY_POOL_DNA_CONCENTRATION_POOL = tr.assignPropertyType(samp_type_LIBRARY_POOL, prop_type_DNA_CONCENTRATION_POOL)\nassignment_SAMPLE_LIBRARY_POOL_DNA_CONCENTRATION_POOL.setMandatory(False)\nassignment_SAMPLE_LIBRARY_POOL_DNA_CONCENTRATION_POOL.setSection(None)\nassignment_SAMPLE_LIBRARY_POOL_DNA_CONCENTRATION_POOL.setPositionInForms(3)\n\nassignment_SAMPLE_LIBRARY_POOL_QC_REQUIRED = tr.assignPropertyType(samp_type_LIBRARY_POOL, prop_type_QC_REQUIRED)\nassignment_SAMPLE_LIBRARY_POOL_QC_REQUIRED.setMandatory(False)\nassignment_SAMPLE_LIBRARY_POOL_QC_REQUIRED.setSection(None)\nassignment_SAMPLE_LIBRARY_POOL_QC_REQUIRED.setPositionInForms(4)\n\nassignment_SAMPLE_LIBRARY_POOL_AGILENT_KIT = tr.assignPropertyType(samp_type_LIBRARY_POOL, prop_type_AGILENT_KIT)\nassignment_SAMPLE_LIBRARY_POOL_AGILENT_KIT.setMandatory(False)\nassignment_SAMPLE_LIBRARY_POOL_AGILENT_KIT.setSection('QC Data')\nassignment_SAMPLE_LIBRARY_POOL_AGILENT_KIT.setPositionInForms(5)\n\nassignment_SAMPLE_LIBRARY_POOL_FRAGMENT_SIZE_BASE_PAIRS = tr.assignPropertyType(samp_type_LIBRARY_POOL, prop_type_FRAGMENT_SIZE_BASE_PAIRS)\nassignment_SAMPLE_LIBRARY_POOL_FRAGMENT_SIZE_BASE_PAIRS.setMandatory(False)\nassignment_SAMPLE_LIBRARY_POOL_FRAGMENT_SIZE_BASE_PAIRS.setSection('QC Data')\nassignment_SAMPLE_LIBRARY_POOL_FRAGMENT_SIZE_BASE_PAIRS.setPositionInForms(6)\n\nassignment_SAMPLE_LIBRARY_POOL_NANO_DROP = tr.assignPropertyType(samp_type_LIBRARY_POOL, prop_type_NANO_DROP)\nassignment_SAMPLE_LIBRARY_POOL_NANO_DROP.setMandatory(False)\nassignment_SAMPLE_LIBRARY_POOL_NANO_DROP.setSection('QC Data')\nassignment_SAMPLE_LIBRARY_POOL_NANO_DROP.setPositionInForms(7)\n\nassignment_SAMPLE_LIBRARY_POOL_CONCENTRATION = tr.assignPropertyType(samp_type_LIBRARY_POOL, prop_type_CONCENTRATION)\nassignment_SAMPLE_LIBRARY_POOL_CONCENTRATION.setMandatory(False)\nassignment_SAMPLE_LIBRARY_POOL_CONCENTRATION.setSection('QC Data')\nassignment_SAMPLE_LIBRARY_POOL_CONCENTRATION.setPositionInForms(8)\n\nassignment_SAMPLE_LIBRARY_POOL_DNA_CONCENTRATION_QGF = tr.assignPropertyType(samp_type_LIBRARY_POOL, prop_type_DNA_CONCENTRATION_QGF)\nassignment_SAMPLE_LIBRARY_POOL_DNA_CONCENTRATION_QGF.setMandatory(False)\nassignment_SAMPLE_LIBRARY_POOL_DNA_CONCENTRATION_QGF.setSection('QC Data')\nassignment_SAMPLE_LIBRARY_POOL_DNA_CONCENTRATION_QGF.setPositionInForms(9)\n\nassignment_SAMPLE_LIBRARY_POOL_INVOICE = tr.assignPropertyType(samp_type_LIBRARY_POOL, prop_type_INVOICE)\nassignment_SAMPLE_LIBRARY_POOL_INVOICE.setMandatory(False)\nassignment_SAMPLE_LIBRARY_POOL_INVOICE.setSection(None)\nassignment_SAMPLE_LIBRARY_POOL_INVOICE.setPositionInForms(10)\n\nassignment_SAMPLE_LIBRARY_POOL_NOTES = tr.assignPropertyType(samp_type_LIBRARY_POOL, prop_type_NOTES)\nassignment_SAMPLE_LIBRARY_POOL_NOTES.setMandatory(False)\nassignment_SAMPLE_LIBRARY_POOL_NOTES.setSection(None)\nassignment_SAMPLE_LIBRARY_POOL_NOTES.setPositionInForms(11)\n\nassignment_DATA_SET_MACS_OUTPUT_MACS_VERSION = tr.assignPropertyType(data_set_type_MACS_OUTPUT, prop_type_MACS_VERSION)\nassignment_DATA_SET_MACS_OUTPUT_MACS_VERSION.setMandatory(False)\nassignment_DATA_SET_MACS_OUTPUT_MACS_VERSION.setSection(None)\nassignment_DATA_SET_MACS_OUTPUT_MACS_VERSION.setPositionInForms(3)\n\nassignment_DATA_SET_MACS_OUTPUT_NOTES = tr.assignPropertyType(data_set_type_MACS_OUTPUT, prop_type_NOTES)\nassignment_DATA_SET_MACS_OUTPUT_NOTES.setMandatory(False)\nassignment_DATA_SET_MACS_OUTPUT_NOTES.setSection(None)\nassignment_DATA_SET_MACS_OUTPUT_NOTES.setPositionInForms(4)\n\nassignment_SAMPLE_MASTER_SAMPLE_BIOLOGICAL_SAMPLE_ARRIVED = tr.assignPropertyType(samp_type_MASTER_SAMPLE, prop_type_BIOLOGICAL_SAMPLE_ARRIVED)\nassignment_SAMPLE_MASTER_SAMPLE_BIOLOGICAL_SAMPLE_ARRIVED.setMandatory(True)\nassignment_SAMPLE_MASTER_SAMPLE_BIOLOGICAL_SAMPLE_ARRIVED.setSection(None)\nassignment_SAMPLE_MASTER_SAMPLE_BIOLOGICAL_SAMPLE_ARRIVED.setPositionInForms(1)\n\nassignment_SAMPLE_MASTER_SAMPLE_CONTACT_PERSON_EMAIL = tr.assignPropertyType(samp_type_MASTER_SAMPLE, prop_type_CONTACT_PERSON_EMAIL)\nassignment_SAMPLE_MASTER_SAMPLE_CONTACT_PERSON_EMAIL.setMandatory(True)\nassignment_SAMPLE_MASTER_SAMPLE_CONTACT_PERSON_EMAIL.setSection(None)\nassignment_SAMPLE_MASTER_SAMPLE_CONTACT_PERSON_EMAIL.setPositionInForms(2)\n\nassignment_SAMPLE_MASTER_SAMPLE_CONTACT_PERSON_NAME = tr.assignPropertyType(samp_type_MASTER_SAMPLE, prop_type_CONTACT_PERSON_NAME)\nassignment_SAMPLE_MASTER_SAMPLE_CONTACT_PERSON_NAME.setMandatory(True)\nassignment_SAMPLE_MASTER_SAMPLE_CONTACT_PERSON_NAME.setSection(None)\nassignment_SAMPLE_MASTER_SAMPLE_CONTACT_PERSON_NAME.setPositionInForms(3)\n\nassignment_SAMPLE_MASTER_SAMPLE_PRINCIPAL_INVESTIGATOR_EMAIL = tr.assignPropertyType(samp_type_MASTER_SAMPLE, prop_type_PRINCIPAL_INVESTIGATOR_EMAIL)\nassignment_SAMPLE_MASTER_SAMPLE_PRINCIPAL_INVESTIGATOR_EMAIL.setMandatory(True)\nassignment_SAMPLE_MASTER_SAMPLE_PRINCIPAL_INVESTIGATOR_EMAIL.setSection(None)\nassignment_SAMPLE_MASTER_SAMPLE_PRINCIPAL_INVESTIGATOR_EMAIL.setPositionInForms(4)\n\nassignment_SAMPLE_MASTER_SAMPLE_PRINCIPAL_INVESTIGATOR_NAME = tr.assignPropertyType(samp_type_MASTER_SAMPLE, prop_type_PRINCIPAL_INVESTIGATOR_NAME)\nassignment_SAMPLE_MASTER_SAMPLE_PRINCIPAL_INVESTIGATOR_NAME.setMandatory(True)\nassignment_SAMPLE_MASTER_SAMPLE_PRINCIPAL_INVESTIGATOR_NAME.setSection(None)\nassignment_SAMPLE_MASTER_SAMPLE_PRINCIPAL_INVESTIGATOR_NAME.setPositionInForms(5)\n\nassignment_SAMPLE_MASTER_SAMPLE_NCBI_ORGANISM_TAXONOMY = tr.assignPropertyType(samp_type_MASTER_SAMPLE, prop_type_NCBI_ORGANISM_TAXONOMY)\nassignment_SAMPLE_MASTER_SAMPLE_NCBI_ORGANISM_TAXONOMY.setMandatory(True)\nassignment_SAMPLE_MASTER_SAMPLE_NCBI_ORGANISM_TAXONOMY.setSection(None)\nassignment_SAMPLE_MASTER_SAMPLE_NCBI_ORGANISM_TAXONOMY.setPositionInForms(7)\n\nassignment_SAMPLE_MASTER_SAMPLE_SAMPLE_KIND = tr.assignPropertyType(samp_type_MASTER_SAMPLE, prop_type_SAMPLE_KIND)\nassignment_SAMPLE_MASTER_SAMPLE_SAMPLE_KIND.setMandatory(True)\nassignment_SAMPLE_MASTER_SAMPLE_SAMPLE_KIND.setSection(None)\nassignment_SAMPLE_MASTER_SAMPLE_SAMPLE_KIND.setPositionInForms(21)\n\nassignment_SAMPLE_MASTER_SAMPLE_NOTES = tr.assignPropertyType(samp_type_MASTER_SAMPLE, prop_type_NOTES)\nassignment_SAMPLE_MASTER_SAMPLE_NOTES.setMandatory(False)\nassignment_SAMPLE_MASTER_SAMPLE_NOTES.setSection(None)\nassignment_SAMPLE_MASTER_SAMPLE_NOTES.setPositionInForms(22)\n\nassignment_SAMPLE_RAW_SAMPLE_EXTERNAL_SAMPLE_NAME = tr.assignPropertyType(samp_type_RAW_SAMPLE, prop_type_EXTERNAL_SAMPLE_NAME)\nassignment_SAMPLE_RAW_SAMPLE_EXTERNAL_SAMPLE_NAME.setMandatory(False)\nassignment_SAMPLE_RAW_SAMPLE_EXTERNAL_SAMPLE_NAME.setSection(None)\nassignment_SAMPLE_RAW_SAMPLE_EXTERNAL_SAMPLE_NAME.setPositionInForms(1)\n\nassignment_SAMPLE_RAW_SAMPLE_CONCENTRATION_ORIGINAL_ILLUMINA = tr.assignPropertyType(samp_type_RAW_SAMPLE, prop_type_CONCENTRATION_ORIGINAL_ILLUMINA)\nassignment_SAMPLE_RAW_SAMPLE_CONCENTRATION_ORIGINAL_ILLUMINA.setMandatory(False)\nassignment_SAMPLE_RAW_SAMPLE_CONCENTRATION_ORIGINAL_ILLUMINA.setSection(None)\nassignment_SAMPLE_RAW_SAMPLE_CONCENTRATION_ORIGINAL_ILLUMINA.setPositionInForms(4)\n\nassignment_SAMPLE_RAW_SAMPLE_PREPARED_BY = tr.assignPropertyType(samp_type_RAW_SAMPLE, prop_type_PREPARED_BY)\nassignment_SAMPLE_RAW_SAMPLE_PREPARED_BY.setMandatory(False)\nassignment_SAMPLE_RAW_SAMPLE_PREPARED_BY.setSection(None)\nassignment_SAMPLE_RAW_SAMPLE_PREPARED_BY.setPositionInForms(8)\n\nassignment_SAMPLE_RAW_SAMPLE_KIT_PREPARED = tr.assignPropertyType(samp_type_RAW_SAMPLE, prop_type_KIT_PREPARED)\nassignment_SAMPLE_RAW_SAMPLE_KIT_PREPARED.setMandatory(False)\nassignment_SAMPLE_RAW_SAMPLE_KIT_PREPARED.setSection(None)\nassignment_SAMPLE_RAW_SAMPLE_KIT_PREPARED.setPositionInForms(9)\n\nassignment_SAMPLE_RAW_SAMPLE_LIBRARY_PROCESSING_POSSIBLE_YES_NO = tr.assignPropertyType(samp_type_RAW_SAMPLE, prop_type_LIBRARY_PROCESSING_POSSIBLE_YES_NO)\nassignment_SAMPLE_RAW_SAMPLE_LIBRARY_PROCESSING_POSSIBLE_YES_NO.setMandatory(False)\nassignment_SAMPLE_RAW_SAMPLE_LIBRARY_PROCESSING_POSSIBLE_YES_NO.setSection(None)\nassignment_SAMPLE_RAW_SAMPLE_LIBRARY_PROCESSING_POSSIBLE_YES_NO.setPositionInForms(10)\n\nassignment_SAMPLE_RAW_SAMPLE_NOTES = tr.assignPropertyType(samp_type_RAW_SAMPLE, prop_type_NOTES)\nassignment_SAMPLE_RAW_SAMPLE_NOTES.setMandatory(False)\nassignment_SAMPLE_RAW_SAMPLE_NOTES.setSection(None)\nassignment_SAMPLE_RAW_SAMPLE_NOTES.setPositionInForms(13)\n\nprint "Imported 104 Property Assignments" \nprint "Imported 0 External DMSs" \nprint ("Import of Master Data finished.") \n 2 proteomics 1 2013-04-12 10:05:45.583358+02 import ch.systemsx.cisd.openbis.generic.server.jython.api.v1.DataType as DataType\n\ntr = service.transaction()\n\nvocabulary_TREATMENT_TYPE = tr.getOrCreateNewVocabulary('TREATMENT_TYPE')\nvocabulary_TREATMENT_TYPE.setDescription('Type of treatment of a biological sample.')\nvocabulary_TREATMENT_TYPE.setUrlTemplate(None)\nvocabulary_TREATMENT_TYPE.setManagedInternally(False)\nvocabulary_TREATMENT_TYPE.setInternalNamespace(False)\nvocabulary_TREATMENT_TYPE.setChosenFromList(True)\n\nexp_type_MS_SEARCH = tr.getOrCreateNewExperimentType('MS_SEARCH')\nexp_type_MS_SEARCH.setDescription('MS_SEARCH experiment')\n\nsamp_type_MS_INJECTION = tr.getOrCreateNewSampleType('MS_INJECTION')\nsamp_type_MS_INJECTION.setDescription('injection of a biological sample into a MS')\nsamp_type_MS_INJECTION.setListable(True)\nsamp_type_MS_INJECTION.setSubcodeUnique(False)\nsamp_type_MS_INJECTION.setAutoGeneratedCode(False)\nsamp_type_MS_INJECTION.setGeneratedCodePrefix('S')\n\nsamp_type_SEARCH = tr.getOrCreateNewSampleType('SEARCH')\nsamp_type_SEARCH.setDescription('pointer to an MS_INJECTION sample used as placeholder for searches')\nsamp_type_SEARCH.setListable(True)\nsamp_type_SEARCH.setSubcodeUnique(False)\nsamp_type_SEARCH.setAutoGeneratedCode(False)\nsamp_type_SEARCH.setGeneratedCodePrefix('S')\n\ndata_set_type_PROT_RESULT = tr.getOrCreateNewDataSetType('PROT_RESULT')\ndata_set_type_PROT_RESULT.setDescription('protXML file')\ndata_set_type_PROT_RESULT.setContainerType(False)\n\n 3 screening 4 2013-04-12 10:05:46.102969+02 import ch.systemsx.cisd.openbis.generic.server.jython.api.v1.DataType as DataType\n\ntr = service.transaction()\n\nfile_type_PNG = tr.getOrCreateNewFileFormatType('PNG')\nfile_type_PNG.setDescription(None)\n\nfile_type_UNKNOWN = tr.getOrCreateNewFileFormatType('UNKNOWN')\nfile_type_UNKNOWN.setDescription('Unknown file format')\n\nvocabulary_PLATE_GEOMETRY = tr.getOrCreateNewVocabulary('PLATE_GEOMETRY')\nvocabulary_PLATE_GEOMETRY.setDescription('The geometry or dimensions of a plate')\nvocabulary_PLATE_GEOMETRY.setUrlTemplate(None)\nvocabulary_PLATE_GEOMETRY.setManagedInternally(True)\nvocabulary_PLATE_GEOMETRY.setInternalNamespace(True)\nvocabulary_PLATE_GEOMETRY.setChosenFromList(True)\n\nvocabulary_term_PLATE_GEOMETRY_48_WELLS_6X8 = tr.createNewVocabularyTerm('48_WELLS_6X8')\nvocabulary_term_PLATE_GEOMETRY_48_WELLS_6X8.setDescription(None)\nvocabulary_term_PLATE_GEOMETRY_48_WELLS_6X8.setLabel('48 Wells, 6x8')\nvocabulary_term_PLATE_GEOMETRY_48_WELLS_6X8.setOrdinal(5)\nvocabulary_PLATE_GEOMETRY.addTerm(vocabulary_term_PLATE_GEOMETRY_48_WELLS_6X8)\n\nvocabulary_term_PLATE_GEOMETRY_24_WELLS_4X6 = tr.createNewVocabularyTerm('24_WELLS_4X6')\nvocabulary_term_PLATE_GEOMETRY_24_WELLS_4X6.setDescription(None)\nvocabulary_term_PLATE_GEOMETRY_24_WELLS_4X6.setLabel('24 Wells, 4x6')\nvocabulary_term_PLATE_GEOMETRY_24_WELLS_4X6.setOrdinal(4)\nvocabulary_PLATE_GEOMETRY.addTerm(vocabulary_term_PLATE_GEOMETRY_24_WELLS_4X6)\n\nvocabulary_term_PLATE_GEOMETRY_1536_WELLS_32X48 = tr.createNewVocabularyTerm('1536_WELLS_32X48')\nvocabulary_term_PLATE_GEOMETRY_1536_WELLS_32X48.setDescription(None)\nvocabulary_term_PLATE_GEOMETRY_1536_WELLS_32X48.setLabel('1536 Wells, 32x48')\nvocabulary_term_PLATE_GEOMETRY_1536_WELLS_32X48.setOrdinal(3)\nvocabulary_PLATE_GEOMETRY.addTerm(vocabulary_term_PLATE_GEOMETRY_1536_WELLS_32X48)\n\nvocabulary_term_PLATE_GEOMETRY_96_WELLS_8X12 = tr.createNewVocabularyTerm('96_WELLS_8X12')\nvocabulary_term_PLATE_GEOMETRY_96_WELLS_8X12.setDescription(None)\nvocabulary_term_PLATE_GEOMETRY_96_WELLS_8X12.setLabel('96 Wells, 8x12')\nvocabulary_term_PLATE_GEOMETRY_96_WELLS_8X12.setOrdinal(2)\nvocabulary_PLATE_GEOMETRY.addTerm(vocabulary_term_PLATE_GEOMETRY_96_WELLS_8X12)\n\nvocabulary_term_PLATE_GEOMETRY_384_WELLS_16X24 = tr.createNewVocabularyTerm('384_WELLS_16X24')\nvocabulary_term_PLATE_GEOMETRY_384_WELLS_16X24.setDescription(None)\nvocabulary_term_PLATE_GEOMETRY_384_WELLS_16X24.setLabel('384 Wells, 16x24')\nvocabulary_term_PLATE_GEOMETRY_384_WELLS_16X24.setOrdinal(1)\nvocabulary_PLATE_GEOMETRY.addTerm(vocabulary_term_PLATE_GEOMETRY_384_WELLS_16X24)\n\nsamp_type_CONTROL_WELL = tr.getOrCreateNewSampleType('CONTROL_WELL')\nsamp_type_CONTROL_WELL.setDescription(None)\nsamp_type_CONTROL_WELL.setListable(False)\nsamp_type_CONTROL_WELL.setSubcodeUnique(False)\nsamp_type_CONTROL_WELL.setAutoGeneratedCode(False)\nsamp_type_CONTROL_WELL.setGeneratedCodePrefix('C')\n\nsamp_type_LIBRARY = tr.getOrCreateNewSampleType('LIBRARY')\nsamp_type_LIBRARY.setDescription(None)\nsamp_type_LIBRARY.setListable(False)\nsamp_type_LIBRARY.setSubcodeUnique(False)\nsamp_type_LIBRARY.setAutoGeneratedCode(False)\nsamp_type_LIBRARY.setGeneratedCodePrefix('L')\n\nsamp_type_PLATE = tr.getOrCreateNewSampleType('PLATE')\nsamp_type_PLATE.setDescription('Cell Plate')\nsamp_type_PLATE.setListable(True)\nsamp_type_PLATE.setSubcodeUnique(False)\nsamp_type_PLATE.setAutoGeneratedCode(False)\nsamp_type_PLATE.setGeneratedCodePrefix('S')\n\nsamp_type_SIRNA_WELL = tr.getOrCreateNewSampleType('SIRNA_WELL')\nsamp_type_SIRNA_WELL.setDescription(None)\nsamp_type_SIRNA_WELL.setListable(False)\nsamp_type_SIRNA_WELL.setSubcodeUnique(False)\nsamp_type_SIRNA_WELL.setAutoGeneratedCode(False)\nsamp_type_SIRNA_WELL.setGeneratedCodePrefix('O')\n\ndata_set_type_HCS_ANALYSIS_WELL_FEATURES = tr.getOrCreateNewDataSetType('HCS_ANALYSIS_WELL_FEATURES')\ndata_set_type_HCS_ANALYSIS_WELL_FEATURES.setDescription('HCS image analysis well feature vectors.')\ndata_set_type_HCS_ANALYSIS_WELL_FEATURES.setContainerType(False)\n\ndata_set_type_HCS_IMAGE_OVERVIEW = tr.getOrCreateNewDataSetType('HCS_IMAGE_OVERVIEW')\ndata_set_type_HCS_IMAGE_OVERVIEW.setDescription('Overview High Content Screening Images. Generated from raw images.')\ndata_set_type_HCS_IMAGE_OVERVIEW.setContainerType(False)\n\ndata_set_type_HCS_IMAGE_RAW = tr.getOrCreateNewDataSetType('HCS_IMAGE_RAW')\ndata_set_type_HCS_IMAGE_RAW.setDescription('Raw High Content Screening Images')\ndata_set_type_HCS_IMAGE_RAW.setContainerType(False)\n\ndata_set_type_HCS_IMAGE_SEGMENTATION = tr.getOrCreateNewDataSetType('HCS_IMAGE_SEGMENTATION')\ndata_set_type_HCS_IMAGE_SEGMENTATION.setDescription('HCS Segmentation Images (overlays).')\ndata_set_type_HCS_IMAGE_SEGMENTATION.setContainerType(False)\n\ndata_set_type_HCS_IMAGE_CONTAINER_RAW = tr.getOrCreateNewDataSetType('HCS_IMAGE_CONTAINER_RAW')\ndata_set_type_HCS_IMAGE_CONTAINER_RAW.setDescription('Container for HCS images of different resolutions (raw, overviews, thumbnails).')\ndata_set_type_HCS_IMAGE_CONTAINER_RAW.setContainerType(True)\n\ndata_set_type_HCS_ANALYSIS_FEATURES_LIST = tr.getOrCreateNewDataSetType('HCS_ANALYSIS_FEATURES_LIST')\ndata_set_type_HCS_ANALYSIS_FEATURES_LIST.setDescription('The list (or group) of features. The subset of features from feature vectors.')\ndata_set_type_HCS_ANALYSIS_FEATURES_LIST.setContainerType(False)\n\nmaterial_type_COMPOUND = tr.getOrCreateNewMaterialType('COMPOUND')\nmaterial_type_COMPOUND.setDescription('Compound')\n\nmaterial_type_CONTROL = tr.getOrCreateNewMaterialType('CONTROL')\nmaterial_type_CONTROL.setDescription('Control of a control layout')\n\nmaterial_type_GENE = tr.getOrCreateNewMaterialType('GENE')\nmaterial_type_GENE.setDescription('Gene')\n\nmaterial_type_SIRNA = tr.getOrCreateNewMaterialType('SIRNA')\nmaterial_type_SIRNA.setDescription('Oligo nucleotide')\n\nprop_type_ANALYSIS_PROCEDURE = tr.getOrCreateNewPropertyType('ANALYSIS_PROCEDURE', DataType.VARCHAR)\nprop_type_ANALYSIS_PROCEDURE.setLabel('Analysis procedure')\nprop_type_ANALYSIS_PROCEDURE.setManagedInternally(False)\nprop_type_ANALYSIS_PROCEDURE.setInternalNamespace(True)\n\nprop_type_RESOLUTION = tr.getOrCreateNewPropertyType('RESOLUTION', DataType.VARCHAR)\nprop_type_RESOLUTION.setLabel('Resolution')\nprop_type_RESOLUTION.setManagedInternally(False)\nprop_type_RESOLUTION.setInternalNamespace(True)\n\nprop_type_PLATE_GEOMETRY = tr.getOrCreateNewPropertyType('PLATE_GEOMETRY', DataType.CONTROLLEDVOCABULARY)\nprop_type_PLATE_GEOMETRY.setLabel('Plate Geometry')\nprop_type_PLATE_GEOMETRY.setManagedInternally(True)\nprop_type_PLATE_GEOMETRY.setInternalNamespace(True)\nprop_type_PLATE_GEOMETRY.setVocabulary(vocabulary_PLATE_GEOMETRY)\n\nprop_type_CONTROL = tr.getOrCreateNewPropertyType('CONTROL', DataType.MATERIAL)\nprop_type_CONTROL.setLabel('Control')\nprop_type_CONTROL.setManagedInternally(True)\nprop_type_CONTROL.setInternalNamespace(False)\nprop_type_CONTROL.setMaterialType(material_type_CONTROL)\n\n# Already exists in the database\nprop_type_DESCRIPTION = tr.getPropertyType('DESCRIPTION')\n\nprop_type_GENE = tr.getOrCreateNewPropertyType('GENE', DataType.MATERIAL)\nprop_type_GENE.setLabel('Gene')\nprop_type_GENE.setManagedInternally(True)\nprop_type_GENE.setInternalNamespace(False)\nprop_type_GENE.setMaterialType(material_type_GENE)\n\nprop_type_GENE_SYMBOLS = tr.getOrCreateNewPropertyType('GENE_SYMBOLS', DataType.VARCHAR)\nprop_type_GENE_SYMBOLS.setLabel('Gene symbols')\nprop_type_GENE_SYMBOLS.setManagedInternally(True)\nprop_type_GENE_SYMBOLS.setInternalNamespace(False)\n\nprop_type_INHIBITOR_OF = tr.getOrCreateNewPropertyType('INHIBITOR_OF', DataType.MATERIAL)\nprop_type_INHIBITOR_OF.setLabel('Inhibitor Of')\nprop_type_INHIBITOR_OF.setManagedInternally(True)\nprop_type_INHIBITOR_OF.setInternalNamespace(False)\nprop_type_INHIBITOR_OF.setMaterialType(material_type_GENE)\n\nprop_type_LIBRARY_ID = tr.getOrCreateNewPropertyType('LIBRARY_ID', DataType.VARCHAR)\nprop_type_LIBRARY_ID.setLabel('Library ID')\nprop_type_LIBRARY_ID.setManagedInternally(True)\nprop_type_LIBRARY_ID.setInternalNamespace(False)\n\nprop_type_NUCLEOTIDE_SEQUENCE = tr.getOrCreateNewPropertyType('NUCLEOTIDE_SEQUENCE', DataType.VARCHAR)\nprop_type_NUCLEOTIDE_SEQUENCE.setLabel('Nucleotide Sequence')\nprop_type_NUCLEOTIDE_SEQUENCE.setManagedInternally(True)\nprop_type_NUCLEOTIDE_SEQUENCE.setInternalNamespace(False)\n\nprop_type_SIRNA = tr.getOrCreateNewPropertyType('SIRNA', DataType.MATERIAL)\nprop_type_SIRNA.setLabel('siRNA')\nprop_type_SIRNA.setManagedInternally(True)\nprop_type_SIRNA.setInternalNamespace(False)\nprop_type_SIRNA.setMaterialType(material_type_SIRNA)\n\nassignment_MATERIAL_COMPOUND_DESCRIPTION = tr.assignPropertyType(material_type_COMPOUND, prop_type_DESCRIPTION)\nassignment_MATERIAL_COMPOUND_DESCRIPTION.setMandatory(False)\nassignment_MATERIAL_COMPOUND_DESCRIPTION.setSection(None)\nassignment_MATERIAL_COMPOUND_DESCRIPTION.setPositionInForms(1)\n\nassignment_MATERIAL_CONTROL_DESCRIPTION = tr.assignPropertyType(material_type_CONTROL, prop_type_DESCRIPTION)\nassignment_MATERIAL_CONTROL_DESCRIPTION.setMandatory(False)\nassignment_MATERIAL_CONTROL_DESCRIPTION.setSection(None)\nassignment_MATERIAL_CONTROL_DESCRIPTION.setPositionInForms(1)\n\nassignment_SAMPLE_CONTROL_WELL_CONTROL = tr.assignPropertyType(samp_type_CONTROL_WELL, prop_type_CONTROL)\nassignment_SAMPLE_CONTROL_WELL_CONTROL.setMandatory(False)\nassignment_SAMPLE_CONTROL_WELL_CONTROL.setSection(None)\nassignment_SAMPLE_CONTROL_WELL_CONTROL.setPositionInForms(1)\n\nassignment_MATERIAL_GENE_DESCRIPTION = tr.assignPropertyType(material_type_GENE, prop_type_DESCRIPTION)\nassignment_MATERIAL_GENE_DESCRIPTION.setMandatory(False)\nassignment_MATERIAL_GENE_DESCRIPTION.setSection(None)\nassignment_MATERIAL_GENE_DESCRIPTION.setPositionInForms(2)\n\nassignment_MATERIAL_GENE_GENE_SYMBOLS = tr.assignPropertyType(material_type_GENE, prop_type_GENE_SYMBOLS)\nassignment_MATERIAL_GENE_GENE_SYMBOLS.setMandatory(False)\nassignment_MATERIAL_GENE_GENE_SYMBOLS.setSection(None)\nassignment_MATERIAL_GENE_GENE_SYMBOLS.setPositionInForms(4)\n\nassignment_DATA_SET_HCS_IMAGE_OVERVIEW_RESOLUTION = tr.assignPropertyType(data_set_type_HCS_IMAGE_OVERVIEW, prop_type_RESOLUTION)\nassignment_DATA_SET_HCS_IMAGE_OVERVIEW_RESOLUTION.setMandatory(False)\nassignment_DATA_SET_HCS_IMAGE_OVERVIEW_RESOLUTION.setSection(None)\nassignment_DATA_SET_HCS_IMAGE_OVERVIEW_RESOLUTION.setPositionInForms(1)\n\nassignment_SAMPLE_PLATE_PLATE_GEOMETRY = tr.assignPropertyType(samp_type_PLATE, prop_type_PLATE_GEOMETRY)\nassignment_SAMPLE_PLATE_PLATE_GEOMETRY.setMandatory(True)\nassignment_SAMPLE_PLATE_PLATE_GEOMETRY.setSection(None)\nassignment_SAMPLE_PLATE_PLATE_GEOMETRY.setPositionInForms(1)\n\nassignment_MATERIAL_SIRNA_NUCLEOTIDE_SEQUENCE = tr.assignPropertyType(material_type_SIRNA, prop_type_NUCLEOTIDE_SEQUENCE)\nassignment_MATERIAL_SIRNA_NUCLEOTIDE_SEQUENCE.setMandatory(True)\nassignment_MATERIAL_SIRNA_NUCLEOTIDE_SEQUENCE.setSection(None)\nassignment_MATERIAL_SIRNA_NUCLEOTIDE_SEQUENCE.setPositionInForms(1)\n\nassignment_MATERIAL_SIRNA_DESCRIPTION = tr.assignPropertyType(material_type_SIRNA, prop_type_DESCRIPTION)\nassignment_MATERIAL_SIRNA_DESCRIPTION.setMandatory(False)\nassignment_MATERIAL_SIRNA_DESCRIPTION.setSection(None)\nassignment_MATERIAL_SIRNA_DESCRIPTION.setPositionInForms(3)\n\nassignment_MATERIAL_SIRNA_INHIBITOR_OF = tr.assignPropertyType(material_type_SIRNA, prop_type_INHIBITOR_OF)\nassignment_MATERIAL_SIRNA_INHIBITOR_OF.setMandatory(True)\nassignment_MATERIAL_SIRNA_INHIBITOR_OF.setSection(None)\nassignment_MATERIAL_SIRNA_INHIBITOR_OF.setPositionInForms(4)\n\nassignment_MATERIAL_SIRNA_LIBRARY_ID = tr.assignPropertyType(material_type_SIRNA, prop_type_LIBRARY_ID)\nassignment_MATERIAL_SIRNA_LIBRARY_ID.setMandatory(False)\nassignment_MATERIAL_SIRNA_LIBRARY_ID.setSection(None)\nassignment_MATERIAL_SIRNA_LIBRARY_ID.setPositionInForms(5)\n\nassignment_SAMPLE_SIRNA_WELL_SIRNA = tr.assignPropertyType(samp_type_SIRNA_WELL, prop_type_SIRNA)\nassignment_SAMPLE_SIRNA_WELL_SIRNA.setMandatory(False)\nassignment_SAMPLE_SIRNA_WELL_SIRNA.setSection(None)\nassignment_SAMPLE_SIRNA_WELL_SIRNA.setPositionInForms(1)\n\nassignment_SAMPLE_SIRNA_WELL_GENE = tr.assignPropertyType(samp_type_SIRNA_WELL, prop_type_GENE)\nassignment_SAMPLE_SIRNA_WELL_GENE.setMandatory(False)\nassignment_SAMPLE_SIRNA_WELL_GENE.setSection(None)\nassignment_SAMPLE_SIRNA_WELL_GENE.setPositionInForms(2)\n @@ -3436,14 +3449,14 @@ COPY core_plugins (id, name, version, registration_timestamp, master_reg_script) -- Name: cvte_id_seq; Type: SEQUENCE SET; Schema: public; Owner: - -- -SELECT pg_catalog.setval('cvte_id_seq', 264, true); +SELECT pg_catalog.setval('public.cvte_id_seq', 264, true); -- -- Data for Name: data_all; Type: TABLE DATA; Schema: public; Owner: - -- -COPY data_all (id, code, dsty_id, dast_id, expe_id, data_producer_code, production_timestamp, samp_id, registration_timestamp, pers_id_registerer, is_valid, modification_timestamp, is_derived, del_id, orig_del, pers_id_modifier, version, access_timestamp, data_set_kind) FROM stdin; +COPY public.data_all (id, code, dsty_id, dast_id, expe_id, data_producer_code, production_timestamp, samp_id, registration_timestamp, pers_id_registerer, is_valid, modification_timestamp, is_derived, del_id, orig_del, pers_id_modifier, version, access_timestamp, data_set_kind) FROM stdin; 10 20130412152038345-381 21 1 3 \N \N 173 2013-04-12 15:20:49.056891+02 \N f 2013-04-12 15:20:50.204+02 f \N \N 2 0 2015-09-04 10:05:23.467859+02 CONTAINER 6 20130412143121081-200 21 1 2 \N \N 2 2013-04-12 14:31:30.714563+02 \N f 2013-04-16 14:13:16.634+02 f \N \N 9 0 2015-09-04 10:05:23.467859+02 CONTAINER 13 20130412153119864-385 24 1 2 \N \N 2 2013-04-12 15:31:23.376258+02 \N f 2013-04-16 14:13:16.633+02 f \N \N 9 0 2015-09-04 10:05:23.467859+02 CONTAINER @@ -3474,14 +3487,14 @@ COPY data_all (id, code, dsty_id, dast_id, expe_id, data_producer_code, producti -- Name: data_id_seq; Type: SEQUENCE SET; Schema: public; Owner: - -- -SELECT pg_catalog.setval('data_id_seq', 34, true); +SELECT pg_catalog.setval('public.data_id_seq', 34, true); -- -- Data for Name: data_set_copies_history; Type: TABLE DATA; Schema: public; Owner: - -- -COPY data_set_copies_history (id, cc_id, data_id, external_code, path, git_commit_hash, edms_id, pers_id_author, valid_from_timestamp, valid_until_timestamp, git_repository_id) FROM stdin; +COPY public.data_set_copies_history (id, cc_id, data_id, external_code, path, git_commit_hash, edms_id, pers_id_author, valid_from_timestamp, valid_until_timestamp, git_repository_id, edms_code, edms_label, edms_address) FROM stdin; \. @@ -3489,14 +3502,14 @@ COPY data_set_copies_history (id, cc_id, data_id, external_code, path, git_commi -- Name: data_set_copies_history_id_seq; Type: SEQUENCE SET; Schema: public; Owner: - -- -SELECT pg_catalog.setval('data_set_copies_history_id_seq', 1, false); +SELECT pg_catalog.setval('public.data_set_copies_history_id_seq', 1, false); -- -- Data for Name: data_set_properties; Type: TABLE DATA; Schema: public; Owner: - -- -COPY data_set_properties (id, ds_id, dstpt_id, value, cvte_id, mate_prop_id, pers_id_registerer, registration_timestamp, pers_id_author, modification_timestamp) FROM stdin; +COPY public.data_set_properties (id, ds_id, dstpt_id, value, cvte_id, mate_prop_id, pers_id_registerer, registration_timestamp, pers_id_author, modification_timestamp) FROM stdin; 1 2 33 256x256 \N \N 2 2013-04-12 14:31:30.714563+02 2 2013-04-12 14:31:31.313+02 2 3 33 64x64 \N \N 2 2013-04-12 14:31:30.714563+02 2 2013-04-12 14:31:31.882+02 3 5 33 128x128 \N \N 2 2013-04-12 14:31:30.714563+02 2 2013-04-12 14:31:32.573+02 @@ -3514,7 +3527,7 @@ COPY data_set_properties (id, ds_id, dstpt_id, value, cvte_id, mate_prop_id, per -- Data for Name: data_set_properties_history; Type: TABLE DATA; Schema: public; Owner: - -- -COPY data_set_properties_history (id, ds_id, dstpt_id, value, vocabulary_term, material, pers_id_author, valid_from_timestamp, valid_until_timestamp) FROM stdin; +COPY public.data_set_properties_history (id, ds_id, dstpt_id, value, vocabulary_term, material, pers_id_author, valid_from_timestamp, valid_until_timestamp) FROM stdin; \. @@ -3522,21 +3535,21 @@ COPY data_set_properties_history (id, ds_id, dstpt_id, value, vocabulary_term, m -- Name: data_set_property_id_seq; Type: SEQUENCE SET; Schema: public; Owner: - -- -SELECT pg_catalog.setval('data_set_property_id_seq', 11, true); +SELECT pg_catalog.setval('public.data_set_property_id_seq', 11, true); -- -- Name: data_set_relationship_id_seq; Type: SEQUENCE SET; Schema: public; Owner: - -- -SELECT pg_catalog.setval('data_set_relationship_id_seq', 1, false); +SELECT pg_catalog.setval('public.data_set_relationship_id_seq', 1, false); -- -- Data for Name: data_set_relationships_all; Type: TABLE DATA; Schema: public; Owner: - -- -COPY data_set_relationships_all (data_id_parent, data_id_child, del_id, pers_id_author, registration_timestamp, modification_timestamp, relationship_id, ordinal) FROM stdin; +COPY public.data_set_relationships_all (data_id_parent, data_id_child, del_id, pers_id_author, registration_timestamp, modification_timestamp, relationship_id, ordinal) FROM stdin; 22 21 \N 3 2013-04-15 10:03:32.831227+02 2013-04-15 10:03:33.602+02 1 \N 21 23 \N 3 2013-04-15 10:04:25.873311+02 2013-04-15 10:04:26.652+02 1 \N 21 24 \N 3 2013-04-15 10:04:37.375119+02 2013-04-15 10:04:38.213+02 1 \N @@ -3560,7 +3573,7 @@ COPY data_set_relationships_all (data_id_parent, data_id_child, del_id, pers_id_ -- Data for Name: data_set_relationships_history; Type: TABLE DATA; Schema: public; Owner: - -- -COPY data_set_relationships_history (id, main_data_id, relation_type, expe_id, samp_id, data_id, entity_perm_id, pers_id_author, valid_from_timestamp, valid_until_timestamp, ordinal) FROM stdin; +COPY public.data_set_relationships_history (id, main_data_id, relation_type, expe_id, samp_id, data_id, entity_perm_id, pers_id_author, valid_from_timestamp, valid_until_timestamp, ordinal) FROM stdin; 2 2 OWNED \N 2 \N 20130412140147735-20 2 2013-04-12 14:31:31.106+02 \N \N 3 3 OWNED \N 2 \N 20130412140147735-20 2 2013-04-12 14:31:31.717+02 \N \N 4 4 OWNED \N 2 \N 20130412140147735-20 2 2013-04-12 14:31:32.074+02 \N \N @@ -3653,21 +3666,21 @@ COPY data_set_relationships_history (id, main_data_id, relation_type, expe_id, s -- Name: data_set_relationships_history_id_seq; Type: SEQUENCE SET; Schema: public; Owner: - -- -SELECT pg_catalog.setval('data_set_relationships_history_id_seq', 102, true); +SELECT pg_catalog.setval('public.data_set_relationships_history_id_seq', 102, true); -- -- Name: data_set_type_id_seq; Type: SEQUENCE SET; Schema: public; Owner: - -- -SELECT pg_catalog.setval('data_set_type_id_seq', 28, true); +SELECT pg_catalog.setval('public.data_set_type_id_seq', 28, true); -- -- Data for Name: data_set_type_property_types; Type: TABLE DATA; Schema: public; Owner: - -- -COPY data_set_type_property_types (id, dsty_id, prty_id, is_mandatory, is_managed_internally, pers_id_registerer, registration_timestamp, ordinal, section, script_id, is_shown_edit, show_raw_value) FROM stdin; +COPY public.data_set_type_property_types (id, dsty_id, prty_id, is_mandatory, is_managed_internally, pers_id_registerer, registration_timestamp, ordinal, section, script_id, is_shown_edit, show_raw_value) FROM stdin; 1 2 3 f f 1 2013-04-12 10:04:56.658885+02 4 \N \N f f 2 2 91 f f 1 2013-04-12 10:04:56.658885+02 5 \N \N f f 3 2 59 f f 1 2013-04-12 10:04:56.658885+02 6 \N \N f f @@ -3711,7 +3724,7 @@ COPY data_set_type_property_types (id, dsty_id, prty_id, is_mandatory, is_manage -- Data for Name: data_set_types; Type: TABLE DATA; Schema: public; Owner: - -- -COPY data_set_types (id, code, description, modification_timestamp, main_ds_pattern, main_ds_path, deletion_disallow, validation_script_id) FROM stdin; +COPY public.data_set_types (id, code, description, modification_timestamp, main_ds_pattern, main_ds_path, deletion_disallow, validation_script_id) FROM stdin; 1 UNKNOWN Unknown 2013-04-12 10:04:52.629266+02 \N \N t \N 2 ALIGNMENT Aligner ouput, ideally bam/sam 2013-04-12 10:04:56.658885+02 \N \N f \N 3 BASECALL_STATS Base Call Statistics from the Illumina Pipeline (configureBclToFastq.pl) 2013-04-12 10:04:56.658885+02 original/.*/.*/Demultiplex_Stats.htm \N f \N @@ -3747,44 +3760,14 @@ COPY data_set_types (id, code, description, modification_timestamp, main_ds_patt -- Name: data_store_id_seq; Type: SEQUENCE SET; Schema: public; Owner: - -- -SELECT pg_catalog.setval('data_store_id_seq', 2, true); +SELECT pg_catalog.setval('public.data_store_id_seq', 2, true); -- -- Data for Name: data_store_service_data_set_types; Type: TABLE DATA; Schema: public; Owner: - -- -COPY data_store_service_data_set_types (data_store_service_id, data_set_type_id) FROM stdin; -240 1 -240 25 -240 23 -240 22 -240 12 -240 18 -240 26 -240 17 -240 8 -240 24 -240 19 -240 7 -240 5 -240 27 -240 11 -240 21 -240 28 -240 6 -240 15 -240 13 -240 10 -240 3 -240 9 -240 16 -240 2 -240 20 -240 4 -240 14 -241 25 -241 17 +COPY public.data_store_service_data_set_types (data_store_service_id, data_set_type_id) FROM stdin; 247 25 247 17 249 1 @@ -3815,6 +3798,92 @@ COPY data_store_service_data_set_types (data_store_service_id, data_set_type_id) 249 20 249 4 249 14 +250 10 +250 8 +250 4 +250 6 +250 7 +250 5 +250 9 +250 11 +250 16 +250 21 +250 22 +250 26 +250 12 +250 18 +250 2 +250 23 +250 28 +250 13 +250 27 +250 17 +250 24 +250 20 +250 1 +250 14 +250 19 +250 25 +250 15 +250 3 +251 10 +251 8 +251 4 +251 6 +251 7 +251 5 +251 9 +251 11 +251 16 +251 21 +251 22 +251 26 +251 12 +251 18 +251 2 +251 23 +251 28 +251 13 +251 27 +251 17 +251 24 +251 20 +251 1 +251 14 +251 19 +251 25 +251 15 +251 3 +255 10 +255 8 +255 4 +255 6 +255 7 +255 5 +255 9 +255 11 +255 16 +255 21 +255 22 +255 26 +255 12 +255 18 +255 2 +255 23 +255 28 +255 13 +255 27 +255 17 +255 24 +255 20 +255 1 +255 14 +255 19 +255 25 +255 15 +255 3 +256 17 +256 25 \. @@ -3822,17 +3891,19 @@ COPY data_store_service_data_set_types (data_store_service_id, data_set_type_id) -- Data for Name: data_store_services; Type: TABLE DATA; Schema: public; Owner: - -- -COPY data_store_services (id, key, label, kind, data_store_id, reporting_plugin_type) FROM stdin; -240 path-info-db-consistency-check Path Info DB consistency check PROCESSING 1 \N -241 default-plate-image-analysis Image Analysis Results QUERIES 1 TABLE_MODEL -242 js-test js-test QUERIES 1 AGGREGATION_TABLE_MODEL -243 feature-lists-aggregation-service Features Lists QUERIES 1 AGGREGATION_TABLE_MODEL -244 test-aggregation-service Test Aggregation Service QUERIES 1 AGGREGATION_TABLE_MODEL +COPY public.data_store_services (id, key, label, kind, data_store_id, reporting_plugin_type) FROM stdin; 245 js-test js-test QUERIES 2 AGGREGATION_TABLE_MODEL 246 test-aggregation-service Test Aggregation Service QUERIES 2 AGGREGATION_TABLE_MODEL 247 default-plate-image-analysis Image Analysis Results QUERIES 2 TABLE_MODEL 248 feature-lists-aggregation-service Features Lists QUERIES 2 AGGREGATION_TABLE_MODEL 249 path-info-db-consistency-check Path Info DB consistency check PROCESSING 2 \N +250 test-processing-service Test Jython Processing PROCESSING 1 \N +251 test-reporting-service Test Jython Reporting QUERIES 1 TABLE_MODEL +252 feature-lists-aggregation-service Features Lists QUERIES 1 AGGREGATION_TABLE_MODEL +253 test-aggregation-service Test Aggregation Service QUERIES 1 AGGREGATION_TABLE_MODEL +254 js-test js-test QUERIES 1 AGGREGATION_TABLE_MODEL +255 path-info-db-consistency-check Path Info DB consistency check PROCESSING 1 \N +256 default-plate-image-analysis Image Analysis Results QUERIES 1 TABLE_MODEL \. @@ -3840,16 +3911,16 @@ COPY data_store_services (id, key, label, kind, data_store_id, reporting_plugin_ -- Name: data_store_services_id_seq; Type: SEQUENCE SET; Schema: public; Owner: - -- -SELECT pg_catalog.setval('data_store_services_id_seq', 249, true); +SELECT pg_catalog.setval('public.data_store_services_id_seq', 256, true); -- -- Data for Name: data_stores; Type: TABLE DATA; Schema: public; Owner: - -- -COPY data_stores (id, code, download_url, remote_url, session_token, registration_timestamp, modification_timestamp, is_archiver_configured, data_source_definitions, uuid) FROM stdin; -1 DSS1 http://localhost:20001 http://127.0.0.1:20001 171009170324500-421F96491B0C39A02E1C534BF254297D 2013-04-12 10:06:09.172514+02 2017-10-09 17:03:24.953+02 t code=imaging-db\tdriverClassName=org.postgresql.Driver\thostPart=localhost\tsid=imaging_test_js_common\tusername=pkupczyk\tpassword=\t\ncode=path-info-db\tdriverClassName=org.postgresql.Driver\tsid=pathinfo_test_js_common\tusername=pkupczyk\tpassword=\t\ncode=proteomics-db\tdriverClassName=org.postgresql.Driver\thostPart=localhost\tsid=proteomics_test_js_common\tusername=pkupczyk\tpassword=\t\n 1FD3FF61-1576-4908-AE3D-296E60B4CE06 +COPY public.data_stores (id, code, download_url, remote_url, session_token, registration_timestamp, modification_timestamp, is_archiver_configured, data_source_definitions, uuid) FROM stdin; 2 DSS2 http://localhost:20002 http://127.0.0.1:20002 171009170338233-585E42AEA3133313766B76832987E53C 2013-04-12 16:44:04.986246+02 2017-10-09 17:03:38.35+02 t code=imaging-db\tdriverClassName=org.postgresql.Driver\thostPart=localhost\tsid=imaging_test_js_common2\tusername=pkupczyk\tpassword=\t\ncode=path-info-db\tdriverClassName=org.postgresql.Driver\tsid=pathinfo_test_js_common2\tusername=pkupczyk\tpassword=\t\ncode=proteomics-db\tdriverClassName=org.postgresql.Driver\thostPart=localhost\tsid=proteomics_test_js_common2\tusername=pkupczyk\tpassword=\t\n 1FD3FF61-1576-4908-AE3D-296E60B4CE06 +1 DSS1 http://localhost:20001 http://127.0.0.1:20001 180712135433168-D62BB05724EE86BAB213604EBA3F8104 2013-04-12 10:06:09.172514+02 2018-07-12 13:54:33.607+02 t code=imaging-db\tdriverClassName=org.postgresql.Driver\thostPart=localhost\tsid=imaging_test_js_common\tusername=felmer\tpassword=\t\ncode=path-info-db\tdriverClassName=org.postgresql.Driver\tsid=pathinfo_test_js_common\tusername=felmer\tpassword=\t\ncode=proteomics-db\tdriverClassName=org.postgresql.Driver\thostPart=localhost\tsid=proteomics_test_js_common\tusername=felmer\tpassword=\t\n 1FD3FF61-1576-4908-AE3D-296E60B4CE06 \. @@ -3857,14 +3928,14 @@ COPY data_stores (id, code, download_url, remote_url, session_token, registratio -- Name: data_type_id_seq; Type: SEQUENCE SET; Schema: public; Owner: - -- -SELECT pg_catalog.setval('data_type_id_seq', 10, true); +SELECT pg_catalog.setval('public.data_type_id_seq', 10, true); -- -- Data for Name: data_types; Type: TABLE DATA; Schema: public; Owner: - -- -COPY data_types (id, code, description) FROM stdin; +COPY public.data_types (id, code, description) FROM stdin; 1 VARCHAR Short text 2 MULTILINE_VARCHAR Long text 3 INTEGER Integer number @@ -3882,14 +3953,14 @@ COPY data_types (id, code, description) FROM stdin; -- Name: database_instance_id_seq; Type: SEQUENCE SET; Schema: public; Owner: - -- -SELECT pg_catalog.setval('database_instance_id_seq', 1, true); +SELECT pg_catalog.setval('public.database_instance_id_seq', 1, true); -- -- Data for Name: database_version_logs; Type: TABLE DATA; Schema: public; Owner: - -- -COPY database_version_logs (db_version, module_name, run_status, run_status_timestamp, module_code, run_exception) FROM stdin; +COPY public.database_version_logs (db_version, module_name, run_status, run_status_timestamp, module_code, run_exception) FROM stdin; 133 ./sql/postgresql/133/domains-133.sql SUCCESS 2013-04-12 10:04:51.327 \\x2d2d204372656174696e6720646f6d61696e730a0a43524541544520444f4d41494e20415554484f52495a4154494f4e5f524f4c4520415320564152434841522834302920434845434b202856414c554520494e20282741444d494e272c2027504f5745525f55534552272c202755534552272c20274f42534552564552272c202745544c5f5345525645522729293b0a43524541544520444f4d41494e20424f4f4c45414e5f4348415220415320424f4f4c45414e2044454641554c542046414c53453b0a43524541544520444f4d41494e20424f4f4c45414e5f434841525f4f525f554e4b4e4f574e20415320434841522831292044454641554c542027552720434845434b202856414c554520494e20282746272c202754272c2027552729293b0a43524541544520444f4d41494e20434f44452041532056415243484152283630293b0a43524541544520444f4d41494e20434f4c554d4e5f4c4142454c204153205641524348415228313238293b0a43524541544520444f4d41494e20444154415f53544f52455f534552564943455f4b494e4420415320564152434841522834302920434845434b202856414c554520494e20282750524f43455353494e47272c2027515545524945532729293b0a43524541544520444f4d41494e20444154415f53544f52455f534552564943455f5245504f5254494e475f504c5547494e5f5459504520415320564152434841522834302920434845434b202856414c554520494e2028275441424c455f4d4f44454c272c20274453535f4c494e4b272c20274147475245474154494f4e5f5441424c455f4d4f44454c2729293b0a43524541544520444f4d41494e204556454e545f5459504520415320564152434841522834302920434845434b202856414c554520494e20282744454c4554494f4e272c20274d4f56454d454e542729293b0a43524541544520444f4d41494e2046494c452041532042595445413b0a43524541544520444f4d41494e2046494c455f4e414d45204153205641524348415228313030293b0a43524541544520444f4d41494e20544558545f56414c554520415320544558543b0a43524541544520444f4d41494e204f424a4543545f4e414d452041532056415243484152283530293b0a43524541544520444f4d41494e205245414c5f56414c5545204153205245414c3b0a43524541544520444f4d41494e20544543485f494420415320424947494e543b0a43524541544520444f4d41494e2054494d455f5354414d502041532054494d455354414d5020574954482054494d45205a4f4e453b0a43524541544520444f4d41494e2054494d455f5354414d505f44464c2041532054494d455354414d5020574954482054494d45205a4f4e45204e4f54204e554c4c2044454641554c542043555252454e545f54494d455354414d503b0a43524541544520444f4d41494e20555345525f49442041532056415243484152283530293b0a43524541544520444f4d41494e205449544c455f313030204153205641524348415228313030293b0a43524541544520444f4d41494e20475249445f45585052455353494f4e20415320564152434841522832303030293b0a43524541544520444f4d41494e20475249445f4944204153205641524348415228323030293b0a43524541544520444f4d41494e204f5244494e414c5f494e5420415320424947494e5420434845434b202856414c5545203e2030293b0a43524541544520444f4d41494e204445534352495054494f4e5f3230303020415320564152434841522832303030293b0a43524541544520444f4d41494e20415243484956494e475f5354415455532041532056415243484152283130302920434845434b202856414c554520494e2028274c4f434b4544272c2027415641494c41424c45272c20274152434849564544272c2027415243484956455f50454e44494e47272c2027554e415243484956455f50454e44494e47272c20274241434b55505f50454e44494e472729293b0a43524541544520444f4d41494e2051554552595f5459504520415320564152434841522834302920434845434b202856414c554520494e20282747454e45524943272c20274558504552494d454e54272c202753414d504c45272c2027444154415f534554272c20274d4154455249414c2729293b0a43524541544520444f4d41494e20454e544954595f4b494e4420415320564152434841522834302920434845434b202856414c554520494e20282753414d504c45272c20274558504552494d454e54272c2027444154415f534554272c20274d4154455249414c2729293b0a43524541544520444f4d41494e205343524950545f5459504520415320564152434841522834302920434845434b202856414c554520494e20282744594e414d49435f50524f5045525459272c20274d414e414745445f50524f5045525459272c2027454e544954595f56414c49444154494f4e2729293b0a43524541544520444f4d41494e204944454e544946494552204153205641524348415228323030293b0a43524541544520444f4d41494e20444154415f5345545f4b494e4420415320564152434841522834302920434845434b202856414c554520494e202827504859534943414c272c20274c494e4b272c2027434f4e5441494e45522729293b0a43524541544520444f4d41494e20504c5547494e5f5459504520415320564152434841522834302920434845434b202856414c554520494e2028274a5954484f4e272c20275052454445504c4f5945442729293b0a \N 133 ./sql/generic/133/schema-133.sql SUCCESS 2013-04-12 10:04:52.354 \\x2d2d204372656174696e67207461626c65730a0a435245415445205441424c4520434f4e54524f4c4c45445f564f434142554c41524945532028494420544543485f4944204e4f54204e554c4c2c434f444520434f4445204e4f54204e554c4c2c4445534352495054494f4e204445534352495054494f4e5f323030302c524547495354524154494f4e5f54494d455354414d502054494d455f5354414d505f44464c204e4f54204e554c4c2044454641554c542043555252454e545f54494d455354414d502c504552535f49445f5245474953544552455220544543485f4944204e4f54204e554c4c2c49535f4d414e414745445f494e5445524e414c4c5920424f4f4c45414e5f43484152204e4f54204e554c4c2044454641554c54202746272c49535f494e5445524e414c5f4e414d45535041434520424f4f4c45414e5f43484152204e4f54204e554c4c2044454641554c54202746272c4442494e5f494420544543485f4944204e4f54204e554c4c2c204d4f44494649434154494f4e5f54494d455354414d502054494d455f5354414d502044454641554c542043555252454e545f54494d455354414d502c2049535f43484f53454e5f46524f4d5f4c49535420424f4f4c45414e5f43484152204e4f54204e554c4c2044454641554c5420545255452c20534f555243455f555249204348415241435445522056415259494e472832353029293b0a435245415445205441424c4520434f4e54524f4c4c45445f564f434142554c4152595f5445524d532028494420544543485f4944204e4f54204e554c4c2c434f4445204f424a4543545f4e414d45204e4f54204e554c4c2c524547495354524154494f4e5f54494d455354414d502054494d455f5354414d505f44464c204e4f54204e554c4c2044454641554c542043555252454e545f54494d455354414d502c434f564f5f494420544543485f4944204e4f54204e554c4c2c504552535f49445f5245474953544552455220544543485f4944204e4f54204e554c4c2c4c4142454c20434f4c554d4e5f4c4142454c2c204445534352495054494f4e204445534352495054494f4e5f323030302c204f5244494e414c204f5244494e414c5f494e54204e4f54204e554c4c2c2049535f4f4646494349414c20424f4f4c45414e5f43484152204e4f54204e554c4c2044454641554c5420275427293b0a435245415445205441424c4520444154415f414c4c2028494420544543485f4944204e4f54204e554c4c2c434f444520434f44452c445354595f494420544543485f4944204e4f54204e554c4c2c444153545f494420544543485f4944204e4f54204e554c4c2c455850455f494420544543485f4944204e4f54204e554c4c2c444154415f50524f44554345525f434f444520434f44452c50524f44554354494f4e5f54494d455354414d502054494d455f5354414d502c53414d505f494420544543485f49442c524547495354524154494f4e5f54494d455354414d502054494d455f5354414d505f44464c204e4f54204e554c4c2044454641554c542043555252454e545f54494d455354414d502c504552535f49445f5245474953544552455220544543485f49442c49535f504c414345484f4c44455220424f4f4c45414e5f434841522044454641554c54202746272c49535f56414c494420424f4f4c45414e5f434841522044454641554c54202754272c204d4f44494649434154494f4e5f54494d455354414d502054494d455f5354414d502044454641554c542043555252454e545f54494d455354414d502c2049535f4445524956454420424f4f4c45414e5f43484152204e4f54204e554c4c2c2043544e525f4f5244455220494e54454745522c2043544e525f494420544543485f49442044454641554c54204e554c4c2c2044454c5f494420544543485f49442c204f5249475f44454c20544543485f49442c20504552535f49445f4d4f44494649455220544543485f49442c2056455253494f4e20494e54454745522044454641554c542030293b0a435245415445205441424c452044415441424153455f494e5354414e4345532028494420544543485f4944204e4f54204e554c4c2c434f444520434f4445204e4f54204e554c4c2c5555494420434f4445204e4f54204e554c4c2c49535f4f524947494e414c5f534f5552434520424f4f4c45414e5f43484152204e4f54204e554c4c2044454641554c54202746272c524547495354524154494f4e5f54494d455354414d502054494d455f5354414d505f44464c204e4f54204e554c4c2044454641554c542043555252454e545f54494d455354414d50293b0a435245415445205441424c4520444154415f5345545f52454c4154494f4e53484950535f414c4c2028444154415f49445f504152454e5420544543485f4944204e4f54204e554c4c2c444154415f49445f4348494c4420544543485f4944204e4f54204e554c4c2c2044454c5f494420544543485f49442c20504552535f49445f415554484f5220544543485f49442c20524547495354524154494f4e5f54494d455354414d502054494d455f5354414d505f44464c204e4f54204e554c4c2044454641554c542043555252454e545f54494d455354414d502c204d4f44494649434154494f4e5f54494d455354414d502054494d455f5354414d502044454641554c542043555252454e545f54494d455354414d50293b0a435245415445205441424c4520444154415f53544f5245532028494420544543485f4944204e4f54204e554c4c2c4442494e5f494420544543485f4944204e4f54204e554c4c2c434f444520434f4445204e4f54204e554c4c2c444f574e4c4f41445f55524c2056415243484152283130323429204e4f54204e554c4c2c52454d4f54455f55524c20564152434841522832353029204e4f54204e554c4c2c53455353494f4e5f544f4b454e205641524348415228353029204e4f54204e554c4c2c524547495354524154494f4e5f54494d455354414d502054494d455f5354414d505f44464c204e4f54204e554c4c2044454641554c542043555252454e545f54494d455354414d502c4d4f44494649434154494f4e5f54494d455354414d502054494d455f5354414d502044454641554c542043555252454e545f54494d455354414d502c2049535f41524348495645525f434f4e4649475552454420424f4f4c45414e5f43484152204e4f54204e554c4c2044454641554c54202746272c20444154415f534f555243455f444546494e4954494f4e5320544558545f56414c5545293b0a435245415445205441424c4520444154415f53544f52455f5345525649434553202028494420544543485f4944204e4f54204e554c4c2c204b455920564152434841522832353629204e4f54204e554c4c2c204c4142454c20564152434841522832353629204e4f54204e554c4c2c204b494e4420444154415f53544f52455f534552564943455f4b494e44204e4f54204e554c4c2c20444154415f53544f52455f494420544543485f4944204e4f54204e554c4c2c205245504f5254494e475f504c5547494e5f5459504520444154415f53544f52455f534552564943455f5245504f5254494e475f504c5547494e5f54595045293b0a435245415445205441424c4520444154415f53544f52455f534552564943455f444154415f5345545f54595045532028444154415f53544f52455f534552564943455f494420544543485f4944204e4f54204e554c4c2c20444154415f5345545f545950455f494420544543485f4944204e4f54204e554c4c293b0a435245415445205441424c4520444154415f54595045532028494420544543485f4944204e4f54204e554c4c2c434f444520434f4445204e4f54204e554c4c2c4445534352495054494f4e204445534352495054494f4e5f32303030204e4f54204e554c4c293b0a435245415445205441424c45204556454e54532028494420544543485f4944204e4f54204e554c4c2c4556454e545f54595045204556454e545f54595045204e4f54204e554c4c2c4445534352495054494f4e20544558545f56414c55452c524541534f4e204445534352495054494f4e5f323030302c504552535f49445f5245474953544552455220544543485f4944204e4f54204e554c4c2c524547495354524154494f4e5f54494d455354414d502054494d455f5354414d505f44464c204e4f54204e554c4c2044454641554c542043555252454e545f54494d455354414d502c20656e746974795f74797065205641524348415228383029204e4f54204e554c4c2c206964656e7469666965727320544558545f56414c5545204e4f54204e554c4c293b0a435245415445205441424c45204558504552494d454e54535f414c4c2028494420544543485f4944204e4f54204e554c4c2c5045524d5f494420434f4445204e4f54204e554c4c2c434f444520434f4445204e4f54204e554c4c2c455854595f494420544543485f4944204e4f54204e554c4c2c504552535f49445f5245474953544552455220544543485f4944204e4f54204e554c4c2c524547495354524154494f4e5f54494d455354414d502054494d455f5354414d505f44464c204e4f54204e554c4c2044454641554c542043555252454e545f54494d455354414d502c204d4f44494649434154494f4e5f54494d455354414d502054494d455f5354414d502044454641554c542043555252454e545f54494d455354414d502c2050524f4a5f494420544543485f4944204e4f54204e554c4c2c44454c5f494420544543485f49442c204f5249475f44454c20544543485f49442c2049535f5055424c494320424f4f4c45414e5f43484152204e4f54204e554c4c2044454641554c54202746272c20504552535f49445f4d4f44494649455220544543485f49442c2056455253494f4e20494e54454745522044454641554c542030293b0a435245415445205441424c45204154544143484d454e54532028494420544543485f4944204e4f54204e554c4c2c455850455f494420544543485f49442c53414d505f494420544543485f49442c50524f4a5f494420544543485f49442c455841435f494420544543485f4944204e4f54204e554c4c2c46494c455f4e414d452046494c455f4e414d45204e4f54204e554c4c2c524547495354524154494f4e5f54494d455354414d502054494d455f5354414d505f44464c204e4f54204e554c4c2044454641554c542043555252454e545f54494d455354414d502c56455253494f4e20494e5445474552204e4f54204e554c4c2c504552535f49445f5245474953544552455220544543485f4944204e4f54204e554c4c2c207469746c65205449544c455f3130302c206465736372697074696f6e204445534352495054494f4e5f32303030293b0a435245415445205441424c45204154544143484d454e545f434f4e54454e54532028494420544543485f4944204e4f54204e554c4c2c56414c55452046494c45204e4f54204e554c4c293b0a435245415445205441424c45204558504552494d454e545f50524f504552544945532028494420544543485f4944204e4f54204e554c4c2c455850455f494420544543485f4944204e4f54204e554c4c2c455450545f494420544543485f4944204e4f54204e554c4c2c56414c554520544558545f56414c55452c435654455f494420544543485f49442c204d4154455f50524f505f494420544543485f49442c20504552535f49445f5245474953544552455220544543485f4944204e4f54204e554c4c2c20524547495354524154494f4e5f54494d455354414d502054494d455f5354414d505f44464c204e4f54204e554c4c2044454641554c542043555252454e545f54494d455354414d502c20504552535f49445f415554484f5220544543485f4944204e4f54204e554c4c2c204d4f44494649434154494f4e5f54494d455354414d502054494d455f5354414d502044454641554c542043555252454e545f54494d455354414d50293b0a435245415445205441424c45204558504552494d454e545f50524f504552544945535f484953544f52592028494420544543485f4944204e4f54204e554c4c2c20455850455f494420544543485f4944204e4f54204e554c4c2c20455450545f494420544543485f4944204e4f54204e554c4c2c2056414c554520544558545f56414c55452c20564f434142554c4152595f5445524d204944454e5449464945522c204d4154455249414c204944454e5449464945522c20504552535f49445f415554484f5220544543485f4944204e4f54204e554c4c2c2056414c49445f46524f4d5f54494d455354414d502054494d455f5354414d50204e4f54204e554c4c2c2056414c49445f554e54494c5f54494d455354414d502054494d455f5354414d502044454641554c542043555252454e545f54494d455354414d50293b0a435245415445205441424c45204558504552494d454e545f54595045532028494420544543485f4944204e4f54204e554c4c2c434f444520434f4445204e4f54204e554c4c2c4445534352495054494f4e204445534352495054494f4e5f323030302c4442494e5f494420544543485f4944204e4f54204e554c4c2c204d4f44494649434154494f4e5f54494d455354414d502054494d455f5354414d502044454641554c542043555252454e545f54494d455354414d502c2056414c49444154494f4e5f5343524950545f494420544543485f4944293b0a435245415445205441424c45204558504552494d454e545f545950455f50524f50455254595f54595045532028494420544543485f4944204e4f54204e554c4c2c455854595f494420544543485f4944204e4f54204e554c4c2c505254595f494420544543485f4944204e4f54204e554c4c2c49535f4d414e4441544f525920424f4f4c45414e5f43484152204e4f54204e554c4c2044454641554c54202746272c49535f4d414e414745445f494e5445524e414c4c5920424f4f4c45414e5f43484152204e4f54204e554c4c2044454641554c54202746272c504552535f49445f5245474953544552455220544543485f4944204e4f54204e554c4c2c524547495354524154494f4e5f54494d455354414d502054494d455f5354414d505f44464c204e4f54204e554c4c2044454641554c542043555252454e545f54494d455354414d502c204f5244494e414c204f5244494e414c5f494e54204e4f54204e554c4c2c2053454354494f4e204445534352495054494f4e5f323030302c5343524950545f494420544543485f49442c49535f53484f574e5f4544495420424f4f4c45414e5f43484152204e4f54204e554c4c2044454641554c54202754272c53484f575f5241575f56414c554520424f4f4c45414e5f43484152204e4f54204e554c4c2044454641554c5420274627293b0a435245415445205441424c452045585445524e414c5f444154412028444154415f494420544543485f4944204e4f54204e554c4c2c53484152455f494420434f44452c53495a45204f5244494e414c5f494e542c4c4f434154494f4e2056415243484152283130323429204e4f54204e554c4c2c464654595f494420544543485f4944204e4f54204e554c4c2c4c4f54595f494420544543485f4944204e4f54204e554c4c2c435654455f49445f53544f525f464d5420544543485f4944204e4f54204e554c4c2c49535f434f4d504c45544520424f4f4c45414e5f434841525f4f525f554e4b4e4f574e204e4f54204e554c4c2044454641554c54202755272c435654455f49445f53544f524520544543485f49442c2053544154555320415243484956494e475f535441545553204e4f54204e554c4c2044454641554c542027415641494c41424c45272c2050524553454e545f494e5f4152434849564520424f4f4c45414e5f434841522044454641554c54202746272c2053504545445f48494e5420494e5445474552204e4f54204e554c4c2044454641554c54202d35302c2053544f524147455f434f4e4649524d4154494f4e20424f4f4c45414e5f43484152204e4f54204e554c4c2044454641554c5420274627293b0a435245415445205441424c452046494c455f464f524d41545f54595045532028494420544543485f4944204e4f54204e554c4c2c434f444520434f4445204e4f54204e554c4c2c4445534352495054494f4e204445534352495054494f4e5f323030302c4442494e5f494420544543485f4944204e4f54204e554c4c293b0a435245415445205441424c4520475249445f435553544f4d5f434f4c554d4e532028494420544543485f4944204e4f54204e554c4c2c204442494e5f494420544543485f4944204e4f54204e554c4c2c20434f444520564152434841522832303029204e4f54204e554c4c2c204c4142454c20636f6c756d6e5f6c6162656c204e4f54204e554c4c2c204445534352495054494f4e204445534352495054494f4e5f323030302c524547495354524154494f4e5f54494d455354414d502054494d455f5354414d505f44464c204e4f54204e554c4c2044454641554c542043555252454e545f54494d455354414d502c20504552535f49445f5245474953544552455220544543485f4944204e4f54204e554c4c2c204d4f44494649434154494f4e5f54494d455354414d502054494d455f5354414d502044454641554c542043555252454e545f54494d455354414d502c2045585052455353494f4e20475249445f45585052455353494f4e204e4f54204e554c4c2c2049535f5055424c494320424f4f4c45414e204e4f54204e554c4c2c20475249445f494420475249445f4944204e4f54204e554c4c293b0a435245415445205441424c45205350414345532028494420544543485f4944204e4f54204e554c4c2c434f444520434f4445204e4f54204e554c4c2c4442494e5f494420544543485f4944204e4f54204e554c4c2c4445534352495054494f4e204445534352495054494f4e5f323030302c524547495354524154494f4e5f54494d455354414d502054494d455f5354414d505f44464c204e4f54204e554c4c2044454641554c542043555252454e545f54494d455354414d502c504552535f49445f5245474953544552455220544543485f4944204e4f54204e554c4c293b0a435245415445205441424c452044454c4554494f4e532028494420544543485f4944204e4f54204e554c4c2c504552535f49445f5245474953544552455220544543485f4944204e4f54204e554c4c2c524547495354524154494f4e5f54494d455354414d502054494d455f5354414d505f44464c204e4f54204e554c4c2044454641554c542043555252454e545f54494d455354414d502c524541534f4e204445534352495054494f4e5f32303030204e4f54204e554c4c293b0a435245415445205441424c45204c4f4341544f525f54595045532028494420544543485f4944204e4f54204e554c4c2c434f444520434f4445204e4f54204e554c4c2c4445534352495054494f4e204445534352495054494f4e5f32303030293b0a435245415445205441424c45204d4154455249414c532028494420544543485f4944204e4f54204e554c4c2c434f444520434f4445204e4f54204e554c4c2c4d4154595f494420544543485f4944204e4f54204e554c4c2c504552535f49445f5245474953544552455220544543485f4944204e4f54204e554c4c2c524547495354524154494f4e5f54494d455354414d502054494d455f5354414d505f44464c204e4f54204e554c4c2044454641554c542043555252454e545f54494d455354414d502c204d4f44494649434154494f4e5f54494d455354414d502054494d455f5354414d502044454641554c542043555252454e545f54494d455354414d502c204442494e5f494420544543485f4944204e4f54204e554c4c293b0a435245415445205441424c45204d4154455249414c5f50524f504552544945532028494420544543485f4944204e4f54204e554c4c2c4d4154455f494420544543485f4944204e4f54204e554c4c2c4d5450545f494420544543485f4944204e4f54204e554c4c2c56414c554520544558545f56414c55452c524547495354524154494f4e5f54494d455354414d502054494d455f5354414d505f44464c204e4f54204e554c4c2044454641554c542043555252454e545f54494d455354414d502c20504552535f49445f415554484f5220544543485f4944204e4f54204e554c4c2c204d4f44494649434154494f4e5f54494d455354414d502054494d455f5354414d502044454641554c542043555252454e545f54494d455354414d502c20504552535f49445f5245474953544552455220544543485f4944204e4f54204e554c4c2c435654455f494420544543485f49442c204d4154455f50524f505f494420544543485f4944293b0a435245415445205441424c45204d4154455249414c5f50524f504552544945535f484953544f52592028494420544543485f4944204e4f54204e554c4c2c204d4154455f494420544543485f4944204e4f54204e554c4c2c204d5450545f494420544543485f4944204e4f54204e554c4c2c2056414c554520544558545f56414c55452c20564f434142554c4152595f5445524d204944454e5449464945522c204d4154455249414c204944454e5449464945522c20504552535f49445f415554484f5220544543485f4944204e4f54204e554c4c2c2056414c49445f46524f4d5f54494d455354414d502054494d455f5354414d50204e4f54204e554c4c2c2056414c49445f554e54494c5f54494d455354414d502054494d455f5354414d502044454641554c542043555252454e545f54494d455354414d50293b0a435245415445205441424c45204d4154455249414c5f54595045532028494420544543485f4944204e4f54204e554c4c2c434f444520434f4445204e4f54204e554c4c2c4445534352495054494f4e204445534352495054494f4e5f323030302c4442494e5f494420544543485f4944204e4f54204e554c4c2c204d4f44494649434154494f4e5f54494d455354414d502054494d455f5354414d502044454641554c542043555252454e545f54494d455354414d502c2056414c49444154494f4e5f5343524950545f494420544543485f4944293b0a435245415445205441424c45204d4154455249414c5f545950455f50524f50455254595f54595045532028494420544543485f4944204e4f54204e554c4c2c4d4154595f494420544543485f4944204e4f54204e554c4c2c505254595f494420544543485f4944204e4f54204e554c4c2c49535f4d414e4441544f525920424f4f4c45414e5f43484152204e4f54204e554c4c2044454641554c54202746272c49535f4d414e414745445f494e5445524e414c4c5920424f4f4c45414e5f43484152204e4f54204e554c4c2044454641554c54202746272c524547495354524154494f4e5f54494d455354414d502054494d455f5354414d505f44464c204e4f54204e554c4c2044454641554c542043555252454e545f54494d455354414d502c504552535f49445f5245474953544552455220544543485f4944204e4f54204e554c4c2c204f5244494e414c204f5244494e414c5f494e54204e4f54204e554c4c2c2053454354494f4e204445534352495054494f4e5f323030302c5343524950545f494420544543485f49442c49535f53484f574e5f4544495420424f4f4c45414e5f43484152204e4f54204e554c4c2044454641554c54202754272c53484f575f5241575f56414c554520424f4f4c45414e5f43484152204e4f54204e554c4c2044454641554c5420274627293b0a435245415445205441424c4520444154415f5345545f54595045532028494420544543485f4944204e4f54204e554c4c2c434f444520434f4445204e4f54204e554c4c2c4445534352495054494f4e204445534352495054494f4e5f323030302c4442494e5f494420544543485f4944204e4f54204e554c4c2c204d4f44494649434154494f4e5f54494d455354414d502054494d455f5354414d502044454641554c542043555252454e545f54494d455354414d502c204d41494e5f44535f5041545445524e205641524348415228333030292c204d41494e5f44535f5041544820564152434841522831303030292c2044454c4554494f4e5f444953414c4c4f5720424f4f4c45414e5f434841522044454641554c54202746272c20444154415f5345545f4b494e4420444154415f5345545f4b494e442044454641554c542027504859534943414c27204e4f54204e554c4c2c2056414c49444154494f4e5f5343524950545f494420544543485f4944293b0a435245415445205441424c4520504552534f4e532028494420544543485f4944204e4f54204e554c4c2c46495253545f4e414d452056415243484152283330292c4c4153545f4e414d452056415243484152283330292c555345525f494420555345525f4944204e4f54204e554c4c2c454d41494c204f424a4543545f4e414d452c4442494e5f494420544543485f4944204e4f54204e554c4c2c53504143455f494420544543485f49442c524547495354524154494f4e5f54494d455354414d502054494d455f5354414d505f44464c204e4f54204e554c4c2044454641554c542043555252454e545f54494d455354414d502c504552535f49445f5245474953544552455220544543485f49442c20444953504c41595f53455454494e47532046494c452c2049535f41435449564520424f4f4c45414e2044454641554c542054525545293b0a435245415445205441424c452050524f4a454354532028494420544543485f4944204e4f54204e554c4c2c5045524d5f494420434f4445204e4f54204e554c4c2c434f444520434f4445204e4f54204e554c4c2c53504143455f494420544543485f4944204e4f54204e554c4c2c504552535f49445f4c454144455220544543485f49442c4445534352495054494f4e204445534352495054494f4e5f323030302c504552535f49445f5245474953544552455220544543485f4944204e4f54204e554c4c2c524547495354524154494f4e5f54494d455354414d502054494d455f5354414d505f44464c204e4f54204e554c4c2044454641554c542043555252454e545f54494d455354414d502c204d4f44494649434154494f4e5f54494d455354414d502054494d455f5354414d502044454641554c542043555252454e545f54494d455354414d502c20504552535f49445f4d4f44494649455220544543485f49442c2056455253494f4e20494e54454745522044454641554c542030293b0a435245415445205441424c452050524f50455254595f54595045532028494420544543485f4944204e4f54204e554c4c2c434f444520434f4445204e4f54204e554c4c2c4445534352495054494f4e204445534352495054494f4e5f32303030204e4f54204e554c4c2c4c4142454c20434f4c554d4e5f4c4142454c204e4f54204e554c4c2c444154595f494420544543485f4944204e4f54204e554c4c2c524547495354524154494f4e5f54494d455354414d502054494d455f5354414d505f44464c204e4f54204e554c4c2044454641554c542043555252454e545f54494d455354414d502c504552535f49445f5245474953544552455220544543485f4944204e4f54204e554c4c2c434f564f5f494420544543485f49442c49535f4d414e414745445f494e5445524e414c4c5920424f4f4c45414e5f43484152204e4f54204e554c4c2044454641554c54202746272c49535f494e5445524e414c5f4e414d45535041434520424f4f4c45414e5f43484152204e4f54204e554c4c2044454641554c54202746272c4442494e5f494420544543485f4944204e4f54204e554c4c2c204d4154595f50524f505f494420544543485f49442c20534348454d4120544558545f56414c55452c205452414e53464f524d4154494f4e20544558545f56414c5545293b0a435245415445205441424c4520524f4c455f41535349474e4d454e54532028494420544543485f4944204e4f54204e554c4c2c524f4c455f434f444520415554484f52495a4154494f4e5f524f4c45204e4f54204e554c4c2c53504143455f494420544543485f49442c4442494e5f494420544543485f49442c504552535f49445f4752414e54454520544543485f49442c2041475f49445f4752414e54454520544543485f49442c20504552535f49445f5245474953544552455220544543485f4944204e4f54204e554c4c2c524547495354524154494f4e5f54494d455354414d502054494d455f5354414d505f44464c204e4f54204e554c4c2044454641554c542043555252454e545f54494d455354414d50293b0a435245415445205441424c452053414d504c45535f414c4c2028494420544543485f4944204e4f54204e554c4c2c5045524d5f494420434f4445204e4f54204e554c4c2c434f444520434f4445204e4f54204e554c4c2c455850455f494420544543485f49442c534154595f494420544543485f4944204e4f54204e554c4c2c524547495354524154494f4e5f54494d455354414d502054494d455f5354414d505f44464c204e4f54204e554c4c2044454641554c542043555252454e545f54494d455354414d502c4d4f44494649434154494f4e5f54494d455354414d502054494d455f5354414d502044454641554c542043555252454e545f54494d455354414d502c504552535f49445f5245474953544552455220544543485f4944204e4f54204e554c4c2c44454c5f494420544543485f49442c204f5249475f44454c20544543485f49442c204442494e5f494420544543485f49442c53504143455f494420544543485f49442c53414d505f49445f504152545f4f4620544543485f49442c20504552535f49445f4d4f44494649455220544543485f49442c20636f64655f756e697175655f636865636b206368617261637465722076617279696e6728333030292c20737562636f64655f756e697175655f636865636b206368617261637465722076617279696e6728333030292c2056455253494f4e20494e54454745522044454641554c542030293b0a435245415445205441424c452053414d504c455f50524f504552544945532028494420544543485f4944204e4f54204e554c4c2c53414d505f494420544543485f4944204e4f54204e554c4c2c535450545f494420544543485f4944204e4f54204e554c4c2c56414c554520544558545f56414c55452c435654455f494420544543485f49442c4d4154455f50524f505f494420544543485f49442c504552535f49445f5245474953544552455220544543485f4944204e4f54204e554c4c2c20524547495354524154494f4e5f54494d455354414d502054494d455f5354414d505f44464c204e4f54204e554c4c2044454641554c542043555252454e545f54494d455354414d502c20504552535f49445f415554484f5220544543485f4944204e4f54204e554c4c2c204d4f44494649434154494f4e5f54494d455354414d502054494d455f5354414d502044454641554c542043555252454e545f54494d455354414d50293b0a435245415445205441424c452053414d504c455f50524f504552544945535f484953544f52592028494420544543485f4944204e4f54204e554c4c2c2053414d505f494420544543485f4944204e4f54204e554c4c2c20535450545f494420544543485f4944204e4f54204e554c4c2c2056414c554520544558545f56414c55452c20564f434142554c4152595f5445524d204944454e5449464945522c204d4154455249414c204944454e5449464945522c20504552535f49445f415554484f5220544543485f4944204e4f54204e554c4c2c2056414c49445f46524f4d5f54494d455354414d502054494d455f5354414d50204e4f54204e554c4c2c2056414c49445f554e54494c5f54494d455354414d502054494d455f5354414d502044454641554c542043555252454e545f54494d455354414d50293b0a435245415445205441424c452053414d504c455f54595045532028494420544543485f4944204e4f54204e554c4c2c434f444520434f4445204e4f54204e554c4c2c4445534352495054494f4e204445534352495054494f4e5f323030302c4442494e5f494420544543485f4944204e4f54204e554c4c2c2049535f4c49535441424c4520424f4f4c45414e5f43484152204e4f54204e554c4c2044454641554c54202754272c2047454e4552415445445f46524f4d5f444550544820494e5445474552204e4f54204e554c4c2044454641554c5420302c20504152545f4f465f444550544820494e5445474552204e4f54204e554c4c2044454641554c5420302c204d4f44494649434154494f4e5f54494d455354414d502054494d455f5354414d502044454641554c542043555252454e545f54494d455354414d502c2069735f6175746f5f67656e6572617465645f636f646520424f4f4c45414e5f43484152204e4f54204e554c4c2044454641554c54202746272c2067656e6572617465645f636f64655f70726566697820434f4445204e4f54204e554c4c2044454641554c54202753272c2069735f737562636f64655f756e6971756520424f4f4c45414e5f43484152204e4f54204e554c4c2044454641554c54202746272c20494e48455249545f50524f5045525449455320424f4f4c45414e5f43484152204e4f54204e554c4c2044454641554c54202746272c2056414c49444154494f4e5f5343524950545f494420544543485f49442c2053484f575f504152454e545f4d4554414441544120424f4f4c45414e5f43484152204e4f54204e554c4c2044454641554c5420274627293b0a435245415445205441424c452053414d504c455f545950455f50524f50455254595f54595045532028494420544543485f4944204e4f54204e554c4c2c534154595f494420544543485f4944204e4f54204e554c4c2c505254595f494420544543485f4944204e4f54204e554c4c2c49535f4d414e4441544f525920424f4f4c45414e5f43484152204e4f54204e554c4c2044454641554c54202746272c49535f4d414e414745445f494e5445524e414c4c5920424f4f4c45414e5f43484152204e4f54204e554c4c2044454641554c54202746272c504552535f49445f5245474953544552455220544543485f4944204e4f54204e554c4c2c524547495354524154494f4e5f54494d455354414d502054494d455f5354414d505f44464c204e4f54204e554c4c2044454641554c542043555252454e545f54494d455354414d502c2049535f444953504c4159454420424f4f4c45414e5f43484152204e4f54204e554c4c2044454641554c54202754272c204f5244494e414c204f5244494e414c5f494e54204e4f54204e554c4c2c2053454354494f4e204445534352495054494f4e5f323030302c5343524950545f494420544543485f49442c49535f53484f574e5f4544495420424f4f4c45414e5f43484152204e4f54204e554c4c2044454641554c54202754272c53484f575f5241575f56414c554520424f4f4c45414e5f43484152204e4f54204e554c4c2044454641554c5420274627293b0a0a435245415445205441424c4520444154415f5345545f50524f504552544945532028494420544543485f4944204e4f54204e554c4c2c44535f494420544543485f4944204e4f54204e554c4c2c44535450545f494420544543485f4944204e4f54204e554c4c2c56414c554520544558545f56414c55452c435654455f494420544543485f49442c204d4154455f50524f505f494420544543485f49442c20504552535f49445f5245474953544552455220544543485f4944204e4f54204e554c4c2c20524547495354524154494f4e5f54494d455354414d502054494d455f5354414d505f44464c204e4f54204e554c4c2044454641554c542043555252454e545f54494d455354414d502c20504552535f49445f415554484f5220544543485f4944204e4f54204e554c4c2c204d4f44494649434154494f4e5f54494d455354414d502054494d455f5354414d502044454641554c542043555252454e545f54494d455354414d50293b0a435245415445205441424c4520444154415f5345545f50524f504552544945535f484953544f52592028494420544543485f4944204e4f54204e554c4c2c2044535f494420544543485f4944204e4f54204e554c4c2c2044535450545f494420544543485f4944204e4f54204e554c4c2c2056414c554520544558545f56414c55452c20564f434142554c4152595f5445524d204944454e5449464945522c204d4154455249414c204944454e5449464945522c20504552535f49445f415554484f5220544543485f4944204e4f54204e554c4c2c2056414c49445f46524f4d5f54494d455354414d502054494d455f5354414d50204e4f54204e554c4c2c2056414c49445f554e54494c5f54494d455354414d502054494d455f5354414d502044454641554c542043555252454e545f54494d455354414d50293b0a435245415445205441424c4520444154415f5345545f545950455f50524f50455254595f54595045532028494420544543485f4944204e4f54204e554c4c2c445354595f494420544543485f4944204e4f54204e554c4c2c505254595f494420544543485f4944204e4f54204e554c4c2c49535f4d414e4441544f525920424f4f4c45414e5f43484152204e4f54204e554c4c2044454641554c54202746272c49535f4d414e414745445f494e5445524e414c4c5920424f4f4c45414e5f43484152204e4f54204e554c4c2044454641554c54202746272c504552535f49445f5245474953544552455220544543485f4944204e4f54204e554c4c2c524547495354524154494f4e5f54494d455354414d502054494d455f5354414d505f44464c204e4f54204e554c4c2044454641554c542043555252454e545f54494d455354414d502c204f5244494e414c204f5244494e414c5f494e54204e4f54204e554c4c2c2053454354494f4e204445534352495054494f4e5f323030302c5343524950545f494420544543485f49442c2049535f53484f574e5f4544495420424f4f4c45414e5f43484152204e4f54204e554c4c2044454641554c54202754272c53484f575f5241575f56414c554520424f4f4c45414e5f43484152204e4f54204e554c4c2044454641554c5420274627293b0a0a435245415445205441424c4520415554484f52495a4154494f4e5f47524f5550532028494420544543485f4944204e4f54204e554c4c2c204442494e5f494420544543485f4944204e4f54204e554c4c2c20434f444520434f4445204e4f54204e554c4c2c204445534352495054494f4e204445534352495054494f4e5f323030302c524547495354524154494f4e5f54494d455354414d502054494d455f5354414d505f44464c204e4f54204e554c4c2044454641554c542043555252454e545f54494d455354414d502c20504552535f49445f5245474953544552455220544543485f4944204e4f54204e554c4c2c204d4f44494649434154494f4e5f54494d455354414d502054494d455f5354414d502044454641554c542043555252454e545f54494d455354414d50293b0a435245415445205441424c4520415554484f52495a4154494f4e5f47524f55505f504552534f4e53202841475f494420544543485f4944204e4f54204e554c4c2c20504552535f494420544543485f4944204e4f54204e554c4c293b0a0a435245415445205441424c452046494c544552532028494420544543485f4944204e4f54204e554c4c2c204442494e5f494420544543485f4944204e4f54204e554c4c2c204e414d4520564152434841522832303029204e4f54204e554c4c2c204445534352495054494f4e204445534352495054494f4e5f323030302c524547495354524154494f4e5f54494d455354414d502054494d455f5354414d505f44464c204e4f54204e554c4c2044454641554c542043555252454e545f54494d455354414d502c20504552535f49445f5245474953544552455220544543485f4944204e4f54204e554c4c2c204d4f44494649434154494f4e5f54494d455354414d502054494d455f5354414d502044454641554c542043555252454e545f54494d455354414d502c2045585052455353494f4e2054455854204e4f54204e554c4c2c2049535f5055424c494320424f4f4c45414e204e4f54204e554c4c2c20475249445f494420564152434841522832303029204e4f54204e554c4c293b0a435245415445205441424c4520515545524945532028494420544543485f4944204e4f54204e554c4c2c204442494e5f494420544543485f4944204e4f54204e554c4c2c204e414d4520564152434841522832303029204e4f54204e554c4c2c204445534352495054494f4e204445534352495054494f4e5f323030302c524547495354524154494f4e5f54494d455354414d502054494d455f5354414d505f44464c204e4f54204e554c4c2044454641554c542043555252454e545f54494d455354414d502c20504552535f49445f5245474953544552455220544543485f4944204e4f54204e554c4c2c204d4f44494649434154494f4e5f54494d455354414d502054494d455f5354414d502044454641554c542043555252454e545f54494d455354414d502c2045585052455353494f4e2054455854204e4f54204e554c4c2c2049535f5055424c494320424f4f4c45414e204e4f54204e554c4c2c2051554552595f545950452051554552595f54595045204e4f54204e554c4c2c20454e544954595f545950455f434f444520434f44452c2044425f4b455920434f4445204e4f54204e554c4c2044454641554c5420273127293b0a0a435245415445205441424c452072656c6174696f6e736869705f74797065732028696420544543485f4944204e4f54204e554c4c2c20636f646520434f4445204e4f54204e554c4c2c206c6162656c20434f4c554d4e5f4c4142454c2c20706172656e745f6c6162656c20434f4c554d4e5f4c4142454c2c206368696c645f6c6162656c20434f4c554d4e5f4c4142454c2c206465736372697074696f6e204445534352495054494f4e5f323030302c20726567697374726174696f6e5f74696d657374616d702054494d455f5354414d505f44464c204e4f54204e554c4c2044454641554c542043555252454e545f54494d455354414d502c20706572735f69645f7265676973746572657220544543485f4944204e4f54204e554c4c2c2069735f6d616e616765645f696e7465726e616c6c7920424f4f4c45414e5f43484152204e4f54204e554c4c2044454641554c54202746272c2069735f696e7465726e616c5f6e616d65737061636520424f4f4c45414e5f43484152204e4f54204e554c4c2044454641554c54202746272c206462696e5f696420544543485f4944204e4f54204e554c4c293b0a435245415445205441424c452073616d706c655f72656c6174696f6e73686970735f616c6c2028696420544543485f4944204e4f54204e554c4c2c2073616d706c655f69645f706172656e7420544543485f4944204e4f54204e554c4c2c2072656c6174696f6e736869705f696420544543485f4944204e4f54204e554c4c2c2073616d706c655f69645f6368696c6420544543485f4944204e4f54204e554c4c2c2064656c5f696420544543485f49442c20504552535f49445f415554484f5220544543485f49442c20524547495354524154494f4e5f54494d455354414d502054494d455f5354414d505f44464c204e4f54204e554c4c2044454641554c542043555252454e545f54494d455354414d502c204d4f44494649434154494f4e5f54494d455354414d502054494d455f5354414d502044454641554c542043555252454e545f54494d455354414d50293b0a0a435245415445205441424c4520736372697074732028494420544543485f4944204e4f54204e554c4c2c4442494e5f494420544543485f4944204e4f54204e554c4c2c4e414d4520564152434841522832303029204e4f54204e554c4c2c205343524950545f54595045205343524950545f54595045204e4f54204e554c4c2c204445534352495054494f4e204445534352495054494f4e5f323030302c53435249505420544558545f56414c55452c524547495354524154494f4e5f54494d455354414d502054494d455f5354414d505f44464c204e4f54204e554c4c2044454641554c542043555252454e545f54494d455354414d502c504552535f49445f5245474953544552455220544543485f4944204e4f54204e554c4c2c454e544954595f4b494e4420454e544954595f4b494e442c20504c5547494e5f5459504520504c5547494e5f54595045204e4f54204e554c4c2044454641554c5420274a5954484f4e272c2049535f415641494c41424c4520424f4f4c45414e5f43484152204e4f54204e554c4c2044454641554c542054525545293b0a0a435245415445205441424c4520434f52455f504c5547494e532028494420544543485f4944204e4f54204e554c4c2c204e414d4520564152434841522832303029204e4f54204e554c4c2c2056455253494f4e20494e5445474552204e4f54204e554c4c2c20524547495354524154494f4e5f54494d455354414d502054494d455f5354414d505f44464c204e4f54204e554c4c2044454641554c542043555252454e545f54494d455354414d502c204d41535445525f5245475f53435249505420544558545f56414c5545293b0a0a435245415445205441424c4520504f53545f524547495354524154494f4e5f444154415345545f51554555452028494420544543485f4944204e4f54204e554c4c2c2044535f494420544543485f4944204e4f54204e554c4c293b0a0a435245415445205441424c4520454e544954595f4f5045524154494f4e535f4c4f472028494420544543485f4944204e4f54204e554c4c2c20524547495354524154494f4e5f494420544543485f4944204e4f54204e554c4c293b0a0a435245415445205441424c452050524f4a4543545f52454c4154494f4e53484950535f484953544f52592028494420544543485f4944204e4f54204e554c4c2c204d41494e5f50524f4a5f494420544543485f4944204e4f54204e554c4c2c2052454c4154494f4e5f5459504520544558545f56414c55452c20455850455f494420544543485f49442c2053504143455f494420544543485f49442c20454e544954595f5045524d5f494420544558545f56414c55452c20504552535f49445f415554484f5220544543485f49442c2056414c49445f46524f4d5f54494d455354414d502054494d455f5354414d50204e4f54204e554c4c2c2056414c49445f554e54494c5f54494d455354414d502054494d455f5354414d50293b0a435245415445205441424c45204558504552494d454e545f52454c4154494f4e53484950535f484953544f52592028494420544543485f4944204e4f54204e554c4c2c204d41494e5f455850455f494420544543485f4944204e4f54204e554c4c2c2052454c4154494f4e5f5459504520544558545f56414c55452c2053414d505f494420544543485f49442c20444154415f494420544543485f49442c20454e544954595f5045524d5f494420544558545f56414c55452c20504552535f49445f415554484f5220544543485f49442c2056414c49445f46524f4d5f54494d455354414d502054494d455f5354414d50204e4f54204e554c4c2c2056414c49445f554e54494c5f54494d455354414d502054494d455f5354414d502c2050524f4a5f494420544543485f4944293b0a435245415445205441424c452053414d504c455f52454c4154494f4e53484950535f484953544f52592028494420544543485f4944204e4f54204e554c4c2c204d41494e5f53414d505f494420544543485f4944204e4f54204e554c4c2c2052454c4154494f4e5f5459504520544558545f56414c55452c20455850455f494420544543485f49442c2053414d505f494420544543485f49442c20444154415f494420544543485f49442c20454e544954595f5045524d5f494420544558545f56414c55452c20504552535f49445f415554484f5220544543485f49442c2056414c49445f46524f4d5f54494d455354414d502054494d455f5354414d50204e4f54204e554c4c2c2056414c49445f554e54494c5f54494d455354414d502054494d455f5354414d502c2053504143455f494420544543485f4944293b0a435245415445205441424c4520444154415f5345545f52454c4154494f4e53484950535f484953544f52592028494420544543485f4944204e4f54204e554c4c2c204d41494e5f444154415f494420544543485f4944204e4f54204e554c4c2c2052454c4154494f4e5f5459504520544558545f56414c55452c20455850455f494420544543485f49442c2053414d505f494420544543485f49442c20444154415f494420544543485f49442c20454e544954595f5045524d5f494420544558545f56414c55452c20504552535f49445f415554484f5220544543485f49442c2056414c49445f46524f4d5f54494d455354414d502054494d455f5354414d50204e4f54204e554c4c2c2056414c49445f554e54494c5f54494d455354414d502054494d455f5354414d50293b0a0a435245415445205441424c452045585445524e414c5f444154415f4d414e4147454d454e545f53595354454d532028494420544543485f49442c204442494e5f494420544543485f49442c20434f444520434f44452c204c4142454c20544558545f56414c55452c2055524c5f54454d504c41544520544558545f56414c55452c2049535f4f50454e42495320424f4f4c45414e2044454641554c542046414c5345204e4f54204e554c4c293b0a435245415445205441424c45204c494e4b5f444154412028444154415f494420544543485f4944204e4f54204e554c4c2c2045444d535f494420544543485f4944204e4f54204e554c4c2c2045585445524e414c5f434f444520544558545f56414c5545204e4f54204e554c4c293b0a0a435245415445205441424c45204d45544150524f4a454354532028494420544543485f4944204e4f54204e554c4c2c204e414d4520434f4445204e4f54204e554c4c2c204445534352495054494f4e204445534352495054494f4e5f323030302c204f574e455220544543485f4944204e4f54204e554c4c2c205052495641544520424f4f4c45414e5f43484152204e4f54204e554c4c2044454641554c5420545255452c204352454154494f4e5f444154452054494d455f5354414d505f44464c204e4f54204e554c4c2044454641554c542043555252454e545f54494d455354414d50293b0a435245415445205441424c45204d45544150524f4a4543545f41535349474e4d454e54535f414c4c2028494420544543485f4944204e4f54204e554c4c2c204d4550525f494420544543485f4944204e4f54204e554c4c2c20455850455f494420544543485f49442c2053414d505f494420544543485f49442c20444154415f494420544543485f49442c204d4154455f494420544543485f49442c2044454c5f494420544543485f49442c204352454154494f4e5f44415445202054494d455f5354414d505f44464c204e4f54204e554c4c2044454641554c542043555252454e545f54494d455354414d50293b0a0a2d2d204372656174696e67207669657773202d20636f706965642066726f6d20736368656d612067656e65726174656420666f722074657374732c20272a272063616e277420626520757365642062656361757365206f66205067446966665669657773206c696d69746174696f6e20696e207669657720636f6d70617269736f6e0a0a435245415445205649455720646174612041530a202020202053454c4543542069642c20636f64652c20647374795f69642c20646173745f69642c20657870655f69642c20646174615f70726f64756365725f636f64652c2070726f64756374696f6e5f74696d657374616d702c2073616d705f69642c20726567697374726174696f6e5f74696d657374616d702c20706572735f69645f726567697374657265722c20706572735f69645f6d6f6469666965722c2069735f706c616365686f6c6465722c2069735f76616c69642c206d6f64696669636174696f6e5f74696d657374616d702c2069735f646572697665642c2063746e725f6f726465722c2063746e725f69642c2064656c5f69642c206f7269675f64656c2c2076657273696f6e200a2020202020202046524f4d20646174615f616c6c200a20202020202057484552452064656c5f6964204953204e554c4c3b0a0a435245415445205649455720646174615f64656c657465642041530a202020202053454c4543542069642c20636f64652c20647374795f69642c20646173745f69642c20657870655f69642c20646174615f70726f64756365725f636f64652c2070726f64756374696f6e5f74696d657374616d702c2073616d705f69642c20726567697374726174696f6e5f74696d657374616d702c20706572735f69645f726567697374657265722c20706572735f69645f6d6f6469666965722c2069735f706c616365686f6c6465722c2069735f76616c69642c206d6f64696669636174696f6e5f74696d657374616d702c2069735f646572697665642c2063746e725f6f726465722c2063746e725f69642c2064656c5f69642c206f7269675f64656c2c2076657273696f6e200a2020202020202046524f4d20646174615f616c6c200a20202020202057484552452064656c5f6964204953204e4f54204e554c4c3b0a0a4352454154452056494557206578706572696d656e74732041530a202020202053454c4543542069642c207065726d5f69642c20636f64652c20657874795f69642c20706572735f69645f726567697374657265722c20706572735f69645f6d6f6469666965722c20726567697374726174696f6e5f74696d657374616d702c206d6f64696669636174696f6e5f74696d657374616d702c2070726f6a5f69642c2064656c5f69642c206f7269675f64656c2c2069735f7075626c69632c2076657273696f6e200a2020202020202046524f4d206578706572696d656e74735f616c6c200a20202020202057484552452064656c5f6964204953204e554c4c3b0a0a4352454154452056494557206578706572696d656e74735f64656c657465642041530a202020202053454c4543542069642c207065726d5f69642c20636f64652c20657874795f69642c20706572735f69645f726567697374657265722c20706572735f69645f6d6f6469666965722c20726567697374726174696f6e5f74696d657374616d702c206d6f64696669636174696f6e5f74696d657374616d702c2070726f6a5f69642c2064656c5f69642c206f7269675f64656c2c2069735f7075626c69632c2076657273696f6e200a2020202020202046524f4d206578706572696d656e74735f616c6c200a20202020202057484552452064656c5f6964204953204e4f54204e554c4c3b0a0a43524541544520564945572073616d706c65732041530a202020202053454c4543542069642c207065726d5f69642c20636f64652c20657870655f69642c20736174795f69642c20726567697374726174696f6e5f74696d657374616d702c206d6f64696669636174696f6e5f74696d657374616d702c20706572735f69645f726567697374657265722c20706572735f69645f6d6f6469666965722c2064656c5f69642c206f7269675f64656c2c206462696e5f69642c2073706163655f69642c2073616d705f69645f706172745f6f662c2076657273696f6e200a2020202020202046524f4d2073616d706c65735f616c6c200a20202020202057484552452064656c5f6964204953204e554c4c3b0a0a43524541544520564945572073616d706c65735f64656c657465642041530a202020202053454c4543542069642c207065726d5f69642c20636f64652c20657870655f69642c20736174795f69642c20726567697374726174696f6e5f74696d657374616d702c206d6f64696669636174696f6e5f74696d657374616d702c20706572735f69645f726567697374657265722c20706572735f69645f6d6f6469666965722c2064656c5f69642c206f7269675f64656c2c206462696e5f69642c2073706163655f69642c2073616d705f69645f706172745f6f662c2076657273696f6e200a2020202020202046524f4d2073616d706c65735f616c6c200a20202020202057484552452064656c5f6964204953204e4f54204e554c4c3b0a0a435245415445205649455720646174615f7365745f72656c6174696f6e73686970732041530a20202053454c45435420646174615f69645f706172656e742c20646174615f69645f6368696c642c2064656c5f69642c20706572735f69645f617574686f722c20726567697374726174696f6e5f74696d657374616d702c206d6f64696669636174696f6e5f74696d657374616d700a20202046524f4d20646174615f7365745f72656c6174696f6e73686970735f616c6c200a20202057484552452064656c5f6964204953204e554c4c3b0a2020200a43524541544520564945572073616d706c655f72656c6174696f6e73686970732041530a20202053454c4543542069642c2073616d706c655f69645f706172656e742c2072656c6174696f6e736869705f69642c2073616d706c655f69645f6368696c642c2064656c5f69642c20706572735f69645f617574686f722c20726567697374726174696f6e5f74696d657374616d702c206d6f64696669636174696f6e5f74696d657374616d700a20202046524f4d2073616d706c655f72656c6174696f6e73686970735f616c6c0a20202057484552452064656c5f6964204953204e554c4c3b0a2020202020200a4352454154452056494557204d45544150524f4a4543545f41535349474e4d454e54532041530a20202053454c4543542049442c204d4550525f49442c20455850455f49442c2053414d505f49442c20444154415f49442c204d4154455f49442c2044454c5f49442c204352454154494f4e5f444154450a20202046524f4d204d45544150524f4a4543545f41535349474e4d454e54535f414c4c200a20202057484552452044454c5f4944204953204e554c4c3b0a2020200a43524541544520564945572073616d706c655f686973746f72795f7669657720415320280a202053454c4543540a20202020322a69642061732069642c0a202020206d61696e5f73616d705f69642c0a2020202072656c6174696f6e5f747970652c0a2020202073706163655f69642c0a20202020657870655f69642c0a2020202073616d705f69642c0a20202020646174615f69642c0a20202020656e746974795f7065726d5f69642c0a202020206e756c6c20617320737470745f69642c0a202020206e756c6c2061732076616c75652c0a202020206e756c6c20617320766f636162756c6172795f7465726d2c0a202020206e756c6c206173206d6174657269616c2c0a20202020706572735f69645f617574686f722c0a2020202076616c69645f66726f6d5f74696d657374616d702c0a2020202076616c69645f756e74696c5f74696d657374616d700a202046524f4d0a2020202053414d504c455f52454c4154494f4e53484950535f484953544f52590a202057484552450a2020202076616c69645f756e74696c5f74696d657374616d70204953204e4f54204e554c4c290a554e494f4e0a202053454c4543540a20202020322a69642b312061732069642c0a2020202073616d705f6964206173206d61696e5f73616d705f69642c0a202020206e756c6c2061732072656c6174696f6e5f747970652c0a202020206e756c6c2061732073706163655f69642c0a202020206e756c6c20617320657870655f69642c0a202020206e756c6c2061732073616d705f69642c0a202020206e756c6c20617320646174615f69642c0a202020206e756c6c20617320656e746974795f7065726d5f69642c0a20202020737470745f69642c0a2020202076616c75652c0a20202020766f636162756c6172795f7465726d2c0a202020206d6174657269616c2c0a20202020706572735f69645f617574686f722c0a2020202076616c69645f756e74696c5f74696d657374616d702c0a2020202076616c69645f756e74696c5f74696d657374616d700a202046524f4d0a2020202053414d504c455f50524f504552544945535f484953544f52593b0a0a435245415445205649455720646174615f7365745f686973746f72795f7669657720415320280a202053454c4543540a20202020322a69642061732069642c0a202020206d61696e5f646174615f69642c0a2020202072656c6174696f6e5f747970652c0a20202020657870655f69642c0a2020202073616d705f69642c0a20202020646174615f69642c0a20202020656e746974795f7065726d5f69642c0a202020206e756c6c2061732064737470745f69642c0a202020206e756c6c2061732076616c75652c0a202020206e756c6c20617320766f636162756c6172795f7465726d2c0a202020206e756c6c206173206d6174657269616c2c0a20202020706572735f69645f617574686f722c0a2020202076616c69645f66726f6d5f74696d657374616d702c0a2020202076616c69645f756e74696c5f74696d657374616d700a202046524f4d0a20202020444154415f5345545f52454c4154494f4e53484950535f484953544f52590a202057484552450a2020202076616c69645f756e74696c5f74696d657374616d70204953204e4f54204e554c4c290a554e494f4e0a202053454c4543540a20202020322a69642b312061732069642c0a2020202064735f6964206173206d61696e5f646174615f69642c0a202020206e756c6c2061732072656c6174696f6e5f747970652c0a202020206e756c6c20617320657870655f69642c0a202020206e756c6c2061732073616d705f69642c0a202020206e756c6c20617320646174615f69642c0a202020206e756c6c20617320656e746974795f7065726d5f69642c0a2020202064737470745f69642c0a2020202076616c75652c0a20202020766f636162756c6172795f7465726d2c0a202020206d6174657269616c2c0a20202020706572735f69645f617574686f722c0a2020202076616c69645f756e74696c5f74696d657374616d702c0a2020202076616c69645f756e74696c5f74696d657374616d700a202046524f4d0a20202020444154415f5345545f50524f504552544945535f484953544f52593b0a0a4352454154452056494557206578706572696d656e745f686973746f72795f7669657720415320280a202053454c4543540a20202020322a69642061732069642c0a202020206d61696e5f657870655f69642c0a2020202072656c6174696f6e5f747970652c0a2020202070726f6a5f69642c0a2020202073616d705f69642c0a20202020646174615f69642c0a20202020656e746974795f7065726d5f69642c0a202020206e756c6c20617320657470745f69642c0a202020206e756c6c2061732076616c75652c0a202020206e756c6c20617320766f636162756c6172795f7465726d2c0a202020206e756c6c206173206d6174657269616c2c0a20202020706572735f69645f617574686f722c0a2020202076616c69645f66726f6d5f74696d657374616d702c0a2020202076616c69645f756e74696c5f74696d657374616d700a202046524f4d0a202020204558504552494d454e545f52454c4154494f4e53484950535f484953544f52590a202057484552452076616c69645f756e74696c5f74696d657374616d70204953204e4f54204e554c4c290a554e494f4e0a202053454c4543540a20202020322a69642b312061732069642c0a20202020657870655f6964206173206d61696e5f657870655f69642c0a202020206e756c6c2061732072656c6174696f6e5f747970652c0a202020206e756c6c2061732070726f6a5f69642c0a202020206e756c6c2061732073616d705f69642c0a202020206e756c6c20617320646174615f69642c0a202020206e756c6c20617320656e746974795f7065726d5f69642c0a20202020657470745f69642c0a2020202076616c75652c0a20202020766f636162756c6172795f7465726d2c0a202020206d6174657269616c2c0a20202020706572735f69645f617574686f722c0a2020202076616c69645f756e74696c5f74696d657374616d702c0a2020202076616c69645f756e74696c5f74696d657374616d700a202046524f4d0a202020204558504552494d454e545f50524f504552544945535f484953544f52593b0a0a2d2d204372656174696e672073657175656e6365730a0a4352454154452053455155454e434520434f4e54524f4c4c45445f564f434142554c4152595f49445f5345513b0a4352454154452053455155454e434520435654455f49445f5345513b0a4352454154452053455155454e43452044415441424153455f494e5354414e43455f49445f5345513b0a4352454154452053455155454e434520444154415f49445f5345513b0a4352454154452053455155454e434520444154415f5345545f52454c4154494f4e534849505f49445f5345513b0a4352454154452053455155454e434520444154415f53544f52455f49445f5345513b0a4352454154452053455155454e434520444154415f53544f52455f53455256494345535f49445f5345513b0a4352454154452053455155454e434520444154415f545950455f49445f5345513b0a4352454154452053455155454e434520455450545f49445f5345513b0a4352454154452053455155454e4345204556454e545f49445f5345513b0a4352454154452053455155454e4345204154544143484d454e545f49445f5345513b0a4352454154452053455155454e4345204154544143484d454e545f434f4e54454e545f49445f5345513b0a4352454154452053455155454e4345204558504552494d454e545f49445f5345513b0a4352454154452053455155454e4345204558504552494d454e545f50524f50455254595f49445f5345513b0a4352454154452053455155454e4345204558504552494d454e545f545950455f49445f5345513b0a4352454154452053455155454e43452046494c455f464f524d41545f545950455f49445f5345513b0a4352454154452053455155454e43452053504143455f49445f5345513b0a4352454154452053455155454e43452044454c4554494f4e5f49445f5345513b0a4352454154452053455155454e4345204c4f4341544f525f545950455f49445f5345513b0a4352454154452053455155454e4345204d4154455249414c5f49445f5345513b0a4352454154452053455155454e4345204d4154455249414c5f50524f50455254595f49445f5345513b0a4352454154452053455155454e4345204d4154455249414c5f545950455f49445f5345513b0a4352454154452053455155454e4345204d5450545f49445f5345513b0a4352454154452053455155454e434520444154415f5345545f545950455f49445f5345513b0a4352454154452053455155454e434520504552534f4e5f49445f5345513b0a4352454154452053455155454e43452050524f4a4543545f49445f5345513b0a4352454154452053455155454e43452050524f50455254595f545950455f49445f5345513b0a4352454154452053455155454e434520524f4c455f41535349474e4d454e545f49445f5345513b0a4352454154452053455155454e43452053414d504c455f49445f5345513b0a4352454154452053455155454e43452053414d504c455f50524f50455254595f49445f5345513b0a4352454154452053455155454e43452053414d504c455f545950455f49445f5345513b0a4352454154452053455155454e434520535450545f49445f5345513b0a4352454154452053455155454e434520444154415f5345545f50524f50455254595f49445f5345513b0a4352454154452053455155454e43452044535450545f49445f5345513b0a4352454154452053455155454e434520434f44455f5345513b0a4352454154452053455155454e4345204558504552494d454e545f434f44455f5345513b0a4352454154452053455155454e43452053414d504c455f434f44455f5345513b0a4352454154452053455155454e4345205045524d5f49445f5345513b0a4352454154452053455155454e434520415554484f52495a4154494f4e5f47524f55505f49445f5345513b0a4352454154452053455155454e43452046494c5445525f49445f5345513b0a4352454154452053455155454e434520475249445f435553544f4d5f434f4c554d4e535f49445f5345513b0a4352454154452053455155454e43452051554552595f49445f5345513b0a4352454154452053455155454e43452052454c4154494f4e534849505f545950455f49445f5345513b0a4352454154452053455155454e43452053414d504c455f52454c4154494f4e534849505f49445f5345513b0a4352454154452053455155454e4345205343524950545f49445f5345513b0a4352454154452053455155454e434520434f52455f504c5547494e5f49445f5345513b0a4352454154452053455155454e434520504f53545f524547495354524154494f4e5f444154415345545f51554555455f49445f5345513b0a4352454154452053455155454e434520454e544954595f4f5045524154494f4e535f4c4f475f49445f5345513b0a4352454154452053455155454e4345204558504552494d454e545f52454c4154494f4e53484950535f484953544f52595f49445f5345513b0a4352454154452053455155454e43452053414d504c455f52454c4154494f4e53484950535f484953544f52595f49445f5345513b0a4352454154452053455155454e434520444154415f5345545f52454c4154494f4e53484950535f484953544f52595f49445f5345513b0a4352454154452053455155454e43452050524f4a4543545f52454c4154494f4e53484950535f484953544f52595f49445f5345513b0a4352454154452053455155454e43452045585445524e414c5f444154415f4d414e4147454d454e545f53595354454d5f49445f5345513b0a4352454154452053455155454e4345204d45544150524f4a4543545f49445f5345513b0a4352454154452053455155454e4345204d45544150524f4a4543545f41535349474e4d454e545f49445f5345513b0a0a2d2d204372656174696e67207072696d617279206b657920636f6e73747261696e74730a0a414c544552205441424c4520434f4e54524f4c4c45445f564f434142554c41524945532041444420434f4e53545241494e5420434f564f5f504b205052494d415259204b4559284944293b0a414c544552205441424c4520434f4e54524f4c4c45445f564f434142554c4152595f5445524d532041444420434f4e53545241494e5420435654455f504b205052494d415259204b4559284944293b0a414c544552205441424c4520444154415f414c4c2041444420434f4e53545241494e5420444154415f504b205052494d415259204b4559284944293b0a414c544552205441424c452044415441424153455f494e5354414e4345532041444420434f4e53545241494e54204442494e5f504b205052494d415259204b4559284944293b0a414c544552205441424c4520444154415f53544f5245532041444420434f4e53545241494e5420444153545f504b205052494d415259204b4559284944293b0a414c544552205441424c4520444154415f53544f52455f53455256494345532041444420434f4e53545241494e5420445353455f504b205052494d415259204b4559284944293b0a414c544552205441424c4520444154415f54595045532041444420434f4e53545241494e5420444154595f504b205052494d415259204b4559284944293b0a414c544552205441424c45204556454e54532041444420434f4e53545241494e542045564e545f504b205052494d415259204b4559284944293b0a414c544552205441424c45204558504552494d454e54535f414c4c2041444420434f4e53545241494e5420455850455f504b205052494d415259204b4559284944293b0a414c544552205441424c45204154544143484d454e54532041444420434f4e53545241494e5420415454415f504b205052494d415259204b4559284944293b0a414c544552205441424c45204154544143484d454e545f434f4e54454e54532041444420434f4e53545241494e5420455841435f504b205052494d415259204b4559284944293b0a414c544552205441424c45204558504552494d454e545f50524f504552544945532041444420434f4e53545241494e5420455850525f504b205052494d415259204b4559284944293b0a414c544552205441424c45204558504552494d454e545f50524f504552544945535f484953544f52592041444420434f4e53545241494e542045585052485f504b205052494d415259204b4559284944293b0a414c544552205441424c45204558504552494d454e545f54595045532041444420434f4e53545241494e5420455854595f504b205052494d415259204b4559284944293b0a414c544552205441424c45204558504552494d454e545f545950455f50524f50455254595f54595045532041444420434f4e53545241494e5420455450545f504b205052494d415259204b4559284944293b0a414c544552205441424c452045585445524e414c5f444154412041444420434f4e53545241494e5420455844415f504b205052494d415259204b455928444154415f4944293b0a414c544552205441424c452046494c455f464f524d41545f54595045532041444420434f4e53545241494e5420464654595f504b205052494d415259204b4559284944293b0a414c544552205441424c45205350414345532041444420434f4e53545241494e542053504143455f504b205052494d415259204b4559284944293b0a414c544552205441424c452044454c4554494f4e532041444420434f4e53545241494e542044454c5f504b205052494d415259204b4559284944293b0a414c544552205441424c45204c4f4341544f525f54595045532041444420434f4e53545241494e54204c4f54595f504b205052494d415259204b4559284944293b0a414c544552205441424c45204d4154455249414c532041444420434f4e53545241494e54204d4154455f504b205052494d415259204b4559284944293b0a414c544552205441424c45204d4154455249414c5f50524f504552544945532041444420434f4e53545241494e54204d4150525f504b205052494d415259204b4559284944293b0a414c544552205441424c45204d4154455249414c5f50524f504552544945535f484953544f52592041444420434f4e53545241494e54204d415052485f504b205052494d415259204b4559284944293b0a414c544552205441424c45204d4154455249414c5f54595045532041444420434f4e53545241494e54204d4154595f504b205052494d415259204b4559284944293b0a414c544552205441424c45204d4154455249414c5f545950455f50524f50455254595f54595045532041444420434f4e53545241494e54204d5450545f504b205052494d415259204b4559284944293b0a414c544552205441424c4520444154415f5345545f54595045532041444420434f4e53545241494e5420445354595f504b205052494d415259204b4559284944293b0a414c544552205441424c4520504552534f4e532041444420434f4e53545241494e5420504552535f504b205052494d415259204b4559284944293b0a414c544552205441424c452050524f4a454354532041444420434f4e53545241494e542050524f4a5f504b205052494d415259204b4559284944293b0a414c544552205441424c452050524f50455254595f54595045532041444420434f4e53545241494e5420505254595f504b205052494d415259204b4559284944293b0a414c544552205441424c4520524f4c455f41535349474e4d454e54532041444420434f4e53545241494e5420524f41535f504b205052494d415259204b4559284944293b0a414c544552205441424c452053414d504c45535f414c4c2041444420434f4e53545241494e542053414d505f504b205052494d415259204b4559284944293b0a414c544552205441424c452053414d504c455f50524f504552544945532041444420434f4e53545241494e5420534150525f504b205052494d415259204b4559284944293b0a414c544552205441424c452053414d504c455f50524f504552544945535f484953544f52592041444420434f4e53545241494e542053415052485f504b205052494d415259204b4559284944293b0a414c544552205441424c452053414d504c455f54595045532041444420434f4e53545241494e5420534154595f504b205052494d415259204b4559284944293b0a414c544552205441424c452053414d504c455f545950455f50524f50455254595f54595045532041444420434f4e53545241494e5420535450545f504b205052494d415259204b4559284944293b0a414c544552205441424c4520444154415f5345545f545950455f50524f50455254595f54595045532041444420434f4e53545241494e542044535450545f504b205052494d415259204b4559284944293b0a414c544552205441424c4520444154415f5345545f50524f504552544945532041444420434f4e53545241494e5420445350525f504b205052494d415259204b4559284944293b0a414c544552205441424c4520444154415f5345545f50524f504552544945535f484953544f52592041444420434f4e53545241494e542044535052485f504b205052494d415259204b4559284944293b0a414c544552205441424c4520415554484f52495a4154494f4e5f47524f5550532041444420434f4e53545241494e542041475f504b205052494d415259204b4559284944293b0a414c544552205441424c4520415554484f52495a4154494f4e5f47524f55505f504552534f4e532041444420434f4e53545241494e54204147505f504b205052494d415259204b455928504552535f49442c41475f4944293b0a414c544552205441424c452046494c544552532041444420434f4e53545241494e542046494c545f504b205052494d415259204b4559284944293b0a414c544552205441424c4520475249445f435553544f4d5f434f4c554d4e532041444420434f4e53545241494e5420475249445f435553544f4d5f434f4c554d4e535f504b205052494d415259204b4559284944293b0a414c544552205441424c4520515545524945532041444420434f4e53545241494e5420515545525f504b205052494d415259204b4559284944293b0a414c544552205441424c452072656c6174696f6e736869705f74797065732041444420434f4e53545241494e5420726574795f706b205052494d415259204b455920286964293b0a414c544552205441424c452073616d706c655f72656c6174696f6e73686970735f616c6c2041444420434f4e53545241494e5420736172655f706b205052494d415259204b455920286964293b0a414c544552205441424c4520534352495054532041444420434f4e53545241494e5420534352495f504b205052494d415259204b4559284944293b0a414c544552205441424c4520504f53545f524547495354524154494f4e5f444154415345545f51554555452041444420434f4e53545241494e5420505244515f504b205052494d415259204b4559284944293b0a414c544552205441424c4520454e544954595f4f5045524154494f4e535f4c4f472041444420434f4e53545241494e5420454f4c5f504b205052494d415259204b4559284944293b0a414c544552205441424c45204558504552494d454e545f52454c4154494f4e53484950535f484953544f52592041444420434f4e53545241494e5420455852454c485f504b205052494d415259204b4559284944293b0a414c544552205441424c452053414d504c455f52454c4154494f4e53484950535f484953544f52592041444420434f4e53545241494e542053414d5052454c485f504b205052494d415259204b4559284944293b0a414c544552205441424c4520444154415f5345545f52454c4154494f4e53484950535f484953544f52592041444420434f4e53545241494e54204441544152454c485f504b205052494d415259204b4559284944293b0a414c544552205441424c452050524f4a4543545f52454c4154494f4e53484950535f484953544f52592041444420434f4e53545241494e5420505252454c485f504b205052494d415259204b4559284944293b0a414c544552205441424c452045585445524e414c5f444154415f4d414e4147454d454e545f53595354454d532041444420434f4e53545241494e542045444d535f504b205052494d415259204b4559284944293b0a414c544552205441424c45204c494e4b5f444154412041444420434f4e53545241494e54204c4e44415f504b205052494d415259204b455928444154415f4944293b0a414c544552205441424c45204d45544150524f4a454354532041444420434f4e53545241494e54204d45544150524f4a454354535f504b205052494d415259204b4559284944293b0a414c544552205441424c45204d45544150524f4a4543545f41535349474e4d454e54535f414c4c2041444420434f4e53545241494e54204d45544150524f4a4543545f41535349474e4d454e54535f414c4c5f504b205052494d415259204b4559284944293b0a0a2d2d204372656174696e6720756e6971756520636f6e73747261696e74730a0a414c544552205441424c4520434f4e54524f4c4c45445f564f434142554c41524945532041444420434f4e53545241494e5420434f564f5f424b5f554b20554e4951554528434f44452c49535f494e5445524e414c5f4e414d4553504143452c4442494e5f4944293b0a414c544552205441424c4520434f4e54524f4c4c45445f564f434142554c4152595f5445524d532041444420434f4e53545241494e5420435654455f424b5f554b20554e4951554528434f44452c434f564f5f4944293b0a414c544552205441424c4520444154415f414c4c2041444420434f4e53545241494e5420444154415f424b5f554b20554e4951554528434f4445293b0a414c544552205441424c452044415441424153455f494e5354414e4345532041444420434f4e53545241494e54204442494e5f424b5f554b20554e4951554528434f4445293b0a414c544552205441424c452044415441424153455f494e5354414e4345532041444420434f4e53545241494e54204442494e5f555549445f554b20554e495155452855554944293b0a414c544552205441424c4520444154415f5345545f52454c4154494f4e53484950535f414c4c2041444420434f4e53545241494e5420445352455f424b5f554b20554e4951554528444154415f49445f4348494c442c444154415f49445f504152454e54293b0a414c544552205441424c4520444154415f53544f52455f53455256494345532041444420434f4e53545241494e5420445353455f424b5f554b20554e49515545284b45592c20444154415f53544f52455f4944293b0a414c544552205441424c4520444154415f53544f52455f534552564943455f444154415f5345545f54595045532041444420434f4e53545241494e54204453534453545f424b5f554b20554e4951554528444154415f53544f52455f534552564943455f49442c20444154415f5345545f545950455f4944293b0a414c544552205441424c4520444154415f53544f5245532041444420434f4e53545241494e5420444153545f424b5f554b20554e4951554528434f44452c4442494e5f4944293b0a414c544552205441424c4520444154415f54595045532041444420434f4e53545241494e5420444154595f424b5f554b20554e4951554528434f4445293b0a414c544552205441424c45204558504552494d454e54535f414c4c2041444420434f4e53545241494e5420455850455f424b5f554b20554e4951554528434f44452c50524f4a5f4944293b0a414c544552205441424c45204558504552494d454e54535f414c4c2041444420434f4e53545241494e5420455850455f50495f554b20554e49515545285045524d5f4944293b0a414c544552205441424c45204558504552494d454e545f50524f504552544945532041444420434f4e53545241494e5420455850525f424b5f554b20554e4951554528455850455f49442c455450545f4944293b0a414c544552205441424c45204558504552494d454e545f54595045532041444420434f4e53545241494e5420455854595f424b5f554b20554e4951554528434f44452c4442494e5f4944293b0a414c544552205441424c45204558504552494d454e545f545950455f50524f50455254595f54595045532041444420434f4e53545241494e5420455450545f424b5f554b20554e4951554528455854595f49442c505254595f4944293b0a414c544552205441424c452045585445524e414c5f444154412041444420434f4e53545241494e5420455844415f424b5f554b20554e49515545284c4f434154494f4e2c4c4f54595f4944293b0a414c544552205441424c452046494c455f464f524d41545f54595045532041444420434f4e53545241494e5420464654595f424b5f554b20554e4951554528434f44452c4442494e5f4944293b0a414c544552205441424c45205350414345532041444420434f4e53545241494e542053504143455f424b5f554b20554e4951554528434f44452c4442494e5f4944293b0a414c544552205441424c45204c4f4341544f525f54595045532041444420434f4e53545241494e54204c4f54595f424b5f554b20554e4951554528434f4445293b0a414c544552205441424c45204d4154455249414c532041444420434f4e53545241494e54204d4154455f424b5f554b20554e4951554528434f44452c4d4154595f49442c4442494e5f4944293b0a414c544552205441424c45204d4154455249414c5f50524f504552544945532041444420434f4e53545241494e54204d4150525f424b5f554b20554e49515545284d4154455f49442c4d5450545f4944293b0a414c544552205441424c45204d4154455249414c5f54595045532041444420434f4e53545241494e54204d4154595f424b5f554b20554e4951554528434f44452c4442494e5f4944293b0a414c544552205441424c45204d4154455249414c5f545950455f50524f50455254595f54595045532041444420434f4e53545241494e54204d5450545f424b5f554b20554e49515545284d4154595f49442c505254595f4944293b0a414c544552205441424c4520444154415f5345545f54595045532041444420434f4e53545241494e5420445354595f424b5f554b20554e4951554528434f44452c4442494e5f4944293b0a414c544552205441424c4520504552534f4e532041444420434f4e53545241494e5420504552535f424b5f554b20554e49515545284442494e5f49442c555345525f4944293b0a414c544552205441424c452050524f4a454354532041444420434f4e53545241494e542050524f4a5f424b5f554b20554e4951554528434f44452c53504143455f4944293b0a414c544552205441424c452050524f4a454354532041444420434f4e53545241494e542050524f4a5f50495f554b20554e49515545285045524d5f4944293b0a414c544552205441424c452050524f50455254595f54595045532041444420434f4e53545241494e5420505254595f424b5f554b20554e4951554528434f44452c49535f494e5445524e414c5f4e414d4553504143452c4442494e5f4944293b0a414c544552205441424c4520524f4c455f41535349474e4d454e54532041444420434f4e53545241494e5420524f41535f50455f53504143455f424b5f554b20554e4951554528504552535f49445f4752414e5445452c524f4c455f434f44452c53504143455f4944293b0a414c544552205441424c4520524f4c455f41535349474e4d454e54532041444420434f4e53545241494e5420524f41535f50455f494e5354414e43455f424b5f554b20554e4951554528504552535f49445f4752414e5445452c524f4c455f434f44452c4442494e5f4944293b0a414c544552205441424c4520524f4c455f41535349474e4d454e54532041444420434f4e53545241494e5420524f41535f41475f53504143455f424b5f554b20554e495155452841475f49445f4752414e5445452c524f4c455f434f44452c53504143455f4944293b0a414c544552205441424c4520524f4c455f41535349474e4d454e54532041444420434f4e53545241494e5420524f41535f41475f494e5354414e43455f424b5f554b20554e495155452841475f49445f4752414e5445452c524f4c455f434f44452c4442494e5f4944293b0a414c544552205441424c452053414d504c45535f414c4c2041444420434f4e53545241494e542053414d505f50495f554b20554e49515545285045524d5f4944293b0a414c544552205441424c452073616d706c65735f616c6c2041444420434f4e53545241494e542073616d705f636f64655f756e697175655f636865636b5f756b20554e4951554528636f64655f756e697175655f636865636b293b0a414c544552205441424c452073616d706c65735f616c6c2041444420434f4e53545241494e542073616d705f737562636f64655f756e697175655f636865636b5f756b20554e4951554528737562636f64655f756e697175655f636865636b293b0a414c544552205441424c452053414d504c455f50524f504552544945532041444420434f4e53545241494e5420534150525f424b5f554b20554e495155452853414d505f49442c535450545f4944293b0a414c544552205441424c452053414d504c455f54595045532041444420434f4e53545241494e5420534154595f424b5f554b20554e4951554528434f44452c4442494e5f4944293b0a414c544552205441424c452053414d504c455f545950455f50524f50455254595f54595045532041444420434f4e53545241494e5420535450545f424b5f554b20554e4951554528534154595f49442c505254595f4944293b0a414c544552205441424c4520444154415f5345545f545950455f50524f50455254595f54595045532041444420434f4e53545241494e542044535450545f424b5f554b20554e4951554528445354595f49442c505254595f4944293b0a414c544552205441424c4520444154415f5345545f50524f504552544945532041444420434f4e53545241494e5420445350525f424b5f554b20554e495155452844535f49442c44535450545f4944293b0a2d2d204e4f54453a20666f6c6c6f77696e6720756e697175656e65737320636f6e73747261696e747320666f72206174746163686d656e747320776f726b2c206265636175736520286e756c6c20213d206e756c6c2920696e20506f737467726573200a414c544552205441424c45204154544143484d454e54532041444420434f4e53545241494e5420415454415f455850455f424b5f554b20554e4951554528455850455f49442c46494c455f4e414d452c56455253494f4e293b0a414c544552205441424c45204154544143484d454e54532041444420434f4e53545241494e5420415454415f50524f4a5f424b5f554b20554e495155452850524f4a5f49442c46494c455f4e414d452c56455253494f4e293b0a414c544552205441424c45204154544143484d454e54532041444420434f4e53545241494e5420415454415f53414d505f424b5f554b20554e495155452853414d505f49442c46494c455f4e414d452c56455253494f4e293b0a414c544552205441424c4520415554484f52495a4154494f4e5f47524f5550532041444420434f4e53545241494e542041475f424b5f554b20554e4951554528434f44452c4442494e5f4944293b0a414c544552205441424c452046494c544552532041444420434f4e53545241494e542046494c545f424b5f554b20554e49515545284e414d452c204442494e5f49442c20475249445f4944293b0a414c544552205441424c4520475249445f435553544f4d5f434f4c554d4e532041444420434f4e53545241494e5420475249445f435553544f4d5f434f4c554d4e535f424b5f554b20554e4951554528434f44452c204442494e5f49442c20475249445f4944293b0a414c544552205441424c4520515545524945532041444420434f4e53545241494e5420515545525f424b5f554b20554e49515545284e414d452c204442494e5f4944293b0a414c544552205441424c452073616d706c655f72656c6174696f6e73686970735f616c6c2041444420434f4e53545241494e5420736172655f626b5f756b20554e495155452873616d706c655f69645f6368696c642c73616d706c655f69645f706172656e742c72656c6174696f6e736869705f6964293b0a414c544552205441424c452072656c6174696f6e736869705f74797065732041444420434f4e53545241494e5420726574795f756b20554e4951554528636f64652c6462696e5f6964293b0a414c544552205441424c4520534352495054532041444420434f4e53545241494e5420534352495f554b20554e49515545284e414d452c4442494e5f4944293b0a414c544552205441424c4520434f52455f504c5547494e532041444420434f4e53545241494e5420434f504c5f4e414d455f5645525f554b20554e49515545284e414d452c56455253494f4e293b0a414c544552205441424c4520454e544954595f4f5045524154494f4e535f4c4f472041444420434f4e53545241494e5420454f4c5f5245475f49445f554b20554e4951554528524547495354524154494f4e5f4944293b0a414c544552205441424c452045585445524e414c5f444154415f4d414e4147454d454e545f53595354454d532041444420434f4e53545241494e542045444d535f434f44455f554b20554e4951554528434f44452c204442494e5f4944293b0a2d2d204e4f54453a20666f6c6c6f77696e6720756e697175656e65737320636f6e73747261696e747320666f72206d65746170726f6a6563742061737369676e6d656e747320776f726b2c206265636175736520286e756c6c20213d206e756c6c2920696e20506f737467726573200a414c544552205441424c45204d45544150524f4a4543545f41535349474e4d454e54535f414c4c2041444420434f4e53545241494e54204d45544150524f4a4543545f41535349474e4d454e54535f414c4c5f4d4550525f49445f455850455f49445f554b20554e4951554520284d4550525f49442c20455850455f4944293b0a414c544552205441424c45204d45544150524f4a4543545f41535349474e4d454e54535f414c4c2041444420434f4e53545241494e54204d45544150524f4a4543545f41535349474e4d454e54535f414c4c5f4d4550525f49445f53414d505f49445f554b20554e4951554520284d4550525f49442c2053414d505f4944293b0a414c544552205441424c45204d45544150524f4a4543545f41535349474e4d454e54535f414c4c2041444420434f4e53545241494e54204d45544150524f4a4543545f41535349474e4d454e54535f414c4c5f4d4550525f49445f444154415f49445f554b20554e4951554520284d4550525f49442c20444154415f4944293b0a414c544552205441424c45204d45544150524f4a4543545f41535349474e4d454e54535f414c4c2041444420434f4e53545241494e54204d45544150524f4a4543545f41535349474e4d454e54535f414c4c5f4d4550525f49445f4d4154455f49445f554b20554e4951554520284d4550525f49442c204d4154455f4944293b0a0a2d2d204372656174696e6720666f726569676e206b657920636f6e73747261696e74730a0a414c544552205441424c4520434f4e54524f4c4c45445f564f434142554c41524945532041444420434f4e53545241494e5420434f564f5f4442494e5f464b20464f524549474e204b455920284442494e5f494429205245464552454e4345532044415441424153455f494e5354414e434553284944293b0a414c544552205441424c4520434f4e54524f4c4c45445f564f434142554c41524945532041444420434f4e53545241494e5420434f564f5f504552535f464b20464f524549474e204b45592028504552535f49445f5245474953544552455229205245464552454e43455320504552534f4e53284944293b0a414c544552205441424c4520434f4e54524f4c4c45445f564f434142554c4152595f5445524d532041444420434f4e53545241494e5420435654455f434f564f5f464b20464f524549474e204b45592028434f564f5f494429205245464552454e43455320434f4e54524f4c4c45445f564f434142554c4152494553284944293b0a414c544552205441424c4520434f4e54524f4c4c45445f564f434142554c4152595f5445524d532041444420434f4e53545241494e5420435654455f504552535f464b20464f524549474e204b45592028504552535f49445f5245474953544552455229205245464552454e43455320504552534f4e53284944293b0a414c544552205441424c4520444154415f414c4c2041444420434f4e53545241494e5420444154415f445354595f464b20464f524549474e204b45592028445354595f494429205245464552454e43455320444154415f5345545f5459504553284944293b0a414c544552205441424c4520444154415f414c4c2041444420434f4e53545241494e5420444154415f455850455f464b20464f524549474e204b45592028455850455f494429205245464552454e434553204558504552494d454e54535f414c4c284944293b0a414c544552205441424c4520444154415f414c4c2041444420434f4e53545241494e5420444154415f53414d505f464b20464f524549474e204b4559202853414d505f494429205245464552454e4345532053414d504c45535f414c4c284944293b0a414c544552205441424c4520444154415f414c4c2041444420434f4e53545241494e5420444154415f444153545f464b20464f524549474e204b45592028444153545f494429205245464552454e43455320444154415f53544f524553284944293b0a414c544552205441424c4520444154415f414c4c2041444420434f4e53545241494e5420444154415f43544e525f464b20464f524549474e204b4559202843544e525f494429205245464552454e43455320444154415f414c4c284944293b0a414c544552205441424c4520444154415f414c4c2041444420434f4e53545241494e5420444154415f504552535f464b20464f524549474e204b45592028504552535f49445f5245474953544552455229205245464552454e43455320504552534f4e53284944293b0a414c544552205441424c4520444154415f414c4c2041444420434f4e53545241494e5420444154415f44454c5f464b20464f524549474e204b4559202844454c5f494429205245464552454e4345532044454c4554494f4e53284944293b0a414c544552205441424c4520444154415f414c4c2041444420434f4e53545241494e5420444154415f504552535f464b5f4d4f4420464f524549474e204b45592028504552535f49445f4d4f44494649455229205245464552454e43455320504552534f4e53284944293b0a414c544552205441424c4520444154415f5345545f52454c4154494f4e53484950535f414c4c2041444420434f4e53545241494e5420445352455f444154415f464b5f4348494c4420464f524549474e204b45592028444154415f49445f4348494c4429205245464552454e43455320444154415f414c4c28494429204f4e2044454c45544520434153434144453b0a414c544552205441424c4520444154415f5345545f52454c4154494f4e53484950535f414c4c2041444420434f4e53545241494e5420445352455f444154415f464b5f504152454e5420464f524549474e204b45592028444154415f49445f504152454e5429205245464552454e43455320444154415f414c4c28494429204f4e2044454c45544520434153434144453b0a414c544552205441424c4520444154415f5345545f52454c4154494f4e53484950535f414c4c2041444420434f4e53545241494e5420445352455f44454c5f464b20464f524549474e204b4559202844454c5f494429205245464552454e4345532044454c4554494f4e53284944293b0a414c544552205441424c4520444154415f5345545f52454c4154494f4e53484950535f414c4c2041444420434f4e53545241494e5420444154415f5345545f52454c4154494f4e53484950535f504552535f464b20464f524549474e204b45592028504552535f49445f415554484f5229205245464552454e43455320504552534f4e53284944293b0a414c544552205441424c452073616d706c655f72656c6174696f6e73686970735f616c6c2041444420434f4e53545241494e5420736172655f646174615f666b5f6368696c6420464f524549474e204b4559202873616d706c655f69645f6368696c6429205245464552454e4345532053414d504c45535f414c4c28696429204f4e2044454c45544520434153434144453b0a414c544552205441424c452073616d706c655f72656c6174696f6e73686970735f616c6c2041444420434f4e53545241494e5420736172655f646174615f666b5f706172656e7420464f524549474e204b4559202873616d706c655f69645f706172656e7429205245464552454e4345532053414d504c45535f414c4c28696429204f4e2044454c45544520434153434144453b0a414c544552205441424c452073616d706c655f72656c6174696f6e73686970735f616c6c2041444420434f4e53545241494e5420736172655f646174615f666b5f72656c6174696f6e7368697020464f524549474e204b4559202872656c6174696f6e736869705f696429205245464552454e4345532072656c6174696f6e736869705f7479706573286964293b0a414c544552205441424c452073616d706c655f72656c6174696f6e73686970735f616c6c2041444420434f4e53545241494e5420736172655f64656c5f666b20464f524549474e204b4559202864656c5f696429205245464552454e4345532064656c6574696f6e73286964293b0a414c544552205441424c452053414d504c455f52454c4154494f4e53484950535f414c4c2041444420434f4e53545241494e542053414d504c455f52454c4154494f4e53484950535f504552535f464b20464f524549474e204b45592028504552535f49445f415554484f5229205245464552454e43455320504552534f4e53284944293b0a414c544552205441424c4520444154415f53544f5245532041444420434f4e53545241494e5420444153545f4442494e5f464b20464f524549474e204b455920284442494e5f494429205245464552454e4345532044415441424153455f494e5354414e434553284944293b0a414c544552205441424c4520444154415f53544f52455f53455256494345532041444420434f4e53545241494e5420445353455f44535f464b20464f524549474e204b45592028444154415f53544f52455f494429205245464552454e43455320444154415f53544f52455328494429204f4e2044454c45544520434153434144453b0a414c544552205441424c4520444154415f53544f52455f534552564943455f444154415f5345545f54595045532041444420434f4e53545241494e54204453534453545f44535f464b20464f524549474e204b45592028444154415f53544f52455f534552564943455f494429205245464552454e43455320444154415f53544f52455f534552564943455328494429204f4e2044454c45544520434153434144453b0a414c544552205441424c4520444154415f53544f52455f534552564943455f444154415f5345545f54595045532041444420434f4e53545241494e54204453534453545f4453545f464b20464f524549474e204b45592028444154415f5345545f545950455f494429205245464552454e43455320444154415f5345545f545950455328494429204f4e2044454c45544520434153434144453b0a414c544552205441424c45204556454e54532041444420434f4e53545241494e542045564e545f504552535f464b20464f524549474e204b45592028504552535f49445f5245474953544552455229205245464552454e43455320504552534f4e53284944293b0a414c544552205441424c45204558504552494d454e54535f414c4c2041444420434f4e53545241494e5420455850455f455854595f464b20464f524549474e204b45592028455854595f494429205245464552454e434553204558504552494d454e545f5459504553284944293b0a414c544552205441424c45204558504552494d454e54535f414c4c2041444420434f4e53545241494e5420455850455f44454c5f464b20464f524549474e204b4559202844454c5f494429205245464552454e4345532044454c4554494f4e53284944293b0a414c544552205441424c45204558504552494d454e54535f414c4c2041444420434f4e53545241494e5420455850455f504552535f464b20464f524549474e204b45592028504552535f49445f5245474953544552455229205245464552454e43455320504552534f4e53284944293b0a414c544552205441424c45204558504552494d454e54535f414c4c2041444420434f4e53545241494e5420455850455f50524f4a5f464b20464f524549474e204b4559202850524f4a5f494429205245464552454e4345532050524f4a45435453284944293b0a414c544552205441424c45204558504552494d454e54535f414c4c2041444420434f4e53545241494e5420455850455f504552535f464b5f4d4f4420464f524549474e204b45592028504552535f49445f4d4f44494649455229205245464552454e43455320504552534f4e53284944293b0a414c544552205441424c45204154544143484d454e54532041444420434f4e53545241494e5420415454415f455850455f464b20464f524549474e204b45592028455850455f494429205245464552454e434553204558504552494d454e54535f414c4c284944293b0a414c544552205441424c45204154544143484d454e54532041444420434f4e53545241494e5420415454415f50524f4a5f464b20464f524549474e204b4559202850524f4a5f494429205245464552454e4345532050524f4a45435453284944293b0a414c544552205441424c45204154544143484d454e54532041444420434f4e53545241494e5420415454415f53414d505f464b20464f524549474e204b4559202853414d505f494429205245464552454e4345532053414d504c45535f414c4c284944293b0a414c544552205441424c45204154544143484d454e54532041444420434f4e53545241494e5420415454415f504552535f464b20464f524549474e204b45592028504552535f49445f5245474953544552455229205245464552454e43455320504552534f4e53284944293b0a414c544552205441424c45204154544143484d454e54532041444420434f4e53545241494e5420415454415f434f4e545f464b20464f524549474e204b45592028455841435f494429205245464552454e434553204154544143484d454e545f434f4e54454e5453284944293b0a414c544552205441424c45204558504552494d454e545f50524f504552544945532041444420434f4e53545241494e5420455850525f435654455f464b20464f524549474e204b45592028435654455f494429205245464552454e43455320434f4e54524f4c4c45445f564f434142554c4152595f5445524d53284944293b0a414c544552205441424c45204558504552494d454e545f50524f504552544945532041444420434f4e53545241494e5420455850525f455450545f464b20464f524549474e204b45592028455450545f494429205245464552454e434553204558504552494d454e545f545950455f50524f50455254595f545950455328494429204f4e2044454c45544520434153434144453b0a414c544552205441424c45204558504552494d454e545f50524f504552544945532041444420434f4e53545241494e5420455850525f455850455f464b20464f524549474e204b45592028455850455f494429205245464552454e434553204558504552494d454e54535f414c4c284944293b0a414c544552205441424c45204558504552494d454e545f50524f504552544945532041444420434f4e53545241494e5420455850525f504552535f464b20464f524549474e204b45592028504552535f49445f5245474953544552455229205245464552454e43455320504552534f4e53284944293b0a414c544552205441424c45204558504552494d454e545f50524f504552544945532041444420434f4e53545241494e5420455850525f4d4150525f464b20464f524549474e204b455920284d4154455f50524f505f494429205245464552454e434553204d4154455249414c53284944293b0a414c544552205441424c45204558504552494d454e545f50524f504552544945535f484953544f52592041444420434f4e53545241494e542045585052485f455450545f464b20464f524549474e204b45592028455450545f494429205245464552454e434553204558504552494d454e545f545950455f50524f50455254595f545950455328494429204f4e2044454c45544520434153434144453b0a414c544552205441424c45204558504552494d454e545f50524f504552544945535f484953544f52592041444420434f4e53545241494e542045585052485f455850455f464b20464f524549474e204b45592028455850455f494429205245464552454e434553204558504552494d454e54535f414c4c28494429204f4e2044454c45544520434153434144453b0a414c544552205441424c45204558504552494d454e545f54595045532041444420434f4e53545241494e5420455854595f4442494e5f464b20464f524549474e204b455920284442494e5f494429205245464552454e4345532044415441424153455f494e5354414e434553284944293b0a414c544552205441424c45204558504552494d454e545f54595045532041444420434f4e53545241494e5420455854595f5343524950545f464b20464f524549474e204b4559202856414c49444154494f4e5f5343524950545f494429205245464552454e4345532053435249505453284944293b0a414c544552205441424c45204558504552494d454e545f545950455f50524f50455254595f54595045532041444420434f4e53545241494e5420455450545f455854595f464b20464f524549474e204b45592028455854595f494429205245464552454e434553204558504552494d454e545f545950455328494429204f4e2044454c45544520434153434144453b0a414c544552205441424c45204558504552494d454e545f545950455f50524f50455254595f54595045532041444420434f4e53545241494e5420455450545f504552535f464b20464f524549474e204b45592028504552535f49445f5245474953544552455229205245464552454e43455320504552534f4e53284944293b0a414c544552205441424c45204558504552494d454e545f545950455f50524f50455254595f54595045532041444420434f4e53545241494e5420455450545f505254595f464b20464f524549474e204b45592028505254595f494429205245464552454e4345532050524f50455254595f545950455328494429204f4e2044454c45544520434153434144453b0a414c544552205441424c452045585445524e414c5f444154412041444420434f4e53545241494e5420455844415f435654455f464b20464f524549474e204b45592028435654455f49445f53544f525f464d5429205245464552454e43455320434f4e54524f4c4c45445f564f434142554c4152595f5445524d53284944293b0a414c544552205441424c452045585445524e414c5f444154412041444420434f4e53545241494e5420455844415f435654455f53544f5245445f4f4e5f464b20464f524549474e204b45592028435654455f49445f53544f524529205245464552454e43455320434f4e54524f4c4c45445f564f434142554c4152595f5445524d53284944293b0a414c544552205441424c452045585445524e414c5f444154412041444420434f4e53545241494e5420455844415f444154415f464b20464f524549474e204b45592028444154415f494429205245464552454e43455320444154415f414c4c284944293b0a414c544552205441424c452045585445524e414c5f444154412041444420434f4e53545241494e5420455844415f464654595f464b20464f524549474e204b45592028464654595f494429205245464552454e4345532046494c455f464f524d41545f5459504553284944293b0a414c544552205441424c452045585445524e414c5f444154412041444420434f4e53545241494e5420455844415f4c4f54595f464b20464f524549474e204b455920284c4f54595f494429205245464552454e434553204c4f4341544f525f5459504553284944293b0a414c544552205441424c452046494c455f464f524d41545f54595045532041444420434f4e53545241494e5420464654595f4442494e5f464b20464f524549474e204b455920284442494e5f494429205245464552454e4345532044415441424153455f494e5354414e434553284944293b0a414c544552205441424c45205350414345532041444420434f4e53545241494e542053504143455f4442494e5f464b20464f524549474e204b455920284442494e5f494429205245464552454e4345532044415441424153455f494e5354414e434553284944293b0a414c544552205441424c45205350414345532041444420434f4e53545241494e542053504143455f504552535f464b5f5245474953544552455220464f524549474e204b45592028504552535f49445f5245474953544552455229205245464552454e43455320504552534f4e53284944293b0a414c544552205441424c452044454c4554494f4e532041444420434f4e53545241494e542044454c5f504552535f464b20464f524549474e204b45592028504552535f49445f5245474953544552455229205245464552454e43455320504552534f4e53284944293b0a414c544552205441424c45204d4154455249414c532041444420434f4e53545241494e54204d4154455f4442494e5f464b20464f524549474e204b455920284442494e5f494429205245464552454e4345532044415441424153455f494e5354414e434553284944293b0a414c544552205441424c45204d4154455249414c532041444420434f4e53545241494e54204d4154455f4d4154595f464b20464f524549474e204b455920284d4154595f494429205245464552454e434553204d4154455249414c5f5459504553284944293b0a414c544552205441424c45204d4154455249414c532041444420434f4e53545241494e54204d4154455f504552535f464b20464f524549474e204b45592028504552535f49445f5245474953544552455229205245464552454e43455320504552534f4e53284944293b0a414c544552205441424c45204d4154455249414c5f50524f504552544945532041444420434f4e53545241494e54204d4150525f435654455f464b20464f524549474e204b45592028435654455f494429205245464552454e43455320434f4e54524f4c4c45445f564f434142554c4152595f5445524d53284944293b0a414c544552205441424c45204d4154455249414c5f50524f504552544945532041444420434f4e53545241494e54204d4150525f4d4150525f464b20464f524549474e204b455920284d4154455f50524f505f494429205245464552454e434553204d4154455249414c53284944293b0a414c544552205441424c45204d4154455249414c5f50524f504552544945532041444420434f4e53545241494e54204d4150525f4d4154455f464b20464f524549474e204b455920284d4154455f494429205245464552454e434553204d4154455249414c53284944293b0a414c544552205441424c45204d4154455249414c5f50524f504552544945532041444420434f4e53545241494e54204d4150525f4d5450545f464b20464f524549474e204b455920284d5450545f494429205245464552454e434553204d4154455249414c5f545950455f50524f50455254595f545950455328494429204f4e2044454c45544520434153434144453b0a414c544552205441424c45204d4154455249414c5f50524f504552544945532041444420434f4e53545241494e54204d4150525f504552535f464b20464f524549474e204b45592028504552535f49445f5245474953544552455229205245464552454e43455320504552534f4e53284944293b0a414c544552205441424c45204d4154455249414c5f50524f504552544945535f484953544f52592041444420434f4e53545241494e54204d415052485f4d4154455f464b20464f524549474e204b455920284d4154455f494429205245464552454e434553204d4154455249414c5328494429204f4e2044454c45544520434153434144453b0a414c544552205441424c45204d4154455249414c5f50524f504552544945535f484953544f52592041444420434f4e53545241494e54204d415052485f4d5450545f464b20464f524549474e204b455920284d5450545f494429205245464552454e434553204d4154455249414c5f545950455f50524f50455254595f545950455328494429204f4e2044454c45544520434153434144453b0a414c544552205441424c45204d4154455249414c5f54595045532041444420434f4e53545241494e54204d4154595f4442494e5f464b20464f524549474e204b455920284442494e5f494429205245464552454e4345532044415441424153455f494e5354414e434553284944293b0a414c544552205441424c45204d4154455249414c5f54595045532041444420434f4e53545241494e54204d4154595f5343524950545f464b20464f524549474e204b4559202856414c49444154494f4e5f5343524950545f494429205245464552454e4345532053435249505453284944293b0a414c544552205441424c45204d4154455249414c5f545950455f50524f50455254595f54595045532041444420434f4e53545241494e54204d5450545f4d4154595f464b20464f524549474e204b455920284d4154595f494429205245464552454e434553204d4154455249414c5f545950455328494429204f4e2044454c45544520434153434144453b0a414c544552205441424c45204d4154455249414c5f545950455f50524f50455254595f54595045532041444420434f4e53545241494e54204d5450545f504552535f464b20464f524549474e204b45592028504552535f49445f5245474953544552455229205245464552454e43455320504552534f4e53284944293b0a414c544552205441424c45204d4154455249414c5f545950455f50524f50455254595f54595045532041444420434f4e53545241494e54204d5450545f505254595f464b20464f524549474e204b45592028505254595f494429205245464552454e4345532050524f50455254595f545950455328494429204f4e2044454c45544520434153434144453b0a414c544552205441424c4520444154415f5345545f54595045532041444420434f4e53545241494e5420445354595f4442494e5f464b20464f524549474e204b455920284442494e5f494429205245464552454e4345532044415441424153455f494e5354414e434553284944293b0a414c544552205441424c4520444154415f5345545f54595045532041444420434f4e53545241494e5420445354595f5343524950545f464b20464f524549474e204b4559202856414c49444154494f4e5f5343524950545f494429205245464552454e4345532053435249505453284944293b0a414c544552205441424c4520504552534f4e532041444420434f4e53545241494e5420504552535f4442494e5f464b20464f524549474e204b455920284442494e5f494429205245464552454e4345532044415441424153455f494e5354414e434553284944293b0a414c544552205441424c4520504552534f4e532041444420434f4e53545241494e5420504552535f53504143455f464b20464f524549474e204b4559202853504143455f494429205245464552454e43455320535041434553284944293b0a414c544552205441424c4520504552534f4e532041444420434f4e53545241494e5420504552535f504552535f464b20464f524549474e204b45592028504552535f49445f5245474953544552455229205245464552454e43455320504552534f4e53284944293b0a414c544552205441424c452050524f4a454354532041444420434f4e53545241494e542050524f4a5f53504143455f464b20464f524549474e204b4559202853504143455f494429205245464552454e43455320535041434553284944293b0a414c544552205441424c452050524f4a454354532041444420434f4e53545241494e542050524f4a5f504552535f464b5f4c454144455220464f524549474e204b45592028504552535f49445f4c454144455229205245464552454e43455320504552534f4e53284944293b0a414c544552205441424c452050524f4a454354532041444420434f4e53545241494e542050524f4a5f504552535f464b5f5245474953544552455220464f524549474e204b45592028504552535f49445f5245474953544552455229205245464552454e43455320504552534f4e53284944293b0a414c544552205441424c452050524f4a454354532041444420434f4e53545241494e542050524f4a5f504552535f464b5f4d4f4420464f524549474e204b45592028504552535f49445f4d4f44494649455229205245464552454e43455320504552534f4e53284944293b0a414c544552205441424c452050524f50455254595f54595045532041444420434f4e53545241494e5420505254595f434f564f5f464b20464f524549474e204b45592028434f564f5f494429205245464552454e43455320434f4e54524f4c4c45445f564f434142554c4152494553284944293b0a414c544552205441424c452050524f50455254595f54595045532041444420434f4e53545241494e5420505254595f444154595f464b20464f524549474e204b45592028444154595f494429205245464552454e43455320444154415f5459504553284944293b0a414c544552205441424c452050524f50455254595f54595045532041444420434f4e53545241494e5420505254595f4442494e5f464b20464f524549474e204b455920284442494e5f494429205245464552454e4345532044415441424153455f494e5354414e434553284944293b0a414c544552205441424c452050524f50455254595f54595045532041444420434f4e53545241494e5420505254595f504552535f464b20464f524549474e204b45592028504552535f49445f5245474953544552455229205245464552454e43455320504552534f4e53284944293b0a414c544552205441424c452050524f50455254595f54595045532041444420434f4e53545241494e5420505254595f4d4154595f464b20464f524549474e204b455920284d4154595f50524f505f494429205245464552454e434553204d4154455249414c5f545950455328494429204f4e2044454c45544520434153434144453b0a414c544552205441424c4520524f4c455f41535349474e4d454e54532041444420434f4e53545241494e5420524f41535f4442494e5f464b20464f524549474e204b455920284442494e5f494429205245464552454e4345532044415441424153455f494e5354414e43455328494429204f4e2044454c45544520434153434144453b0a414c544552205441424c4520524f4c455f41535349474e4d454e54532041444420434f4e53545241494e5420524f41535f53504143455f464b20464f524549474e204b4559202853504143455f494429205245464552454e4345532053504143455328494429204f4e2044454c45544520434153434144453b0a414c544552205441424c4520524f4c455f41535349474e4d454e54532041444420434f4e53545241494e5420524f41535f504552535f464b5f4752414e54454520464f524549474e204b45592028504552535f49445f4752414e54454529205245464552454e43455320504552534f4e5328494429204f4e2044454c45544520434153434144453b0a414c544552205441424c4520524f4c455f41535349474e4d454e54532041444420434f4e53545241494e5420524f41535f41475f464b5f4752414e54454520464f524549474e204b4559202841475f49445f4752414e54454529205245464552454e43455320415554484f52495a4154494f4e5f47524f55505328494429204f4e2044454c45544520434153434144453b0a414c544552205441424c4520524f4c455f41535349474e4d454e54532041444420434f4e53545241494e5420524f41535f504552535f464b5f5245474953544552455220464f524549474e204b45592028504552535f49445f5245474953544552455229205245464552454e43455320504552534f4e53284944293b0a414c544552205441424c452053414d504c45535f414c4c2041444420434f4e53545241494e542053414d505f4442494e5f464b20464f524549474e204b455920284442494e5f494429205245464552454e4345532044415441424153455f494e5354414e434553284944293b0a414c544552205441424c452053414d504c45535f414c4c2041444420434f4e53545241494e542053414d505f53504143455f464b20464f524549474e204b4559202853504143455f494429205245464552454e43455320535041434553284944293b0a414c544552205441424c452053414d504c45535f414c4c2041444420434f4e53545241494e542053414d505f44454c5f464b20464f524549474e204b4559202844454c5f494429205245464552454e4345532044454c4554494f4e53284944293b0a414c544552205441424c452053414d504c45535f414c4c2041444420434f4e53545241494e542053414d505f504552535f464b20464f524549474e204b45592028504552535f49445f5245474953544552455229205245464552454e43455320504552534f4e53284944293b0a414c544552205441424c452053414d504c45535f414c4c2041444420434f4e53545241494e542053414d505f53414d505f464b5f504152545f4f4620464f524549474e204b4559202853414d505f49445f504152545f4f4629205245464552454e4345532053414d504c45535f414c4c284944293b0a414c544552205441424c452053414d504c45535f414c4c2041444420434f4e53545241494e542053414d505f455850455f464b20464f524549474e204b45592028455850455f494429205245464552454e434553204558504552494d454e54535f414c4c284944293b0a414c544552205441424c452053414d504c45535f414c4c2041444420434f4e53545241494e542053414d505f534154595f464b20464f524549474e204b45592028534154595f494429205245464552454e4345532053414d504c455f5459504553284944293b0a414c544552205441424c452053414d504c45535f414c4c2041444420434f4e53545241494e542053414d505f504552535f464b5f4d4f4420464f524549474e204b45592028504552535f49445f4d4f44494649455229205245464552454e43455320504552534f4e53284944293b0a414c544552205441424c452053414d504c455f50524f504552544945532041444420434f4e53545241494e5420534150525f435654455f464b20464f524549474e204b45592028435654455f494429205245464552454e43455320434f4e54524f4c4c45445f564f434142554c4152595f5445524d53284944293b0a414c544552205441424c452053414d504c455f50524f504552544945532041444420434f4e53545241494e5420534150525f4d4150525f464b20464f524549474e204b455920284d4154455f50524f505f494429205245464552454e434553204d4154455249414c53284944293b0a414c544552205441424c452053414d504c455f50524f504552544945532041444420434f4e53545241494e5420534150525f504552535f464b20464f524549474e204b45592028504552535f49445f5245474953544552455229205245464552454e43455320504552534f4e53284944293b0a414c544552205441424c452053414d504c455f50524f504552544945532041444420434f4e53545241494e5420534150525f53414d505f464b20464f524549474e204b4559202853414d505f494429205245464552454e4345532053414d504c45535f414c4c284944293b0a414c544552205441424c452053414d504c455f50524f504552544945532041444420434f4e53545241494e5420534150525f535450545f464b20464f524549474e204b45592028535450545f494429205245464552454e4345532053414d504c455f545950455f50524f50455254595f545950455328494429204f4e2044454c45544520434153434144453b0a414c544552205441424c452053414d504c455f50524f504552544945535f484953544f52592041444420434f4e53545241494e542053415052485f53414d505f464b20464f524549474e204b4559202853414d505f494429205245464552454e4345532053414d504c45535f414c4c28494429204f4e2044454c45544520434153434144453b0a414c544552205441424c452053414d504c455f50524f504552544945535f484953544f52592041444420434f4e53545241494e542053415052485f535450545f464b20464f524549474e204b45592028535450545f494429205245464552454e4345532053414d504c455f545950455f50524f50455254595f545950455328494429204f4e2044454c45544520434153434144453b0a414c544552205441424c452053414d504c455f54595045532041444420434f4e53545241494e5420534154595f4442494e5f464b20464f524549474e204b455920284442494e5f494429205245464552454e4345532044415441424153455f494e5354414e434553284944293b0a414c544552205441424c452053414d504c455f54595045532041444420434f4e53545241494e5420534154595f5343524950545f464b20464f524549474e204b4559202856414c49444154494f4e5f5343524950545f494429205245464552454e4345532053435249505453284944293b0a414c544552205441424c452053414d504c455f545950455f50524f50455254595f54595045532041444420434f4e53545241494e5420535450545f504552535f464b20464f524549474e204b45592028504552535f49445f5245474953544552455229205245464552454e43455320504552534f4e53284944293b0a414c544552205441424c452053414d504c455f545950455f50524f50455254595f54595045532041444420434f4e53545241494e5420535450545f505254595f464b20464f524549474e204b45592028505254595f494429205245464552454e4345532050524f50455254595f545950455328494429204f4e2044454c45544520434153434144453b0a414c544552205441424c452053414d504c455f545950455f50524f50455254595f54595045532041444420434f4e53545241494e5420535450545f534154595f464b20464f524549474e204b45592028534154595f494429205245464552454e4345532053414d504c455f545950455328494429204f4e2044454c45544520434153434144453b0a414c544552205441424c4520444154415f5345545f545950455f50524f50455254595f54595045532041444420434f4e53545241494e542044535450545f445354595f464b20464f524549474e204b45592028445354595f494429205245464552454e43455320444154415f5345545f54595045532849442920204f4e2044454c45544520434153434144453b0a414c544552205441424c4520444154415f5345545f545950455f50524f50455254595f54595045532041444420434f4e53545241494e542044535450545f504552535f464b20464f524549474e204b45592028504552535f49445f5245474953544552455229205245464552454e43455320504552534f4e53284944293b0a414c544552205441424c4520444154415f5345545f545950455f50524f50455254595f54595045532041444420434f4e53545241494e542044535450545f505254595f464b20464f524549474e204b45592028505254595f494429205245464552454e4345532050524f50455254595f545950455328494429204f4e2044454c45544520434153434144453b0a414c544552205441424c4520444154415f5345545f50524f504552544945532041444420434f4e53545241494e5420445350525f435654455f464b20464f524549474e204b45592028435654455f494429205245464552454e43455320434f4e54524f4c4c45445f564f434142554c4152595f5445524d53284944293b0a414c544552205441424c4520444154415f5345545f50524f504552544945532041444420434f4e53545241494e5420445350525f44535450545f464b20464f524549474e204b4559202844535450545f494429205245464552454e43455320444154415f5345545f545950455f50524f50455254595f545950455328494429204f4e2044454c45544520434153434144453b0a414c544552205441424c4520444154415f5345545f50524f504552544945532041444420434f4e53545241494e5420445350525f44535f464b20464f524549474e204b4559202844535f494429205245464552454e43455320444154415f414c4c284944293b0a414c544552205441424c4520444154415f5345545f50524f504552544945532041444420434f4e53545241494e5420445350525f504552535f464b20464f524549474e204b45592028504552535f49445f5245474953544552455229205245464552454e43455320504552534f4e53284944293b0a414c544552205441424c4520444154415f5345545f50524f504552544945532041444420434f4e53545241494e5420445350525f4d4150525f464b20464f524549474e204b455920284d4154455f50524f505f494429205245464552454e434553204d4154455249414c53284944293b0a414c544552205441424c4520444154415f5345545f50524f504552544945535f484953544f52592041444420434f4e53545241494e542044535052485f44535450545f464b20464f524549474e204b4559202844535450545f494429205245464552454e43455320444154415f5345545f545950455f50524f50455254595f545950455328494429204f4e2044454c45544520434153434144453b0a414c544552205441424c4520444154415f5345545f50524f504552544945535f484953544f52592041444420434f4e53545241494e542044535052485f44535f464b20464f524549474e204b4559202844535f494429205245464552454e43455320444154415f414c4c28494429204f4e2044454c45544520434153434144453b0a414c544552205441424c4520415554484f52495a4154494f4e5f47524f5550532041444420434f4e53545241494e542041475f4442494e5f464b20464f524549474e204b455920284442494e5f494429205245464552454e4345532044415441424153455f494e5354414e434553284944293b0a414c544552205441424c4520415554484f52495a4154494f4e5f47524f55505f504552534f4e532041444420434f4e53545241494e54204147505f41475f464b20464f524549474e204b4559202841475f494429205245464552454e43455320415554484f52495a4154494f4e5f47524f555053284944293b0a414c544552205441424c4520415554484f52495a4154494f4e5f47524f55505f504552534f4e532041444420434f4e53545241494e54204147505f504552535f464b20464f524549474e204b45592028504552535f494429205245464552454e43455320504552534f4e53284944293b0a414c544552205441424c4520415554484f52495a4154494f4e5f47524f5550532041444420434f4e53545241494e542041475f504552535f464b20464f524549474e204b45592028504552535f49445f5245474953544552455229205245464552454e43455320504552534f4e53284944293b0a0a414c544552205441424c452046494c544552532041444420434f4e53545241494e542046494c545f504552535f464b20464f524549474e204b45592028504552535f49445f5245474953544552455229205245464552454e43455320504552534f4e53284944293b0a414c544552205441424c452046494c544552532041444420434f4e53545241494e542046494c545f4442494e5f464b20464f524549474e204b455920284442494e5f494429205245464552454e4345532044415441424153455f494e5354414e434553284944293b0a414c544552205441424c4520475249445f435553544f4d5f434f4c554d4e532041444420434f4e53545241494e5420475249445f435553544f4d5f434f4c554d4e535f504552535f464b20464f524549474e204b45592028504552535f49445f5245474953544552455229205245464552454e43455320504552534f4e53284944293b0a414c544552205441424c4520475249445f435553544f4d5f434f4c554d4e532041444420434f4e53545241494e5420475249445f435553544f4d5f434f4c554d4e535f4442494e5f464b20464f524549474e204b455920284442494e5f494429205245464552454e4345532044415441424153455f494e5354414e434553284944293b0a414c544552205441424c4520515545524945532041444420434f4e53545241494e5420515545525f504552535f464b20464f524549474e204b45592028504552535f49445f5245474953544552455229205245464552454e43455320504552534f4e53284944293b0a414c544552205441424c4520515545524945532041444420434f4e53545241494e5420515545525f4442494e5f464b20464f524549474e204b455920284442494e5f494429205245464552454e4345532044415441424153455f494e5354414e434553284944293b0a0a414c544552205441424c4520534352495054532041444420434f4e53545241494e5420534352495f4442494e5f464b20464f524549474e204b455920284442494e5f494429205245464552454e4345532044415441424153455f494e5354414e434553284944293b0a414c544552205441424c4520534352495054532041444420434f4e53545241494e5420534352495f504552535f464b20464f524549474e204b45592028504552535f49445f5245474953544552455229205245464552454e43455320504552534f4e53284944293b0a414c544552205441424c45204d4154455249414c5f545950455f50524f50455254595f54595045532041444420434f4e53545241494e54204d5450545f5343524950545f464b20464f524549474e204b455920285343524950545f494429205245464552454e4345532053435249505453284944293b0a414c544552205441424c452053414d504c455f545950455f50524f50455254595f54595045532041444420434f4e53545241494e5420535450545f5343524950545f464b20464f524549474e204b455920285343524950545f494429205245464552454e4345532053435249505453284944293b0a414c544552205441424c45204558504552494d454e545f545950455f50524f50455254595f54595045532041444420434f4e53545241494e5420455450545f5343524950545f464b20464f524549474e204b455920285343524950545f494429205245464552454e4345532053435249505453284944293b0a414c544552205441424c4520444154415f5345545f545950455f50524f50455254595f54595045532041444420434f4e53545241494e542044535450545f5343524950545f464b20464f524549474e204b455920285343524950545f494429205245464552454e4345532053435249505453284944293b0a414c544552205441424c45204f4e4c5920504f53545f524547495354524154494f4e5f444154415345545f51554555452041444420434f4e53545241494e5420707264715f64735f666b20464f524549474e204b4559202864735f696429205245464552454e43455320646174615f616c6c28696429204f4e2044454c45544520434153434144453b0a0a414c544552205441424c45204558504552494d454e545f52454c4154494f4e53484950535f484953544f52592041444420434f4e53545241494e5420455852454c485f4d41494e5f455850455f464b20464f524549474e204b455920284d41494e5f455850455f494429205245464552454e434553204558504552494d454e54535f414c4c28494429204f4e2044454c45544520434153434144453b0a414c544552205441424c45204558504552494d454e545f52454c4154494f4e53484950535f484953544f52592041444420434f4e53545241494e5420455852454c485f53414d505f464b20464f524549474e204b4559202853414d505f494429205245464552454e4345532053414d504c45535f414c4c28494429204f4e2044454c45544520534554204e554c4c3b0a414c544552205441424c45204558504552494d454e545f52454c4154494f4e53484950535f484953544f52592041444420434f4e53545241494e5420455852454c485f444154415f464b20464f524549474e204b45592028444154415f494429205245464552454e43455320444154415f414c4c28494429204f4e2044454c45544520534554204e554c4c3b0a414c544552205441424c45204558504552494d454e545f52454c4154494f4e53484950535f484953544f52592041444420434f4e53545241494e5420455852454c485f50524f4a5f464b20464f524549474e204b4559202850524f4a5f494429205245464552454e4345532050524f4a4543545328494429204f4e2044454c45544520534554204e554c4c3b0a414c544552205441424c452053414d504c455f52454c4154494f4e53484950535f484953544f52592041444420434f4e53545241494e542053414d5052454c485f4d41494e5f53414d505f464b20464f524549474e204b455920284d41494e5f53414d505f494429205245464552454e4345532053414d504c45535f414c4c28494429204f4e2044454c45544520434153434144453b0a414c544552205441424c452053414d504c455f52454c4154494f4e53484950535f484953544f52592041444420434f4e53545241494e542053414d5052454c485f455850455f464b20464f524549474e204b45592028455850455f494429205245464552454e434553204558504552494d454e54535f414c4c28494429204f4e2044454c45544520534554204e554c4c3b0a414c544552205441424c452053414d504c455f52454c4154494f4e53484950535f484953544f52592041444420434f4e53545241494e542053414d5052454c485f53414d505f464b20464f524549474e204b4559202853414d505f494429205245464552454e4345532053414d504c45535f414c4c28494429204f4e2044454c45544520534554204e554c4c3b0a414c544552205441424c452053414d504c455f52454c4154494f4e53484950535f484953544f52592041444420434f4e53545241494e542053414d5052454c485f444154415f464b20464f524549474e204b45592028444154415f494429205245464552454e43455320444154415f414c4c28494429204f4e2044454c45544520534554204e554c4c3b0a414c544552205441424c452053414d504c455f52454c4154494f4e53484950535f484953544f52592041444420434f4e53545241494e542053414d5052454c485f53504143455f464b20464f524549474e204b4559202853504143455f494429205245464552454e4345532053504143455328494429204f4e2044454c45544520534554204e554c4c3b0a414c544552205441424c4520444154415f5345545f52454c4154494f4e53484950535f484953544f52592041444420434f4e53545241494e54204441544152454c485f4d41494e5f444154415f464b20464f524549474e204b455920284d41494e5f444154415f494429205245464552454e43455320444154415f414c4c28494429204f4e2044454c45544520434153434144453b0a414c544552205441424c4520444154415f5345545f52454c4154494f4e53484950535f484953544f52592041444420434f4e53545241494e54204441544152454c485f455850455f464b20464f524549474e204b45592028455850455f494429205245464552454e434553204558504552494d454e54535f414c4c28494429204f4e2044454c45544520534554204e554c4c3b0a414c544552205441424c4520444154415f5345545f52454c4154494f4e53484950535f484953544f52592041444420434f4e53545241494e54204441544152454c485f53414d505f464b20464f524549474e204b4559202853414d505f494429205245464552454e4345532053414d504c45535f414c4c28494429204f4e2044454c45544520534554204e554c4c3b0a414c544552205441424c4520444154415f5345545f52454c4154494f4e53484950535f484953544f52592041444420434f4e53545241494e54204441544152454c485f444154415f464b20464f524549474e204b45592028444154415f494429205245464552454e43455320444154415f414c4c28494429204f4e2044454c45544520534554204e554c4c3b0a414c544552205441424c452050524f4a4543545f52454c4154494f4e53484950535f484953544f52592041444420434f4e53545241494e5420505252454c485f4d41494e5f50524f4a5f464b20464f524549474e204b455920284d41494e5f50524f4a5f494429205245464552454e4345532050524f4a4543545328494429204f4e2044454c45544520434153434144453b0a414c544552205441424c452050524f4a4543545f52454c4154494f4e53484950535f484953544f52592041444420434f4e53545241494e5420505252454c485f455850455f464b20464f524549474e204b45592028455850455f494429205245464552454e434553204558504552494d454e54535f414c4c28494429204f4e2044454c45544520534554204e554c4c3b0a414c544552205441424c452050524f4a4543545f52454c4154494f4e53484950535f484953544f52592041444420434f4e53545241494e5420505252454c485f53504143455f464b20464f524549474e204b4559202853504143455f494429205245464552454e4345532053504143455328494429204f4e2044454c45544520534554204e554c4c3b0a0a414c544552205441424c452045585445524e414c5f444154415f4d414e4147454d454e545f53595354454d532041444420434f4e53545241494e542045444d535f4442494e5f464b20464f524549474e204b455920284442494e5f494429205245464552454e4345532044415441424153455f494e5354414e434553284944293b0a414c544552205441424c45204c494e4b5f444154412041444420434f4e53545241494e54204c4e44415f444154415f464b20464f524549474e204b45592028444154415f494429205245464552454e43455320444154415f414c4c28494429204f4e2044454c45544520434153434144453b0a414c544552205441424c45204c494e4b5f444154412041444420434f4e53545241494e54204c4e44415f45444d535f464b20464f524549474e204b4559202845444d535f494429205245464552454e4345532045585445524e414c5f444154415f4d414e4147454d454e545f53595354454d53284944293b0a0a414c544552205441424c45204d45544150524f4a454354532041444420434f4e53545241494e54204d45544150524f4a454354535f4f574e45525f464b20464f524549474e204b455920284f574e455229205245464552454e43455320504552534f4e5328494429204f4e2044454c45544520434153434144453b0a414c544552205441424c45204d45544150524f4a4543545f41535349474e4d454e54535f414c4c2041444420434f4e53545241494e54204d45544150524f4a4543545f41535349474e4d454e54535f414c4c5f4d4550525f49445f464b20464f524549474e204b455920284d4550525f494429205245464552454e434553204d45544150524f4a4543545328494429204f4e2044454c45544520434153434144453b0a414c544552205441424c45204d45544150524f4a4543545f41535349474e4d454e54535f414c4c2041444420434f4e53545241494e54204d45544150524f4a4543545f41535349474e4d454e54535f414c4c5f455850455f49445f464b20464f524549474e204b45592028455850455f494429205245464552454e434553204558504552494d454e54535f414c4c28494429204f4e2044454c45544520434153434144453b0a414c544552205441424c45204d45544150524f4a4543545f41535349474e4d454e54535f414c4c2041444420434f4e53545241494e54204d45544150524f4a4543545f41535349474e4d454e54535f414c4c5f53414d505f49445f464b20464f524549474e204b4559202853414d505f494429205245464552454e4345532053414d504c45535f414c4c28494429204f4e2044454c45544520434153434144453b0a414c544552205441424c45204d45544150524f4a4543545f41535349474e4d454e54535f414c4c2041444420434f4e53545241494e54204d45544150524f4a4543545f41535349474e4d454e54535f414c4c5f444154415f49445f464b20464f524549474e204b45592028444154415f494429205245464552454e43455320444154415f414c4c28494429204f4e2044454c45544520434153434144453b0a414c544552205441424c45204d45544150524f4a4543545f41535349474e4d454e54535f414c4c2041444420434f4e53545241494e54204d45544150524f4a4543545f41535349474e4d454e54535f414c4c5f4d4154455f49445f464b20464f524549474e204b455920284d4154455f494429205245464552454e434553204d4154455249414c5328494429204f4e2044454c45544520434153434144453b0a414c544552205441424c45204d45544150524f4a4543545f41535349474e4d454e54535f414c4c2041444420434f4e53545241494e54204d45544150524f4a4543545f41535349474e4d454e54535f414c4c5f44454c5f49445f464b20464f524549474e204b4559202844454c5f494429205245464552454e4345532044454c4554494f4e53284944293b0a0a2d2d204372656174696e6720636865636b20636f6e73747261696e74730a0a414c544552205441424c45204558504552494d454e545f50524f504552544945532041444420434f4e53545241494e5420455850525f434b20434845434b200a09282856414c5545204953204e4f54204e554c4c20414e4420435654455f4944204953204e554c4c20414e44204d4154455f50524f505f4944204953204e554c4c29204f52200a09202856414c5545204953204e554c4c20414e4420435654455f4944204953204e4f54204e554c4c20414e44204d4154455f50524f505f4944204953204e554c4c29204f520a09202856414c5545204953204e554c4c20414e4420435654455f4944204953204e554c4c20414e44204d4154455f50524f505f4944204953204e4f54204e554c4c290a09293b0a414c544552205441424c45204558504552494d454e545f50524f504552544945535f484953544f52592041444420434f4e53545241494e542045585052485f434b20434845434b200a09282856414c5545204953204e4f54204e554c4c20414e4420564f434142554c4152595f5445524d204953204e554c4c20414e44204d4154455249414c204953204e554c4c29204f52200a09202856414c5545204953204e554c4c20414e4420564f434142554c4152595f5445524d204953204e4f54204e554c4c20414e44204d4154455249414c204953204e554c4c29204f520a09202856414c5545204953204e554c4c20414e4420564f434142554c4152595f5445524d204953204e554c4c20414e44204d4154455249414c204953204e4f54204e554c4c290a09293b0a414c544552205441424c4520524f4c455f41535349474e4d454e54532041444420434f4e53545241494e5420524f41535f4442494e5f53504143455f4152435f434b20434845434b2028284442494e5f4944204953204e4f54204e554c4c20414e442053504143455f4944204953204e554c4c29204f5220284442494e5f4944204953204e554c4c20414e442053504143455f4944204953204e4f54204e554c4c29293b0a414c544552205441424c4520524f4c455f41535349474e4d454e54532041444420434f4e53545241494e5420524f41535f41475f504552535f4152435f434b20434845434b20282841475f49445f4752414e544545204953204e4f54204e554c4c20414e4420504552535f49445f4752414e544545204953204e554c4c29204f52202841475f49445f4752414e544545204953204e554c4c20414e4420504552535f49445f4752414e544545204953204e4f54204e554c4c29293b0a0a414c544552205441424c452053414d504c45535f414c4c2041444420434f4e53545241494e542053414d505f4442494e5f53504143455f4152435f434b20434845434b2028284442494e5f4944204953204e4f54204e554c4c20414e442053504143455f4944204953204e554c4c29204f5220284442494e5f4944204953204e554c4c20414e442053504143455f4944204953204e4f54204e554c4c29293b0a414c544552205441424c452053414d504c455f50524f504552544945532041444420434f4e53545241494e5420534150525f434b20434845434b200a09282856414c5545204953204e4f54204e554c4c20414e4420435654455f4944204953204e554c4c20414e44204d4154455f50524f505f4944204953204e554c4c29204f52200a09202856414c5545204953204e554c4c20414e4420435654455f4944204953204e4f54204e554c4c20414e44204d4154455f50524f505f4944204953204e554c4c29204f520a09202856414c5545204953204e554c4c20414e4420435654455f4944204953204e554c4c20414e44204d4154455f50524f505f4944204953204e4f54204e554c4c290a09293b0a414c544552205441424c452053414d504c455f50524f504552544945535f484953544f52592041444420434f4e53545241494e542053415052485f434b20434845434b200a09282856414c5545204953204e4f54204e554c4c20414e4420564f434142554c4152595f5445524d204953204e554c4c20414e44204d4154455249414c204953204e554c4c29204f52200a09202856414c5545204953204e554c4c20414e4420564f434142554c4152595f5445524d204953204e4f54204e554c4c20414e44204d4154455249414c204953204e554c4c29204f520a09202856414c5545204953204e554c4c20414e4420564f434142554c4152595f5445524d204953204e554c4c20414e44204d4154455249414c204953204e4f54204e554c4c290a09293b0a414c544552205441424c45204d4154455249414c5f50524f504552544945532041444420434f4e53545241494e54204d4150525f434b20434845434b200a09282856414c5545204953204e4f54204e554c4c20414e4420435654455f4944204953204e554c4c20414e44204d4154455f50524f505f4944204953204e554c4c29204f52200a09202856414c5545204953204e554c4c20414e4420435654455f4944204953204e4f54204e554c4c20414e44204d4154455f50524f505f4944204953204e554c4c29204f520a09202856414c5545204953204e554c4c20414e4420435654455f4944204953204e554c4c20414e44204d4154455f50524f505f4944204953204e4f54204e554c4c290a09293b0a414c544552205441424c45204d4154455249414c5f50524f504552544945535f484953544f52592041444420434f4e53545241494e54204d415052485f434b20434845434b200a09282856414c5545204953204e4f54204e554c4c20414e4420564f434142554c4152595f5445524d204953204e554c4c20414e44204d4154455249414c204953204e554c4c29204f52200a09202856414c5545204953204e554c4c20414e4420564f434142554c4152595f5445524d204953204e4f54204e554c4c20414e44204d4154455249414c204953204e554c4c29204f520a09202856414c5545204953204e554c4c20414e4420564f434142554c4152595f5445524d204953204e554c4c20414e44204d4154455249414c204953204e4f54204e554c4c290a09293b0a414c544552205441424c4520444154415f5345545f50524f504552544945532041444420434f4e53545241494e5420445350525f434b20434845434b200a09282856414c5545204953204e4f54204e554c4c20414e4420435654455f4944204953204e554c4c20414e44204d4154455f50524f505f4944204953204e554c4c29204f52200a09202856414c5545204953204e554c4c20414e4420435654455f4944204953204e4f54204e554c4c20414e44204d4154455f50524f505f4944204953204e554c4c29204f520a09202856414c5545204953204e554c4c20414e4420435654455f4944204953204e554c4c20414e44204d4154455f50524f505f4944204953204e4f54204e554c4c290a09293b0a414c544552205441424c4520444154415f5345545f50524f504552544945535f484953544f52592041444420434f4e53545241494e542044535052485f434b20434845434b200a09282856414c5545204953204e4f54204e554c4c20414e4420564f434142554c4152595f5445524d204953204e554c4c20414e44204d4154455249414c204953204e554c4c29204f52200a09202856414c5545204953204e554c4c20414e4420564f434142554c4152595f5445524d204953204e4f54204e554c4c20414e44204d4154455249414c204953204e554c4c29204f520a09202856414c5545204953204e554c4c20414e4420564f434142554c4152595f5445524d204953204e554c4c20414e44204d4154455249414c204953204e4f54204e554c4c290a09293b0a414c544552205441424c45204154544143484d454e54532041444420434f4e53545241494e5420415454415f4152435f434b20434845434b200a092828455850455f4944204953204e4f54204e554c4c20414e442050524f4a5f4944204953204e554c4c20414e442053414d505f4944204953204e554c4c29204f52200a092028455850455f4944204953204e554c4c20414e442050524f4a5f4944204953204e4f54204e554c4c20414e442053414d505f4944204953204e554c4c29204f520a092028455850455f4944204953204e554c4c20414e442050524f4a5f4944204953204e554c4c20414e442053414d505f4944204953204e4f54204e554c4c290a09293b0a414c544552205441424c45206576656e74732041444420434f4e53545241494e542065766e745f65745f656e756d5f636b20434845434b200a0928656e746974795f7479706520494e2028274154544143484d454e54272c202744415441534554272c20274558504552494d454e54272c20275350414345272c20274d4154455249414c272c202750524f4a454354272c202750524f50455254595f54595045272c202753414d504c45272c2027564f434142554c415259272c2027415554484f52495a4154494f4e5f47524f5550272c20274d45544150524f4a4543542729293b200a414c544552205441424c4520636f6e74726f6c6c65645f766f636162756c6172795f7465726d732041444420434f4e53545241494e5420637674655f636b20434845434b20286f7264696e616c203e2030293b0a0a414c544552205441424c45204d45544150524f4a4543545f41535349474e4d454e54535f414c4c2041444420434f4e53545241494e54204d45544150524f4a4543545f41535349474e4d454e54535f414c4c5f434845434b5f4e4e20434845434b20280a0928455850455f4944204953204e4f54204e554c4c20414e442053414d505f4944204953204e554c4c20414e4420444154415f4944204953204e554c4c20414e44204d4154455f4944204953204e554c4c29204f520a0928455850455f4944204953204e554c4c20414e442053414d505f4944204953204e4f54204e554c4c20414e4420444154415f4944204953204e554c4c20414e44204d4154455f4944204953204e554c4c29204f520a0928455850455f4944204953204e554c4c20414e442053414d505f4944204953204e554c4c20414e4420444154415f4944204953204e4f54204e554c4c20414e44204d4154455f4944204953204e554c4c29204f520a0928455850455f4944204953204e554c4c20414e442053414d505f4944204953204e554c4c20414e4420444154415f4944204953204e554c4c20414e44204d4154455f4944204953204e4f54204e554c4c29293b0a0a414c544552205441424c4520534352495054532041444420434f4e53545241494e54205343524950545f4e4e5f434b20434845434b0a202028504c5547494e5f54595045203d20275052454445504c4f59454427204f5220534352495054204953204e4f54204e554c4c293b0a0a2d2d204372656174696e6720696e64696365730a0a43524541544520494e44455820434f564f5f504552535f464b5f49204f4e20434f4e54524f4c4c45445f564f434142554c41524945532028504552535f49445f52454749535445524552293b0a43524541544520494e44455820435654455f434f564f5f464b5f49204f4e20434f4e54524f4c4c45445f564f434142554c4152595f5445524d532028434f564f5f4944293b0a43524541544520494e44455820435654455f504552535f464b5f49204f4e20434f4e54524f4c4c45445f564f434142554c4152595f5445524d532028504552535f49445f52454749535445524552293b0a43524541544520494e44455820444154415f445354595f464b5f49204f4e20444154415f414c4c2028445354595f4944293b0a43524541544520494e44455820444154415f53414d505f464b5f49204f4e20444154415f414c4c202853414d505f4944293b0a43524541544520494e44455820444154415f455850455f464b5f49204f4e20444154415f414c4c2028455850455f4944293b0a43524541544520494e44455820444154415f44454c5f464b5f49204f4e20444154415f414c4c202844454c5f4944293b0a43524541544520494e44455820444153545f4442494e5f464b5f49204f4e20444154415f53544f52455320284442494e5f4944293b0a43524541544520494e44455820445352455f444154415f464b5f495f4348494c44204f4e20444154415f5345545f52454c4154494f4e53484950535f414c4c2028444154415f49445f4348494c44293b0a43524541544520494e44455820445352455f444154415f464b5f495f504152454e54204f4e20444154415f5345545f52454c4154494f4e53484950535f414c4c2028444154415f49445f504152454e54293b0a43524541544520494e44455820445352455f44454c5f464b5f49204f4e20444154415f5345545f52454c4154494f4e53484950535f414c4c202844454c5f4944293b0a43524541544520494e44455820736172655f646174615f666b5f695f6368696c64204f4e2073616d706c655f72656c6174696f6e73686970735f616c6c202873616d706c655f69645f6368696c64293b0a43524541544520494e44455820736172655f646174615f666b5f695f706172656e74204f4e2073616d706c655f72656c6174696f6e73686970735f616c6c202873616d706c655f69645f706172656e74293b0a43524541544520494e44455820736172655f646174615f666b5f695f72656c6174696f6e73686970204f4e2073616d706c655f72656c6174696f6e73686970735f616c6c202872656c6174696f6e736869705f6964293b0a43524541544520494e44455820736172655f64656c5f666b5f69204f4e2073616d706c655f72656c6174696f6e73686970735f616c6c202864656c5f6964293b0a43524541544520494e44455820445353455f44535f464b5f49204f4e20444154415f53544f52455f53455256494345532028444154415f53544f52455f4944293b0a43524541544520494e444558204453534453545f44535f464b5f49204f4e20444154415f53544f52455f534552564943455f444154415f5345545f54595045532028444154415f53544f52455f534552564943455f4944293b0a43524541544520494e444558204453534453545f4453545f464b5f49204f4e20444154415f53544f52455f534552564943455f444154415f5345545f54595045532028444154415f5345545f545950455f4944293b0a43524541544520494e44455820455450545f455854595f464b5f49204f4e204558504552494d454e545f545950455f50524f50455254595f54595045532028455854595f4944293b0a43524541544520494e44455820455450545f504552535f464b5f49204f4e204558504552494d454e545f545950455f50524f50455254595f54595045532028504552535f49445f52454749535445524552293b0a43524541544520494e44455820455450545f505254595f464b5f49204f4e204558504552494d454e545f545950455f50524f50455254595f54595045532028505254595f4944293b0a43524541544520494e4445582045564e545f504552535f464b5f49204f4e204556454e54532028504552535f49445f52454749535445524552293b0a43524541544520494e44455820415454415f455850455f464b5f49204f4e204154544143484d454e54532028455850455f4944293b0a43524541544520494e44455820415454415f53414d505f464b5f49204f4e204154544143484d454e5453202853414d505f4944293b0a43524541544520494e44455820415454415f50524f4a5f464b5f49204f4e204154544143484d454e5453202850524f4a5f4944293b0a43524541544520494e44455820415454415f504552535f464b5f49204f4e204154544143484d454e54532028504552535f49445f52454749535445524552293b0a43524541544520494e44455820415454415f455841435f464b5f49204f4e204154544143484d454e54532028455841435f4944293b0a43524541544520494e44455820455844415f435654455f464b5f49204f4e2045585445524e414c5f444154412028435654455f49445f53544f525f464d54293b0a43524541544520494e44455820455844415f435654455f53544f5245445f4f4e5f464b5f49204f4e2045585445524e414c5f444154412028435654455f49445f53544f5245293b0a43524541544520494e44455820455844415f464654595f464b5f49204f4e2045585445524e414c5f444154412028464654595f4944293b0a43524541544520494e44455820455844415f4c4f54595f464b5f49204f4e2045585445524e414c5f4441544120284c4f54595f4944293b0a43524541544520494e44455820455850455f455854595f464b5f49204f4e204558504552494d454e54535f414c4c2028455854595f4944293b0a43524541544520494e44455820455850455f44454c5f464b5f49204f4e204558504552494d454e54535f414c4c202844454c5f4944293b0a43524541544520494e44455820455850455f504552535f464b5f49204f4e204558504552494d454e54535f414c4c2028504552535f49445f52454749535445524552293b0a43524541544520494e44455820455850455f50524f4a5f464b5f49204f4e204558504552494d454e54535f414c4c202850524f4a5f4944293b0a43524541544520494e44455820455850525f435654455f464b5f49204f4e204558504552494d454e545f50524f504552544945532028435654455f4944293b0a43524541544520494e44455820455850525f455450545f464b5f49204f4e204558504552494d454e545f50524f504552544945532028455450545f4944293b0a43524541544520494e44455820455850525f455850455f464b5f49204f4e204558504552494d454e545f50524f504552544945532028455850455f4944293b0a43524541544520494e44455820455850525f504552535f464b5f49204f4e204558504552494d454e545f50524f504552544945532028504552535f49445f52454749535445524552293b0a43524541544520494e44455820455850525f4d4150525f464b5f49204f4e204558504552494d454e545f50524f5045525449455320284d4154455f50524f505f4944293b0a43524541544520494e4445582045585052485f455450545f464b5f49204f4e204558504552494d454e545f50524f504552544945535f484953544f52592028455450545f4944293b0a43524541544520494e4445582045585052485f455850455f464b5f49204f4e204558504552494d454e545f50524f504552544945535f484953544f52592028455850455f4944293b0a43524541544520494e4445582045585052485f565554535f464b5f49204f4e204558504552494d454e545f50524f504552544945535f484953544f5259202856414c49445f554e54494c5f54494d455354414d50293b0a43524541544520494e4445582053504143455f4442494e5f464b5f49204f4e2053504143455320284442494e5f4944293b0a43524541544520494e4445582053504143455f504552535f524547495354455245445f42595f464b5f49204f4e205350414345532028504552535f49445f52454749535445524552293b0a43524541544520494e4445582044454c5f504552535f464b5f49204f4e2044454c4554494f4e532028504552535f49445f52454749535445524552293b0a43524541544520494e444558204d4150525f435654455f464b5f49204f4e204d4154455249414c5f50524f504552544945532028435654455f4944293b0a43524541544520494e444558204d4150525f4d4154455f464b5f49204f4e204d4154455249414c5f50524f5045525449455320284d4154455f4944293b0a43524541544520494e444558204d4150525f4d5450545f464b5f49204f4e204d4154455249414c5f50524f5045525449455320284d5450545f4944293b0a43524541544520494e444558204d4150525f504552535f464b5f49204f4e204d4154455249414c5f50524f504552544945532028504552535f49445f52454749535445524552293b0a43524541544520494e444558204d4150525f4d4150525f464b5f49204f4e204d4154455249414c5f50524f5045525449455320284d4154455f50524f505f4944293b0a43524541544520494e444558204d415052485f455450545f464b5f49204f4e204d4154455249414c5f50524f504552544945535f484953544f525920284d5450545f4944293b0a43524541544520494e444558204d415052485f455850455f464b5f49204f4e204d4154455249414c5f50524f504552544945535f484953544f525920284d4154455f4944293b0a43524541544520494e444558204d415052485f565554535f464b5f49204f4e204d4154455249414c5f50524f504552544945535f484953544f5259202856414c49445f554e54494c5f54494d455354414d50293b0a43524541544520494e444558204d4154455f4d4154595f464b5f49204f4e204d4154455249414c5320284d4154595f4944293b0a43524541544520494e444558204d4154455f504552535f464b5f49204f4e204d4154455249414c532028504552535f49445f52454749535445524552293b0a43524541544520494e444558204d5450545f4d4154595f464b5f49204f4e204d4154455249414c5f545950455f50524f50455254595f545950455320284d4154595f4944293b0a43524541544520494e444558204d5450545f504552535f464b5f49204f4e204d4154455249414c5f545950455f50524f50455254595f54595045532028504552535f49445f52454749535445524552293b0a43524541544520494e444558204d5450545f505254595f464b5f49204f4e204d4154455249414c5f545950455f50524f50455254595f54595045532028505254595f4944293b0a43524541544520494e44455820504552535f53504143455f464b5f49204f4e20504552534f4e53202853504143455f4944293b0a43524541544520494e44455820504552535f49535f4143544956455f49204f4e20504552534f4e53202849535f414354495645293b0a43524541544520494e4445582050524f4a5f53504143455f464b5f49204f4e2050524f4a45435453202853504143455f4944293b0a43524541544520494e4445582050524f4a5f504552535f464b5f495f4c4541444552204f4e2050524f4a454354532028504552535f49445f4c4541444552293b0a43524541544520494e4445582050524f4a5f504552535f464b5f495f52454749535445524552204f4e2050524f4a454354532028504552535f49445f52454749535445524552293b0a43524541544520494e44455820505254595f434f564f5f464b5f49204f4e2050524f50455254595f54595045532028434f564f5f4944293b0a43524541544520494e44455820505254595f444154595f464b5f49204f4e2050524f50455254595f54595045532028444154595f4944293b0a43524541544520494e44455820505254595f504552535f464b5f49204f4e2050524f50455254595f54595045532028504552535f49445f52454749535445524552293b0a43524541544520494e44455820524f41535f4442494e5f464b5f49204f4e20524f4c455f41535349474e4d454e545320284442494e5f4944293b0a43524541544520494e44455820524f41535f53504143455f464b5f49204f4e20524f4c455f41535349474e4d454e5453202853504143455f4944293b0a43524541544520494e44455820524f41535f504552535f464b5f495f4752414e544545204f4e20524f4c455f41535349474e4d454e54532028504552535f49445f4752414e544545293b0a43524541544520494e44455820524f41535f41475f464b5f495f4752414e544545204f4e20524f4c455f41535349474e4d454e5453202841475f49445f4752414e544545293b0a43524541544520494e44455820524f41535f504552535f464b5f495f52454749535445524552204f4e20524f4c455f41535349474e4d454e54532028504552535f49445f52454749535445524552293b0a43524541544520494e4445582053414d505f44454c5f464b5f49204f4e2053414d504c45535f414c4c202844454c5f4944293b0a43524541544520494e4445582053414d505f504552535f464b5f49204f4e2053414d504c45535f414c4c2028504552535f49445f52454749535445524552293b0a43524541544520494e4445582053414d505f53414d505f464b5f495f504152545f4f46204f4e2053414d504c45535f414c4c202853414d505f49445f504152545f4f46293b0a43524541544520494e4445582053414d505f455850455f464b5f49204f4e2053414d504c45535f414c4c2028455850455f4944293b0a43524541544520494e4445582053414d505f434f44455f49204f4e2053414d504c45535f414c4c2028434f4445293b0a43524541544520494e4445582053414d505f534154595f464b5f49204f4e2053414d504c45535f414c4c2028534154595f4944293b0a43524541544520494e44455820534150525f435654455f464b5f49204f4e2053414d504c455f50524f504552544945532028435654455f4944293b0a43524541544520494e44455820534150525f504552535f464b5f49204f4e2053414d504c455f50524f504552544945532028504552535f49445f52454749535445524552293b0a43524541544520494e44455820534150525f53414d505f464b5f49204f4e2053414d504c455f50524f50455254494553202853414d505f4944293b0a43524541544520494e44455820534150525f535450545f464b5f49204f4e2053414d504c455f50524f504552544945532028535450545f4944293b0a43524541544520494e44455820534150525f4d4150525f464b5f49204f4e2053414d504c455f50524f5045525449455320284d4154455f50524f505f4944293b0a43524541544520494e4445582053415052485f455450545f464b5f49204f4e2053414d504c455f50524f504552544945535f484953544f52592028535450545f4944293b0a43524541544520494e4445582053415052485f455850455f464b5f49204f4e2053414d504c455f50524f504552544945535f484953544f5259202853414d505f4944293b0a43524541544520494e4445582053415052485f565554535f464b5f49204f4e2053414d504c455f50524f504552544945535f484953544f5259202856414c49445f554e54494c5f54494d455354414d50293b0a43524541544520494e44455820535450545f504552535f464b5f49204f4e2053414d504c455f545950455f50524f50455254595f54595045532028504552535f49445f52454749535445524552293b0a43524541544520494e44455820535450545f505254595f464b5f49204f4e2053414d504c455f545950455f50524f50455254595f54595045532028505254595f4944293b0a43524541544520494e44455820535450545f534154595f464b5f49204f4e2053414d504c455f545950455f50524f50455254595f54595045532028534154595f4944293b0a43524541544520494e44455820445350525f435654455f464b5f49204f4e20444154415f5345545f50524f504552544945532028435654455f4944293b0a43524541544520494e44455820445350525f44535450545f464b5f49204f4e20444154415f5345545f50524f50455254494553202844535450545f4944293b0a43524541544520494e44455820445350525f44535f464b5f49204f4e20444154415f5345545f50524f50455254494553202844535f4944293b0a43524541544520494e44455820445350525f504552535f464b5f49204f4e20444154415f5345545f50524f504552544945532028504552535f49445f52454749535445524552293b0a43524541544520494e44455820445350525f4d4150525f464b5f49204f4e20444154415f5345545f50524f5045525449455320284d4154455f50524f505f4944293b0a43524541544520494e4445582044535052485f455450545f464b5f49204f4e20444154415f5345545f50524f504552544945535f484953544f5259202844535450545f4944293b0a43524541544520494e4445582044535052485f455850455f464b5f49204f4e20444154415f5345545f50524f504552544945535f484953544f5259202844535f4944293b0a43524541544520494e4445582044535052485f565554535f464b5f49204f4e20444154415f5345545f50524f504552544945535f484953544f5259202856414c49445f554e54494c5f54494d455354414d50293b0a43524541544520494e4445582044535450545f445354595f464b5f49204f4e20444154415f5345545f545950455f50524f50455254595f54595045532028445354595f4944293b0a43524541544520494e4445582044535450545f504552535f464b5f49204f4e20444154415f5345545f545950455f50524f50455254595f54595045532028504552535f49445f52454749535445524552293b0a43524541544520494e4445582044535450545f505254595f464b5f49204f4e20444154415f5345545f545950455f50524f50455254595f54595045532028505254595f4944293b0a43524541544520494e4445582046494c545f504552535f464b5f49204f4e2046494c544552532028504552535f49445f52454749535445524552293b0a43524541544520494e4445582046494c545f4442494e5f464b5f49204f4e2046494c5445525320284442494e5f4944293b0a43524541544520494e44455820475249445f435553544f4d5f434f4c554d4e535f504552535f464b5f49204f4e20475249445f435553544f4d5f434f4c554d4e532028504552535f49445f52454749535445524552293b0a43524541544520494e44455820475249445f435553544f4d5f434f4c554d4e535f4442494e5f464b5f49204f4e20475249445f435553544f4d5f434f4c554d4e5320284442494e5f4944293b0a43524541544520494e444558205343524950545f504552535f464b5f49204f4e20534352495054532028504552535f49445f52454749535445524552293b0a43524541544520494e444558205343524950545f4442494e5f464b5f49204f4e205343524950545320284442494e5f4944293b0a43524541544520494e44455820454e544954595f4f5045524154494f4e535f4c4f475f5249445f49204f4e20454e544954595f4f5045524154494f4e535f4c4f4728524547495354524154494f4e5f4944293b0a43524541544520494e44455820455852454c485f4d41494e5f455850455f464b5f49204f4e204558504552494d454e545f52454c4154494f4e53484950535f484953544f525920284d41494e5f455850455f4944293b0a43524541544520494e44455820455852454c485f4d41494e5f455850455f464b5f53414d505f464b5f49204f4e204558504552494d454e545f52454c4154494f4e53484950535f484953544f525920284d41494e5f455850455f49442c2053414d505f4944293b0a43524541544520494e44455820455852454c485f4d41494e5f455850455f464b5f444154415f464b5f49204f4e204558504552494d454e545f52454c4154494f4e53484950535f484953544f525920284d41494e5f455850455f49442c20444154415f4944293b0a43524541544520494e44455820455852454c485f4d41494e5f455850455f464b5f50524f4a5f464b5f49204f4e204558504552494d454e545f52454c4154494f4e53484950535f484953544f525920284d41494e5f455850455f49442c2050524f4a5f4944293b0a43524541544520494e44455820455852454c485f53414d505f49445f464b5f49204f4e204558504552494d454e545f52454c4154494f4e53484950535f484953544f5259202853414d505f4944293b0a43524541544520494e44455820455852454c485f444154415f49445f464b5f49204f4e204558504552494d454e545f52454c4154494f4e53484950535f484953544f52592028444154415f4944293b0a43524541544520494e4445582053414d5052454c485f4d41494e5f53414d505f464b5f49204f4e2053414d504c455f52454c4154494f4e53484950535f484953544f525920284d41494e5f53414d505f4944293b0a43524541544520494e4445582053414d5052454c485f4d41494e5f53414d505f464b5f455850455f464b5f49204f4e2053414d504c455f52454c4154494f4e53484950535f484953544f525920284d41494e5f53414d505f49442c20455850455f4944293b0a43524541544520494e4445582053414d5052454c485f4d41494e5f53414d505f464b5f53414d505f464b5f49204f4e2053414d504c455f52454c4154494f4e53484950535f484953544f525920284d41494e5f53414d505f49442c2053414d505f4944293b0a43524541544520494e4445582053414d5052454c485f4d41494e5f53414d505f464b5f444154415f464b5f49204f4e2053414d504c455f52454c4154494f4e53484950535f484953544f525920284d41494e5f53414d505f49442c20444154415f4944293b0a43524541544520494e4445582053414d5052454c485f4d41494e5f53414d505f464b5f53504143455f464b5f49204f4e2053414d504c455f52454c4154494f4e53484950535f484953544f525920284d41494e5f53414d505f49442c2053504143455f4944293b0a43524541544520494e4445582053414d5052454c485f53414d505f49445f464b5f49204f4e2053414d504c455f52454c4154494f4e53484950535f484953544f5259202853414d505f4944293b0a43524541544520494e4445582053414d5052454c485f444154415f49445f464b5f49204f4e2053414d504c455f52454c4154494f4e53484950535f484953544f52592028444154415f4944293b0a43524541544520494e444558204441544152454c485f4d41494e5f444154415f464b5f49204f4e20444154415f5345545f52454c4154494f4e53484950535f484953544f525920284d41494e5f444154415f4944293b0a43524541544520494e444558204441544152454c485f4d41494e5f444154415f464b5f455850455f464b5f49204f4e20444154415f5345545f52454c4154494f4e53484950535f484953544f525920284d41494e5f444154415f49442c20455850455f4944293b0a43524541544520494e444558204441544152454c485f4d41494e5f444154415f464b5f53414d505f464b5f49204f4e20444154415f5345545f52454c4154494f4e53484950535f484953544f525920284d41494e5f444154415f49442c2053414d505f4944293b0a43524541544520494e444558204441544152454c485f4d41494e5f444154415f464b5f444154415f464b5f49204f4e20444154415f5345545f52454c4154494f4e53484950535f484953544f525920284d41494e5f444154415f49442c20444154415f4944293b0a43524541544520494e444558204441544152454c485f444154415f464b5f49204f4e20444154415f5345545f52454c4154494f4e53484950535f484953544f52592028444154415f4944293b0a43524541544520494e44455820505252454c485f4d41494e5f50524f4a5f464b5f49204f4e2050524f4a4543545f52454c4154494f4e53484950535f484953544f525920284d41494e5f50524f4a5f4944293b0a43524541544520494e44455820505252454c485f4d41494e5f50524f4a5f464b5f455850455f464b5f49204f4e2050524f4a4543545f52454c4154494f4e53484950535f484953544f525920284d41494e5f50524f4a5f49442c20455850455f4944293b0a43524541544520494e44455820505252454c485f4d41494e5f50524f4a5f464b5f53504143455f464b5f49204f4e2050524f4a4543545f52454c4154494f4e53484950535f484953544f525920284d41494e5f50524f4a5f49442c2053504143455f4944293b0a43524541544520494e444558204d45544150524f4a454354535f4f574e45525f464b5f49204f4e204d45544150524f4a4543545320284f574e4552293b0a43524541544520494e444558204d45544150524f4a454354535f4e414d455f49204f4e204d45544150524f4a4543545320284e414d45293b0a43524541544520554e4951554520494e444558204d45544150524f4a454354535f4e414d455f4f574e45525f554b204f4e204d45544150524f4a4543545320286c6f776572284e414d45292c204f574e4552293b0a43524541544520494e444558204d45544150524f4a4543545f41535349474e4d454e54535f414c4c5f4d4550525f464b5f49204f4e204d45544150524f4a4543545f41535349474e4d454e54535f414c4c20284d4550525f4944293b0a43524541544520494e444558204d45544150524f4a4543545f41535349474e4d454e54535f414c4c5f455850455f464b5f49204f4e204d45544150524f4a4543545f41535349474e4d454e54535f414c4c2028455850455f4944293b0a43524541544520494e444558204d45544150524f4a4543545f41535349474e4d454e54535f414c4c5f53414d505f464b5f49204f4e204d45544150524f4a4543545f41535349474e4d454e54535f414c4c202853414d505f4944293b0a43524541544520494e444558204d45544150524f4a4543545f41535349474e4d454e54535f414c4c5f444154415f464b5f49204f4e204d45544150524f4a4543545f41535349474e4d454e54535f414c4c2028444154415f4944293b0a43524541544520494e444558204d45544150524f4a4543545f41535349474e4d454e54535f414c4c5f4d4154455f464b5f49204f4e204d45544150524f4a4543545f41535349474e4d454e54535f414c4c20284d4154455f4944293b0a43524541544520494e444558204d45544150524f4a4543545f41535349474e4d454e54535f414c4c5f44454c5f464b5f49204f4e204d45544150524f4a4543545f41535349474e4d454e54535f414c4c202844454c5f4944293b0a \N 133 ./sql/postgresql/133/function-133.sql SUCCESS 2013-04-12 10:04:52.55 \\x2d2d204372656174696e672046756e6374696f6e730a0a2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d0a2d2d2020507572706f73653a20204372656174652066756e6374696f6e2052454e414d455f53455155454e43452829207468617420697320726571756972656420666f722072656e616d696e67207468652073657175656e6365732062656c6f6e67696e6720746f207461626c65730a2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d0a4352454154452046554e4354494f4e2052454e414d455f53455155454e4345284f4c445f4e414d4520564152434841522c204e45575f4e414d452056415243484152292052455455524e5320494e54454745522041532024240a4445434c4152450a2020435552525f5345515f56414c202020494e54454745523b0a424547494e0a202053454c45435420494e544f20435552525f5345515f56414c204e45585456414c284f4c445f4e414d45293b0a20204558454355544520274352454154452053455155454e43452027207c7c204e45575f4e414d45207c7c202720535441525420574954482027207c7c20435552525f5345515f56414c3b0a202045584543555445202744524f502053455155454e43452027207c7c204f4c445f4e414d453b0a202052455455524e20435552525f5345515f56414c3b0a454e443b0a2424204c414e47554147452027706c706773716c273b0a0a0a2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d0a2d2d2020507572706f73653a2020437265617465207472696767657220434f4e54524f4c4c45445f564f434142554c4152595f434845434b200a2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d0a0a435245415445204f52205245504c4143452046554e4354494f4e20434f4e54524f4c4c45445f564f434142554c4152595f434845434b28292052455455524e5320747269676765722041532024240a4445434c4152450a202020765f636f64652020434f44453b0a424547494e0a0a20202073656c65637420636f646520696e746f20765f636f64652066726f6d20646174615f7479706573207768657265206964203d204e45572e646174795f69643b0a0a2020202d2d20436865636b206966207468652064617461206973206f6620747970652022434f4e54524f4c4c4544564f434142554c415259220a202020696620765f636f6465203d2027434f4e54524f4c4c4544564f434142554c41525927207468656e0a2020202020206966204e45572e636f766f5f6964204953204e554c4c207468656e0a202020202020202020524149534520455843455054494f4e2027496e736572742f557064617465206f662050726f706572747920547970652028436f64653a202529206661696c65642c206173206974732044617461205479706520697320434f4e54524f4c4c4544564f434142554c4152592c20627574206974206973206e6f74206c696e6b656420746f206120436f6e74726f6c6c656420566f636162756c6172792e272c204e45572e636f64653b0a202020202020656e642069663b0a202020656e642069663b0a0a20202052455455524e204e45573b0a0a454e443b0a2424204c414e47554147452027706c706773716c273b0a0a435245415445205452494747455220434f4e54524f4c4c45445f564f434142554c4152595f434845434b204245464f524520494e53455254204f5220555044415445204f4e2050524f50455254595f54595045530a20202020464f52204541434820524f5720455845435554452050524f43454455524520434f4e54524f4c4c45445f564f434142554c4152595f434845434b28293b0a0a0a2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d0a2d2d2020507572706f73653a202043726561746520747269676765722045585445524e414c5f444154415f53544f524147455f464f524d41545f434845434b200a2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d0a0a435245415445204f52205245504c4143452046554e4354494f4e2045585445524e414c5f444154415f53544f524147455f464f524d41545f434845434b28292052455455524e5320747269676765722041532024240a4445434c4152450a202020765f636f766f5f636f64652020434f44453b0a202020646174615f636f646520434f44453b0a424547494e0a0a20202073656c65637420636f646520696e746f20765f636f766f5f636f64652066726f6d20636f6e74726f6c6c65645f766f636162756c61726965730a20202020202077686572652069735f696e7465726e616c5f6e616d657370616365203d207472756520616e64200a2020202020202020206964203d202873656c65637420636f766f5f69642066726f6d20636f6e74726f6c6c65645f766f636162756c6172795f7465726d73207768657265206964203d204e45572e637674655f69645f73746f725f666d74293b0a2020202d2d20436865636b2069662074686520646174612073746f7261676520666f726d61742069732061207465726d206f662074686520636f6e74726f6c6c656420766f636162756c617279202253544f524147455f464f524d4154220a202020696620765f636f766f5f636f646520213d202753544f524147455f464f524d415427207468656e0a20202020202073656c65637420636f646520696e746f20646174615f636f64652066726f6d20646174615f616c6c207768657265206964203d204e45572e646174615f69643b200a202020202020524149534520455843455054494f4e2027496e736572742f557064617465206f6620446174612028436f64653a202529206661696c65642c206173206974732053746f7261676520466f726d617420697320252c2062757420697320726571756972656420746f2062652053544f524147455f464f524d41542e272c20646174615f636f64652c20765f636f766f5f636f64653b0a202020656e642069663b0a0a20202052455455524e204e45573b0a0a454e443b0a2424204c414e47554147452027706c706773716c273b0a0a43524541544520545249474745522045585445524e414c5f444154415f53544f524147455f464f524d41545f434845434b204245464f524520494e53455254204f5220555044415445204f4e2045585445524e414c5f444154410a20202020464f52204541434820524f5720455845435554452050524f4345445552452045585445524e414c5f444154415f53544f524147455f464f524d41545f434845434b28293b0a0a2020200a2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d0a2d2d2020507572706f73653a202043726561746520747269676765727320666f7220636865636b696e672073616d706c6520636f646520756e697175656e657373200a2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d0a0a202020200a435245415445204f52205245504c4143452046554e4354494f4e2073616d706c655f66696c6c5f636f64655f756e697175655f636865636b28290a202052455455524e5320747269676765722041530a24424f4459240a424547494e0a20204e45572e636f64655f756e697175655f636865636b203d204e45572e636f6465207c7c20272c27207c7c20636f616c65736365284e45572e73616d705f69645f706172745f6f662c202d3129207c7c20272c27207c7c20636f616c65736365284e45572e73706163655f69642c202d3129207c7c20272c27207c7c20636f616c65736365284e45572e6462696e5f69642c202d31293b0a202052455455524e204e45573b0a454e443b0a24424f4459240a20204c414e47554147452027706c706773716c273b0a0a20200a20200a435245415445204f52205245504c4143452046554e4354494f4e2073616d706c655f66696c6c5f737562636f64655f756e697175655f636865636b28290a202052455455524e5320747269676765722041530a24424f4459240a4445434c4152450a20202020756e697175655f737562636f64652020424f4f4c45414e5f434841523b0a424547494e0a2020202053454c4543542069735f737562636f64655f756e6971756520696e746f20756e697175655f737562636f64652046524f4d2073616d706c655f7479706573205748455245206964203d204e45572e736174795f69643b0a202020200a2020202049462028756e697175655f737562636f646529205448454e0a202020204e45572e737562636f64655f756e697175655f636865636b203d204e45572e636f6465207c7c20272c27207c7c20636f616c65736365284e45572e736174795f69642c202d3129207c7c20272c27207c7c20636f616c65736365284e45572e73706163655f69642c202d3129207c7c20272c27207c7c20636f616c65736365284e45572e6462696e5f69642c202d31293b0a20202020454c53450a202020204e45572e737562636f64655f756e697175655f636865636b203d204e554c4c3b0a2020454e442049463b0a20200a202052455455524e204e45573b0a454e443b0a24424f4459240a20204c414e47554147452027706c706773716c273b0a0a20200a20200a435245415445204f52205245504c4143452046554e4354494f4e2073616d706c655f747970655f66696c6c5f737562636f64655f756e697175655f636865636b28290a202052455455524e5320747269676765722041530a24424f4459240a424547494e0a20202020494620284e45572e69735f737562636f64655f756e697175653a3a626f6f6c65616e203c3e204f4c442e69735f737562636f64655f756e697175653a3a626f6f6c65616e29205448454e0a2020202020205550444154452073616d706c65735f616c6c2053455420737562636f64655f756e697175655f636865636b203d20737562636f64655f756e697175655f636865636b20574845524520736174795f6964203d204e45572e69643b0a2020454e442049463b0a2020202052455455524e204e45573b0a454e443b0a24424f4459240a20204c414e47554147452027706c706773716c273b0a0a20200a43524541544520545249474745522073616d706c655f66696c6c5f636f64655f756e697175655f636865636b0a20204245464f524520494e53455254204f52205550444154450a20204f4e2073616d706c65735f616c6c0a2020464f52204541434820524f570a2020455845435554452050524f4345445552452073616d706c655f66696c6c5f636f64655f756e697175655f636865636b28293b0a0a43524541544520545249474745522073616d706c655f66696c6c5f737562636f64655f756e697175655f636865636b0a20204245464f524520494e53455254204f52205550444154450a20204f4e2073616d706c65735f616c6c0a2020464f52204541434820524f570a2020455845435554452050524f4345445552452073616d706c655f66696c6c5f737562636f64655f756e697175655f636865636b28293b0a20200a43524541544520545249474745522073616d706c655f747970655f66696c6c5f737562636f64655f756e697175655f636865636b0a20204146544552205550444154450a20204f4e2073616d706c655f74797065730a2020464f52204541434820524f570a2020455845435554452050524f4345445552452073616d706c655f747970655f66696c6c5f737562636f64655f756e697175655f636865636b28293b0a202020200a20200a2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d0a2d2d2020507572706f73653a20204372656174652074726967676572204d4154455249414c2f53414d504c452f4558504552494d454e542f444154415f534554205f50524f50455254595f574954485f4d4154455249414c5f444154415f545950455f434845434b0a2d2d202020202020202020202020497420636865636b732074686174206966206d6174657269616c2070726f70657274792076616c75652069732061737369676e656420746f2074686520656e746974792c0a2d2d0909090909097468656e20746865206d6174657269616c207479706520697320657175616c20746f20746865206f6e65206465736372696265642062792070726f706572747920747970652e0a2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d0a0a435245415445204f52205245504c4143452046554e4354494f4e204d4154455249414c5f50524f50455254595f574954485f4d4154455249414c5f444154415f545950455f434845434b28292052455455524e5320747269676765722041532024240a4445434c4152450a202020765f747970655f69642020434f44453b0a202020765f747970655f69645f70726f702020434f44453b0a424547494e0a2020206966204e45572e6d6174655f70726f705f6964204953204e4f54204e554c4c207468656e0a0909092d2d2066696e64206d6174657269616c2074797065206964206f66207468652070726f70657274792074797065200a09090973656c6563742070742e6d6174795f70726f705f696420696e746f20765f747970655f69645f70726f70200a090909202066726f6d206d6174657269616c5f747970655f70726f70657274795f747970657320657470742c2070726f70657274795f7479706573207074200a090909207768657265204e45572e6d7470745f6964203d20657470742e696420414e4420657470742e707274795f6964203d2070742e69643b0a09090a090909696620765f747970655f69645f70726f70204953204e4f54204e554c4c207468656e0a090909092d2d2066696e64206d6174657269616c2074797065206964206f6620746865206d6174657269616c20776869636820636f6e73697374732074686520656e7469747927732070726f70657274792076616c75650a0909090973656c65637420656e746974792e6d6174795f696420696e746f20765f747970655f6964200a09090909202066726f6d206d6174657269616c7320656e746974790a09090909207768657265204e45572e6d6174655f70726f705f6964203d20656e746974792e69643b0a09090909696620765f747970655f696420213d20765f747970655f69645f70726f70207468656e0a0909090909524149534520455843455054494f4e2027496e736572742f557064617465206f662070726f70657274792076616c7565207265666572656e63696e67206d6174657269616c202869643a202529206661696c65642c206173207265666572656e636564206d6174657269616c207479706520697320646966666572656e74207468616e2065787065637465642028696420252c2065787065637465642069643a2025292e272c200a09090909090909204e45572e6d6174655f70726f705f69642c20765f747970655f69642c20765f747970655f69645f70726f703b0a09090909656e642069663b0a090909656e642069663b0a202020656e642069663b0a20202052455455524e204e45573b0a454e443b0a2424204c414e47554147452027706c706773716c273b0a0a4352454154452054524947474552204d4154455249414c5f50524f50455254595f574954485f4d4154455249414c5f444154415f545950455f434845434b204245464f524520494e53455254204f5220555044415445204f4e206d6174657269616c5f70726f706572746965730a20202020464f52204541434820524f5720455845435554452050524f434544555245204d4154455249414c5f50524f50455254595f574954485f4d4154455249414c5f444154415f545950455f434845434b28293b0a202020200a435245415445204f52205245504c4143452046554e4354494f4e2053414d504c455f50524f50455254595f574954485f4d4154455249414c5f444154415f545950455f434845434b28292052455455524e5320747269676765722041532024240a4445434c4152450a202020765f747970655f69642020434f44453b0a202020765f747970655f69645f70726f702020434f44453b0a424547494e0a2020206966204e45572e6d6174655f70726f705f6964204953204e4f54204e554c4c207468656e0a0909092d2d2066696e64206d6174657269616c2074797065206964206f66207468652070726f70657274792074797065200a09090973656c6563742070742e6d6174795f70726f705f696420696e746f20765f747970655f69645f70726f70200a090909202066726f6d2073616d706c655f747970655f70726f70657274795f747970657320657470742c2070726f70657274795f7479706573207074200a090909207768657265204e45572e737470745f6964203d20657470742e696420414e4420657470742e707274795f6964203d2070742e69643b0a09090a090909696620765f747970655f69645f70726f70204953204e4f54204e554c4c207468656e0a090909092d2d2066696e64206d6174657269616c2074797065206964206f6620746865206d6174657269616c20776869636820636f6e73697374732074686520656e7469747927732070726f70657274792076616c75650a0909090973656c65637420656e746974792e6d6174795f696420696e746f20765f747970655f6964200a09090909202066726f6d206d6174657269616c7320656e746974790a09090909207768657265204e45572e6d6174655f70726f705f6964203d20656e746974792e69643b0a09090909696620765f747970655f696420213d20765f747970655f69645f70726f70207468656e0a0909090909524149534520455843455054494f4e2027496e736572742f557064617465206f662070726f70657274792076616c7565207265666572656e63696e67206d6174657269616c202869643a202529206661696c65642c206173207265666572656e636564206d6174657269616c207479706520697320646966666572656e74207468616e2065787065637465642028696420252c2065787065637465642069643a2025292e272c200a090909090909090909090909204e45572e6d6174655f70726f705f69642c20765f747970655f69642c20765f747970655f69645f70726f703b0a09090909656e642069663b0a090909656e642069663b0a202020656e642069663b0a20202052455455524e204e45573b0a454e443b0a2424204c414e47554147452027706c706773716c273b0a0a43524541544520545249474745522053414d504c455f50524f50455254595f574954485f4d4154455249414c5f444154415f545950455f434845434b204245464f524520494e53455254204f5220555044415445204f4e2073616d706c655f70726f706572746965730a20202020464f52204541434820524f5720455845435554452050524f4345445552452053414d504c455f50524f50455254595f574954485f4d4154455249414c5f444154415f545950455f434845434b28293b0a202020200a435245415445204f52205245504c4143452046554e4354494f4e204558504552494d454e545f50524f50455254595f574954485f4d4154455249414c5f444154415f545950455f434845434b28292052455455524e5320747269676765722041532024240a4445434c4152450a202020765f747970655f69642020434f44453b0a202020765f747970655f69645f70726f702020434f44453b0a424547494e0a2020206966204e45572e6d6174655f70726f705f6964204953204e4f54204e554c4c207468656e0a0909092d2d2066696e64206d6174657269616c2074797065206964206f66207468652070726f70657274792074797065200a09090973656c6563742070742e6d6174795f70726f705f696420696e746f20765f747970655f69645f70726f70200a090909202066726f6d206578706572696d656e745f747970655f70726f70657274795f747970657320657470742c2070726f70657274795f7479706573207074200a090909207768657265204e45572e657470745f6964203d20657470742e696420414e4420657470742e707274795f6964203d2070742e69643b0a09090a090909696620765f747970655f69645f70726f70204953204e4f54204e554c4c207468656e0a090909092d2d2066696e64206d6174657269616c2074797065206964206f6620746865206d6174657269616c20776869636820636f6e73697374732074686520656e7469747927732070726f70657274792076616c75650a0909090973656c65637420656e746974792e6d6174795f696420696e746f20765f747970655f6964200a09090909202066726f6d206d6174657269616c7320656e746974790a09090909207768657265204e45572e6d6174655f70726f705f6964203d20656e746974792e69643b0a09090909696620765f747970655f696420213d20765f747970655f69645f70726f70207468656e0a0909090909524149534520455843455054494f4e2027496e736572742f557064617465206f662070726f70657274792076616c7565207265666572656e63696e67206d6174657269616c202869643a202529206661696c65642c206173207265666572656e636564206d6174657269616c207479706520697320646966666572656e74207468616e2065787065637465642028696420252c2065787065637465642069643a2025292e272c200a090909090909090909090909204e45572e6d6174655f70726f705f69642c20765f747970655f69642c20765f747970655f69645f70726f703b0a09090909656e642069663b0a090909656e642069663b0a202020656e642069663b0a20202052455455524e204e45573b0a454e443b0a2424204c414e47554147452027706c706773716c273b0a0a4352454154452054524947474552204558504552494d454e545f50524f50455254595f574954485f4d4154455249414c5f444154415f545950455f434845434b204245464f524520494e53455254204f5220555044415445204f4e206578706572696d656e745f70726f706572746965730a20202020464f52204541434820524f5720455845435554452050524f434544555245204558504552494d454e545f50524f50455254595f574954485f4d4154455249414c5f444154415f545950455f434845434b28293b0a200a202d2d2064617461207365740a435245415445204f52205245504c4143452046554e4354494f4e20444154415f5345545f50524f50455254595f574954485f4d4154455249414c5f444154415f545950455f434845434b28292052455455524e5320747269676765722041532024240a4445434c4152450a202020765f747970655f69642020434f44453b0a202020765f747970655f69645f70726f702020434f44453b0a424547494e0a2020206966204e45572e6d6174655f70726f705f6964204953204e4f54204e554c4c207468656e0a0909092d2d2066696e64206d6174657269616c2074797065206964206f66207468652070726f70657274792074797065200a09090973656c6563742070742e6d6174795f70726f705f696420696e746f20765f747970655f69645f70726f70200a090909202066726f6d20646174615f7365745f747970655f70726f70657274795f74797065732064737470742c2070726f70657274795f7479706573207074200a090909207768657265204e45572e64737470745f6964203d2064737470742e696420414e442064737470742e707274795f6964203d2070742e69643b0a09090a090909696620765f747970655f69645f70726f70204953204e4f54204e554c4c207468656e0a090909092d2d2066696e64206d6174657269616c2074797065206964206f6620746865206d6174657269616c20776869636820636f6e73697374732074686520656e7469747927732070726f70657274792076616c75650a0909090973656c65637420656e746974792e6d6174795f696420696e746f20765f747970655f6964200a09090909202066726f6d206d6174657269616c7320656e746974790a09090909207768657265204e45572e6d6174655f70726f705f6964203d20656e746974792e69643b0a09090909696620765f747970655f696420213d20765f747970655f69645f70726f70207468656e0a0909090909524149534520455843455054494f4e2027496e736572742f557064617465206f662070726f70657274792076616c7565207265666572656e63696e67206d6174657269616c202869643a202529206661696c65642c206173207265666572656e636564206d6174657269616c207479706520697320646966666572656e74207468616e2065787065637465642028696420252c2065787065637465642069643a2025292e272c200a090909090909090909090909204e45572e6d6174655f70726f705f69642c20765f747970655f69642c20765f747970655f69645f70726f703b0a09090909656e642069663b0a090909656e642069663b0a202020656e642069663b0a20202052455455524e204e45573b0a454e443b0a2424204c414e47554147452027706c706773716c273b0a0a435245415445205452494747455220444154415f5345545f50524f50455254595f574954485f4d4154455249414c5f444154415f545950455f434845434b204245464f524520494e53455254204f5220555044415445204f4e20646174615f7365745f70726f706572746965730a20202020464f52204541434820524f5720455845435554452050524f43454455524520444154415f5345545f50524f50455254595f574954485f4d4154455249414c5f444154415f545950455f434845434b28293b0a202020200a2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d0a2d2d20507572706f73653a2043726561746520444546455252454420747269676765727320666f7220636865636b696e6720636f6e73697374656e6379206f662064656c6574696f6e2073746174652e0a2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d0a2d2d207574696c6974792066756e6374696f6e2064657363726962696e6720612064656c6574696f6e0a0a435245415445204f52205245504c4143452046554e4354494f4e2064656c6574696f6e5f6465736372697074696f6e2864656c5f696420544543485f4944292052455455524e5320564152434841522041532024240a4445434c4152450a202064656c5f706572736f6e20564152434841523b0a202064656c5f6461746520564152434841523b0a202064656c5f726561736f6e20564152434841523b0a424547494e0a202053454c45435420702e6c6173745f6e616d65207c7c20272027207c7c20702e66697273745f6e616d65207c7c2027202827207c7c20702e656d61696c207c7c202729272c200a202020202020202020746f5f6368617228642e726567697374726174696f6e5f74696d657374616d702c2027595959592d4d4d2d44442048483a4d4d3a535327292c20642e726561736f6e200a20202020494e544f2064656c5f706572736f6e2c2064656c5f646174652c2064656c5f726561736f6e2046524f4d2064656c6574696f6e7320642c20706572736f6e732070200a20202020574845524520642e706572735f69645f72656769737465726572203d20702e696420414e4420642e6964203d2064656c5f69643b0a202052455455524e202764656c657465642062792027207c7c2064656c5f706572736f6e207c7c2027206f6e2027207c7c2064656c5f64617465207c7c2027207769746820726561736f6e3a202227207c7c2064656c5f726561736f6e207c7c202722273b0a454e443b0a2424204c414e47554147452027706c706773716c273b0a0a2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d0a2d2d20312e2064617461207365740a2d2d2d206f6e20696e736572742f757064617465202d206578706572696d656e742c2073616d706c652063616e27742062652064656c6574656420756e6c657373207468652064617461207365742069732064656c6574650a2d2d2d2020202020202020202020202020202020202d20706172656e74732f6368696c6472656e2072656c6174696f6e7368697020737461797320756e6368616e676564200a0a435245415445204f52205245504c4143452046554e4354494f4e20636865636b5f637265617465645f6f725f6d6f6469666965645f646174615f7365745f6f776e65725f69735f616c69766528292052455455524e5320747269676765722041532024240a4445434c4152450a096f776e65725f636f646509434f44453b0a096f776e65725f64656c5f696409544543485f49443b0a424547494e0a09494620284e45572e64656c5f6964204953204e4f54204e554c4c29205448454e0a090952455455524e204e45573b0a09454e442049463b0a0a20202d2d20636865636b2073616d706c650a2020494620284e45572e73616d705f6964204953204e4f54204e554c4c29205448454e0a20200953454c4543542064656c5f69642c20636f646520494e544f206f776e65725f64656c5f69642c206f776e65725f636f64650a202009202046524f4d2073616d706c6573200a20200920205748455245206964203d204e45572e73616d705f69643b0a202009494620286f776e65725f64656c5f6964204953204e4f54204e554c4c29205448454e200a090909524149534520455843455054494f4e202744617461205365742028436f64653a2025292063616e6e6f7420626520636f6e6e656374656420746f20612053616d706c652028436f64653a20252920252e272c200a090909202020202020202020202020202020204e45572e636f64652c206f776e65725f636f64652c2064656c6574696f6e5f6465736372697074696f6e286f776e65725f64656c5f6964293b0a0909454e442049463b0a09454e442049463b0a092d2d20636865636b206578706572696d656e740a0953454c4543542064656c5f69642c20636f646520494e544f206f776e65725f64656c5f69642c206f776e65725f636f64650a2020202046524f4d206578706572696d656e7473200a202020205748455245206964203d204e45572e657870655f69643b0a2020494620286f776e65725f64656c5f6964204953204e4f54204e554c4c29205448454e200a0909524149534520455843455054494f4e202744617461205365742028436f64653a2025292063616e6e6f7420626520636f6e6e656374656420746f20616e204578706572696d656e742028436f64653a20252920252e272c200a0909202020202020202020202020202020204e45572e636f64652c206f776e65725f636f64652c2064656c6574696f6e5f6465736372697074696f6e286f776e65725f64656c5f6964293b0a09454e442049463b090a0952455455524e204e45573b0a454e443b0a2424204c414e47554147452027706c706773716c273b0a20200a43524541544520434f4e53545241494e54205452494747455220636865636b5f637265617465645f6f725f6d6f6469666965645f646174615f7365745f6f776e65725f69735f616c697665200a09414654455220494e53455254204f5220555044415445204f4e20646174615f616c6c0a0944454645525241424c4520494e495449414c4c592044454645525245440a09464f52204541434820524f570a09455845435554452050524f43454455524520636865636b5f637265617465645f6f725f6d6f6469666965645f646174615f7365745f6f776e65725f69735f616c69766528293b0a090a2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d0a2d2d20322e2073616d706c650a2d2d2d206f6e20696e736572742f757064617465202d3e206578706572696d656e742063616e27742062652064656c6574656420756e6c657373207468652073616d706c652069732064656c657465640a2d2d2d2064656c6574696f6e200a2d2d2d2d3e20616c6c206469726563746c7920636f6e6e656374656420646174612073657473206e65656420746f2062652064656c657465640a2d2d2d2d3e20616c6c20636f6d706f6e656e747320616e64206368696c6472656e206e65656420746f2062652064656c657465640a0a435245415445204f52205245504c4143452046554e4354494f4e20636865636b5f637265617465645f6f725f6d6f6469666965645f73616d706c655f6f776e65725f69735f616c69766528292052455455524e5320747269676765722041532024240a4445434c4152450a096f776e65725f636f646509434f44453b0a096f776e65725f64656c5f696409544543485f49443b0a424547494e0a09494620284e45572e64656c5f6964204953204e4f54204e554c4c29205448454e0a090952455455524e204e45573b0a09454e442049463b0a0a20202d2d20636865636b206578706572696d656e74202863616e27742062652064656c65746564290a2020494620284e45572e657870655f6964204953204e4f54204e554c4c29205448454e0a20200953454c4543542064656c5f69642c20636f646520494e544f206f776e65725f64656c5f69642c206f776e65725f636f64650a202009202046524f4d206578706572696d656e7473200a20200920205748455245206964203d204e45572e657870655f69643b0a202009494620286f776e65725f64656c5f6964204953204e4f54204e554c4c29205448454e200a090909524149534520455843455054494f4e202753616d706c652028436f64653a2025292063616e6e6f7420626520636f6e6e656374656420746f20616e204578706572696d656e742028436f64653a20252920252e272c200a2020200909202020202020202020202020202020204e45572e636f64652c206f776e65725f636f64652c2064656c6574696f6e5f6465736372697074696f6e286f776e65725f64656c5f6964293b0a0909454e442049463b0a09454e442049463b0a0952455455524e204e45573b0a454e443b0a2424204c414e47554147452027706c706773716c273b0a20200a43524541544520434f4e53545241494e54205452494747455220636865636b5f637265617465645f6f725f6d6f6469666965645f73616d706c655f6f776e65725f69735f616c697665200a2020414654455220494e53455254204f5220555044415445204f4e2073616d706c65735f616c6c0a0944454645525241424c4520494e495449414c4c592044454645525245440a09464f52204541434820524f570a09455845435554452050524f43454455524520636865636b5f637265617465645f6f725f6d6f6469666965645f73616d706c655f6f776e65725f69735f616c69766528293b0a090a435245415445204f52205245504c4143452046554e4354494f4e20636865636b5f64656c6574696f6e5f636f6e73697374656e63795f6f6e5f73616d706c655f64656c6574696f6e28292052455455524e5320747269676765722041532024240a4445434c4152450a2020636f756e7465722020494e54454745523b0a424547494e0a09494620284f4c442e64656c5f6964204953204e4f54204e554c4c204f52204e45572e64656c5f6964204953204e554c4c29205448454e0a090952455455524e204e45573b0a09454e442049463b0a0a20202d2d20616c6c206469726563746c7920636f6e6e656374656420646174612073657473206e65656420746f2062652064656c657465640a20202d2d20636865636b2064617461736574730a0953454c45435420636f756e74282a2920494e544f20636f756e746572200a09202046524f4d20646174610a092020574845524520646174612e73616d705f6964203d204e45572e696420414e4420646174612e64656c5f6964204953204e554c4c3b0a0949462028636f756e746572203e203029205448454e0a092020524149534520455843455054494f4e202753616d706c652028436f64653a2025292064656c6574696f6e206661696c65642062656361757365206174206c65617374206f6e65206f66206974732064617461207365747320776173206e6f742064656c657465642e272c204e45572e636f64653b0a09454e442049463b0a20202d2d20616c6c20636f6d706f6e656e7473206e65656420746f2062652064656c657465640a0953454c45435420636f756e74282a2920494e544f20636f756e746572200a09202046524f4d2073616d706c6573200a09202057484552452073616d706c65732e73616d705f69645f706172745f6f66203d204e45572e696420414e442073616d706c65732e64656c5f6964204953204e554c4c3b0a0949462028636f756e746572203e203029205448454e0a092020524149534520455843455054494f4e202753616d706c652028436f64653a2025292064656c6574696f6e206661696c65642062656361757365206174206c65617374206f6e65206f662069747320636f6d706f6e656e742073616d706c657320776173206e6f742064656c657465642e272c204e45572e636f64653b0a09454e442049463b0a0952455455524e204e45573b0a454e443b0a2424204c414e47554147452027706c706773716c273b0a20200a43524541544520434f4e53545241494e54205452494747455220636865636b5f64656c6574696f6e5f636f6e73697374656e63795f6f6e5f73616d706c655f64656c6574696f6e200a2020414654455220555044415445204f4e2073616d706c65735f616c6c0a0944454645525241424c4520494e495449414c4c592044454645525245440a09464f52204541434820524f57200a09455845435554452050524f43454455524520636865636b5f64656c6574696f6e5f636f6e73697374656e63795f6f6e5f73616d706c655f64656c6574696f6e28293b090a0a2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d0a2d2d207570646174652073616d706c652072656c6174696f6e7368697073206f6e20726576657274200a2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d0a0a435245415445204f52205245504c4143452046554e4354494f4e2070726573657276655f64656c6574696f6e5f636f6e73697374656e63795f6f6e5f73616d706c655f72656c6174696f6e736869707328292052455455524e5320747269676765722041532024240a4445434c4152450a202064656c69642020544543485f49443b0a424547494e0a09494620284e45572e64656c5f6964204953204e4f54204e554c4c204f52204f4c442e64656c5f6964204953204e554c4c29205448454e0a090952455455524e204e45573b0a09454e442049463b0a0953454c4543542064656c5f696420494e544f2064656c69640a090946524f4d2053414d504c45535f414c4c207768657265206964203d204e45572e73616d706c655f69645f706172656e743b0a094946202864656c6964204953204e4f54204e554c4c29205448454e0a09094e45572e64656c5f6964203d2064656c69643b0a09454e442049463b0a0953454c4543542064656c5f696420494e544f2064656c69640a090946524f4d2053414d504c45535f414c4c207768657265206964203d204e45572e73616d706c655f69645f6368696c643b0a094946202864656c6964204953204e4f54204e554c4c29205448454e0a09094e45572e64656c5f6964203d2064656c69643b0a09454e442049463b0a0952455455524e204e45573b0a454e443b0a2424204c414e47554147452027706c706773716c273b0a0a43524541544520545249474745522070726573657276655f64656c6574696f6e5f636f6e73697374656e63795f6f6e5f73616d706c655f72656c6174696f6e7368697073200a20204245464f524520555044415445204f4e2073616d706c655f72656c6174696f6e73686970735f616c6c0a09464f52204541434820524f57200a09455845435554452050524f4345445552452070726573657276655f64656c6574696f6e5f636f6e73697374656e63795f6f6e5f73616d706c655f72656c6174696f6e736869707328293b0a090a2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d0a2d2d2075706461746520646174617365742072656c6174696f6e7368697073206f6e20726576657274200a2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d0a435245415445204f52205245504c4143452046554e4354494f4e2070726573657276655f64656c6574696f6e5f636f6e73697374656e63795f6f6e5f646174615f7365745f72656c6174696f6e736869707328292052455455524e5320747269676765722041532024240a4445434c4152450a202064656c69642020544543485f49443b0a424547494e0a09494620284e45572e64656c5f6964204953204e4f54204e554c4c204f52204f4c442e64656c5f6964204953204e554c4c29205448454e0a090952455455524e204e45573b0a09454e442049463b0a0953454c4543542064656c5f696420494e544f2064656c69640a090946524f4d20444154415f414c4c207768657265206964203d204e45572e646174615f69645f706172656e743b0a094946202864656c6964204953204e4f54204e554c4c29205448454e0a09094e45572e64656c5f6964203d2064656c69643b0a09454e442049463b0a0953454c4543542064656c5f696420494e544f2064656c69640a090946524f4d20444154415f414c4c207768657265206964203d204e45572e646174615f69645f6368696c643b0a094946202864656c6964204953204e4f54204e554c4c29205448454e0a09094e45572e64656c5f6964203d2064656c69643b0a09454e442049463b0a0952455455524e204e45573b0a454e443b0a2424204c414e47554147452027706c706773716c273b0a0a43524541544520545249474745522070726573657276655f64656c6574696f6e5f636f6e73697374656e63795f6f6e5f646174615f7365745f72656c6174696f6e7368697073200a20204245464f524520555044415445204f4e20646174615f7365745f72656c6174696f6e73686970735f616c6c0a09464f52204541434820524f57200a09455845435554452050524f4345445552452070726573657276655f64656c6574696f6e5f636f6e73697374656e63795f6f6e5f646174615f7365745f72656c6174696f6e736869707328293b0a090a2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d0a2d2d20332e206578706572696d656e740a2d2d2d2064656c6574696f6e202d3e20616c6c206469726563746c7920636f6e6e65637465642073616d706c657320616e6420646174612073657473206e65656420746f2062652064656c657465640a0a435245415445204f52205245504c4143452046554e4354494f4e20636865636b5f64656c6574696f6e5f636f6e73697374656e63795f6f6e5f6578706572696d656e745f64656c6574696f6e28292052455455524e5320747269676765722041532024240a4445434c4152450a2020636f756e7465722020494e54454745523b0a424547494e0a09494620284f4c442e64656c5f6964204953204e4f54204e554c4c204f52204e45572e64656c5f6964204953204e554c4c29205448454e0a090952455455524e204e45573b0a09454e442049463b0a090a20202d2d20636865636b2064617461736574730a0953454c45435420636f756e74282a2920494e544f20636f756e746572200a09202046524f4d20646174610a092020574845524520646174612e657870655f6964203d204e45572e696420414e4420646174612e64656c5f6964204953204e554c4c3b0a0949462028636f756e746572203e203029205448454e0a092020524149534520455843455054494f4e20274578706572696d656e742028436f64653a2025292064656c6574696f6e206661696c65642062656361757365206174206c65617374206f6e65206f66206974732064617461207365747320776173206e6f742064656c657465642e272c204e45572e636f64653b0a09454e442049463b0a092d2d20636865636b2073616d706c65730a0953454c45435420636f756e74282a2920494e544f20636f756e746572200a09202046524f4d2073616d706c6573200a09202057484552452073616d706c65732e657870655f6964203d204e45572e696420414e442073616d706c65732e64656c5f6964204953204e554c4c3b0a0949462028636f756e746572203e203029205448454e0a092020524149534520455843455054494f4e20274578706572696d656e742028436f64653a2025292064656c6574696f6e206661696c65642062656361757365206174206c65617374206f6e65206f66206974732073616d706c657320776173206e6f742064656c657465642e272c204e45572e636f64653b0a09454e442049463b0a0952455455524e204e45573b0a454e443b0a2424204c414e47554147452027706c706773716c273b0a0a43524541544520434f4e53545241494e54205452494747455220636865636b5f64656c6574696f6e5f636f6e73697374656e63795f6f6e5f6578706572696d656e745f64656c6574696f6e200a2020414654455220555044415445204f4e206578706572696d656e74735f616c6c0a0944454645525241424c4520494e495449414c4c592044454645525245440a09464f52204541434820524f57200a09455845435554452050524f43454455524520636865636b5f64656c6574696f6e5f636f6e73697374656e63795f6f6e5f6578706572696d656e745f64656c6574696f6e28293b0a0a2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d0a2d2d2052756c657320666f722076696577730a2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d0a435245415445204f52205245504c4143452052554c452073616d706c655f696e736572742041530a202020204f4e20494e5345525420544f2073616d706c657320444f20494e5354454144200a20202020202020494e5345525420494e544f2073616d706c65735f616c6c20280a20202020202020202069642c200a202020202020202020636f64652c200a2020202020202020206462696e5f69642c0a20202020202020202064656c5f69642c0a2020202020202020206f7269675f64656c2c0a202020202020202020657870655f69642c0a2020202020202020206d6f64696669636174696f6e5f74696d657374616d702c0a2020202020202020207065726d5f69642c0a202020202020202020706572735f69645f726567697374657265722c200a202020202020202020706572735f69645f6d6f6469666965722c200a202020202020202020726567697374726174696f6e5f74696d657374616d702c200a20202020202020202073616d705f69645f706172745f6f662c0a202020202020202020736174795f69642c200a20202020202020202073706163655f69642c0a20202020202020202076657273696f6e0a20202020202020292056414c55455320280a2020202020202020204e45572e69642c200a2020202020202020204e45572e636f64652c200a2020202020202020204e45572e6462696e5f69642c0a2020202020202020204e45572e64656c5f69642c0a2020202020202020204e45572e6f7269675f64656c2c0a2020202020202020204e45572e657870655f69642c0a2020202020202020204e45572e6d6f64696669636174696f6e5f74696d657374616d702c0a2020202020202020204e45572e7065726d5f69642c0a2020202020202020204e45572e706572735f69645f726567697374657265722c200a2020202020202020204e45572e706572735f69645f6d6f6469666965722c200a2020202020202020204e45572e726567697374726174696f6e5f74696d657374616d702c200a2020202020202020204e45572e73616d705f69645f706172745f6f662c0a2020202020202020204e45572e736174795f69642c200a2020202020202020204e45572e73706163655f69642c0a2020202020202020204e45572e76657273696f6e0a20202020202020293b0a20202020200a435245415445204f52205245504c4143452052554c452073616d706c655f7570646174652041530a202020204f4e2055504441544520544f2073616d706c657320444f20494e5354454144200a202020202020205550444154452073616d706c65735f616c6c0a2020202020202020202053455420636f6465203d204e45572e636f64652c0a20202020202020202020202020206462696e5f6964203d204e45572e6462696e5f69642c0a202020202020202020202020202064656c5f6964203d204e45572e64656c5f69642c0a20202020202020202020202020206f7269675f64656c203d204e45572e6f7269675f64656c2c0a2020202020202020202020202020657870655f6964203d204e45572e657870655f69642c0a20202020202020202020202020206d6f64696669636174696f6e5f74696d657374616d70203d204e45572e6d6f64696669636174696f6e5f74696d657374616d702c0a20202020202020202020202020207065726d5f6964203d204e45572e7065726d5f69642c0a2020202020202020202020202020706572735f69645f72656769737465726572203d204e45572e706572735f69645f726567697374657265722c0a2020202020202020202020202020706572735f69645f6d6f646966696572203d204e45572e706572735f69645f6d6f6469666965722c0a2020202020202020202020202020726567697374726174696f6e5f74696d657374616d70203d204e45572e726567697374726174696f6e5f74696d657374616d702c0a202020202020202020202020202073616d705f69645f706172745f6f66203d204e45572e73616d705f69645f706172745f6f662c0a2020202020202020202020202020736174795f6964203d204e45572e736174795f69642c0a202020202020202020202020202073706163655f6964203d204e45572e73706163655f69642c0a202020202020202020202020202076657273696f6e203d204e45572e76657273696f6e0a202020202020202020205748455245206964203d204e45572e69643b0a20202020200a435245415445204f52205245504c4143452052554c452073616d706c655f64656c6574652041530a202020204f4e2044454c45544520544f2073616d706c657320444f20494e53544541440a2020202020202044454c4554452046524f4d2073616d706c65735f616c6c0a20202020202020202020202020205748455245206964203d204f4c442e69643b0a20202020202020202020202020200a435245415445204f52205245504c4143452052554c452073616d706c655f64656c657465645f7570646174652041530a202020204f4e2055504441544520544f2073616d706c65735f64656c6574656420444f20494e53544541440a202020202020205550444154452073616d706c65735f616c6c0a202020202020202020205345542064656c5f6964203d204e45572e64656c5f69642c0a20202020202020202020202020206f7269675f64656c203d204e45572e6f7269675f64656c2c0a20202020202020202020202020206d6f64696669636174696f6e5f74696d657374616d70203d204e45572e6d6f64696669636174696f6e5f74696d657374616d702c0a202020202020202020202020202076657273696f6e203d204e45572e76657273696f6e0a202020202020202020205748455245206964203d204e45572e69643b0a20202020200a435245415445204f52205245504c4143452052554c452073616d706c655f64656c657465645f64656c6574652041530a202020204f4e2044454c45544520544f2073616d706c65735f64656c6574656420444f20494e53544541440a2020202020202044454c4554452046524f4d2073616d706c65735f616c6c0a20202020202020202020202020205748455245206964203d204f4c442e69643b0a20202020202020202020202020200a2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d0a2d2d206578706572696d656e74202d2d0a2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d0a0a435245415445204f52205245504c4143452052554c45206578706572696d656e745f696e736572742041530a20204f4e20494e5345525420544f206578706572696d656e747320444f20494e5354454144200a2020202020494e5345525420494e544f206578706572696d656e74735f616c6c20280a2020202020202069642c200a20202020202020636f64652c200a2020202020202064656c5f69642c0a202020202020206f7269675f64656c2c0a20202020202020657874795f69642c200a2020202020202069735f7075626c69632c0a202020202020206d6f64696669636174696f6e5f74696d657374616d702c0a202020202020207065726d5f69642c0a20202020202020706572735f69645f726567697374657265722c200a20202020202020706572735f69645f6d6f6469666965722c200a2020202020202070726f6a5f69642c0a20202020202020726567697374726174696f6e5f74696d657374616d702c0a2020202020202076657273696f6e0a2020202020292056414c55455320280a202020202020204e45572e69642c200a202020202020204e45572e636f64652c200a202020202020204e45572e64656c5f69642c0a202020202020204e45572e6f7269675f64656c2c0a202020202020204e45572e657874795f69642c200a202020202020204e45572e69735f7075626c69632c0a202020202020204e45572e6d6f64696669636174696f6e5f74696d657374616d702c0a202020202020204e45572e7065726d5f69642c0a202020202020204e45572e706572735f69645f726567697374657265722c200a202020202020204e45572e706572735f69645f6d6f6469666965722c200a202020202020204e45572e70726f6a5f69642c0a202020202020204e45572e726567697374726174696f6e5f74696d657374616d702c0a202020202020204e45572e76657273696f6e0a2020202020293b0a20202020200a435245415445204f52205245504c4143452052554c45206578706572696d656e745f7570646174652041530a202020204f4e2055504441544520544f206578706572696d656e747320444f20494e5354454144200a20202020202020555044415445206578706572696d656e74735f616c6c0a2020202020202020202053455420636f6465203d204e45572e636f64652c0a202020202020202020202020202064656c5f6964203d204e45572e64656c5f69642c0a20202020202020202020202020206f7269675f64656c203d204e45572e6f7269675f64656c2c0a2020202020202020202020202020657874795f6964203d204e45572e657874795f69642c0a202020202020202020202020202069735f7075626c6963203d204e45572e69735f7075626c69632c0a20202020202020202020202020206d6f64696669636174696f6e5f74696d657374616d70203d204e45572e6d6f64696669636174696f6e5f74696d657374616d702c0a20202020202020202020202020207065726d5f6964203d204e45572e7065726d5f69642c0a2020202020202020202020202020706572735f69645f72656769737465726572203d204e45572e706572735f69645f726567697374657265722c0a2020202020202020202020202020706572735f69645f6d6f646966696572203d204e45572e706572735f69645f6d6f6469666965722c0a202020202020202020202020202070726f6a5f6964203d204e45572e70726f6a5f69642c0a2020202020202020202020202020726567697374726174696f6e5f74696d657374616d70203d204e45572e726567697374726174696f6e5f74696d657374616d702c0a202020202020202020202020202076657273696f6e203d204e45572e76657273696f6e0a202020202020202020205748455245206964203d204e45572e69643b0a20202020200a435245415445204f52205245504c4143452052554c45206578706572696d656e745f64656c6574652041530a202020204f4e2044454c45544520544f206578706572696d656e747320444f20494e53544541440a2020202020202044454c4554452046524f4d206578706572696d656e74735f616c6c0a20202020202020202020202020205748455245206964203d204f4c442e69643b0a2020202020200a435245415445204f52205245504c4143452052554c45206578706572696d656e74735f64656c657465645f7570646174652041530a202020204f4e2055504441544520544f206578706572696d656e74735f64656c6574656420444f20494e5354454144200a20202020202020555044415445206578706572696d656e74735f616c6c0a202020202020202020205345542064656c5f6964203d204e45572e64656c5f69642c0a20202020202020202020202020206f7269675f64656c203d204e45572e6f7269675f64656c2c0a20202020202020202020202020206d6f64696669636174696f6e5f74696d657374616d70203d204e45572e6d6f64696669636174696f6e5f74696d657374616d702c0a202020202020202020202020202076657273696f6e203d204e45572e76657273696f6e0a202020202020202020205748455245206964203d204e45572e69643b0a20202020200a435245415445204f52205245504c4143452052554c45206578706572696d656e74735f64656c657465645f64656c6574652041530a202020204f4e2044454c45544520544f206578706572696d656e74735f64656c6574656420444f20494e53544541440a2020202020202044454c4554452046524f4d206578706572696d656e74735f616c6c0a20202020202020202020202020205748455245206964203d204f4c442e69643b0a2020202020202020202020202020202020202020202020202020200a2020202020202020202020202020202020202020202020202020200a2d2d2d2d2d2d2d2d2d2d0a2d2d2064617461202d2d0a2d2d2d2d2d2d2d2d2d2d0a2020202020200a435245415445204f52205245504c4143452052554c4520646174615f696e736572742041530a20204f4e20494e5345525420544f206461746120444f20494e5354454144200a2020202020494e5345525420494e544f20646174615f616c6c20280a2020202020202069642c200a20202020202020636f64652c200a2020202020202063746e725f69642c0a2020202020202063746e725f6f726465722c0a2020202020202064656c5f69642c0a202020202020206f7269675f64656c2c0a20202020202020657870655f69642c0a20202020202020646173745f69642c0a20202020202020646174615f70726f64756365725f636f64652c0a20202020202020647374795f69642c0a2020202020202069735f646572697665642c0a2020202020202069735f706c616365686f6c6465722c0a2020202020202069735f76616c69642c0a202020202020206d6f64696669636174696f6e5f74696d657374616d702c0a20202020202020706572735f69645f726567697374657265722c0a20202020202020706572735f69645f6d6f6469666965722c0a2020202020202070726f64756374696f6e5f74696d657374616d702c0a20202020202020726567697374726174696f6e5f74696d657374616d702c0a2020202020202073616d705f69642c0a2020202020202076657273696f6e0a2020202020292056414c55455320280a202020202020204e45572e69642c200a202020202020204e45572e636f64652c200a202020202020204e45572e63746e725f69642c0a202020202020204e45572e63746e725f6f726465722c0a202020202020204e45572e64656c5f69642c200a202020202020204e45572e6f7269675f64656c2c0a202020202020204e45572e657870655f69642c0a202020202020204e45572e646173745f69642c0a202020202020204e45572e646174615f70726f64756365725f636f64652c0a202020202020204e45572e647374795f69642c0a202020202020204e45572e69735f646572697665642c200a202020202020204e45572e69735f706c616365686f6c6465722c0a202020202020204e45572e69735f76616c69642c0a202020202020204e45572e6d6f64696669636174696f6e5f74696d657374616d702c0a202020202020204e45572e706572735f69645f726567697374657265722c0a202020202020204e45572e706572735f69645f6d6f6469666965722c0a202020202020204e45572e70726f64756374696f6e5f74696d657374616d702c0a202020202020204e45572e726567697374726174696f6e5f74696d657374616d702c0a202020202020204e45572e73616d705f69642c0a202020202020204e45572e76657273696f6e0a2020202020293b0a20202020200a435245415445204f52205245504c4143452052554c4520646174615f7570646174652041530a202020204f4e2055504441544520544f206461746120444f20494e5354454144200a2020202020202055504441544520646174615f616c6c0a2020202020202020202053455420636f6465203d204e45572e636f64652c0a202020202020202020202020202063746e725f6964203d204e45572e63746e725f69642c0a202020202020202020202020202063746e725f6f72646572203d204e45572e63746e725f6f726465722c0a202020202020202020202020202064656c5f6964203d204e45572e64656c5f69642c0a20202020202020202020202020206f7269675f64656c203d204e45572e6f7269675f64656c2c0a2020202020202020202020202020657870655f6964203d204e45572e657870655f69642c0a2020202020202020202020202020646173745f6964203d204e45572e646173745f69642c0a2020202020202020202020202020646174615f70726f64756365725f636f6465203d204e45572e646174615f70726f64756365725f636f64652c0a2020202020202020202020202020647374795f6964203d204e45572e647374795f69642c0a202020202020202020202020202069735f64657269766564203d204e45572e69735f646572697665642c0a202020202020202020202020202069735f706c616365686f6c646572203d204e45572e69735f706c616365686f6c6465722c0a202020202020202020202020202069735f76616c6964203d204e45572e69735f76616c69642c0a20202020202020202020202020206d6f64696669636174696f6e5f74696d657374616d70203d204e45572e6d6f64696669636174696f6e5f74696d657374616d702c0a2020202020202020202020202020706572735f69645f72656769737465726572203d204e45572e706572735f69645f726567697374657265722c0a2020202020202020202020202020706572735f69645f6d6f646966696572203d204e45572e706572735f69645f6d6f6469666965722c0a202020202020202020202020202070726f64756374696f6e5f74696d657374616d70203d204e45572e70726f64756374696f6e5f74696d657374616d702c0a2020202020202020202020202020726567697374726174696f6e5f74696d657374616d70203d204e45572e726567697374726174696f6e5f74696d657374616d702c0a202020202020202020202020202073616d705f6964203d204e45572e73616d705f69642c0a202020202020202020202020202076657273696f6e203d204e45572e76657273696f6e0a202020202020205748455245206964203d204e45572e69643b0a20202020202020202020202020200a435245415445204f52205245504c4143452052554c4520646174615f616c6c2041530a202020204f4e2044454c45544520544f206461746120444f20494e53544541440a2020202020202044454c4554452046524f4d20646174615f616c6c0a20202020202020202020202020205748455245206964203d204f4c442e69643b0a20202020202020202020202020200a435245415445204f52205245504c4143452052554c4520646174615f64656c657465645f7570646174652041530a202020204f4e2055504441544520544f20646174615f64656c6574656420444f20494e5354454144200a2020202020202055504441544520646174615f616c6c0a202020202020202020205345542064656c5f6964203d204e45572e64656c5f69642c0a20202020202020202020202020206f7269675f64656c203d204e45572e6f7269675f64656c2c0a20202020202020202020202020206d6f64696669636174696f6e5f74696d657374616d70203d204e45572e6d6f64696669636174696f6e5f74696d657374616d702c0a202020202020202020202020202076657273696f6e203d204e45572e76657273696f6e0a202020202020202020205748455245206964203d204e45572e69643b0a20202020200a435245415445204f52205245504c4143452052554c4520646174615f64656c657465645f64656c6574652041530a202020204f4e2044454c45544520544f20646174615f64656c6574656420444f20494e53544541440a2020202020202044454c4554452046524f4d20646174615f616c6c0a20202020202020202020202020205748455245206964203d204f4c442e69643b2020202020202020202020202020200a20202020202020202020202020200a0a2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d0a2d2d2052756c657320666f722070726f7065727469657320686973746f72790a2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d0a0a2d2d204d6174657269616c2050726f70657274696573202d2d0a0a435245415445204f52205245504c4143452052554c45206d6174657269616c5f70726f706572746965735f7570646174652041530a202020204f4e2055504441544520544f206d6174657269616c5f70726f70657274696573200a20202020574845524520284f4c442e56414c5545204953204e4f54204e554c4c20414e44206465636f646528737562737472696e67284f4c442e76616c75652066726f6d203120666f722031292c2027657363617065272920213d2045275c5c786566626662642720414e44204f4c442e56414c554520213d204e45572e56414c554529200a20202020202020204f5220284f4c442e435654455f4944204953204e4f54204e554c4c20414e44204f4c442e435654455f494420213d204e45572e435654455f494429200a20202020202020204f5220284f4c442e4d4154455f50524f505f4944204953204e4f54204e554c4c20414e44204f4c442e4d4154455f50524f505f494420213d204e45572e4d4154455f50524f505f4944290a20202020444f20414c534f200a20202020202020494e5345525420494e544f206d6174657269616c5f70726f706572746965735f686973746f727920280a20202020202020202049442c200a2020202020202020204d4154455f49442c200a2020202020202020204d5450545f49442c200a20202020202020202056414c55452c200a202020202020202020564f434142554c4152595f5445524d2c0a2020202020202020204d4154455249414c2c200a202020202020202020504552535f49445f415554484f522c0a20202020202020202056414c49445f46524f4d5f54494d455354414d502c0a20202020202020202056414c49445f554e54494c5f54494d455354414d50200a20202020202020292056414c55455320280a2020202020202020206e65787476616c28274d4154455249414c5f50524f50455254595f49445f53455127292c200a2020202020202020204f4c442e4d4154455f49442c200a2020202020202020204f4c442e4d5450545f49442c200a2020202020202020204f4c442e56414c55452c200a2020202020202020202873656c6563742028742e636f6465207c7c2027205b27207c7c20762e636f6465207c7c20275d27292066726f6d20636f6e74726f6c6c65645f766f636162756c6172795f7465726d732061732074206a6f696e20636f6e74726f6c6c65645f766f636162756c61726965732061732076206f6e20742e636f766f5f6964203d20762e696420776865726520742e6964203d204f4c442e435654455f4944292c0a2020202020202020202873656c65637420286d2e636f6465207c7c2027205b27207c7c206d742e636f6465207c7c20275d27292066726f6d206d6174657269616c73206173206d206a6f696e206d6174657269616c5f7479706573206173206d74206f6e206d2e6d6174795f6964203d206d742e6964207768657265206d2e6964203d204f4c442e4d4154455f50524f505f4944292c0a2020202020202020204f4c442e504552535f49445f415554484f522c0a2020202020202020204f4c442e4d4f44494649434154494f4e5f54494d455354414d502c0a20202020202020202063757272656e745f74696d657374616d700a20202020202020293b0a202020202020200a435245415445204f52205245504c4143452052554c45206d6174657269616c5f70726f706572746965735f64656c6574652041530a202020204f4e2044454c45544520544f206d6174657269616c5f70726f70657274696573200a20202020574845524520284f4c442e56414c5545204953204e4f54204e554c4c20414e44206465636f646528737562737472696e67284f4c442e76616c75652066726f6d203120666f722031292c2027657363617065272920213d2045275c5c7865666266626427290a20202020202020204f52204f4c442e435654455f4944204953204e4f54204e554c4c200a20202020202020204f52204f4c442e4d4154455f50524f505f4944204953204e4f54204e554c4c0a20202020444f20414c534f200a20202020202020494e5345525420494e544f206d6174657269616c5f70726f706572746965735f686973746f727920280a20202020202020202049442c200a2020202020202020204d4154455f49442c200a2020202020202020204d5450545f49442c200a20202020202020202056414c55452c200a202020202020202020564f434142554c4152595f5445524d2c0a2020202020202020204d4154455249414c2c200a202020202020202020504552535f49445f415554484f522c0a20202020202020202056414c49445f46524f4d5f54494d455354414d502c0a20202020202020202056414c49445f554e54494c5f54494d455354414d50200a20202020202020292056414c55455320280a2020202020202020206e65787476616c28274d4154455249414c5f50524f50455254595f49445f53455127292c200a2020202020202020204f4c442e4d4154455f49442c200a2020202020202020204f4c442e4d5450545f49442c200a2020202020202020204f4c442e56414c55452c200a2020202020202020202873656c6563742028742e636f6465207c7c2027205b27207c7c20762e636f6465207c7c20275d27292066726f6d20636f6e74726f6c6c65645f766f636162756c6172795f7465726d732061732074206a6f696e20636f6e74726f6c6c65645f766f636162756c61726965732061732076206f6e20742e636f766f5f6964203d20762e696420776865726520742e6964203d204f4c442e435654455f4944292c0a2020202020202020202873656c65637420286d2e636f6465207c7c2027205b27207c7c206d742e636f6465207c7c20275d27292066726f6d206d6174657269616c73206173206d206a6f696e206d6174657269616c5f7479706573206173206d74206f6e206d2e6d6174795f6964203d206d742e6964207768657265206d2e6964203d204f4c442e4d4154455f50524f505f4944292c0a2020202020202020204f4c442e504552535f49445f415554484f522c0a2020202020202020204f4c442e4d4f44494649434154494f4e5f54494d455354414d502c0a20202020202020202063757272656e745f74696d657374616d700a20202020202020293b0a202020202020200a2d2d204578706572696d656e742050726f70657274696573202d2d0a0a435245415445204f52205245504c4143452052554c45206578706572696d656e745f70726f706572746965735f7570646174652041530a202020204f4e2055504441544520544f206578706572696d656e745f70726f70657274696573200a20202020574845524520284f4c442e56414c5545204953204e4f54204e554c4c20414e44206465636f646528737562737472696e67284f4c442e76616c75652066726f6d203120666f722031292c2027657363617065272920213d2045275c5c786566626662642720414e44204f4c442e56414c554520213d204e45572e56414c554529200a20202020202020204f5220284f4c442e435654455f4944204953204e4f54204e554c4c20414e44204f4c442e435654455f494420213d204e45572e435654455f494429200a20202020202020204f5220284f4c442e4d4154455f50524f505f4944204953204e4f54204e554c4c20414e44204f4c442e4d4154455f50524f505f494420213d204e45572e4d4154455f50524f505f4944290a20202020444f20414c534f200a20202020202020494e5345525420494e544f206578706572696d656e745f70726f706572746965735f686973746f727920280a20202020202020202049442c200a202020202020202020455850455f49442c0a202020202020202020455450545f49442c200a20202020202020202056414c55452c200a202020202020202020564f434142554c4152595f5445524d2c0a2020202020202020204d4154455249414c2c200a202020202020202020504552535f49445f415554484f522c0a20202020202020202056414c49445f46524f4d5f54494d455354414d502c0a20202020202020202056414c49445f554e54494c5f54494d455354414d50200a20202020202020292056414c55455320280a2020202020202020206e65787476616c28274558504552494d454e545f50524f50455254595f49445f53455127292c200a2020202020202020204f4c442e455850455f49442c200a2020202020202020204f4c442e455450545f49442c200a2020202020202020204f4c442e56414c55452c200a2020202020202020202873656c6563742028742e636f6465207c7c2027205b27207c7c20762e636f6465207c7c20275d27292066726f6d20636f6e74726f6c6c65645f766f636162756c6172795f7465726d732061732074206a6f696e20636f6e74726f6c6c65645f766f636162756c61726965732061732076206f6e20742e636f766f5f6964203d20762e696420776865726520742e6964203d204f4c442e435654455f4944292c0a2020202020202020202873656c65637420286d2e636f6465207c7c2027205b27207c7c206d742e636f6465207c7c20275d27292066726f6d206d6174657269616c73206173206d206a6f696e206d6174657269616c5f7479706573206173206d74206f6e206d2e6d6174795f6964203d206d742e6964207768657265206d2e6964203d204f4c442e4d4154455f50524f505f4944292c0a2020202020202020204f4c442e504552535f49445f415554484f522c0a2020202020202020204f4c442e4d4f44494649434154494f4e5f54494d455354414d502c0a20202020202020202063757272656e745f74696d657374616d700a20202020202020293b0a202020202020200a435245415445204f52205245504c4143452052554c45206578706572696d656e745f70726f706572746965735f64656c6574652041530a202020204f4e2044454c45544520544f206578706572696d656e745f70726f70657274696573200a20202020574845524520284f4c442e56414c5545204953204e4f54204e554c4c20414e44206465636f646528737562737472696e67284f4c442e76616c75652066726f6d203120666f722031292c2027657363617065272920213d2045275c5c7865666266626427290a20202020202020204f52204f4c442e435654455f4944204953204e4f54204e554c4c200a20202020202020204f52204f4c442e4d4154455f50524f505f4944204953204e4f54204e554c4c0a20202020444f20414c534f200a20202020202020494e5345525420494e544f206578706572696d656e745f70726f706572746965735f686973746f727920280a20202020202020202049442c200a202020202020202020455850455f49442c0a202020202020202020455450545f49442c200a20202020202020202056414c55452c200a202020202020202020564f434142554c4152595f5445524d2c0a2020202020202020204d4154455249414c2c200a202020202020202020504552535f49445f415554484f522c0a20202020202020202056414c49445f46524f4d5f54494d455354414d502c0a20202020202020202056414c49445f554e54494c5f54494d455354414d50200a20202020202020292056414c55455320280a2020202020202020206e65787476616c28274558504552494d454e545f50524f50455254595f49445f53455127292c200a2020202020202020204f4c442e455850455f49442c200a2020202020202020204f4c442e455450545f49442c200a2020202020202020204f4c442e56414c55452c200a2020202020202020202873656c6563742028742e636f6465207c7c2027205b27207c7c20762e636f6465207c7c20275d27292066726f6d20636f6e74726f6c6c65645f766f636162756c6172795f7465726d732061732074206a6f696e20636f6e74726f6c6c65645f766f636162756c61726965732061732076206f6e20742e636f766f5f6964203d20762e696420776865726520742e6964203d204f4c442e435654455f4944292c0a2020202020202020202873656c65637420286d2e636f6465207c7c2027205b27207c7c206d742e636f6465207c7c20275d27292066726f6d206d6174657269616c73206173206d206a6f696e206d6174657269616c5f7479706573206173206d74206f6e206d2e6d6174795f6964203d206d742e6964207768657265206d2e6964203d204f4c442e4d4154455f50524f505f4944292c0a2020202020202020204f4c442e504552535f49445f415554484f522c0a2020202020202020204f4c442e4d4f44494649434154494f4e5f54494d455354414d502c0a20202020202020202063757272656e745f74696d657374616d700a20202020202020293b0a202020202020200a2d2d2053616d706c652050726f70657274696573202d2d0a0a435245415445204f52205245504c4143452052554c452073616d706c655f70726f706572746965735f7570646174652041530a202020204f4e2055504441544520544f2073616d706c655f70726f706572746965730a20202020574845524520284f4c442e56414c5545204953204e4f54204e554c4c20414e44206465636f646528737562737472696e67284f4c442e76616c75652066726f6d203120666f722031292c2027657363617065272920213d2045275c5c786566626662642720414e44204f4c442e56414c554520213d204e45572e56414c554529200a20202020202020204f5220284f4c442e435654455f4944204953204e4f54204e554c4c20414e44204f4c442e435654455f494420213d204e45572e435654455f494429200a20202020202020204f5220284f4c442e4d4154455f50524f505f4944204953204e4f54204e554c4c20414e44204f4c442e4d4154455f50524f505f494420213d204e45572e4d4154455f50524f505f4944290a20202020444f20414c534f0a20202020202020494e5345525420494e544f2073616d706c655f70726f706572746965735f686973746f727920280a20202020202020202049442c200a20202020202020202053414d505f49442c0a202020202020202020535450545f49442c200a20202020202020202056414c55452c200a202020202020202020564f434142554c4152595f5445524d2c0a2020202020202020204d4154455249414c2c200a202020202020202020504552535f49445f415554484f522c0a20202020202020202056414c49445f46524f4d5f54494d455354414d502c0a20202020202020202056414c49445f554e54494c5f54494d455354414d50200a20202020202020292056414c55455320280a2020202020202020206e65787476616c282753414d504c455f50524f50455254595f49445f53455127292c200a2020202020202020204f4c442e53414d505f49442c200a2020202020202020204f4c442e535450545f49442c200a2020202020202020204f4c442e56414c55452c200a2020202020202020202873656c6563742028742e636f6465207c7c2027205b27207c7c20762e636f6465207c7c20275d27292066726f6d20636f6e74726f6c6c65645f766f636162756c6172795f7465726d732061732074206a6f696e20636f6e74726f6c6c65645f766f636162756c61726965732061732076206f6e20742e636f766f5f6964203d20762e696420776865726520742e6964203d204f4c442e435654455f4944292c0a2020202020202020202873656c65637420286d2e636f6465207c7c2027205b27207c7c206d742e636f6465207c7c20275d27292066726f6d206d6174657269616c73206173206d206a6f696e206d6174657269616c5f7479706573206173206d74206f6e206d2e6d6174795f6964203d206d742e6964207768657265206d2e6964203d204f4c442e4d4154455f50524f505f4944292c0a2020202020202020204f4c442e504552535f49445f415554484f522c0a2020202020202020204f4c442e4d4f44494649434154494f4e5f54494d455354414d502c0a20202020202020202063757272656e745f74696d657374616d700a20202020202020293b0a20202020202020202020202020200a435245415445204f52205245504c4143452052554c452073616d706c655f70726f706572746965735f64656c6574652041530a202020204f4e2044454c45544520544f2073616d706c655f70726f70657274696573200a2020202057484552452028284f4c442e56414c5545204953204e4f54204e554c4c20414e44206465636f646528737562737472696e67284f4c442e76616c75652066726f6d203120666f722031292c2027657363617065272920213d2045275c5c7865666266626427290a20202020202020204f52204f4c442e435654455f4944204953204e4f54204e554c4c200a20202020202020204f52204f4c442e4d4154455f50524f505f4944204953204e4f54204e554c4c290a09202020414e44202853454c4543542044454c5f49442046524f4d2053414d504c45535f414c4c205748455245204944203d204f4c442e53414d505f494429204953204e554c4c0a2020202020444f20414c534f0a20202020202020494e5345525420494e544f2073616d706c655f70726f706572746965735f686973746f727920280a20202020202020202049442c200a20202020202020202053414d505f49442c0a202020202020202020535450545f49442c200a20202020202020202056414c55452c200a202020202020202020564f434142554c4152595f5445524d2c0a2020202020202020204d4154455249414c2c200a202020202020202020504552535f49445f415554484f522c0a20202020202020202056414c49445f46524f4d5f54494d455354414d502c0a20202020202020202056414c49445f554e54494c5f54494d455354414d50200a20202020202020292056414c55455320280a2020202020202020206e65787476616c282753414d504c455f50524f50455254595f49445f53455127292c200a2020202020202020204f4c442e53414d505f49442c200a2020202020202020204f4c442e535450545f49442c200a2020202020202020204f4c442e56414c55452c200a2020202020202020202873656c6563742028742e636f6465207c7c2027205b27207c7c20762e636f6465207c7c20275d27292066726f6d20636f6e74726f6c6c65645f766f636162756c6172795f7465726d732061732074206a6f696e20636f6e74726f6c6c65645f766f636162756c61726965732061732076206f6e20742e636f766f5f6964203d20762e696420776865726520742e6964203d204f4c442e435654455f4944292c0a2020202020202020202873656c65637420286d2e636f6465207c7c2027205b27207c7c206d742e636f6465207c7c20275d27292066726f6d206d6174657269616c73206173206d206a6f696e206d6174657269616c5f7479706573206173206d74206f6e206d2e6d6174795f6964203d206d742e6964207768657265206d2e6964203d204f4c442e4d4154455f50524f505f4944292c0a2020202020202020204f4c442e504552535f49445f415554484f522c0a2020202020202020204f4c442e4d4f44494649434154494f4e5f54494d455354414d502c0a20202020202020202063757272656e745f74696d657374616d700a20202020202020293b0a202020202020200a2d2d2044617461205365742050726f70657274696573202d2d0a0a435245415445204f52205245504c4143452052554c4520646174615f7365745f70726f706572746965735f7570646174652041530a202020204f4e2055504441544520544f20646174615f7365745f70726f70657274696573200a20202020574845524520284f4c442e56414c5545204953204e4f54204e554c4c20414e44206465636f646528737562737472696e67284f4c442e76616c75652066726f6d203120666f722031292c2027657363617065272920213d2045275c5c786566626662642720414e44204f4c442e56414c554520213d204e45572e56414c554529200a20202020202020204f5220284f4c442e435654455f4944204953204e4f54204e554c4c20414e44204f4c442e435654455f494420213d204e45572e435654455f494429200a20202020202020204f5220284f4c442e4d4154455f50524f505f4944204953204e4f54204e554c4c20414e44204f4c442e4d4154455f50524f505f494420213d204e45572e4d4154455f50524f505f4944290a20202020444f20414c534f0a20202020202020494e5345525420494e544f20646174615f7365745f70726f706572746965735f686973746f727920280a20202020202020202049442c200a20202020202020202044535f49442c0a20202020202020202044535450545f49442c200a20202020202020202056414c55452c200a202020202020202020564f434142554c4152595f5445524d2c0a2020202020202020204d4154455249414c2c200a202020202020202020504552535f49445f415554484f522c0a20202020202020202056414c49445f46524f4d5f54494d455354414d502c0a20202020202020202056414c49445f554e54494c5f54494d455354414d50200a20202020202020292056414c55455320280a2020202020202020206e65787476616c2827444154415f5345545f50524f50455254595f49445f53455127292c200a2020202020202020204f4c442e44535f49442c200a2020202020202020204f4c442e44535450545f49442c200a2020202020202020204f4c442e56414c55452c200a2020202020202020202873656c6563742028742e636f6465207c7c2027205b27207c7c20762e636f6465207c7c20275d27292066726f6d20636f6e74726f6c6c65645f766f636162756c6172795f7465726d732061732074206a6f696e20636f6e74726f6c6c65645f766f636162756c61726965732061732076206f6e20742e636f766f5f6964203d20762e696420776865726520742e6964203d204f4c442e435654455f4944292c0a2020202020202020202873656c65637420286d2e636f6465207c7c2027205b27207c7c206d742e636f6465207c7c20275d27292066726f6d206d6174657269616c73206173206d206a6f696e206d6174657269616c5f7479706573206173206d74206f6e206d2e6d6174795f6964203d206d742e6964207768657265206d2e6964203d204f4c442e4d4154455f50524f505f4944292c0a2020202020202020204f4c442e504552535f49445f415554484f522c0a2020202020202020204f4c442e4d4f44494649434154494f4e5f54494d455354414d502c0a20202020202020202063757272656e745f74696d657374616d700a20202020202020293b0a0a435245415445204f52205245504c4143452052554c4520646174615f7365745f70726f706572746965735f64656c6574652041530a202020204f4e2044454c45544520544f20646174615f7365745f70726f70657274696573200a2020202057484552452028284f4c442e56414c5545204953204e4f54204e554c4c20414e44206465636f646528737562737472696e67284f4c442e76616c75652066726f6d203120666f722031292c2027657363617065272920213d2045275c5c7865666266626427290a20202020202020204f52204f4c442e435654455f4944204953204e4f54204e554c4c200a20202020202020204f52204f4c442e4d4154455f50524f505f4944204953204e4f54204e554c4c290a09202020414e44202853454c4543542044454c5f49442046524f4d20444154415f414c4c205748455245204944203d204f4c442e44535f494429204953204e554c4c0a20202020444f20414c534f0a20202020202020494e5345525420494e544f20646174615f7365745f70726f706572746965735f686973746f727920280a20202020202020202049442c200a20202020202020202044535f49442c0a20202020202020202044535450545f49442c200a20202020202020202056414c55452c200a202020202020202020564f434142554c4152595f5445524d2c0a2020202020202020204d4154455249414c2c200a202020202020202020504552535f49445f415554484f522c0a20202020202020202056414c49445f46524f4d5f54494d455354414d502c0a20202020202020202056414c49445f554e54494c5f54494d455354414d50200a20202020202020292056414c55455320280a2020202020202020206e65787476616c2827444154415f5345545f50524f50455254595f49445f53455127292c200a2020202020202020204f4c442e44535f49442c200a2020202020202020204f4c442e44535450545f49442c200a2020202020202020204f4c442e56414c55452c200a2020202020202020202873656c6563742028742e636f6465207c7c2027205b27207c7c20762e636f6465207c7c20275d27292066726f6d20636f6e74726f6c6c65645f766f636162756c6172795f7465726d732061732074206a6f696e20636f6e74726f6c6c65645f766f636162756c61726965732061732076206f6e20742e636f766f5f6964203d20762e696420776865726520742e6964203d204f4c442e435654455f4944292c0a2020202020202020202873656c65637420286d2e636f6465207c7c2027205b27207c7c206d742e636f6465207c7c20275d27292066726f6d206d6174657269616c73206173206d206a6f696e206d6174657269616c5f7479706573206173206d74206f6e206d2e6d6174795f6964203d206d742e6964207768657265206d2e6964203d204f4c442e4d4154455f50524f505f4944292c0a2020202020202020204f4c442e504552535f49445f415554484f522c0a2020202020202020204f4c442e4d4f44494649434154494f4e5f54494d455354414d502c0a20202020202020202063757272656e745f74696d657374616d700a20202020202020293b0a202020202020200a2d2d20456e64206f662072756c657320666f722070726f7065727469657320686973746f72790a0a435245415445204f52205245504c4143452052554c4520646174615f7365745f72656c6174696f6e73686970735f696e736572742041530a202020204f4e20494e5345525420544f20646174615f7365745f72656c6174696f6e736869707320444f20494e5354454144200a20202020202020494e5345525420494e544f20646174615f7365745f72656c6174696f6e73686970735f616c6c20280a202020202020202020646174615f69645f706172656e742c200a202020202020202020646174615f69645f6368696c642c0a202020202020202020706572735f69645f617574686f722c0a090909202020726567697374726174696f6e5f74696d657374616d702c0a0909092020206d6f64696669636174696f6e5f74696d657374616d700a20202020202020292056414c55455320280a2020202020202020204e45572e646174615f69645f706172656e742c200a2020202020202020204e45572e646174615f69645f6368696c642c0a2020202020202020204e45572e706572735f69645f617574686f722c0a0909092020204e45572e726567697374726174696f6e5f74696d657374616d702c0a0909092020204e45572e6d6f64696669636174696f6e5f74696d657374616d700a20202020202020293b0a0a435245415445204f52205245504c4143452052554c4520646174615f7365745f72656c6174696f6e73686970735f7570646174652041530a202020204f4e2055504441544520544f20646174615f7365745f72656c6174696f6e736869707320444f20494e5354454144200a2020202020202055504441544520646174615f7365745f72656c6174696f6e73686970735f616c6c0a20202020202020202020534554200a090909202020202020646174615f69645f706172656e74203d204e45572e646174615f69645f706172656e742c200a090909202020202020646174615f69645f6368696c64203d204e45572e646174615f69645f6368696c642c200a09090920202020202064656c5f6964203d204e45572e64656c5f69642c0a090909202020202020706572735f69645f617574686f72203d204e45572e706572735f69645f617574686f722c0a090909202020202020726567697374726174696f6e5f74696d657374616d70203d204e45572e726567697374726174696f6e5f74696d657374616d702c0a0909092020202020206d6f64696669636174696f6e5f74696d657374616d70203d204e45572e6d6f64696669636174696f6e5f74696d657374616d700a20202020202020202020574845524520646174615f69645f706172656e74203d204e45572e646174615f69645f706172656e7420616e6420646174615f69645f6368696c64203d204e45572e646174615f69645f6368696c643b0a202020202020202020200a435245415445204f52205245504c4143452052554c4520646174615f7365745f72656c6174696f6e73686970735f64656c6574652041530a202020204f4e2044454c45544520544f20646174615f7365745f72656c6174696f6e736869707320444f20494e53544541440a2020202020202044454c4554452046524f4d20646174615f7365745f72656c6174696f6e73686970735f616c6c0a2020202020202020202020202020574845524520646174615f69645f706172656e74203d204f4c442e646174615f69645f706172656e7420616e6420646174615f69645f6368696c64203d204f4c442e646174615f69645f6368696c643b0a0a435245415445204f52205245504c4143452052554c452073616d706c655f72656c6174696f6e73686970735f696e736572742041530a202020204f4e20494e5345525420544f2073616d706c655f72656c6174696f6e736869707320444f20494e5354454144200a20202020202020494e5345525420494e544f2073616d706c655f72656c6174696f6e73686970735f616c6c20280a20202020202020202069642c200a20202020202020202073616d706c655f69645f706172656e742c200a20202020202020202072656c6174696f6e736869705f69642c200a20202020202020202073616d706c655f69645f6368696c642c0a202020202020202020706572735f69645f617574686f722c0a090909202020726567697374726174696f6e5f74696d657374616d702c0a2020200920202020206d6f64696669636174696f6e5f74696d657374616d700a20202020202020292056414c55455320280a2020202020202020204e45572e69642c200a2020202020202020204e45572e73616d706c655f69645f706172656e742c200a2020202020202020204e45572e72656c6174696f6e736869705f69642c200a2020202020202020204e45572e73616d706c655f69645f6368696c642c0a2020202020202020204e45572e706572735f69645f617574686f722c0a0909092020204e45572e726567697374726174696f6e5f74696d657374616d702c0a0909092020204e45572e6d6f64696669636174696f6e5f74696d657374616d700a20202020202020293b0a202020202020200a435245415445204f52205245504c4143452052554c452073616d706c655f72656c6174696f6e73686970735f7570646174652041530a202020204f4e2055504441544520544f2073616d706c655f72656c6174696f6e736869707320444f20494e5354454144200a202020202020205550444154452073616d706c655f72656c6174696f6e73686970735f616c6c0a20202020202020202020534554200a09090920202020202073616d706c655f69645f706172656e74203d204e45572e73616d706c655f69645f706172656e742c200a09090920202020202072656c6174696f6e736869705f6964203d204e45572e72656c6174696f6e736869705f69642c200a09090920202020202073616d706c655f69645f6368696c64203d204e45572e73616d706c655f69645f6368696c642c0a09090920202020202064656c5f6964203d204e45572e64656c5f69642c0a090909202020202020706572735f69645f617574686f72203d204e45572e706572735f69645f617574686f722c0a090909202020202020726567697374726174696f6e5f74696d657374616d70203d204e45572e726567697374726174696f6e5f74696d657374616d702c0a0909092020202020206d6f64696669636174696f6e5f74696d657374616d70203d204e45572e6d6f64696669636174696f6e5f74696d657374616d700a202020202020202020205748455245206964203d204e45572e69643b0a20202020200a435245415445204f52205245504c4143452052554c452073616d706c655f72656c6174696f6e73686970735f64656c6574652041530a202020204f4e2044454c45544520544f2073616d706c655f72656c6174696f6e736869707320444f20494e53544541440a2020202020202044454c4554452046524f4d2073616d706c655f72656c6174696f6e73686970735f616c6c0a20202020202020202020202020205748455245206964203d204f4c442e69643b0a0a435245415445204f52205245504c4143452052554c45204d45544150524f4a4543545f41535349474e4d454e54535f494e534552542041530a202020204f4e20494e5345525420544f204d45544150524f4a4543545f41535349474e4d454e545320444f20494e5354454144200a20202020202020494e5345525420494e544f204d45544150524f4a4543545f41535349474e4d454e54535f414c4c20280a20202020202020202049442c200a2020202020202020204d4550525f49442c0a202020202020202020455850455f49442c0a09090920202053414d505f49442c0a090909202020444154415f49442c0a0909092020204d4154455f49442c0a09090920202044454c5f49442c0a0909092020204352454154494f4e5f444154450a20202020202020292056414c55455320280a2020202020202020204e45572e49442c200a2020202020202020204e45572e4d4550525f49442c0a2020202020202020204e45572e455850455f49442c0a0909092020204e45572e53414d505f49442c0a0909092020204e45572e444154415f49442c0a0909092020204e45572e4d4154455f49442c0a0909092020204e45572e44454c5f49442c0a0909092020204e45572e4352454154494f4e5f444154450a20202020202020293b0a0a435245415445204f52205245504c4143452052554c45204d45544150524f4a4543545f41535349474e4d454e54535f5550444154452041530a202020204f4e2055504441544520544f204d45544150524f4a4543545f41535349474e4d454e545320444f20494e5354454144200a20202020202020555044415445204d45544150524f4a4543545f41535349474e4d454e54535f414c4c0a20202020202020202020534554200a0909092020202020204944203d204e45572e49442c200a20202020202020202009094d4550525f4944203d204e45572e4d4550525f49442c0a2020202020202020200909455850455f4944203d204e45572e455850455f49442c0a090909202020090953414d505f4944203d204e45572e53414d505f49442c0a0909092020200909444154415f4944203d204e45572e444154415f49442c0a09090920202009094d4154455f4944203d204e45572e4d4154455f49442c0a090909202020090944454c5f4944203d204e45572e44454c5f49442c0a09090920202009094352454154494f4e5f44415445203d204e45572e4352454154494f4e5f444154450a202020202020202020205748455245204944203d204e45572e49443b0a202020202020202020200a435245415445204f52205245504c4143452052554c45204d45544150524f4a4543545f41535349474e4d454e54535f44454c4554452041530a202020204f4e2044454c45544520544f204d45544150524f4a4543545f41535349474e4d454e545320444f20494e53544541440a2020202020202044454c4554452046524f4d204d45544150524f4a4543545f41535349474e4d454e54535f414c4c0a202020202020202020205748455245204944203d204f4c442e49443b0a20202020202020202020202020200a2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d0a2d2d2052756c657320666f722072656c6174696f6e736869707320686973746f72790a2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d0a0a2d2d2073616d706c65202d3e206578706572696d656e740a0a435245415445204f52205245504c4143452052554c452073616d706c655f6578706572696d656e745f7570646174652041530a202020204f4e2055504441544520544f2073616d706c65735f616c6c200a20202020574845524520284f4c442e455850455f494420213d204e45572e455850455f4944204f52204f4c442e455850455f4944204953204e554c4c2920414e44204e45572e455850455f4944204953204e4f54204e554c4c0a20202020444f20414c534f20280a20202020202020555044415445204558504552494d454e545f52454c4154494f4e53484950535f484953544f5259205345542056414c49445f554e54494c5f54494d455354414d50203d204e45572e4d4f44494649434154494f4e5f54494d455354414d500a2020202020202020205748455245204d41494e5f455850455f4944203d204f4c442e455850455f494420414e442053414d505f4944203d204f4c442e494420414e442056414c49445f554e54494c5f54494d455354414d50204953204e554c4c3b0a20202020202020494e5345525420494e544f204558504552494d454e545f52454c4154494f4e53484950535f484953544f525920280a20202020202020202049442c200a2020202020202020204d41494e5f455850455f49442c0a20202020202020202052454c4154494f4e5f545950452c200a20202020202020202053414d505f49442c200a202020202020202020454e544954595f5045524d5f49442c0a202020202020202020504552535f49445f415554484f522c0a20202020202020202056414c49445f46524f4d5f54494d455354414d500a20202020202020292056414c55455320280a2020202020202020206e65787476616c28274558504552494d454e545f52454c4154494f4e53484950535f484953544f52595f49445f53455127292c200a2020202020202020204e45572e455850455f49442c200a202020202020202020274f574e4552272c200a2020202020202020204e45572e49442c200a2020202020202020204e45572e5045524d5f49442c0a2020202020202020204e45572e504552535f49445f4d4f4449464945522c0a2020202020202020204e45572e4d4f44494649434154494f4e5f54494d455354414d500a20202020202020293b0a202020202020205550444154452053414d504c455f52454c4154494f4e53484950535f484953544f5259205345542056414c49445f554e54494c5f54494d455354414d50203d204e45572e4d4f44494649434154494f4e5f54494d455354414d50200a2020202020202020205748455245204d41494e5f53414d505f4944203d204f4c442e494420414e4420455850455f4944203d204f4c442e455850455f494420414e442056414c49445f554e54494c5f54494d455354414d50204953204e554c4c3b0a20202020202020494e5345525420494e544f2053414d504c455f52454c4154494f4e53484950535f484953544f525920280a20202020202020202049442c200a2020202020202020204d41494e5f53414d505f49442c0a20202020202020202052454c4154494f4e5f545950452c200a202020202020202020455850455f49442c200a202020202020202020454e544954595f5045524d5f49442c0a202020202020202020504552535f49445f415554484f522c0a20202020202020202056414c49445f46524f4d5f54494d455354414d500a20202020202020292056414c55455320280a2020202020202020206e65787476616c282753414d504c455f52454c4154494f4e53484950535f484953544f52595f49445f53455127292c200a2020202020202020204e45572e49442c200a202020202020202020274f574e4544272c200a2020202020202020204e45572e455850455f49442c200a2020202020202020202853454c454354205045524d5f49442046524f4d204558504552494d454e54535f414c4c205748455245204944203d204e45572e455850455f4944292c0a2020202020202020204e45572e504552535f49445f4d4f4449464945522c0a2020202020202020204e45572e4d4f44494649434154494f4e5f54494d455354414d500a20202020202020293b0a20202020293b0a202020200a435245415445204f52205245504c4143452052554c452073616d706c655f6578706572696d656e745f72656d6f76655f7570646174652041530a202020204f4e2055504441544520544f2073616d706c65735f616c6c200a202020205748455245204f4c442e455850455f4944204953204e4f54204e554c4c20414e44204e45572e455850455f4944204953204e554c4c0a20202020444f20414c534f20280a20202020202020555044415445204558504552494d454e545f52454c4154494f4e53484950535f484953544f5259205345542056414c49445f554e54494c5f54494d455354414d50203d204e45572e4d4f44494649434154494f4e5f54494d455354414d500a2020202020202020205748455245204d41494e5f455850455f4944203d204f4c442e455850455f494420414e442053414d505f4944203d204f4c442e494420414e442056414c49445f554e54494c5f54494d455354414d50204953204e554c4c3b0a202020202020205550444154452053414d504c455f52454c4154494f4e53484950535f484953544f5259205345542056414c49445f554e54494c5f54494d455354414d50203d204e45572e4d4f44494649434154494f4e5f54494d455354414d50200a2020202020202020205748455245204d41494e5f53414d505f4944203d204f4c442e494420414e4420455850455f4944203d204f4c442e455850455f494420414e442056414c49445f554e54494c5f54494d455354414d50204953204e554c4c3b0a20202020293b0a202020200a435245415445204f52205245504c4143452052554c452073616d706c655f6578706572696d656e745f696e736572742041530a202020204f4e20494e5345525420544f2073616d706c65735f616c6c200a202020205748455245204e45572e455850455f4944204953204e4f54204e554c4c0a20202020202020444f20414c534f20280a20202020202020494e5345525420494e544f204558504552494d454e545f52454c4154494f4e53484950535f484953544f525920280a20202020202020202049442c200a2020202020202020204d41494e5f455850455f49442c0a20202020202020202052454c4154494f4e5f545950452c200a20202020202020202053414d505f49442c200a202020202020202020454e544954595f5045524d5f49442c0a202020202020202020504552535f49445f415554484f522c0a20202020202020202056414c49445f46524f4d5f54494d455354414d500a20202020202020292056414c55455320280a2020202020202020206e65787476616c28274558504552494d454e545f52454c4154494f4e53484950535f484953544f52595f49445f53455127292c200a2020202020202020204e45572e455850455f49442c200a202020202020202020274f574e4552272c200a2020202020202020204e45572e49442c200a2020202020202020204e45572e5045524d5f49442c0a2020202020202020204e45572e504552535f49445f4d4f4449464945522c0a2020202020202020204e45572e4d4f44494649434154494f4e5f54494d455354414d500a20202020202020293b0a20202020202020494e5345525420494e544f2053414d504c455f52454c4154494f4e53484950535f484953544f525920280a20202020202020202049442c200a2020202020202020204d41494e5f53414d505f49442c0a20202020202020202052454c4154494f4e5f545950452c200a202020202020202020455850455f49442c200a202020202020202020454e544954595f5045524d5f49442c0a202020202020202020504552535f49445f415554484f522c0a20202020202020202056414c49445f46524f4d5f54494d455354414d500a20202020202020292056414c55455320280a2020202020202020206e65787476616c282753414d504c455f52454c4154494f4e53484950535f484953544f52595f49445f53455127292c200a2020202020202020204e45572e49442c200a202020202020202020274f574e4544272c200a2020202020202020204e45572e455850455f49442c200a2020202020202020202853454c454354205045524d5f49442046524f4d204558504552494d454e54535f414c4c205748455245204944203d204e45572e455850455f4944292c0a2020202020202020204e45572e504552535f49445f4d4f4449464945522c0a2020202020202020204e45572e4d4f44494649434154494f4e5f54494d455354414d500a20202020202020293b0a202020293b0a2020200a435245415445204f52205245504c4143452052554c452073616d706c655f6578706572696d656e745f64656c6574652041530a202020204f4e2044454c45544520544f2073616d706c65735f616c6c200a202020205748455245204f4c442e455850455f4944204953204e4f54204e554c4c0a20202020202020444f20414c534f200a20202020202020555044415445204558504552494d454e545f52454c4154494f4e53484950535f484953544f5259205345542056414c49445f554e54494c5f54494d455354414d50203d2063757272656e745f74696d657374616d70200a2020202020202020205748455245204d41494e5f455850455f4944203d204f4c442e455850455f494420414e442053414d505f4944203d204f4c442e494420414e442056414c49445f554e54494c5f54494d455354414d50204953204e554c4c3b0a20202020200a2d2d20636f6e7461696e65722073616d706c65730a202020202020200a435245415445204f52205245504c4143452052554c452073616d706c655f636f6e7461696e65725f7570646174652041530a202020204f4e2055504441544520544f2073616d706c65735f616c6c200a20202020574845524520284f4c442e53414d505f49445f504152545f4f4620213d204e45572e53414d505f49445f504152545f4f46204f52204f4c442e53414d505f49445f504152545f4f46204953204e554c4c2920414e44204e45572e53414d505f49445f504152545f4f46204953204e4f54204e554c4c0a20202020444f20414c534f20280a202020202020205550444154452053414d504c455f52454c4154494f4e53484950535f484953544f5259205345542056414c49445f554e54494c5f54494d455354414d50203d204e45572e4d4f44494649434154494f4e5f54494d455354414d50200a202020202020202020574845524520284d41494e5f53414d505f4944203d204f4c442e53414d505f49445f504152545f4f4620414e442053414d505f4944203d204f4c442e494420414e442056414c49445f554e54494c5f54494d455354414d50204953204e554c4c20414e442052454c4154494f4e5f54595045203d2027434f4e5441494e455227290a20202020202020202020204f5220284d41494e5f53414d505f4944203d204f4c442e494420414e442053414d505f4944203d204f4c442e53414d505f49445f504152545f4f4620414e442056414c49445f554e54494c5f54494d455354414d50204953204e554c4c20414e442052454c4154494f4e5f54595045203d2027434f4e5441494e454427293b0a20202020202020494e5345525420494e544f2053414d504c455f52454c4154494f4e53484950535f484953544f525920280a20202020202020202049442c200a2020202020202020204d41494e5f53414d505f49442c0a20202020202020202052454c4154494f4e5f545950452c200a20202020202020202053414d505f49442c200a202020202020202020454e544954595f5045524d5f49442c0a202020202020202020504552535f49445f415554484f522c0a20202020202020202056414c49445f46524f4d5f54494d455354414d500a20202020202020292056414c55455320280a2020202020202020206e65787476616c282753414d504c455f52454c4154494f4e53484950535f484953544f52595f49445f53455127292c200a2020202020202020204e45572e53414d505f49445f504152545f4f462c200a20202020202020202027434f4e5441494e4552272c200a2020202020202020204e45572e49442c200a2020202020202020204e45572e5045524d5f49442c0a2020202020202020204e45572e504552535f49445f4d4f4449464945522c0a2020202020202020204e45572e4d4f44494649434154494f4e5f54494d455354414d500a20202020202020293b0a20202020202020494e5345525420494e544f2053414d504c455f52454c4154494f4e53484950535f484953544f525920280a20202020202020202049442c200a2020202020202020204d41494e5f53414d505f49442c0a20202020202020202052454c4154494f4e5f545950452c200a20202020202020202053414d505f49442c200a202020202020202020454e544954595f5045524d5f49442c0a202020202020202020504552535f49445f415554484f522c0a20202020202020202056414c49445f46524f4d5f54494d455354414d500a20202020202020292056414c55455320280a2020202020202020206e65787476616c282753414d504c455f52454c4154494f4e53484950535f484953544f52595f49445f53455127292c200a2020202020202020204e45572e49442c200a20202020202020202027434f4e5441494e4544272c200a2020202020202020204e45572e53414d505f49445f504152545f4f462c200a2020202020202020202853454c454354205045524d5f49442046524f4d2053414d504c45535f414c4c205748455245204944203d204e45572e53414d505f49445f504152545f4f46292c0a2020202020202020204e45572e504552535f49445f4d4f4449464945522c0a2020202020202020204e45572e4d4f44494649434154494f4e5f54494d455354414d500a20202020202020293b0a20202020293b0a202020200a435245415445204f52205245504c4143452052554c452073616d706c655f636f6e7461696e65725f72656d6f76655f7570646174652041530a202020204f4e2055504441544520544f2073616d706c65735f616c6c200a202020205748455245204f4c442e53414d505f49445f504152545f4f46204953204e4f54204e554c4c20414e44204e45572e53414d505f49445f504152545f4f46204953204e554c4c0a20202020444f20414c534f20280a202020202020205550444154452053414d504c455f52454c4154494f4e53484950535f484953544f5259205345542056414c49445f554e54494c5f54494d455354414d50203d204e45572e4d4f44494649434154494f4e5f54494d455354414d50200a202020202020202020574845524520284d41494e5f53414d505f4944203d204f4c442e53414d505f49445f504152545f4f4620414e442053414d505f4944203d204f4c442e494420414e442056414c49445f554e54494c5f54494d455354414d50204953204e554c4c20414e442052454c4154494f4e5f54595045203d2027434f4e5441494e455227290a20202020202020202020204f5220284d41494e5f53414d505f4944203d204f4c442e494420414e442053414d505f4944203d204f4c442e53414d505f49445f504152545f4f4620414e442056414c49445f554e54494c5f54494d455354414d50204953204e554c4c20414e442052454c4154494f4e5f54595045203d2027434f4e5441494e454427293b0a20202020293b0a202020200a435245415445204f52205245504c4143452052554c452073616d706c655f636f6e7461696e65725f696e736572742041530a202020204f4e20494e5345525420544f2073616d706c65735f616c6c200a202020205748455245204e45572e53414d505f49445f504152545f4f46204953204e4f54204e554c4c0a20202020202020444f20414c534f20280a20202020202020494e5345525420494e544f2053414d504c455f52454c4154494f4e53484950535f484953544f525920280a20202020202020202049442c200a2020202020202020204d41494e5f53414d505f49442c0a20202020202020202052454c4154494f4e5f545950452c200a20202020202020202053414d505f49442c200a202020202020202020454e544954595f5045524d5f49442c0a202020202020202020504552535f49445f415554484f522c0a20202020202020202056414c49445f46524f4d5f54494d455354414d500a20202020202020292056414c55455320280a2020202020202020206e65787476616c282753414d504c455f52454c4154494f4e53484950535f484953544f52595f49445f53455127292c200a2020202020202020204e45572e53414d505f49445f504152545f4f462c200a20202020202020202027434f4e5441494e4552272c200a2020202020202020204e45572e49442c200a2020202020202020204e45572e5045524d5f49442c0a2020202020202020204e45572e504552535f49445f4d4f4449464945522c0a2020202020202020204e45572e4d4f44494649434154494f4e5f54494d455354414d500a20202020202020293b0a20202020202020494e5345525420494e544f2053414d504c455f52454c4154494f4e53484950535f484953544f525920280a20202020202020202049442c200a2020202020202020204d41494e5f53414d505f49442c0a20202020202020202052454c4154494f4e5f545950452c200a20202020202020202053414d505f49442c200a202020202020202020454e544954595f5045524d5f49442c0a202020202020202020504552535f49445f415554484f522c0a20202020202020202056414c49445f46524f4d5f54494d455354414d500a20202020202020292056414c55455320280a2020202020202020206e65787476616c282753414d504c455f52454c4154494f4e53484950535f484953544f52595f49445f53455127292c200a2020202020202020204e45572e49442c200a20202020202020202027434f4e5441494e4544272c200a2020202020202020204e45572e53414d505f49445f504152545f4f462c200a2020202020202020202853454c454354205045524d5f49442046524f4d2053414d504c45535f414c4c205748455245204944203d204e45572e53414d505f49445f504152545f4f46292c0a2020202020202020204e45572e504552535f49445f4d4f4449464945522c0a2020202020202020204e45572e4d4f44494649434154494f4e5f54494d455354414d500a20202020202020293b0a202020293b0a2020200a435245415445204f52205245504c4143452052554c452073616d706c655f636f6e7461696e65725f64656c6574652041530a202020204f4e2044454c45544520544f2073616d706c65735f616c6c200a202020205748455245204f4c442e53414d505f49445f504152545f4f46204953204e4f54204e554c4c0a20202020202020444f20414c534f200a202020202020205550444154452053414d504c455f52454c4154494f4e53484950535f484953544f5259205345542056414c49445f554e54494c5f54494d455354414d50203d2063757272656e745f74696d657374616d70200a2020202020202020205748455245204d41494e5f53414d505f4944203d204f4c442e53414d505f49445f504152545f4f4620414e442053414d505f4944203d204f4c442e494420414e442056414c49445f554e54494c5f54494d455354414d50204953204e554c4c20414e442052454c4154494f4e5f54595045203d2027434f4e5441494e4552273b0a0a2d2d2064617461736574202d3e2065706572696d656e740a0a435245415445204f52205245504c4143452052554c4520646174617365745f6578706572696d656e745f7570646174652041530a202020204f4e2055504441544520544f20646174615f616c6c200a20202020574845524520284f4c442e455850455f494420213d204e45572e455850455f4944204f52204f4c442e53414d505f4944204953204e4f54204e554c4c2920414e44204e45572e53414d505f4944204953204e554c4c0a20202020444f20414c534f20280a20202020202020555044415445204558504552494d454e545f52454c4154494f4e53484950535f484953544f5259205345542056414c49445f554e54494c5f54494d455354414d50203d204e45572e4d4f44494649434154494f4e5f54494d455354414d500a2020202020202020205748455245204d41494e5f455850455f4944203d204f4c442e455850455f494420414e4420444154415f4944203d204f4c442e494420414e442056414c49445f554e54494c5f54494d455354414d50204953204e554c4c3b0a20202020202020494e5345525420494e544f204558504552494d454e545f52454c4154494f4e53484950535f484953544f525920280a20202020202020202049442c200a2020202020202020204d41494e5f455850455f49442c0a20202020202020202052454c4154494f4e5f545950452c200a202020202020202020444154415f49442c200a202020202020202020454e544954595f5045524d5f49442c0a202020202020202020504552535f49445f415554484f522c0a20202020202020202056414c49445f46524f4d5f54494d455354414d500a20202020202020292056414c55455320280a2020202020202020206e65787476616c28274558504552494d454e545f52454c4154494f4e53484950535f484953544f52595f49445f53455127292c200a2020202020202020204e45572e455850455f49442c200a202020202020202020274f574e4552272c200a2020202020202020204e45572e49442c200a2020202020202020204e45572e434f44452c0a2020202020202020204e45572e504552535f49445f4d4f4449464945522c0a2020202020202020204e45572e4d4f44494649434154494f4e5f54494d455354414d500a20202020202020293b0a2020202020202055504441544520444154415f5345545f52454c4154494f4e53484950535f484953544f5259205345542056414c49445f554e54494c5f54494d455354414d50203d204e45572e4d4f44494649434154494f4e5f54494d455354414d50200a202020202020202020574845524520284d41494e5f444154415f4944203d204f4c442e494420414e4420455850455f4944203d204f4c442e455850455f494420414e442056414c49445f554e54494c5f54494d455354414d50204953204e554c4c293b0a20202020202020494e5345525420494e544f20444154415f5345545f52454c4154494f4e53484950535f484953544f525920280a20202020202020202049442c200a2020202020202020204d41494e5f444154415f49442c0a20202020202020202052454c4154494f4e5f545950452c200a202020202020202020455850455f49442c200a202020202020202020454e544954595f5045524d5f49442c0a202020202020202020504552535f49445f415554484f522c0a20202020202020202056414c49445f46524f4d5f54494d455354414d500a20202020202020292056414c55455320280a2020202020202020206e65787476616c2827444154415f5345545f52454c4154494f4e53484950535f484953544f52595f49445f53455127292c200a2020202020202020204e45572e49442c200a202020202020202020274f574e4544272c200a2020202020202020204e45572e455850455f49442c200a2020202020202020202853454c454354205045524d5f49442046524f4d204558504552494d454e54535f414c4c205748455245204944203d204e45572e455850455f4944292c0a2020202020202020204e45572e504552535f49445f4d4f4449464945522c0a2020202020202020204e45572e4d4f44494649434154494f4e5f54494d455354414d500a20202020202020293b0a20202020293b0a202020200a435245415445204f52205245504c4143452052554c4520646174617365745f6578706572696d656e745f72656d6f76655f7570646174652041530a202020204f4e2055504441544520544f20646174615f616c6c200a202020205748455245204f4c442e53414d505f4944204953204e554c4c20414e44204e45572e53414d505f4944204953204e4f54204e554c4c0a20202020444f20414c534f20280a20202020202020555044415445204558504552494d454e545f52454c4154494f4e53484950535f484953544f5259205345542056414c49445f554e54494c5f54494d455354414d50203d204e45572e4d4f44494649434154494f4e5f54494d455354414d500a2020202020202020205748455245204d41494e5f455850455f4944203d204f4c442e455850455f494420414e4420444154415f4944203d204f4c442e494420414e442056414c49445f554e54494c5f54494d455354414d50204953204e554c4c3b0a2020202020202055504441544520444154415f5345545f52454c4154494f4e53484950535f484953544f5259205345542056414c49445f554e54494c5f54494d455354414d50203d204e45572e4d4f44494649434154494f4e5f54494d455354414d50200a2020202020202020205748455245204d41494e5f444154415f4944203d204f4c442e494420414e4420455850455f4944203d204f4c442e455850455f494420414e442056414c49445f554e54494c5f54494d455354414d50204953204e554c4c3b0a20202020293b0a202020200a435245415445204f52205245504c4143452052554c4520646174617365745f6578706572696d656e745f696e736572742041530a202020204f4e20494e5345525420544f20646174615f616c6c200a202020205748455245204e45572e455850455f4944204953204e4f54204e554c4c20414e44204e45572e53414d505f4944204953204e554c4c0a20202020202020444f20414c534f20280a20202020202020494e5345525420494e544f204558504552494d454e545f52454c4154494f4e53484950535f484953544f525920280a20202020202020202049442c200a2020202020202020204d41494e5f455850455f49442c0a20202020202020202052454c4154494f4e5f545950452c200a202020202020202020444154415f49442c200a202020202020202020454e544954595f5045524d5f49442c0a202020202020202020504552535f49445f415554484f522c0a20202020202020202056414c49445f46524f4d5f54494d455354414d500a20202020202020292056414c55455320280a2020202020202020206e65787476616c28274558504552494d454e545f52454c4154494f4e53484950535f484953544f52595f49445f53455127292c200a2020202020202020204e45572e455850455f49442c200a202020202020202020274f574e4552272c200a2020202020202020204e45572e49442c200a2020202020202020204e45572e434f44452c0a2020202020202020204e45572e504552535f49445f4d4f4449464945522c0a2020202020202020204e45572e4d4f44494649434154494f4e5f54494d455354414d500a20202020202020293b0a20202020202020494e5345525420494e544f20444154415f5345545f52454c4154494f4e53484950535f484953544f525920280a20202020202020202049442c200a2020202020202020204d41494e5f444154415f49442c0a20202020202020202052454c4154494f4e5f545950452c200a202020202020202020455850455f49442c200a202020202020202020454e544954595f5045524d5f49442c0a202020202020202020504552535f49445f415554484f522c0a20202020202020202056414c49445f46524f4d5f54494d455354414d500a20202020202020292056414c55455320280a2020202020202020206e65787476616c2827444154415f5345545f52454c4154494f4e53484950535f484953544f52595f49445f53455127292c200a2020202020202020204e45572e49442c200a202020202020202020274f574e4544272c200a2020202020202020204e45572e455850455f49442c200a2020202020202020202853454c454354205045524d5f49442046524f4d204558504552494d454e54535f414c4c205748455245204944203d204e45572e455850455f4944292c0a2020202020202020204e45572e504552535f49445f4d4f4449464945522c0a2020202020202020204e45572e4d4f44494649434154494f4e5f54494d455354414d500a20202020202020293b0a202020293b0a2020200a435245415445204f52205245504c4143452052554c4520646174617365745f6578706572696d656e745f64656c6574652041530a202020204f4e2044454c45544520544f20646174615f616c6c200a202020205748455245204f4c442e455850455f4944204953204e4f54204e554c4c20414e44204f4c442e53414d505f4944204953204e554c4c0a20202020202020444f20414c534f200a20202020202020555044415445204558504552494d454e545f52454c4154494f4e53484950535f484953544f5259205345542056414c49445f554e54494c5f54494d455354414d50203d2063757272656e745f74696d657374616d70200a2020202020202020205748455245204d41494e5f455850455f4944203d204f4c442e455850455f494420414e4420444154415f4944203d204f4c442e494420414e442056414c49445f554e54494c5f54494d455354414d50204953204e554c4c3b0a0a2d2d2064617461736574202d3e2073616d706c650a0a435245415445204f52205245504c4143452052554c4520646174617365745f73616d706c655f7570646174652041530a202020204f4e2055504441544520544f20646174615f616c6c200a20202020574845524520284f4c442e53414d505f494420213d204e45572e53414d505f4944204f52204f4c442e53414d505f4944204953204e554c4c2920414e44204e45572e53414d505f4944204953204e4f54204e554c4c0a20202020444f20414c534f20280a202020202020205550444154452053414d504c455f52454c4154494f4e53484950535f484953544f5259205345542056414c49445f554e54494c5f54494d455354414d50203d204e45572e4d4f44494649434154494f4e5f54494d455354414d500a2020202020202020205748455245204d41494e5f53414d505f4944203d204f4c442e53414d505f494420414e4420444154415f4944203d204f4c442e494420414e442056414c49445f554e54494c5f54494d455354414d50204953204e554c4c3b0a20202020202020494e5345525420494e544f2053414d504c455f52454c4154494f4e53484950535f484953544f525920280a20202020202020202049442c200a2020202020202020204d41494e5f53414d505f49442c0a20202020202020202052454c4154494f4e5f545950452c200a202020202020202020444154415f49442c200a202020202020202020454e544954595f5045524d5f49442c0a202020202020202020504552535f49445f415554484f522c0a20202020202020202056414c49445f46524f4d5f54494d455354414d500a20202020202020292056414c55455320280a2020202020202020206e65787476616c282753414d504c455f52454c4154494f4e53484950535f484953544f52595f49445f53455127292c200a2020202020202020204e45572e53414d505f49442c200a202020202020202020274f574e4552272c200a2020202020202020204e45572e49442c200a2020202020202020204e45572e434f44452c0a2020202020202020204e45572e504552535f49445f4d4f4449464945522c0a2020202020202020204e45572e4d4f44494649434154494f4e5f54494d455354414d500a20202020202020293b0a2020202020202055504441544520444154415f5345545f52454c4154494f4e53484950535f484953544f5259205345542056414c49445f554e54494c5f54494d455354414d50203d204e45572e4d4f44494649434154494f4e5f54494d455354414d50200a202020202020202020574845524520284d41494e5f444154415f4944203d204f4c442e494420414e442053414d505f4944203d204f4c442e53414d505f494420414e442056414c49445f554e54494c5f54494d455354414d50204953204e554c4c293b0a20202020202020494e5345525420494e544f20444154415f5345545f52454c4154494f4e53484950535f484953544f525920280a20202020202020202049442c200a2020202020202020204d41494e5f444154415f49442c0a20202020202020202052454c4154494f4e5f545950452c200a20202020202020202053414d505f49442c200a202020202020202020454e544954595f5045524d5f49442c0a202020202020202020504552535f49445f415554484f522c0a20202020202020202056414c49445f46524f4d5f54494d455354414d500a20202020202020292056414c55455320280a2020202020202020206e65787476616c2827444154415f5345545f52454c4154494f4e53484950535f484953544f52595f49445f53455127292c200a2020202020202020204e45572e49442c200a202020202020202020274f574e4544272c200a2020202020202020204e45572e53414d505f49442c200a2020202020202020202853454c454354205045524d5f49442046524f4d2053414d504c45535f414c4c205748455245204944203d204e45572e53414d505f4944292c0a2020202020202020204e45572e504552535f49445f4d4f4449464945522c0a2020202020202020204e45572e4d4f44494649434154494f4e5f54494d455354414d500a20202020202020293b0a20202020293b0a202020200a435245415445204f52205245504c4143452052554c4520646174617365745f73616d706c655f72656d6f76655f7570646174652041530a202020204f4e2055504441544520544f20646174615f616c6c200a202020205748455245204f4c442e53414d505f4944204953204e4f54204e554c4c20414e44204e45572e53414d505f4944204953204e554c4c0a20202020444f20414c534f20280a202020202020205550444154452053414d504c455f52454c4154494f4e53484950535f484953544f5259205345542056414c49445f554e54494c5f54494d455354414d50203d204e45572e4d4f44494649434154494f4e5f54494d455354414d500a2020202020202020205748455245204d41494e5f53414d505f4944203d204f4c442e53414d505f494420414e4420444154415f4944203d204f4c442e494420414e442056414c49445f554e54494c5f54494d455354414d50204953204e554c4c3b0a2020202020202055504441544520444154415f5345545f52454c4154494f4e53484950535f484953544f5259205345542056414c49445f554e54494c5f54494d455354414d50203d204e45572e4d4f44494649434154494f4e5f54494d455354414d50200a2020202020202020205748455245204d41494e5f444154415f4944203d204f4c442e494420414e442053414d505f4944203d204f4c442e53414d505f494420414e442056414c49445f554e54494c5f54494d455354414d50204953204e554c4c3b0a20202020293b0a202020200a435245415445204f52205245504c4143452052554c4520646174617365745f73616d706c655f696e736572742041530a202020204f4e20494e5345525420544f20646174615f616c6c200a202020205748455245204e45572e53414d505f4944204953204e4f54204e554c4c0a20202020202020444f20414c534f20280a20202020202020494e5345525420494e544f2053414d504c455f52454c4154494f4e53484950535f484953544f525920280a20202020202020202049442c200a2020202020202020204d41494e5f53414d505f49442c0a20202020202020202052454c4154494f4e5f545950452c200a202020202020202020444154415f49442c200a202020202020202020454e544954595f5045524d5f49442c0a202020202020202020504552535f49445f415554484f522c0a20202020202020202056414c49445f46524f4d5f54494d455354414d500a20202020202020292056414c55455320280a2020202020202020206e65787476616c282753414d504c455f52454c4154494f4e53484950535f484953544f52595f49445f53455127292c200a2020202020202020204e45572e53414d505f49442c200a202020202020202020274f574e4552272c200a2020202020202020204e45572e49442c200a2020202020202020204e45572e434f44452c0a2020202020202020204e45572e504552535f49445f4d4f4449464945522c0a2020202020202020204e45572e4d4f44494649434154494f4e5f54494d455354414d500a20202020202020293b0a20202020202020494e5345525420494e544f20444154415f5345545f52454c4154494f4e53484950535f484953544f525920280a20202020202020202049442c200a2020202020202020204d41494e5f444154415f49442c0a20202020202020202052454c4154494f4e5f545950452c200a20202020202020202053414d505f49442c200a202020202020202020454e544954595f5045524d5f49442c0a202020202020202020504552535f49445f415554484f522c0a20202020202020202056414c49445f46524f4d5f54494d455354414d500a20202020202020292056414c55455320280a2020202020202020206e65787476616c2827444154415f5345545f52454c4154494f4e53484950535f484953544f52595f49445f53455127292c200a2020202020202020204e45572e49442c200a202020202020202020274f574e4544272c200a2020202020202020204e45572e53414d505f49442c200a2020202020202020202853454c454354205045524d5f49442046524f4d2053414d504c45535f414c4c205748455245204944203d204e45572e53414d505f4944292c0a2020202020202020204e45572e504552535f49445f4d4f4449464945522c0a2020202020202020204e45572e4d4f44494649434154494f4e5f54494d455354414d500a20202020202020293b0a202020293b0a2020200a435245415445204f52205245504c4143452052554c4520646174617365745f73616d706c655f64656c6574652041530a202020204f4e2044454c45544520544f20646174615f616c6c200a202020205748455245204f4c442e53414d505f4944204953204e4f54204e554c4c0a20202020202020444f20414c534f200a202020202020205550444154452053414d504c455f52454c4154494f4e53484950535f484953544f5259205345542056414c49445f554e54494c5f54494d455354414d50203d2063757272656e745f74696d657374616d70200a2020202020202020205748455245204d41494e5f53414d505f4944203d204f4c442e53414d505f494420414e4420444154415f4944203d204f4c442e494420414e442056414c49445f554e54494c5f54494d455354414d50204953204e554c4c3b0a0a2d2d206461746173657420636f6e7461696e65720a0a435245415445204f52205245504c4143452052554c4520646174617365745f636f6e7461696e65725f7570646174652041530a202020204f4e2055504441544520544f20646174615f616c6c200a20202020574845524520284f4c442e43544e525f494420213d204e45572e43544e525f4944204f52204f4c442e43544e525f4944204953204e554c4c2920414e44204e45572e43544e525f4944204953204e4f54204e554c4c0a20202020444f20414c534f20280a2020202020202055504441544520444154415f5345545f52454c4154494f4e53484950535f484953544f5259205345542056414c49445f554e54494c5f54494d455354414d50203d204e45572e4d4f44494649434154494f4e5f54494d455354414d50200a202020202020202020574845524520284d41494e5f444154415f4944203d204f4c442e43544e525f494420414e4420444154415f4944203d204f4c442e494420414e442056414c49445f554e54494c5f54494d455354414d50204953204e554c4c20414e442052454c4154494f4e5f54595045203d2027434f4e5441494e455227290a20202020202020202020204f5220284d41494e5f444154415f4944203d204f4c442e494420414e4420444154415f4944203d204f4c442e43544e525f494420414e442056414c49445f554e54494c5f54494d455354414d50204953204e554c4c20414e442052454c4154494f4e5f54595045203d2027434f4e5441494e454427293b0a20202020202020494e5345525420494e544f20444154415f5345545f52454c4154494f4e53484950535f484953544f525920280a20202020202020202049442c200a2020202020202020204d41494e5f444154415f49442c0a20202020202020202052454c4154494f4e5f545950452c200a202020202020202020444154415f49442c200a202020202020202020454e544954595f5045524d5f49442c0a202020202020202020504552535f49445f415554484f522c0a20202020202020202056414c49445f46524f4d5f54494d455354414d500a20202020202020292056414c55455320280a2020202020202020206e65787476616c2827444154415f5345545f52454c4154494f4e53484950535f484953544f52595f49445f53455127292c200a2020202020202020204e45572e43544e525f49442c200a20202020202020202027434f4e5441494e4552272c200a2020202020202020204e45572e49442c200a2020202020202020204e45572e434f44452c0a2020202020202020204e45572e504552535f49445f4d4f4449464945522c0a2020202020202020204e45572e4d4f44494649434154494f4e5f54494d455354414d500a20202020202020293b0a20202020202020494e5345525420494e544f20444154415f5345545f52454c4154494f4e53484950535f484953544f525920280a20202020202020202049442c200a2020202020202020204d41494e5f444154415f49442c0a20202020202020202052454c4154494f4e5f545950452c200a202020202020202020444154415f49442c200a202020202020202020454e544954595f5045524d5f49442c0a202020202020202020504552535f49445f415554484f522c0a20202020202020202056414c49445f46524f4d5f54494d455354414d500a20202020202020292056414c55455320280a2020202020202020206e65787476616c2827444154415f5345545f52454c4154494f4e53484950535f484953544f52595f49445f53455127292c200a2020202020202020204e45572e49442c200a20202020202020202027434f4e5441494e4544272c200a2020202020202020204e45572e43544e525f49442c200a2020202020202020202853454c45435420434f44452046524f4d20646174615f616c6c205748455245204944203d204e45572e43544e525f4944292c0a2020202020202020204e45572e504552535f49445f4d4f4449464945522c0a2020202020202020204e45572e4d4f44494649434154494f4e5f54494d455354414d500a20202020202020293b0a20202020293b0a202020200a435245415445204f52205245504c4143452052554c4520646174615f636f6e7461696e65725f72656d6f76655f7570646174652041530a202020204f4e2055504441544520544f20646174615f616c6c200a202020205748455245204f4c442e43544e525f4944204953204e4f54204e554c4c20414e44204e45572e43544e525f4944204953204e554c4c0a20202020444f20414c534f20280a2020202020202055504441544520444154415f5345545f52454c4154494f4e53484950535f484953544f5259205345542056414c49445f554e54494c5f54494d455354414d50203d204e45572e4d4f44494649434154494f4e5f54494d455354414d50200a202020202020202020574845524520284d41494e5f444154415f4944203d204f4c442e43544e525f494420414e4420444154415f4944203d204f4c442e494420414e442056414c49445f554e54494c5f54494d455354414d50204953204e554c4c20414e442052454c4154494f4e5f54595045203d2027434f4e5441494e455227290a20202020202020202020204f5220284d41494e5f444154415f4944203d204f4c442e494420414e4420444154415f4944203d204f4c442e43544e525f494420414e442056414c49445f554e54494c5f54494d455354414d50204953204e554c4c20414e442052454c4154494f4e5f54595045203d2027434f4e5441494e454427293b0a20202020293b0a202020200a435245415445204f52205245504c4143452052554c4520646174615f636f6e7461696e65725f696e736572742041530a202020204f4e20494e5345525420544f20646174615f616c6c200a202020205748455245204e45572e43544e525f4944204953204e4f54204e554c4c0a20202020202020444f20414c534f20280a20202020202020494e5345525420494e544f20444154415f5345545f52454c4154494f4e53484950535f484953544f525920280a20202020202020202049442c200a2020202020202020204d41494e5f444154415f49442c0a20202020202020202052454c4154494f4e5f545950452c200a202020202020202020444154415f49442c200a202020202020202020454e544954595f5045524d5f49442c0a202020202020202020504552535f49445f415554484f522c0a20202020202020202056414c49445f46524f4d5f54494d455354414d500a20202020202020292056414c55455320280a2020202020202020206e65787476616c2827444154415f5345545f52454c4154494f4e53484950535f484953544f52595f49445f53455127292c200a2020202020202020204e45572e43544e525f49442c200a20202020202020202027434f4e5441494e4552272c200a2020202020202020204e45572e49442c200a2020202020202020204e45572e434f44452c0a2020202020202020204e45572e504552535f49445f4d4f4449464945522c0a2020202020202020204e45572e4d4f44494649434154494f4e5f54494d455354414d500a20202020202020293b0a20202020202020494e5345525420494e544f20444154415f5345545f52454c4154494f4e53484950535f484953544f525920280a20202020202020202049442c200a2020202020202020204d41494e5f444154415f49442c0a20202020202020202052454c4154494f4e5f545950452c200a202020202020202020444154415f49442c200a202020202020202020454e544954595f5045524d5f49442c0a202020202020202020504552535f49445f415554484f522c0a20202020202020202056414c49445f46524f4d5f54494d455354414d500a20202020202020292056414c55455320280a2020202020202020206e65787476616c2827444154415f5345545f52454c4154494f4e53484950535f484953544f52595f49445f53455127292c200a2020202020202020204e45572e49442c200a20202020202020202027434f4e5441494e4544272c200a2020202020202020204e45572e43544e525f49442c200a2020202020202020202853454c45435420434f44452046524f4d20646174615f616c6c205748455245204944203d204e45572e43544e525f4944292c0a2020202020202020204e45572e504552535f49445f4d4f4449464945522c0a2020202020202020204e45572e4d4f44494649434154494f4e5f54494d455354414d500a20202020202020293b0a202020293b0a2020200a435245415445204f52205245504c4143452052554c4520646174615f636f6e7461696e65725f64656c6574652041530a202020204f4e2044454c45544520544f20646174615f616c6c200a202020205748455245204f4c442e43544e525f4944204953204e4f54204e554c4c0a20202020202020444f20414c534f200a2020202020202055504441544520444154415f5345545f52454c4154494f4e53484950535f484953544f5259205345542056414c49445f554e54494c5f54494d455354414d50203d2063757272656e745f74696d657374616d70200a2020202020202020205748455245204d41494e5f444154415f4944203d204f4c442e43544e525f494420414e4420444154415f4944203d204f4c442e494420414e442056414c49445f554e54494c5f54494d455354414d50204953204e554c4c20414e442052454c4154494f4e5f54595045203d2027434f4e5441494e4552273b0a0a2d2d206461746173657420706172656e742d6368696c642072656c6174696f6e736869700a2020202020202020200a435245415445204f52205245504c4143452052554c4520646174615f706172656e745f6368696c645f696e736572742041530a202020204f4e20494e5345525420544f20646174615f7365745f72656c6174696f6e73686970735f616c6c0a202020205748455245204e45572e44454c5f4944204953204e554c4c0a20202020202020444f20414c534f20280a202020202020202020494e5345525420494e544f20444154415f5345545f52454c4154494f4e53484950535f484953544f525920280a202020202020202020202049442c200a20202020202020202020204d41494e5f444154415f49442c0a202020202020202020202052454c4154494f4e5f545950452c200a2020202020202020202020444154415f49442c200a2020202020202020202020454e544954595f5045524d5f49442c0a2020202020202020202020504552535f49445f415554484f522c0a202020202020202020202056414c49445f46524f4d5f54494d455354414d500a202020202020202020292056414c55455320280a20202020202020202020206e65787476616c2827444154415f5345545f52454c4154494f4e53484950535f484953544f52595f49445f53455127292c200a20202020202020202020204e45572e444154415f49445f504152454e542c200a202020202020202020202027504152454e54272c200a20202020202020202020204e45572e444154415f49445f4348494c442c200a20202020202020202020202853454c45435420434f44452046524f4d20646174615f616c6c205748455245204944203d204e45572e444154415f49445f4348494c44292c0a20202020202020202020204e45572e504552535f49445f415554484f522c0a20202020202020202020204e45572e4d4f44494649434154494f4e5f54494d455354414d500a202020202020202020293b0a202020202020202020494e5345525420494e544f20444154415f5345545f52454c4154494f4e53484950535f484953544f525920280a202020202020202020202049442c200a20202020202020202020204d41494e5f444154415f49442c0a202020202020202020202052454c4154494f4e5f545950452c200a2020202020202020202020444154415f49442c200a2020202020202020202020454e544954595f5045524d5f49442c0a2020202020202020202020504552535f49445f415554484f522c0a202020202020202020202056414c49445f46524f4d5f54494d455354414d500a202020202020202020292056414c55455320280a20202020202020202020206e65787476616c2827444154415f5345545f52454c4154494f4e53484950535f484953544f52595f49445f53455127292c200a20202020202020202020204e45572e444154415f49445f4348494c442c200a2020202020202020202020274348494c44272c200a20202020202020202020204e45572e444154415f49445f504152454e542c200a20202020202020202020202853454c45435420434f44452046524f4d20646174615f616c6c205748455245204944203d204e45572e444154415f49445f504152454e54292c0a20202020202020202020204e45572e504552535f49445f415554484f522c0a20202020202020202020204e45572e4d4f44494649434154494f4e5f54494d455354414d500a202020202020202020293b0a20202020202020293b0a0a435245415445204f52205245504c4143452052554c4520646174615f706172656e745f6368696c645f64656c6574652041530a202020204f4e2044454c45544520544f20646174615f7365745f72656c6174696f6e73686970735f616c6c0a202020205748455245204f4c442e44454c5f4944204953204e554c4c0a20202020202020444f20414c534f20280a20202020202020202055504441544520444154415f5345545f52454c4154494f4e53484950535f484953544f5259205345542056414c49445f554e54494c5f54494d455354414d50203d2063757272656e745f74696d657374616d700a2020202020202020202020574845524520284d41494e5f444154415f4944203d204f4c442e444154415f49445f504152454e5420414e4420444154415f4944203d204f4c442e444154415f49445f4348494c4420414e442056414c49445f554e54494c5f54494d455354414d50204953204e554c4c290a202020202020202020202020204f5220284d41494e5f444154415f4944203d204f4c442e444154415f49445f4348494c4420414e4420444154415f4944203d204f4c442e444154415f49445f504152454e5420414e442056414c49445f554e54494c5f54494d455354414d50204953204e554c4c293b0a20202020202020293b0a202020202020200a435245415445204f52205245504c4143452052554c4520646174615f706172656e745f6368696c645f7570646174652041530a202020204f4e2055504441544520544f20646174615f7365745f72656c6174696f6e73686970735f616c6c0a202020205748455245204e45572e44454c5f4944204953204e4f54204e554c4c20414e44204f4c442e44454c5f4944204953204e554c4c0a20202020202020444f20414c534f20280a20202020202020202055504441544520444154415f5345545f52454c4154494f4e53484950535f484953544f5259205345542056414c49445f554e54494c5f54494d455354414d50203d2063757272656e745f74696d657374616d700a2020202020202020202020574845524520284d41494e5f444154415f4944203d204f4c442e444154415f49445f504152454e5420414e4420444154415f4944203d204f4c442e444154415f49445f4348494c4420414e442056414c49445f554e54494c5f54494d455354414d50204953204e554c4c290a202020202020202020202020204f5220284d41494e5f444154415f4944203d204f4c442e444154415f49445f4348494c4420414e4420444154415f4944203d204f4c442e444154415f49445f504152454e5420414e442056414c49445f554e54494c5f54494d455354414d50204953204e554c4c293b0a20202020202020293b0a202020202020200a435245415445204f52205245504c4143452052554c4520646174615f706172656e745f6368696c645f7265766572745f7570646174652041530a202020204f4e2055504441544520544f20646174615f7365745f72656c6174696f6e73686970735f616c6c0a202020205748455245204f4c442e44454c5f4944204953204e4f54204e554c4c20414e44204e45572e44454c5f4944204953204e554c4c0a20202020202020444f20414c534f20280a202020202020202020494e5345525420494e544f20444154415f5345545f52454c4154494f4e53484950535f484953544f525920280a202020202020202020202049442c200a20202020202020202020204d41494e5f444154415f49442c0a202020202020202020202052454c4154494f4e5f545950452c200a2020202020202020202020444154415f49442c200a2020202020202020202020454e544954595f5045524d5f49442c0a2020202020202020202020504552535f49445f415554484f522c0a202020202020202020202056414c49445f46524f4d5f54494d455354414d500a202020202020202020292056414c55455320280a20202020202020202020206e65787476616c2827444154415f5345545f52454c4154494f4e53484950535f484953544f52595f49445f53455127292c200a20202020202020202020204e45572e444154415f49445f504152454e542c200a202020202020202020202027504152454e54272c200a20202020202020202020204e45572e444154415f49445f4348494c442c200a20202020202020202020202853454c45435420434f44452046524f4d20646174615f616c6c205748455245204944203d204e45572e444154415f49445f4348494c44292c0a20202020202020202020204e45572e504552535f49445f415554484f522c0a20202020202020202020204e45572e4d4f44494649434154494f4e5f54494d455354414d500a202020202020202020293b0a202020202020202020494e5345525420494e544f20444154415f5345545f52454c4154494f4e53484950535f484953544f525920280a202020202020202020202049442c200a20202020202020202020204d41494e5f444154415f49442c0a202020202020202020202052454c4154494f4e5f545950452c200a2020202020202020202020444154415f49442c200a2020202020202020202020454e544954595f5045524d5f49442c0a2020202020202020202020504552535f49445f415554484f522c0a202020202020202020202056414c49445f46524f4d5f54494d455354414d500a202020202020202020292056414c55455320280a20202020202020202020206e65787476616c2827444154415f5345545f52454c4154494f4e53484950535f484953544f52595f49445f53455127292c200a20202020202020202020204e45572e444154415f49445f4348494c442c200a2020202020202020202020274348494c44272c200a20202020202020202020204e45572e444154415f49445f504152454e542c200a20202020202020202020202853454c45435420434f44452046524f4d20646174615f616c6c205748455245204944203d204e45572e444154415f49445f504152454e54292c0a20202020202020202020204e45572e504552535f49445f415554484f522c0a20202020202020202020204e45572e4d4f44494649434154494f4e5f54494d455354414d500a202020202020202020293b0a20202020202020293b0a0a2d2d2073616d706c657320706172656e742d6368696c642072656c6174696f6e736869700a0a435245415445204f52205245504c4143452052554c452073616d706c655f706172656e745f6368696c645f696e736572742041530a202020204f4e20494e5345525420544f2073616d706c655f72656c6174696f6e73686970735f616c6c0a202020205748455245204e45572e44454c5f4944204953204e554c4c0a20202020202020444f20414c534f20280a202020202020202020494e5345525420494e544f2053414d504c455f52454c4154494f4e53484950535f484953544f525920280a202020202020202020202049442c200a20202020202020202020204d41494e5f53414d505f49442c0a202020202020202020202052454c4154494f4e5f545950452c200a202020202020202020202053414d505f49442c200a2020202020202020202020454e544954595f5045524d5f49442c0a2020202020202020202020504552535f49445f415554484f522c0a202020202020202020202056414c49445f46524f4d5f54494d455354414d500a202020202020202020292056414c55455320280a20202020202020202020206e65787476616c282753414d504c455f52454c4154494f4e53484950535f484953544f52595f49445f53455127292c200a20202020202020202020204e45572e53414d504c455f49445f504152454e542c200a202020202020202020202027504152454e54272c200a20202020202020202020204e45572e53414d504c455f49445f4348494c442c200a20202020202020202020202853454c454354205045524d5f49442046524f4d2073616d706c65735f616c6c205748455245204944203d204e45572e53414d504c455f49445f4348494c44292c0a20202020202020202020204e45572e504552535f49445f415554484f522c0a20202020202020202020204e45572e4d4f44494649434154494f4e5f54494d455354414d500a202020202020202020293b0a202020202020202020494e5345525420494e544f2053414d504c455f52454c4154494f4e53484950535f484953544f525920280a202020202020202020202049442c200a20202020202020202020204d41494e5f53414d505f49442c0a202020202020202020202052454c4154494f4e5f545950452c200a202020202020202020202053414d505f49442c200a2020202020202020202020454e544954595f5045524d5f49442c0a2020202020202020202020504552535f49445f415554484f522c0a202020202020202020202056414c49445f46524f4d5f54494d455354414d500a202020202020202020292056414c55455320280a20202020202020202020206e65787476616c282753414d504c455f52454c4154494f4e53484950535f484953544f52595f49445f53455127292c200a20202020202020202020204e45572e53414d504c455f49445f4348494c442c200a2020202020202020202020274348494c44272c200a20202020202020202020204e45572e53414d504c455f49445f504152454e542c200a20202020202020202020202853454c454354205045524d5f49442046524f4d2073616d706c65735f616c6c205748455245204944203d204e45572e53414d504c455f49445f504152454e54292c0a20202020202020202020204e45572e504552535f49445f415554484f522c0a20202020202020202020204e45572e4d4f44494649434154494f4e5f54494d455354414d500a202020202020202020293b0a20202020202020293b0a202020202020200a435245415445204f52205245504c4143452052554c452073616d706c655f706172656e745f6368696c645f64656c6574652041530a202020204f4e2044454c45544520544f2073616d706c655f72656c6174696f6e73686970735f616c6c0a202020205748455245204f4c442e44454c5f4944204953204e554c4c0a20202020202020444f20414c534f20280a2020202020202020205550444154452053414d504c455f52454c4154494f4e53484950535f484953544f5259205345542056414c49445f554e54494c5f54494d455354414d50203d2063757272656e745f74696d657374616d700a2020202020202020202020574845524520284d41494e5f53414d505f4944203d204f4c442e53414d504c455f49445f504152454e5420414e442053414d505f4944203d204f4c442e53414d504c455f49445f4348494c4420414e442056414c49445f554e54494c5f54494d455354414d50204953204e554c4c290a202020202020202020202020204f5220284d41494e5f53414d505f4944203d204f4c442e53414d504c455f49445f4348494c4420414e442053414d505f4944203d204f4c442e53414d504c455f49445f504152454e5420414e442056414c49445f554e54494c5f54494d455354414d50204953204e554c4c293b0a20202020202020293b0a0a435245415445204f52205245504c4143452052554c452073616d706c655f706172656e745f6368696c645f7570646174652041530a202020204f4e2055504441544520544f2073616d706c655f72656c6174696f6e73686970735f616c6c0a202020205748455245204e45572e44454c5f4944204953204e4f54204e554c4c20414e44204f4c442e44454c5f4944204953204e554c4c0a20202020202020444f20414c534f20280a2020202020202020205550444154452053414d504c455f52454c4154494f4e53484950535f484953544f5259205345542056414c49445f554e54494c5f54494d455354414d50203d2063757272656e745f74696d657374616d700a2020202020202020202020574845524520284d41494e5f53414d505f4944203d204f4c442e53414d504c455f49445f504152454e5420414e442053414d505f4944203d204f4c442e53414d504c455f49445f4348494c4420414e442056414c49445f554e54494c5f54494d455354414d50204953204e554c4c290a202020202020202020202020204f5220284d41494e5f53414d505f4944203d204f4c442e53414d504c455f49445f4348494c4420414e442053414d505f4944203d204f4c442e53414d504c455f49445f504152454e5420414e442056414c49445f554e54494c5f54494d455354414d50204953204e554c4c293b0a20202020202020293b0a0a435245415445204f52205245504c4143452052554c452073616d706c655f706172656e745f6368696c645f7265766572745f7570646174652041530a202020204f4e2055504441544520544f2073616d706c655f72656c6174696f6e73686970735f616c6c0a202020205748455245204e45572e44454c5f4944204953204e554c4c20414e44204f4c442e44454c5f4944204953204e4f54204e554c4c0a20202020202020444f20414c534f20280a202020202020202020494e5345525420494e544f2053414d504c455f52454c4154494f4e53484950535f484953544f525920280a202020202020202020202049442c200a20202020202020202020204d41494e5f53414d505f49442c0a202020202020202020202052454c4154494f4e5f545950452c200a202020202020202020202053414d505f49442c200a2020202020202020202020454e544954595f5045524d5f49442c0a2020202020202020202020504552535f49445f415554484f522c0a202020202020202020202056414c49445f46524f4d5f54494d455354414d500a202020202020202020292056414c55455320280a20202020202020202020206e65787476616c282753414d504c455f52454c4154494f4e53484950535f484953544f52595f49445f53455127292c200a20202020202020202020204e45572e53414d504c455f49445f504152454e542c200a202020202020202020202027504152454e54272c200a20202020202020202020204e45572e53414d504c455f49445f4348494c442c200a20202020202020202020202853454c454354205045524d5f49442046524f4d2073616d706c65735f616c6c205748455245204944203d204e45572e53414d504c455f49445f4348494c44292c0a20202020202020202020204e45572e504552535f49445f415554484f522c0a20202020202020202020204e45572e4d4f44494649434154494f4e5f54494d455354414d500a202020202020202020293b0a202020202020202020494e5345525420494e544f2053414d504c455f52454c4154494f4e53484950535f484953544f525920280a202020202020202020202049442c200a20202020202020202020204d41494e5f53414d505f49442c0a202020202020202020202052454c4154494f4e5f545950452c200a202020202020202020202053414d505f49442c200a2020202020202020202020454e544954595f5045524d5f49442c0a2020202020202020202020504552535f49445f415554484f522c0a202020202020202020202056414c49445f46524f4d5f54494d455354414d500a202020202020202020292056414c55455320280a20202020202020202020206e65787476616c282753414d504c455f52454c4154494f4e53484950535f484953544f52595f49445f53455127292c200a20202020202020202020204e45572e53414d504c455f49445f4348494c442c200a2020202020202020202020274348494c44272c200a20202020202020202020204e45572e53414d504c455f49445f504152454e542c200a20202020202020202020202853454c454354205045524d5f49442046524f4d2073616d706c65735f616c6c205748455245204944203d204e45572e53414d504c455f49445f504152454e54292c0a20202020202020202020204e45572e504552535f49445f415554484f522c0a20202020202020202020204e45572e4d4f44494649434154494f4e5f54494d455354414d500a202020202020202020293b0a20202020202020293b0a0a2d2d206578706572696d656e74202d3e2070726f6a6563740a0a435245415445204f52205245504c4143452052554c45206578706572696d656e745f70726f6a6563745f7570646174652041530a202020204f4e2055504441544520544f206578706572696d656e74735f616c6c200a20202020574845524520284f4c442e50524f4a5f494420213d204e45572e50524f4a5f4944204f52204f4c442e50524f4a5f4944204953204e554c4c2920414e44204e45572e50524f4a5f4944204953204e4f54204e554c4c0a20202020444f20414c534f20280a202020202020205550444154452050524f4a4543545f52454c4154494f4e53484950535f484953544f5259205345542056414c49445f554e54494c5f54494d455354414d50203d204e45572e4d4f44494649434154494f4e5f54494d455354414d500a2020202020202020205748455245204d41494e5f50524f4a5f4944203d204f4c442e50524f4a5f494420414e4420455850455f4944203d204f4c442e494420414e442056414c49445f554e54494c5f54494d455354414d50204953204e554c4c3b0a20202020202020494e5345525420494e544f2050524f4a4543545f52454c4154494f4e53484950535f484953544f525920280a20202020202020202049442c200a2020202020202020204d41494e5f50524f4a5f49442c0a20202020202020202052454c4154494f4e5f545950452c200a202020202020202020455850455f49442c200a202020202020202020454e544954595f5045524d5f49442c0a202020202020202020504552535f49445f415554484f522c0a20202020202020202056414c49445f46524f4d5f54494d455354414d500a20202020202020292056414c55455320280a2020202020202020206e65787476616c282750524f4a4543545f52454c4154494f4e53484950535f484953544f52595f49445f53455127292c200a2020202020202020204e45572e50524f4a5f49442c200a202020202020202020274f574e4552272c200a2020202020202020204e45572e49442c200a2020202020202020204e45572e5045524d5f49442c0a2020202020202020204e45572e504552535f49445f4d4f4449464945522c0a2020202020202020204e45572e4d4f44494649434154494f4e5f54494d455354414d500a20202020202020293b0a20202020202020555044415445204558504552494d454e545f52454c4154494f4e53484950535f484953544f5259205345542056414c49445f554e54494c5f54494d455354414d50203d204e45572e4d4f44494649434154494f4e5f54494d455354414d50200a2020202020202020205748455245204d41494e5f455850455f4944203d204f4c442e494420414e442050524f4a5f4944203d204f4c442e50524f4a5f494420414e442056414c49445f554e54494c5f54494d455354414d50204953204e554c4c3b0a20202020202020494e5345525420494e544f204558504552494d454e545f52454c4154494f4e53484950535f484953544f525920280a20202020202020202049442c200a2020202020202020204d41494e5f455850455f49442c0a20202020202020202052454c4154494f4e5f545950452c200a20202020202020202050524f4a5f49442c200a202020202020202020454e544954595f5045524d5f49442c0a202020202020202020504552535f49445f415554484f522c0a20202020202020202056414c49445f46524f4d5f54494d455354414d500a20202020202020292056414c55455320280a2020202020202020206e65787476616c28274558504552494d454e545f52454c4154494f4e53484950535f484953544f52595f49445f53455127292c200a2020202020202020204e45572e49442c200a202020202020202020274f574e4544272c200a2020202020202020204e45572e50524f4a5f49442c200a2020202020202020202853454c45435420434f44452046524f4d2050524f4a45435453205748455245204944203d204e45572e50524f4a5f4944292c0a2020202020202020204e45572e504552535f49445f4d4f4449464945522c0a2020202020202020204e45572e4d4f44494649434154494f4e5f54494d455354414d500a20202020202020293b0a20202020293b0a202020200a435245415445204f52205245504c4143452052554c45206578706572696d656e745f70726f6a6563745f72656d6f76655f7570646174652041530a202020204f4e2055504441544520544f206578706572696d656e74735f616c6c200a202020205748455245204f4c442e50524f4a5f4944204953204e4f54204e554c4c20414e44204e45572e50524f4a5f4944204953204e554c4c0a20202020444f20414c534f20280a202020202020205550444154452050524f4a4543545f52454c4154494f4e53484950535f484953544f5259205345542056414c49445f554e54494c5f54494d455354414d50203d204e45572e4d4f44494649434154494f4e5f54494d455354414d500a2020202020202020205748455245204d41494e5f50524f4a5f4944203d204f4c442e50524f4a5f494420414e4420455850455f4944203d204f4c442e494420414e442056414c49445f554e54494c5f54494d455354414d50204953204e554c4c3b0a20202020202020555044415445204558504552494d454e545f52454c4154494f4e53484950535f484953544f5259205345542056414c49445f554e54494c5f54494d455354414d50203d204e45572e4d4f44494649434154494f4e5f54494d455354414d50200a2020202020202020205748455245204d41494e5f455850455f4944203d204f4c442e494420414e442050524f4a5f4944203d204f4c442e50524f4a5f494420414e442056414c49445f554e54494c5f54494d455354414d50204953204e554c4c3b0a20202020293b0a202020200a435245415445204f52205245504c4143452052554c45206578706572696d656e745f70726f6a6563745f696e736572742041530a202020204f4e20494e5345525420544f206578706572696d656e74735f616c6c200a202020205748455245204e45572e50524f4a5f4944204953204e4f54204e554c4c0a20202020202020444f20414c534f20280a20202020202020494e5345525420494e544f2050524f4a4543545f52454c4154494f4e53484950535f484953544f525920280a20202020202020202049442c200a2020202020202020204d41494e5f50524f4a5f49442c0a20202020202020202052454c4154494f4e5f545950452c200a202020202020202020455850455f49442c200a202020202020202020454e544954595f5045524d5f49442c0a202020202020202020504552535f49445f415554484f522c0a20202020202020202056414c49445f46524f4d5f54494d455354414d500a20202020202020292056414c55455320280a2020202020202020206e65787476616c282750524f4a4543545f52454c4154494f4e53484950535f484953544f52595f49445f53455127292c200a2020202020202020204e45572e50524f4a5f49442c200a202020202020202020274f574e4552272c200a2020202020202020204e45572e49442c200a2020202020202020204e45572e5045524d5f49442c0a2020202020202020204e45572e504552535f49445f4d4f4449464945522c0a2020202020202020204e45572e4d4f44494649434154494f4e5f54494d455354414d500a20202020202020293b0a20202020202020494e5345525420494e544f204558504552494d454e545f52454c4154494f4e53484950535f484953544f525920280a20202020202020202049442c200a2020202020202020204d41494e5f455850455f49442c0a20202020202020202052454c4154494f4e5f545950452c200a20202020202020202050524f4a5f49442c200a202020202020202020454e544954595f5045524d5f49442c0a202020202020202020504552535f49445f415554484f522c0a20202020202020202056414c49445f46524f4d5f54494d455354414d500a20202020202020292056414c55455320280a2020202020202020206e65787476616c28274558504552494d454e545f52454c4154494f4e53484950535f484953544f52595f49445f53455127292c200a2020202020202020204e45572e49442c200a202020202020202020274f574e4544272c200a2020202020202020204e45572e50524f4a5f49442c200a2020202020202020202853454c45435420434f44452046524f4d2050524f4a45435453205748455245204944203d204e45572e50524f4a5f4944292c0a2020202020202020204e45572e504552535f49445f4d4f4449464945522c0a2020202020202020204e45572e4d4f44494649434154494f4e5f54494d455354414d500a20202020202020293b0a202020293b0a2020200a435245415445204f52205245504c4143452052554c45206578706572696d656e745f70726f6a6563745f64656c6574652041530a202020204f4e2044454c45544520544f206578706572696d656e74735f616c6c200a202020205748455245204f4c442e50524f4a5f4944204953204e4f54204e554c4c0a20202020202020444f20414c534f200a202020202020205550444154452050524f4a4543545f52454c4154494f4e53484950535f484953544f5259205345542056414c49445f554e54494c5f54494d455354414d50203d2063757272656e745f74696d657374616d70200a2020202020202020205748455245204d41494e5f50524f4a5f4944203d204f4c442e50524f4a5f494420414e4420455850455f4944203d204f4c442e494420414e442056414c49445f554e54494c5f54494d455354414d50204953204e554c4c3b0a0a2d2d2070726f6a656374202d3e2073706163650a0a435245415445204f52205245504c4143452052554c452070726f6a6563745f73706163655f7570646174652041530a202020204f4e2055504441544520544f2070726f6a65637473200a20202020574845524520284f4c442e53504143455f494420213d204e45572e53504143455f4944204f52204f4c442e53504143455f4944204953204e554c4c2920414e44204e45572e53504143455f4944204953204e4f54204e554c4c0a20202020444f20414c534f20280a202020202020205550444154452050524f4a4543545f52454c4154494f4e53484950535f484953544f5259205345542056414c49445f554e54494c5f54494d455354414d50203d204e45572e4d4f44494649434154494f4e5f54494d455354414d500a2020202020202020205748455245204d41494e5f50524f4a5f4944203d204f4c442e494420414e442053504143455f4944203d204f4c442e53504143455f494420414e442056414c49445f554e54494c5f54494d455354414d50204953204e554c4c3b0a20202020202020494e5345525420494e544f2050524f4a4543545f52454c4154494f4e53484950535f484953544f525920280a20202020202020202049442c200a2020202020202020204d41494e5f50524f4a5f49442c0a20202020202020202052454c4154494f4e5f545950452c200a20202020202020202053504143455f49442c200a202020202020202020454e544954595f5045524d5f49442c0a202020202020202020504552535f49445f415554484f522c0a20202020202020202056414c49445f46524f4d5f54494d455354414d500a20202020202020292056414c55455320280a2020202020202020206e65787476616c282750524f4a4543545f52454c4154494f4e53484950535f484953544f52595f49445f53455127292c200a2020202020202020204e45572e49442c200a202020202020202020274f574e4544272c200a2020202020202020204e45572e53504143455f49442c200a2020202020202020202853454c45435420434f44452046524f4d20535041434553205748455245204944203d204e45572e53504143455f4944292c0a2020202020202020204e45572e504552535f49445f4d4f4449464945522c0a2020202020202020204e45572e4d4f44494649434154494f4e5f54494d455354414d500a20202020202020293b0a20202020293b0a202020200a435245415445204f52205245504c4143452052554c452070726f6a6563745f73706163655f72656d6f76655f7570646174652041530a202020204f4e2055504441544520544f2070726f6a65637473200a202020205748455245204f4c442e53504143455f4944204953204e4f54204e554c4c20414e44204e45572e53504143455f4944204953204e554c4c0a20202020444f20414c534f20280a202020202020205550444154452050524f4a4543545f52454c4154494f4e53484950535f484953544f5259205345542056414c49445f554e54494c5f54494d455354414d50203d204e45572e4d4f44494649434154494f4e5f54494d455354414d500a2020202020202020205748455245204d41494e5f50524f4a5f4944203d204f4c442e494420414e442053504143455f4944203d204f4c442e53504143455f494420414e442056414c49445f554e54494c5f54494d455354414d50204953204e554c4c3b0a20202020293b0a202020200a435245415445204f52205245504c4143452052554c452070726f6a6563745f73706163655f696e736572742041530a202020204f4e20494e5345525420544f2070726f6a65637473200a202020205748455245204e45572e53504143455f4944204953204e4f54204e554c4c0a20202020202020444f20414c534f20280a20202020202020494e5345525420494e544f2050524f4a4543545f52454c4154494f4e53484950535f484953544f525920280a20202020202020202049442c200a2020202020202020204d41494e5f50524f4a5f49442c0a20202020202020202052454c4154494f4e5f545950452c200a20202020202020202053504143455f49442c200a202020202020202020454e544954595f5045524d5f49442c0a202020202020202020504552535f49445f415554484f522c0a20202020202020202056414c49445f46524f4d5f54494d455354414d500a20202020202020292056414c55455320280a2020202020202020206e65787476616c282750524f4a4543545f52454c4154494f4e53484950535f484953544f52595f49445f53455127292c200a2020202020202020204e45572e49442c200a202020202020202020274f574e4544272c200a2020202020202020204e45572e53504143455f49442c200a2020202020202020202853454c45435420434f44452046524f4d20535041434553205748455245204944203d204e45572e53504143455f4944292c0a2020202020202020204e45572e504552535f49445f4d4f4449464945522c0a2020202020202020204e45572e4d4f44494649434154494f4e5f54494d455354414d500a20202020202020293b0a202020293b0a0a2d2d2073616d706c65202d3e2073706163650a0a435245415445204f52205245504c4143452052554c452073616d706c655f73706163655f7570646174652041530a202020204f4e2055504441544520544f2073616d706c65735f616c6c200a20202020574845524520284f4c442e53504143455f494420213d204e45572e53504143455f4944204f52204f4c442e53504143455f4944204953204e554c4c204f52204f4c442e455850455f4944204953204e4f54204e554c4c2920414e44204e45572e53504143455f4944204953204e4f54204e554c4c20414e44204e45572e455850455f4944204953204e554c4c0a20202020444f20414c534f20280a202020202020205550444154452053414d504c455f52454c4154494f4e53484950535f484953544f5259205345542056414c49445f554e54494c5f54494d455354414d50203d204e45572e4d4f44494649434154494f4e5f54494d455354414d50200a2020202020202020205748455245204d41494e5f53414d505f4944203d204f4c442e494420414e442053504143455f4944203d204f4c442e53504143455f494420414e442056414c49445f554e54494c5f54494d455354414d50204953204e554c4c3b0a20202020202020494e5345525420494e544f2053414d504c455f52454c4154494f4e53484950535f484953544f525920280a20202020202020202049442c200a2020202020202020204d41494e5f53414d505f49442c0a20202020202020202052454c4154494f4e5f545950452c200a20202020202020202053504143455f49442c200a202020202020202020454e544954595f5045524d5f49442c0a202020202020202020504552535f49445f415554484f522c0a20202020202020202056414c49445f46524f4d5f54494d455354414d500a20202020202020292056414c55455320280a2020202020202020206e65787476616c282753414d504c455f52454c4154494f4e53484950535f484953544f52595f49445f53455127292c200a2020202020202020204e45572e49442c200a202020202020202020274f574e4544272c200a2020202020202020204e45572e53504143455f49442c200a2020202020202020202853454c45435420434f44452046524f4d20535041434553205748455245204944203d204e45572e53504143455f4944292c0a2020202020202020204e45572e504552535f49445f4d4f4449464945522c0a2020202020202020204e45572e4d4f44494649434154494f4e5f54494d455354414d500a20202020202020293b0a20202020293b0a202020200a435245415445204f52205245504c4143452052554c452073616d706c655f73706163655f72656d6f76655f7570646174652041530a202020204f4e2055504441544520544f2073616d706c65735f616c6c200a202020205748455245204f4c442e53504143455f4944204953204e4f54204e554c4c20414e4420284e45572e53504143455f4944204953204e554c4c204f5220284f4c442e455850455f4944204953204e554c4c20414e44204e45572e455850455f4944204953204e4f54204e554c4c29290a20202020444f20414c534f20280a202020202020205550444154452053414d504c455f52454c4154494f4e53484950535f484953544f5259205345542056414c49445f554e54494c5f54494d455354414d50203d204e45572e4d4f44494649434154494f4e5f54494d455354414d50200a2020202020202020205748455245204d41494e5f53414d505f4944203d204f4c442e494420414e442053504143455f4944203d204f4c442e53504143455f494420414e442056414c49445f554e54494c5f54494d455354414d50204953204e554c4c3b0a20202020293b0a202020200a435245415445204f52205245504c4143452052554c452073616d706c655f73706163655f696e736572742041530a202020204f4e20494e5345525420544f2073616d706c65735f616c6c200a202020205748455245204e45572e455850455f4944204953204e554c4c20414e44204e45572e53504143455f4944204953204e4f54204e554c4c0a20202020444f20414c534f20280a202020202020494e5345525420494e544f2053414d504c455f52454c4154494f4e53484950535f484953544f525920280a20202020202020202049442c200a2020202020202020204d41494e5f53414d505f49442c0a20202020202020202052454c4154494f4e5f545950452c200a20202020202020202053504143455f49442c200a202020202020202020454e544954595f5045524d5f49442c0a202020202020202020504552535f49445f415554484f522c0a20202020202020202056414c49445f46524f4d5f54494d455354414d500a20202020202020292056414c55455320280a2020202020202020206e65787476616c282753414d504c455f52454c4154494f4e53484950535f484953544f52595f49445f53455127292c200a2020202020202020204e45572e49442c200a202020202020202020274f574e4544272c200a2020202020202020204e45572e53504143455f49442c200a2020202020202020202853454c45435420434f44452046524f4d20535041434553205748455245204944203d204e45572e53504143455f4944292c0a2020202020202020204e45572e504552535f49445f4d4f4449464945522c0a2020202020202020204e45572e4d4f44494649434154494f4e5f54494d455354414d500a20202020202020293b0a202020293b0a2d2d20656e64206f662072756c657320666f722072656c6174696f6e736869707320686973746f72790a \N @@ -3908,6 +3979,7 @@ COPY database_version_logs (db_version, module_name, run_status, run_status_time 144 ../../../../openbis/source/sql/postgresql/migration/migration-143-144.sql SUCCESS 2015-09-04 10:05:23.688 \\x2d2d0a2d2d204c696e6b204461746120536574204578706572696d656e74206e6f206c6f6e676572206d616e6461746f72792e20446174612053657473206c696e6b20746f20616e204578706572696d656e74206f7220612053616d706c652077697468205370616365200a2d2d0a0a414c544552205441424c4520444154415f414c4c20414c54455220434f4c554d4e20455850455f49442044524f50204e4f54204e554c4c3b0a414c544552205441424c4520444154415f414c4c2041444420434f4e53545241494e5420444154415f434b20434845434b2028455850455f4944204953204e4f54204e554c4c204f522053414d505f4944204953204e4f54204e554c4c293b0a0a435245415445204f52205245504c4143452046554e4354494f4e20636865636b5f637265617465645f6f725f6d6f6469666965645f646174615f7365745f6f776e65725f69735f616c69766528292052455455524e5320747269676765722041532024240a4445434c4152450a20206f776e65725f636f64652020434f44453b0a20206f776e65725f64656c5f69642020544543485f49443b0a424547494e0a2020494620284e45572e64656c5f6964204953204e4f54204e554c4c29205448454e0a2020202052455455524e204e45573b0a2020454e442049463b0a0a20202d2d20636865636b2073616d706c650a2020494620284e45572e73616d705f6964204953204e4f54204e554c4c29205448454e0a2020202053454c4543542064656c5f69642c20636f646520494e544f206f776e65725f64656c5f69642c206f776e65725f636f64650a20202020202046524f4d2073616d706c6573200a2020202020205748455245206964203d204e45572e73616d705f69643b0a20202020494620286f776e65725f64656c5f6964204953204e4f54204e554c4c29205448454e200a202020202020524149534520455843455054494f4e202744617461205365742028436f64653a2025292063616e6e6f7420626520636f6e6e656374656420746f20612053616d706c652028436f64653a20252920252e272c200a202020202020202020202020202020202020202020204e45572e636f64652c206f776e65725f636f64652c2064656c6574696f6e5f6465736372697074696f6e286f776e65725f64656c5f6964293b0a20202020454e442049463b0a2020454e442049463b0a20202d2d20636865636b206578706572696d656e740a2020494620284e45572e657870655f6964204953204e4f54204e554c4c29205448454e0a2020202053454c4543542064656c5f69642c20636f646520494e544f206f776e65725f64656c5f69642c206f776e65725f636f64650a20202020202046524f4d206578706572696d656e7473200a2020202020205748455245206964203d204e45572e657870655f69643b0a20202020494620286f776e65725f64656c5f6964204953204e4f54204e554c4c29205448454e200a202020202020524149534520455843455054494f4e202744617461205365742028436f64653a2025292063616e6e6f7420626520636f6e6e656374656420746f20616e204578706572696d656e742028436f64653a20252920252e272c200a202020202020202020202020202020202020202020204e45572e636f64652c206f776e65725f636f64652c2064656c6574696f6e5f6465736372697074696f6e286f776e65725f64656c5f6964293b0a20202020454e442049463b200a2020454e442049463b200a202052455455524e204e45573b0a454e443b0a2424204c414e47554147452027706c706773716c273b0a0a2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d0a2d2d2020507572706f73653a207472696767657220666f72206461746120736574733a20546865792073686f756c64206265206c696e6b656420746f20616e206578706572696d656e74206f7220612073616d706c6520776974682073706163650a2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d0a435245415445204f52205245504c4143452046554e4354494f4e20646174615f6578705f6f725f73616d706c655f6c696e6b5f636865636b28292052455455524e5320747269676765722041532024240a4445434c4152450a202073706163655f696420434f44453b0a202073616d706c655f636f646520434f44453b0a424547494e0a20206966204e45572e657870655f6964204953204e4f54204e554c4c207468656e0a2020202052455455524e204e45573b0a2020656e642069663b0a20206966204e45572e73616d705f6964204953204e554c4c207468656e0a20202020524149534520455843455054494f4e20274e656974686572206578706572696d656e74206e6f722073616d706c652069732073706563696669656420666f722064617461207365742025272c204e45572e636f64653b0a2020656e642069663b0a202073656c65637420732e69642c20732e636f646520696e746f2073706163655f69642c2073616d706c655f636f64652066726f6d2073616d706c65735f616c6c207320776865726520732e6964203d204e45572e73616d705f69643b0a202069662073706163655f6964206973204e554c4c207468656e0a20202020524149534520455843455054494f4e202753616d706c6520252069732061207368617265642073616d706c652e272c2073616d706c655f636f64653b0a2020656e642069663b0a202052455455524e204e45573b0a454e443b0a2424204c414e47554147452027706c706773716c273b0a0a435245415445205452494747455220646174615f6578705f6f725f73616d706c655f6c696e6b5f636865636b204245464f524520494e53455254204f5220555044415445204f4e20646174615f616c6c0a464f52204541434820524f5720455845435554452050524f43454455524520646174615f6578705f6f725f73616d706c655f6c696e6b5f636865636b28293b0a0a \N 145 ../../../../openbis/source/sql/postgresql/migration/migration-144-145.sql SUCCESS 2015-09-04 10:05:23.759 \\x2d2d20466978696e672073616d706c65732077697468206e6f6e2d756e6971756520636f64657320627920617070656e64696e6720746865207065726d5f69640a7570646174652073616d706c65735f616c6c2073657420636f64653d636f64657c7c275f277c7c7065726d5f6964200a776865726520696420696e202873656c65637420732e69642066726f6d2073616d706c65735f616c6c2073206a6f696e2073616d706c65735f616c6c207332206f6e2028732e636f64653d73322e636f646520616e6420732e73706163655f6964203d2073322e73706163655f6964290a2020202020202020202020202020202020202020202020202020202020206a6f696e2073616d706c655f7479706573207374206f6e20732e736174795f69643d73742e6964200a2020202020202020202020202077686572652028636f616c6573636528732e73616d705f69645f706172745f6f662c2d3129203d20636f616c657363652873322e73616d705f69645f706172745f6f662c2d3129200a202020202020202020202020202020202020202020206f72202873742e69735f737562636f64655f756e6971756520616e6420732e736174795f69643d73322e736174795f696429290a20202020202020202020202020202020202020616e6420732e6964203e2073322e6964293b0a0a2d2d2072756e207472696767657220666f7220726563616c63756c6174696e672027636f64655f756e697175655f636865636b2720616e642027737562636f64655f756e697175655f636865636b2720666f722073616d706c65732077697468206f6c642076616c7565730a7570646174652073616d706c65735f616c6c2073657420636f64653d636f646520776865726520636f64655f756e697175655f636865636b206c696b652027252c252c252c2527206f7220737562636f64655f756e697175655f636865636b206c696b652027252c252c252c25273b0a0a \N 146 ../../../../openbis/source/sql/postgresql/migration/migration-145-146.sql SUCCESS 2015-09-04 10:05:23.766 \\x2d2d2046726f6d20746869732076657273696f6e2c20616e792073616d706c6520747970652061737369676e6d656e742074686174206973206e6f742061207363726970742063616e2062652073656c656374656420746f2062652073686f776e206f72206e6f74206f6e2074686520666f726d732e0a2d2d20496e20746865207061737420746869732076616c756520776173206e6f74207573656420616e6420776173207365742062792064656661756c7420746f2066616c73652c2066726f6d20746869732076657273696f6e207468652064656661756c742073686f756c64206265207472756520756e74696c20746865207573657220737065636966696573206f74686572776973652e0a7570646174652073616d706c655f747970655f70726f70657274795f7479706573207365742069735f73686f776e5f65646974203d20277427207768657265207363726970745f6964206973206e756c6c3b0a \N +160 ../../../../openbis/source/sql/postgresql/migration/migration-159-160.sql SUCCESS 2017-10-09 17:02:52.994 \\x435245415445204f52205245504c4143452046554e4354494f4e20636f6e74656e745f636f706965735f756e697175656e6573735f636865636b28290a202052455455524e5320747269676765722041530a24424f4459240a424547494e0a20204e45572e6c6f636174696f6e5f756e697175655f636865636b203d204e45572e646174615f6964207c7c20272c27207c7c0a2020202020202020202020202020202020202020202020202020202020204e45572e65646d735f6964207c7c20272c27207c7c0a202020202020202020202020202020202020202020202020202020202020636f616c65736365284e45572e706174682c20272729207c7c20272c27207c7c200a202020202020202020202020202020202020202020202020202020202020636f616c65736365284e45572e6769745f636f6d6d69745f686173682c20272729207c7c20272c27207c7c200a202020202020202020202020202020202020202020202020202020202020636f616c65736365284e45572e65787465726e616c5f636f64652c202727293b0a202052455455524e204e45573b0a454e443b0a24424f4459240a20204c414e47554147452027706c706773716c273b0a0a55504441544520636f6e74656e745f636f7069657320534554206c6f636174696f6e5f756e697175655f636865636b203d200a2020646174615f6964207c7c20272c27207c7c200a202065646d735f6964207c7c20272c27207c7c200a2020636f616c6573636528706174682c20272729207c7c20272c27207c7c200a2020636f616c65736365286769745f636f6d6d69745f686173682c20272729207c7c20272c27207c7c200a2020636f616c657363652865787465726e616c5f636f64652c202727293b0a \N 147 ../../../../openbis/source/sql/postgresql/migration/migration-146-147.sql SUCCESS 2016-06-13 19:46:53.308 \\x414c544552205441424c452073616d706c65735f616c6c2041444420434f4c554d4e2070726f6a5f696420544543485f49443b0a44524f5020564945572073616d706c65733b0a43524541544520564945572073616d706c65732041530a2020202053454c4543542069642c207065726d5f69642c20636f64652c2070726f6a5f69642c20657870655f69642c20736174795f69642c20726567697374726174696f6e5f74696d657374616d702c206d6f64696669636174696f6e5f74696d657374616d702c20706572735f69645f726567697374657265722c20706572735f69645f6d6f6469666965722c2064656c5f69642c206f7269675f64656c2c2073706163655f69642c2073616d705f69645f706172745f6f662c2076657273696f6e200a2020202046524f4d2073616d706c65735f616c6c200a2020202057484552452064656c5f6964204953204e554c4c3b0a0a0a435245415445204f52205245504c4143452046554e4354494f4e2073616d706c655f66696c6c5f636f64655f756e697175655f636865636b28290a202052455455524e5320747269676765722041530a24424f4459240a424547494e0a20204e45572e636f64655f756e697175655f636865636b203d204e45572e636f6465207c7c20272c27207c7c20636f616c65736365284e45572e73616d705f69645f706172745f6f662c202d3129207c7c20272c27207c7c20636f616c65736365284e45572e70726f6a5f69642c202d3129207c7c20272c27207c7c20636f616c65736365284e45572e73706163655f69642c202d31293b0a202052455455524e204e45573b0a454e443b0a24424f4459240a20204c414e47554147452027706c706773716c273b0a0a20200a20200a435245415445204f52205245504c4143452046554e4354494f4e2073616d706c655f66696c6c5f737562636f64655f756e697175655f636865636b28290a202052455455524e5320747269676765722041530a24424f4459240a4445434c4152450a20202020756e697175655f737562636f64652020424f4f4c45414e5f434841523b0a424547494e0a2020202053454c4543542069735f737562636f64655f756e6971756520696e746f20756e697175655f737562636f64652046524f4d2073616d706c655f7479706573205748455245206964203d204e45572e736174795f69643b0a202020200a2020202049462028756e697175655f737562636f646529205448454e0a202020204e45572e737562636f64655f756e697175655f636865636b203d204e45572e636f6465207c7c20272c27207c7c20636f616c65736365284e45572e736174795f69642c202d3129207c7c20272c27207c7c20636f616c65736365284e45572e70726f6a5f69642c202d3129207c7c20272c27207c7c20636f616c65736365284e45572e73706163655f69642c202d31293b0a20202020454c53450a202020204e45572e737562636f64655f756e697175655f636865636b203d204e554c4c3b0a2020454e442049463b0a20200a202052455455524e204e45573b0a454e443b0a24424f4459240a20204c414e47554147452027706c706773716c273b0a0a435245415445204f52205245504c4143452046554e4354494f4e2064697361626c655f70726f6a6563745f6c6576656c5f73616d706c657328290a202052455455524e5320747269676765722041530a24424f4459240a424547494e0a20202020494620284e45572e70726f6a5f6964204953204e4f54204e554c4c29205448454e0a20202020524149534520455843455054494f4e202750726f6a656374206c6576656c2073616d706c6573206172652064697361626c6564273b0a2020454e442049463b0a20200a202052455455524e204e45573b0a454e443b0a24424f4459240a20204c414e47554147452027706c706773716c273b0a20200a43524541544520545249474745522064697361626c655f70726f6a6563745f6c6576656c5f73616d706c65730a20204245464f524520494e53455254204f52205550444154450a20204f4e2073616d706c65735f616c6c0a2020464f52204541434820524f570a2020455845435554452050524f4345445552452064697361626c655f70726f6a6563745f6c6576656c5f73616d706c657328293b0a202020200a \N 148 ../../../../openbis/source/sql/postgresql/migration/migration-147-148.sql SUCCESS 2016-06-13 19:46:53.344 \\x435245415445204f52205245504c4143452052554c452073616d706c655f696e736572742041530a202020204f4e20494e5345525420544f2073616d706c657320444f20494e5354454144200a20202020202020494e5345525420494e544f2073616d706c65735f616c6c20280a20202020202020202069642c200a202020202020202020636f64652c200a20202020202020202064656c5f69642c0a2020202020202020206f7269675f64656c2c0a202020202020202020657870655f69642c0a2020202020202020206d6f64696669636174696f6e5f74696d657374616d702c0a2020202020202020207065726d5f69642c0a202020202020202020706572735f69645f726567697374657265722c200a202020202020202020706572735f69645f6d6f6469666965722c200a202020202020202020726567697374726174696f6e5f74696d657374616d702c200a20202020202020202073616d705f69645f706172745f6f662c0a202020202020202020736174795f69642c200a20202020202020202073706163655f69642c0a20202020202020202076657273696f6e0a20202020202020292056414c55455320280a2020202020202020204e45572e69642c200a2020202020202020204e45572e636f64652c200a2020202020202020204e45572e64656c5f69642c0a2020202020202020204e45572e6f7269675f64656c2c0a2020202020202020204e45572e657870655f69642c0a2020202020202020204e45572e6d6f64696669636174696f6e5f74696d657374616d702c0a2020202020202020204e45572e7065726d5f69642c0a2020202020202020204e45572e706572735f69645f726567697374657265722c200a2020202020202020204e45572e706572735f69645f6d6f6469666965722c200a2020202020202020204e45572e726567697374726174696f6e5f74696d657374616d702c200a2020202020202020204e45572e73616d705f69645f706172745f6f662c0a2020202020202020204e45572e736174795f69642c200a2020202020202020204e45572e73706163655f69642c0a2020202020202020204e45572e76657273696f6e0a20202020202020293b0a20202020200a435245415445204f52205245504c4143452052554c452073616d706c655f7570646174652041530a202020204f4e2055504441544520544f2073616d706c657320444f20494e5354454144200a202020202020205550444154452073616d706c65735f616c6c0a2020202020202020202053455420636f6465203d204e45572e636f64652c0a202020202020202020202020202064656c5f6964203d204e45572e64656c5f69642c0a20202020202020202020202020206f7269675f64656c203d204e45572e6f7269675f64656c2c0a2020202020202020202020202020657870655f6964203d204e45572e657870655f69642c0a20202020202020202020202020206d6f64696669636174696f6e5f74696d657374616d70203d204e45572e6d6f64696669636174696f6e5f74696d657374616d702c0a20202020202020202020202020207065726d5f6964203d204e45572e7065726d5f69642c0a2020202020202020202020202020706572735f69645f72656769737465726572203d204e45572e706572735f69645f726567697374657265722c0a2020202020202020202020202020706572735f69645f6d6f646966696572203d204e45572e706572735f69645f6d6f6469666965722c0a2020202020202020202020202020726567697374726174696f6e5f74696d657374616d70203d204e45572e726567697374726174696f6e5f74696d657374616d702c0a202020202020202020202020202073616d705f69645f706172745f6f66203d204e45572e73616d705f69645f706172745f6f662c0a2020202020202020202020202020736174795f6964203d204e45572e736174795f69642c0a202020202020202020202020202073706163655f6964203d204e45572e73706163655f69642c0a202020202020202020202020202076657273696f6e203d204e45572e76657273696f6e0a202020202020202020205748455245206964203d204e45572e69643b0a20202020200a435245415445204f52205245504c4143452052554c452073616d706c655f64656c6574652041530a202020204f4e2044454c45544520544f2073616d706c657320444f20494e53544541440a2020202020202044454c4554452046524f4d2073616d706c65735f616c6c0a20202020202020202020202020205748455245206964203d204f4c442e69643b0a20202020202020202020202020200a435245415445204f52205245504c4143452052554c452073616d706c655f64656c657465645f7570646174652041530a202020204f4e2055504441544520544f2073616d706c65735f64656c6574656420444f20494e53544541440a202020202020205550444154452073616d706c65735f616c6c0a202020202020202020205345542064656c5f6964203d204e45572e64656c5f69642c0a20202020202020202020202020206f7269675f64656c203d204e45572e6f7269675f64656c2c0a20202020202020202020202020206d6f64696669636174696f6e5f74696d657374616d70203d204e45572e6d6f64696669636174696f6e5f74696d657374616d702c0a202020202020202020202020202076657273696f6e203d204e45572e76657273696f6e0a202020202020202020205748455245206964203d204e45572e69643b0a20202020200a435245415445204f52205245504c4143452052554c452073616d706c655f64656c657465645f64656c6574652041530a202020204f4e2044454c45544520544f2073616d706c65735f64656c6574656420444f20494e53544541440a2020202020202044454c4554452046524f4d2073616d706c65735f616c6c0a20202020202020202020202020205748455245206964203d204f4c442e69643b0a20202020202020202020202020200a \N 149 ../../../../openbis/source/sql/postgresql/migration/migration-148-149.sql SUCCESS 2016-06-13 19:46:53.384 \\x44524f50205649455720646174613b0a44524f50205649455720646174615f64656c657465643b0a0a414c544552205441424c4520646174615f616c6c2044524f5020434f4c554d4e2069735f706c616365686f6c6465723b0a0a435245415445205649455720646174612041530a202020202053454c4543542069642c20636f64652c20647374795f69642c20646173745f69642c20657870655f69642c20646174615f70726f64756365725f636f64652c2070726f64756374696f6e5f74696d657374616d702c2073616d705f69642c20726567697374726174696f6e5f74696d657374616d702c206163636573735f74696d657374616d702c20706572735f69645f726567697374657265722c20706572735f69645f6d6f6469666965722c2069735f76616c69642c206d6f64696669636174696f6e5f74696d657374616d702c2069735f646572697665642c2064656c5f69642c206f7269675f64656c2c2076657273696f6e200a2020202020202046524f4d20646174615f616c6c200a20202020202057484552452064656c5f6964204953204e554c4c3b0a0a435245415445205649455720646174615f64656c657465642041530a202020202053454c4543542069642c20636f64652c20647374795f69642c20646173745f69642c20657870655f69642c20646174615f70726f64756365725f636f64652c2070726f64756374696f6e5f74696d657374616d702c2073616d705f69642c20726567697374726174696f6e5f74696d657374616d702c206163636573735f74696d657374616d702c20706572735f69645f726567697374657265722c20706572735f69645f6d6f6469666965722c2069735f76616c69642c206d6f64696669636174696f6e5f74696d657374616d702c2069735f646572697665642c2064656c5f69642c206f7269675f64656c2c2076657273696f6e200a2020202020202046524f4d20646174615f616c6c200a20202020202057484552452064656c5f6964204953204e4f54204e554c4c3b0a0a435245415445204f52205245504c4143452052554c4520646174615f616c6c2041530a202020204f4e2044454c45544520544f206461746120444f20494e53544541440a2020202020202044454c4554452046524f4d20646174615f616c6c0a20202020202020202020202020205748455245206964203d204f4c442e69643b0a0a435245415445204f52205245504c4143452052554c4520646174615f696e736572742041530a20204f4e20494e5345525420544f206461746120444f20494e5354454144200a2020202020494e5345525420494e544f20646174615f616c6c20280a2020202020202069642c200a20202020202020636f64652c200a2020202020202064656c5f69642c0a202020202020206f7269675f64656c2c0a20202020202020657870655f69642c0a20202020202020646173745f69642c0a20202020202020646174615f70726f64756365725f636f64652c0a20202020202020647374795f69642c0a2020202020202069735f646572697665642c0a2020202020202069735f76616c69642c0a202020202020206d6f64696669636174696f6e5f74696d657374616d702c0a202020202020206163636573735f74696d657374616d702c0a20202020202020706572735f69645f726567697374657265722c0a20202020202020706572735f69645f6d6f6469666965722c0a2020202020202070726f64756374696f6e5f74696d657374616d702c0a20202020202020726567697374726174696f6e5f74696d657374616d702c0a2020202020202073616d705f69642c0a2020202020202076657273696f6e0a2020202020292056414c55455320280a202020202020204e45572e69642c200a202020202020204e45572e636f64652c200a202020202020204e45572e64656c5f69642c200a202020202020204e45572e6f7269675f64656c2c0a202020202020204e45572e657870655f69642c0a202020202020204e45572e646173745f69642c0a202020202020204e45572e646174615f70726f64756365725f636f64652c0a202020202020204e45572e647374795f69642c0a202020202020204e45572e69735f646572697665642c200a202020202020204e45572e69735f76616c69642c0a202020202020204e45572e6d6f64696669636174696f6e5f74696d657374616d702c0a202020202020204e45572e6163636573735f74696d657374616d702c0a202020202020204e45572e706572735f69645f726567697374657265722c0a202020202020204e45572e706572735f69645f6d6f6469666965722c0a202020202020204e45572e70726f64756374696f6e5f74696d657374616d702c0a202020202020204e45572e726567697374726174696f6e5f74696d657374616d702c0a202020202020204e45572e73616d705f69642c0a202020202020204e45572e76657273696f6e0a2020202020293b0a20202020200a435245415445204f52205245504c4143452052554c4520646174615f7570646174652041530a202020204f4e2055504441544520544f206461746120444f20494e5354454144200a2020202020202055504441544520646174615f616c6c0a2020202020202020202053455420636f6465203d204e45572e636f64652c0a202020202020202020202020202064656c5f6964203d204e45572e64656c5f69642c0a20202020202020202020202020206f7269675f64656c203d204e45572e6f7269675f64656c2c0a2020202020202020202020202020657870655f6964203d204e45572e657870655f69642c0a2020202020202020202020202020646173745f6964203d204e45572e646173745f69642c0a2020202020202020202020202020646174615f70726f64756365725f636f6465203d204e45572e646174615f70726f64756365725f636f64652c0a2020202020202020202020202020647374795f6964203d204e45572e647374795f69642c0a202020202020202020202020202069735f64657269766564203d204e45572e69735f646572697665642c0a202020202020202020202020202069735f76616c6964203d204e45572e69735f76616c69642c0a20202020202020202020202020206d6f64696669636174696f6e5f74696d657374616d70203d204e45572e6d6f64696669636174696f6e5f74696d657374616d702c0a20202020202020202020202020206163636573735f74696d657374616d70203d204e45572e6163636573735f74696d657374616d702c0a2020202020202020202020202020706572735f69645f72656769737465726572203d204e45572e706572735f69645f726567697374657265722c0a2020202020202020202020202020706572735f69645f6d6f646966696572203d204e45572e706572735f69645f6d6f6469666965722c0a202020202020202020202020202070726f64756374696f6e5f74696d657374616d70203d204e45572e70726f64756374696f6e5f74696d657374616d702c0a2020202020202020202020202020726567697374726174696f6e5f74696d657374616d70203d204e45572e726567697374726174696f6e5f74696d657374616d702c0a202020202020202020202020202073616d705f6964203d204e45572e73616d705f69642c0a202020202020202020202020202076657273696f6e203d204e45572e76657273696f6e0a202020202020205748455245206964203d204e45572e69643b0a0a435245415445204f52205245504c4143452052554c4520646174615f64656c657465645f7570646174652041530a202020204f4e2055504441544520544f20646174615f64656c6574656420444f20494e5354454144200a2020202020202055504441544520646174615f616c6c0a202020202020202020205345542064656c5f6964203d204e45572e64656c5f69642c0a20202020202020202020202020206f7269675f64656c203d204e45572e6f7269675f64656c2c0a20202020202020202020202020206d6f64696669636174696f6e5f74696d657374616d70203d204e45572e6d6f64696669636174696f6e5f74696d657374616d702c0a202020202020202020202020202076657273696f6e203d204e45572e76657273696f6e0a202020202020202020205748455245206964203d204e45572e69643b0a20202020200a435245415445204f52205245504c4143452052554c4520646174615f64656c657465645f64656c6574652041530a202020204f4e2044454c45544520544f20646174615f64656c6574656420444f20494e53544541440a2020202020202044454c4554452046524f4d20646174615f616c6c0a20202020202020202020202020205748455245206964203d204f4c442e69643b2020202020202020202020202020200a200a \N @@ -3921,7 +3993,6 @@ COPY database_version_logs (db_version, module_name, run_status, run_status_time 157 ../../../../openbis/source/sql/postgresql/migration/migration-156-157.sql SUCCESS 2017-10-09 17:02:52.882 \\x414c544552205441424c452053414d504c455f52454c4154494f4e53484950535f484953544f52592041444420434f4c554d4e2050524f4a5f494420544543485f49443b0a414c544552205441424c452053414d504c455f52454c4154494f4e53484950535f484953544f52592041444420434f4e53545241494e542053414d5052454c485f50524f4a4543545f464b20464f524549474e204b4559202850524f4a5f494429205245464552454e4345532050524f4a4543545328494429204f4e2044454c45544520534554204e554c4c3b0a43524541544520494e4445582053414d5052454c485f4d41494e5f53414d505f464b5f50524f4a5f464b5f49204f4e2053414d504c455f52454c4154494f4e53484950535f484953544f525920284d41494e5f53414d505f49442c2050524f4a5f4944293b0a0a44524f5020564945572073616d706c655f686973746f72795f766965773b0a0a43524541544520564945572073616d706c655f686973746f72795f7669657720415320280a202053454c4543540a20202020322a69642061732069642c0a202020206d61696e5f73616d705f69642c0a2020202072656c6174696f6e5f747970652c0a2020202073706163655f69642c0a20202020657870655f69642c0a2020202073616d705f69642c0a2020202070726f6a5f69642c0a20202020646174615f69642c0a20202020656e746974795f7065726d5f69642c0a202020206e756c6c20617320737470745f69642c0a202020206e756c6c2061732076616c75652c0a202020206e756c6c20617320766f636162756c6172795f7465726d2c0a202020206e756c6c206173206d6174657269616c2c0a20202020706572735f69645f617574686f722c0a2020202076616c69645f66726f6d5f74696d657374616d702c0a2020202076616c69645f756e74696c5f74696d657374616d700a202046524f4d0a2020202053414d504c455f52454c4154494f4e53484950535f484953544f52590a202057484552450a2020202076616c69645f756e74696c5f74696d657374616d70204953204e4f54204e554c4c290a554e494f4e0a202053454c4543540a20202020322a69642b312061732069642c0a2020202073616d705f6964206173206d61696e5f73616d705f69642c0a202020206e756c6c2061732072656c6174696f6e5f747970652c0a202020206e756c6c2061732073706163655f69642c0a202020206e756c6c20617320657870655f69642c0a202020206e756c6c2061732073616d705f69642c0a202020206e756c6c2061732070726f6a5f69642c0a202020206e756c6c20617320646174615f69642c0a202020206e756c6c20617320656e746974795f7065726d5f69642c0a20202020737470745f69642c0a2020202076616c75652c0a20202020766f636162756c6172795f7465726d2c0a202020206d6174657269616c2c0a20202020706572735f69645f617574686f722c0a2020202076616c69645f66726f6d5f74696d657374616d702c0a2020202076616c69645f756e74696c5f74696d657374616d700a202046524f4d0a2020202053414d504c455f50524f504552544945535f484953544f52593b0a0a435245415445204f52205245504c4143452052554c452073616d706c655f70726f6a6563745f7570646174652041530a202020204f4e2055504441544520544f2073616d706c65735f616c6c200a20202020574845524520284f4c442e50524f4a5f494420213d204e45572e50524f4a5f4944204f52204f4c442e50524f4a5f4944204953204e554c4c204f52204f4c442e455850455f4944204953204e4f54204e554c4c2920414e44204e45572e50524f4a5f4944204953204e4f54204e554c4c20414e44204e45572e455850455f4944204953204e554c4c0a20202020444f20414c534f20280a202020202020205550444154452053414d504c455f52454c4154494f4e53484950535f484953544f5259205345542056414c49445f554e54494c5f54494d455354414d50203d204e45572e4d4f44494649434154494f4e5f54494d455354414d50200a2020202020202020205748455245204d41494e5f53414d505f4944203d204f4c442e494420414e442050524f4a5f4944203d204f4c442e50524f4a5f494420414e442056414c49445f554e54494c5f54494d455354414d50204953204e554c4c3b0a20202020202020494e5345525420494e544f2053414d504c455f52454c4154494f4e53484950535f484953544f525920280a20202020202020202049442c200a2020202020202020204d41494e5f53414d505f49442c0a20202020202020202052454c4154494f4e5f545950452c200a20202020202020202050524f4a5f49442c200a202020202020202020454e544954595f5045524d5f49442c0a202020202020202020504552535f49445f415554484f522c0a20202020202020202056414c49445f46524f4d5f54494d455354414d500a20202020202020292056414c55455320280a2020202020202020206e65787476616c282753414d504c455f52454c4154494f4e53484950535f484953544f52595f49445f53455127292c200a2020202020202020204e45572e49442c200a202020202020202020274f574e4544272c200a2020202020202020204e45572e50524f4a5f49442c200a2020202020202020202853454c454354205045524d5f49442046524f4d2050524f4a45435453205748455245204944203d204e45572e50524f4a5f4944292c0a2020202020202020204e45572e504552535f49445f4d4f4449464945522c0a2020202020202020204e45572e4d4f44494649434154494f4e5f54494d455354414d500a20202020202020293b0a20202020293b0a0a435245415445204f52205245504c4143452052554c452073616d706c655f70726f6a6563745f72656d6f76655f7570646174652041530a202020204f4e2055504441544520544f2073616d706c65735f616c6c200a202020205748455245204f4c442e50524f4a5f4944204953204e4f54204e554c4c20414e4420284e45572e50524f4a5f4944204953204e554c4c204f5220284f4c442e455850455f4944204953204e554c4c20414e44204e45572e455850455f4944204953204e4f54204e554c4c29290a20202020444f20414c534f20280a202020202020205550444154452053414d504c455f52454c4154494f4e53484950535f484953544f5259205345542056414c49445f554e54494c5f54494d455354414d50203d204e45572e4d4f44494649434154494f4e5f54494d455354414d50200a2020202020202020205748455245204d41494e5f53414d505f4944203d204f4c442e494420414e442050524f4a5f4944203d204f4c442e50524f4a5f494420414e442056414c49445f554e54494c5f54494d455354414d50204953204e554c4c3b0a20202020293b0a0a435245415445204f52205245504c4143452052554c452073616d706c655f70726f6a6563745f696e736572742041530a202020204f4e20494e5345525420544f2073616d706c65735f616c6c200a202020205748455245204e45572e455850455f4944204953204e554c4c20414e44204e45572e50524f4a5f4944204953204e4f54204e554c4c0a20202020444f20414c534f20280a202020202020494e5345525420494e544f2053414d504c455f52454c4154494f4e53484950535f484953544f525920280a20202020202020202049442c200a2020202020202020204d41494e5f53414d505f49442c0a20202020202020202052454c4154494f4e5f545950452c200a20202020202020202050524f4a5f49442c200a202020202020202020454e544954595f5045524d5f49442c0a202020202020202020504552535f49445f415554484f522c0a20202020202020202056414c49445f46524f4d5f54494d455354414d500a20202020202020292056414c55455320280a2020202020202020206e65787476616c282753414d504c455f52454c4154494f4e53484950535f484953544f52595f49445f53455127292c200a2020202020202020204e45572e49442c200a202020202020202020274f574e4544272c200a2020202020202020204e45572e50524f4a5f49442c200a2020202020202020202853454c454354205045524d5f49442046524f4d2050524f4a45435453205748455245204944203d204e45572e50524f4a5f4944292c0a2020202020202020204e45572e504552535f49445f4d4f4449464945522c0a2020202020202020204e45572e4d4f44494649434154494f4e5f54494d455354414d500a20202020202020293b0a202020293b0a0a435245415445204f52205245504c4143452052554c452073616d706c655f73706163655f7570646174652041530a202020204f4e2055504441544520544f2073616d706c65735f616c6c200a20202020574845524520284f4c442e53504143455f494420213d204e45572e53504143455f4944204f52204f4c442e53504143455f4944204953204e554c4c204f52204f4c442e455850455f4944204953204e4f54204e554c4c204f52204f4c442e50524f4a5f4944204953204e4f54204e554c4c2920414e44204e45572e53504143455f4944204953204e4f54204e554c4c20414e44204e45572e455850455f4944204953204e554c4c20414e44204e45572e50524f4a5f4944204953204e554c4c0a20202020444f20414c534f20280a202020202020205550444154452053414d504c455f52454c4154494f4e53484950535f484953544f5259205345542056414c49445f554e54494c5f54494d455354414d50203d204e45572e4d4f44494649434154494f4e5f54494d455354414d50200a2020202020202020205748455245204d41494e5f53414d505f4944203d204f4c442e494420414e442053504143455f4944203d204f4c442e53504143455f494420414e442056414c49445f554e54494c5f54494d455354414d50204953204e554c4c3b0a20202020202020494e5345525420494e544f2053414d504c455f52454c4154494f4e53484950535f484953544f525920280a20202020202020202049442c200a2020202020202020204d41494e5f53414d505f49442c0a20202020202020202052454c4154494f4e5f545950452c200a20202020202020202053504143455f49442c200a202020202020202020454e544954595f5045524d5f49442c0a202020202020202020504552535f49445f415554484f522c0a20202020202020202056414c49445f46524f4d5f54494d455354414d500a20202020202020292056414c55455320280a2020202020202020206e65787476616c282753414d504c455f52454c4154494f4e53484950535f484953544f52595f49445f53455127292c200a2020202020202020204e45572e49442c200a202020202020202020274f574e4544272c200a2020202020202020204e45572e53504143455f49442c200a2020202020202020202853454c45435420434f44452046524f4d20535041434553205748455245204944203d204e45572e53504143455f4944292c0a2020202020202020204e45572e504552535f49445f4d4f4449464945522c0a2020202020202020204e45572e4d4f44494649434154494f4e5f54494d455354414d500a20202020202020293b0a20202020293b0a0a435245415445204f52205245504c4143452052554c452073616d706c655f73706163655f72656d6f76655f7570646174652041530a202020204f4e2055504441544520544f2073616d706c65735f616c6c200a202020205748455245204f4c442e53504143455f4944204953204e4f54204e554c4c20414e4420284e45572e53504143455f4944204953204e554c4c204f5220284f4c442e455850455f4944204953204e554c4c20414e44204e45572e455850455f4944204953204e4f54204e554c4c29204f5220284f4c442e50524f4a5f4944204953204e554c4c20414e44204e45572e50524f4a5f4944204953204e4f54204e554c4c29290a20202020444f20414c534f20280a202020202020205550444154452053414d504c455f52454c4154494f4e53484950535f484953544f5259205345542056414c49445f554e54494c5f54494d455354414d50203d204e45572e4d4f44494649434154494f4e5f54494d455354414d50200a2020202020202020205748455245204d41494e5f53414d505f4944203d204f4c442e494420414e442053504143455f4944203d204f4c442e53504143455f494420414e442056414c49445f554e54494c5f54494d455354414d50204953204e554c4c3b0a20202020293b0a0a435245415445204f52205245504c4143452052554c452073616d706c655f73706163655f696e736572742041530a202020204f4e20494e5345525420544f2073616d706c65735f616c6c200a202020205748455245204e45572e455850455f4944204953204e554c4c20414e44204e45572e53504143455f4944204953204e4f54204e554c4c20414e44204e45572e50524f4a5f4944204953204e554c4c0a20202020444f20414c534f20280a202020202020494e5345525420494e544f2053414d504c455f52454c4154494f4e53484950535f484953544f525920280a20202020202020202049442c200a2020202020202020204d41494e5f53414d505f49442c0a20202020202020202052454c4154494f4e5f545950452c200a20202020202020202053504143455f49442c200a202020202020202020454e544954595f5045524d5f49442c0a202020202020202020504552535f49445f415554484f522c0a20202020202020202056414c49445f46524f4d5f54494d455354414d500a20202020202020292056414c55455320280a2020202020202020206e65787476616c282753414d504c455f52454c4154494f4e53484950535f484953544f52595f49445f53455127292c200a2020202020202020204e45572e49442c200a202020202020202020274f574e4544272c200a2020202020202020204e45572e53504143455f49442c200a2020202020202020202853454c45435420434f44452046524f4d20535041434553205748455245204944203d204e45572e53504143455f4944292c0a2020202020202020204e45572e504552535f49445f4d4f4449464945522c0a2020202020202020204e45572e4d4f44494649434154494f4e5f54494d455354414d500a20202020202020293b0a202020293b0a \N 158 ../../../../openbis/source/sql/postgresql/migration/migration-157-158.sql SUCCESS 2017-10-09 17:02:52.919 \\x43524541544520444f4d41494e2045444d535f414444524553535f54595045204153205445585420434845434b202856414c554520494e2028274f50454e424953272c202755524c272c202746494c455f53595354454d2729293b0a0a414c544552205441424c452065787465726e616c5f646174615f6d616e6167656d656e745f73797374656d732041444420434f4c554d4e20616464726573735f747970652045444d535f414444524553535f545950453b0a5550444154452065787465726e616c5f646174615f6d616e6167656d656e745f73797374656d732053455420616464726573735f747970653d274f50454e424953272057484552452069735f6f70656e626973203d20747275653b0a5550444154452065787465726e616c5f646174615f6d616e6167656d656e745f73797374656d732053455420616464726573735f747970653d2755524c272057484552452069735f6f70656e626973203d2066616c73653b0a414c544552205441424c452065787465726e616c5f646174615f6d616e6167656d656e745f73797374656d7320414c54455220434f4c554d4e20616464726573735f7479706520534554204e4f54204e554c4c3b0a0a414c544552205441424c452065787465726e616c5f646174615f6d616e6167656d656e745f73797374656d732052454e414d4520434f4c554d4e2075726c5f74656d706c61746520544f20616464726573733b0a5550444154452065787465726e616c5f646174615f6d616e6167656d656e745f73797374656d732053455420616464726573733d27554e4b4e4f574e272057484552452061646472657373204953204e554c4c3b0a414c544552205441424c452065787465726e616c5f646174615f6d616e6167656d656e745f73797374656d7320414c54455220434f4c554d4e206164647265737320534554204e4f54204e554c4c3b0a0a414c544552205441424c452065787465726e616c5f646174615f6d616e6167656d656e745f73797374656d732044524f5020434f4c554d4e2069735f6f70656e6269733b0a0a5550444154452065787465726e616c5f646174615f6d616e6167656d656e745f73797374656d732053455420636f6465203d202853454c45435420636f616c6573636528636f64652c202727292046524f4d2065787465726e616c5f646174615f6d616e6167656d656e745f73797374656d73206f7264657220627920636f616c65736365286c656e67746828636f6465292c20273027292064657363206c696d6974203129207c7c20696420574845524520636f6465204953204e554c4c3b0a414c544552205441424c452065787465726e616c5f646174615f6d616e6167656d656e745f73797374656d7320414c54455220434f4c554d4e20636f646520534554204e4f54204e554c4c3b0a \N 159 ../../../../openbis/source/sql/postgresql/migration/migration-158-159.sql SUCCESS 2017-10-09 17:02:52.965 \\x43524541544520444f4d41494e204c4f434154494f4e5f54595045204153205445585420434845434b202856414c554520494e2028274f50454e424953272c202755524c272c202746494c455f53595354454d5f504c41494e272c202746494c455f53595354454d5f4749542729293b0a0a414c544552205441424c45206c696e6b5f646174612052454e414d4520544f20636f6e74656e745f636f706965733b0a0a414c544552205441424c4520636f6e74656e745f636f70696573200a202044524f5020434f4e53545241494e54206c6e64615f706b2c0a202044524f5020434f4e53545241494e54206c6e64615f646174615f666b3b0a0a0a435245415445205441424c45206c696e6b5f6461746120280a20202020646174615f696420746563685f6964204e4f54204e554c4c0a293b0a0a414c544552205441424c45206c696e6b5f646174610a202041444420434f4e53545241494e54206c6e64615f706b205052494d415259204b455928646174615f6964292c0a202041444420434f4e53545241494e54206c6e64615f646174615f666b20464f524549474e204b45592028646174615f696429205245464552454e43455320646174615f616c6c28696429204f4e2044454c45544520434153434144453b0a0a494e5345525420494e544f206c696e6b5f646174612053454c4543542044495354494e435428646174615f6964292046524f4d20636f6e74656e745f636f706965733b0a0a4352454154452053455155454e434520636f6e74656e745f636f706965735f69645f7365713b0a0a414c544552205441424c4520636f6e74656e745f636f70696573200a202041444420434f4c554d4e20696420544543485f4944204e4f54204e554c4c2044454641554c54206e65787476616c2827636f6e74656e745f636f706965735f69645f73657127292c0a202041444420434f4c554d4e206c6f636174696f6e5f74797065204c4f434154494f4e5f545950452c0a202041444420434f4c554d4e207061746820544558545f56414c55452c0a202041444420434f4c554d4e206769745f636f6d6d69745f6861736820544558545f56414c55452c0a202041444420434f4c554d4e206c6f636174696f6e5f756e697175655f636865636b20544558545f56414c55452c0a2020414c54455220434f4c554d4e2065787465726e616c5f636f64652044524f50204e4f54204e554c4c2c0a202041444420434f4e53545241494e5420636f636f5f706b205052494d415259204b4559284944292c0a202041444420434f4e53545241494e5420636f636f5f646174615f666b20464f524549474e204b45592028646174615f696429205245464552454e434553206c696e6b5f6461746128646174615f6964293b0a20200a414c544552205441424c4520636f6e74656e745f636f70696573200a202052454e414d4520434f4e53545241494e54206c6e64615f65646d735f666b20544f20636f636f5f65646d735f666b3b0a20200a55504441544520636f6e74656e745f636f7069657320534554206c6f636174696f6e5f74797065203d20274f50454e424953272077686572652065646d735f696420494e0a20202853454c4543542069642046524f4d2065787465726e616c5f646174615f6d616e6167656d656e745f73797374656d7320574845524520616464726573735f74797065203d20274f50454e42495327293b0a0a55504441544520636f6e74656e745f636f7069657320534554206c6f636174696f6e5f74797065203d202755524c272077686572652065646d735f696420494e0a20202853454c4543542069642046524f4d2065787465726e616c5f646174615f6d616e6167656d656e745f73797374656d7320574845524520616464726573735f74797065203d202755524c27293b0a20200a55504441544520636f6e74656e745f636f7069657320534554206c6f636174696f6e5f756e697175655f636865636b203d200a2020646174615f6964207c7c20272c27207c7c200a202065646d735f6964207c7c20272c27207c7c200a2020636f616c6573636528706174682c20272729207c7c20272c27207c7c200a2020636f616c65736365286769745f636f6d6d69745f686173682c20272729207c7c20272c27207c7c200a2020636f616c657363652865787465726e616c5f636f64652c202727293b0a20200a414c544552205441424c4520636f6e74656e745f636f706965730a2020414c54455220434f4c554d4e2069642044524f502044454641554c542c0a2020414c54455220434f4c554d4e206c6f636174696f6e5f7479706520534554204e4f54204e554c4c2c0a2020414c54455220434f4c554d4e206c6f636174696f6e5f756e697175655f636865636b20534554204e4f54204e554c4c2c0a202041444420434f4e53545241494e5420636f6e74656e745f636f706965735f756e697175655f636865636b5f756b20554e49515545286c6f636174696f6e5f756e697175655f636865636b293b0a0a20202020202020200a435245415445204f52205245504c4143452046554e4354494f4e20636f6e74656e745f636f706965735f756e697175656e6573735f636865636b28290a202052455455524e5320747269676765722041530a24424f4459240a424547494e0a20204e45572e6c6f636174696f6e5f756e697175655f636865636b203d204e45572e646174615f6964207c7c20272c27207c7c0a2020202020202020202020202020202020202020202020202020202020204e45572e65646d735f6964207c7c20272c27207c7c0a202020202020202020202020202020202020202020202020202020202020636f616c65736365284e45572e706174682c20272729207c7c20272c27207c7c200a202020202020202020202020202020202020202020202020202020202020636f616c65736365284e45572e6769745f636f6d6d69745f686173682c20272729207c7c20272c27207c7c200a202020202020202020202020202020202020202020202020202020202020636f616c65736365284e45572e65787465726e616c5f636f64652c202727293b0a202052455455524e204e45573b0a454e443b0a24424f4459240a20204c414e47554147452027706c706773716c273b0a0a435245415445205452494747455220636f6e74656e745f636f706965735f756e697175656e6573735f636865636b0a20204245464f524520494e53455254204f52205550444154450a20204f4e20636f6e74656e745f636f706965730a2020464f52204541434820524f570a2020455845435554452050524f43454455524520636f6e74656e745f636f706965735f756e697175656e6573735f636865636b28293b0a0a20200a435245415445204f52205245504c4143452046554e4354494f4e20636f6e74656e745f636f706965735f6c6f636174696f6e5f747970655f636865636b28292052455455524e5320747269676765722041532024240a4445434c4152450a20202065646d735f616464726573735f747970652045444d535f414444524553535f545950453b0a202020696e64657820696e74656765723b0a424547494e0a0a20202073656c65637420706f736974696f6e28616464726573735f7479706520696e204e45572e6c6f636174696f6e5f74797065292c20616464726573735f7479706520696e746f20696e6465782c2065646d735f616464726573735f747970652066726f6d2065787465726e616c5f646174615f6d616e6167656d656e745f73797374656d730a2020202020207768657265206964203d204e45572e65646d735f69643b0a0a202020696620696e64657820213d2031207468656e0a202020202020524149534520455843455054494f4e2027496e736572742f55706461746520746f20636f6e74656e745f636f70696573206661696c65642e204c6f636174696f6e207479706520252c206275742065646d732e616464726573735f747970652025272c204e45572e6c6f636174696f6e5f747970652c2065646d735f616464726573735f747970653b0a202020656e642069663b0a0a20202052455455524e204e45573b0a0a454e443b0a2424204c414e47554147452027706c706773716c273b0a0a435245415445205452494747455220636f6e74656e745f636f706965735f6c6f636174696f6e5f747970655f636865636b200a20204245464f524520494e53455254204f5220555044415445200a20204f4e20636f6e74656e745f636f706965730a2020464f52204541434820524f57200a2020455845435554452050524f43454455524520636f6e74656e745f636f706965735f6c6f636174696f6e5f747970655f636865636b28293b0a20200a \N -160 ../../../../openbis/source/sql/postgresql/migration/migration-159-160.sql SUCCESS 2017-10-09 17:02:52.994 \\x435245415445204f52205245504c4143452046554e4354494f4e20636f6e74656e745f636f706965735f756e697175656e6573735f636865636b28290a202052455455524e5320747269676765722041530a24424f4459240a424547494e0a20204e45572e6c6f636174696f6e5f756e697175655f636865636b203d204e45572e646174615f6964207c7c20272c27207c7c0a2020202020202020202020202020202020202020202020202020202020204e45572e65646d735f6964207c7c20272c27207c7c0a202020202020202020202020202020202020202020202020202020202020636f616c65736365284e45572e706174682c20272729207c7c20272c27207c7c200a202020202020202020202020202020202020202020202020202020202020636f616c65736365284e45572e6769745f636f6d6d69745f686173682c20272729207c7c20272c27207c7c200a202020202020202020202020202020202020202020202020202020202020636f616c65736365284e45572e65787465726e616c5f636f64652c202727293b0a202052455455524e204e45573b0a454e443b0a24424f4459240a20204c414e47554147452027706c706773716c273b0a0a55504441544520636f6e74656e745f636f7069657320534554206c6f636174696f6e5f756e697175655f636865636b203d200a2020646174615f6964207c7c20272c27207c7c200a202065646d735f6964207c7c20272c27207c7c200a2020636f616c6573636528706174682c20272729207c7c20272c27207c7c200a2020636f616c65736365286769745f636f6d6d69745f686173682c20272729207c7c20272c27207c7c200a2020636f616c657363652865787465726e616c5f636f64652c202727293b0a \N 161 ../../../../openbis/source/sql/postgresql/migration/migration-160-161.sql SUCCESS 2017-10-09 17:02:53.031 \\x2d2d204d6967726174696f6e2066726f6d2031363020746f203136310a0a2d2d206164642070726f6a6563745f696420636f6c756d6e0a414c544552205441424c4520524f4c455f41535349474e4d454e54532041444420434f4c554d4e2050524f4a4543545f494420544543485f49443b0a0a2d2d206164642070726f6a6563745f696420636f6c756d6e20746f20756e6971756520636f6e747261696e74730a414c544552205441424c4520524f4c455f41535349474e4d454e54532044524f5020434f4e53545241494e5420524f41535f50455f53504143455f424b5f554b3b0a414c544552205441424c4520524f4c455f41535349474e4d454e54532044524f5020434f4e53545241494e5420524f41535f41475f53504143455f424b5f554b3b0a0a43524541544520554e4951554520494e44455820524f41535f50455f53504143455f50524f4a4543545f424b5f554b204f4e20524f4c455f41535349474e4d454e54532028504552535f49445f4752414e5445452c20524f4c455f434f44452c20636f616c657363652853504143455f49442c2d31292c20636f616c657363652850524f4a4543545f49442c2d3129293b200a43524541544520554e4951554520494e44455820524f41535f41475f53504143455f50524f4a4543545f424b5f554b204f4e20524f4c455f41535349474e4d454e5453202841475f49445f4752414e5445452c20524f4c455f434f44452c20636f616c657363652853504143455f49442c2d31292c20636f616c657363652850524f4a4543545f49442c2d3129293b200a0a2d2d206164642070726f6a6563745f696420666f726569676e206b65790a414c544552205441424c4520524f4c455f41535349474e4d454e54532041444420434f4e53545241494e5420524f41535f50524f4a4543545f464b20464f524549474e204b4559202850524f4a4543545f494429205245464552454e4345532050524f4a4543545328494429204f4e2044454c45544520434153434144453b0a0a2d2d206164642070726f6a6563745f696420696e6465780a43524541544520494e44455820524f41535f50524f4a4543545f464b5f49204f4e20524f4c455f41535349474e4d454e5453202850524f4a4543545f4944293b0a0a2d2d206164642073706163655f696420616e642070726f6a6563745f696420636865636b0a414c544552205441424c4520524f4c455f41535349474e4d454e54532041444420434f4e53545241494e5420524f41535f53504143455f50524f4a4543545f434b20434845434b202853504143455f4944204953204e554c4c204f522050524f4a4543545f4944204953204e554c4c293b0a \N 162 ../../../../openbis/source/sql/postgresql/migration/migration-161-162.sql SUCCESS 2017-10-09 17:02:53.078 \\x414c544552205441424c4520636f6e74656e745f636f706965732041444420434f4c554d4e20706572735f69645f7265676973746572657220544543485f49443b0a414c544552205441424c4520636f6e74656e745f636f706965732041444420434f4c554d4e20726567697374726174696f6e5f74696d657374616d702054494d455f5354414d505f44464c3b0a0a55504441544520636f6e74656e745f636f70696573200a53455420706572735f69645f72656769737465726572203d20782e706572735f69645f726567697374657265722c0a20202020726567697374726174696f6e5f74696d657374616d70203d20782e726567697374726174696f6e5f74696d657374616d700a46524f4d20280a202053454c4543542069642c20706572735f69645f726567697374657265722c20726567697374726174696f6e5f74696d657374616d70200a202046524f4d20646174610a2920780a574845524520636f6e74656e745f636f706965732e646174615f6964203d20782e69643b0a0a414c544552205441424c4520636f6e74656e745f636f7069657320414c54455220434f4c554d4e20726567697374726174696f6e5f74696d657374616d7020534554204e4f54204e554c4c3b0a414c544552205441424c4520636f6e74656e745f636f7069657320414c54455220434f4c554d4e20726567697374726174696f6e5f74696d657374616d70205345542044454641554c542043555252454e545f54494d455354414d503b0a0a0a435245415445205441424c4520646174615f7365745f636f706965735f686973746f727920280a2020696420544543485f4944204e4f54204e554c4c2c0a202063635f696420544543485f4944204e4f54204e554c4c2c0a2020646174615f696420544543485f4944204e4f54204e554c4c2c0a202065787465726e616c5f636f646520544558545f56414c55452c0a20207061746820544558545f56414c55452c0a20206769745f636f6d6d69745f6861736820544558545f56414c55452c200a202065646d735f696420544543485f4944204e4f54204e554c4c2c0a2020706572735f69645f617574686f7220544543485f49442c0a202076616c69645f66726f6d5f74696d657374616d702054494d455f5354414d50204e4f54204e554c4c2c200a202076616c69645f756e74696c5f74696d657374616d702054494d455f5354414d50293b0a0a414c544552205441424c4520646174615f7365745f636f706965735f686973746f72792041444420434f4e53545241494e5420647363685f706b205052494d415259204b4559286964293b0a20200a4352454154452053455155454e434520646174615f7365745f636f706965735f686973746f72795f69645f7365713b0a20200a44524f50205649455720646174615f7365745f686973746f72795f766965773b0a20200a435245415445205649455720646174615f7365745f686973746f72795f7669657720415320280a202053454c4543540a20202020332a69642061732069642c0a202020206d61696e5f646174615f69642c0a2020202072656c6174696f6e5f747970652c0a202020206f7264696e616c2c0a20202020657870655f69642c0a2020202073616d705f69642c0a20202020646174615f69642c0a20202020656e746974795f7065726d5f69642c0a202020206e756c6c2061732064737470745f69642c0a202020206e756c6c2061732076616c75652c0a202020206e756c6c20617320766f636162756c6172795f7465726d2c0a202020206e756c6c206173206d6174657269616c2c0a202020206e756c6c2061732065787465726e616c5f636f64652c0a202020206e756c6c20617320706174682c0a202020206e756c6c206173206769745f636f6d6d69745f686173682c0a202020206e756c6c3a3a544543485f49442061732065646d735f69642c0a20202020706572735f69645f617574686f722c0a2020202076616c69645f66726f6d5f74696d657374616d702c0a2020202076616c69645f756e74696c5f74696d657374616d700a202046524f4d0a20202020646174615f7365745f72656c6174696f6e73686970735f686973746f72790a202057484552450a2020202076616c69645f756e74696c5f74696d657374616d70204953204e4f54204e554c4c290a554e494f4e0a202053454c4543540a20202020332a69642b312061732069642c0a2020202064735f6964206173206d61696e5f646174615f69642c0a202020206e756c6c2061732072656c6174696f6e5f747970652c0a202020206e756c6c206173206f7264696e616c2c0a202020206e756c6c20617320657870655f69642c0a202020206e756c6c2061732073616d705f69642c0a202020206e756c6c20617320646174615f69642c0a202020206e756c6c20617320656e746974795f7065726d5f69642c0a2020202064737470745f69642c0a2020202076616c75652c0a20202020766f636162756c6172795f7465726d2c0a202020206d6174657269616c2c0a202020206e756c6c2061732065787465726e616c5f636f64652c0a202020206e756c6c20617320706174682c0a202020206e756c6c206173206769745f636f6d6d69745f686173682c0a202020206e756c6c2061732065646d735f69642c0a20202020706572735f69645f617574686f722c0a2020202076616c69645f66726f6d5f74696d657374616d702c0a2020202076616c69645f756e74696c5f74696d657374616d700a202046524f4d0a20202020646174615f7365745f70726f706572746965735f686973746f72790a20554e494f4e0a20202853454c4543540a202020332a69642b322061732069642c0a20202020646174615f6964206173206d61696e5f646174615f69642c0a202020206e756c6c2061732072656c6174696f6e5f747970652c0a202020206e756c6c206173206f7264696e616c2c0a202020206e756c6c20617320657870655f69642c0a202020206e756c6c2061732073616d705f69642c0a202020206e756c6c20617320646174615f69642c0a202020206e756c6c20617320656e746974795f7065726d5f69642c0a202020206e756c6c2061732064737470745f69642c0a202020206e756c6c2061732076616c75652c0a202020206e756c6c20617320766f636162756c6172795f7465726d2c0a202020206e756c6c206173206d6174657269616c2c0a2020202065787465726e616c5f636f64652c0a20202020706174682c0a202020206769745f636f6d6d69745f686173682c0a2020202065646d735f69642c0a20202020706572735f69645f617574686f722c0a2020202076616c69645f66726f6d5f74696d657374616d702c0a2020202076616c69645f756e74696c5f74696d657374616d700a202046524f4d0a20202020646174615f7365745f636f706965735f686973746f72790a202057484552450a2020202076616c69645f756e74696c5f74696d657374616d70204953204e4f54204e554c4c293b0a202020200a435245415445204f52205245504c4143452052554c4520636f6e74656e745f636f706965735f686973746f72795f696e736572742041530a20204f4e20494e5345525420544f20636f6e74656e745f636f706965730a2020444f20414c534f20280a20202020494e5345525420494e544f20646174615f7365745f636f706965735f686973746f727920280a20202020202069642c0a20202020202063635f69642c0a202020202020646174615f69642c0a20202020202065787465726e616c5f636f64652c0a202020202020706174682c0a2020202020206769745f636f6d6d69745f686173682c0a20202020202065646d735f69642c0a202020202020706572735f69645f617574686f722c0a20202020202076616c69645f66726f6d5f74696d657374616d700a20202020292056414c55455320280a2020202020206e65787476616c2827646174615f7365745f636f706965735f686973746f72795f69645f73657127292c200a2020202020204e45572e69642c0a2020202020204e45572e646174615f69642c200a2020202020204e45572e65787465726e616c5f636f64652c0a2020202020204e45572e706174682c0a2020202020204e45572e6769745f636f6d6d69745f686173682c0a2020202020204e45572e65646d735f69642c0a2020202020204e45572e706572735f69645f726567697374657265722c0a2020202020204e45572e726567697374726174696f6e5f74696d657374616d70293b0a2020293b0a0a435245415445204f52205245504c4143452052554c4520636f6e74656e745f636f706965735f686973746f72795f64656c6574652041530a20204f4e2044454c45544520544f20636f6e74656e745f636f706965730a2020444f20414c534f20280a2020202055504441544520646174615f7365745f636f706965735f686973746f7279205345542076616c69645f756e74696c5f74696d657374616d70203d2043555252454e545f54494d455354414d500a2020202057484552452063635f6964203d204f4c442e69643b0a2020293b0a0a0a20200a \N 163 ../../../../openbis/source/sql/postgresql/migration/migration-162-163.sql SUCCESS 2017-10-09 17:02:53.104 \\x414c544552205441424c4520636f6e74656e745f636f706965732041444420434f4c554d4e206769745f7265706f7369746f72795f696420544558545f56414c55453b0a414c544552205441424c4520646174615f7365745f636f706965735f686973746f72792041444420434f4c554d4e206769745f7265706f7369746f72795f696420544558545f56414c55453b0a0a44524f50205649455720646174615f7365745f686973746f72795f766965773b0a0a435245415445205649455720646174615f7365745f686973746f72795f7669657720415320280a202053454c4543540a20202020332a69642061732069642c0a202020206d61696e5f646174615f69642c0a2020202072656c6174696f6e5f747970652c0a202020206f7264696e616c2c0a20202020657870655f69642c0a2020202073616d705f69642c0a20202020646174615f69642c0a20202020656e746974795f7065726d5f69642c0a202020206e756c6c2061732064737470745f69642c0a202020206e756c6c2061732076616c75652c0a202020206e756c6c20617320766f636162756c6172795f7465726d2c0a202020206e756c6c206173206d6174657269616c2c0a202020206e756c6c2061732065787465726e616c5f636f64652c0a202020206e756c6c20617320706174682c0a202020206e756c6c206173206769745f636f6d6d69745f686173682c0a202020206e756c6c206173206769745f7265706f7369746f72795f69642c0a202020206e756c6c3a3a544543485f49442061732065646d735f69642c0a20202020706572735f69645f617574686f722c0a2020202076616c69645f66726f6d5f74696d657374616d702c0a2020202076616c69645f756e74696c5f74696d657374616d700a202046524f4d0a20202020646174615f7365745f72656c6174696f6e73686970735f686973746f72790a202057484552450a2020202076616c69645f756e74696c5f74696d657374616d70204953204e4f54204e554c4c290a554e494f4e0a202053454c4543540a20202020332a69642b312061732069642c0a2020202064735f6964206173206d61696e5f646174615f69642c0a202020206e756c6c2061732072656c6174696f6e5f747970652c0a202020206e756c6c206173206f7264696e616c2c0a202020206e756c6c20617320657870655f69642c0a202020206e756c6c2061732073616d705f69642c0a202020206e756c6c20617320646174615f69642c0a202020206e756c6c20617320656e746974795f7065726d5f69642c0a2020202064737470745f69642c0a2020202076616c75652c0a20202020766f636162756c6172795f7465726d2c0a202020206d6174657269616c2c0a202020206e756c6c2061732065787465726e616c5f636f64652c0a202020206e756c6c20617320706174682c0a202020206e756c6c206173206769745f636f6d6d69745f686173682c0a202020206e756c6c206173206769745f7265706f7369746f72795f69642c0a202020206e756c6c2061732065646d735f69642c0a20202020706572735f69645f617574686f722c0a2020202076616c69645f66726f6d5f74696d657374616d702c0a2020202076616c69645f756e74696c5f74696d657374616d700a202046524f4d0a20202020646174615f7365745f70726f706572746965735f686973746f72790a20554e494f4e0a20202853454c4543540a202020332a69642b322061732069642c0a20202020646174615f6964206173206d61696e5f646174615f69642c0a202020206e756c6c2061732072656c6174696f6e5f747970652c0a202020206e756c6c206173206f7264696e616c2c0a202020206e756c6c20617320657870655f69642c0a202020206e756c6c2061732073616d705f69642c0a202020206e756c6c20617320646174615f69642c0a202020206e756c6c20617320656e746974795f7065726d5f69642c0a202020206e756c6c2061732064737470745f69642c0a202020206e756c6c2061732076616c75652c0a202020206e756c6c20617320766f636162756c6172795f7465726d2c0a202020206e756c6c206173206d6174657269616c2c0a2020202065787465726e616c5f636f64652c0a20202020706174682c0a202020206769745f636f6d6d69745f686173682c0a202020206769745f7265706f7369746f72795f69642c0a2020202065646d735f69642c0a20202020706572735f69645f617574686f722c0a2020202076616c69645f66726f6d5f74696d657374616d702c0a2020202076616c69645f756e74696c5f74696d657374616d700a202046524f4d0a20202020646174615f7365745f636f706965735f686973746f72790a202057484552450a2020202076616c69645f756e74696c5f74696d657374616d70204953204e4f54204e554c4c293b0a202020200a435245415445204f52205245504c4143452052554c4520636f6e74656e745f636f706965735f686973746f72795f696e736572742041530a20204f4e20494e5345525420544f20636f6e74656e745f636f706965730a2020444f20414c534f20280a20202020494e5345525420494e544f20646174615f7365745f636f706965735f686973746f727920280a20202020202069642c0a20202020202063635f69642c0a202020202020646174615f69642c0a20202020202065787465726e616c5f636f64652c0a202020202020706174682c0a2020202020206769745f636f6d6d69745f686173682c0a2020202020206769745f7265706f7369746f72795f69642c0a20202020202065646d735f69642c0a202020202020706572735f69645f617574686f722c0a20202020202076616c69645f66726f6d5f74696d657374616d700a20202020292056414c55455320280a2020202020206e65787476616c2827646174615f7365745f636f706965735f686973746f72795f69645f73657127292c200a2020202020204e45572e69642c0a2020202020204e45572e646174615f69642c200a2020202020204e45572e65787465726e616c5f636f64652c0a2020202020204e45572e706174682c0a2020202020204e45572e6769745f636f6d6d69745f686173682c0a2020202020204e45572e6769745f7265706f7369746f72795f69642c0a2020202020204e45572e65646d735f69642c0a2020202020204e45572e706572735f69645f726567697374657265722c0a2020202020204e45572e726567697374726174696f6e5f74696d657374616d70293b0a2020293b0a0a435245415445204f52205245504c4143452046554e4354494f4e20636f6e74656e745f636f706965735f756e697175656e6573735f636865636b28290a202052455455524e5320747269676765722041530a24424f4459240a424547494e0a20204e45572e6c6f636174696f6e5f756e697175655f636865636b203d204e45572e646174615f6964207c7c20272c27207c7c200a2020202020202020202020202020202020202020202020202020202020204e45572e65646d735f6964207c7c20272c27207c7c0a202020202020202020202020202020202020202020202020202020202020636f616c65736365284e45572e706174682c20272729207c7c20272c27207c7c200a202020202020202020202020202020202020202020202020202020202020636f616c65736365284e45572e6769745f636f6d6d69745f686173682c20272729207c7c20272c27207c7c200a202020202020202020202020202020202020202020202020202020202020636f616c65736365284e45572e6769745f7265706f7369746f72795f69642c20272729207c7c20272c27207c7c200a202020202020202020202020202020202020202020202020202020202020636f616c65736365284e45572e65787465726e616c5f636f64652c202727293b0a202052455455524e204e45573b0a454e443b0a24424f4459240a20204c414e47554147452027706c706773716c273b0a \N @@ -3929,6 +4000,11 @@ COPY database_version_logs (db_version, module_name, run_status, run_status_time 165 ../../../../openbis/source/sql/postgresql/migration/migration-164-165.sql SUCCESS 2017-10-09 17:02:53.181 \\x414c544552205441424c452065787465726e616c5f646174612041444420434f4c554d4e2068355f666f6c6465727320424f4f4c45414e5f43484152204e4f54204e554c4c2044454641554c54202754273b0a414c544552205441424c452065787465726e616c5f646174612041444420434f4c554d4e20683561725f666f6c6465727320424f4f4c45414e5f43484152204e4f54204e554c4c2044454641554c54202754273b0a0a414c544552205441424c452065787465726e616c5f6461746120414c54455220434f4c554d4e2068355f666f6c646572732044524f502044454641554c543b0a414c544552205441424c452065787465726e616c5f6461746120414c54455220434f4c554d4e20683561725f666f6c646572732044524f502044454641554c543b0a \N 166 ../../../../openbis/source/sql/postgresql/migration/migration-165-166.sql SUCCESS 2017-10-09 17:02:53.223 \\x2d2d204d6967726174696f6e2066726f6d2031363520746f203136360a0a2d2d207461626c650a435245415445205441424c452053454d414e5449435f414e4e4f544154494f4e532028494420544543485f4944204e4f54204e554c4c2c0a095045524d5f494420434f4445204e4f54204e554c4c2c0a09534154595f494420544543485f49442c200a09535450545f494420544543485f49442c0a09505254595f494420544543485f49442c0a095052454449434154455f4f4e544f4c4f47595f494420544558542c0a095052454449434154455f4f4e544f4c4f47595f56455253494f4e20544558542c0a095052454449434154455f414343455353494f4e5f494420544558542c0a0944455343524950544f525f4f4e544f4c4f47595f494420544558542c0a0944455343524950544f525f4f4e544f4c4f47595f56455253494f4e20544558542c0a0944455343524950544f525f414343455353494f4e5f494420544558542c0a094352454154494f4e5f444154452074696d655f7374616d705f64666c204e4f54204e554c4c0a09293b0a0a2d2d2073657175656e63650a4352454154452053455155454e43452053454d414e5449435f414e4e4f544154494f4e5f49445f5345513b0a0a2d2d20706b0a414c544552205441424c452053454d414e5449435f414e4e4f544154494f4e532041444420434f4e53545241494e542053454d414e5449435f414e4e4f544154494f4e535f504b205052494d415259204b4559284944293b0a0a2d2d20666b0a414c544552205441424c452053454d414e5449435f414e4e4f544154494f4e532041444420434f4e53545241494e542053454d414e5449435f414e4e4f544154494f4e535f534154595f49445f464b20464f524549474e204b45592028534154595f494429205245464552454e4345532053414d504c455f545950455328494429204f4e2044454c45544520434153434144452044454645525241424c4520494e495449414c4c592044454645525245443b0a414c544552205441424c452053454d414e5449435f414e4e4f544154494f4e532041444420434f4e53545241494e542053454d414e5449435f414e4e4f544154494f4e535f535450545f49445f464b20464f524549474e204b45592028535450545f494429205245464552454e4345532053414d504c455f545950455f50524f50455254595f545950455328494429204f4e2044454c45544520434153434144452044454645525241424c4520494e495449414c4c592044454645525245443b0a414c544552205441424c452053454d414e5449435f414e4e4f544154494f4e532041444420434f4e53545241494e542053454d414e5449435f414e4e4f544154494f4e535f505254595f49445f464b20464f524549474e204b45592028505254595f494429205245464552454e4345532050524f50455254595f545950455328494429204f4e2044454c45544520434153434144452044454645525241424c4520494e495449414c4c592044454645525245443b0a0a2d2d20696e646578200a43524541544520494e4445582053454d414e5449435f414e4e4f544154494f4e535f534154595f49445f49204f4e2053454d414e5449435f414e4e4f544154494f4e532028534154595f4944293b0a43524541544520494e4445582053454d414e5449435f414e4e4f544154494f4e535f535450545f49445f49204f4e2053454d414e5449435f414e4e4f544154494f4e532028535450545f4944293b0a43524541544520494e4445582053454d414e5449435f414e4e4f544154494f4e535f505254595f49445f49204f4e2053454d414e5449435f414e4e4f544154494f4e532028505254595f4944293b0a0a2d2d20636865636b730a414c544552205441424c452053454d414e5449435f414e4e4f544154494f4e532041444420434f4e53545241494e542053454d414e5449435f414e4e4f544154494f4e535f5353505f434b20434845434b200a092828534154595f4944204953204e4f54204e554c4c20414e4420535450545f4944204953204e554c4c20414e4420505254595f4944204953204e554c4c29204f52200a092028534154595f4944204953204e554c4c20414e4420535450545f4944204953204e4f54204e554c4c20414e4420505254595f4944204953204e554c4c29204f520a092028534154595f4944204953204e554c4c20414e4420535450545f4944204953204e554c4c20414e4420505254595f4944204953204e4f54204e554c4c290a09293b0a0a2d2d206772616e740a4752414e542053454c454354204f4e205441424c452053454d414e5449435f414e4e4f544154494f4e5320544f2047524f5550204f50454e4249535f524541444f4e4c593b0a \N 167 ../../../../openbis/source/sql/postgresql/migration/migration-166-167.sql SUCCESS 2017-10-09 17:02:53.304 \\x2d2d204d6967726174696f6e2066726f6d2031363520746f203136360a0a414c544552205441424c4520646174615f616c6c2041444420434f4c554d4e20646174615f7365745f6b696e6420646174615f7365745f6b696e642044454641554c542027504859534943414c27204e4f54204e554c4c3b0a0a55504441544520646174615f616c6c0a0953455420646174615f7365745f6b696e64203d20646174615f7365745f74797065732e646174615f7365745f6b696e640a0946524f4d20646174615f7365745f74797065730a09574845524520646174615f616c6c2e647374795f6964203d20646174615f7365745f74797065732e69643b0a0a55504441544520646174615f616c6c0a0953455420646174615f7365745f6b696e64203d2027504859534943414c270a0946524f4d2065787465726e616c5f646174610a0957484552452065787465726e616c5f646174612e646174615f6964203d20646174615f616c6c2e69643b0a0a55504441544520646174615f616c6c0a0953455420646174615f7365745f6b696e64203d20274c494e4b270a0946524f4d206c696e6b5f646174610a095748455245206c696e6b5f646174612e646174615f6964203d20646174615f616c6c2e69643b0a0a414c544552205441424c4520646174615f7365745f74797065732044524f5020434f4c554d4e20646174615f7365745f6b696e643b0a0a435245415445204f52205245504c414345205649455720646174612041530a202020202053454c4543542069642c20636f64652c20647374795f69642c20646173745f69642c20657870655f69642c20646174615f70726f64756365725f636f64652c2070726f64756374696f6e5f74696d657374616d702c2073616d705f69642c20726567697374726174696f6e5f74696d657374616d702c206163636573735f74696d657374616d702c20706572735f69645f726567697374657265722c20706572735f69645f6d6f6469666965722c2069735f76616c69642c206d6f64696669636174696f6e5f74696d657374616d702c2069735f646572697665642c2064656c5f69642c206f7269675f64656c2c2076657273696f6e2c20646174615f7365745f6b696e64200a2020202020202046524f4d20646174615f616c6c200a20202020202057484552452064656c5f6964204953204e554c4c3b0a0a435245415445204f52205245504c414345205649455720646174615f64656c657465642041530a202020202053454c4543542069642c20636f64652c20647374795f69642c20646173745f69642c20657870655f69642c20646174615f70726f64756365725f636f64652c2070726f64756374696f6e5f74696d657374616d702c2073616d705f69642c20726567697374726174696f6e5f74696d657374616d702c206163636573735f74696d657374616d702c20706572735f69645f726567697374657265722c20706572735f69645f6d6f6469666965722c2069735f76616c69642c206d6f64696669636174696f6e5f74696d657374616d702c2069735f646572697665642c2064656c5f69642c206f7269675f64656c2c2076657273696f6e2c20646174615f7365745f6b696e64200a2020202020202046524f4d20646174615f616c6c200a20202020202057484552452064656c5f6964204953204e4f54204e554c4c3b0a0a435245415445204f52205245504c4143452052554c4520646174615f696e736572742041530a20204f4e20494e5345525420544f206461746120444f20494e5354454144200a2020202020494e5345525420494e544f20646174615f616c6c20280a2020202020202069642c200a20202020202020636f64652c200a2020202020202064656c5f69642c0a202020202020206f7269675f64656c2c0a20202020202020657870655f69642c0a20202020202020646173745f69642c0a20202020202020646174615f70726f64756365725f636f64652c0a20202020202020647374795f69642c0a2020202020202069735f646572697665642c0a2020202020202069735f76616c69642c0a202020202020206d6f64696669636174696f6e5f74696d657374616d702c0a202020202020206163636573735f74696d657374616d702c0a20202020202020706572735f69645f726567697374657265722c0a20202020202020706572735f69645f6d6f6469666965722c0a2020202020202070726f64756374696f6e5f74696d657374616d702c0a20202020202020726567697374726174696f6e5f74696d657374616d702c0a2020202020202073616d705f69642c0a2020202020202076657273696f6e2c0a20202020202020646174615f7365745f6b696e640a2020202020292056414c55455320280a202020202020204e45572e69642c200a202020202020204e45572e636f64652c200a202020202020204e45572e64656c5f69642c200a202020202020204e45572e6f7269675f64656c2c0a202020202020204e45572e657870655f69642c0a202020202020204e45572e646173745f69642c0a202020202020204e45572e646174615f70726f64756365725f636f64652c0a202020202020204e45572e647374795f69642c0a202020202020204e45572e69735f646572697665642c200a202020202020204e45572e69735f76616c69642c0a202020202020204e45572e6d6f64696669636174696f6e5f74696d657374616d702c0a202020202020204e45572e6163636573735f74696d657374616d702c0a202020202020204e45572e706572735f69645f726567697374657265722c0a202020202020204e45572e706572735f69645f6d6f6469666965722c0a202020202020204e45572e70726f64756374696f6e5f74696d657374616d702c0a202020202020204e45572e726567697374726174696f6e5f74696d657374616d702c0a202020202020204e45572e73616d705f69642c0a202020202020204e45572e76657273696f6e2c0a202020202020204e45572e646174615f7365745f6b696e640a2020202020293b0a20202020200a435245415445204f52205245504c4143452052554c4520646174615f7570646174652041530a202020204f4e2055504441544520544f206461746120444f20494e5354454144200a2020202020202055504441544520646174615f616c6c0a2020202020202020202053455420636f6465203d204e45572e636f64652c0a202020202020202020202020202064656c5f6964203d204e45572e64656c5f69642c0a20202020202020202020202020206f7269675f64656c203d204e45572e6f7269675f64656c2c0a2020202020202020202020202020657870655f6964203d204e45572e657870655f69642c0a2020202020202020202020202020646173745f6964203d204e45572e646173745f69642c0a2020202020202020202020202020646174615f70726f64756365725f636f6465203d204e45572e646174615f70726f64756365725f636f64652c0a2020202020202020202020202020647374795f6964203d204e45572e647374795f69642c0a202020202020202020202020202069735f64657269766564203d204e45572e69735f646572697665642c0a202020202020202020202020202069735f76616c6964203d204e45572e69735f76616c69642c0a20202020202020202020202020206d6f64696669636174696f6e5f74696d657374616d70203d204e45572e6d6f64696669636174696f6e5f74696d657374616d702c0a20202020202020202020202020206163636573735f74696d657374616d70203d204e45572e6163636573735f74696d657374616d702c0a2020202020202020202020202020706572735f69645f72656769737465726572203d204e45572e706572735f69645f726567697374657265722c0a2020202020202020202020202020706572735f69645f6d6f646966696572203d204e45572e706572735f69645f6d6f6469666965722c0a202020202020202020202020202070726f64756374696f6e5f74696d657374616d70203d204e45572e70726f64756374696f6e5f74696d657374616d702c0a2020202020202020202020202020726567697374726174696f6e5f74696d657374616d70203d204e45572e726567697374726174696f6e5f74696d657374616d702c0a202020202020202020202020202073616d705f6964203d204e45572e73616d705f69642c0a202020202020202020202020202076657273696f6e203d204e45572e76657273696f6e2c0a2020202020202020202020202020646174615f7365745f6b696e64203d204e45572e646174615f7365745f6b696e640a202020202020205748455245206964203d204e45572e69643b0a0a2d2d206c696e6b5f64617461206d75737420726566657220746f2061206461746120736574206f66206b696e64204c494e4b0a435245415445204f52205245504c4143452046554e4354494f4e20636865636b5f646174615f7365745f6b696e645f6c696e6b28292052455455524e5320747269676765722041532024240a4445434c4152450a202020206b696e6420444154415f5345545f4b494e443b0a424547494e0a2020202053454c45435420646174615f7365745f6b696e6420494e544f206b696e640a202020202020202046524f4d20646174615f616c6c200a20202020202020205748455245206964203d204e45572e646174615f69643b0a2020202020202020494620286b696e64203c3e20274c494e4b2729205448454e200a202020202020202020202020524149534520455843455054494f4e20274c696e6b20646174612028446174612053657420436f64653a202529206d757374207265666572656e63652061206461746120736574206f66206b696e64204c494e4b202869732025292e272c200a202020202020202020202020202020202020202020202020202020204e45572e646174615f69642c206b696e643b0a2020202020202020454e442049463b0a2020202052455455524e204e45573b0a454e443b0a2424204c414e47554147452027706c706773716c273b0a0a43524541544520434f4e53545241494e54205452494747455220636865636b5f646174615f7365745f6b696e645f6c696e6b200a20202020414654455220494e53455254204f5220555044415445204f4e206c696e6b5f646174610a2020202044454645525241424c4520494e495449414c4c592044454645525245440a20202020464f52204541434820524f570a20202020455845435554452050524f43454455524520636865636b5f646174615f7365745f6b696e645f6c696e6b28293b0a0a2d2d2065787465726e616c5f64617461206d75737420726566657220746f2061206461746120736574206f66206b696e6420504859534943414c0a435245415445204f52205245504c4143452046554e4354494f4e20636865636b5f646174615f7365745f6b696e645f706879736963616c28292052455455524e5320747269676765722041532024240a4445434c4152450a202020206b696e6420444154415f5345545f4b494e443b0a424547494e0a2020202053454c45435420646174615f7365745f6b696e6420494e544f206b696e640a202020202020202046524f4d20646174615f616c6c200a20202020202020205748455245206964203d204e45572e646174615f69643b0a2020202020202020494620286b696e64203c3e2027504859534943414c2729205448454e200a202020202020202020202020524149534520455843455054494f4e202745787465726e616c20646174612028446174612053657420436f64653a202529206d757374207265666572656e63652061206461746120736574206f66206b696e6420504859534943414c202869732025292e272c200a202020202020202020202020202020202020202020202020202020204e45572e646174615f69642c206b696e643b0a2020202020202020454e442049463b0a2020202052455455524e204e45573b0a454e443b0a2424204c414e47554147452027706c706773716c273b0a0a43524541544520434f4e53545241494e54205452494747455220636865636b5f646174615f7365745f6b696e645f706879736963616c200a20202020414654455220494e53455254204f5220555044415445204f4e2065787465726e616c5f646174610a2020202044454645525241424c4520494e495449414c4c592044454645525245440a20202020464f52204541434820524f570a20202020455845435554452050524f43454455524520636865636b5f646174615f7365745f6b696e645f706879736963616c28293b0a0a \N +168 ../../../../openbis/source/sql/postgresql/migration/migration-167-168.sql SUCCESS 2018-07-12 13:54:11.132 \\x2d2d204d6967726174696f6e2066726f6d2031363720746f203136380a0a2d2d207065726d20696420756e6971756520636f6e73747261696e740a414c544552205441424c452053454d414e5449435f414e4e4f544154494f4e532041444420434f4e53545241494e542053454d414e5449435f414e4e4f544154494f4e535f5045524d5f49445f554b20554e4951554520285045524d5f4944293b0a \N +169 ../../../../openbis/source/sql/postgresql/migration/migration-168-169.sql SUCCESS 2018-07-12 13:54:11.583 \\x2d2d204d6967726174696f6e2066726f6d2031363820746f203136390a0a2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d0a2d2d2020507572706f73653a2020616c6c6f77206c6f6e67657220636f646573200a2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d0a0a2d2d2064726f702072756c657320666f72207462616c6520616e6420766965777320776869636820646570656e64206f6e20434f44450a64726f702072756c65206d6174657269616c5f70726f706572746965735f757064617465206f6e206d6174657269616c5f70726f706572746965733b0a64726f702072756c65206d6174657269616c5f70726f706572746965735f64656c657465206f6e206d6174657269616c5f70726f706572746965733b0a64726f702072756c652073616d706c655f70726f706572746965735f757064617465206f6e2073616d706c655f70726f706572746965733b0a64726f702072756c652073616d706c655f70726f706572746965735f64656c657465206f6e2073616d706c655f70726f706572746965733b0a64726f702072756c65206578706572696d656e745f70726f706572746965735f757064617465206f6e206578706572696d656e745f70726f706572746965733b0a64726f702072756c65206578706572696d656e745f70726f706572746965735f64656c657465206f6e206578706572696d656e745f70726f706572746965733b0a64726f702072756c6520646174615f7365745f70726f706572746965735f757064617465206f6e20646174615f7365745f70726f706572746965733b0a64726f702072756c6520646174615f7365745f70726f706572746965735f64656c657465206f6e20646174615f7365745f70726f706572746965733b0a64726f702072756c652073616d706c655f6578706572696d656e745f757064617465206f6e2073616d706c65735f616c6c3b0a64726f702072756c652073616d706c655f6578706572696d656e745f72656d6f76655f757064617465206f6e2073616d706c65735f616c6c3b0a64726f702072756c652073616d706c655f6578706572696d656e745f696e73657274206f6e2073616d706c65735f616c6c3b0a64726f702072756c652073616d706c655f6578706572696d656e745f64656c657465206f6e2073616d706c65735f616c6c3b0a64726f702072756c652073616d706c655f636f6e7461696e65725f757064617465206f6e2073616d706c65735f616c6c3b0a64726f702072756c652073616d706c655f636f6e7461696e65725f72656d6f76655f757064617465206f6e2073616d706c65735f616c6c3b0a64726f702072756c652073616d706c655f636f6e7461696e65725f696e73657274206f6e2073616d706c65735f616c6c3b0a64726f702072756c652073616d706c655f636f6e7461696e65725f64656c657465206f6e2073616d706c65735f616c6c3b0a64726f702072756c6520646174617365745f6578706572696d656e745f757064617465206f6e20646174615f616c6c3b0a64726f702072756c6520646174617365745f6578706572696d656e745f72656d6f76655f757064617465206f6e20646174615f616c6c3b0a64726f702072756c6520646174617365745f6578706572696d656e745f696e73657274206f6e20646174615f616c6c3b0a64726f702072756c6520646174617365745f6578706572696d656e745f64656c657465206f6e20646174615f616c6c3b0a64726f702072756c6520646174617365745f73616d706c655f757064617465206f6e20646174615f616c6c3b0a64726f702072756c6520646174617365745f73616d706c655f72656d6f76655f757064617465206f6e20646174615f616c6c3b0a64726f702072756c6520646174617365745f73616d706c655f696e73657274206f6e20646174615f616c6c3b0a64726f702072756c6520646174617365745f73616d706c655f64656c657465206f6e20646174615f616c6c3b0a64726f702072756c6520646174615f72656c6174696f6e736869705f696e73657274206f6e20646174615f7365745f72656c6174696f6e73686970735f616c6c3b0a64726f702072756c6520646174615f72656c6174696f6e736869705f64656c657465206f6e20646174615f7365745f72656c6174696f6e73686970735f616c6c3b0a64726f702072756c6520646174615f72656c6174696f6e736869705f757064617465206f6e20646174615f7365745f72656c6174696f6e73686970735f616c6c3b0a64726f702072756c6520646174615f72656c6174696f6e736869705f74726173685f757064617465206f6e20646174615f7365745f72656c6174696f6e73686970735f616c6c3b0a64726f702072756c6520646174615f72656c6174696f6e736869705f74726173685f7265766572745f757064617465206f6e20646174615f7365745f72656c6174696f6e73686970735f616c6c3b0a64726f702072756c652073616d706c655f706172656e745f6368696c645f696e73657274206f6e2073616d706c655f72656c6174696f6e73686970735f616c6c3b0a64726f702072756c652073616d706c655f706172656e745f6368696c645f64656c657465206f6e2073616d706c655f72656c6174696f6e73686970735f616c6c3b0a64726f702072756c652073616d706c655f706172656e745f6368696c645f757064617465206f6e2073616d706c655f72656c6174696f6e73686970735f616c6c3b0a64726f702072756c652073616d706c655f706172656e745f6368696c645f7265766572745f757064617465206f6e2073616d706c655f72656c6174696f6e73686970735f616c6c3b0a64726f702072756c65206578706572696d656e745f70726f6a6563745f757064617465206f6e206578706572696d656e74735f616c6c3b0a64726f702072756c65206578706572696d656e745f70726f6a6563745f72656d6f76655f757064617465206f6e206578706572696d656e74735f616c6c3b0a64726f702072756c65206578706572696d656e745f70726f6a6563745f696e73657274206f6e206578706572696d656e74735f616c6c3b0a64726f702072756c65206578706572696d656e745f70726f6a6563745f64656c657465206f6e206578706572696d656e74735f616c6c3b0a64726f702072756c652070726f6a6563745f73706163655f757064617465206f6e2070726f6a656374733b0a64726f702072756c652070726f6a6563745f73706163655f72656d6f76655f757064617465206f6e2070726f6a656374733b0a64726f702072756c652070726f6a6563745f73706163655f696e73657274206f6e2070726f6a656374733b0a64726f702072756c652073616d706c655f70726f6a6563745f757064617465206f6e2073616d706c65735f616c6c3b0a64726f702072756c652073616d706c655f70726f6a6563745f72656d6f76655f757064617465206f6e2073616d706c65735f616c6c3b0a64726f702072756c652073616d706c655f70726f6a6563745f696e73657274206f6e2073616d706c65735f616c6c3b0a64726f702072756c652073616d706c655f73706163655f757064617465206f6e2073616d706c65735f616c6c3b0a64726f702072756c652073616d706c655f73706163655f72656d6f76655f757064617465206f6e2073616d706c65735f616c6c3b0a64726f702072756c652073616d706c655f73706163655f696e73657274206f6e2073616d706c65735f616c6c3b0a64726f702072756c652073616d706c655f696e73657274206f6e2073616d706c65733b0a64726f702072756c652073616d706c655f757064617465206f6e2073616d706c65733b0a64726f702072756c652073616d706c655f64656c657465206f6e2073616d706c65733b0a64726f702072756c652073616d706c655f64656c657465645f757064617465206f6e2073616d706c65735f64656c657465643b0a64726f702072756c652073616d706c655f64656c657465645f64656c657465206f6e2073616d706c65735f64656c657465643b0a64726f702072756c65206578706572696d656e745f696e73657274206f6e206578706572696d656e74733b0a64726f702072756c65206578706572696d656e745f757064617465206f6e206578706572696d656e74733b0a64726f702072756c65206578706572696d656e745f64656c657465206f6e206578706572696d656e74733b0a64726f702072756c65206578706572696d656e74735f64656c657465645f757064617465206f6e206578706572696d656e74735f64656c657465643b200a64726f702072756c65206578706572696d656e74735f64656c657465645f64656c657465206f6e206578706572696d656e74735f64656c657465643b0a64726f702072756c6520646174615f696e73657274206f6e20646174613b0a64726f702072756c6520646174615f757064617465206f6e20646174613b0a64726f702072756c6520646174615f616c6c206f6e20646174613b0a64726f702072756c6520646174615f64656c657465645f757064617465206f6e20646174615f64656c657465643b0a64726f702072756c6520646174615f64656c657465645f64656c657465206f6e20646174615f64656c657465643b0a0a2d2d2064726f7020766965777320646570656e64696e67206f6e20434f44450a64726f70207669657720646174613b0a64726f70207669657720646174615f64656c657465643b0a64726f702076696577206578706572696d656e74733b0a64726f702076696577206578706572696d656e74735f64656c657465643b0a64726f7020766965772073616d706c65733b0a64726f7020766965772073616d706c65735f64656c657465643b0a0a2d2d2053776974636820616c6c2075736573206f662074686520646f6d61696e20636f646520287468657265206172652061206c6f74206f66207468656d212920746f207573652076617263686172283630290a616c746572207461626c6520415554484f52495a4154494f4e5f47524f55505320616c74657220636f6c756d6e20434f444520747970652076617263686172283630293b0a616c746572207461626c6520434f4e54524f4c4c45445f564f434142554c415249455320616c74657220636f6c756d6e20434f444520747970652076617263686172283630293b0a616c746572207461626c6520444154415f414c4c20616c74657220636f6c756d6e20434f444520747970652076617263686172283630292c20616c74657220636f6c756d6e20444154415f50524f44554345525f434f444520747970652076617263686172283630293b0a616c746572207461626c6520444154415f5345545f545950455320616c74657220636f6c756d6e20434f444520747970652076617263686172283630293b0a616c746572207461626c6520444154415f53544f52455320616c74657220636f6c756d6e20434f444520747970652076617263686172283630292c20616c74657220636f6c756d6e205555494420747970652076617263686172283630293b0a616c746572207461626c6520444154415f545950455320616c74657220636f6c756d6e20434f444520747970652076617263686172283630293b0a616c746572207461626c65204558504552494d454e545f545950455320616c74657220636f6c756d6e20434f444520747970652076617263686172283630293b0a616c746572207461626c65204558504552494d454e54535f414c4c20616c74657220636f6c756d6e205045524d5f494420747970652076617263686172283630292c20616c74657220636f6c756d6e20434f444520747970652076617263686172283630293b0a616c746572207461626c652045585445524e414c5f4441544120616c74657220636f6c756d6e2053484152455f494420747970652076617263686172283630293b0a616c746572207461626c652045585445524e414c5f444154415f4d414e4147454d454e545f53595354454d5320616c74657220636f6c756d6e20434f444520747970652076617263686172283630293b0a616c746572207461626c652046494c455f464f524d41545f545950455320616c74657220636f6c756d6e20434f444520747970652076617263686172283630293b0a616c746572207461626c65204c4f4341544f525f545950455320616c74657220636f6c756d6e20434f444520747970652076617263686172283630293b0a616c746572207461626c65204d4154455249414c5f545950455320616c74657220636f6c756d6e20434f444520747970652076617263686172283630293b0a616c746572207461626c65204d4154455249414c5320616c74657220636f6c756d6e20434f444520747970652076617263686172283630293b0a616c746572207461626c65204d45544150524f4a4543545320616c74657220636f6c756d6e204e414d4520747970652076617263686172283630293b0a616c746572207461626c65204f5045524154494f4e5f455845435554494f4e5320616c74657220636f6c756d6e20434f444520747970652076617263686172283630293b0a616c746572207461626c652050524f4a4543545320616c74657220636f6c756d6e20434f444520747970652076617263686172283630292c20616c74657220636f6c756d6e205045524d5f494420747970652076617263686172283630293b0a616c746572207461626c652050524f50455254595f545950455320616c74657220636f6c756d6e20434f444520747970652076617263686172283630293b0a616c746572207461626c652052454c4154494f4e534849505f545950455320616c74657220636f6c756d6e20434f444520747970652076617263686172283630293b0a616c746572207461626c65205155455249455320616c74657220636f6c756d6e2044425f4b455920747970652076617263686172283630292c20616c74657220636f6c756d6e20454e544954595f545950455f434f444520747970652076617263686172283630293b0a616c746572207461626c652053414d504c455f545950455320616c74657220636f6c756d6e20434f444520747970652076617263686172283630292c20616c74657220636f6c756d6e2067656e6572617465645f636f64655f70726566697820747970652076617263686172283630293b0a616c746572207461626c652053414d504c45535f414c4c20616c74657220636f6c756d6e205045524d5f494420747970652076617263686172283630292c20616c74657220636f6c756d6e20434f444520747970652076617263686172283630293b0a616c746572207461626c652053454d414e5449435f414e4e4f544154494f4e5320616c74657220636f6c756d6e205045524d5f494420747970652076617263686172283630293b0a616c746572207461626c652053504143455320616c74657220636f6c756d6e20434f444520747970652076617263686172283630293b0a0a2d2d20436f6e7665727420434f444520746f205641524348415228313030290a64726f7020444f4d41494e20434f44453b0a63726561746520444f4d41494e20434f4445206173207661726368617228313030293b0a0a2d2d2053776974636820616c6c20636f6c756d6e73206261636b20746f207573696e672074686520646f6d61696e20636f64650a616c746572207461626c6520415554484f52495a4154494f4e5f47524f55505320616c74657220636f6c756d6e20434f4445207479706520434f44453b0a616c746572207461626c6520434f4e54524f4c4c45445f564f434142554c415249455320616c74657220636f6c756d6e20434f4445207479706520434f44453b0a616c746572207461626c6520444154415f414c4c20616c74657220636f6c756d6e20434f4445207479706520434f44452c20616c74657220636f6c756d6e20444154415f50524f44554345525f434f4445207479706520434f44453b0a616c746572207461626c6520444154415f5345545f545950455320616c74657220636f6c756d6e20434f4445207479706520434f44453b0a616c746572207461626c6520444154415f53544f52455320616c74657220636f6c756d6e20434f4445207479706520434f44452c20616c74657220636f6c756d6e2055554944207479706520434f44453b0a616c746572207461626c6520444154415f545950455320616c74657220636f6c756d6e20434f4445207479706520434f44453b0a616c746572207461626c65204558504552494d454e545f545950455320616c74657220636f6c756d6e20434f4445207479706520434f44453b0a616c746572207461626c65204558504552494d454e54535f414c4c20616c74657220636f6c756d6e205045524d5f4944207479706520434f44452c20616c74657220636f6c756d6e20434f4445207479706520434f44453b0a616c746572207461626c652045585445524e414c5f4441544120616c74657220636f6c756d6e2053484152455f4944207479706520434f44453b0a616c746572207461626c652045585445524e414c5f444154415f4d414e4147454d454e545f53595354454d5320616c74657220636f6c756d6e20434f4445207479706520434f44453b0a616c746572207461626c652046494c455f464f524d41545f545950455320616c74657220636f6c756d6e20434f4445207479706520434f44453b0a616c746572207461626c65204c4f4341544f525f545950455320616c74657220636f6c756d6e20434f4445207479706520434f44453b0a616c746572207461626c65204d4154455249414c5f545950455320616c74657220636f6c756d6e20434f4445207479706520434f44453b0a616c746572207461626c65204d4154455249414c5320616c74657220636f6c756d6e20434f4445207479706520434f44453b0a616c746572207461626c65204d45544150524f4a4543545320616c74657220636f6c756d6e204e414d45207479706520434f44453b0a616c746572207461626c65204f5045524154494f4e5f455845435554494f4e5320616c74657220636f6c756d6e20434f4445207479706520434f44453b0a616c746572207461626c652050524f4a4543545320616c74657220636f6c756d6e20434f4445207479706520434f44452c20616c74657220636f6c756d6e205045524d5f4944207479706520434f44453b0a616c746572207461626c652050524f50455254595f545950455320616c74657220636f6c756d6e20434f4445207479706520434f44453b0a616c746572207461626c652052454c4154494f4e534849505f545950455320616c74657220636f6c756d6e20434f4445207479706520434f44453b0a616c746572207461626c65205155455249455320616c74657220636f6c756d6e2044425f4b4559207479706520434f44452c20616c74657220636f6c756d6e20454e544954595f545950455f434f4445207479706520434f44453b0a616c746572207461626c652053414d504c455f545950455320616c74657220636f6c756d6e20434f4445207479706520434f44452c20616c74657220636f6c756d6e2067656e6572617465645f636f64655f707265666978207479706520434f44453b0a616c746572207461626c652053414d504c45535f414c4c20616c74657220636f6c756d6e205045524d5f4944207479706520434f44452c20616c74657220636f6c756d6e20434f4445207479706520434f44453b0a616c746572207461626c652053454d414e5449435f414e4e4f544154494f4e5320616c74657220636f6c756d6e205045524d5f4944207479706520434f44453b0a616c746572207461626c652053504143455320616c74657220636f6c756d6e20434f4445207479706520434f44453b0a0a2d2d2052656372656174652076696577730a435245415445205649455720646174612041530a202020202053454c4543542069642c20636f64652c20647374795f69642c20646173745f69642c20657870655f69642c20646174615f70726f64756365725f636f64652c2070726f64756374696f6e5f74696d657374616d702c2073616d705f69642c20726567697374726174696f6e5f74696d657374616d702c206163636573735f74696d657374616d702c20706572735f69645f726567697374657265722c20706572735f69645f6d6f6469666965722c2069735f76616c69642c206d6f64696669636174696f6e5f74696d657374616d702c2069735f646572697665642c2064656c5f69642c206f7269675f64656c2c2076657273696f6e2c20646174615f7365745f6b696e64200a2020202020202046524f4d20646174615f616c6c200a20202020202057484552452064656c5f6964204953204e554c4c3b0a0a435245415445205649455720646174615f64656c657465642041530a202020202053454c4543542069642c20636f64652c20647374795f69642c20646173745f69642c20657870655f69642c20646174615f70726f64756365725f636f64652c2070726f64756374696f6e5f74696d657374616d702c2073616d705f69642c20726567697374726174696f6e5f74696d657374616d702c206163636573735f74696d657374616d702c20706572735f69645f726567697374657265722c20706572735f69645f6d6f6469666965722c2069735f76616c69642c206d6f64696669636174696f6e5f74696d657374616d702c2069735f646572697665642c2064656c5f69642c206f7269675f64656c2c2076657273696f6e2c20646174615f7365745f6b696e64200a2020202020202046524f4d20646174615f616c6c200a20202020202057484552452064656c5f6964204953204e4f54204e554c4c3b0a0a4352454154452056494557206578706572696d656e74732041530a202020202053454c4543542069642c207065726d5f69642c20636f64652c20657874795f69642c20706572735f69645f726567697374657265722c20706572735f69645f6d6f6469666965722c20726567697374726174696f6e5f74696d657374616d702c206d6f64696669636174696f6e5f74696d657374616d702c2070726f6a5f69642c2064656c5f69642c206f7269675f64656c2c2069735f7075626c69632c2076657273696f6e200a2020202020202046524f4d206578706572696d656e74735f616c6c200a20202020202057484552452064656c5f6964204953204e554c4c3b0a0a4352454154452056494557206578706572696d656e74735f64656c657465642041530a202020202053454c4543542069642c207065726d5f69642c20636f64652c20657874795f69642c20706572735f69645f726567697374657265722c20706572735f69645f6d6f6469666965722c20726567697374726174696f6e5f74696d657374616d702c206d6f64696669636174696f6e5f74696d657374616d702c2070726f6a5f69642c2064656c5f69642c206f7269675f64656c2c2069735f7075626c69632c2076657273696f6e200a2020202020202046524f4d206578706572696d656e74735f616c6c200a20202020202057484552452064656c5f6964204953204e4f54204e554c4c3b0a0a43524541544520564945572073616d706c65732041530a202020202053454c4543542069642c207065726d5f69642c20636f64652c2070726f6a5f69642c20657870655f69642c20736174795f69642c20726567697374726174696f6e5f74696d657374616d702c206d6f64696669636174696f6e5f74696d657374616d702c20706572735f69645f726567697374657265722c20706572735f69645f6d6f6469666965722c2064656c5f69642c206f7269675f64656c2c2073706163655f69642c2073616d705f69645f706172745f6f662c2076657273696f6e200a2020202020202046524f4d2073616d706c65735f616c6c200a20202020202057484552452064656c5f6964204953204e554c4c3b0a0a43524541544520564945572073616d706c65735f64656c657465642041530a202020202053454c4543542069642c207065726d5f69642c20636f64652c20657870655f69642c20736174795f69642c20726567697374726174696f6e5f74696d657374616d702c206d6f64696669636174696f6e5f74696d657374616d702c20706572735f69645f726567697374657265722c20706572735f69645f6d6f6469666965722c2064656c5f69642c206f7269675f64656c2c2073706163655f69642c2070726f6a5f69642c2073616d705f69645f706172745f6f662c2076657273696f6e200a2020202020202046524f4d2073616d706c65735f616c6c200a20202020202057484552452064656c5f6964204953204e4f54204e554c4c3b0a0a2d2d2052656372656174652072756c65730a435245415445204f52205245504c4143452052554c45206d6174657269616c5f70726f706572746965735f7570646174652041530a202020204f4e2055504441544520544f206d6174657269616c5f70726f70657274696573200a20202020574845524520284f4c442e56414c5545204953204e4f54204e554c4c20414e44206465636f6465287265706c61636528737562737472696e67284f4c442e76616c75652066726f6d203120666f722031292c20275c272c20275c5c27292c2027657363617065272920213d2045275c5c786566626662642720414e44204f4c442e56414c554520213d204e45572e56414c554529200a20202020202020204f5220284f4c442e435654455f4944204953204e4f54204e554c4c20414e44204f4c442e435654455f494420213d204e45572e435654455f494429200a20202020202020204f5220284f4c442e4d4154455f50524f505f4944204953204e4f54204e554c4c20414e44204f4c442e4d4154455f50524f505f494420213d204e45572e4d4154455f50524f505f4944290a20202020444f20414c534f200a20202020202020494e5345525420494e544f206d6174657269616c5f70726f706572746965735f686973746f727920280a20202020202020202049442c200a2020202020202020204d4154455f49442c200a2020202020202020204d5450545f49442c200a20202020202020202056414c55452c200a202020202020202020564f434142554c4152595f5445524d2c0a2020202020202020204d4154455249414c2c200a202020202020202020504552535f49445f415554484f522c0a20202020202020202056414c49445f46524f4d5f54494d455354414d502c0a20202020202020202056414c49445f554e54494c5f54494d455354414d50200a20202020202020292056414c55455320280a2020202020202020206e65787476616c28274d4154455249414c5f50524f50455254595f49445f53455127292c200a2020202020202020204f4c442e4d4154455f49442c200a2020202020202020204f4c442e4d5450545f49442c200a2020202020202020204f4c442e56414c55452c200a2020202020202020202873656c6563742028742e636f6465207c7c2027205b27207c7c20762e636f6465207c7c20275d27292066726f6d20636f6e74726f6c6c65645f766f636162756c6172795f7465726d732061732074206a6f696e20636f6e74726f6c6c65645f766f636162756c61726965732061732076206f6e20742e636f766f5f6964203d20762e696420776865726520742e6964203d204f4c442e435654455f4944292c0a2020202020202020202873656c65637420286d2e636f6465207c7c2027205b27207c7c206d742e636f6465207c7c20275d27292066726f6d206d6174657269616c73206173206d206a6f696e206d6174657269616c5f7479706573206173206d74206f6e206d2e6d6174795f6964203d206d742e6964207768657265206d2e6964203d204f4c442e4d4154455f50524f505f4944292c0a2020202020202020204f4c442e504552535f49445f415554484f522c0a2020202020202020204f4c442e4d4f44494649434154494f4e5f54494d455354414d502c0a2020202020202020204e45572e4d4f44494649434154494f4e5f54494d455354414d500a20202020202020293b0a0a435245415445204f52205245504c4143452052554c45206d6174657269616c5f70726f706572746965735f64656c6574652041530a202020204f4e2044454c45544520544f206d6174657269616c5f70726f70657274696573200a20202020574845524520284f4c442e56414c5545204953204e4f54204e554c4c20414e44206465636f6465287265706c61636528737562737472696e67284f4c442e76616c75652066726f6d203120666f722031292c20275c272c20275c5c27292c2027657363617065272920213d2045275c5c7865666266626427290a20202020202020204f52204f4c442e435654455f4944204953204e4f54204e554c4c200a20202020202020204f52204f4c442e4d4154455f50524f505f4944204953204e4f54204e554c4c0a20202020444f20414c534f200a20202020202020494e5345525420494e544f206d6174657269616c5f70726f706572746965735f686973746f727920280a20202020202020202049442c200a2020202020202020204d4154455f49442c200a2020202020202020204d5450545f49442c200a20202020202020202056414c55452c200a202020202020202020564f434142554c4152595f5445524d2c0a2020202020202020204d4154455249414c2c200a202020202020202020504552535f49445f415554484f522c0a20202020202020202056414c49445f46524f4d5f54494d455354414d502c0a20202020202020202056414c49445f554e54494c5f54494d455354414d50200a20202020202020292056414c55455320280a2020202020202020206e65787476616c28274d4154455249414c5f50524f50455254595f49445f53455127292c200a2020202020202020204f4c442e4d4154455f49442c200a2020202020202020204f4c442e4d5450545f49442c200a2020202020202020204f4c442e56414c55452c200a2020202020202020202873656c6563742028742e636f6465207c7c2027205b27207c7c20762e636f6465207c7c20275d27292066726f6d20636f6e74726f6c6c65645f766f636162756c6172795f7465726d732061732074206a6f696e20636f6e74726f6c6c65645f766f636162756c61726965732061732076206f6e20742e636f766f5f6964203d20762e696420776865726520742e6964203d204f4c442e435654455f4944292c0a2020202020202020202873656c65637420286d2e636f6465207c7c2027205b27207c7c206d742e636f6465207c7c20275d27292066726f6d206d6174657269616c73206173206d206a6f696e206d6174657269616c5f7479706573206173206d74206f6e206d2e6d6174795f6964203d206d742e6964207768657265206d2e6964203d204f4c442e4d4154455f50524f505f4944292c0a2020202020202020204f4c442e504552535f49445f415554484f522c0a2020202020202020204f4c442e4d4f44494649434154494f4e5f54494d455354414d502c0a20202020202020202063757272656e745f74696d657374616d700a20202020202020293b0a0a435245415445204f52205245504c4143452052554c45206578706572696d656e745f70726f706572746965735f7570646174652041530a202020204f4e2055504441544520544f206578706572696d656e745f70726f70657274696573200a20202020574845524520284f4c442e56414c5545204953204e4f54204e554c4c20414e44206465636f6465287265706c61636528737562737472696e67284f4c442e76616c75652066726f6d203120666f722031292c20275c272c20275c5c27292c2027657363617065272920213d2045275c5c786566626662642720414e44204f4c442e56414c554520213d204e45572e56414c554529200a20202020202020204f5220284f4c442e435654455f4944204953204e4f54204e554c4c20414e44204f4c442e435654455f494420213d204e45572e435654455f494429200a20202020202020204f5220284f4c442e4d4154455f50524f505f4944204953204e4f54204e554c4c20414e44204f4c442e4d4154455f50524f505f494420213d204e45572e4d4154455f50524f505f4944290a20202020444f20414c534f200a20202020202020494e5345525420494e544f206578706572696d656e745f70726f706572746965735f686973746f727920280a20202020202020202049442c200a202020202020202020455850455f49442c0a202020202020202020455450545f49442c200a20202020202020202056414c55452c200a202020202020202020564f434142554c4152595f5445524d2c0a2020202020202020204d4154455249414c2c200a202020202020202020504552535f49445f415554484f522c0a20202020202020202056414c49445f46524f4d5f54494d455354414d502c0a20202020202020202056414c49445f554e54494c5f54494d455354414d50200a20202020202020292056414c55455320280a2020202020202020206e65787476616c28274558504552494d454e545f50524f50455254595f49445f53455127292c200a2020202020202020204f4c442e455850455f49442c200a2020202020202020204f4c442e455450545f49442c200a2020202020202020204f4c442e56414c55452c200a2020202020202020202873656c6563742028742e636f6465207c7c2027205b27207c7c20762e636f6465207c7c20275d27292066726f6d20636f6e74726f6c6c65645f766f636162756c6172795f7465726d732061732074206a6f696e20636f6e74726f6c6c65645f766f636162756c61726965732061732076206f6e20742e636f766f5f6964203d20762e696420776865726520742e6964203d204f4c442e435654455f4944292c0a2020202020202020202873656c65637420286d2e636f6465207c7c2027205b27207c7c206d742e636f6465207c7c20275d27292066726f6d206d6174657269616c73206173206d206a6f696e206d6174657269616c5f7479706573206173206d74206f6e206d2e6d6174795f6964203d206d742e6964207768657265206d2e6964203d204f4c442e4d4154455f50524f505f4944292c0a2020202020202020204f4c442e504552535f49445f415554484f522c0a2020202020202020204f4c442e4d4f44494649434154494f4e5f54494d455354414d502c0a2020202020202020204e45572e4d4f44494649434154494f4e5f54494d455354414d500a20202020202020293b0a202020202020200a435245415445204f52205245504c4143452052554c45206578706572696d656e745f70726f706572746965735f64656c6574652041530a202020204f4e2044454c45544520544f206578706572696d656e745f70726f70657274696573200a20202020574845524520284f4c442e56414c5545204953204e4f54204e554c4c20414e44206465636f6465287265706c61636528737562737472696e67284f4c442e76616c75652066726f6d203120666f722031292c20275c272c20275c5c27292c2027657363617065272920213d2045275c5c7865666266626427290a20202020202020204f52204f4c442e435654455f4944204953204e4f54204e554c4c200a20202020202020204f52204f4c442e4d4154455f50524f505f4944204953204e4f54204e554c4c0a20202020444f20414c534f200a20202020202020494e5345525420494e544f206578706572696d656e745f70726f706572746965735f686973746f727920280a20202020202020202049442c200a202020202020202020455850455f49442c0a202020202020202020455450545f49442c200a20202020202020202056414c55452c200a202020202020202020564f434142554c4152595f5445524d2c0a2020202020202020204d4154455249414c2c200a202020202020202020504552535f49445f415554484f522c0a20202020202020202056414c49445f46524f4d5f54494d455354414d502c0a20202020202020202056414c49445f554e54494c5f54494d455354414d50200a20202020202020292056414c55455320280a2020202020202020206e65787476616c28274558504552494d454e545f50524f50455254595f49445f53455127292c200a2020202020202020204f4c442e455850455f49442c200a2020202020202020204f4c442e455450545f49442c200a2020202020202020204f4c442e56414c55452c200a2020202020202020202873656c6563742028742e636f6465207c7c2027205b27207c7c20762e636f6465207c7c20275d27292066726f6d20636f6e74726f6c6c65645f766f636162756c6172795f7465726d732061732074206a6f696e20636f6e74726f6c6c65645f766f636162756c61726965732061732076206f6e20742e636f766f5f6964203d20762e696420776865726520742e6964203d204f4c442e435654455f4944292c0a2020202020202020202873656c65637420286d2e636f6465207c7c2027205b27207c7c206d742e636f6465207c7c20275d27292066726f6d206d6174657269616c73206173206d206a6f696e206d6174657269616c5f7479706573206173206d74206f6e206d2e6d6174795f6964203d206d742e6964207768657265206d2e6964203d204f4c442e4d4154455f50524f505f4944292c0a2020202020202020204f4c442e504552535f49445f415554484f522c0a2020202020202020204f4c442e4d4f44494649434154494f4e5f54494d455354414d502c0a20202020202020202063757272656e745f74696d657374616d700a20202020202020293b0a0a435245415445204f52205245504c4143452052554c452073616d706c655f70726f706572746965735f7570646174652041530a202020204f4e2055504441544520544f2073616d706c655f70726f706572746965730a20202020574845524520284f4c442e56414c5545204953204e4f54204e554c4c20414e44206465636f6465287265706c61636528737562737472696e67284f4c442e76616c75652066726f6d203120666f722031292c20275c272c20275c5c27292c2027657363617065272920213d2045275c5c786566626662642720414e44204f4c442e56414c554520213d204e45572e56414c554529200a20202020202020204f5220284f4c442e435654455f4944204953204e4f54204e554c4c20414e44204f4c442e435654455f494420213d204e45572e435654455f494429200a20202020202020204f5220284f4c442e4d4154455f50524f505f4944204953204e4f54204e554c4c20414e44204f4c442e4d4154455f50524f505f494420213d204e45572e4d4154455f50524f505f4944290a20202020444f20414c534f0a20202020202020494e5345525420494e544f2073616d706c655f70726f706572746965735f686973746f727920280a20202020202020202049442c200a20202020202020202053414d505f49442c0a202020202020202020535450545f49442c200a20202020202020202056414c55452c200a202020202020202020564f434142554c4152595f5445524d2c0a2020202020202020204d4154455249414c2c200a202020202020202020504552535f49445f415554484f522c0a20202020202020202056414c49445f46524f4d5f54494d455354414d502c0a20202020202020202056414c49445f554e54494c5f54494d455354414d50200a20202020202020292056414c55455320280a2020202020202020206e65787476616c282753414d504c455f50524f50455254595f49445f53455127292c200a2020202020202020204f4c442e53414d505f49442c200a2020202020202020204f4c442e535450545f49442c200a2020202020202020204f4c442e56414c55452c200a2020202020202020202873656c6563742028742e636f6465207c7c2027205b27207c7c20762e636f6465207c7c20275d27292066726f6d20636f6e74726f6c6c65645f766f636162756c6172795f7465726d732061732074206a6f696e20636f6e74726f6c6c65645f766f636162756c61726965732061732076206f6e20742e636f766f5f6964203d20762e696420776865726520742e6964203d204f4c442e435654455f4944292c0a2020202020202020202873656c65637420286d2e636f6465207c7c2027205b27207c7c206d742e636f6465207c7c20275d27292066726f6d206d6174657269616c73206173206d206a6f696e206d6174657269616c5f7479706573206173206d74206f6e206d2e6d6174795f6964203d206d742e6964207768657265206d2e6964203d204f4c442e4d4154455f50524f505f4944292c0a2020202020202020204f4c442e504552535f49445f415554484f522c0a2020202020202020204f4c442e4d4f44494649434154494f4e5f54494d455354414d502c0a2020202020202020204e45572e4d4f44494649434154494f4e5f54494d455354414d500a20202020202020293b0a20202020202020202020202020200a435245415445204f52205245504c4143452052554c452073616d706c655f70726f706572746965735f64656c6574652041530a202020204f4e2044454c45544520544f2073616d706c655f70726f70657274696573200a2020202057484552452028284f4c442e56414c5545204953204e4f54204e554c4c20414e44206465636f6465287265706c61636528737562737472696e67284f4c442e76616c75652066726f6d203120666f722031292c20275c272c20275c5c27292c2027657363617065272920213d2045275c5c7865666266626427290a20202020202020204f52204f4c442e435654455f4944204953204e4f54204e554c4c200a20202020202020204f52204f4c442e4d4154455f50524f505f4944204953204e4f54204e554c4c290a2020202020414e44202853454c4543542044454c5f49442046524f4d2053414d504c45535f414c4c205748455245204944203d204f4c442e53414d505f494429204953204e554c4c0a2020202020444f20414c534f0a20202020202020494e5345525420494e544f2073616d706c655f70726f706572746965735f686973746f727920280a20202020202020202049442c200a20202020202020202053414d505f49442c0a202020202020202020535450545f49442c200a20202020202020202056414c55452c200a202020202020202020564f434142554c4152595f5445524d2c0a2020202020202020204d4154455249414c2c200a202020202020202020504552535f49445f415554484f522c0a20202020202020202056414c49445f46524f4d5f54494d455354414d502c0a20202020202020202056414c49445f554e54494c5f54494d455354414d50200a20202020202020292056414c55455320280a2020202020202020206e65787476616c282753414d504c455f50524f50455254595f49445f53455127292c200a2020202020202020204f4c442e53414d505f49442c200a2020202020202020204f4c442e535450545f49442c200a2020202020202020204f4c442e56414c55452c200a2020202020202020202873656c6563742028742e636f6465207c7c2027205b27207c7c20762e636f6465207c7c20275d27292066726f6d20636f6e74726f6c6c65645f766f636162756c6172795f7465726d732061732074206a6f696e20636f6e74726f6c6c65645f766f636162756c61726965732061732076206f6e20742e636f766f5f6964203d20762e696420776865726520742e6964203d204f4c442e435654455f4944292c0a2020202020202020202873656c65637420286d2e636f6465207c7c2027205b27207c7c206d742e636f6465207c7c20275d27292066726f6d206d6174657269616c73206173206d206a6f696e206d6174657269616c5f7479706573206173206d74206f6e206d2e6d6174795f6964203d206d742e6964207768657265206d2e6964203d204f4c442e4d4154455f50524f505f4944292c0a2020202020202020204f4c442e504552535f49445f415554484f522c0a2020202020202020204f4c442e4d4f44494649434154494f4e5f54494d455354414d502c0a20202020202020202063757272656e745f74696d657374616d700a20202020202020293b0a0a435245415445204f52205245504c4143452052554c4520646174615f7365745f70726f706572746965735f7570646174652041530a202020204f4e2055504441544520544f20646174615f7365745f70726f70657274696573200a20202020574845524520284f4c442e56414c5545204953204e4f54204e554c4c20414e44206465636f6465287265706c61636528737562737472696e67284f4c442e76616c75652066726f6d203120666f722031292c20275c272c20275c5c27292c2027657363617065272920213d2045275c5c786566626662642720414e44204f4c442e56414c554520213d204e45572e56414c554529200a20202020202020204f5220284f4c442e435654455f4944204953204e4f54204e554c4c20414e44204f4c442e435654455f494420213d204e45572e435654455f494429200a20202020202020204f5220284f4c442e4d4154455f50524f505f4944204953204e4f54204e554c4c20414e44204f4c442e4d4154455f50524f505f494420213d204e45572e4d4154455f50524f505f4944290a20202020444f20414c534f0a20202020202020494e5345525420494e544f20646174615f7365745f70726f706572746965735f686973746f727920280a20202020202020202049442c200a20202020202020202044535f49442c0a20202020202020202044535450545f49442c200a20202020202020202056414c55452c200a202020202020202020564f434142554c4152595f5445524d2c0a2020202020202020204d4154455249414c2c200a202020202020202020504552535f49445f415554484f522c0a20202020202020202056414c49445f46524f4d5f54494d455354414d502c0a20202020202020202056414c49445f554e54494c5f54494d455354414d50200a20202020202020292056414c55455320280a2020202020202020206e65787476616c2827444154415f5345545f50524f50455254595f49445f53455127292c200a2020202020202020204f4c442e44535f49442c200a2020202020202020204f4c442e44535450545f49442c200a2020202020202020204f4c442e56414c55452c200a2020202020202020202873656c6563742028742e636f6465207c7c2027205b27207c7c20762e636f6465207c7c20275d27292066726f6d20636f6e74726f6c6c65645f766f636162756c6172795f7465726d732061732074206a6f696e20636f6e74726f6c6c65645f766f636162756c61726965732061732076206f6e20742e636f766f5f6964203d20762e696420776865726520742e6964203d204f4c442e435654455f4944292c0a2020202020202020202873656c65637420286d2e636f6465207c7c2027205b27207c7c206d742e636f6465207c7c20275d27292066726f6d206d6174657269616c73206173206d206a6f696e206d6174657269616c5f7479706573206173206d74206f6e206d2e6d6174795f6964203d206d742e6964207768657265206d2e6964203d204f4c442e4d4154455f50524f505f4944292c0a2020202020202020204f4c442e504552535f49445f415554484f522c0a2020202020202020204f4c442e4d4f44494649434154494f4e5f54494d455354414d502c0a2020202020202020204e45572e4d4f44494649434154494f4e5f54494d455354414d500a20202020202020293b0a0a435245415445204f52205245504c4143452052554c4520646174615f7365745f70726f706572746965735f64656c6574652041530a202020204f4e2044454c45544520544f20646174615f7365745f70726f70657274696573200a2020202057484552452028284f4c442e56414c5545204953204e4f54204e554c4c20414e44206465636f6465287265706c61636528737562737472696e67284f4c442e76616c75652066726f6d203120666f722031292c20275c272c20275c5c27292c2027657363617065272920213d2045275c5c7865666266626427290a20202020202020204f52204f4c442e435654455f4944204953204e4f54204e554c4c200a20202020202020204f52204f4c442e4d4154455f50524f505f4944204953204e4f54204e554c4c290a2020202020414e44202853454c4543542044454c5f49442046524f4d20444154415f414c4c205748455245204944203d204f4c442e44535f494429204953204e554c4c0a20202020444f20414c534f0a20202020202020494e5345525420494e544f20646174615f7365745f70726f706572746965735f686973746f727920280a20202020202020202049442c200a20202020202020202044535f49442c0a20202020202020202044535450545f49442c200a20202020202020202056414c55452c200a202020202020202020564f434142554c4152595f5445524d2c0a2020202020202020204d4154455249414c2c200a202020202020202020504552535f49445f415554484f522c0a20202020202020202056414c49445f46524f4d5f54494d455354414d502c0a20202020202020202056414c49445f554e54494c5f54494d455354414d50200a20202020202020292056414c55455320280a2020202020202020206e65787476616c2827444154415f5345545f50524f50455254595f49445f53455127292c200a2020202020202020204f4c442e44535f49442c200a2020202020202020204f4c442e44535450545f49442c200a2020202020202020204f4c442e56414c55452c200a2020202020202020202873656c6563742028742e636f6465207c7c2027205b27207c7c20762e636f6465207c7c20275d27292066726f6d20636f6e74726f6c6c65645f766f636162756c6172795f7465726d732061732074206a6f696e20636f6e74726f6c6c65645f766f636162756c61726965732061732076206f6e20742e636f766f5f6964203d20762e696420776865726520742e6964203d204f4c442e435654455f4944292c0a2020202020202020202873656c65637420286d2e636f6465207c7c2027205b27207c7c206d742e636f6465207c7c20275d27292066726f6d206d6174657269616c73206173206d206a6f696e206d6174657269616c5f7479706573206173206d74206f6e206d2e6d6174795f6964203d206d742e6964207768657265206d2e6964203d204f4c442e4d4154455f50524f505f4944292c0a2020202020202020204f4c442e504552535f49445f415554484f522c0a2020202020202020204f4c442e4d4f44494649434154494f4e5f54494d455354414d502c0a20202020202020202063757272656e745f74696d657374616d700a20202020202020293b0a202020202020200a435245415445204f52205245504c4143452052554c452073616d706c655f6578706572696d656e745f7570646174652041530a202020204f4e2055504441544520544f2073616d706c65735f616c6c200a20202020574845524520284f4c442e455850455f494420213d204e45572e455850455f4944204f52204f4c442e455850455f4944204953204e554c4c2920414e44204e45572e455850455f4944204953204e4f54204e554c4c0a20202020444f20414c534f20280a20202020202020555044415445204558504552494d454e545f52454c4154494f4e53484950535f484953544f5259205345542056414c49445f554e54494c5f54494d455354414d50203d204e45572e4d4f44494649434154494f4e5f54494d455354414d500a2020202020202020205748455245204d41494e5f455850455f4944203d204f4c442e455850455f494420414e442053414d505f4944203d204f4c442e494420414e442056414c49445f554e54494c5f54494d455354414d50204953204e554c4c3b0a20202020202020494e5345525420494e544f204558504552494d454e545f52454c4154494f4e53484950535f484953544f525920280a20202020202020202049442c200a2020202020202020204d41494e5f455850455f49442c0a20202020202020202052454c4154494f4e5f545950452c200a20202020202020202053414d505f49442c200a202020202020202020454e544954595f5045524d5f49442c0a202020202020202020504552535f49445f415554484f522c0a20202020202020202056414c49445f46524f4d5f54494d455354414d500a20202020202020292056414c55455320280a2020202020202020206e65787476616c28274558504552494d454e545f52454c4154494f4e53484950535f484953544f52595f49445f53455127292c200a2020202020202020204e45572e455850455f49442c200a202020202020202020274f574e4552272c200a2020202020202020204e45572e49442c200a2020202020202020204e45572e5045524d5f49442c0a2020202020202020204e45572e504552535f49445f4d4f4449464945522c0a2020202020202020204e45572e4d4f44494649434154494f4e5f54494d455354414d500a20202020202020293b0a202020202020205550444154452053414d504c455f52454c4154494f4e53484950535f484953544f5259205345542056414c49445f554e54494c5f54494d455354414d50203d204e45572e4d4f44494649434154494f4e5f54494d455354414d50200a2020202020202020205748455245204d41494e5f53414d505f4944203d204f4c442e494420414e4420455850455f4944203d204f4c442e455850455f494420414e442056414c49445f554e54494c5f54494d455354414d50204953204e554c4c3b0a20202020202020494e5345525420494e544f2053414d504c455f52454c4154494f4e53484950535f484953544f525920280a20202020202020202049442c200a2020202020202020204d41494e5f53414d505f49442c0a20202020202020202052454c4154494f4e5f545950452c200a202020202020202020455850455f49442c200a202020202020202020454e544954595f5045524d5f49442c0a202020202020202020504552535f49445f415554484f522c0a20202020202020202056414c49445f46524f4d5f54494d455354414d500a20202020202020292056414c55455320280a2020202020202020206e65787476616c282753414d504c455f52454c4154494f4e53484950535f484953544f52595f49445f53455127292c200a2020202020202020204e45572e49442c200a202020202020202020274f574e4544272c200a2020202020202020204e45572e455850455f49442c200a2020202020202020202853454c454354205045524d5f49442046524f4d204558504552494d454e54535f414c4c205748455245204944203d204e45572e455850455f4944292c0a2020202020202020204e45572e504552535f49445f4d4f4449464945522c0a2020202020202020204e45572e4d4f44494649434154494f4e5f54494d455354414d500a20202020202020293b0a20202020293b0a202020200a435245415445204f52205245504c4143452052554c452073616d706c655f6578706572696d656e745f72656d6f76655f7570646174652041530a202020204f4e2055504441544520544f2073616d706c65735f616c6c200a202020205748455245204f4c442e455850455f4944204953204e4f54204e554c4c20414e44204e45572e455850455f4944204953204e554c4c0a20202020444f20414c534f20280a20202020202020555044415445204558504552494d454e545f52454c4154494f4e53484950535f484953544f5259205345542056414c49445f554e54494c5f54494d455354414d50203d204e45572e4d4f44494649434154494f4e5f54494d455354414d500a2020202020202020205748455245204d41494e5f455850455f4944203d204f4c442e455850455f494420414e442053414d505f4944203d204f4c442e494420414e442056414c49445f554e54494c5f54494d455354414d50204953204e554c4c3b0a202020202020205550444154452053414d504c455f52454c4154494f4e53484950535f484953544f5259205345542056414c49445f554e54494c5f54494d455354414d50203d204e45572e4d4f44494649434154494f4e5f54494d455354414d50200a2020202020202020205748455245204d41494e5f53414d505f4944203d204f4c442e494420414e4420455850455f4944203d204f4c442e455850455f494420414e442056414c49445f554e54494c5f54494d455354414d50204953204e554c4c3b0a20202020293b0a202020200a435245415445204f52205245504c4143452052554c452073616d706c655f6578706572696d656e745f696e736572742041530a202020204f4e20494e5345525420544f2073616d706c65735f616c6c200a202020205748455245204e45572e455850455f4944204953204e4f54204e554c4c0a20202020202020444f20414c534f20280a20202020202020494e5345525420494e544f204558504552494d454e545f52454c4154494f4e53484950535f484953544f525920280a20202020202020202049442c200a2020202020202020204d41494e5f455850455f49442c0a20202020202020202052454c4154494f4e5f545950452c200a20202020202020202053414d505f49442c200a202020202020202020454e544954595f5045524d5f49442c0a202020202020202020504552535f49445f415554484f522c0a20202020202020202056414c49445f46524f4d5f54494d455354414d500a20202020202020292056414c55455320280a2020202020202020206e65787476616c28274558504552494d454e545f52454c4154494f4e53484950535f484953544f52595f49445f53455127292c200a2020202020202020204e45572e455850455f49442c200a202020202020202020274f574e4552272c200a2020202020202020204e45572e49442c200a2020202020202020204e45572e5045524d5f49442c0a2020202020202020204e45572e504552535f49445f4d4f4449464945522c0a2020202020202020204e45572e4d4f44494649434154494f4e5f54494d455354414d500a20202020202020293b0a20202020202020494e5345525420494e544f2053414d504c455f52454c4154494f4e53484950535f484953544f525920280a20202020202020202049442c200a2020202020202020204d41494e5f53414d505f49442c0a20202020202020202052454c4154494f4e5f545950452c200a202020202020202020455850455f49442c200a202020202020202020454e544954595f5045524d5f49442c0a202020202020202020504552535f49445f415554484f522c0a20202020202020202056414c49445f46524f4d5f54494d455354414d500a20202020202020292056414c55455320280a2020202020202020206e65787476616c282753414d504c455f52454c4154494f4e53484950535f484953544f52595f49445f53455127292c200a2020202020202020204e45572e49442c200a202020202020202020274f574e4544272c200a2020202020202020204e45572e455850455f49442c200a2020202020202020202853454c454354205045524d5f49442046524f4d204558504552494d454e54535f414c4c205748455245204944203d204e45572e455850455f4944292c0a2020202020202020204e45572e504552535f49445f4d4f4449464945522c0a2020202020202020204e45572e4d4f44494649434154494f4e5f54494d455354414d500a20202020202020293b0a202020293b0a2020200a435245415445204f52205245504c4143452052554c452073616d706c655f6578706572696d656e745f64656c6574652041530a202020204f4e2044454c45544520544f2073616d706c65735f616c6c200a202020205748455245204f4c442e455850455f4944204953204e4f54204e554c4c0a20202020202020444f20414c534f200a20202020202020555044415445204558504552494d454e545f52454c4154494f4e53484950535f484953544f5259205345542056414c49445f554e54494c5f54494d455354414d50203d2063757272656e745f74696d657374616d70200a2020202020202020205748455245204d41494e5f455850455f4944203d204f4c442e455850455f494420414e442053414d505f4944203d204f4c442e494420414e442056414c49445f554e54494c5f54494d455354414d50204953204e554c4c3b0a20202020200a435245415445204f52205245504c4143452052554c452073616d706c655f636f6e7461696e65725f7570646174652041530a202020204f4e2055504441544520544f2073616d706c65735f616c6c200a20202020574845524520284f4c442e53414d505f49445f504152545f4f4620213d204e45572e53414d505f49445f504152545f4f46204f52204f4c442e53414d505f49445f504152545f4f46204953204e554c4c2920414e44204e45572e53414d505f49445f504152545f4f46204953204e4f54204e554c4c0a20202020444f20414c534f20280a202020202020205550444154452053414d504c455f52454c4154494f4e53484950535f484953544f5259205345542056414c49445f554e54494c5f54494d455354414d50203d204e45572e4d4f44494649434154494f4e5f54494d455354414d50200a202020202020202020574845524520284d41494e5f53414d505f4944203d204f4c442e53414d505f49445f504152545f4f4620414e442053414d505f4944203d204f4c442e494420414e442056414c49445f554e54494c5f54494d455354414d50204953204e554c4c20414e442052454c4154494f4e5f54595045203d2027434f4e5441494e455227290a20202020202020202020204f5220284d41494e5f53414d505f4944203d204f4c442e494420414e442053414d505f4944203d204f4c442e53414d505f49445f504152545f4f4620414e442056414c49445f554e54494c5f54494d455354414d50204953204e554c4c20414e442052454c4154494f4e5f54595045203d2027434f4e5441494e454427293b0a20202020202020494e5345525420494e544f2053414d504c455f52454c4154494f4e53484950535f484953544f525920280a20202020202020202049442c200a2020202020202020204d41494e5f53414d505f49442c0a20202020202020202052454c4154494f4e5f545950452c200a20202020202020202053414d505f49442c200a202020202020202020454e544954595f5045524d5f49442c0a202020202020202020504552535f49445f415554484f522c0a20202020202020202056414c49445f46524f4d5f54494d455354414d500a20202020202020292056414c55455320280a2020202020202020206e65787476616c282753414d504c455f52454c4154494f4e53484950535f484953544f52595f49445f53455127292c200a2020202020202020204e45572e53414d505f49445f504152545f4f462c200a20202020202020202027434f4e5441494e4552272c200a2020202020202020204e45572e49442c200a2020202020202020204e45572e5045524d5f49442c0a2020202020202020204e45572e504552535f49445f4d4f4449464945522c0a2020202020202020204e45572e4d4f44494649434154494f4e5f54494d455354414d500a20202020202020293b0a20202020202020494e5345525420494e544f2053414d504c455f52454c4154494f4e53484950535f484953544f525920280a20202020202020202049442c200a2020202020202020204d41494e5f53414d505f49442c0a20202020202020202052454c4154494f4e5f545950452c200a20202020202020202053414d505f49442c200a202020202020202020454e544954595f5045524d5f49442c0a202020202020202020504552535f49445f415554484f522c0a20202020202020202056414c49445f46524f4d5f54494d455354414d500a20202020202020292056414c55455320280a2020202020202020206e65787476616c282753414d504c455f52454c4154494f4e53484950535f484953544f52595f49445f53455127292c200a2020202020202020204e45572e49442c200a20202020202020202027434f4e5441494e4544272c200a2020202020202020204e45572e53414d505f49445f504152545f4f462c200a2020202020202020202853454c454354205045524d5f49442046524f4d2053414d504c45535f414c4c205748455245204944203d204e45572e53414d505f49445f504152545f4f46292c0a2020202020202020204e45572e504552535f49445f4d4f4449464945522c0a2020202020202020204e45572e4d4f44494649434154494f4e5f54494d455354414d500a20202020202020293b0a20202020293b0a202020200a435245415445204f52205245504c4143452052554c452073616d706c655f636f6e7461696e65725f72656d6f76655f7570646174652041530a202020204f4e2055504441544520544f2073616d706c65735f616c6c200a202020205748455245204f4c442e53414d505f49445f504152545f4f46204953204e4f54204e554c4c20414e44204e45572e53414d505f49445f504152545f4f46204953204e554c4c0a20202020444f20414c534f20280a202020202020205550444154452053414d504c455f52454c4154494f4e53484950535f484953544f5259205345542056414c49445f554e54494c5f54494d455354414d50203d204e45572e4d4f44494649434154494f4e5f54494d455354414d50200a202020202020202020574845524520284d41494e5f53414d505f4944203d204f4c442e53414d505f49445f504152545f4f4620414e442053414d505f4944203d204f4c442e494420414e442056414c49445f554e54494c5f54494d455354414d50204953204e554c4c20414e442052454c4154494f4e5f54595045203d2027434f4e5441494e455227290a20202020202020202020204f5220284d41494e5f53414d505f4944203d204f4c442e494420414e442053414d505f4944203d204f4c442e53414d505f49445f504152545f4f4620414e442056414c49445f554e54494c5f54494d455354414d50204953204e554c4c20414e442052454c4154494f4e5f54595045203d2027434f4e5441494e454427293b0a20202020293b0a202020200a435245415445204f52205245504c4143452052554c452073616d706c655f636f6e7461696e65725f696e736572742041530a202020204f4e20494e5345525420544f2073616d706c65735f616c6c200a202020205748455245204e45572e53414d505f49445f504152545f4f46204953204e4f54204e554c4c0a20202020202020444f20414c534f20280a20202020202020494e5345525420494e544f2053414d504c455f52454c4154494f4e53484950535f484953544f525920280a20202020202020202049442c200a2020202020202020204d41494e5f53414d505f49442c0a20202020202020202052454c4154494f4e5f545950452c200a20202020202020202053414d505f49442c200a202020202020202020454e544954595f5045524d5f49442c0a202020202020202020504552535f49445f415554484f522c0a20202020202020202056414c49445f46524f4d5f54494d455354414d500a20202020202020292056414c55455320280a2020202020202020206e65787476616c282753414d504c455f52454c4154494f4e53484950535f484953544f52595f49445f53455127292c200a2020202020202020204e45572e53414d505f49445f504152545f4f462c200a20202020202020202027434f4e5441494e4552272c200a2020202020202020204e45572e49442c200a2020202020202020204e45572e5045524d5f49442c0a2020202020202020204e45572e504552535f49445f4d4f4449464945522c0a2020202020202020204e45572e4d4f44494649434154494f4e5f54494d455354414d500a20202020202020293b0a20202020202020494e5345525420494e544f2053414d504c455f52454c4154494f4e53484950535f484953544f525920280a20202020202020202049442c200a2020202020202020204d41494e5f53414d505f49442c0a20202020202020202052454c4154494f4e5f545950452c200a20202020202020202053414d505f49442c200a202020202020202020454e544954595f5045524d5f49442c0a202020202020202020504552535f49445f415554484f522c0a20202020202020202056414c49445f46524f4d5f54494d455354414d500a20202020202020292056414c55455320280a2020202020202020206e65787476616c282753414d504c455f52454c4154494f4e53484950535f484953544f52595f49445f53455127292c200a2020202020202020204e45572e49442c200a20202020202020202027434f4e5441494e4544272c200a2020202020202020204e45572e53414d505f49445f504152545f4f462c200a2020202020202020202853454c454354205045524d5f49442046524f4d2053414d504c45535f414c4c205748455245204944203d204e45572e53414d505f49445f504152545f4f46292c0a2020202020202020204e45572e504552535f49445f4d4f4449464945522c0a2020202020202020204e45572e4d4f44494649434154494f4e5f54494d455354414d500a20202020202020293b0a202020293b0a2020200a435245415445204f52205245504c4143452052554c452073616d706c655f636f6e7461696e65725f64656c6574652041530a202020204f4e2044454c45544520544f2073616d706c65735f616c6c200a202020205748455245204f4c442e53414d505f49445f504152545f4f46204953204e4f54204e554c4c0a20202020202020444f20414c534f200a202020202020205550444154452053414d504c455f52454c4154494f4e53484950535f484953544f5259205345542056414c49445f554e54494c5f54494d455354414d50203d2063757272656e745f74696d657374616d70200a2020202020202020205748455245204d41494e5f53414d505f4944203d204f4c442e53414d505f49445f504152545f4f4620414e442053414d505f4944203d204f4c442e494420414e442056414c49445f554e54494c5f54494d455354414d50204953204e554c4c20414e442052454c4154494f4e5f54595045203d2027434f4e5441494e4552273b0a0a435245415445204f52205245504c4143452052554c4520646174617365745f6578706572696d656e745f7570646174652041530a202020204f4e2055504441544520544f20646174615f616c6c200a20202020574845524520284f4c442e455850455f494420213d204e45572e455850455f4944204f52204f4c442e53414d505f4944204953204e4f54204e554c4c2920414e44204e45572e53414d505f4944204953204e554c4c0a20202020444f20414c534f20280a20202020202020555044415445204558504552494d454e545f52454c4154494f4e53484950535f484953544f5259205345542056414c49445f554e54494c5f54494d455354414d50203d204e45572e4d4f44494649434154494f4e5f54494d455354414d500a2020202020202020205748455245204d41494e5f455850455f4944203d204f4c442e455850455f494420414e4420444154415f4944203d204f4c442e494420414e442056414c49445f554e54494c5f54494d455354414d50204953204e554c4c3b0a20202020202020494e5345525420494e544f204558504552494d454e545f52454c4154494f4e53484950535f484953544f525920280a20202020202020202049442c200a2020202020202020204d41494e5f455850455f49442c0a20202020202020202052454c4154494f4e5f545950452c200a202020202020202020444154415f49442c200a202020202020202020454e544954595f5045524d5f49442c0a202020202020202020504552535f49445f415554484f522c0a20202020202020202056414c49445f46524f4d5f54494d455354414d500a20202020202020292056414c55455320280a2020202020202020206e65787476616c28274558504552494d454e545f52454c4154494f4e53484950535f484953544f52595f49445f53455127292c200a2020202020202020204e45572e455850455f49442c200a202020202020202020274f574e4552272c200a2020202020202020204e45572e49442c200a2020202020202020204e45572e434f44452c0a2020202020202020204e45572e504552535f49445f4d4f4449464945522c0a2020202020202020204e45572e4d4f44494649434154494f4e5f54494d455354414d500a20202020202020293b0a2020202020202055504441544520444154415f5345545f52454c4154494f4e53484950535f484953544f5259205345542056414c49445f554e54494c5f54494d455354414d50203d204e45572e4d4f44494649434154494f4e5f54494d455354414d50200a202020202020202020574845524520284d41494e5f444154415f4944203d204f4c442e494420414e4420455850455f4944203d204f4c442e455850455f494420414e442056414c49445f554e54494c5f54494d455354414d50204953204e554c4c293b0a20202020202020494e5345525420494e544f20444154415f5345545f52454c4154494f4e53484950535f484953544f525920280a20202020202020202049442c200a2020202020202020204d41494e5f444154415f49442c0a20202020202020202052454c4154494f4e5f545950452c200a202020202020202020455850455f49442c200a202020202020202020454e544954595f5045524d5f49442c0a202020202020202020504552535f49445f415554484f522c0a20202020202020202056414c49445f46524f4d5f54494d455354414d500a20202020202020292056414c55455320280a2020202020202020206e65787476616c2827444154415f5345545f52454c4154494f4e53484950535f484953544f52595f49445f53455127292c200a2020202020202020204e45572e49442c200a202020202020202020274f574e4544272c200a2020202020202020204e45572e455850455f49442c200a2020202020202020202853454c454354205045524d5f49442046524f4d204558504552494d454e54535f414c4c205748455245204944203d204e45572e455850455f4944292c0a2020202020202020204e45572e504552535f49445f4d4f4449464945522c0a2020202020202020204e45572e4d4f44494649434154494f4e5f54494d455354414d500a20202020202020293b0a20202020293b0a202020200a435245415445204f52205245504c4143452052554c4520646174617365745f6578706572696d656e745f72656d6f76655f7570646174652041530a202020204f4e2055504441544520544f20646174615f616c6c200a202020205748455245204f4c442e53414d505f4944204953204e554c4c20414e44204e45572e53414d505f4944204953204e4f54204e554c4c0a20202020444f20414c534f20280a20202020202020555044415445204558504552494d454e545f52454c4154494f4e53484950535f484953544f5259205345542056414c49445f554e54494c5f54494d455354414d50203d204e45572e4d4f44494649434154494f4e5f54494d455354414d500a2020202020202020205748455245204d41494e5f455850455f4944203d204f4c442e455850455f494420414e4420444154415f4944203d204f4c442e494420414e442056414c49445f554e54494c5f54494d455354414d50204953204e554c4c3b0a2020202020202055504441544520444154415f5345545f52454c4154494f4e53484950535f484953544f5259205345542056414c49445f554e54494c5f54494d455354414d50203d204e45572e4d4f44494649434154494f4e5f54494d455354414d50200a2020202020202020205748455245204d41494e5f444154415f4944203d204f4c442e494420414e4420455850455f4944203d204f4c442e455850455f494420414e442056414c49445f554e54494c5f54494d455354414d50204953204e554c4c3b0a20202020293b0a202020200a435245415445204f52205245504c4143452052554c4520646174617365745f6578706572696d656e745f696e736572742041530a202020204f4e20494e5345525420544f20646174615f616c6c200a202020205748455245204e45572e455850455f4944204953204e4f54204e554c4c20414e44204e45572e53414d505f4944204953204e554c4c0a20202020202020444f20414c534f20280a20202020202020494e5345525420494e544f204558504552494d454e545f52454c4154494f4e53484950535f484953544f525920280a20202020202020202049442c200a2020202020202020204d41494e5f455850455f49442c0a20202020202020202052454c4154494f4e5f545950452c200a202020202020202020444154415f49442c200a202020202020202020454e544954595f5045524d5f49442c0a202020202020202020504552535f49445f415554484f522c0a20202020202020202056414c49445f46524f4d5f54494d455354414d500a20202020202020292056414c55455320280a2020202020202020206e65787476616c28274558504552494d454e545f52454c4154494f4e53484950535f484953544f52595f49445f53455127292c200a2020202020202020204e45572e455850455f49442c200a202020202020202020274f574e4552272c200a2020202020202020204e45572e49442c200a2020202020202020204e45572e434f44452c0a2020202020202020204e45572e504552535f49445f4d4f4449464945522c0a2020202020202020204e45572e4d4f44494649434154494f4e5f54494d455354414d500a20202020202020293b0a20202020202020494e5345525420494e544f20444154415f5345545f52454c4154494f4e53484950535f484953544f525920280a20202020202020202049442c200a2020202020202020204d41494e5f444154415f49442c0a20202020202020202052454c4154494f4e5f545950452c200a202020202020202020455850455f49442c200a202020202020202020454e544954595f5045524d5f49442c0a202020202020202020504552535f49445f415554484f522c0a20202020202020202056414c49445f46524f4d5f54494d455354414d500a20202020202020292056414c55455320280a2020202020202020206e65787476616c2827444154415f5345545f52454c4154494f4e53484950535f484953544f52595f49445f53455127292c200a2020202020202020204e45572e49442c200a202020202020202020274f574e4544272c200a2020202020202020204e45572e455850455f49442c200a2020202020202020202853454c454354205045524d5f49442046524f4d204558504552494d454e54535f414c4c205748455245204944203d204e45572e455850455f4944292c0a2020202020202020204e45572e504552535f49445f4d4f4449464945522c0a2020202020202020204e45572e4d4f44494649434154494f4e5f54494d455354414d500a20202020202020293b0a202020293b0a2020200a435245415445204f52205245504c4143452052554c4520646174617365745f6578706572696d656e745f64656c6574652041530a202020204f4e2044454c45544520544f20646174615f616c6c200a202020205748455245204f4c442e455850455f4944204953204e4f54204e554c4c20414e44204f4c442e53414d505f4944204953204e554c4c0a20202020202020444f20414c534f200a20202020202020555044415445204558504552494d454e545f52454c4154494f4e53484950535f484953544f5259205345542056414c49445f554e54494c5f54494d455354414d50203d2063757272656e745f74696d657374616d70200a2020202020202020205748455245204d41494e5f455850455f4944203d204f4c442e455850455f494420414e4420444154415f4944203d204f4c442e494420414e442056414c49445f554e54494c5f54494d455354414d50204953204e554c4c3b0a0a435245415445204f52205245504c4143452052554c4520646174617365745f73616d706c655f7570646174652041530a202020204f4e2055504441544520544f20646174615f616c6c200a20202020574845524520284f4c442e53414d505f494420213d204e45572e53414d505f4944204f52204f4c442e53414d505f4944204953204e554c4c2920414e44204e45572e53414d505f4944204953204e4f54204e554c4c0a20202020444f20414c534f20280a202020202020205550444154452053414d504c455f52454c4154494f4e53484950535f484953544f5259205345542056414c49445f554e54494c5f54494d455354414d50203d204e45572e4d4f44494649434154494f4e5f54494d455354414d500a2020202020202020205748455245204d41494e5f53414d505f4944203d204f4c442e53414d505f494420414e4420444154415f4944203d204f4c442e494420414e442056414c49445f554e54494c5f54494d455354414d50204953204e554c4c3b0a20202020202020494e5345525420494e544f2053414d504c455f52454c4154494f4e53484950535f484953544f525920280a20202020202020202049442c200a2020202020202020204d41494e5f53414d505f49442c0a20202020202020202052454c4154494f4e5f545950452c200a202020202020202020444154415f49442c200a202020202020202020454e544954595f5045524d5f49442c0a202020202020202020504552535f49445f415554484f522c0a20202020202020202056414c49445f46524f4d5f54494d455354414d500a20202020202020292056414c55455320280a2020202020202020206e65787476616c282753414d504c455f52454c4154494f4e53484950535f484953544f52595f49445f53455127292c200a2020202020202020204e45572e53414d505f49442c200a202020202020202020274f574e4552272c200a2020202020202020204e45572e49442c200a2020202020202020204e45572e434f44452c0a2020202020202020204e45572e504552535f49445f4d4f4449464945522c0a2020202020202020204e45572e4d4f44494649434154494f4e5f54494d455354414d500a20202020202020293b0a2020202020202055504441544520444154415f5345545f52454c4154494f4e53484950535f484953544f5259205345542056414c49445f554e54494c5f54494d455354414d50203d204e45572e4d4f44494649434154494f4e5f54494d455354414d50200a202020202020202020574845524520284d41494e5f444154415f4944203d204f4c442e494420414e442053414d505f4944203d204f4c442e53414d505f494420414e442056414c49445f554e54494c5f54494d455354414d50204953204e554c4c293b0a20202020202020494e5345525420494e544f20444154415f5345545f52454c4154494f4e53484950535f484953544f525920280a20202020202020202049442c200a2020202020202020204d41494e5f444154415f49442c0a20202020202020202052454c4154494f4e5f545950452c200a20202020202020202053414d505f49442c200a202020202020202020454e544954595f5045524d5f49442c0a202020202020202020504552535f49445f415554484f522c0a20202020202020202056414c49445f46524f4d5f54494d455354414d500a20202020202020292056414c55455320280a2020202020202020206e65787476616c2827444154415f5345545f52454c4154494f4e53484950535f484953544f52595f49445f53455127292c200a2020202020202020204e45572e49442c200a202020202020202020274f574e4544272c200a2020202020202020204e45572e53414d505f49442c200a2020202020202020202853454c454354205045524d5f49442046524f4d2053414d504c45535f414c4c205748455245204944203d204e45572e53414d505f4944292c0a2020202020202020204e45572e504552535f49445f4d4f4449464945522c0a2020202020202020204e45572e4d4f44494649434154494f4e5f54494d455354414d500a20202020202020293b0a20202020293b0a202020200a435245415445204f52205245504c4143452052554c4520646174617365745f73616d706c655f72656d6f76655f7570646174652041530a202020204f4e2055504441544520544f20646174615f616c6c200a202020205748455245204f4c442e53414d505f4944204953204e4f54204e554c4c20414e44204e45572e53414d505f4944204953204e554c4c0a20202020444f20414c534f20280a202020202020205550444154452053414d504c455f52454c4154494f4e53484950535f484953544f5259205345542056414c49445f554e54494c5f54494d455354414d50203d204e45572e4d4f44494649434154494f4e5f54494d455354414d500a2020202020202020205748455245204d41494e5f53414d505f4944203d204f4c442e53414d505f494420414e4420444154415f4944203d204f4c442e494420414e442056414c49445f554e54494c5f54494d455354414d50204953204e554c4c3b0a2020202020202055504441544520444154415f5345545f52454c4154494f4e53484950535f484953544f5259205345542056414c49445f554e54494c5f54494d455354414d50203d204e45572e4d4f44494649434154494f4e5f54494d455354414d50200a2020202020202020205748455245204d41494e5f444154415f4944203d204f4c442e494420414e442053414d505f4944203d204f4c442e53414d505f494420414e442056414c49445f554e54494c5f54494d455354414d50204953204e554c4c3b0a20202020293b0a202020200a435245415445204f52205245504c4143452052554c4520646174617365745f73616d706c655f696e736572742041530a202020204f4e20494e5345525420544f20646174615f616c6c200a202020205748455245204e45572e53414d505f4944204953204e4f54204e554c4c0a20202020202020444f20414c534f20280a20202020202020494e5345525420494e544f2053414d504c455f52454c4154494f4e53484950535f484953544f525920280a20202020202020202049442c200a2020202020202020204d41494e5f53414d505f49442c0a20202020202020202052454c4154494f4e5f545950452c200a202020202020202020444154415f49442c200a202020202020202020454e544954595f5045524d5f49442c0a202020202020202020504552535f49445f415554484f522c0a20202020202020202056414c49445f46524f4d5f54494d455354414d500a20202020202020292056414c55455320280a2020202020202020206e65787476616c282753414d504c455f52454c4154494f4e53484950535f484953544f52595f49445f53455127292c200a2020202020202020204e45572e53414d505f49442c200a202020202020202020274f574e4552272c200a2020202020202020204e45572e49442c200a2020202020202020204e45572e434f44452c0a2020202020202020204e45572e504552535f49445f4d4f4449464945522c0a2020202020202020204e45572e4d4f44494649434154494f4e5f54494d455354414d500a20202020202020293b0a20202020202020494e5345525420494e544f20444154415f5345545f52454c4154494f4e53484950535f484953544f525920280a20202020202020202049442c200a2020202020202020204d41494e5f444154415f49442c0a20202020202020202052454c4154494f4e5f545950452c200a20202020202020202053414d505f49442c200a202020202020202020454e544954595f5045524d5f49442c0a202020202020202020504552535f49445f415554484f522c0a20202020202020202056414c49445f46524f4d5f54494d455354414d500a20202020202020292056414c55455320280a2020202020202020206e65787476616c2827444154415f5345545f52454c4154494f4e53484950535f484953544f52595f49445f53455127292c200a2020202020202020204e45572e49442c200a202020202020202020274f574e4544272c200a2020202020202020204e45572e53414d505f49442c200a2020202020202020202853454c454354205045524d5f49442046524f4d2053414d504c45535f414c4c205748455245204944203d204e45572e53414d505f4944292c0a2020202020202020204e45572e504552535f49445f4d4f4449464945522c0a2020202020202020204e45572e4d4f44494649434154494f4e5f54494d455354414d500a20202020202020293b0a202020293b0a2020200a435245415445204f52205245504c4143452052554c4520646174617365745f73616d706c655f64656c6574652041530a202020204f4e2044454c45544520544f20646174615f616c6c200a202020205748455245204f4c442e53414d505f4944204953204e4f54204e554c4c0a20202020202020444f20414c534f200a202020202020205550444154452053414d504c455f52454c4154494f4e53484950535f484953544f5259205345542056414c49445f554e54494c5f54494d455354414d50203d2063757272656e745f74696d657374616d70200a2020202020202020205748455245204d41494e5f53414d505f4944203d204f4c442e53414d505f494420414e4420444154415f4944203d204f4c442e494420414e442056414c49445f554e54494c5f54494d455354414d50204953204e554c4c3b0a0a435245415445204f52205245504c4143452052554c4520646174615f72656c6174696f6e736869705f696e736572742041530a202020204f4e20494e5345525420544f20646174615f7365745f72656c6174696f6e73686970735f616c6c0a202020205748455245204e45572e44454c5f4944204953204e554c4c0a20202020202020444f20414c534f20280a202020202020202020494e5345525420494e544f20444154415f5345545f52454c4154494f4e53484950535f484953544f525920280a202020202020202020202049442c200a20202020202020202020204d41494e5f444154415f49442c0a202020202020202020202052454c4154494f4e5f545950452c200a2020202020202020202020444154415f49442c200a2020202020202020202020454e544954595f5045524d5f49442c0a2020202020202020202020504552535f49445f415554484f522c0a202020202020202020202056414c49445f46524f4d5f54494d455354414d502c0a20202020202020202020204f5244494e414c0a202020202020202020292056414c55455320280a20202020202020202020206e65787476616c2827444154415f5345545f52454c4154494f4e53484950535f484953544f52595f49445f53455127292c200a20202020202020202020204e45572e444154415f49445f504152454e542c200a20202020202020202020202853454c45435420555050455228504152454e545f4c4142454c292046524f4d2052454c4154494f4e534849505f5459504553205748455245204944203d204e45572e52454c4154494f4e534849505f4944292c200a20202020202020202020204e45572e444154415f49445f4348494c442c200a20202020202020202020202853454c45435420434f44452046524f4d20646174615f616c6c205748455245204944203d204e45572e444154415f49445f4348494c44292c0a20202020202020202020204e45572e504552535f49445f415554484f522c0a20202020202020202020204e45572e4d4f44494649434154494f4e5f54494d455354414d502c0a20202020202020202020204e45572e4f5244494e414c0a202020202020202020293b0a202020202020202020494e5345525420494e544f20444154415f5345545f52454c4154494f4e53484950535f484953544f525920280a202020202020202020202049442c200a20202020202020202020204d41494e5f444154415f49442c0a202020202020202020202052454c4154494f4e5f545950452c200a2020202020202020202020444154415f49442c200a2020202020202020202020454e544954595f5045524d5f49442c0a2020202020202020202020504552535f49445f415554484f522c0a202020202020202020202056414c49445f46524f4d5f54494d455354414d502c0a20202020202020202020204f5244494e414c0a202020202020202020292056414c55455320280a20202020202020202020206e65787476616c2827444154415f5345545f52454c4154494f4e53484950535f484953544f52595f49445f53455127292c200a20202020202020202020204e45572e444154415f49445f4348494c442c200a20202020202020202020202853454c454354205550504552284348494c445f4c4142454c292046524f4d2052454c4154494f4e534849505f5459504553205748455245204944203d204e45572e52454c4154494f4e534849505f4944292c200a20202020202020202020204e45572e444154415f49445f504152454e542c200a20202020202020202020202853454c45435420434f44452046524f4d20646174615f616c6c205748455245204944203d204e45572e444154415f49445f504152454e54292c0a20202020202020202020204e45572e504552535f49445f415554484f522c0a20202020202020202020204e45572e4d4f44494649434154494f4e5f54494d455354414d502c0a20202020202020202020204e45572e4f5244494e414c0a202020202020202020293b0a20202020202020293b0a0a435245415445204f52205245504c4143452052554c4520646174615f72656c6174696f6e736869705f64656c6574652041530a202020204f4e2044454c45544520544f20646174615f7365745f72656c6174696f6e73686970735f616c6c0a202020205748455245204f4c442e44454c5f4944204953204e554c4c0a20202020202020444f20414c534f20280a20202020202020202055504441544520444154415f5345545f52454c4154494f4e53484950535f484953544f5259205345542056414c49445f554e54494c5f54494d455354414d50203d2063757272656e745f74696d657374616d700a2020202020202020202020574845524520284d41494e5f444154415f4944203d204f4c442e444154415f49445f504152454e54200a202020202020202020202020202020202020414e4420444154415f4944203d204f4c442e444154415f49445f4348494c440a202020202020202020202020202020202020414e442052454c4154494f4e5f54595045203d202853454c45435420555050455228504152454e545f4c4142454c292046524f4d2052454c4154494f4e534849505f5459504553205748455245204944203d204f4c442e52454c4154494f4e534849505f4944290a202020202020202020202020202020202020414e442056414c49445f554e54494c5f54494d455354414d50204953204e554c4c290a202020202020202020202020204f5220284d41494e5f444154415f4944203d204f4c442e444154415f49445f4348494c44200a2020202020202020202020202020202020414e4420444154415f4944203d204f4c442e444154415f49445f504152454e54200a2020202020202020202020202020202020414e442052454c4154494f4e5f54595045203d202853454c454354205550504552284348494c445f4c4142454c292046524f4d2052454c4154494f4e534849505f5459504553205748455245204944203d204f4c442e52454c4154494f4e534849505f4944290a2020202020202020202020202020202020414e442056414c49445f554e54494c5f54494d455354414d50204953204e554c4c293b0a20202020202020293b0a202020202020200a435245415445204f52205245504c4143452052554c4520646174615f72656c6174696f6e736869705f7570646174652041530a202020204f4e2055504441544520544f20646174615f7365745f72656c6174696f6e73686970735f616c6c0a202020205748455245204e45572e44454c5f4944204953204e554c4c20414e44204f4c442e44454c5f4944204953204e554c4c0a20202020202020444f20414c534f20280a20202020202020202055504441544520444154415f5345545f52454c4154494f4e53484950535f484953544f5259205345542056414c49445f554e54494c5f54494d455354414d50203d2063757272656e745f74696d657374616d700a2020202020202020202020574845524520284d41494e5f444154415f4944203d204f4c442e444154415f49445f504152454e54200a202020202020202020202020202020202020414e4420444154415f4944203d204f4c442e444154415f49445f4348494c440a202020202020202020202020202020202020414e442052454c4154494f4e5f54595045203d202853454c45435420555050455228504152454e545f4c4142454c292046524f4d2052454c4154494f4e534849505f5459504553205748455245204944203d204f4c442e52454c4154494f4e534849505f4944290a202020202020202020202020202020202020414e442056414c49445f554e54494c5f54494d455354414d50204953204e554c4c290a202020202020202020202020204f5220284d41494e5f444154415f4944203d204f4c442e444154415f49445f4348494c44200a2020202020202020202020202020202020414e4420444154415f4944203d204f4c442e444154415f49445f504152454e54200a2020202020202020202020202020202020414e442052454c4154494f4e5f54595045203d202853454c454354205550504552284348494c445f4c4142454c292046524f4d2052454c4154494f4e534849505f5459504553205748455245204944203d204f4c442e52454c4154494f4e534849505f4944290a2020202020202020202020202020202020414e442056414c49445f554e54494c5f54494d455354414d50204953204e554c4c293b0a202020202020202020494e5345525420494e544f20444154415f5345545f52454c4154494f4e53484950535f484953544f525920280a202020202020202020202049442c200a20202020202020202020204d41494e5f444154415f49442c0a202020202020202020202052454c4154494f4e5f545950452c200a2020202020202020202020444154415f49442c200a2020202020202020202020454e544954595f5045524d5f49442c0a2020202020202020202020504552535f49445f415554484f522c0a202020202020202020202056414c49445f46524f4d5f54494d455354414d502c0a20202020202020202020204f5244494e414c0a202020202020202020292056414c55455320280a20202020202020202020206e65787476616c2827444154415f5345545f52454c4154494f4e53484950535f484953544f52595f49445f53455127292c200a20202020202020202020204e45572e444154415f49445f504152454e542c200a20202020202020202020202853454c45435420555050455228504152454e545f4c4142454c292046524f4d2052454c4154494f4e534849505f5459504553205748455245204944203d204e45572e52454c4154494f4e534849505f4944292c200a20202020202020202020204e45572e444154415f49445f4348494c442c200a20202020202020202020202853454c45435420434f44452046524f4d20646174615f616c6c205748455245204944203d204e45572e444154415f49445f4348494c44292c0a20202020202020202020204e45572e504552535f49445f415554484f522c0a20202020202020202020204e45572e4d4f44494649434154494f4e5f54494d455354414d502c0a20202020202020202020204e45572e4f5244494e414c0a202020202020202020293b0a202020202020202020494e5345525420494e544f20444154415f5345545f52454c4154494f4e53484950535f484953544f525920280a202020202020202020202049442c200a20202020202020202020204d41494e5f444154415f49442c0a202020202020202020202052454c4154494f4e5f545950452c200a2020202020202020202020444154415f49442c200a2020202020202020202020454e544954595f5045524d5f49442c0a2020202020202020202020504552535f49445f415554484f522c0a202020202020202020202056414c49445f46524f4d5f54494d455354414d502c0a20202020202020202020204f5244494e414c0a202020202020202020292056414c55455320280a20202020202020202020206e65787476616c2827444154415f5345545f52454c4154494f4e53484950535f484953544f52595f49445f53455127292c200a20202020202020202020204e45572e444154415f49445f4348494c442c200a20202020202020202020202853454c454354205550504552284348494c445f4c4142454c292046524f4d2052454c4154494f4e534849505f5459504553205748455245204944203d204e45572e52454c4154494f4e534849505f4944292c200a20202020202020202020204e45572e444154415f49445f504152454e542c200a20202020202020202020202853454c45435420434f44452046524f4d20646174615f616c6c205748455245204944203d204e45572e444154415f49445f504152454e54292c0a20202020202020202020204e45572e504552535f49445f415554484f522c0a20202020202020202020204e45572e4d4f44494649434154494f4e5f54494d455354414d502c0a20202020202020202020204e45572e4f5244494e414c0a202020202020202020293b0a20202020202020293b0a202020202020200a435245415445204f52205245504c4143452052554c4520646174615f72656c6174696f6e736869705f74726173685f7570646174652041530a202020204f4e2055504441544520544f20646174615f7365745f72656c6174696f6e73686970735f616c6c0a202020205748455245204e45572e44454c5f4944204953204e4f54204e554c4c20414e44204f4c442e44454c5f4944204953204e554c4c0a20202020202020444f20414c534f20280a20202020202020202055504441544520444154415f5345545f52454c4154494f4e53484950535f484953544f5259205345542056414c49445f554e54494c5f54494d455354414d50203d2063757272656e745f74696d657374616d700a2020202020202020202020574845524520284d41494e5f444154415f4944203d204f4c442e444154415f49445f504152454e54200a202020202020202020202020202020202020414e4420444154415f4944203d204f4c442e444154415f49445f4348494c440a202020202020202020202020202020202020414e442052454c4154494f4e5f54595045203d202853454c45435420555050455228504152454e545f4c4142454c292046524f4d2052454c4154494f4e534849505f5459504553205748455245204944203d204f4c442e52454c4154494f4e534849505f4944290a202020202020202020202020202020202020414e442056414c49445f554e54494c5f54494d455354414d50204953204e554c4c290a202020202020202020202020204f5220284d41494e5f444154415f4944203d204f4c442e444154415f49445f4348494c44200a2020202020202020202020202020202020414e4420444154415f4944203d204f4c442e444154415f49445f504152454e54200a2020202020202020202020202020202020414e442052454c4154494f4e5f54595045203d202853454c454354205550504552284348494c445f4c4142454c292046524f4d2052454c4154494f4e534849505f5459504553205748455245204944203d204f4c442e52454c4154494f4e534849505f4944290a2020202020202020202020202020202020414e442056414c49445f554e54494c5f54494d455354414d50204953204e554c4c293b0a20202020202020293b0a202020202020200a435245415445204f52205245504c4143452052554c4520646174615f72656c6174696f6e736869705f74726173685f7265766572745f7570646174652041530a202020204f4e2055504441544520544f20646174615f7365745f72656c6174696f6e73686970735f616c6c0a202020205748455245204f4c442e44454c5f4944204953204e4f54204e554c4c20414e44204e45572e44454c5f4944204953204e554c4c0a20202020202020444f20414c534f20280a202020202020202020494e5345525420494e544f20444154415f5345545f52454c4154494f4e53484950535f484953544f525920280a202020202020202020202049442c200a20202020202020202020204d41494e5f444154415f49442c0a202020202020202020202052454c4154494f4e5f545950452c200a2020202020202020202020444154415f49442c200a2020202020202020202020454e544954595f5045524d5f49442c0a2020202020202020202020504552535f49445f415554484f522c0a202020202020202020202056414c49445f46524f4d5f54494d455354414d502c0a20202020202020202020204f5244494e414c0a202020202020202020292056414c55455320280a20202020202020202020206e65787476616c2827444154415f5345545f52454c4154494f4e53484950535f484953544f52595f49445f53455127292c200a20202020202020202020204e45572e444154415f49445f504152454e542c200a20202020202020202020202853454c45435420555050455228504152454e545f4c4142454c292046524f4d2052454c4154494f4e534849505f5459504553205748455245204944203d204e45572e52454c4154494f4e534849505f4944292c200a20202020202020202020204e45572e444154415f49445f4348494c442c200a20202020202020202020202853454c45435420434f44452046524f4d20646174615f616c6c205748455245204944203d204e45572e444154415f49445f4348494c44292c0a20202020202020202020204e45572e504552535f49445f415554484f522c0a20202020202020202020204e45572e4d4f44494649434154494f4e5f54494d455354414d502c0a20202020202020202020204e45572e4f5244494e414c0a202020202020202020293b0a202020202020202020494e5345525420494e544f20444154415f5345545f52454c4154494f4e53484950535f484953544f525920280a202020202020202020202049442c200a20202020202020202020204d41494e5f444154415f49442c0a202020202020202020202052454c4154494f4e5f545950452c200a2020202020202020202020444154415f49442c200a2020202020202020202020454e544954595f5045524d5f49442c0a2020202020202020202020504552535f49445f415554484f522c0a202020202020202020202056414c49445f46524f4d5f54494d455354414d502c0a20202020202020202020204f5244494e414c0a202020202020202020292056414c55455320280a20202020202020202020206e65787476616c2827444154415f5345545f52454c4154494f4e53484950535f484953544f52595f49445f53455127292c200a20202020202020202020204e45572e444154415f49445f4348494c442c200a20202020202020202020202853454c454354205550504552284348494c445f4c4142454c292046524f4d2052454c4154494f4e534849505f5459504553205748455245204944203d204e45572e52454c4154494f4e534849505f4944292c200a20202020202020202020204e45572e444154415f49445f504152454e542c200a20202020202020202020202853454c45435420434f44452046524f4d20646174615f616c6c205748455245204944203d204e45572e444154415f49445f504152454e54292c0a20202020202020202020204e45572e504552535f49445f415554484f522c0a20202020202020202020204e45572e4d4f44494649434154494f4e5f54494d455354414d502c0a20202020202020202020204e45572e4f5244494e414c0a202020202020202020293b0a20202020202020293b0a0a435245415445204f52205245504c4143452052554c452073616d706c655f706172656e745f6368696c645f696e736572742041530a202020204f4e20494e5345525420544f2073616d706c655f72656c6174696f6e73686970735f616c6c0a202020205748455245204e45572e44454c5f4944204953204e554c4c0a20202020202020444f20414c534f20280a202020202020202020494e5345525420494e544f2053414d504c455f52454c4154494f4e53484950535f484953544f525920280a202020202020202020202049442c200a20202020202020202020204d41494e5f53414d505f49442c0a202020202020202020202052454c4154494f4e5f545950452c200a202020202020202020202053414d505f49442c200a2020202020202020202020454e544954595f5045524d5f49442c0a2020202020202020202020504552535f49445f415554484f522c0a202020202020202020202056414c49445f46524f4d5f54494d455354414d500a202020202020202020292056414c55455320280a20202020202020202020206e65787476616c282753414d504c455f52454c4154494f4e53484950535f484953544f52595f49445f53455127292c200a20202020202020202020204e45572e53414d504c455f49445f504152454e542c200a202020202020202020202027504152454e54272c200a20202020202020202020204e45572e53414d504c455f49445f4348494c442c200a20202020202020202020202853454c454354205045524d5f49442046524f4d2073616d706c65735f616c6c205748455245204944203d204e45572e53414d504c455f49445f4348494c44292c0a20202020202020202020204e45572e504552535f49445f415554484f522c0a20202020202020202020204e45572e4d4f44494649434154494f4e5f54494d455354414d500a202020202020202020293b0a202020202020202020494e5345525420494e544f2053414d504c455f52454c4154494f4e53484950535f484953544f525920280a202020202020202020202049442c200a20202020202020202020204d41494e5f53414d505f49442c0a202020202020202020202052454c4154494f4e5f545950452c200a202020202020202020202053414d505f49442c200a2020202020202020202020454e544954595f5045524d5f49442c0a2020202020202020202020504552535f49445f415554484f522c0a202020202020202020202056414c49445f46524f4d5f54494d455354414d500a202020202020202020292056414c55455320280a20202020202020202020206e65787476616c282753414d504c455f52454c4154494f4e53484950535f484953544f52595f49445f53455127292c200a20202020202020202020204e45572e53414d504c455f49445f4348494c442c200a2020202020202020202020274348494c44272c200a20202020202020202020204e45572e53414d504c455f49445f504152454e542c200a20202020202020202020202853454c454354205045524d5f49442046524f4d2073616d706c65735f616c6c205748455245204944203d204e45572e53414d504c455f49445f504152454e54292c0a20202020202020202020204e45572e504552535f49445f415554484f522c0a20202020202020202020204e45572e4d4f44494649434154494f4e5f54494d455354414d500a202020202020202020293b0a20202020202020293b0a202020202020200a435245415445204f52205245504c4143452052554c452073616d706c655f706172656e745f6368696c645f64656c6574652041530a202020204f4e2044454c45544520544f2073616d706c655f72656c6174696f6e73686970735f616c6c0a202020205748455245204f4c442e44454c5f4944204953204e554c4c0a20202020202020444f20414c534f20280a2020202020202020205550444154452053414d504c455f52454c4154494f4e53484950535f484953544f5259205345542056414c49445f554e54494c5f54494d455354414d50203d2063757272656e745f74696d657374616d700a2020202020202020202020574845524520284d41494e5f53414d505f4944203d204f4c442e53414d504c455f49445f504152454e5420414e442053414d505f4944203d204f4c442e53414d504c455f49445f4348494c4420414e442056414c49445f554e54494c5f54494d455354414d50204953204e554c4c290a202020202020202020202020204f5220284d41494e5f53414d505f4944203d204f4c442e53414d504c455f49445f4348494c4420414e442053414d505f4944203d204f4c442e53414d504c455f49445f504152454e5420414e442056414c49445f554e54494c5f54494d455354414d50204953204e554c4c293b0a20202020202020293b0a0a435245415445204f52205245504c4143452052554c452073616d706c655f706172656e745f6368696c645f7570646174652041530a202020204f4e2055504441544520544f2073616d706c655f72656c6174696f6e73686970735f616c6c0a202020205748455245204e45572e44454c5f4944204953204e4f54204e554c4c20414e44204f4c442e44454c5f4944204953204e554c4c0a20202020202020444f20414c534f20280a2020202020202020205550444154452053414d504c455f52454c4154494f4e53484950535f484953544f5259205345542056414c49445f554e54494c5f54494d455354414d50203d2063757272656e745f74696d657374616d700a2020202020202020202020574845524520284d41494e5f53414d505f4944203d204f4c442e53414d504c455f49445f504152454e5420414e442053414d505f4944203d204f4c442e53414d504c455f49445f4348494c4420414e442056414c49445f554e54494c5f54494d455354414d50204953204e554c4c290a202020202020202020202020204f5220284d41494e5f53414d505f4944203d204f4c442e53414d504c455f49445f4348494c4420414e442053414d505f4944203d204f4c442e53414d504c455f49445f504152454e5420414e442056414c49445f554e54494c5f54494d455354414d50204953204e554c4c293b0a20202020202020293b0a0a435245415445204f52205245504c4143452052554c452073616d706c655f706172656e745f6368696c645f7265766572745f7570646174652041530a202020204f4e2055504441544520544f2073616d706c655f72656c6174696f6e73686970735f616c6c0a202020205748455245204e45572e44454c5f4944204953204e554c4c20414e44204f4c442e44454c5f4944204953204e4f54204e554c4c0a20202020202020444f20414c534f20280a202020202020202020494e5345525420494e544f2053414d504c455f52454c4154494f4e53484950535f484953544f525920280a202020202020202020202049442c200a20202020202020202020204d41494e5f53414d505f49442c0a202020202020202020202052454c4154494f4e5f545950452c200a202020202020202020202053414d505f49442c200a2020202020202020202020454e544954595f5045524d5f49442c0a2020202020202020202020504552535f49445f415554484f522c0a202020202020202020202056414c49445f46524f4d5f54494d455354414d500a202020202020202020292056414c55455320280a20202020202020202020206e65787476616c282753414d504c455f52454c4154494f4e53484950535f484953544f52595f49445f53455127292c200a20202020202020202020204e45572e53414d504c455f49445f504152454e542c200a202020202020202020202027504152454e54272c200a20202020202020202020204e45572e53414d504c455f49445f4348494c442c200a20202020202020202020202853454c454354205045524d5f49442046524f4d2073616d706c65735f616c6c205748455245204944203d204e45572e53414d504c455f49445f4348494c44292c0a20202020202020202020204e45572e504552535f49445f415554484f522c0a20202020202020202020204e45572e4d4f44494649434154494f4e5f54494d455354414d500a202020202020202020293b0a202020202020202020494e5345525420494e544f2053414d504c455f52454c4154494f4e53484950535f484953544f525920280a202020202020202020202049442c200a20202020202020202020204d41494e5f53414d505f49442c0a202020202020202020202052454c4154494f4e5f545950452c200a202020202020202020202053414d505f49442c200a2020202020202020202020454e544954595f5045524d5f49442c0a2020202020202020202020504552535f49445f415554484f522c0a202020202020202020202056414c49445f46524f4d5f54494d455354414d500a202020202020202020292056414c55455320280a20202020202020202020206e65787476616c282753414d504c455f52454c4154494f4e53484950535f484953544f52595f49445f53455127292c200a20202020202020202020204e45572e53414d504c455f49445f4348494c442c200a2020202020202020202020274348494c44272c200a20202020202020202020204e45572e53414d504c455f49445f504152454e542c200a20202020202020202020202853454c454354205045524d5f49442046524f4d2073616d706c65735f616c6c205748455245204944203d204e45572e53414d504c455f49445f504152454e54292c0a20202020202020202020204e45572e504552535f49445f415554484f522c0a20202020202020202020204e45572e4d4f44494649434154494f4e5f54494d455354414d500a202020202020202020293b0a20202020202020293b0a0a435245415445204f52205245504c4143452052554c45206578706572696d656e745f70726f6a6563745f7570646174652041530a202020204f4e2055504441544520544f206578706572696d656e74735f616c6c200a20202020574845524520284f4c442e50524f4a5f494420213d204e45572e50524f4a5f4944204f52204f4c442e50524f4a5f4944204953204e554c4c2920414e44204e45572e50524f4a5f4944204953204e4f54204e554c4c0a20202020444f20414c534f20280a202020202020205550444154452050524f4a4543545f52454c4154494f4e53484950535f484953544f5259205345542056414c49445f554e54494c5f54494d455354414d50203d204e45572e4d4f44494649434154494f4e5f54494d455354414d500a2020202020202020205748455245204d41494e5f50524f4a5f4944203d204f4c442e50524f4a5f494420414e4420455850455f4944203d204f4c442e494420414e442056414c49445f554e54494c5f54494d455354414d50204953204e554c4c3b0a20202020202020494e5345525420494e544f2050524f4a4543545f52454c4154494f4e53484950535f484953544f525920280a20202020202020202049442c200a2020202020202020204d41494e5f50524f4a5f49442c0a20202020202020202052454c4154494f4e5f545950452c200a202020202020202020455850455f49442c200a202020202020202020454e544954595f5045524d5f49442c0a202020202020202020504552535f49445f415554484f522c0a20202020202020202056414c49445f46524f4d5f54494d455354414d500a20202020202020292056414c55455320280a2020202020202020206e65787476616c282750524f4a4543545f52454c4154494f4e53484950535f484953544f52595f49445f53455127292c200a2020202020202020204e45572e50524f4a5f49442c200a202020202020202020274f574e4552272c200a2020202020202020204e45572e49442c200a2020202020202020204e45572e5045524d5f49442c0a2020202020202020204e45572e504552535f49445f4d4f4449464945522c0a2020202020202020204e45572e4d4f44494649434154494f4e5f54494d455354414d500a20202020202020293b0a20202020202020555044415445204558504552494d454e545f52454c4154494f4e53484950535f484953544f5259205345542056414c49445f554e54494c5f54494d455354414d50203d204e45572e4d4f44494649434154494f4e5f54494d455354414d50200a2020202020202020205748455245204d41494e5f455850455f4944203d204f4c442e494420414e442050524f4a5f4944203d204f4c442e50524f4a5f494420414e442056414c49445f554e54494c5f54494d455354414d50204953204e554c4c3b0a20202020202020494e5345525420494e544f204558504552494d454e545f52454c4154494f4e53484950535f484953544f525920280a20202020202020202049442c200a2020202020202020204d41494e5f455850455f49442c0a20202020202020202052454c4154494f4e5f545950452c200a20202020202020202050524f4a5f49442c200a202020202020202020454e544954595f5045524d5f49442c0a202020202020202020504552535f49445f415554484f522c0a20202020202020202056414c49445f46524f4d5f54494d455354414d500a20202020202020292056414c55455320280a2020202020202020206e65787476616c28274558504552494d454e545f52454c4154494f4e53484950535f484953544f52595f49445f53455127292c200a2020202020202020204e45572e49442c200a202020202020202020274f574e4544272c200a2020202020202020204e45572e50524f4a5f49442c200a2020202020202020202853454c454354207065726d5f69642046524f4d2050524f4a45435453205748455245204944203d204e45572e50524f4a5f4944292c0a2020202020202020204e45572e504552535f49445f4d4f4449464945522c0a2020202020202020204e45572e4d4f44494649434154494f4e5f54494d455354414d500a20202020202020293b0a20202020293b0a202020200a435245415445204f52205245504c4143452052554c45206578706572696d656e745f70726f6a6563745f72656d6f76655f7570646174652041530a202020204f4e2055504441544520544f206578706572696d656e74735f616c6c200a202020205748455245204f4c442e50524f4a5f4944204953204e4f54204e554c4c20414e44204e45572e50524f4a5f4944204953204e554c4c0a20202020444f20414c534f20280a202020202020205550444154452050524f4a4543545f52454c4154494f4e53484950535f484953544f5259205345542056414c49445f554e54494c5f54494d455354414d50203d204e45572e4d4f44494649434154494f4e5f54494d455354414d500a2020202020202020205748455245204d41494e5f50524f4a5f4944203d204f4c442e50524f4a5f494420414e4420455850455f4944203d204f4c442e494420414e442056414c49445f554e54494c5f54494d455354414d50204953204e554c4c3b0a20202020202020555044415445204558504552494d454e545f52454c4154494f4e53484950535f484953544f5259205345542056414c49445f554e54494c5f54494d455354414d50203d204e45572e4d4f44494649434154494f4e5f54494d455354414d50200a2020202020202020205748455245204d41494e5f455850455f4944203d204f4c442e494420414e442050524f4a5f4944203d204f4c442e50524f4a5f494420414e442056414c49445f554e54494c5f54494d455354414d50204953204e554c4c3b0a20202020293b0a202020200a435245415445204f52205245504c4143452052554c45206578706572696d656e745f70726f6a6563745f696e736572742041530a202020204f4e20494e5345525420544f206578706572696d656e74735f616c6c200a202020205748455245204e45572e50524f4a5f4944204953204e4f54204e554c4c0a20202020202020444f20414c534f20280a20202020202020494e5345525420494e544f2050524f4a4543545f52454c4154494f4e53484950535f484953544f525920280a20202020202020202049442c200a2020202020202020204d41494e5f50524f4a5f49442c0a20202020202020202052454c4154494f4e5f545950452c200a202020202020202020455850455f49442c200a202020202020202020454e544954595f5045524d5f49442c0a202020202020202020504552535f49445f415554484f522c0a20202020202020202056414c49445f46524f4d5f54494d455354414d500a20202020202020292056414c55455320280a2020202020202020206e65787476616c282750524f4a4543545f52454c4154494f4e53484950535f484953544f52595f49445f53455127292c200a2020202020202020204e45572e50524f4a5f49442c200a202020202020202020274f574e4552272c200a2020202020202020204e45572e49442c200a2020202020202020204e45572e5045524d5f49442c0a2020202020202020204e45572e504552535f49445f4d4f4449464945522c0a2020202020202020204e45572e4d4f44494649434154494f4e5f54494d455354414d500a20202020202020293b0a20202020202020494e5345525420494e544f204558504552494d454e545f52454c4154494f4e53484950535f484953544f525920280a20202020202020202049442c200a2020202020202020204d41494e5f455850455f49442c0a20202020202020202052454c4154494f4e5f545950452c200a20202020202020202050524f4a5f49442c200a202020202020202020454e544954595f5045524d5f49442c0a202020202020202020504552535f49445f415554484f522c0a20202020202020202056414c49445f46524f4d5f54494d455354414d500a20202020202020292056414c55455320280a2020202020202020206e65787476616c28274558504552494d454e545f52454c4154494f4e53484950535f484953544f52595f49445f53455127292c200a2020202020202020204e45572e49442c200a202020202020202020274f574e4544272c200a2020202020202020204e45572e50524f4a5f49442c200a2020202020202020202853454c454354207065726d5f69642046524f4d2050524f4a45435453205748455245204944203d204e45572e50524f4a5f4944292c0a2020202020202020204e45572e504552535f49445f4d4f4449464945522c0a2020202020202020204e45572e4d4f44494649434154494f4e5f54494d455354414d500a20202020202020293b0a202020293b0a2020200a435245415445204f52205245504c4143452052554c45206578706572696d656e745f70726f6a6563745f64656c6574652041530a202020204f4e2044454c45544520544f206578706572696d656e74735f616c6c200a202020205748455245204f4c442e50524f4a5f4944204953204e4f54204e554c4c0a20202020202020444f20414c534f200a202020202020205550444154452050524f4a4543545f52454c4154494f4e53484950535f484953544f5259205345542056414c49445f554e54494c5f54494d455354414d50203d2063757272656e745f74696d657374616d70200a2020202020202020205748455245204d41494e5f50524f4a5f4944203d204f4c442e50524f4a5f494420414e4420455850455f4944203d204f4c442e494420414e442056414c49445f554e54494c5f54494d455354414d50204953204e554c4c3b0a0a435245415445204f52205245504c4143452052554c452070726f6a6563745f73706163655f7570646174652041530a202020204f4e2055504441544520544f2070726f6a65637473200a20202020574845524520284f4c442e53504143455f494420213d204e45572e53504143455f4944204f52204f4c442e53504143455f4944204953204e554c4c2920414e44204e45572e53504143455f4944204953204e4f54204e554c4c0a20202020444f20414c534f20280a202020202020205550444154452050524f4a4543545f52454c4154494f4e53484950535f484953544f5259205345542056414c49445f554e54494c5f54494d455354414d50203d204e45572e4d4f44494649434154494f4e5f54494d455354414d500a2020202020202020205748455245204d41494e5f50524f4a5f4944203d204f4c442e494420414e442053504143455f4944203d204f4c442e53504143455f494420414e442056414c49445f554e54494c5f54494d455354414d50204953204e554c4c3b0a20202020202020494e5345525420494e544f2050524f4a4543545f52454c4154494f4e53484950535f484953544f525920280a20202020202020202049442c200a2020202020202020204d41494e5f50524f4a5f49442c0a20202020202020202052454c4154494f4e5f545950452c200a20202020202020202053504143455f49442c200a202020202020202020454e544954595f5045524d5f49442c0a202020202020202020504552535f49445f415554484f522c0a20202020202020202056414c49445f46524f4d5f54494d455354414d500a20202020202020292056414c55455320280a2020202020202020206e65787476616c282750524f4a4543545f52454c4154494f4e53484950535f484953544f52595f49445f53455127292c200a2020202020202020204e45572e49442c200a202020202020202020274f574e4544272c200a2020202020202020204e45572e53504143455f49442c200a2020202020202020202853454c45435420434f44452046524f4d20535041434553205748455245204944203d204e45572e53504143455f4944292c0a2020202020202020204e45572e504552535f49445f4d4f4449464945522c0a2020202020202020204e45572e4d4f44494649434154494f4e5f54494d455354414d500a20202020202020293b0a20202020293b0a202020200a435245415445204f52205245504c4143452052554c452070726f6a6563745f73706163655f72656d6f76655f7570646174652041530a202020204f4e2055504441544520544f2070726f6a65637473200a202020205748455245204f4c442e53504143455f4944204953204e4f54204e554c4c20414e44204e45572e53504143455f4944204953204e554c4c0a20202020444f20414c534f20280a202020202020205550444154452050524f4a4543545f52454c4154494f4e53484950535f484953544f5259205345542056414c49445f554e54494c5f54494d455354414d50203d204e45572e4d4f44494649434154494f4e5f54494d455354414d500a2020202020202020205748455245204d41494e5f50524f4a5f4944203d204f4c442e494420414e442053504143455f4944203d204f4c442e53504143455f494420414e442056414c49445f554e54494c5f54494d455354414d50204953204e554c4c3b0a20202020293b0a202020200a435245415445204f52205245504c4143452052554c452070726f6a6563745f73706163655f696e736572742041530a202020204f4e20494e5345525420544f2070726f6a65637473200a202020205748455245204e45572e53504143455f4944204953204e4f54204e554c4c0a20202020202020444f20414c534f20280a20202020202020494e5345525420494e544f2050524f4a4543545f52454c4154494f4e53484950535f484953544f525920280a20202020202020202049442c200a2020202020202020204d41494e5f50524f4a5f49442c0a20202020202020202052454c4154494f4e5f545950452c200a20202020202020202053504143455f49442c200a202020202020202020454e544954595f5045524d5f49442c0a202020202020202020504552535f49445f415554484f522c0a20202020202020202056414c49445f46524f4d5f54494d455354414d500a20202020202020292056414c55455320280a2020202020202020206e65787476616c282750524f4a4543545f52454c4154494f4e53484950535f484953544f52595f49445f53455127292c200a2020202020202020204e45572e49442c200a202020202020202020274f574e4544272c200a2020202020202020204e45572e53504143455f49442c200a2020202020202020202853454c45435420434f44452046524f4d20535041434553205748455245204944203d204e45572e53504143455f4944292c0a2020202020202020204e45572e504552535f49445f4d4f4449464945522c0a2020202020202020204e45572e4d4f44494649434154494f4e5f54494d455354414d500a20202020202020293b0a202020293b0a0a435245415445204f52205245504c4143452052554c452073616d706c655f70726f6a6563745f7570646174652041530a202020204f4e2055504441544520544f2073616d706c65735f616c6c200a20202020574845524520284f4c442e50524f4a5f494420213d204e45572e50524f4a5f4944204f52204f4c442e50524f4a5f4944204953204e554c4c204f52204f4c442e455850455f4944204953204e4f54204e554c4c2920414e44204e45572e50524f4a5f4944204953204e4f54204e554c4c20414e44204e45572e455850455f4944204953204e554c4c0a20202020444f20414c534f20280a202020202020205550444154452053414d504c455f52454c4154494f4e53484950535f484953544f5259205345542056414c49445f554e54494c5f54494d455354414d50203d204e45572e4d4f44494649434154494f4e5f54494d455354414d50200a2020202020202020205748455245204d41494e5f53414d505f4944203d204f4c442e494420414e442050524f4a5f4944203d204f4c442e50524f4a5f494420414e442056414c49445f554e54494c5f54494d455354414d50204953204e554c4c3b0a20202020202020494e5345525420494e544f2053414d504c455f52454c4154494f4e53484950535f484953544f525920280a20202020202020202049442c200a2020202020202020204d41494e5f53414d505f49442c0a20202020202020202052454c4154494f4e5f545950452c200a20202020202020202050524f4a5f49442c200a202020202020202020454e544954595f5045524d5f49442c0a202020202020202020504552535f49445f415554484f522c0a20202020202020202056414c49445f46524f4d5f54494d455354414d500a20202020202020292056414c55455320280a2020202020202020206e65787476616c282753414d504c455f52454c4154494f4e53484950535f484953544f52595f49445f53455127292c200a2020202020202020204e45572e49442c200a202020202020202020274f574e4544272c200a2020202020202020204e45572e50524f4a5f49442c200a2020202020202020202853454c454354205045524d5f49442046524f4d2050524f4a45435453205748455245204944203d204e45572e50524f4a5f4944292c0a2020202020202020204e45572e504552535f49445f4d4f4449464945522c0a2020202020202020204e45572e4d4f44494649434154494f4e5f54494d455354414d500a20202020202020293b0a20202020293b0a0a435245415445204f52205245504c4143452052554c452073616d706c655f70726f6a6563745f72656d6f76655f7570646174652041530a202020204f4e2055504441544520544f2073616d706c65735f616c6c200a202020205748455245204f4c442e50524f4a5f4944204953204e4f54204e554c4c20414e4420284e45572e50524f4a5f4944204953204e554c4c204f5220284f4c442e455850455f4944204953204e554c4c20414e44204e45572e455850455f4944204953204e4f54204e554c4c29290a20202020444f20414c534f20280a202020202020205550444154452053414d504c455f52454c4154494f4e53484950535f484953544f5259205345542056414c49445f554e54494c5f54494d455354414d50203d204e45572e4d4f44494649434154494f4e5f54494d455354414d50200a2020202020202020205748455245204d41494e5f53414d505f4944203d204f4c442e494420414e442050524f4a5f4944203d204f4c442e50524f4a5f494420414e442056414c49445f554e54494c5f54494d455354414d50204953204e554c4c3b0a20202020293b0a0a435245415445204f52205245504c4143452052554c452073616d706c655f70726f6a6563745f696e736572742041530a202020204f4e20494e5345525420544f2073616d706c65735f616c6c200a202020205748455245204e45572e455850455f4944204953204e554c4c20414e44204e45572e50524f4a5f4944204953204e4f54204e554c4c0a20202020444f20414c534f20280a202020202020494e5345525420494e544f2053414d504c455f52454c4154494f4e53484950535f484953544f525920280a20202020202020202049442c200a2020202020202020204d41494e5f53414d505f49442c0a20202020202020202052454c4154494f4e5f545950452c200a20202020202020202050524f4a5f49442c200a202020202020202020454e544954595f5045524d5f49442c0a202020202020202020504552535f49445f415554484f522c0a20202020202020202056414c49445f46524f4d5f54494d455354414d500a20202020202020292056414c55455320280a2020202020202020206e65787476616c282753414d504c455f52454c4154494f4e53484950535f484953544f52595f49445f53455127292c200a2020202020202020204e45572e49442c200a202020202020202020274f574e4544272c200a2020202020202020204e45572e50524f4a5f49442c200a2020202020202020202853454c454354205045524d5f49442046524f4d2050524f4a45435453205748455245204944203d204e45572e50524f4a5f4944292c0a2020202020202020204e45572e504552535f49445f4d4f4449464945522c0a2020202020202020204e45572e4d4f44494649434154494f4e5f54494d455354414d500a20202020202020293b0a202020293b0a0a435245415445204f52205245504c4143452052554c452073616d706c655f73706163655f7570646174652041530a202020204f4e2055504441544520544f2073616d706c65735f616c6c200a20202020574845524520284f4c442e53504143455f494420213d204e45572e53504143455f4944204f52204f4c442e53504143455f4944204953204e554c4c204f52204f4c442e455850455f4944204953204e4f54204e554c4c204f52204f4c442e50524f4a5f4944204953204e4f54204e554c4c2920414e44204e45572e53504143455f4944204953204e4f54204e554c4c20414e44204e45572e455850455f4944204953204e554c4c20414e44204e45572e50524f4a5f4944204953204e554c4c0a20202020444f20414c534f20280a202020202020205550444154452053414d504c455f52454c4154494f4e53484950535f484953544f5259205345542056414c49445f554e54494c5f54494d455354414d50203d204e45572e4d4f44494649434154494f4e5f54494d455354414d50200a2020202020202020205748455245204d41494e5f53414d505f4944203d204f4c442e494420414e442053504143455f4944203d204f4c442e53504143455f494420414e442056414c49445f554e54494c5f54494d455354414d50204953204e554c4c3b0a20202020202020494e5345525420494e544f2053414d504c455f52454c4154494f4e53484950535f484953544f525920280a20202020202020202049442c200a2020202020202020204d41494e5f53414d505f49442c0a20202020202020202052454c4154494f4e5f545950452c200a20202020202020202053504143455f49442c200a202020202020202020454e544954595f5045524d5f49442c0a202020202020202020504552535f49445f415554484f522c0a20202020202020202056414c49445f46524f4d5f54494d455354414d500a20202020202020292056414c55455320280a2020202020202020206e65787476616c282753414d504c455f52454c4154494f4e53484950535f484953544f52595f49445f53455127292c200a2020202020202020204e45572e49442c200a202020202020202020274f574e4544272c200a2020202020202020204e45572e53504143455f49442c200a2020202020202020202853454c45435420434f44452046524f4d20535041434553205748455245204944203d204e45572e53504143455f4944292c0a2020202020202020204e45572e504552535f49445f4d4f4449464945522c0a2020202020202020204e45572e4d4f44494649434154494f4e5f54494d455354414d500a20202020202020293b0a20202020293b0a0a435245415445204f52205245504c4143452052554c452073616d706c655f73706163655f72656d6f76655f7570646174652041530a202020204f4e2055504441544520544f2073616d706c65735f616c6c200a202020205748455245204f4c442e53504143455f4944204953204e4f54204e554c4c20414e4420284e45572e53504143455f4944204953204e554c4c204f5220284f4c442e455850455f4944204953204e554c4c20414e44204e45572e455850455f4944204953204e4f54204e554c4c29204f5220284f4c442e50524f4a5f4944204953204e554c4c20414e44204e45572e50524f4a5f4944204953204e4f54204e554c4c29290a20202020444f20414c534f20280a202020202020205550444154452053414d504c455f52454c4154494f4e53484950535f484953544f5259205345542056414c49445f554e54494c5f54494d455354414d50203d204e45572e4d4f44494649434154494f4e5f54494d455354414d50200a2020202020202020205748455245204d41494e5f53414d505f4944203d204f4c442e494420414e442053504143455f4944203d204f4c442e53504143455f494420414e442056414c49445f554e54494c5f54494d455354414d50204953204e554c4c3b0a20202020293b0a0a435245415445204f52205245504c4143452052554c452073616d706c655f73706163655f696e736572742041530a202020204f4e20494e5345525420544f2073616d706c65735f616c6c200a202020205748455245204e45572e455850455f4944204953204e554c4c20414e44204e45572e53504143455f4944204953204e4f54204e554c4c20414e44204e45572e50524f4a5f4944204953204e554c4c0a20202020444f20414c534f20280a202020202020494e5345525420494e544f2053414d504c455f52454c4154494f4e53484950535f484953544f525920280a20202020202020202049442c200a2020202020202020204d41494e5f53414d505f49442c0a20202020202020202052454c4154494f4e5f545950452c200a20202020202020202053504143455f49442c200a202020202020202020454e544954595f5045524d5f49442c0a202020202020202020504552535f49445f415554484f522c0a20202020202020202056414c49445f46524f4d5f54494d455354414d500a20202020202020292056414c55455320280a2020202020202020206e65787476616c282753414d504c455f52454c4154494f4e53484950535f484953544f52595f49445f53455127292c200a2020202020202020204e45572e49442c200a202020202020202020274f574e4544272c200a2020202020202020204e45572e53504143455f49442c200a2020202020202020202853454c45435420434f44452046524f4d20535041434553205748455245204944203d204e45572e53504143455f4944292c0a2020202020202020204e45572e504552535f49445f4d4f4449464945522c0a2020202020202020204e45572e4d4f44494649434154494f4e5f54494d455354414d500a20202020202020293b0a202020293b0a0a435245415445204f52205245504c4143452052554c452073616d706c655f696e736572742041530a202020204f4e20494e5345525420544f2073616d706c657320444f20494e5354454144200a20202020202020494e5345525420494e544f2073616d706c65735f616c6c20280a20202020202020202069642c200a202020202020202020636f64652c200a20202020202020202064656c5f69642c0a2020202020202020206f7269675f64656c2c0a202020202020202020657870655f69642c0a20202020202020202070726f6a5f69642c0a2020202020202020206d6f64696669636174696f6e5f74696d657374616d702c0a2020202020202020207065726d5f69642c0a202020202020202020706572735f69645f726567697374657265722c200a202020202020202020706572735f69645f6d6f6469666965722c200a202020202020202020726567697374726174696f6e5f74696d657374616d702c200a20202020202020202073616d705f69645f706172745f6f662c0a202020202020202020736174795f69642c200a20202020202020202073706163655f69642c0a20202020202020202076657273696f6e0a20202020202020292056414c55455320280a2020202020202020204e45572e69642c200a2020202020202020204e45572e636f64652c200a2020202020202020204e45572e64656c5f69642c0a2020202020202020204e45572e6f7269675f64656c2c0a2020202020202020204e45572e657870655f69642c0a2020202020202020204e45572e70726f6a5f69642c0a2020202020202020204e45572e6d6f64696669636174696f6e5f74696d657374616d702c0a2020202020202020204e45572e7065726d5f69642c0a2020202020202020204e45572e706572735f69645f726567697374657265722c200a2020202020202020204e45572e706572735f69645f6d6f6469666965722c200a2020202020202020204e45572e726567697374726174696f6e5f74696d657374616d702c200a2020202020202020204e45572e73616d705f69645f706172745f6f662c0a2020202020202020204e45572e736174795f69642c200a2020202020202020204e45572e73706163655f69642c0a2020202020202020204e45572e76657273696f6e0a20202020202020293b0a20202020200a435245415445204f52205245504c4143452052554c452073616d706c655f7570646174652041530a202020204f4e2055504441544520544f2073616d706c657320444f20494e5354454144200a202020202020205550444154452073616d706c65735f616c6c0a2020202020202020202053455420636f6465203d204e45572e636f64652c0a202020202020202020202020202064656c5f6964203d204e45572e64656c5f69642c0a20202020202020202020202020206f7269675f64656c203d204e45572e6f7269675f64656c2c0a2020202020202020202020202020657870655f6964203d204e45572e657870655f69642c0a202020202020202020202020202070726f6a5f6964203d204e45572e70726f6a5f69642c0a20202020202020202020202020206d6f64696669636174696f6e5f74696d657374616d70203d204e45572e6d6f64696669636174696f6e5f74696d657374616d702c0a20202020202020202020202020207065726d5f6964203d204e45572e7065726d5f69642c0a2020202020202020202020202020706572735f69645f72656769737465726572203d204e45572e706572735f69645f726567697374657265722c0a2020202020202020202020202020706572735f69645f6d6f646966696572203d204e45572e706572735f69645f6d6f6469666965722c0a2020202020202020202020202020726567697374726174696f6e5f74696d657374616d70203d204e45572e726567697374726174696f6e5f74696d657374616d702c0a202020202020202020202020202073616d705f69645f706172745f6f66203d204e45572e73616d705f69645f706172745f6f662c0a2020202020202020202020202020736174795f6964203d204e45572e736174795f69642c0a202020202020202020202020202073706163655f6964203d204e45572e73706163655f69642c0a202020202020202020202020202076657273696f6e203d204e45572e76657273696f6e0a202020202020202020205748455245206964203d204e45572e69643b0a20202020200a435245415445204f52205245504c4143452052554c452073616d706c655f64656c6574652041530a202020204f4e2044454c45544520544f2073616d706c657320444f20494e53544541440a2020202020202044454c4554452046524f4d2073616d706c65735f616c6c0a20202020202020202020202020205748455245206964203d204f4c442e69643b0a20202020202020202020202020200a435245415445204f52205245504c4143452052554c452073616d706c655f64656c657465645f7570646174652041530a202020204f4e2055504441544520544f2073616d706c65735f64656c6574656420444f20494e53544541440a202020202020205550444154452073616d706c65735f616c6c0a202020202020202020205345542064656c5f6964203d204e45572e64656c5f69642c0a20202020202020202020202020206f7269675f64656c203d204e45572e6f7269675f64656c2c0a20202020202020202020202020206d6f64696669636174696f6e5f74696d657374616d70203d204e45572e6d6f64696669636174696f6e5f74696d657374616d702c0a202020202020202020202020202076657273696f6e203d204e45572e76657273696f6e0a202020202020202020205748455245206964203d204e45572e69643b0a20202020200a435245415445204f52205245504c4143452052554c452073616d706c655f64656c657465645f64656c6574652041530a202020204f4e2044454c45544520544f2073616d706c65735f64656c6574656420444f20494e53544541440a2020202020202044454c4554452046524f4d2073616d706c65735f616c6c0a20202020202020202020202020205748455245206964203d204f4c442e69643b0a0a435245415445204f52205245504c4143452052554c45206578706572696d656e745f696e736572742041530a20204f4e20494e5345525420544f206578706572696d656e747320444f20494e5354454144200a2020202020494e5345525420494e544f206578706572696d656e74735f616c6c20280a2020202020202069642c200a20202020202020636f64652c200a2020202020202064656c5f69642c0a202020202020206f7269675f64656c2c0a20202020202020657874795f69642c200a2020202020202069735f7075626c69632c0a202020202020206d6f64696669636174696f6e5f74696d657374616d702c0a202020202020207065726d5f69642c0a20202020202020706572735f69645f726567697374657265722c200a20202020202020706572735f69645f6d6f6469666965722c200a2020202020202070726f6a5f69642c0a20202020202020726567697374726174696f6e5f74696d657374616d702c0a2020202020202076657273696f6e0a2020202020292056414c55455320280a202020202020204e45572e69642c200a202020202020204e45572e636f64652c200a202020202020204e45572e64656c5f69642c0a202020202020204e45572e6f7269675f64656c2c0a202020202020204e45572e657874795f69642c200a202020202020204e45572e69735f7075626c69632c0a202020202020204e45572e6d6f64696669636174696f6e5f74696d657374616d702c0a202020202020204e45572e7065726d5f69642c0a202020202020204e45572e706572735f69645f726567697374657265722c200a202020202020204e45572e706572735f69645f6d6f6469666965722c200a202020202020204e45572e70726f6a5f69642c0a202020202020204e45572e726567697374726174696f6e5f74696d657374616d702c0a202020202020204e45572e76657273696f6e0a2020202020293b0a20202020200a435245415445204f52205245504c4143452052554c45206578706572696d656e745f7570646174652041530a202020204f4e2055504441544520544f206578706572696d656e747320444f20494e5354454144200a20202020202020555044415445206578706572696d656e74735f616c6c0a2020202020202020202053455420636f6465203d204e45572e636f64652c0a202020202020202020202020202064656c5f6964203d204e45572e64656c5f69642c0a20202020202020202020202020206f7269675f64656c203d204e45572e6f7269675f64656c2c0a2020202020202020202020202020657874795f6964203d204e45572e657874795f69642c0a202020202020202020202020202069735f7075626c6963203d204e45572e69735f7075626c69632c0a20202020202020202020202020206d6f64696669636174696f6e5f74696d657374616d70203d204e45572e6d6f64696669636174696f6e5f74696d657374616d702c0a20202020202020202020202020207065726d5f6964203d204e45572e7065726d5f69642c0a2020202020202020202020202020706572735f69645f72656769737465726572203d204e45572e706572735f69645f726567697374657265722c0a2020202020202020202020202020706572735f69645f6d6f646966696572203d204e45572e706572735f69645f6d6f6469666965722c0a202020202020202020202020202070726f6a5f6964203d204e45572e70726f6a5f69642c0a2020202020202020202020202020726567697374726174696f6e5f74696d657374616d70203d204e45572e726567697374726174696f6e5f74696d657374616d702c0a202020202020202020202020202076657273696f6e203d204e45572e76657273696f6e0a202020202020202020205748455245206964203d204e45572e69643b0a20202020200a435245415445204f52205245504c4143452052554c45206578706572696d656e745f64656c6574652041530a202020204f4e2044454c45544520544f206578706572696d656e747320444f20494e53544541440a2020202020202044454c4554452046524f4d206578706572696d656e74735f616c6c0a20202020202020202020202020205748455245206964203d204f4c442e69643b0a2020202020200a435245415445204f52205245504c4143452052554c45206578706572696d656e74735f64656c657465645f7570646174652041530a202020204f4e2055504441544520544f206578706572696d656e74735f64656c6574656420444f20494e5354454144200a20202020202020555044415445206578706572696d656e74735f616c6c0a202020202020202020205345542064656c5f6964203d204e45572e64656c5f69642c0a20202020202020202020202020206f7269675f64656c203d204e45572e6f7269675f64656c2c0a20202020202020202020202020206d6f64696669636174696f6e5f74696d657374616d70203d204e45572e6d6f64696669636174696f6e5f74696d657374616d702c0a202020202020202020202020202076657273696f6e203d204e45572e76657273696f6e0a202020202020202020205748455245206964203d204e45572e69643b0a20202020200a435245415445204f52205245504c4143452052554c45206578706572696d656e74735f64656c657465645f64656c6574652041530a202020204f4e2044454c45544520544f206578706572696d656e74735f64656c6574656420444f20494e53544541440a2020202020202044454c4554452046524f4d206578706572696d656e74735f616c6c0a20202020202020202020202020205748455245206964203d204f4c442e69643b0a2020202020200a435245415445204f52205245504c4143452052554c4520646174615f696e736572742041530a20204f4e20494e5345525420544f206461746120444f20494e5354454144200a2020202020494e5345525420494e544f20646174615f616c6c20280a2020202020202069642c200a20202020202020636f64652c200a2020202020202064656c5f69642c0a202020202020206f7269675f64656c2c0a20202020202020657870655f69642c0a20202020202020646173745f69642c0a20202020202020646174615f70726f64756365725f636f64652c0a20202020202020647374795f69642c0a2020202020202069735f646572697665642c0a2020202020202069735f76616c69642c0a202020202020206d6f64696669636174696f6e5f74696d657374616d702c0a202020202020206163636573735f74696d657374616d702c0a20202020202020706572735f69645f726567697374657265722c0a20202020202020706572735f69645f6d6f6469666965722c0a2020202020202070726f64756374696f6e5f74696d657374616d702c0a20202020202020726567697374726174696f6e5f74696d657374616d702c0a2020202020202073616d705f69642c0a2020202020202076657273696f6e2c0a20202020202020646174615f7365745f6b696e640a2020202020292056414c55455320280a202020202020204e45572e69642c200a202020202020204e45572e636f64652c200a202020202020204e45572e64656c5f69642c200a202020202020204e45572e6f7269675f64656c2c0a202020202020204e45572e657870655f69642c0a202020202020204e45572e646173745f69642c0a202020202020204e45572e646174615f70726f64756365725f636f64652c0a202020202020204e45572e647374795f69642c0a202020202020204e45572e69735f646572697665642c200a202020202020204e45572e69735f76616c69642c0a202020202020204e45572e6d6f64696669636174696f6e5f74696d657374616d702c0a202020202020204e45572e6163636573735f74696d657374616d702c0a202020202020204e45572e706572735f69645f726567697374657265722c0a202020202020204e45572e706572735f69645f6d6f6469666965722c0a202020202020204e45572e70726f64756374696f6e5f74696d657374616d702c0a202020202020204e45572e726567697374726174696f6e5f74696d657374616d702c0a202020202020204e45572e73616d705f69642c0a202020202020204e45572e76657273696f6e2c0a202020202020204e45572e646174615f7365745f6b696e640a2020202020293b0a20202020200a435245415445204f52205245504c4143452052554c4520646174615f7570646174652041530a202020204f4e2055504441544520544f206461746120444f20494e5354454144200a2020202020202055504441544520646174615f616c6c0a2020202020202020202053455420636f6465203d204e45572e636f64652c0a202020202020202020202020202064656c5f6964203d204e45572e64656c5f69642c0a20202020202020202020202020206f7269675f64656c203d204e45572e6f7269675f64656c2c0a2020202020202020202020202020657870655f6964203d204e45572e657870655f69642c0a2020202020202020202020202020646173745f6964203d204e45572e646173745f69642c0a2020202020202020202020202020646174615f70726f64756365725f636f6465203d204e45572e646174615f70726f64756365725f636f64652c0a2020202020202020202020202020647374795f6964203d204e45572e647374795f69642c0a202020202020202020202020202069735f64657269766564203d204e45572e69735f646572697665642c0a202020202020202020202020202069735f76616c6964203d204e45572e69735f76616c69642c0a20202020202020202020202020206d6f64696669636174696f6e5f74696d657374616d70203d204e45572e6d6f64696669636174696f6e5f74696d657374616d702c0a20202020202020202020202020206163636573735f74696d657374616d70203d204e45572e6163636573735f74696d657374616d702c0a2020202020202020202020202020706572735f69645f72656769737465726572203d204e45572e706572735f69645f726567697374657265722c0a2020202020202020202020202020706572735f69645f6d6f646966696572203d204e45572e706572735f69645f6d6f6469666965722c0a202020202020202020202020202070726f64756374696f6e5f74696d657374616d70203d204e45572e70726f64756374696f6e5f74696d657374616d702c0a2020202020202020202020202020726567697374726174696f6e5f74696d657374616d70203d204e45572e726567697374726174696f6e5f74696d657374616d702c0a202020202020202020202020202073616d705f6964203d204e45572e73616d705f69642c0a202020202020202020202020202076657273696f6e203d204e45572e76657273696f6e2c0a2020202020202020202020202020646174615f7365745f6b696e64203d204e45572e646174615f7365745f6b696e640a202020202020205748455245206964203d204e45572e69643b0a20202020202020202020202020200a435245415445204f52205245504c4143452052554c4520646174615f616c6c2041530a202020204f4e2044454c45544520544f206461746120444f20494e53544541440a2020202020202044454c4554452046524f4d20646174615f616c6c0a20202020202020202020202020205748455245206964203d204f4c442e69643b0a20202020202020202020202020200a435245415445204f52205245504c4143452052554c4520646174615f64656c657465645f7570646174652041530a202020204f4e2055504441544520544f20646174615f64656c6574656420444f20494e5354454144200a2020202020202055504441544520646174615f616c6c0a202020202020202020205345542064656c5f6964203d204e45572e64656c5f69642c0a20202020202020202020202020206f7269675f64656c203d204e45572e6f7269675f64656c2c0a20202020202020202020202020206d6f64696669636174696f6e5f74696d657374616d70203d204e45572e6d6f64696669636174696f6e5f74696d657374616d702c0a202020202020202020202020202076657273696f6e203d204e45572e76657273696f6e0a202020202020202020205748455245206964203d204e45572e69643b0a20202020200a435245415445204f52205245504c4143452052554c4520646174615f64656c657465645f64656c6574652041530a202020204f4e2044454c45544520544f20646174615f64656c6574656420444f20494e53544541440a2020202020202044454c4554452046524f4d20646174615f616c6c0a20202020202020202020202020205748455245206964203d204f4c442e69643b0a0a2d2d2072656372656174696e672066756e6374696f6e73207573696e67206c6f63616c207661726961626c6573206f66207479706520434f44452e204f7468657277697365206f6e65206d6967687420676574206120226361636865206c6f6f6b7570206661696c656420666f72207479706522206572726f72200a0a435245415445204f52205245504c4143452046554e4354494f4e20434f4e54524f4c4c45445f564f434142554c4152595f434845434b28292052455455524e5320747269676765722041532024240a4445434c4152450a202020765f636f64652020434f44453b0a424547494e0a0a20202073656c65637420636f646520696e746f20765f636f64652066726f6d20646174615f7479706573207768657265206964203d204e45572e646174795f69643b0a0a2020202d2d20436865636b206966207468652064617461206973206f6620747970652022434f4e54524f4c4c4544564f434142554c415259220a202020696620765f636f6465203d2027434f4e54524f4c4c4544564f434142554c41525927207468656e0a2020202020206966204e45572e636f766f5f6964204953204e554c4c207468656e0a202020202020202020524149534520455843455054494f4e2027496e736572742f557064617465206f662050726f706572747920547970652028436f64653a202529206661696c65642c206173206974732044617461205479706520697320434f4e54524f4c4c4544564f434142554c4152592c20627574206974206973206e6f74206c696e6b656420746f206120436f6e74726f6c6c656420566f636162756c6172792e272c204e45572e636f64653b0a202020202020656e642069663b0a202020656e642069663b0a0a20202052455455524e204e45573b0a0a454e443b0a2424204c414e47554147452027706c706773716c273b0a0a435245415445204f52205245504c4143452046554e4354494f4e2045585445524e414c5f444154415f53544f524147455f464f524d41545f434845434b28292052455455524e5320747269676765722041532024240a4445434c4152450a202020765f636f766f5f636f64652020434f44453b0a202020646174615f636f646520434f44453b0a424547494e0a0a20202073656c65637420636f646520696e746f20765f636f766f5f636f64652066726f6d20636f6e74726f6c6c65645f766f636162756c61726965730a20202020202077686572652069735f696e7465726e616c5f6e616d657370616365203d207472756520616e64200a2020202020202020206964203d202873656c65637420636f766f5f69642066726f6d20636f6e74726f6c6c65645f766f636162756c6172795f7465726d73207768657265206964203d204e45572e637674655f69645f73746f725f666d74293b0a2020202d2d20436865636b2069662074686520646174612073746f7261676520666f726d61742069732061207465726d206f662074686520636f6e74726f6c6c656420766f636162756c617279202253544f524147455f464f524d4154220a202020696620765f636f766f5f636f646520213d202753544f524147455f464f524d415427207468656e0a20202020202073656c65637420636f646520696e746f20646174615f636f64652066726f6d20646174615f616c6c207768657265206964203d204e45572e646174615f69643b200a202020202020524149534520455843455054494f4e2027496e736572742f557064617465206f6620446174612028436f64653a202529206661696c65642c206173206974732053746f7261676520466f726d617420697320252c2062757420697320726571756972656420746f2062652053544f524147455f464f524d41542e272c20646174615f636f64652c20765f636f766f5f636f64653b0a202020656e642069663b0a0a20202052455455524e204e45573b0a0a454e443b0a2424204c414e47554147452027706c706773716c273b0a0a435245415445204f52205245504c4143452046554e4354494f4e20646174615f6578705f6f725f73616d706c655f6c696e6b5f636865636b28292052455455524e5320747269676765722041532024240a4445434c4152450a202073706163655f696420434f44453b0a202073616d706c655f636f646520434f44453b0a424547494e0a20206966204e45572e657870655f6964204953204e4f54204e554c4c207468656e0a2020202052455455524e204e45573b0a2020656e642069663b0a20206966204e45572e73616d705f6964204953204e554c4c207468656e0a20202020524149534520455843455054494f4e20274e656974686572206578706572696d656e74206e6f722073616d706c652069732073706563696669656420666f722064617461207365742025272c204e45572e636f64653b0a2020656e642069663b0a202073656c65637420732e69642c20732e636f646520696e746f2073706163655f69642c2073616d706c655f636f64652066726f6d2073616d706c65735f616c6c207320776865726520732e6964203d204e45572e73616d705f69643b0a202069662073706163655f6964206973204e554c4c207468656e0a20202020524149534520455843455054494f4e202753616d706c6520252069732061207368617265642073616d706c652e272c2073616d706c655f636f64653b0a2020656e642069663b0a202052455455524e204e45573b0a454e443b0a2424204c414e47554147452027706c706773716c273b0a0a435245415445204f52205245504c4143452046554e4354494f4e204d4154455249414c5f50524f50455254595f574954485f4d4154455249414c5f444154415f545950455f434845434b28292052455455524e5320747269676765722041532024240a4445434c4152450a202020765f747970655f69642020434f44453b0a202020765f747970655f69645f70726f702020434f44453b0a424547494e0a2020206966204e45572e6d6174655f70726f705f6964204953204e4f54204e554c4c207468656e0a2020202020202d2d2066696e64206d6174657269616c2074797065206964206f66207468652070726f70657274792074797065200a20202020202073656c6563742070742e6d6174795f70726f705f696420696e746f20765f747970655f69645f70726f70200a202020202020202066726f6d206d6174657269616c5f747970655f70726f70657274795f747970657320657470742c2070726f70657274795f7479706573207074200a202020202020207768657265204e45572e6d7470745f6964203d20657470742e696420414e4420657470742e707274795f6964203d2070742e69643b0a202020200a202020202020696620765f747970655f69645f70726f70204953204e4f54204e554c4c207468656e0a20202020202020202d2d2066696e64206d6174657269616c2074797065206964206f6620746865206d6174657269616c20776869636820636f6e73697374732074686520656e7469747927732070726f70657274792076616c75650a202020202020202073656c65637420656e746974792e6d6174795f696420696e746f20765f747970655f6964200a2020202020202020202066726f6d206d6174657269616c7320656e746974790a2020202020202020207768657265204e45572e6d6174655f70726f705f6964203d20656e746974792e69643b0a2020202020202020696620765f747970655f696420213d20765f747970655f69645f70726f70207468656e0a20202020202020202020524149534520455843455054494f4e2027496e736572742f557064617465206f662070726f70657274792076616c7565207265666572656e63696e67206d6174657269616c202869643a202529206661696c65642c206173207265666572656e636564206d6174657269616c207479706520697320646966666572656e74207468616e2065787065637465642028696420252c2065787065637465642069643a2025292e272c200a2020202020202020202020202020204e45572e6d6174655f70726f705f69642c20765f747970655f69642c20765f747970655f69645f70726f703b0a2020202020202020656e642069663b0a202020202020656e642069663b0a202020656e642069663b0a20202052455455524e204e45573b0a454e443b0a2424204c414e47554147452027706c706773716c273b0a0a435245415445204f52205245504c4143452046554e4354494f4e2053414d504c455f50524f50455254595f574954485f4d4154455249414c5f444154415f545950455f434845434b28292052455455524e5320747269676765722041532024240a4445434c4152450a202020765f747970655f69642020434f44453b0a202020765f747970655f69645f70726f702020434f44453b0a424547494e0a2020206966204e45572e6d6174655f70726f705f6964204953204e4f54204e554c4c207468656e0a2020202020202d2d2066696e64206d6174657269616c2074797065206964206f66207468652070726f70657274792074797065200a20202020202073656c6563742070742e6d6174795f70726f705f696420696e746f20765f747970655f69645f70726f70200a202020202020202066726f6d2073616d706c655f747970655f70726f70657274795f747970657320657470742c2070726f70657274795f7479706573207074200a202020202020207768657265204e45572e737470745f6964203d20657470742e696420414e4420657470742e707274795f6964203d2070742e69643b0a202020200a202020202020696620765f747970655f69645f70726f70204953204e4f54204e554c4c207468656e0a20202020202020202d2d2066696e64206d6174657269616c2074797065206964206f6620746865206d6174657269616c20776869636820636f6e73697374732074686520656e7469747927732070726f70657274792076616c75650a202020202020202073656c65637420656e746974792e6d6174795f696420696e746f20765f747970655f6964200a2020202020202020202066726f6d206d6174657269616c7320656e746974790a2020202020202020207768657265204e45572e6d6174655f70726f705f6964203d20656e746974792e69643b0a2020202020202020696620765f747970655f696420213d20765f747970655f69645f70726f70207468656e0a20202020202020202020524149534520455843455054494f4e2027496e736572742f557064617465206f662070726f70657274792076616c7565207265666572656e63696e67206d6174657269616c202869643a202529206661696c65642c206173207265666572656e636564206d6174657269616c207479706520697320646966666572656e74207468616e2065787065637465642028696420252c2065787065637465642069643a2025292e272c200a202020202020202020202020202020202020202020202020204e45572e6d6174655f70726f705f69642c20765f747970655f69642c20765f747970655f69645f70726f703b0a2020202020202020656e642069663b0a202020202020656e642069663b0a202020656e642069663b0a20202052455455524e204e45573b0a454e443b0a2424204c414e47554147452027706c706773716c273b0a0a435245415445204f52205245504c4143452046554e4354494f4e204558504552494d454e545f50524f50455254595f574954485f4d4154455249414c5f444154415f545950455f434845434b28292052455455524e5320747269676765722041532024240a4445434c4152450a202020765f747970655f69642020434f44453b0a202020765f747970655f69645f70726f702020434f44453b0a424547494e0a2020206966204e45572e6d6174655f70726f705f6964204953204e4f54204e554c4c207468656e0a2020202020202d2d2066696e64206d6174657269616c2074797065206964206f66207468652070726f70657274792074797065200a20202020202073656c6563742070742e6d6174795f70726f705f696420696e746f20765f747970655f69645f70726f70200a202020202020202066726f6d206578706572696d656e745f747970655f70726f70657274795f747970657320657470742c2070726f70657274795f7479706573207074200a202020202020207768657265204e45572e657470745f6964203d20657470742e696420414e4420657470742e707274795f6964203d2070742e69643b0a202020200a202020202020696620765f747970655f69645f70726f70204953204e4f54204e554c4c207468656e0a20202020202020202d2d2066696e64206d6174657269616c2074797065206964206f6620746865206d6174657269616c20776869636820636f6e73697374732074686520656e7469747927732070726f70657274792076616c75650a202020202020202073656c65637420656e746974792e6d6174795f696420696e746f20765f747970655f6964200a2020202020202020202066726f6d206d6174657269616c7320656e746974790a2020202020202020207768657265204e45572e6d6174655f70726f705f6964203d20656e746974792e69643b0a2020202020202020696620765f747970655f696420213d20765f747970655f69645f70726f70207468656e0a20202020202020202020524149534520455843455054494f4e2027496e736572742f557064617465206f662070726f70657274792076616c7565207265666572656e63696e67206d6174657269616c202869643a202529206661696c65642c206173207265666572656e636564206d6174657269616c207479706520697320646966666572656e74207468616e2065787065637465642028696420252c2065787065637465642069643a2025292e272c200a202020202020202020202020202020202020202020202020204e45572e6d6174655f70726f705f69642c20765f747970655f69642c20765f747970655f69645f70726f703b0a2020202020202020656e642069663b0a202020202020656e642069663b0a202020656e642069663b0a20202052455455524e204e45573b0a454e443b0a2424204c414e47554147452027706c706773716c273b0a0a435245415445204f52205245504c4143452046554e4354494f4e20444154415f5345545f50524f50455254595f574954485f4d4154455249414c5f444154415f545950455f434845434b28292052455455524e5320747269676765722041532024240a4445434c4152450a202020765f747970655f69642020434f44453b0a202020765f747970655f69645f70726f702020434f44453b0a424547494e0a2020206966204e45572e6d6174655f70726f705f6964204953204e4f54204e554c4c207468656e0a2020202020202d2d2066696e64206d6174657269616c2074797065206964206f66207468652070726f70657274792074797065200a20202020202073656c6563742070742e6d6174795f70726f705f696420696e746f20765f747970655f69645f70726f70200a202020202020202066726f6d20646174615f7365745f747970655f70726f70657274795f74797065732064737470742c2070726f70657274795f7479706573207074200a202020202020207768657265204e45572e64737470745f6964203d2064737470742e696420414e442064737470742e707274795f6964203d2070742e69643b0a202020200a202020202020696620765f747970655f69645f70726f70204953204e4f54204e554c4c207468656e0a20202020202020202d2d2066696e64206d6174657269616c2074797065206964206f6620746865206d6174657269616c20776869636820636f6e73697374732074686520656e7469747927732070726f70657274792076616c75650a202020202020202073656c65637420656e746974792e6d6174795f696420696e746f20765f747970655f6964200a2020202020202020202066726f6d206d6174657269616c7320656e746974790a2020202020202020207768657265204e45572e6d6174655f70726f705f6964203d20656e746974792e69643b0a2020202020202020696620765f747970655f696420213d20765f747970655f69645f70726f70207468656e0a20202020202020202020524149534520455843455054494f4e2027496e736572742f557064617465206f662070726f70657274792076616c7565207265666572656e63696e67206d6174657269616c202869643a202529206661696c65642c206173207265666572656e636564206d6174657269616c207479706520697320646966666572656e74207468616e2065787065637465642028696420252c2065787065637465642069643a2025292e272c200a202020202020202020202020202020202020202020202020204e45572e6d6174655f70726f705f69642c20765f747970655f69642c20765f747970655f69645f70726f703b0a2020202020202020656e642069663b0a202020202020656e642069663b0a202020656e642069663b0a20202052455455524e204e45573b0a454e443b0a2424204c414e47554147452027706c706773716c273b0a0a435245415445204f52205245504c4143452046554e4354494f4e20636865636b5f637265617465645f6f725f6d6f6469666965645f646174615f7365745f6f776e65725f69735f616c69766528292052455455524e5320747269676765722041532024240a4445434c4152450a20206f776e65725f636f64652020434f44453b0a20206f776e65725f64656c5f69642020544543485f49443b0a424547494e0a2020494620284e45572e64656c5f6964204953204e4f54204e554c4c29205448454e0a2020202052455455524e204e45573b0a2020454e442049463b0a0a20202d2d20636865636b2073616d706c650a2020494620284e45572e73616d705f6964204953204e4f54204e554c4c29205448454e0a2020202053454c4543542064656c5f69642c20636f646520494e544f206f776e65725f64656c5f69642c206f776e65725f636f64650a20202020202046524f4d2073616d706c6573200a2020202020205748455245206964203d204e45572e73616d705f69643b0a20202020494620286f776e65725f64656c5f6964204953204e4f54204e554c4c29205448454e200a202020202020524149534520455843455054494f4e202744617461205365742028436f64653a2025292063616e6e6f7420626520636f6e6e656374656420746f20612053616d706c652028436f64653a20252920252e272c200a202020202020202020202020202020202020202020204e45572e636f64652c206f776e65725f636f64652c2064656c6574696f6e5f6465736372697074696f6e286f776e65725f64656c5f6964293b0a20202020454e442049463b0a2020454e442049463b0a20202d2d20636865636b206578706572696d656e740a2020494620284e45572e657870655f6964204953204e4f54204e554c4c29205448454e0a2020202053454c4543542064656c5f69642c20636f646520494e544f206f776e65725f64656c5f69642c206f776e65725f636f64650a20202020202046524f4d206578706572696d656e7473200a2020202020205748455245206964203d204e45572e657870655f69643b0a20202020494620286f776e65725f64656c5f6964204953204e4f54204e554c4c29205448454e200a202020202020524149534520455843455054494f4e202744617461205365742028436f64653a2025292063616e6e6f7420626520636f6e6e656374656420746f20616e204578706572696d656e742028436f64653a20252920252e272c200a202020202020202020202020202020202020202020204e45572e636f64652c206f776e65725f636f64652c2064656c6574696f6e5f6465736372697074696f6e286f776e65725f64656c5f6964293b0a20202020454e442049463b200a2020454e442049463b200a202052455455524e204e45573b0a454e443b0a2424204c414e47554147452027706c706773716c273b0a20200a435245415445204f52205245504c4143452046554e4354494f4e20636865636b5f637265617465645f6f725f6d6f6469666965645f73616d706c655f6f776e65725f69735f616c69766528292052455455524e5320747269676765722041532024240a4445434c4152450a20206f776e65725f636f64652020434f44453b0a20206f776e65725f64656c5f69642020544543485f49443b0a424547494e0a2020494620284e45572e64656c5f6964204953204e4f54204e554c4c29205448454e0a2020202052455455524e204e45573b0a2020454e442049463b0a0a20202d2d20636865636b206578706572696d656e74202863616e27742062652064656c65746564290a2020494620284e45572e657870655f6964204953204e4f54204e554c4c29205448454e0a2020202053454c4543542064656c5f69642c20636f646520494e544f206f776e65725f64656c5f69642c206f776e65725f636f64650a20202020202046524f4d206578706572696d656e7473200a2020202020205748455245206964203d204e45572e657870655f69643b0a20202020494620286f776e65725f64656c5f6964204953204e4f54204e554c4c29205448454e200a202020202020524149534520455843455054494f4e202753616d706c652028436f64653a2025292063616e6e6f7420626520636f6e6e656374656420746f20616e204578706572696d656e742028436f64653a20252920252e272c200a202020202020202020202020202020202020202020204e45572e636f64652c206f776e65725f636f64652c2064656c6574696f6e5f6465736372697074696f6e286f776e65725f64656c5f6964293b0a20202020454e442049463b0a2020454e442049463b0a202052455455524e204e45573b0a454e443b0a2424204c414e47554147452027706c706773716c273b0a20200a \N +170 ../../../../openbis/source/sql/postgresql/migration/migration-169-170.sql SUCCESS 2018-07-12 13:54:11.596 \\x414c544552205441424c452065787465726e616c5f646174612052454e414d4520434f4c554d4e20646174615f696420544f2069643b0a414c544552205441424c45206c696e6b5f646174612052454e414d4520434f4c554d4e20646174615f696420544f2069643b0a0a435245415445204f52205245504c4143452046554e4354494f4e2045585445524e414c5f444154415f53544f524147455f464f524d41545f434845434b28292052455455524e5320747269676765722041532024240a4445434c4152450a202020765f636f766f5f636f64652020434f44453b0a202020646174615f636f646520434f44453b0a424547494e0a0a20202073656c65637420636f646520696e746f20765f636f766f5f636f64652066726f6d20636f6e74726f6c6c65645f766f636162756c61726965730a20202020202077686572652069735f696e7465726e616c5f6e616d657370616365203d207472756520616e64200a2020202020202020206964203d202873656c65637420636f766f5f69642066726f6d20636f6e74726f6c6c65645f766f636162756c6172795f7465726d73207768657265206964203d204e45572e637674655f69645f73746f725f666d74293b0a2020202d2d20436865636b2069662074686520646174612073746f7261676520666f726d61742069732061207465726d206f662074686520636f6e74726f6c6c656420766f636162756c617279202253544f524147455f464f524d4154220a202020696620765f636f766f5f636f646520213d202753544f524147455f464f524d415427207468656e0a20202020202073656c65637420636f646520696e746f20646174615f636f64652066726f6d20646174615f616c6c207768657265206964203d204e45572e69643b200a202020202020524149534520455843455054494f4e2027496e736572742f557064617465206f6620446174612028436f64653a202529206661696c65642c206173206974732053746f7261676520466f726d617420697320252c2062757420697320726571756972656420746f2062652053544f524147455f464f524d41542e272c20646174615f636f64652c20765f636f766f5f636f64653b0a202020656e642069663b0a0a20202052455455524e204e45573b0a0a454e443b0a2424204c414e47554147452027706c706773716c273b0a0a435245415445204f52205245504c4143452046554e4354494f4e20636865636b5f646174615f7365745f6b696e645f6c696e6b28292052455455524e5320747269676765722041532024240a4445434c4152450a202020206b696e6420444154415f5345545f4b494e443b0a424547494e0a2020202053454c45435420646174615f7365745f6b696e6420494e544f206b696e640a202020202020202046524f4d20646174615f616c6c200a20202020202020205748455245206964203d204e45572e69643b0a2020202020202020494620286b696e64203c3e20274c494e4b2729205448454e200a202020202020202020202020524149534520455843455054494f4e20274c696e6b20646174612028446174612053657420436f64653a202529206d757374207265666572656e63652061206461746120736574206f66206b696e64204c494e4b202869732025292e272c200a202020202020202020202020202020202020202020202020202020204e45572e69642c206b696e643b0a2020202020202020454e442049463b0a2020202052455455524e204e45573b0a454e443b0a2424204c414e47554147452027706c706773716c273b0a0a435245415445204f52205245504c4143452046554e4354494f4e20636865636b5f646174615f7365745f6b696e645f706879736963616c28292052455455524e5320747269676765722041532024240a4445434c4152450a202020206b696e6420444154415f5345545f4b494e443b0a424547494e0a2020202053454c45435420646174615f7365745f6b696e6420494e544f206b696e640a202020202020202046524f4d20646174615f616c6c200a20202020202020205748455245206964203d204e45572e69643b0a2020202020202020494620286b696e64203c3e2027504859534943414c2729205448454e200a202020202020202020202020524149534520455843455054494f4e202745787465726e616c20646174612028446174612053657420436f64653a202529206d757374207265666572656e63652061206461746120736574206f66206b696e6420504859534943414c202869732025292e272c200a202020202020202020202020202020202020202020202020202020204e45572e69642c206b696e643b0a2020202020202020454e442049463b0a2020202052455455524e204e45573b0a454e443b0a2424204c414e47554147452027706c706773716c273b0a \N +171 ../../../../openbis/source/sql/postgresql/migration/migration-170-171.sql SUCCESS 2018-07-12 13:54:11.62 \\x2d2d204d6967726174696f6e2066726f6d2031373020746f203137310a0a2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d0a2d2d2020507572706f73653a20206164642065787465726e616c20646d73206669656c647320746f20636f6e74656e7420636f707920686973746f72790a2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d0a0a414c544552205441424c4520646174615f7365745f636f706965735f686973746f72792041444420434f4c554d4e2065646d735f636f646520434f44453b0a414c544552205441424c4520646174615f7365745f636f706965735f686973746f72792041444420434f4c554d4e2065646d735f6c6162656c20544558545f56414c55453b0a414c544552205441424c4520646174615f7365745f636f706965735f686973746f72792041444420434f4c554d4e2065646d735f6164647265737320544558545f56414c55453b0a0a435245415445204f52205245504c4143452052554c4520636f6e74656e745f636f706965735f686973746f72795f696e736572742041530a20204f4e20494e5345525420544f20636f6e74656e745f636f706965730a2020444f20414c534f20280a20202020494e5345525420494e544f20646174615f7365745f636f706965735f686973746f727920280a20202020202069642c0a20202020202063635f69642c0a202020202020646174615f69642c0a20202020202065787465726e616c5f636f64652c0a202020202020706174682c0a2020202020206769745f636f6d6d69745f686173682c0a2020202020206769745f7265706f7369746f72795f69642c0a20202020202065646d735f69642c0a20202020202065646d735f636f64652c0a20202020202065646d735f6c6162656c2c0a20202020202065646d735f616464726573732c0a202020202020706572735f69645f617574686f722c0a20202020202076616c69645f66726f6d5f74696d657374616d700a20202020292056414c55455320280a2020202020206e65787476616c2827646174615f7365745f636f706965735f686973746f72795f69645f73657127292c200a2020202020204e45572e69642c0a2020202020204e45572e646174615f69642c200a2020202020204e45572e65787465726e616c5f636f64652c0a2020202020204e45572e706174682c0a2020202020204e45572e6769745f636f6d6d69745f686173682c0a2020202020204e45572e6769745f7265706f7369746f72795f69642c0a2020202020204e45572e65646d735f69642c0a2020202020202853454c45435420636f64652046524f4d2065787465726e616c5f646174615f6d616e6167656d656e745f73797374656d73205748455245206964203d204e45572e65646d735f6964292c0a2020202020202853454c454354206c6162656c2046524f4d2065787465726e616c5f646174615f6d616e6167656d656e745f73797374656d73205748455245206964203d204e45572e65646d735f6964292c0a2020202020202853454c45435420616464726573732046524f4d2065787465726e616c5f646174615f6d616e6167656d656e745f73797374656d73205748455245206964203d204e45572e65646d735f6964292c0a2020202020204e45572e706572735f69645f726567697374657265722c0a2020202020204e45572e726567697374726174696f6e5f74696d657374616d70293b0a2020293b0a0a2d2d2063726561746520636f6e74656e7420636f707920686973746f727920656e747279206f6e2065787465726e616c20646d73206368616e67650a435245415445204f52205245504c4143452052554c452065646d735f615f696e736572745f636f6e74656e745f636f70795f686973746f72792041530a20204f4e2055504441544520544f2065787465726e616c5f646174615f6d616e6167656d656e745f73797374656d730a2020444f20414c534f20280a20202020494e5345525420494e544f20646174615f7365745f636f706965735f686973746f727920280a20202020202069642c0a20202020202063635f69642c0a202020202020646174615f69642c0a20202020202065787465726e616c5f636f64652c0a202020202020706174682c0a2020202020206769745f636f6d6d69745f686173682c0a2020202020206769745f7265706f7369746f72795f69642c0a20202020202065646d735f69642c0a20202020202065646d735f636f64652c0a20202020202065646d735f6c6162656c2c0a20202020202065646d735f616464726573732c0a202020202020706572735f69645f617574686f722c0a20202020202076616c69645f66726f6d5f74696d657374616d700920200a09290a2020202053454c4543540a202020206e65787476616c2827646174615f7365745f636f706965735f686973746f72795f69645f73657127292c200a20202020647363682e63635f69642c0a20202020647363682e646174615f69642c0a20202020647363682e65787465726e616c5f636f64652c0a20202020647363682e706174682c0a20202020647363682e6769745f636f6d6d69745f686173682c0a20202020647363682e6769745f7265706f7369746f72795f69642c0a20202020647363682e65646d735f69642c0a202020204e45572e636f64652c0a202020204e45572e6c6162656c2c0a202020204e45572e616464726573732c0a20202020647363682e706572735f69645f617574686f722c0a2020202043555252454e545f54494d455354414d500a2020202046524f4d20646174615f7365745f636f706965735f686973746f727920647363680a202020204a4f494e2065787465726e616c5f646174615f6d616e6167656d656e745f73797374656d732065646d730a202020204f4e2065646d732e6964203d20647363682e65646d735f69640a202020205748455245204e45572e6964203d20647363682e65646d735f696420414e4420647363682e76616c69645f756e74696c5f74696d657374616d70204953204e554c4c3b0a2020293b0a0a2d2d2065787069726520636f6e74656e7420636f707920686973746f727920656e747279206f6e2065787465726e616c20646d73206368616e67650a435245415445204f52205245504c4143452052554c452065646d735f625f6578706972655f636f6e74656e745f636f70795f686973746f72792041530a20204f4e2055504441544520544f2065787465726e616c5f646174615f6d616e6167656d656e745f73797374656d730a2020444f20414c534f20280a202020205550444154450a20202020646174615f7365745f636f706965735f686973746f7279205345542076616c69645f756e74696c5f74696d657374616d70203d2043555252454e545f54494d455354414d500a2020202057484552452076616c69645f756e74696c5f74696d657374616d70204953204e554c4c0a20202020414e442065646d735f6964203d204e45572e69640a20202020414e442076616c69645f66726f6d5f74696d657374616d70203c3e2043555252454e545f54494d455354414d503b0a293b0a0a44524f50205649455720646174615f7365745f686973746f72795f766965773b0a435245415445205649455720646174615f7365745f686973746f72795f7669657720415320280a202053454c4543540a20202020332a69642061732069642c0a202020206d61696e5f646174615f69642c0a2020202072656c6174696f6e5f747970652c0a202020206f7264696e616c2c0a20202020657870655f69642c0a2020202073616d705f69642c0a20202020646174615f69642c0a20202020656e746974795f7065726d5f69642c0a202020206e756c6c2061732064737470745f69642c0a202020206e756c6c2061732076616c75652c0a202020206e756c6c20617320766f636162756c6172795f7465726d2c0a202020206e756c6c206173206d6174657269616c2c0a202020206e756c6c2061732065787465726e616c5f636f64652c0a202020206e756c6c20617320706174682c0a202020206e756c6c206173206769745f636f6d6d69745f686173682c0a202020206e756c6c206173206769745f7265706f7369746f72795f69642c0a202020206e756c6c3a3a544543485f49442061732065646d735f69642c0a202020206e756c6c2061732065646d735f636f64652c0a202020206e756c6c2061732065646d735f6c6162656c2c0a202020206e756c6c2061732065646d735f616464726573732c0a20202020706572735f69645f617574686f722c0a2020202076616c69645f66726f6d5f74696d657374616d702c0a2020202076616c69645f756e74696c5f74696d657374616d700a202046524f4d0a20202020646174615f7365745f72656c6174696f6e73686970735f686973746f72790a202057484552450a2020202076616c69645f756e74696c5f74696d657374616d70204953204e4f54204e554c4c290a554e494f4e0a202053454c4543540a20202020332a69642b312061732069642c0a2020202064735f6964206173206d61696e5f646174615f69642c0a202020206e756c6c2061732072656c6174696f6e5f747970652c0a202020206e756c6c206173206f7264696e616c2c0a202020206e756c6c20617320657870655f69642c0a202020206e756c6c2061732073616d705f69642c0a202020206e756c6c20617320646174615f69642c0a202020206e756c6c20617320656e746974795f7065726d5f69642c0a2020202064737470745f69642c0a2020202076616c75652c0a20202020766f636162756c6172795f7465726d2c0a202020206d6174657269616c2c0a202020206e756c6c2061732065787465726e616c5f636f64652c0a202020206e756c6c20617320706174682c0a202020206e756c6c206173206769745f636f6d6d69745f686173682c0a202020206e756c6c206173206769745f7265706f7369746f72795f69642c0a202020206e756c6c2061732065646d735f69642c0a202020206e756c6c2061732065646d735f636f64652c0a202020206e756c6c2061732065646d735f6c6162656c2c0a202020206e756c6c2061732065646d735f616464726573732c0a20202020706572735f69645f617574686f722c0a2020202076616c69645f66726f6d5f74696d657374616d702c0a2020202076616c69645f756e74696c5f74696d657374616d700a202046524f4d0a20202020646174615f7365745f70726f706572746965735f686973746f72790a20554e494f4e0a20202853454c4543540a202020332a69642b322061732069642c0a20202020646174615f6964206173206d61696e5f646174615f69642c0a202020206e756c6c2061732072656c6174696f6e5f747970652c0a202020206e756c6c206173206f7264696e616c2c0a202020206e756c6c20617320657870655f69642c0a202020206e756c6c2061732073616d705f69642c0a202020206e756c6c20617320646174615f69642c0a202020206e756c6c20617320656e746974795f7065726d5f69642c0a202020206e756c6c2061732064737470745f69642c0a202020206e756c6c2061732076616c75652c0a202020206e756c6c20617320766f636162756c6172795f7465726d2c0a202020206e756c6c206173206d6174657269616c2c0a2020202065787465726e616c5f636f64652c0a20202020706174682c0a202020206769745f636f6d6d69745f686173682c0a202020206769745f7265706f7369746f72795f69642c0a2020202065646d735f69642c0a2020202065646d735f636f64652c0a2020202065646d735f6c6162656c2c0a2020202065646d735f616464726573732c0a20202020706572735f69645f617574686f722c0a2020202076616c69645f66726f6d5f74696d657374616d702c0a2020202076616c69645f756e74696c5f74696d657374616d700a202046524f4d0a20202020646174615f7365745f636f706965735f686973746f72790a202057484552450a2020202076616c69645f756e74696c5f74696d657374616d70204953204e4f54204e554c4c293b0a \N +172 ../../../../openbis/source/sql/postgresql/migration/migration-171-172.sql SUCCESS 2018-07-12 13:54:11.645 \\x2d2d204d6967726174696f6e2066726f6d2031373120746f203137320a0a2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d0a2d2d2020507572706f73653a20205353444d2d363037303a2041646420617263686976696e67207265717565737420666c616720746f20706879736963616c2064617461736574730a2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d0a0a414c544552205441424c452065787465726e616c5f646174612041444420434f4c554d4e20617263686976696e675f72657175657374656420424f4f4c45414e5f43484152204e4f54204e554c4c2044454641554c54202746270a \N \. @@ -3936,14 +4012,14 @@ COPY database_version_logs (db_version, module_name, run_status, run_status_time -- Name: deletion_id_seq; Type: SEQUENCE SET; Schema: public; Owner: - -- -SELECT pg_catalog.setval('deletion_id_seq', 5, true); +SELECT pg_catalog.setval('public.deletion_id_seq', 5, true); -- -- Data for Name: deletions; Type: TABLE DATA; Schema: public; Owner: - -- -COPY deletions (id, pers_id_registerer, registration_timestamp, reason) FROM stdin; +COPY public.deletions (id, pers_id_registerer, registration_timestamp, reason) FROM stdin; \. @@ -3951,14 +4027,14 @@ COPY deletions (id, pers_id_registerer, registration_timestamp, reason) FROM std -- Name: dstpt_id_seq; Type: SEQUENCE SET; Schema: public; Owner: - -- -SELECT pg_catalog.setval('dstpt_id_seq', 36, true); +SELECT pg_catalog.setval('public.dstpt_id_seq', 36, true); -- -- Data for Name: entity_operations_log; Type: TABLE DATA; Schema: public; Owner: - -- -COPY entity_operations_log (id, registration_id) FROM stdin; +COPY public.entity_operations_log (id, registration_id) FROM stdin; 1 2 2 3 3 4 @@ -3979,28 +4055,28 @@ COPY entity_operations_log (id, registration_id) FROM stdin; -- Name: entity_operations_log_id_seq; Type: SEQUENCE SET; Schema: public; Owner: - -- -SELECT pg_catalog.setval('entity_operations_log_id_seq', 13, true); +SELECT pg_catalog.setval('public.entity_operations_log_id_seq', 13, true); -- -- Name: etpt_id_seq; Type: SEQUENCE SET; Schema: public; Owner: - -- -SELECT pg_catalog.setval('etpt_id_seq', 1, true); +SELECT pg_catalog.setval('public.etpt_id_seq', 1, true); -- -- Name: event_id_seq; Type: SEQUENCE SET; Schema: public; Owner: - -- -SELECT pg_catalog.setval('event_id_seq', 194, true); +SELECT pg_catalog.setval('public.event_id_seq', 194, true); -- -- Data for Name: events; Type: TABLE DATA; Schema: public; Owner: - -- -COPY events (id, event_type, description, reason, pers_id_registerer, registration_timestamp, entity_type, identifiers, content, exac_id) FROM stdin; +COPY public.events (id, event_type, description, reason, pers_id_registerer, registration_timestamp, entity_type, identifiers, content, exac_id) FROM stdin; 1 DELETION /DSS1/1/1FD3FF61-1576-4908-AE3D-296E60B4CE06/42/c3/ec/20130412145123859-201 - 3 2013-04-12 14:56:56.588918+02 DATASET 20130412145123859-201 \N \N 2 DELETION 20130412100452629-1 - 3 2013-04-12 14:57:19.168743+02 SAMPLE 20130412100452629-1 \N \N 3 DELETION 20130412100452629-1 - 3 2013-04-12 14:57:19.168743+02 EXPERIMENT 20130412100452629-1 \N \N @@ -4200,21 +4276,21 @@ COPY events (id, event_type, description, reason, pers_id_registerer, registrati -- Name: experiment_code_seq; Type: SEQUENCE SET; Schema: public; Owner: - -- -SELECT pg_catalog.setval('experiment_code_seq', 1, false); +SELECT pg_catalog.setval('public.experiment_code_seq', 1, false); -- -- Name: experiment_id_seq; Type: SEQUENCE SET; Schema: public; Owner: - -- -SELECT pg_catalog.setval('experiment_id_seq', 7, true); +SELECT pg_catalog.setval('public.experiment_id_seq', 7, true); -- -- Data for Name: experiment_properties; Type: TABLE DATA; Schema: public; Owner: - -- -COPY experiment_properties (id, expe_id, etpt_id, value, cvte_id, mate_prop_id, pers_id_registerer, registration_timestamp, pers_id_author, modification_timestamp) FROM stdin; +COPY public.experiment_properties (id, expe_id, etpt_id, value, cvte_id, mate_prop_id, pers_id_registerer, registration_timestamp, pers_id_author, modification_timestamp) FROM stdin; \. @@ -4222,7 +4298,7 @@ COPY experiment_properties (id, expe_id, etpt_id, value, cvte_id, mate_prop_id, -- Data for Name: experiment_properties_history; Type: TABLE DATA; Schema: public; Owner: - -- -COPY experiment_properties_history (id, expe_id, etpt_id, value, vocabulary_term, material, pers_id_author, valid_from_timestamp, valid_until_timestamp) FROM stdin; +COPY public.experiment_properties_history (id, expe_id, etpt_id, value, vocabulary_term, material, pers_id_author, valid_from_timestamp, valid_until_timestamp) FROM stdin; \. @@ -4230,14 +4306,14 @@ COPY experiment_properties_history (id, expe_id, etpt_id, value, vocabulary_term -- Name: experiment_property_id_seq; Type: SEQUENCE SET; Schema: public; Owner: - -- -SELECT pg_catalog.setval('experiment_property_id_seq', 1, false); +SELECT pg_catalog.setval('public.experiment_property_id_seq', 1, false); -- -- Data for Name: experiment_relationships_history; Type: TABLE DATA; Schema: public; Owner: - -- -COPY experiment_relationships_history (id, main_expe_id, relation_type, samp_id, data_id, entity_perm_id, pers_id_author, valid_from_timestamp, valid_until_timestamp, proj_id) FROM stdin; +COPY public.experiment_relationships_history (id, main_expe_id, relation_type, samp_id, data_id, entity_perm_id, pers_id_author, valid_from_timestamp, valid_until_timestamp, proj_id) FROM stdin; 3 2 OWNED \N \N SCREENING-EXAMPLES 3 2013-04-12 10:52:32.616+02 \N 2 4 2 OWNER 2 \N 20130412140147735-20 3 2013-04-12 14:01:47.477+02 \N \N 5 2 OWNER 3 \N 20130412140147736-21 3 2013-04-12 14:01:47.735+02 \N \N @@ -4608,21 +4684,21 @@ COPY experiment_relationships_history (id, main_expe_id, relation_type, samp_id, -- Name: experiment_relationships_history_id_seq; Type: SEQUENCE SET; Schema: public; Owner: - -- -SELECT pg_catalog.setval('experiment_relationships_history_id_seq', 368, true); +SELECT pg_catalog.setval('public.experiment_relationships_history_id_seq', 368, true); -- -- Name: experiment_type_id_seq; Type: SEQUENCE SET; Schema: public; Owner: - -- -SELECT pg_catalog.setval('experiment_type_id_seq', 5, true); +SELECT pg_catalog.setval('public.experiment_type_id_seq', 5, true); -- -- Data for Name: experiment_type_property_types; Type: TABLE DATA; Schema: public; Owner: - -- -COPY experiment_type_property_types (id, exty_id, prty_id, is_mandatory, is_managed_internally, pers_id_registerer, registration_timestamp, ordinal, section, script_id, is_shown_edit, show_raw_value) FROM stdin; +COPY public.experiment_type_property_types (id, exty_id, prty_id, is_mandatory, is_managed_internally, pers_id_registerer, registration_timestamp, ordinal, section, script_id, is_shown_edit, show_raw_value) FROM stdin; 1 2 28 f f 1 2013-04-12 10:04:56.658885+02 4 \N \N f f \. @@ -4631,7 +4707,7 @@ COPY experiment_type_property_types (id, exty_id, prty_id, is_mandatory, is_mana -- Data for Name: experiment_types; Type: TABLE DATA; Schema: public; Owner: - -- -COPY experiment_types (id, code, description, modification_timestamp, validation_script_id) FROM stdin; +COPY public.experiment_types (id, code, description, modification_timestamp, validation_script_id) FROM stdin; 1 UNKNOWN Unknown 2013-04-12 10:04:52.629266+02 \N 2 HT_SEQUENCING High Throughput Sequencing (e.g. Illumina HiSeq, Illumina GA) 2013-04-12 10:04:56.658885+02 \N 3 MS_SEARCH MS_SEARCH experiment 2013-04-12 10:05:45.583358+02 \N @@ -4644,7 +4720,7 @@ COPY experiment_types (id, code, description, modification_timestamp, validation -- Data for Name: experiments_all; Type: TABLE DATA; Schema: public; Owner: - -- -COPY experiments_all (id, perm_id, code, exty_id, pers_id_registerer, registration_timestamp, modification_timestamp, proj_id, del_id, orig_del, is_public, pers_id_modifier, version) FROM stdin; +COPY public.experiments_all (id, perm_id, code, exty_id, pers_id_registerer, registration_timestamp, modification_timestamp, proj_id, del_id, orig_del, is_public, pers_id_modifier, version) FROM stdin; 5 20130412155138019-396 EXP-2 5 3 2013-04-12 15:51:37.937762+02 2013-04-17 09:49:42.458+02 2 \N \N f 2 0 6 20130415091745099-401 TEST-EXPERIMENT-2 1 3 2013-04-15 09:17:44.953707+02 2013-04-15 10:12:40.738+02 4 \N \N f 3 0 3 20130412150049446-204 TEST-EXPERIMENT 4 2 2013-04-12 15:00:49.359645+02 2013-04-15 11:16:25.168+02 4 \N \N f 3 1 @@ -4657,23 +4733,23 @@ COPY experiments_all (id, perm_id, code, exty_id, pers_id_registerer, registrati -- Data for Name: external_data; Type: TABLE DATA; Schema: public; Owner: - -- -COPY external_data (data_id, share_id, size, location, ffty_id, loty_id, cvte_id_stor_fmt, is_complete, cvte_id_store, status, present_in_archive, speed_hint, storage_confirmation, h5_folders, h5ar_folders) FROM stdin; -3 1 \N 1FD3FF61-1576-4908-AE3D-296E60B4CE06/0d/71/e9/20130412142205843-196 10 1 1 U \N AVAILABLE f -50 t t t -5 1 \N 1FD3FF61-1576-4908-AE3D-296E60B4CE06/40/26/e3/20130412142543232-197 10 1 1 U \N AVAILABLE f -50 t t t -2 1 \N 1FD3FF61-1576-4908-AE3D-296E60B4CE06/4f/6d/30/20130412142942295-198 8 1 1 U \N AVAILABLE f -50 t t t -4 1 \N 1FD3FF61-1576-4908-AE3D-296E60B4CE06/44/10/06/20130412143119901-199 9 1 1 T \N AVAILABLE f -50 t t t -29 1 \N 1FD3FF61-1576-4908-AE3D-296E60B4CE06/cd/53/dc/20130417094934693-427 8 1 1 U \N AVAILABLE f -50 t t t -8 1 \N 1FD3FF61-1576-4908-AE3D-296E60B4CE06/c0/e2/31/20130412151710024-379 10 1 1 U \N AVAILABLE f -50 t t t -9 1 \N 1FD3FF61-1576-4908-AE3D-296E60B4CE06/7e/71/80/20130412152036861-380 9 1 1 T \N AVAILABLE f -50 t t t -12 1 \N 1FD3FF61-1576-4908-AE3D-296E60B4CE06/2e/ac/5a/20130412153118625-384 9 1 1 T \N AVAILABLE f -50 t t t -16 1 \N 1FD3FF61-1576-4908-AE3D-296E60B4CE06/29/f1/0c/20130412153659945-390 2 1 1 U \N AVAILABLE f -50 t t t -28 1 \N 1FD3FF61-1576-4908-AE3D-296E60B4CE06/67/85/36/20130417094936021-428 9 1 1 T \N AVAILABLE f -50 t t t -21 1 \N 1FD3FF61-1576-4908-AE3D-296E60B4CE06/06/e5/ad/20130415093804724-403 2 1 1 U \N AVAILABLE f -50 t t t -22 1 \N 1FD3FF61-1576-4908-AE3D-296E60B4CE06/1c/84/72/20130415100158230-407 2 1 1 U \N AVAILABLE f -50 t t t -23 1 \N 1FD3FF61-1576-4908-AE3D-296E60B4CE06/91/0a/10/20130415100238098-408 2 1 1 U \N AVAILABLE f -50 t t t -24 2 1 1FD3FF61-1576-4908-AE3D-296E60B4CE06/2f/7a/b9/20130415100308111-409 2 1 1 U \N AVAILABLE f -50 t t t -32 1 \N 1FD3FF61-1576-4908-AE3D-296E60B4CE06/4f/5a/52/20130424111751209-430 2 1 1 U \N AVAILABLE f -50 t t t -31 1 \N 1FD3FF61-1576-4908-AE3D-296E60B4CE06/fe/c5/45/20130424111751432-431 2 1 1 U \N AVAILABLE f -50 t t t +COPY public.external_data (id, share_id, size, location, ffty_id, loty_id, cvte_id_stor_fmt, is_complete, cvte_id_store, status, present_in_archive, speed_hint, storage_confirmation, h5_folders, h5ar_folders, archiving_requested) FROM stdin; +3 1 \N 1FD3FF61-1576-4908-AE3D-296E60B4CE06/0d/71/e9/20130412142205843-196 10 1 1 U \N AVAILABLE f -50 t t t f +5 1 \N 1FD3FF61-1576-4908-AE3D-296E60B4CE06/40/26/e3/20130412142543232-197 10 1 1 U \N AVAILABLE f -50 t t t f +2 1 \N 1FD3FF61-1576-4908-AE3D-296E60B4CE06/4f/6d/30/20130412142942295-198 8 1 1 U \N AVAILABLE f -50 t t t f +4 1 \N 1FD3FF61-1576-4908-AE3D-296E60B4CE06/44/10/06/20130412143119901-199 9 1 1 T \N AVAILABLE f -50 t t t f +29 1 \N 1FD3FF61-1576-4908-AE3D-296E60B4CE06/cd/53/dc/20130417094934693-427 8 1 1 U \N AVAILABLE f -50 t t t f +8 1 \N 1FD3FF61-1576-4908-AE3D-296E60B4CE06/c0/e2/31/20130412151710024-379 10 1 1 U \N AVAILABLE f -50 t t t f +9 1 \N 1FD3FF61-1576-4908-AE3D-296E60B4CE06/7e/71/80/20130412152036861-380 9 1 1 T \N AVAILABLE f -50 t t t t +12 1 \N 1FD3FF61-1576-4908-AE3D-296E60B4CE06/2e/ac/5a/20130412153118625-384 9 1 1 T \N AVAILABLE f -50 t t t f +16 1 \N 1FD3FF61-1576-4908-AE3D-296E60B4CE06/29/f1/0c/20130412153659945-390 2 1 1 U \N AVAILABLE f -50 t t t f +28 1 \N 1FD3FF61-1576-4908-AE3D-296E60B4CE06/67/85/36/20130417094936021-428 9 1 1 T \N AVAILABLE f -50 t t t f +21 1 \N 1FD3FF61-1576-4908-AE3D-296E60B4CE06/06/e5/ad/20130415093804724-403 2 1 1 U \N AVAILABLE f -50 t t t f +22 1 \N 1FD3FF61-1576-4908-AE3D-296E60B4CE06/1c/84/72/20130415100158230-407 2 1 1 U \N AVAILABLE f -50 t t t f +23 1 \N 1FD3FF61-1576-4908-AE3D-296E60B4CE06/91/0a/10/20130415100238098-408 2 1 1 U \N AVAILABLE f -50 t t t f +24 2 1 1FD3FF61-1576-4908-AE3D-296E60B4CE06/2f/7a/b9/20130415100308111-409 2 1 1 U \N AVAILABLE f -50 t t t f +32 1 \N 1FD3FF61-1576-4908-AE3D-296E60B4CE06/4f/5a/52/20130424111751209-430 2 1 1 U \N AVAILABLE f -50 t t t f +31 1 \N 1FD3FF61-1576-4908-AE3D-296E60B4CE06/fe/c5/45/20130424111751432-431 2 1 1 U \N AVAILABLE f -50 t t t f \. @@ -4681,14 +4757,14 @@ COPY external_data (data_id, share_id, size, location, ffty_id, loty_id, cvte_id -- Name: external_data_management_system_id_seq; Type: SEQUENCE SET; Schema: public; Owner: - -- -SELECT pg_catalog.setval('external_data_management_system_id_seq', 2, true); +SELECT pg_catalog.setval('public.external_data_management_system_id_seq', 2, true); -- -- Data for Name: external_data_management_systems; Type: TABLE DATA; Schema: public; Owner: - -- -COPY external_data_management_systems (id, code, label, address, address_type) FROM stdin; +COPY public.external_data_management_systems (id, code, label, address, address_type) FROM stdin; 2 DMS_2 Test External openBIS instance http://www.openbis.ch/perm_id=${code} OPENBIS 1 DMS_1 Test EDMS http://example.edms.com/code=${code} URL \. @@ -4698,14 +4774,14 @@ COPY external_data_management_systems (id, code, label, address, address_type) F -- Name: file_format_type_id_seq; Type: SEQUENCE SET; Schema: public; Owner: - -- -SELECT pg_catalog.setval('file_format_type_id_seq', 10, true); +SELECT pg_catalog.setval('public.file_format_type_id_seq', 10, true); -- -- Data for Name: file_format_types; Type: TABLE DATA; Schema: public; Owner: - -- -COPY file_format_types (id, code, description) FROM stdin; +COPY public.file_format_types (id, code, description) FROM stdin; 1 HDF5 Hierarchical Data Format File, version 5 2 PROPRIETARY Proprietary Format File 3 SRF Sequence Read Format File @@ -4723,14 +4799,14 @@ COPY file_format_types (id, code, description) FROM stdin; -- Name: filter_id_seq; Type: SEQUENCE SET; Schema: public; Owner: - -- -SELECT pg_catalog.setval('filter_id_seq', 1, false); +SELECT pg_catalog.setval('public.filter_id_seq', 1, false); -- -- Data for Name: filters; Type: TABLE DATA; Schema: public; Owner: - -- -COPY filters (id, name, description, registration_timestamp, pers_id_registerer, modification_timestamp, expression, is_public, grid_id) FROM stdin; +COPY public.filters (id, name, description, registration_timestamp, pers_id_registerer, modification_timestamp, expression, is_public, grid_id) FROM stdin; \. @@ -4738,7 +4814,7 @@ COPY filters (id, name, description, registration_timestamp, pers_id_registerer, -- Data for Name: grid_custom_columns; Type: TABLE DATA; Schema: public; Owner: - -- -COPY grid_custom_columns (id, code, label, description, registration_timestamp, pers_id_registerer, modification_timestamp, expression, is_public, grid_id) FROM stdin; +COPY public.grid_custom_columns (id, code, label, description, registration_timestamp, pers_id_registerer, modification_timestamp, expression, is_public, grid_id) FROM stdin; \. @@ -4746,14 +4822,14 @@ COPY grid_custom_columns (id, code, label, description, registration_timestamp, -- Name: grid_custom_columns_id_seq; Type: SEQUENCE SET; Schema: public; Owner: - -- -SELECT pg_catalog.setval('grid_custom_columns_id_seq', 1, false); +SELECT pg_catalog.setval('public.grid_custom_columns_id_seq', 1, false); -- -- Data for Name: link_data; Type: TABLE DATA; Schema: public; Owner: - -- -COPY link_data (data_id) FROM stdin; +COPY public.link_data (id) FROM stdin; 33 34 \. @@ -4763,14 +4839,14 @@ COPY link_data (data_id) FROM stdin; -- Name: locator_type_id_seq; Type: SEQUENCE SET; Schema: public; Owner: - -- -SELECT pg_catalog.setval('locator_type_id_seq', 1, true); +SELECT pg_catalog.setval('public.locator_type_id_seq', 1, true); -- -- Data for Name: locator_types; Type: TABLE DATA; Schema: public; Owner: - -- -COPY locator_types (id, code, description) FROM stdin; +COPY public.locator_types (id, code, description) FROM stdin; 1 RELATIVE_LOCATION Relative Location \. @@ -4779,14 +4855,14 @@ COPY locator_types (id, code, description) FROM stdin; -- Name: material_id_seq; Type: SEQUENCE SET; Schema: public; Owner: - -- -SELECT pg_catalog.setval('material_id_seq', 14, true); +SELECT pg_catalog.setval('public.material_id_seq', 14, true); -- -- Data for Name: material_properties; Type: TABLE DATA; Schema: public; Owner: - -- -COPY material_properties (id, mate_id, mtpt_id, value, registration_timestamp, pers_id_author, modification_timestamp, pers_id_registerer, cvte_id, mate_prop_id) FROM stdin; +COPY public.material_properties (id, mate_id, mtpt_id, value, registration_timestamp, pers_id_author, modification_timestamp, pers_id_registerer, cvte_id, mate_prop_id) FROM stdin; 1 1 1 Water 2013-04-12 14:01:43.729885+02 3 2013-04-12 14:01:45.472+02 3 \N \N 2 2 1 Salt 2013-04-12 14:01:43.729885+02 3 2013-04-12 14:01:45.473+02 3 \N \N 3 3 1 Carbon dioxid 2013-04-12 14:01:43.729885+02 3 2013-04-12 14:01:45.475+02 3 \N \N @@ -4815,7 +4891,7 @@ COPY material_properties (id, mate_id, mtpt_id, value, registration_timestamp, p -- Data for Name: material_properties_history; Type: TABLE DATA; Schema: public; Owner: - -- -COPY material_properties_history (id, mate_id, mtpt_id, value, vocabulary_term, material, pers_id_author, valid_from_timestamp, valid_until_timestamp) FROM stdin; +COPY public.material_properties_history (id, mate_id, mtpt_id, value, vocabulary_term, material, pers_id_author, valid_from_timestamp, valid_until_timestamp) FROM stdin; \. @@ -4823,21 +4899,21 @@ COPY material_properties_history (id, mate_id, mtpt_id, value, vocabulary_term, -- Name: material_property_id_seq; Type: SEQUENCE SET; Schema: public; Owner: - -- -SELECT pg_catalog.setval('material_property_id_seq', 21, true); +SELECT pg_catalog.setval('public.material_property_id_seq', 21, true); -- -- Name: material_type_id_seq; Type: SEQUENCE SET; Schema: public; Owner: - -- -SELECT pg_catalog.setval('material_type_id_seq', 4, true); +SELECT pg_catalog.setval('public.material_type_id_seq', 4, true); -- -- Data for Name: material_type_property_types; Type: TABLE DATA; Schema: public; Owner: - -- -COPY material_type_property_types (id, maty_id, prty_id, is_mandatory, is_managed_internally, registration_timestamp, pers_id_registerer, ordinal, section, script_id, is_shown_edit, show_raw_value) FROM stdin; +COPY public.material_type_property_types (id, maty_id, prty_id, is_mandatory, is_managed_internally, registration_timestamp, pers_id_registerer, ordinal, section, script_id, is_shown_edit, show_raw_value) FROM stdin; 1 1 1 f f 2013-04-12 10:05:46.102969+02 1 2 \N \N f f 2 2 1 f f 2013-04-12 10:05:46.102969+02 1 2 \N \N f f 3 3 1 f f 2013-04-12 10:05:46.102969+02 1 3 \N \N f f @@ -4853,7 +4929,7 @@ COPY material_type_property_types (id, maty_id, prty_id, is_mandatory, is_manage -- Data for Name: material_types; Type: TABLE DATA; Schema: public; Owner: - -- -COPY material_types (id, code, description, modification_timestamp, validation_script_id) FROM stdin; +COPY public.material_types (id, code, description, modification_timestamp, validation_script_id) FROM stdin; 1 COMPOUND Compound 2013-04-12 10:05:46.102969+02 \N 2 CONTROL Control of a control layout 2013-04-12 10:05:46.102969+02 \N 3 GENE Gene 2013-04-12 10:05:46.102969+02 \N @@ -4865,7 +4941,7 @@ COPY material_types (id, code, description, modification_timestamp, validation_s -- Data for Name: materials; Type: TABLE DATA; Schema: public; Owner: - -- -COPY materials (id, code, maty_id, pers_id_registerer, registration_timestamp, modification_timestamp) FROM stdin; +COPY public.materials (id, code, maty_id, pers_id_registerer, registration_timestamp, modification_timestamp) FROM stdin; 1 H2O 1 3 2013-04-12 14:01:43.729885+02 2013-04-12 14:01:45.458+02 2 NACL 1 3 2013-04-12 14:01:43.729885+02 2013-04-12 14:01:45.473+02 3 CO2 1 3 2013-04-12 14:01:43.729885+02 2013-04-12 14:01:45.474+02 @@ -4887,14 +4963,14 @@ COPY materials (id, code, maty_id, pers_id_registerer, registration_timestamp, m -- Name: metaproject_assignment_id_seq; Type: SEQUENCE SET; Schema: public; Owner: - -- -SELECT pg_catalog.setval('metaproject_assignment_id_seq', 21, true); +SELECT pg_catalog.setval('public.metaproject_assignment_id_seq', 21, true); -- -- Data for Name: metaproject_assignments_all; Type: TABLE DATA; Schema: public; Owner: - -- -COPY metaproject_assignments_all (id, mepr_id, expe_id, samp_id, data_id, mate_id, del_id, creation_date) FROM stdin; +COPY public.metaproject_assignments_all (id, mepr_id, expe_id, samp_id, data_id, mate_id, del_id, creation_date) FROM stdin; \. @@ -4902,14 +4978,14 @@ COPY metaproject_assignments_all (id, mepr_id, expe_id, samp_id, data_id, mate_i -- Name: metaproject_id_seq; Type: SEQUENCE SET; Schema: public; Owner: - -- -SELECT pg_catalog.setval('metaproject_id_seq', 183, true); +SELECT pg_catalog.setval('public.metaproject_id_seq', 183, true); -- -- Data for Name: metaprojects; Type: TABLE DATA; Schema: public; Owner: - -- -COPY metaprojects (id, name, description, owner, private, creation_date) FROM stdin; +COPY public.metaprojects (id, name, description, owner, private, creation_date) FROM stdin; 179 JS_TEST_METAPROJECT_POWER_USER \N 7 t 2013-04-24 14:50:03.7003+02 183 JS_TEST_METAPROJECT \N 4 t 2013-04-24 14:50:04.933173+02 \. @@ -4919,14 +4995,14 @@ COPY metaprojects (id, name, description, owner, private, creation_date) FROM st -- Name: mtpt_id_seq; Type: SEQUENCE SET; Schema: public; Owner: - -- -SELECT pg_catalog.setval('mtpt_id_seq', 8, true); +SELECT pg_catalog.setval('public.mtpt_id_seq', 8, true); -- -- Data for Name: operation_executions; Type: TABLE DATA; Schema: public; Owner: - -- -COPY operation_executions (id, code, state, owner, description, notification, availability, availability_time, summary_operations, summary_progress, summary_error, summary_results, summary_availability, summary_availability_time, details_path, details_availability, details_availability_time, creation_date, start_date, finish_date) FROM stdin; +COPY public.operation_executions (id, code, state, owner, description, notification, availability, availability_time, summary_operations, summary_progress, summary_error, summary_results, summary_availability, summary_availability_time, details_path, details_availability, details_availability_time, creation_date, start_date, finish_date) FROM stdin; \. @@ -4934,28 +5010,28 @@ COPY operation_executions (id, code, state, owner, description, notification, av -- Name: operation_executions_id_seq; Type: SEQUENCE SET; Schema: public; Owner: - -- -SELECT pg_catalog.setval('operation_executions_id_seq', 1, false); +SELECT pg_catalog.setval('public.operation_executions_id_seq', 1, false); -- -- Name: perm_id_seq; Type: SEQUENCE SET; Schema: public; Owner: - -- -SELECT pg_catalog.setval('perm_id_seq', 438, true); +SELECT pg_catalog.setval('public.perm_id_seq', 438, true); -- -- Name: person_id_seq; Type: SEQUENCE SET; Schema: public; Owner: - -- -SELECT pg_catalog.setval('person_id_seq', 10, true); +SELECT pg_catalog.setval('public.person_id_seq', 10, true); -- -- Data for Name: persons; Type: TABLE DATA; Schema: public; Owner: - -- -COPY persons (id, first_name, last_name, user_id, email, space_id, registration_timestamp, pers_id_registerer, display_settings, is_active) FROM stdin; +COPY public.persons (id, first_name, last_name, user_id, email, space_id, registration_timestamp, pers_id_registerer, display_settings, is_active) FROM stdin; 1 System User system \N 2013-04-12 10:04:52.629266+02 \N \N t 8 Günter Mallarmé power_user franz-josef.elmer@systemsx.ch \N 2013-04-15 09:11:10.420639+02 1 \\xaced00057372004163682e73797374656d73782e636973642e6f70656e6269732e67656e657269632e7368617265642e62617369632e64746f2e446973706c617953657474696e6773000000000000000102000e5a0009646562756767696e675a001669676e6f72654c617374486973746f7279546f6b656e5a001575736557696c64636172645365617263684d6f64654c000e636f6c756d6e53657474696e677374000f4c6a6176612f7574696c2f4d61703b4c001b637573746f6d576562417070446973706c617953657474696e677371007e00014c001064726f70446f776e53657474696e677371007e00014c00166c617374486973746f7279546f6b656e4f724e756c6c7400124c6a6176612f6c616e672f537472696e673b4c001670616e656c436f6c6c617073656453657474696e677371007e00014c001170616e656c53697a6553657474696e677371007e00014c0015706f72746c6574436f6e66696775726174696f6e7371007e00014c001d7265616c4e756d626572466f726d6174696e67506172616d65746572737400514c63682f73797374656d73782f636973642f6f70656e6269732f67656e657269632f7368617265642f62617369632f64746f2f5265616c4e756d626572466f726d6174696e67506172616d65746572733b4c000b74616253657474696e677371007e00014c001a746563686e6f6c6f6779537065636966696353657474696e677371007e00014c00067669736974737400104c6a6176612f7574696c2f4c6973743b7870000000737200116a6176612e7574696c2e486173684d61700507dac1c31660d103000246000a6c6f6164466163746f724900097468726573686f6c6478703f4000000000000c7708000000100000000078707371007e00063f4000000000000c7708000000100000000078707371007e00063f4000000000000c77080000001000000000787371007e00063f4000000000000c7708000000100000000078707372004f63682e73797374656d73782e636973642e6f70656e6269732e67656e657269632e7368617265642e62617369632e64746f2e5265616c4e756d626572466f726d6174696e67506172616d657465727300000000000000010200035a0010666f726d6174696e67456e61626c6564490009707265636973696f6e5a000a736369656e746966696378700100000004007371007e00063f4000000000000c77080000001000000000787371007e00063f4000000000000c770800000010000000007870 t 6 Stéphane Lévi-Strauss default_space_admin franz-josef.elmer@systemsx.ch \N 2013-04-12 14:52:35.217845+02 3 \\xaced00057372004163682e73797374656d73782e636973642e6f70656e6269732e67656e657269632e7368617265642e62617369632e64746f2e446973706c617953657474696e6773000000000000000102000e5a0009646562756767696e675a001669676e6f72654c617374486973746f7279546f6b656e5a001575736557696c64636172645365617263684d6f64654c000e636f6c756d6e53657474696e677374000f4c6a6176612f7574696c2f4d61703b4c001b637573746f6d576562417070446973706c617953657474696e677371007e00014c001064726f70446f776e53657474696e677371007e00014c00166c617374486973746f7279546f6b656e4f724e756c6c7400124c6a6176612f6c616e672f537472696e673b4c001670616e656c436f6c6c617073656453657474696e677371007e00014c001170616e656c53697a6553657474696e677371007e00014c0015706f72746c6574436f6e66696775726174696f6e7371007e00014c001d7265616c4e756d626572466f726d6174696e67506172616d65746572737400514c63682f73797374656d73782f636973642f6f70656e6269732f67656e657269632f7368617265642f62617369632f64746f2f5265616c4e756d626572466f726d6174696e67506172616d65746572733b4c000b74616253657474696e677371007e00014c001a746563686e6f6c6f6779537065636966696353657474696e677371007e00014c00067669736974737400104c6a6176612f7574696c2f4c6973743b7870000000737200116a6176612e7574696c2e486173684d61700507dac1c31660d103000246000a6c6f6164466163746f724900097468726573686f6c6478703f4000000000000c7708000000100000000078707371007e00063f4000000000000c7708000000100000000078707371007e00063f4000000000000c77080000001000000000787371007e00063f4000000000000c7708000000100000000078707372004f63682e73797374656d73782e636973642e6f70656e6269732e67656e657269632e7368617265642e62617369632e64746f2e5265616c4e756d626572466f726d6174696e67506172616d657465727300000000000000010200035a0010666f726d6174696e67456e61626c6564490009707265636973696f6e5a000a736369656e746966696378700100000004007371007e00063f4000000000000c77080000001000000000787371007e00063f4000000000000c770800000010000000007870 t @@ -4964,8 +5040,8 @@ COPY persons (id, first_name, last_name, user_id, email, space_id, registration_ 4 Elfriede Čapek openbis_test_js franz-josef.elmer@systemsx.ch \N 2013-04-12 14:35:53.704419+02 1 \\xaced00057372004163682e73797374656d73782e636973642e6f70656e6269732e67656e657269632e7368617265642e62617369632e64746f2e446973706c617953657474696e6773000000000000000102000e5a0009646562756767696e675a001669676e6f72654c617374486973746f7279546f6b656e5a001575736557696c64636172645365617263684d6f64654c000e636f6c756d6e53657474696e677374000f4c6a6176612f7574696c2f4d61703b4c001b637573746f6d576562417070446973706c617953657474696e677371007e00014c001064726f70446f776e53657474696e677371007e00014c00166c617374486973746f7279546f6b656e4f724e756c6c7400124c6a6176612f6c616e672f537472696e673b4c001670616e656c436f6c6c617073656453657474696e677371007e00014c001170616e656c53697a6553657474696e677371007e00014c0015706f72746c6574436f6e66696775726174696f6e7371007e00014c001d7265616c4e756d626572466f726d6174696e67506172616d65746572737400514c63682f73797374656d73782f636973642f6f70656e6269732f67656e657269632f7368617265642f62617369632f64746f2f5265616c4e756d626572466f726d6174696e67506172616d65746572733b4c000b74616253657474696e677371007e00014c001a746563686e6f6c6f6779537065636966696353657474696e677371007e00014c00067669736974737400104c6a6176612f7574696c2f4c6973743b7870000000737200116a6176612e7574696c2e486173684d61700507dac1c31660d103000246000a6c6f6164466163746f724900097468726573686f6c6478703f4000000000000c77080000001000000000787371007e00063f4000000000001877080000002000000016740012302e35333535393134303637343736393838737200176a6176612e7574696c2e4c696e6b6564486173684d617034c04e5c106cc0fb0200015a000b6163636573734f726465727871007e00063f4000000000000c77080000001000000002740006706172616d3174000676616c756531740006706172616d3274000676616c7565327800740012302e303738313533303237383631343731367371007e000a3f4000000000000c77080000001000000002740006706172616d3174000676616c756531740006706172616d3274000676616c7565327800740012302e393931363538373336373138383138357371007e000a3f4000000000000c7708000000100000000271007e000c74000676616c75653171007e000e74000676616c7565327800740013302e31393936373233313733363531383434337371007e000a3f4000000000000c77080000001000000002740006706172616d3174000676616c756531740006706172616d3274000676616c7565327800740013302e32383132393335393934303036363933347371007e000a3f4000000000000c77080000001000000002740006706172616d3174000676616c756531740006706172616d3274000676616c7565327800740012302e383735353739353736323430383532357371007e000a3f4000000000000c77080000001000000002740006706172616d3174000676616c756531740006706172616d3274000676616c7565327800740013302e31353635343339343432363338333037387371007e000a3f4000000000000c7708000000100000000271007e002274000676616c75653171007e002474000676616c7565327800740012302e333330343032393233393830373237387371007e000a3f4000000000000c7708000000100000000271007e002274000676616c75653171007e002474000676616c7565327800740012302e393632393030313531303332393534357371007e000a3f4000000000000c7708000000100000000271007e002274000676616c75653171007e002474000676616c7565327800740012302e343436353930363038393137313736377371007e000a3f4000000000000c7708000000100000000271007e001c74000676616c75653171007e001e74000676616c7565327800740012302e323536313339343032393736323539367371007e000a3f4000000000000c7708000000100000000271007e001c74000676616c75653171007e001e74000676616c7565327800740010302e38323138333232303035313232397371007e000a3f4000000000000c7708000000100000000271007e001c74000676616c75653171007e001e74000676616c7565327800740012302e393835323335313539393833383538357371007e000a3f4000000000000c7708000000100000000271007e002274000676616c75653171007e002474000676616c7565327800740013302e32383737343136353437383533343939377371007e000a3f4000000000000c7708000000100000000271007e001c74000676616c75653171007e001e74000676616c7565327800740013302e32363533373735333135323636313032367371007e000a3f4000000000000c7708000000100000000271007e002274000676616c75653171007e002474000676616c7565327800740012302e373633363834363537383637393937397371007e000a3f4000000000000c7708000000100000000271007e002274000676616c75653171007e002474000676616c7565327800740012302e383539303038313430363239313537347371007e000a3f4000000000000c7708000000100000000271007e001c74000676616c75653171007e001e74000676616c7565327800740011302e3737383430373232343931393634377371007e000a3f4000000000000c77080000001000000002740006706172616d3174000676616c756531740006706172616d3274000676616c7565327800740012302e383132333334373930333630313832357371007e000a3f4000000000000c7708000000100000000271007e000c74000676616c75653171007e000e74000676616c7565327800740012302e363333333838393535363131373335367371007e000a3f4000000000000c7708000000100000000271007e002274000676616c75653171007e002474000676616c7565327800740012302e393334303130313933323137353435377371007e000a3f4000000000000c7708000000100000000271007e002274000676616c75653171007e002474000676616c7565327800740012302e363237303933393234323039343735357371007e000a3f4000000000000c7708000000100000000271007e000c74000676616c75653171007e000e74000676616c7565327800787371007e00063f4000000000000c7708000000100000000078707371007e00063f4000000000000c77080000001000000000787371007e00063f4000000000000c7708000000100000000078707372004f63682e73797374656d73782e636973642e6f70656e6269732e67656e657269632e7368617265642e62617369632e64746f2e5265616c4e756d626572466f726d6174696e67506172616d657465727300000000000000010200035a0010666f726d6174696e67456e61626c6564490009707265636973696f6e5a000a736369656e746966696378700100000004007371007e00063f4000000000000c77080000001000000000787371007e00063f4000000000000c7708000000100000000078737200136a6176612e7574696c2e41727261794c6973747881d21d99c7619d03000149000473697a6578700000000077040000000a78 t 3 Claude Kapuściński admin franz-josef.elmer@systemsx.ch \N 2013-04-12 10:07:44.572139+02 1 \\xaced00057372004163682e73797374656d73782e636973642e6f70656e6269732e67656e657269632e7368617265642e62617369632e64746f2e446973706c617953657474696e6773000000000000000102000f5a0009646562756767696e675a001669676e6f72654c617374486973746f7279546f6b656e5a00176c65676163794d656461646174615549456e61626c65644c000e636f6c756d6e53657474696e677374000f4c6a6176612f7574696c2f4d61703b4c001b637573746f6d576562417070446973706c617953657474696e677371007e00014c000e64656661756c7450726f6a6563747400124c6a6176612f6c616e672f537472696e673b4c001064726f70446f776e53657474696e677371007e00014c00166c617374486973746f7279546f6b656e4f724e756c6c71007e00024c001670616e656c436f6c6c617073656453657474696e677371007e00014c001170616e656c53697a6553657474696e677371007e00014c0015706f72746c6574436f6e66696775726174696f6e7371007e00014c001d7265616c4e756d626572466f726d6174696e67506172616d65746572737400514c63682f73797374656d73782f636973642f6f70656e6269732f67656e657269632f7368617265642f62617369632f64746f2f5265616c4e756d626572466f726d6174696e67506172616d65746572733b4c000b74616253657474696e677371007e00014c001a746563686e6f6c6f6779537065636966696353657474696e677371007e00014c00067669736974737400104c6a6176612f7574696c2f4c6973743b7870000000737200116a6176612e7574696c2e486173684d61700507dac1c31660d103000246000a6c6f6164466163746f724900097468726573686f6c6478703f400000000000307708000000400000002d74001973616d706c652d64657461696c732d677269642d504c415445737200136a6176612e7574696c2e41727261794c6973747881d21d99c7619d03000149000473697a657870000000237704000000237372003f63682e73797374656d73782e636973642e6f70656e6269732e67656e657269632e7368617265642e62617369632e64746f2e436f6c756d6e53657474696e6700000000000000010200055a000968617346696c7465725a000668696464656e49000577696474684c0008636f6c756d6e494471007e00024c0007736f72744469727400444c63682f73797374656d73782f636973642f6f70656e6269732f67656e657269632f7368617265642f62617369632f64746f2f536f7274496e666f24536f72744469723b787001000000016c740004434f4445707371007e000b00010000009674000d45585445524e414c5f434f4445707371007e000b00000000014774000d444154415f5345545f54595045707371007e000b00000000010a740011434f4e5441494e45525f44415441534554707371007e000b0001000000647400124f524445525f494e5f434f4e5441494e4552707371007e000b00000000013874000f504152454e545f4441544153455453707371007e000b00010000006474000653414d504c45707371007e000b0000000000c874001f45585445524e414c5f444154415f53414d504c455f4944454e544946494552707371007e000b00000000009674000b53414d504c455f54595045707371007e000b00010000006474000a4558504552494d454e54707371007e000b00010000006474002345585445524e414c5f444154415f4558504552494d454e545f4944454e544946494552707371007e000b00010000007874000f4558504552494d454e545f54595045707371007e000b00000000009674000750524f4a454354707371007e000b00000000009674000b5245474953545241544f52707371007e000b0000000000967400084d4f444946494552707371007e000b0000000000c8740011524547495354524154494f4e5f44415445707371007e000b0001000000c87400114d4f44494649434154494f4e5f44415445707371007e000b00010000009674000a49535f44454c45544544707371007e000b00010000009674000b534f555243455f54595045707371007e000b00010000009674000b49535f434f4d504c455445707371007e000b0001000000967400084c4f434154494f4e707371007e000b0001000000c8740010415243484956494e475f535441545553707371007e000b01010000009674001046494c455f464f524d41545f54595045707371007e000b0001000000c874000f50524f44554354494f4e5f44415445707371007e000b000100000096740012444154415f50524f44554345525f434f4445707371007e000b00010000009674000f444154415f53544f52455f434f4445707371007e000b00010000009674001145585445524e414c5f444d535f434f4445707371007e000b00010000009674001245585445524e414c5f444d535f4c4142454c707371007e000b0001000000967400075045524d5f4944707371007e000b00010000009674001153484f575f44455441494c535f4c494e4b707371007e000b00000000009674000c4d45544150524f4a45435453707371007e000b00000000009674001250524553454e545f494e5f41524348495645707371007e000b00000000009674001453544f524147455f434f4e4649524d4154494f4e707371007e000b00000000009674001a70726f70657274792d494e5445524e2d5245534f4c5554494f4e707371007e000b00000000009674002270726f70657274792d494e5445524e2d414e414c595349535f50524f434544555245707874001273706163652d62726f777365722d677269647371007e0009000000047704000000047371007e000b000000000096740004434f4445707371007e000b0000000000c874000b4445534352495054494f4e707371007e000b0000000000c874000b5245474953545241544f52707371007e000b00010000012c740011524547495354524154494f4e5f44415445707874001d66696c652d666f726d61742d747970652d62726f777365722d677269647371007e0009000000027704000000027371007e000b000000000096740004434f4445707371007e000b00000000012c74000b4445534352495054494f4e707874002570726f70657274792d747970652d61737369676e6d656e742d62726f777365722d677269647371007e00090000000f77040000000f7371007e000b0100000000c874001250524f50455254595f545950455f434f4445707371007e000b0001000000967400054c4142454c707371007e000b00010000009674000b4445534352495054494f4e707371007e000b00010000012c7400114d4f44494649434154494f4e5f44415445707371007e000b0100000000c874000b41535349474e45445f544f707371007e000b010000000096740007545950455f4f46707371007e000b00000000009674000c49535f4d414e4441544f5259707371007e000b0000000000c8740009444154415f54595045707371007e000b0001000000647400074f5244494e414c707371007e000b00000000009674000753454354494f4e707371007e000b00000000009674000a49535f44594e414d4943707371007e000b00000000009674000a49535f4d414e41474544707371007e000b00000000009674001749535f53484f574e5f494e5f454449544f525f56494557707371007e000b00000000009674000e53484f575f5241575f56414c5545707371007e000b000000000096740006534352495054707874002273616d706c652d64657461696c732d677269642d53414d504c452d554e4b4e4f574e7371007e0009000000147704000000147371007e000b0100000000f4740004434f4445707371007e000b000100000096740007535542434f4445707371007e000b00010000009674001144415441424153455f494e5354414e4345707371007e000b0001000000967400055350414345707371007e000b00010000009674001153414d504c455f4944454e544946494552707371007e000b00010000009674000b53414d504c455f54595045707371007e000b00010000009674001249535f494e5354414e43455f53414d504c45707371007e000b00010000009674000a49535f44454c45544544707371007e000b0000000000c874000b5245474953545241544f52707371007e000b0000000000c87400084d4f444946494552707371007e000b00010000012c740011524547495354524154494f4e5f44415445707371007e000b00010000012c7400114d4f44494649434154494f4e5f44415445707371007e000b01000000009674000a4558504552494d454e54707371007e000b0001000000c87400154558504552494d454e545f4944454e544946494552707371007e000b01000000009674000750524f4a454354707371007e000b0001000000967400075045524d5f4944707371007e000b00010000009674001153484f575f44455441494c535f4c494e4b707371007e000b00000000009674001367656e65726174656446726f6d506172656e74707371007e000b00000000009674000f636f6e7461696e6572506172656e74707371007e000b00000000009674000c4d45544150524f4a45435453707874000c71756572792d656469746f727371007e0009000000097704000000097371007e000b0100000000967400044e414d45707371007e000b00000000009674000b4445534352495054494f4e707371007e000b00010000009674000953514c5f5155455259707371007e000b01010000009674000949535f5055424c4943707371007e000b00010000009674000a51554552595f54595045707371007e000b00010000009674000b454e544954595f54595045707371007e000b00010000009674000e51554552595f4441544142415345707371007e000b00010000009674000b5245474953545241544f52707371007e000b00010000012c740011524547495354524154494f4e5f4441544570787400326578706572696d656e742d64657461696c732d677269642d53414d504c452d4d4943524f53434f50595f504c41544f4e49437371007e0009000000147704000000147371007e000b010000000096740004434f4445707371007e000b000100000096740007535542434f4445707371007e000b00010000009674001144415441424153455f494e5354414e4345707371007e000b0001000000967400055350414345707371007e000b00010000009674001153414d504c455f4944454e544946494552707371007e000b00010000009674000b53414d504c455f54595045707371007e000b00010000009674001249535f494e5354414e43455f53414d504c45707371007e000b00010000009674000a49535f44454c45544544707371007e000b0000000000c874000b5245474953545241544f52707371007e000b0000000000c87400084d4f444946494552707371007e000b00010000012c740011524547495354524154494f4e5f44415445707371007e000b00010000012c7400114d4f44494649434154494f4e5f44415445707371007e000b01000000009674000a4558504552494d454e54707371007e000b0001000000c87400154558504552494d454e545f4944454e544946494552707371007e000b01000000009674000750524f4a454354707371007e000b0001000000967400075045524d5f4944707371007e000b00010000009674001153484f575f44455441494c535f4c494e4b707371007e000b00000000009674001367656e65726174656446726f6d506172656e74707371007e000b00000000009674000f636f6e7461696e6572506172656e74707371007e000b00000000009674000c4d45544150524f4a45435453707874002273616d706c652d64657461696c732d677269642d4d4943524f53434f50595f494d477371007e0009000000227704000000227371007e000b010000000151740004434f4445707371007e000b00010000009674000d45585445524e414c5f434f4445707371007e000b0000000000c874000d444154415f5345545f54595045707371007e000b000100000096740011434f4e5441494e45525f44415441534554707371007e000b0001000000647400124f524445525f494e5f434f4e5441494e4552707371007e000b00010000009674000f504152454e545f4441544153455453707371007e000b00010000006474000653414d504c45707371007e000b0000000000c874001f45585445524e414c5f444154415f53414d504c455f4944454e544946494552707371007e000b00000000009674000b53414d504c455f54595045707371007e000b00010000006474000a4558504552494d454e54707371007e000b00010000006474002345585445524e414c5f444154415f4558504552494d454e545f4944454e544946494552707371007e000b00010000007874000f4558504552494d454e545f54595045707371007e000b00000000009674000750524f4a454354707371007e000b00000000009674000b5245474953545241544f52707371007e000b0000000000967400084d4f444946494552707371007e000b0000000000c8740011524547495354524154494f4e5f44415445707371007e000b0001000000c87400114d4f44494649434154494f4e5f44415445707371007e000b00010000009674000a49535f44454c45544544707371007e000b00010000009674000b534f555243455f54595045707371007e000b00010000009674000b49535f434f4d504c455445707371007e000b0001000000967400084c4f434154494f4e707371007e000b0001000000c8740010415243484956494e475f535441545553707371007e000b01010000009674001046494c455f464f524d41545f54595045707371007e000b0001000000c874000f50524f44554354494f4e5f44415445707371007e000b000100000096740012444154415f50524f44554345525f434f4445707371007e000b00010000009674000f444154415f53544f52455f434f4445707371007e000b00010000009674001145585445524e414c5f444d535f434f4445707371007e000b00010000009674001245585445524e414c5f444d535f4c4142454c707371007e000b0001000000967400075045524d5f4944707371007e000b00010000009674001153484f575f44455441494c535f4c494e4b707371007e000b00000000009674000c4d45544150524f4a45435453707371007e000b00000000009674001250524553454e545f494e5f41524348495645707371007e000b00000000009674001453544f524147455f434f4e4649524d4154494f4e707371007e000b00000000009674001a70726f70657274792d494e5445524e2d5245534f4c5554494f4e70787400266578706572696d656e742d64657461696c732d677269642d53414d504c452d554e4b4e4f574e7371007e0009000000157704000000157371007e000b010000000163740004434f4445707371007e000b000100000096740007535542434f4445707371007e000b00010000009674001144415441424153455f494e5354414e4345707371007e000b0001000000967400055350414345707371007e000b00010000009674001153414d504c455f4944454e544946494552707371007e000b00010000009674000b53414d504c455f54595045707371007e000b00010000009674001249535f494e5354414e43455f53414d504c45707371007e000b00010000009674000a49535f44454c45544544707371007e000b0000000000c874000b5245474953545241544f52707371007e000b0000000000c87400084d4f444946494552707371007e000b00010000012c740011524547495354524154494f4e5f44415445707371007e000b00010000012c7400114d4f44494649434154494f4e5f44415445707371007e000b01000000009674000a4558504552494d454e54707371007e000b0001000000c87400154558504552494d454e545f4944454e544946494552707371007e000b01000000009674000750524f4a454354707371007e000b0001000000967400075045524d5f4944707371007e000b00010000009674001153484f575f44455441494c535f4c494e4b707371007e000b00000000009674001367656e65726174656446726f6d506172656e74707371007e000b00000000009674000f636f6e7461696e6572506172656e74707371007e000b00000000009674000c4d45544150524f4a45435453707371007e000b00000000009674001970726f70657274792d555345522d4445534352495054494f4e707874001b73616d706c652d64657461696c732d677269642d554e4b4e4f574e7371007e0009000000227704000000227371007e000b010000000096740004434f4445707371007e000b00010000009674000d45585445524e414c5f434f4445707371007e000b0000000000c874000d444154415f5345545f54595045707371007e000b000100000096740011434f4e5441494e45525f44415441534554707371007e000b0001000000647400124f524445525f494e5f434f4e5441494e4552707371007e000b00010000009674000f504152454e545f4441544153455453707371007e000b00010000006474000653414d504c45707371007e000b0000000000c874001f45585445524e414c5f444154415f53414d504c455f4944454e544946494552707371007e000b00000000009674000b53414d504c455f54595045707371007e000b00010000006474000a4558504552494d454e54707371007e000b00010000006474002345585445524e414c5f444154415f4558504552494d454e545f4944454e544946494552707371007e000b00010000007874000f4558504552494d454e545f54595045707371007e000b00000000009674000750524f4a454354707371007e000b00000000009674000b5245474953545241544f52707371007e000b0000000000967400084d4f444946494552707371007e000b0000000000c8740011524547495354524154494f4e5f44415445707371007e000b0001000000c87400114d4f44494649434154494f4e5f44415445707371007e000b00010000009674000a49535f44454c45544544707371007e000b00010000009674000b534f555243455f54595045707371007e000b00010000009674000b49535f434f4d504c455445707371007e000b0001000000967400084c4f434154494f4e707371007e000b0001000000c8740010415243484956494e475f535441545553707371007e000b01010000009674001046494c455f464f524d41545f54595045707371007e000b0001000000c874000f50524f44554354494f4e5f44415445707371007e000b000100000096740012444154415f50524f44554345525f434f4445707371007e000b00010000009674000f444154415f53544f52455f434f4445707371007e000b00010000009674001145585445524e414c5f444d535f434f4445707371007e000b00010000009674001245585445524e414c5f444d535f4c4142454c707371007e000b0001000000967400075045524d5f4944707371007e000b00010000009674001153484f575f44455441494c535f4c494e4b707371007e000b00000000009674000c4d45544150524f4a45435453707371007e000b00000000009674001250524553454e545f494e5f41524348495645707371007e000b00000000009674001453544f524147455f434f4e4649524d4154494f4e707371007e000b00000000009674001970726f70657274792d555345522d4445534352495054494f4e707874002973616d706c652d64657461696c732d677269642d53414d504c452d4d4943524f53434f50595f494d477371007e0009000000147704000000147371007e000b010000000096740004434f4445707371007e000b000100000096740007535542434f4445707371007e000b00010000009674001144415441424153455f494e5354414e4345707371007e000b0001000000967400055350414345707371007e000b00010000009674001153414d504c455f4944454e544946494552707371007e000b00010000009674000b53414d504c455f54595045707371007e000b00010000009674001249535f494e5354414e43455f53414d504c45707371007e000b00010000009674000a49535f44454c45544544707371007e000b0000000000c874000b5245474953545241544f52707371007e000b0000000000c87400084d4f444946494552707371007e000b00010000012c740011524547495354524154494f4e5f44415445707371007e000b00010000012c7400114d4f44494649434154494f4e5f44415445707371007e000b01000000009674000a4558504552494d454e54707371007e000b0001000000c87400154558504552494d454e545f4944454e544946494552707371007e000b01000000009674000750524f4a454354707371007e000b0001000000967400075045524d5f4944707371007e000b00010000009674001153484f575f44455441494c535f4c494e4b707371007e000b00000000009674001367656e65726174656446726f6d506172656e74707371007e000b00000000009674000f636f6e7461696e6572506172656e74707371007e000b00000000009674000c4d45544150524f4a454354537078740037646174612d7365742d64657461696c732d677269642d4843535f494d4147455f434f4e5441494e45525f5241572d434f4e5441494e45527371007e0009000000227704000000227371007e000b010000000156740004434f4445707371007e000b00010000009674000d45585445524e414c5f434f4445707371007e000b0000000000c874000d444154415f5345545f54595045707371007e000b000100000096740011434f4e5441494e45525f44415441534554707371007e000b0001000000647400124f524445525f494e5f434f4e5441494e4552707371007e000b00010000009674000f504152454e545f4441544153455453707371007e000b00010000006474000653414d504c45707371007e000b0000000000c874001f45585445524e414c5f444154415f53414d504c455f4944454e544946494552707371007e000b00000000009674000b53414d504c455f54595045707371007e000b00010000006474000a4558504552494d454e54707371007e000b00010000006474002345585445524e414c5f444154415f4558504552494d454e545f4944454e544946494552707371007e000b00010000007874000f4558504552494d454e545f54595045707371007e000b00000000009674000750524f4a454354707371007e000b00000000009674000b5245474953545241544f52707371007e000b0000000000967400084d4f444946494552707371007e000b0000000000c8740011524547495354524154494f4e5f44415445707371007e000b0001000000c87400114d4f44494649434154494f4e5f44415445707371007e000b00010000009674000a49535f44454c45544544707371007e000b00010000009674000b534f555243455f54595045707371007e000b00010000009674000b49535f434f4d504c455445707371007e000b0001000000967400084c4f434154494f4e707371007e000b0001000000c8740010415243484956494e475f535441545553707371007e000b01010000009674001046494c455f464f524d41545f54595045707371007e000b0001000000c874000f50524f44554354494f4e5f44415445707371007e000b000100000096740012444154415f50524f44554345525f434f4445707371007e000b00010000009674000f444154415f53544f52455f434f4445707371007e000b00010000009674001145585445524e414c5f444d535f434f4445707371007e000b00010000009674001245585445524e414c5f444d535f4c4142454c707371007e000b0001000000967400075045524d5f4944707371007e000b00010000009674001153484f575f44455441494c535f4c494e4b707371007e000b00000000009674000c4d45544150524f4a45435453707371007e000b00000000009674001250524553454e545f494e5f41524348495645707371007e000b00000000009674001453544f524147455f434f4e4649524d4154494f4e707371007e000b00000000009674001a70726f70657274792d494e5445524e2d5245534f4c5554494f4e7078740038646174612d7365742d64657461696c732d677269642d4d4943524f53434f50595f494d475f434f4e5441494e45522d434f4e5441494e45527371007e0009000000227704000000227371007e000b010000000096740004434f4445707371007e000b00010000009674000d45585445524e414c5f434f4445707371007e000b0000000000c874000d444154415f5345545f54595045707371007e000b000100000096740011434f4e5441494e45525f44415441534554707371007e000b0001000000647400124f524445525f494e5f434f4e5441494e4552707371007e000b00010000009674000f504152454e545f4441544153455453707371007e000b00010000006474000653414d504c45707371007e000b0000000000c874001f45585445524e414c5f444154415f53414d504c455f4944454e544946494552707371007e000b00000000009674000b53414d504c455f54595045707371007e000b00010000006474000a4558504552494d454e54707371007e000b00010000006474002345585445524e414c5f444154415f4558504552494d454e545f4944454e544946494552707371007e000b00010000007874000f4558504552494d454e545f54595045707371007e000b00000000009674000750524f4a454354707371007e000b00000000009674000b5245474953545241544f52707371007e000b0000000000967400084d4f444946494552707371007e000b0000000000c8740011524547495354524154494f4e5f44415445707371007e000b0001000000c87400114d4f44494649434154494f4e5f44415445707371007e000b00010000009674000a49535f44454c45544544707371007e000b00010000009674000b534f555243455f54595045707371007e000b00010000009674000b49535f434f4d504c455445707371007e000b0001000000967400084c4f434154494f4e707371007e000b0001000000c8740010415243484956494e475f535441545553707371007e000b01010000009674001046494c455f464f524d41545f54595045707371007e000b0001000000c874000f50524f44554354494f4e5f44415445707371007e000b000100000096740012444154415f50524f44554345525f434f4445707371007e000b00010000009674000f444154415f53544f52455f434f4445707371007e000b00010000009674001145585445524e414c5f444d535f434f4445707371007e000b00010000009674001245585445524e414c5f444d535f4c4142454c707371007e000b0001000000967400075045524d5f4944707371007e000b00010000009674001153484f575f44455441494c535f4c494e4b707371007e000b00000000009674000c4d45544150524f4a45435453707371007e000b00000000009674001250524553454e545f494e5f41524348495645707371007e000b00000000009674001453544f524147455f434f4e4649524d4154494f4e707371007e000b00000000009674001a70726f70657274792d494e5445524e2d5245534f4c5554494f4e7078740034646174612d7365742d64657461696c732d677269642d4843535f494d4147455f434f4e5441494e45525f5241572d504152454e547371007e00090000001f77040000001f7371007e000b010000000096740004434f4445707371007e000b00010000009674000d45585445524e414c5f434f4445707371007e000b0000000000c874000d444154415f5345545f54595045707371007e000b000100000096740011434f4e5441494e45525f44415441534554707371007e000b0001000000647400124f524445525f494e5f434f4e5441494e4552707371007e000b00010000009674000f504152454e545f4441544153455453707371007e000b00010000006474000653414d504c45707371007e000b0000000000c874001f45585445524e414c5f444154415f53414d504c455f4944454e544946494552707371007e000b00000000009674000b53414d504c455f54595045707371007e000b00010000006474000a4558504552494d454e54707371007e000b00010000006474002345585445524e414c5f444154415f4558504552494d454e545f4944454e544946494552707371007e000b00010000007874000f4558504552494d454e545f54595045707371007e000b00000000009674000750524f4a454354707371007e000b00000000009674000b5245474953545241544f52707371007e000b0000000000967400084d4f444946494552707371007e000b0000000000c8740011524547495354524154494f4e5f44415445707371007e000b0001000000c87400114d4f44494649434154494f4e5f44415445707371007e000b00010000009674000a49535f44454c45544544707371007e000b00010000009674000b534f555243455f54595045707371007e000b00010000009674000b49535f434f4d504c455445707371007e000b0001000000967400084c4f434154494f4e707371007e000b0001000000c8740010415243484956494e475f535441545553707371007e000b01010000009674001046494c455f464f524d41545f54595045707371007e000b0001000000c874000f50524f44554354494f4e5f44415445707371007e000b000100000096740012444154415f50524f44554345525f434f4445707371007e000b00010000009674000f444154415f53544f52455f434f4445707371007e000b00010000009674001145585445524e414c5f444d535f434f4445707371007e000b00010000009674001245585445524e414c5f444d535f4c4142454c707371007e000b0001000000967400075045524d5f4944707371007e000b00010000009674001153484f575f44455441494c535f4c494e4b707371007e000b00000000009674000c4d45544150524f4a45435453707874001c656e746974792d62726f777365722d677269642d4d4154455249414c7371007e00090000000077040000000078740018747970652d62726f777365722d677269642d53414d504c457371007e00090000000c77040000000c7371007e000b010000000096740004434f4445707371007e000b00000000012c74000b4445534352495054494f4e707371007e000b00010000009674001144415441424153455f494e5354414e4345707371007e000b00010000009674001156414c49444154494f4e5f534352495054707371007e000b00010000009674000b49535f4c49535441424c45707371007e000b0001000000c874001149535f53484f575f434f4e5441494e4552707371007e000b0001000000c874000f49535f53484f575f504152454e5453707371007e000b000100000096740014535542434f44455f554e495155455f4c4142454c707371007e000b0001000000967400194155544f5f47454e45524154455f434f4445535f4c4142454c707371007e000b00010000009674001749535f53484f575f504152454e545f4d45544144415441707371007e000b00010000009674001547454e4552415445445f434f44455f505245464958707371007e000b00010000012c7400114d4f44494649434154494f4e5f44415445707874001564656c6574696f6e2d62726f777365722d677269647371007e0009000000047704000000047371007e000b00000000012c74000d44454c4554494f4e5f44415445707371007e000b0100000000c874000744454c45544552707371007e000b00000000012c740008454e544954494553707371007e000b0100000001f4740006524541534f4e7078740013656e746974792d62726f777365722d677269647371007e00090000000e77040000000e7371007e000b010000000096740004434f4445707371007e000b00010000009674000f4558504552494d454e545f54595045707371007e000b0001000000967400154558504552494d454e545f4944454e544946494552707371007e000b00010000009674001144415441424153455f494e5354414e4345707371007e000b0001000000967400055350414345707371007e000b00010000009674000750524f4a454354707371007e000b00000000009674000b5245474953545241544f52707371007e000b0000000000967400084d4f444946494552707371007e000b0000000000c8740011524547495354524154494f4e5f44415445707371007e000b0001000000c87400114d4f44494649434154494f4e5f44415445707371007e000b00010000009674000a49535f44454c45544544707371007e000b0001000000967400075045524d5f4944707371007e000b00010000009674001153484f575f44455441494c535f4c494e4b707371007e000b00000000009674000c4d45544150524f4a454354537078740024656e746974792d70726f70657274792d686973746f72792d62726f777365722d677269647371007e0009000000077704000000077371007e000b00010000009674001250524f50455254595f545950455f434f4445707371007e000b00000000009674001350524f50455254595f545950455f4c4142454c707371007e000b00000000009674000d52454c4154494f4e5f54595045707371007e000b00000000009674000556414c5545707371007e000b000000000096740006415554484f52707371007e000b00000000009674000f56414c49445f46524f4d5f44415445707371007e000b00000000009674001056414c49445f554e54494c5f444154457078740040646174612d7365742d64657461696c732d677269642d4843535f414e414c595349535f434f4e5441494e45525f57454c4c5f46454154555245532d4348494c447371007e00090000001f77040000001f7371007e000b010000000096740004434f4445707371007e000b00010000009674000d45585445524e414c5f434f4445707371007e000b0000000000c874000d444154415f5345545f54595045707371007e000b000100000096740011434f4e5441494e45525f44415441534554707371007e000b0001000000647400124f524445525f494e5f434f4e5441494e4552707371007e000b00010000009674000f504152454e545f4441544153455453707371007e000b00010000006474000653414d504c45707371007e000b0000000000c874001f45585445524e414c5f444154415f53414d504c455f4944454e544946494552707371007e000b00000000009674000b53414d504c455f54595045707371007e000b00010000006474000a4558504552494d454e54707371007e000b00010000006474002345585445524e414c5f444154415f4558504552494d454e545f4944454e544946494552707371007e000b00010000007874000f4558504552494d454e545f54595045707371007e000b00000000009674000750524f4a454354707371007e000b00000000009674000b5245474953545241544f52707371007e000b0000000000967400084d4f444946494552707371007e000b0000000000c8740011524547495354524154494f4e5f44415445707371007e000b0001000000c87400114d4f44494649434154494f4e5f44415445707371007e000b00010000009674000a49535f44454c45544544707371007e000b00010000009674000b534f555243455f54595045707371007e000b00010000009674000b49535f434f4d504c455445707371007e000b0001000000967400084c4f434154494f4e707371007e000b0001000000c8740010415243484956494e475f535441545553707371007e000b01010000009674001046494c455f464f524d41545f54595045707371007e000b0001000000c874000f50524f44554354494f4e5f44415445707371007e000b000100000096740012444154415f50524f44554345525f434f4445707371007e000b00010000009674000f444154415f53544f52455f434f4445707371007e000b00010000009674001145585445524e414c5f444d535f434f4445707371007e000b00010000009674001245585445524e414c5f444d535f4c4142454c707371007e000b0001000000967400075045524d5f4944707371007e000b00010000009674001153484f575f44455441494c535f4c494e4b707371007e000b00000000009674000c4d45544150524f4a45435453707874001470726f6a6563742d62726f777365722d677269647371007e0009000000077704000000077371007e000b010000000096740004434f4445707371007e000b0100000000967400055350414345707371007e000b0000000000c874000b4445534352495054494f4e707371007e000b0000000000c874000b5245474953545241544f52707371007e000b0001000000c87400084d4f444946494552707371007e000b00010000012c740011524547495354524154494f4e5f44415445707371007e000b00010000012c7400114d4f44494649434154494f4e5f444154457078740024646174612d7365742d64657461696c732d677269642d554e4b4e4f574e2d504152454e547371007e0009000000227704000000227371007e000b0100000000e3740004434f4445707371007e000b00010000009674000d45585445524e414c5f434f4445707371007e000b0000000000c874000d444154415f5345545f54595045707371007e000b000100000096740011434f4e5441494e45525f44415441534554707371007e000b0001000000647400124f524445525f494e5f434f4e5441494e4552707371007e000b00010000009674000f504152454e545f4441544153455453707371007e000b00010000006474000653414d504c45707371007e000b0000000000c874001f45585445524e414c5f444154415f53414d504c455f4944454e544946494552707371007e000b00000000009674000b53414d504c455f54595045707371007e000b00010000006474000a4558504552494d454e54707371007e000b00010000006474002345585445524e414c5f444154415f4558504552494d454e545f4944454e544946494552707371007e000b00010000007874000f4558504552494d454e545f54595045707371007e000b00000000009674000750524f4a454354707371007e000b00000000009674000b5245474953545241544f52707371007e000b0000000000967400084d4f444946494552707371007e000b0000000000c8740011524547495354524154494f4e5f44415445707371007e000b0001000000c87400114d4f44494649434154494f4e5f44415445707371007e000b00010000009674000a49535f44454c45544544707371007e000b00010000009674000b534f555243455f54595045707371007e000b00010000009674000b49535f434f4d504c455445707371007e000b0001000000967400084c4f434154494f4e707371007e000b0001000000c8740010415243484956494e475f535441545553707371007e000b01010000009674001046494c455f464f524d41545f54595045707371007e000b0001000000c874000f50524f44554354494f4e5f44415445707371007e000b000100000096740012444154415f50524f44554345525f434f4445707371007e000b00010000009674000f444154415f53544f52455f434f4445707371007e000b00010000009674001145585445524e414c5f444d535f434f4445707371007e000b00010000009674001245585445524e414c5f444d535f4c4142454c707371007e000b0001000000967400075045524d5f4944707371007e000b00010000009674001153484f575f44455441494c535f4c494e4b707371007e000b00000000009674000c4d45544150524f4a45435453707371007e000b00000000009674001250524553454e545f494e5f41524348495645707371007e000b00000000009674001453544f524147455f434f4e4649524d4154494f4e707371007e000b00000000009674001970726f70657274792d555345522d4445534352495054494f4e70787400246578706572696d656e742d64657461696c732d677269642d4843535f504c41544f4e49437371007e0009000000237704000000237371007e000b0100000000e2740004434f4445707371007e000b00010000009674000d45585445524e414c5f434f4445707371007e000b0000000000c874000d444154415f5345545f54595045707371007e000b000100000096740011434f4e5441494e45525f44415441534554707371007e000b0001000000647400124f524445525f494e5f434f4e5441494e4552707371007e000b00010000009674000f504152454e545f4441544153455453707371007e000b00010000006474000653414d504c45707371007e000b0000000000c874001f45585445524e414c5f444154415f53414d504c455f4944454e544946494552707371007e000b00000000009674000b53414d504c455f54595045707371007e000b00010000006474000a4558504552494d454e54707371007e000b00010000006474002345585445524e414c5f444154415f4558504552494d454e545f4944454e544946494552707371007e000b00010000007874000f4558504552494d454e545f54595045707371007e000b00000000009674000750524f4a454354707371007e000b00000000009674000b5245474953545241544f52707371007e000b0000000000967400084d4f444946494552707371007e000b0000000000c8740011524547495354524154494f4e5f44415445707371007e000b0001000000c87400114d4f44494649434154494f4e5f44415445707371007e000b00010000009674000a49535f44454c45544544707371007e000b00010000009674000b534f555243455f54595045707371007e000b00010000009674000b49535f434f4d504c455445707371007e000b0001000000967400084c4f434154494f4e707371007e000b0001000000c8740010415243484956494e475f535441545553707371007e000b01010000009674001046494c455f464f524d41545f54595045707371007e000b0001000000c874000f50524f44554354494f4e5f44415445707371007e000b000100000096740012444154415f50524f44554345525f434f4445707371007e000b00010000009674000f444154415f53544f52455f434f4445707371007e000b00010000009674001145585445524e414c5f444d535f434f4445707371007e000b00010000009674001245585445524e414c5f444d535f4c4142454c707371007e000b0001000000967400075045524d5f4944707371007e000b00010000009674001153484f575f44455441494c535f4c494e4b707371007e000b00000000009674000c4d45544150524f4a45435453707371007e000b00000000009674001250524553454e545f494e5f41524348495645707371007e000b00000000009674001453544f524147455f434f4e4649524d4154494f4e707371007e000b00000000009674001a70726f70657274792d494e5445524e2d5245534f4c5554494f4e707371007e000b00000000009674002270726f70657274792d494e5445524e2d414e414c595349535f50524f434544555245707874002b6578706572696d656e742d64657461696c732d677269642d53414d504c452d4843535f504c41544f4e49437371007e0009000000157704000000157371007e000b010000000096740004434f4445707371007e000b000100000096740007535542434f4445707371007e000b00010000009674001144415441424153455f494e5354414e4345707371007e000b0001000000967400055350414345707371007e000b00010000009674001153414d504c455f4944454e544946494552707371007e000b00010000009674000b53414d504c455f54595045707371007e000b00010000009674001249535f494e5354414e43455f53414d504c45707371007e000b00010000009674000a49535f44454c45544544707371007e000b0000000000c874000b5245474953545241544f52707371007e000b0000000000c87400084d4f444946494552707371007e000b00010000012c740011524547495354524154494f4e5f44415445707371007e000b00010000012c7400114d4f44494649434154494f4e5f44415445707371007e000b01000000009674000a4558504552494d454e54707371007e000b0001000000c87400154558504552494d454e545f4944454e544946494552707371007e000b01000000009674000750524f4a454354707371007e000b0001000000967400075045524d5f4944707371007e000b00010000009674001153484f575f44455441494c535f4c494e4b707371007e000b00000000009674001367656e65726174656446726f6d506172656e74707371007e000b00000000009674000f636f6e7461696e6572506172656e74707371007e000b00000000009674000c4d45544150524f4a45435453707371007e000b00000000009674001e70726f70657274792d494e5445524e2d504c4154455f47454f4d45545259707874001c726f6c652d61737369676e6d656e742d62726f777365722d677269647371007e0009000000057704000000057371007e000b010000000096740006504552534f4e707371007e000b010000000096740013415554484f52495a4154494f4e5f47524f5550707371007e000b0100000000967400055350414345707371007e000b010000000096740004524f4c45707371007e000b01000000009674001144415441424153455f494e5354414e43457078740020646174612d7365742d7265706f7274696e672d677269643937323031333937337371007e0009000000017704000000017371007e000b00000000009674000b746573745f636f6c756d6e70787400127365617263682d726573756c742d677269647371007e0009000000067704000000067371007e000b00000000009674000b454e544954595f4b494e44707371007e000b01000000009674000b454e544954595f54595045707371007e000b01000000015e74000a4944454e544946494552707371007e000b00000000009674000b5245474953545241544f52707371007e000b01000000008c74000e4d41544348494e475f4649454c44707371007e000b0000000000c874000d4d41544348494e475f54455854707874001e73616d706c652d64657461696c732d677269642d5349524e415f57454c4c7371007e00090000001f77040000001f7371007e000b010000000096740004434f4445707371007e000b00010000009674000d45585445524e414c5f434f4445707371007e000b0000000000c874000d444154415f5345545f54595045707371007e000b000100000096740011434f4e5441494e45525f44415441534554707371007e000b0001000000647400124f524445525f494e5f434f4e5441494e4552707371007e000b00010000009674000f504152454e545f4441544153455453707371007e000b00010000006474000653414d504c45707371007e000b0000000000c874001f45585445524e414c5f444154415f53414d504c455f4944454e544946494552707371007e000b00000000009674000b53414d504c455f54595045707371007e000b00010000006474000a4558504552494d454e54707371007e000b00010000006474002345585445524e414c5f444154415f4558504552494d454e545f4944454e544946494552707371007e000b00010000007874000f4558504552494d454e545f54595045707371007e000b00000000009674000750524f4a454354707371007e000b00000000009674000b5245474953545241544f52707371007e000b0000000000967400084d4f444946494552707371007e000b0000000000c8740011524547495354524154494f4e5f44415445707371007e000b0001000000c87400114d4f44494649434154494f4e5f44415445707371007e000b00010000009674000a49535f44454c45544544707371007e000b00010000009674000b534f555243455f54595045707371007e000b00010000009674000b49535f434f4d504c455445707371007e000b0001000000967400084c4f434154494f4e707371007e000b0001000000c8740010415243484956494e475f535441545553707371007e000b01010000009674001046494c455f464f524d41545f54595045707371007e000b0001000000c874000f50524f44554354494f4e5f44415445707371007e000b000100000096740012444154415f50524f44554345525f434f4445707371007e000b00010000009674000f444154415f53544f52455f434f4445707371007e000b00010000009674001145585445524e414c5f444d535f434f4445707371007e000b00010000009674001245585445524e414c5f444d535f4c4142454c707371007e000b0001000000967400075045524d5f4944707371007e000b00010000009674001153484f575f44455441494c535f4c494e4b707371007e000b00000000009674000c4d45544150524f4a454354537078740044646174612d7365742d64657461696c732d677269642d4843535f414e414c595349535f434f4e5441494e45525f57454c4c5f46454154555245532d434f4e5441494e45527371007e0009000000217704000000217371007e000b0100000000ee740004434f4445707371007e000b00010000009674000d45585445524e414c5f434f4445707371007e000b00000000011b74000d444154415f5345545f54595045707371007e000b000100000096740011434f4e5441494e45525f44415441534554707371007e000b0001000000647400124f524445525f494e5f434f4e5441494e4552707371007e000b00010000009674000f504152454e545f4441544153455453707371007e000b00010000006474000653414d504c45707371007e000b0000000000c874001f45585445524e414c5f444154415f53414d504c455f4944454e544946494552707371007e000b00000000009674000b53414d504c455f54595045707371007e000b00010000006474000a4558504552494d454e54707371007e000b00010000006474002345585445524e414c5f444154415f4558504552494d454e545f4944454e544946494552707371007e000b00010000007874000f4558504552494d454e545f54595045707371007e000b00000000009674000750524f4a454354707371007e000b00000000009674000b5245474953545241544f52707371007e000b0000000000967400084d4f444946494552707371007e000b0000000000c8740011524547495354524154494f4e5f44415445707371007e000b0001000000c87400114d4f44494649434154494f4e5f44415445707371007e000b00010000009674000a49535f44454c45544544707371007e000b00010000009674000b534f555243455f54595045707371007e000b00010000009674000b49535f434f4d504c455445707371007e000b0001000000967400084c4f434154494f4e707371007e000b0001000000c8740010415243484956494e475f535441545553707371007e000b01010000009674001046494c455f464f524d41545f54595045707371007e000b0001000000c874000f50524f44554354494f4e5f44415445707371007e000b000100000096740012444154415f50524f44554345525f434f4445707371007e000b00010000009674000f444154415f53544f52455f434f4445707371007e000b00010000009674001145585445524e414c5f444d535f434f4445707371007e000b00010000009674001245585445524e414c5f444d535f4c4142454c707371007e000b0001000000967400075045524d5f4944707371007e000b00010000009674001153484f575f44455441494c535f4c494e4b707371007e000b00000000009674000c4d45544150524f4a45435453707371007e000b00000000009674001250524553454e545f494e5f41524348495645707371007e000b00000000009674001453544f524147455f434f4e4649524d4154494f4e7078740033646174612d7365742d7265706f7274696e672d6772696464656661756c742d706c6174652d696d6167652d616e616c797369737371007e0009000000087704000000087371007e000b00000000012074000d444154415f5345545f434f4445707371007e000b000000000096740010504c4154455f4944454e544946494552707371007e000b000000000096740003524f57707371007e000b000000000096740006434f4c554d4e707371007e000b000000000096740012666561747572652d524f575f4e554d424552707371007e000b000000000096740015666561747572652d434f4c554d4e5f4e554d424552707371007e000b00000000009674000b666561747572652d545055707371007e000b00000000009674000d666561747572652d5354415445707874002073616d706c652d64657461696c732d677269642d53414d504c452d504c4154457371007e0009000000167704000000167371007e000b010000000096740004434f4445707371007e000b000100000096740007535542434f4445707371007e000b00010000009674001144415441424153455f494e5354414e4345707371007e000b0001000000967400055350414345707371007e000b00010000009674001153414d504c455f4944454e544946494552707371007e000b00010000009674000b53414d504c455f54595045707371007e000b00010000009674001249535f494e5354414e43455f53414d504c45707371007e000b00010000009674000a49535f44454c45544544707371007e000b0000000000c874000b5245474953545241544f52707371007e000b0000000000c87400084d4f444946494552707371007e000b00010000012c740011524547495354524154494f4e5f44415445707371007e000b00010000012c7400114d4f44494649434154494f4e5f44415445707371007e000b01000000009674000a4558504552494d454e54707371007e000b0001000000c87400154558504552494d454e545f4944454e544946494552707371007e000b01000000009674000750524f4a454354707371007e000b0001000000967400075045524d5f4944707371007e000b00010000009674001153484f575f44455441494c535f4c494e4b707371007e000b00000000009674001367656e65726174656446726f6d506172656e74707371007e000b00000000009674000f636f6e7461696e6572506172656e74707371007e000b00000000009674000c4d45544150524f4a45435453707371007e000b00000000009674001270726f70657274792d555345522d47454e45707371007e000b00000000009674001370726f70657274792d555345522d5349524e417078740020656e746974792d62726f777365722d677269642d53414d504c452d28616c6c297371007e0009000000187704000000187371007e000b01000000014e740004434f4445707371007e000b000100000096740007535542434f4445707371007e000b00010000009674001144415441424153455f494e5354414e4345707371007e000b0001000000967400055350414345707371007e000b00010000009674001153414d504c455f4944454e544946494552707371007e000b00010000009674000b53414d504c455f54595045707371007e000b00010000009674001249535f494e5354414e43455f53414d504c45707371007e000b00010000009674000a49535f44454c45544544707371007e000b0000000000c874000b5245474953545241544f52707371007e000b0000000000c87400084d4f444946494552707371007e000b00000000012c740011524547495354524154494f4e5f44415445707371007e000b00000000012c7400114d4f44494649434154494f4e5f44415445707371007e000b01000000009674000a4558504552494d454e54707371007e000b0001000000c87400154558504552494d454e545f4944454e544946494552707371007e000b01000000009674000750524f4a454354707371007e000b0001000000967400075045524d5f4944707371007e000b00010000009674001153484f575f44455441494c535f4c494e4b707371007e000b00000000010c74001367656e65726174656446726f6d506172656e74707371007e000b00000000009674000f636f6e7461696e6572506172656e74707371007e000b00000000009674000c4d45544150524f4a45435453707371007e000b00000000009674001e70726f70657274792d494e5445524e2d504c4154455f47454f4d45545259707371007e000b00000000009674001970726f70657274792d555345522d4445534352495054494f4e707371007e000b00000000009674001270726f70657274792d555345522d47454e45707371007e000b00000000009674001370726f70657274792d555345522d5349524e41707874001f6578706572696d656e742d64657461696c732d677269642d554e4b4e4f574e7371007e0009000000257704000000257371007e000b010000000129740004434f4445707371007e000b00010000009674000d45585445524e414c5f434f4445707371007e000b0000000000c874000d444154415f5345545f54595045707371007e000b000100000096740011434f4e5441494e45525f44415441534554707371007e000b0001000000647400124f524445525f494e5f434f4e5441494e4552707371007e000b00010000009674000f504152454e545f4441544153455453707371007e000b00010000006474000653414d504c45707371007e000b0000000000c874001f45585445524e414c5f444154415f53414d504c455f4944454e544946494552707371007e000b00000000009674000b53414d504c455f54595045707371007e000b00010000006474000a4558504552494d454e54707371007e000b00010000006474002345585445524e414c5f444154415f4558504552494d454e545f4944454e544946494552707371007e000b00010000007874000f4558504552494d454e545f54595045707371007e000b00000000009674000750524f4a454354707371007e000b00000000009674000b5245474953545241544f52707371007e000b0000000000967400084d4f444946494552707371007e000b0000000000c8740011524547495354524154494f4e5f44415445707371007e000b0001000000c87400114d4f44494649434154494f4e5f44415445707371007e000b00010000009674000a49535f44454c45544544707371007e000b00010000009674000b534f555243455f54595045707371007e000b00010000009674000b49535f434f4d504c455445707371007e000b0001000000967400084c4f434154494f4e707371007e000b0001000000c8740010415243484956494e475f535441545553707371007e000b01010000009674001046494c455f464f524d41545f54595045707371007e000b0001000000c874000f50524f44554354494f4e5f44415445707371007e000b000100000096740012444154415f50524f44554345525f434f4445707371007e000b00010000009674000f444154415f53544f52455f434f4445707371007e000b00010000009674001145585445524e414c5f444d535f434f4445707371007e000b00010000009674001245585445524e414c5f444d535f4c4142454c707371007e000b0001000000967400075045524d5f4944707371007e000b00010000009674001153484f575f44455441494c535f4c494e4b707371007e000b00000000009674000c4d45544150524f4a45435453707371007e000b00000000009674001250524553454e545f494e5f41524348495645707371007e000b00000000009674001453544f524147455f434f4e4649524d4154494f4e707371007e000b00000000009674001970726f70657274792d555345522d4445534352495054494f4e707371007e000b000100000096740012434f4e5441494e45525f4441544153455453707371007e000b0001000000647400134f524445525f494e5f434f4e5441494e455253707371007e000b00010000009674000453495a457078740017706c6174652d6d6174657269616c2d72657669657765727371007e00090000000e77040000000e7371007e000b0000000001f474000b57454c4c5f494d41474553707371007e000b0000000000967400234d4154455249414c5f50524f50455254592d47454e452d242424555345522d47454e45707371007e000b00000000009674002f4d4154455249414c5f50524f50455254592d50524f502d24242447454e452d555345522d4445534352495054494f4e707371007e000b0000000000967400304d4154455249414c5f50524f50455254592d50524f502d24242447454e452d555345522d47454e455f53594d424f4c53707371007e000b0000000000967400254d4154455249414c5f50524f50455254592d5349524e412d242424555345522d5349524e41707371007e000b0000000000967400314d4154455249414c5f50524f50455254592d50524f502d2424245349524e412d555345522d494e48494249544f525f4f46707371007e000b0000000000967400384d4154455249414c5f50524f50455254592d50524f502d2424245349524e412d555345522d4e55434c454f544944455f53455155454e4345707371007e000b00000000018a74000a6578706572696d656e74707371007e000b010000000096740005504c415445707371007e000b01000000009674000457454c4c707371007e000b00000000009674001066696c655f666f726d61745f74797065707371007e000b00000000009674000e494d4147455f444154415f534554707371007e000b000000000096740017494d4147455f414e414c595349535f444154415f534554707371007e000b000000000096740012414e414c595349535f50524f4345445552457078740013706572736f6e2d62726f777365722d677269647371007e0009000000077704000000077371007e000b0100000000fe740007555345525f49447e72004263682e73797374656d73782e636973642e6f70656e6269732e67656e657269632e7368617265642e62617369632e64746f2e536f7274496e666f24536f727444697200000000000000001200007872000e6a6176612e6c616e672e456e756d000000000000000012000078707400034153437371007e000b00000000009674000a46495253545f4e414d45707371007e000b0000000000967400094c4153545f4e414d45707371007e000b0000000000c8740005454d41494c707371007e000b00000000009674000b5245474953545241544f52707371007e000b00000000012c740011524547495354524154494f4e5f44415445707371007e000b00000000005074000949535f414354495645707874001c747970652d62726f777365722d677269642d4558504552494d454e547371007e0009000000047704000000047371007e000b010000000096740004434f4445707371007e000b00000000012c74000b4445534352495054494f4e707371007e000b00010000009674001144415441424153455f494e5354414e4345707371007e000b00010000009674001156414c49444154494f4e5f5343524950547078740015766f636162756c6172792d7465726d732d677269647371007e00090000000d77040000000d7371007e000b010000000096740004434f4445707371007e000b0100000000c87400054c4142454c707371007e000b00000000012c74000b4445534352495054494f4e707371007e000b00010000012c7400114d4f44494649434154494f4e5f44415445707371007e000b0001000000647400074f5244494e414c707371007e000b0000000000c874000355524c707371007e000b00010000006474000b49535f4f4646494349414c707371007e000b0000000000c874000b5245474953545241544f52707371007e000b0000000000647400105445524d5f544f54414c5f5553414745707371007e000b0001000000647400175445524d5f464f525f444154415f5345545f5553414745707371007e000b00010000006474001a5445524d5f464f525f4558504552494d454e54535f5553414745707371007e000b0001000000647400185445524d5f464f525f4d4154455249414c535f5553414745707371007e000b0001000000647400165445524d5f464f525f53414d504c45535f55534147457078740020656e746974792d62726f777365722d677269642d53414d504c452d504c4154457371007e0009000000157704000000157371007e000b010000000096740004434f4445707371007e000b000100000096740007535542434f4445707371007e000b00010000009674001144415441424153455f494e5354414e4345707371007e000b0001000000967400055350414345707371007e000b00010000009674001153414d504c455f4944454e544946494552707371007e000b00010000009674000b53414d504c455f54595045707371007e000b00010000009674001249535f494e5354414e43455f53414d504c45707371007e000b00010000009674000a49535f44454c45544544707371007e000b0000000000c874000b5245474953545241544f52707371007e000b0000000000c87400084d4f444946494552707371007e000b00010000012c740011524547495354524154494f4e5f44415445707371007e000b00010000012c7400114d4f44494649434154494f4e5f44415445707371007e000b01000000009674000a4558504552494d454e54707371007e000b0001000000c87400154558504552494d454e545f4944454e544946494552707371007e000b01000000009674000750524f4a454354707371007e000b0001000000967400075045524d5f4944707371007e000b00010000009674001153484f575f44455441494c535f4c494e4b707371007e000b00000000009674001367656e65726174656446726f6d506172656e74707371007e000b00000000009674000f636f6e7461696e6572506172656e74707371007e000b00000000009674000c4d45544150524f4a45435453707371007e000b00000000009674001e70726f70657274792d494e5445524e2d504c4154455f47454f4d4554525970787400176174746163686d656e742d62726f777365722d677269647371007e0009000000077704000000077371007e000b0000000000c874000946494c455f4e414d45707371007e000b0000000000967400085045524d4c494e4b707371007e000b00000000009674000756455253494f4e707371007e000b0000000000c87400055449544c45707371007e000b00000000012c74000b4445534352495054494f4e707371007e000b00000000009674000b5245474953545241544f52707371007e000b00000000012c740011524547495354524154494f4e5f444154457078740017766f636162756c6172792d62726f777365722d677269647371007e0009000000087704000000087371007e000b0100000000c8740004434f444571007e057b7371007e000b00000000012c74000b4445534352495054494f4e707371007e000b00000000009674001549535f4d414e414745445f494e5445524e414c4c59707371007e000b00000000009674000b5245474953545241544f52707371007e000b00000000012c740011524547495354524154494f4e5f44415445707371007e000b00010000012c74000c55524c5f54454d504c415445707371007e000b00010000009674002b564f434142554c4152595f53484f575f415641494c41424c455f5445524d535f494e5f43484f4f53455253707371007e000b00010000012c7400114d4f44494649434154494f4e5f444154457078740041646174612d7365742d64657461696c732d677269642d4843535f414e414c595349535f434f4e5441494e45525f57454c4c5f46454154555245532d504152454e547371007e00090000001f77040000001f7371007e000b010000000096740004434f4445707371007e000b00010000009674000d45585445524e414c5f434f4445707371007e000b0000000000c874000d444154415f5345545f54595045707371007e000b000100000096740011434f4e5441494e45525f44415441534554707371007e000b0001000000647400124f524445525f494e5f434f4e5441494e4552707371007e000b00010000009674000f504152454e545f4441544153455453707371007e000b00010000006474000653414d504c45707371007e000b0000000000c874001f45585445524e414c5f444154415f53414d504c455f4944454e544946494552707371007e000b00000000009674000b53414d504c455f54595045707371007e000b00010000006474000a4558504552494d454e54707371007e000b00010000006474002345585445524e414c5f444154415f4558504552494d454e545f4944454e544946494552707371007e000b00010000007874000f4558504552494d454e545f54595045707371007e000b00000000009674000750524f4a454354707371007e000b00000000009674000b5245474953545241544f52707371007e000b0000000000967400084d4f444946494552707371007e000b0000000000c8740011524547495354524154494f4e5f44415445707371007e000b0001000000c87400114d4f44494649434154494f4e5f44415445707371007e000b00010000009674000a49535f44454c45544544707371007e000b00010000009674000b534f555243455f54595045707371007e000b00010000009674000b49535f434f4d504c455445707371007e000b0001000000967400084c4f434154494f4e707371007e000b0001000000c8740010415243484956494e475f535441545553707371007e000b01010000009674001046494c455f464f524d41545f54595045707371007e000b0001000000c874000f50524f44554354494f4e5f44415445707371007e000b000100000096740012444154415f50524f44554345525f434f4445707371007e000b00010000009674000f444154415f53544f52455f434f4445707371007e000b00010000009674001145585445524e414c5f444d535f434f4445707371007e000b00010000009674001245585445524e414c5f444d535f4c4142454c707371007e000b0001000000967400075045524d5f4944707371007e000b00010000009674001153484f575f44455441494c535f4c494e4b707371007e000b00000000009674000c4d45544150524f4a454354537078740023646174612d7365742d64657461696c732d677269642d554e4b4e4f574e2d4348494c447371007e0009000000217704000000217371007e000b010000000110740004434f4445707371007e000b00010000009674000d45585445524e414c5f434f4445707371007e000b0000000000c874000d444154415f5345545f54595045707371007e000b000100000096740011434f4e5441494e45525f44415441534554707371007e000b0001000000647400124f524445525f494e5f434f4e5441494e4552707371007e000b00010000009674000f504152454e545f4441544153455453707371007e000b00010000006474000653414d504c45707371007e000b0000000000c874001f45585445524e414c5f444154415f53414d504c455f4944454e544946494552707371007e000b00000000009674000b53414d504c455f54595045707371007e000b00010000006474000a4558504552494d454e54707371007e000b00010000006474002345585445524e414c5f444154415f4558504552494d454e545f4944454e544946494552707371007e000b00010000007874000f4558504552494d454e545f54595045707371007e000b00000000009674000750524f4a454354707371007e000b00000000009674000b5245474953545241544f52707371007e000b0000000000967400084d4f444946494552707371007e000b0000000000c8740011524547495354524154494f4e5f44415445707371007e000b0001000000c87400114d4f44494649434154494f4e5f44415445707371007e000b00010000009674000a49535f44454c45544544707371007e000b00010000009674000b534f555243455f54595045707371007e000b00010000009674000b49535f434f4d504c455445707371007e000b0001000000967400084c4f434154494f4e707371007e000b0001000000c8740010415243484956494e475f535441545553707371007e000b01010000009674001046494c455f464f524d41545f54595045707371007e000b0001000000c874000f50524f44554354494f4e5f44415445707371007e000b000100000096740012444154415f50524f44554345525f434f4445707371007e000b00010000009674000f444154415f53544f52455f434f4445707371007e000b00010000009674001145585445524e414c5f444d535f434f4445707371007e000b00010000009674001245585445524e414c5f444d535f4c4142454c707371007e000b0001000000967400075045524d5f4944707371007e000b00010000009674001153484f575f44455441494c535f4c494e4b707371007e000b00000000009674000c4d45544150524f4a45435453707371007e000b00000000009674001250524553454e545f494e5f41524348495645707371007e000b00000000009674001453544f524147455f434f4e4649524d4154494f4e7078740021656e746974792d62726f777365722d677269642d4d4154455249414c2d47454e457371007e0009000000097704000000097371007e000b010000000096740004434f4445707371007e000b00010000009674000d4d4154455249414c5f54595045707371007e000b00010000009674001144415441424153455f494e5354414e4345707371007e000b00000000009674000b5245474953545241544f52707371007e000b0000000000c8740011524547495354524154494f4e5f44415445707371007e000b0001000000c87400114d4f44494649434154494f4e5f44415445707371007e000b00000000009674000c4d45544150524f4a45435453707371007e000b00000000009674001970726f70657274792d555345522d4445534352495054494f4e707371007e000b00000000009674001a70726f70657274792d555345522d47454e455f53594d424f4c53707874001a747970652d62726f777365722d677269642d444154415f5345547371007e0009000000097704000000097371007e000b010000000146740004434f4445707371007e000b0000000001e274000b4445534352495054494f4e707371007e000b00010000009674001144415441424153455f494e5354414e4345707371007e000b00010000009674001156414c49444154494f4e5f534352495054707371007e000b00000000009674000d444154415f5345545f4b494e44707371007e000b00010000009674001144454c4554494f4e5f444953414c4c4f57707371007e000b0001000000967400124d41494e5f444154415f5345545f50415448707371007e000b0001000000967400154d41494e5f444154415f5345545f5041545445524e707371007e000b00010000012c7400114d4f44494649434154494f4e5f44415445707874001b646174612d7365742d7365617263682d726573756c742d677269647371007e0009000000277704000000277371007e000b01000000010c740004434f4445707371007e000b00010000009674000d45585445524e414c5f434f4445707371007e000b00000000012d74000d444154415f5345545f5459504571007e057b7371007e000b000100000096740011434f4e5441494e45525f44415441534554707371007e000b0001000000647400124f524445525f494e5f434f4e5441494e4552707371007e000b00010000009674000f504152454e545f4441544153455453707371007e000b00010000006474000653414d504c45707371007e000b0000000000c874001f45585445524e414c5f444154415f53414d504c455f4944454e544946494552707371007e000b00000000009674000b53414d504c455f54595045707371007e000b00010000006474000a4558504552494d454e54707371007e000b00010000006474002345585445524e414c5f444154415f4558504552494d454e545f4944454e544946494552707371007e000b00010000007874000f4558504552494d454e545f54595045707371007e000b00000000009674000750524f4a454354707371007e000b00000000009674000b5245474953545241544f52707371007e000b0000000000967400084d4f444946494552707371007e000b0000000000c8740011524547495354524154494f4e5f44415445707371007e000b0001000000c87400114d4f44494649434154494f4e5f44415445707371007e000b00010000009674000a49535f44454c45544544707371007e000b00010000009674000b534f555243455f54595045707371007e000b00010000009674000b49535f434f4d504c455445707371007e000b0001000000967400084c4f434154494f4e707371007e000b0001000000c8740010415243484956494e475f535441545553707371007e000b01010000009674001046494c455f464f524d41545f54595045707371007e000b0001000000c874000f50524f44554354494f4e5f44415445707371007e000b000100000096740012444154415f50524f44554345525f434f4445707371007e000b00010000009674000f444154415f53544f52455f434f4445707371007e000b00010000009674001145585445524e414c5f444d535f434f4445707371007e000b00010000009674001245585445524e414c5f444d535f4c4142454c707371007e000b0001000000967400075045524d5f4944707371007e000b00010000009674001153484f575f44455441494c535f4c494e4b707371007e000b00000000009674000c4d45544150524f4a45435453707371007e000b00000000009674001250524553454e545f494e5f41524348495645707371007e000b00000000009674001453544f524147455f434f4e4649524d4154494f4e707371007e000b00000000009674002270726f70657274792d494e5445524e2d414e414c595349535f50524f434544555245707371007e000b00000000009674001970726f70657274792d555345522d4445534352495054494f4e707371007e000b00000000009674001a70726f70657274792d494e5445524e2d5245534f4c5554494f4e707371007e000b000100000096740012434f4e5441494e45525f4441544153455453707371007e000b0001000000647400134f524445525f494e5f434f4e5441494e455253707371007e000b00010000009674000453495a4570787870707371007e00063f4000000000000c7708000000100000000374003773616d706c652d7479706573616d706c655f726567697374726174696f6e5f636f6e7461696e65725f63686f6f736572554e4b4e4f574e74000528616c6c2974003473616d706c652d7479706573616d706c655f726567697374726174696f6e5f706172656e745f63686f6f736572554e4b4e4f574e71007e06fb74001e73616d706c652d747970656d61696e5f73616d706c655f62726f7773657271007e06fb7874002e656e746974793d4558504552494d454e54267065726d49643d32303136303631333139353430373037342d3433367371007e00063f4000000000000077080000001000000000787371007e00063f40000000000018770800000020000000117400156c6566745f70616e656c5f5349524e415f57454c4c737200116a6176612e6c616e672e496e746567657212e2a0a4f781873802000149000576616c7565787200106a6176612e6c616e672e4e756d62657286ac951d0b94e08b02000078700000015e7400186c6566745f70616e656c5f4843535f494d4147455f5241577371007e0702000001c97400216c6566745f70616e656c5f4843535f494d4147455f5345474d454e544154494f4e7371007e07020000015e74001e6c6566745f70616e656c5f4d4943524f53434f50595f504c41544f4e49437371007e07020000015e7400256c6566745f70616e656c5f4843535f414e414c595349535f46454154555245535f4c4953547371007e07020000015e74001d6c6566745f70616e656c5f4843535f494d4147455f4f564552564945577371007e07020000015e7400256c6566745f70616e656c5f4843535f414e414c595349535f57454c4c5f46454154555245537371007e07020000015e7400226c6566745f70616e656c5f4843535f494d4147455f434f4e5441494e45525f5241577371007e07020000015e7400106c6566745f70616e656c5f504c4154457371007e07020000015e7400236c6566745f70616e656c5f4d4943524f53434f50595f494d475f434f4e5441494e45527371007e07020000015e74002f6c6566745f70616e656c5f4843535f414e414c595349535f434f4e5441494e45525f57454c4c5f46454154555245537371007e0702000001d874002b6c6566745f70616e656c5f4843535f494d4147455f434f4e5441494e45525f5345474d454e544154494f4e7371007e07020000015e74000f6c6566745f70616e656c5f47454e457371007e07020000015e7400196c6566745f70616e656c5f4d4943524f53434f50595f494d477371007e07020000015e7400226c6566745f70616e656c5f4d4943524f53434f50595f494d475f4f564552564945577371007e07020000015e7400176c6566745f70616e656c5f4843535f504c41544f4e49437371007e07020000015e7400126c6566745f70616e656c5f554e4b4e4f574e7371007e07020000015e787371007e00063f4000000000000c7708000000100000000274000757656c636f6d657372004663682e73797374656d73782e636973642e6f70656e6269732e67656e657269632e7368617265642e62617369632e64746f2e506f72746c6574436f6e66696775726174696f6e00000000000000010200014c00046e616d6571007e0002787071007e0726740007486973746f72797371007e072771007e0729787372004f63682e73797374656d73782e636973642e6f70656e6269732e67656e657269632e7368617265642e62617369632e64746f2e5265616c4e756d626572466f726d6174696e67506172616d657465727300000000000000010200035a0010666f726d6174696e67456e61626c6564490009707265636973696f6e5a000a736369656e746966696378700100000004007371007e00063f400000000000187708000000200000001474002d67656e657269635f646174617365745f7669657765724843535f494d4147455f434f4e5441494e45525f52415774001a646174612d7365742d636f6e7461696e65642d73656374696f6e74002e67656e657269635f646174617365745f7669657765724d4943524f53434f50595f494d475f434f4e5441494e455271007e072f74002567656e657269635f6578706572696d656e745f7669657765724843535f504c41544f4e49437400196578706572696d656e742d73616d706c652d73656374696f6e74003667656e657269635f646174617365745f7669657765724843535f494d4147455f434f4e5441494e45525f5345474d454e544154494f4e740015646174612d7365742d646174612d73656374696f6e74003067656e657269635f646174617365745f7669657765724843535f414e414c595349535f57454c4c5f464541545552455371007e073474002067656e657269635f6578706572696d656e745f766965776572554e4b4e4f574e740011646174612d736574732d73656374696f6e74001c67656e657269635f73616d706c655f766965776572554e4b4e4f574e7400126174746163686d656e742d73656374696f6e74002d67656e657269635f646174617365745f7669657765724d4943524f53434f50595f494d475f4f5645525649455771007e073474001d67656e657269635f646174617365745f766965776572554e4b4e4f574e71007e073474002467656e657269635f646174617365745f7669657765724d4943524f53434f50595f494d4771007e073474002c67656e657269635f646174617365745f7669657765724843535f494d4147455f5345474d454e544154494f4e71007e073474001b67656e657269635f6d6174657269616c5f76696577657247454e45740020706c6174652d6c6f636174696f6e732d6d6174657269616c2d73656374696f6e74001a67656e657269635f73616d706c655f766965776572504c41544571007e073774002367656e657269635f646174617365745f7669657765724843535f494d4147455f52415771007e073474002367656e657269635f73616d706c655f7669657765724d4943524f53434f50595f494d4774001a6c6f676963616c2d696d6167652d77656c6c2d73656374696f6e74002c67656e657269635f6578706572696d656e745f7669657765724d4943524f53434f50595f504c41544f4e494371007e073274001f67656e657269635f73616d706c655f7669657765725349524e415f57454c4c71007e073774003a67656e657269635f646174617365745f7669657765724843535f414e414c595349535f434f4e5441494e45525f57454c4c5f464541545552455371007e072f74003067656e657269635f646174617365745f7669657765724843535f414e414c595349535f46454154555245535f4c49535471007e073474002867656e657269635f646174617365745f7669657765724843535f494d4147455f4f5645525649455771007e0734787371007e00063f4000000000000c7708000000100000000174000973637265656e696e677372005363682e73797374656d73782e636973642e6f70656e6269732e706c7567696e2e73637265656e696e672e7368617265642e62617369632e64746f2e53637265656e696e67446973706c617953657474696e677300000000000000010200074c001864656661756c74416e616c7973697350726f63656475726571007e00024c000f64656661756c744368616e6e656c7371007e00014c001864656661756c744665617475726552616e6765547970657371007e00014c001264656661756c744d6f76696544656c61797371007e00014c001264656661756c745265736f6c7574696f6e7371007e00014c001664656661756c745472616e73666f726d6174696f6e7371007e00014c001a696e74656e7369747952616e676573466f724368616e6e656c7371007e00017870740003416c6c7371007e00063f4000000000000c770800000010000000047400256578706572696d656e742d6368616e6e656c32303133303431323130353233323631362d3274000f4d6572676564204368616e6e656c737400276578706572696d656e742d6368616e6e656c32303133303431323135303034393434362d32303471007e07507400276578706572696d656e742d6368616e6e656c32303133303431323135353133383031392d3339367400035247427400166578706572696d656e742d6368616e6e656c6e756c6c71007e07507870707371007e00063f4000000000000c7708000000100000000171007e074f7372004a63682e73797374656d73782e636973642e6f70656e6269732e706c7567696e2e73637265656e696e672e7368617265642e62617369632e64746f2e496d6167655265736f6c7574696f6e00000000000000010200034900066865696768745a000a69734f726967696e616c49000577696474687870000002000000000200787371007e00063f4000000000000c7708000000100000000471007e074f7371007e00063f4000000000000c77080000001000000002740004444150497400092444454641554c542471007e075071007e075b7871007e07517371007e00063f4000000000000c7708000000100000000271007e075a71007e075b71007e075071007e075b7871007e07527371007e00063f4000000000000c7708000000100000000171007e075371007e075b7871007e07547371007e00063f4000000000000c7708000000100000000171007e075071007e075b78787371007e00063f4000000000000c7708000000100000000371007e074f7371007e00063f40000000000000770800000010000000007871007e07517371007e00063f40000000000000770800000010000000007871007e07527371007e00063f40000000000000770800000010000000007878787371007e0009000000147704000000147372003d63682e73797374656d73782e636973642e6f70656e6269732e67656e657269632e7368617265642e62617369632e64746f2e456e74697479566973697400000000000000010200054a000974696d655374616d704c000a656e746974794b696e6471007e00024c000e656e7469747954797065436f646571007e00024c000a6964656e74696669657271007e00024c00067065726d494471007e00027870000001554ae647c074000a4558504552494d454e54740007554e4b4e4f574e7400242f544553542f544553542d50524f4a4543542f544553542d4558504552494d454e542d3374001532303136303631333139353430373037342d3433367371007e07640000013ea857eae7740008444154415f5345547400174843535f494d4147455f434f4e5441494e45525f52415774001532303133303431323134333132313038312d32303071007e076d7371007e07640000013e3c15424371007e076b7400204843535f494d4147455f434f4e5441494e45525f5345474d454e544154494f4e74001532303133303431323135333131393836342d33383571007e07707371007e07640000013e3be9c7d371007e07667400134d4943524f53434f50595f504c41544f4e49437400222f504c41544f4e49432f53435245454e494e472d4558414d504c45532f4558502d3274001532303133303431323135353133383031392d3339367371007e07640000013e3be6ea1a74000653414d504c4574000e4d4943524f53434f50595f494d477400122f504c41544f4e49432f5345524945532d3174001532303133303431373039343931313936372d3432367371007e07640000013e3be5a6f571007e076674000c4843535f504c41544f4e49437400222f504c41544f4e49432f53435245454e494e472d4558414d504c45532f4558502d3174001332303133303431323130353233323631362d327371007e07640000013e3be3f2b271007e0776740005504c4154457400112f504c41544f4e49432f504c4154452d3174001432303133303431323134303134373733352d32307371007e07640000013e3be0e86e71007e077671007e076774002d2f544553542f544553542d53414d504c452d313a544553542d53414d504c452d312d434f4e5441494e45442d3174001532303133303432343133343732313634342d3433347371007e07640000013e3bdeea3771007e077671007e07677400132f544553542f544553542d53414d504c452d3274001532303133303431353039313932333438352d3430327371007e07640000013e3bb49dea71007e076b7400174d4943524f53434f50595f494d475f4f5645525649455774001532303133303431373039343933343639332d34323771007e078a7371007e07640000013e3b56365571007e076b74001a4843535f414e414c595349535f46454154555245535f4c49535474001532303133303432343131313735313433322d34333171007e078d7371007e07640000013e3b55e9be71007e076b71007e078c74001532303133303432343131313735313230392d34333071007e078f7371007e07640000013e3b55cc3971007e076b7400244843535f414e414c595349535f434f4e5441494e45525f57454c4c5f464541545552455374001532303133303431323135333635393939342d33393171007e07927371007e07640000013e3b500a5971007e076b74001a4843535f414e414c595349535f57454c4c5f464541545552455374001532303133303431323135333635393934352d33393071007e07957371007e07640000013e16fe882971007e076b7400184d4943524f53434f50595f494d475f434f4e5441494e455274001532303133303431373039343933373134342d34323971007e07987371007e07640000013e16fbc42471007e076b71007e077774001532303133303431373039343933363032312d34323871007e079a7371007e07640000013e16f7a38271007e076671007e07677400242f544553542f544553542d50524f4a4543542f544553542d4558504552494d454e542d3274001532303133303431353039313734353039392d3430317371007e07640000013e13682eea71007e076b71007e076774001532303133303431353130303233383039382d34303871007e079f7371007e07640000013e1305b69371007e077674000a5349524e415f57454c4c7400142f504c41544f4e49432f504c4154452d313a423274001432303133303431323134303135313939392d33357371007e07640000013e12e3717371007e077671007e07a17400142f504c41544f4e49432f504c4154452d313a413174001432303133303431323134303135313633382d323278 t 10 Günter Lévi-Strauss observer franz-josef.elmer@systemsx.ch \N 2013-04-23 12:02:27.70936+02 1 \\xaced00057372004163682e73797374656d73782e636973642e6f70656e6269732e67656e657269632e7368617265642e62617369632e64746f2e446973706c617953657474696e6773000000000000000102000e5a0009646562756767696e675a001669676e6f72654c617374486973746f7279546f6b656e5a001575736557696c64636172645365617263684d6f64654c000e636f6c756d6e53657474696e677374000f4c6a6176612f7574696c2f4d61703b4c001b637573746f6d576562417070446973706c617953657474696e677371007e00014c001064726f70446f776e53657474696e677371007e00014c00166c617374486973746f7279546f6b656e4f724e756c6c7400124c6a6176612f6c616e672f537472696e673b4c001670616e656c436f6c6c617073656453657474696e677371007e00014c001170616e656c53697a6553657474696e677371007e00014c0015706f72746c6574436f6e66696775726174696f6e7371007e00014c001d7265616c4e756d626572466f726d6174696e67506172616d65746572737400514c63682f73797374656d73782f636973642f6f70656e6269732f67656e657269632f7368617265642f62617369632f64746f2f5265616c4e756d626572466f726d6174696e67506172616d65746572733b4c000b74616253657474696e677371007e00014c001a746563686e6f6c6f6779537065636966696353657474696e677371007e00014c00067669736974737400104c6a6176612f7574696c2f4c6973743b7870000000737200116a6176612e7574696c2e486173684d61700507dac1c31660d103000246000a6c6f6164466163746f724900097468726573686f6c6478703f4000000000000c7708000000100000000078707371007e00063f4000000000000c7708000000100000000078707371007e00063f4000000000000c77080000001000000000787371007e00063f4000000000000c7708000000100000000078707372004f63682e73797374656d73782e636973642e6f70656e6269732e67656e657269632e7368617265642e62617369632e64746f2e5265616c4e756d626572466f726d6174696e67506172616d657465727300000000000000010200035a0010666f726d6174696e67456e61626c6564490009707265636973696f6e5a000a736369656e746966696378700100000004007371007e00063f4000000000000c77080000001000000000787371007e00063f4000000000000c770800000010000000007870 t -2 Claude Čapek etlserver franz-josef.elmer@systemsx.ch \N 2013-04-12 10:06:08.930166+02 1 \\xaced00057372004163682e73797374656d73782e636973642e6f70656e6269732e67656e657269632e7368617265642e62617369632e64746f2e446973706c617953657474696e6773000000000000000102000e5a0009646562756767696e675a001669676e6f72654c617374486973746f7279546f6b656e5a001575736557696c64636172645365617263684d6f64654c000e636f6c756d6e53657474696e677374000f4c6a6176612f7574696c2f4d61703b4c001b637573746f6d576562417070446973706c617953657474696e677371007e00014c001064726f70446f776e53657474696e677371007e00014c00166c617374486973746f7279546f6b656e4f724e756c6c7400124c6a6176612f6c616e672f537472696e673b4c001670616e656c436f6c6c617073656453657474696e677371007e00014c001170616e656c53697a6553657474696e677371007e00014c0015706f72746c6574436f6e66696775726174696f6e7371007e00014c001d7265616c4e756d626572466f726d6174696e67506172616d65746572737400514c63682f73797374656d73782f636973642f6f70656e6269732f67656e657269632f7368617265642f62617369632f64746f2f5265616c4e756d626572466f726d6174696e67506172616d65746572733b4c000b74616253657474696e677371007e00014c001a746563686e6f6c6f6779537065636966696353657474696e677371007e00014c00067669736974737400104c6a6176612f7574696c2f4c6973743b7870000000737200116a6176612e7574696c2e486173684d61700507dac1c31660d103000246000a6c6f6164466163746f724900097468726573686f6c6478703f4000000000000c7708000000100000000078707371007e00063f4000000000000c7708000000100000000078707371007e00063f4000000000000c77080000001000000000787371007e00063f4000000000000c7708000000100000000078707372004f63682e73797374656d73782e636973642e6f70656e6269732e67656e657269632e7368617265642e62617369632e64746f2e5265616c4e756d626572466f726d6174696e67506172616d657465727300000000000000010200035a0010666f726d6174696e67456e61626c6564490009707265636973696f6e5a000a736369656e746966696378700100000004007371007e00063f4000000000000c77080000001000000000787371007e00063f4000000000000c770800000010000000007870 t 9 Claude Grass selenium franz-josef.elmer@systemsx.ch \N 2013-04-23 12:02:27.70936+02 1 \\xaced00057372004163682e73797374656d73782e636973642e6f70656e6269732e67656e657269632e7368617265642e62617369632e64746f2e446973706c617953657474696e6773000000000000000102000e5a0009646562756767696e675a001669676e6f72654c617374486973746f7279546f6b656e5a001575736557696c64636172645365617263684d6f64654c000e636f6c756d6e53657474696e677374000f4c6a6176612f7574696c2f4d61703b4c001b637573746f6d576562417070446973706c617953657474696e677371007e00014c001064726f70446f776e53657474696e677371007e00014c00166c617374486973746f7279546f6b656e4f724e756c6c7400124c6a6176612f6c616e672f537472696e673b4c001670616e656c436f6c6c617073656453657474696e677371007e00014c001170616e656c53697a6553657474696e677371007e00014c0015706f72746c6574436f6e66696775726174696f6e7371007e00014c001d7265616c4e756d626572466f726d6174696e67506172616d65746572737400514c63682f73797374656d73782f636973642f6f70656e6269732f67656e657269632f7368617265642f62617369632f64746f2f5265616c4e756d626572466f726d6174696e67506172616d65746572733b4c000b74616253657474696e677371007e00014c001a746563686e6f6c6f6779537065636966696353657474696e677371007e00014c00067669736974737400104c6a6176612f7574696c2f4c6973743b7870000000737200116a6176612e7574696c2e486173684d61700507dac1c31660d103000246000a6c6f6164466163746f724900097468726573686f6c6478703f4000000000000c7708000000100000000078707371007e00063f4000000000000c7708000000100000000078707371007e00063f4000000000000c77080000001000000000787371007e00063f4000000000000c7708000000100000000078707372004f63682e73797374656d73782e636973642e6f70656e6269732e67656e657269632e7368617265642e62617369632e64746f2e5265616c4e756d626572466f726d6174696e67506172616d657465727300000000000000010200035a0010666f726d6174696e67456e61626c6564490009707265636973696f6e5a000a736369656e746966696378700100000004007371007e00063f4000000000000c77080000001000000000787371007e00063f4000000000000c770800000010000000007870 t +2 Ryszard Jelinek etlserver franz-josef.elmer@systemsx.ch \N 2013-04-12 10:06:08.930166+02 1 \\xaced00057372004163682e73797374656d73782e636973642e6f70656e6269732e67656e657269632e7368617265642e62617369632e64746f2e446973706c617953657474696e6773000000000000000102000e5a0009646562756767696e675a001669676e6f72654c617374486973746f7279546f6b656e5a001575736557696c64636172645365617263684d6f64654c000e636f6c756d6e53657474696e677374000f4c6a6176612f7574696c2f4d61703b4c001b637573746f6d576562417070446973706c617953657474696e677371007e00014c001064726f70446f776e53657474696e677371007e00014c00166c617374486973746f7279546f6b656e4f724e756c6c7400124c6a6176612f6c616e672f537472696e673b4c001670616e656c436f6c6c617073656453657474696e677371007e00014c001170616e656c53697a6553657474696e677371007e00014c0015706f72746c6574436f6e66696775726174696f6e7371007e00014c001d7265616c4e756d626572466f726d6174696e67506172616d65746572737400514c63682f73797374656d73782f636973642f6f70656e6269732f67656e657269632f7368617265642f62617369632f64746f2f5265616c4e756d626572466f726d6174696e67506172616d65746572733b4c000b74616253657474696e677371007e00014c001a746563686e6f6c6f6779537065636966696353657474696e677371007e00014c00067669736974737400104c6a6176612f7574696c2f4c6973743b7870000000737200116a6176612e7574696c2e486173684d61700507dac1c31660d103000246000a6c6f6164466163746f724900097468726573686f6c6478703f4000000000000c7708000000100000000078707371007e00063f4000000000000c7708000000100000000078707371007e00063f4000000000000c77080000001000000000787371007e00063f4000000000000c7708000000100000000078707372004f63682e73797374656d73782e636973642e6f70656e6269732e67656e657269632e7368617265642e62617369632e64746f2e5265616c4e756d626572466f726d6174696e67506172616d657465727300000000000000010200035a0010666f726d6174696e67456e61626c6564490009707265636973696f6e5a000a736369656e746966696378700100000004007371007e00063f4000000000000c77080000001000000000787371007e00063f4000000000000c770800000010000000007870 t \. @@ -4973,7 +5049,7 @@ COPY persons (id, first_name, last_name, user_id, email, space_id, registration_ -- Data for Name: post_registration_dataset_queue; Type: TABLE DATA; Schema: public; Owner: - -- -COPY post_registration_dataset_queue (id, ds_id) FROM stdin; +COPY public.post_registration_dataset_queue (id, ds_id) FROM stdin; \. @@ -4981,21 +5057,21 @@ COPY post_registration_dataset_queue (id, ds_id) FROM stdin; -- Name: post_registration_dataset_queue_id_seq; Type: SEQUENCE SET; Schema: public; Owner: - -- -SELECT pg_catalog.setval('post_registration_dataset_queue_id_seq', 20, true); +SELECT pg_catalog.setval('public.post_registration_dataset_queue_id_seq', 20, true); -- -- Name: project_id_seq; Type: SEQUENCE SET; Schema: public; Owner: - -- -SELECT pg_catalog.setval('project_id_seq', 4, true); +SELECT pg_catalog.setval('public.project_id_seq', 4, true); -- -- Data for Name: project_relationships_history; Type: TABLE DATA; Schema: public; Owner: - -- -COPY project_relationships_history (id, main_proj_id, relation_type, expe_id, space_id, entity_perm_id, pers_id_author, valid_from_timestamp, valid_until_timestamp) FROM stdin; +COPY public.project_relationships_history (id, main_proj_id, relation_type, expe_id, space_id, entity_perm_id, pers_id_author, valid_from_timestamp, valid_until_timestamp) FROM stdin; 3 2 OWNED \N 2 PLATONIC 3 2013-04-12 10:39:42.922+02 \N 4 2 OWNER 2 \N 20130412105232616-2 3 2013-04-12 10:52:32.616+02 \N 6 4 OWNED \N 3 TEST 3 2013-04-12 15:00:31.345+02 \N @@ -5011,14 +5087,14 @@ COPY project_relationships_history (id, main_proj_id, relation_type, expe_id, sp -- Name: project_relationships_history_id_seq; Type: SEQUENCE SET; Schema: public; Owner: - -- -SELECT pg_catalog.setval('project_relationships_history_id_seq', 11, true); +SELECT pg_catalog.setval('public.project_relationships_history_id_seq', 11, true); -- -- Data for Name: projects; Type: TABLE DATA; Schema: public; Owner: - -- -COPY projects (id, perm_id, code, space_id, pers_id_leader, description, pers_id_registerer, registration_timestamp, modification_timestamp, pers_id_modifier, version) FROM stdin; +COPY public.projects (id, perm_id, code, space_id, pers_id_leader, description, pers_id_registerer, registration_timestamp, modification_timestamp, pers_id_modifier, version) FROM stdin; 2 20130412103942912-1 SCREENING-EXAMPLES 2 \N \N 3 2013-04-12 10:39:42.885812+02 2013-04-12 15:51:38.018+02 3 0 4 20130412150031345-203 TEST-PROJECT 3 \N \N 3 2013-04-12 15:00:31.338106+02 2016-06-13 19:54:07.074388+02 3 3 \. @@ -5028,14 +5104,14 @@ COPY projects (id, perm_id, code, space_id, pers_id_leader, description, pers_id -- Name: property_type_id_seq; Type: SEQUENCE SET; Schema: public; Owner: - -- -SELECT pg_catalog.setval('property_type_id_seq', 103, true); +SELECT pg_catalog.setval('public.property_type_id_seq', 103, true); -- -- Data for Name: property_types; Type: TABLE DATA; Schema: public; Owner: - -- -COPY property_types (id, code, description, label, daty_id, registration_timestamp, pers_id_registerer, covo_id, is_managed_internally, is_internal_namespace, maty_prop_id, schema, transformation) FROM stdin; +COPY public.property_types (id, code, description, label, daty_id, registration_timestamp, pers_id_registerer, covo_id, is_managed_internally, is_internal_namespace, maty_prop_id, schema, transformation) FROM stdin; 1 DESCRIPTION A Description Description 1 2013-04-12 10:04:52.629266+02 1 \N f f \N \N \N 2 AGILENT_KIT Agilent Kit 7 2013-04-12 10:04:56.658885+02 1 2 f f \N \N \N 3 ALIGNMENT_SOFTWARE Alignment software 7 2013-04-12 10:04:56.658885+02 1 3 f f \N \N \N @@ -5146,7 +5222,7 @@ COPY property_types (id, code, description, label, daty_id, registration_timesta -- Data for Name: queries; Type: TABLE DATA; Schema: public; Owner: - -- -COPY queries (id, name, description, registration_timestamp, pers_id_registerer, modification_timestamp, expression, is_public, query_type, entity_type_code, db_key) FROM stdin; +COPY public.queries (id, name, description, registration_timestamp, pers_id_registerer, modification_timestamp, expression, is_public, query_type, entity_type_code, db_key) FROM stdin; 1 Test Query \N 2013-04-15 13:42:16.242704+02 3 2013-04-15 13:42:16.285+02 SELECT 'test_value' as test_column t GENERIC \N test-query-database \. @@ -5155,21 +5231,21 @@ COPY queries (id, name, description, registration_timestamp, pers_id_registerer, -- Name: query_id_seq; Type: SEQUENCE SET; Schema: public; Owner: - -- -SELECT pg_catalog.setval('query_id_seq', 1, true); +SELECT pg_catalog.setval('public.query_id_seq', 1, true); -- -- Name: relationship_type_id_seq; Type: SEQUENCE SET; Schema: public; Owner: - -- -SELECT pg_catalog.setval('relationship_type_id_seq', 3, true); +SELECT pg_catalog.setval('public.relationship_type_id_seq', 3, true); -- -- Data for Name: relationship_types; Type: TABLE DATA; Schema: public; Owner: - -- -COPY relationship_types (id, code, label, parent_label, child_label, description, registration_timestamp, pers_id_registerer, is_managed_internally, is_internal_namespace) FROM stdin; +COPY public.relationship_types (id, code, label, parent_label, child_label, description, registration_timestamp, pers_id_registerer, is_managed_internally, is_internal_namespace) FROM stdin; 1 PARENT_CHILD Parent - Child Parent Child Parent - Child relationship 2013-04-12 10:04:52.629266+02 1 t t 2 PLATE_CONTROL_LAYOUT Plate - Control Layout Plate Control Layout Plate - Control Layout relationship 2013-04-12 10:04:52.629266+02 1 t t 3 CONTAINER_COMPONENT Container - Component Container Component Container - Component relationship 2015-09-04 10:05:23.557656+02 1 t t @@ -5180,14 +5256,14 @@ COPY relationship_types (id, code, label, parent_label, child_label, description -- Name: role_assignment_id_seq; Type: SEQUENCE SET; Schema: public; Owner: - -- -SELECT pg_catalog.setval('role_assignment_id_seq', 10, true); +SELECT pg_catalog.setval('public.role_assignment_id_seq', 10, true); -- -- Data for Name: role_assignments; Type: TABLE DATA; Schema: public; Owner: - -- -COPY role_assignments (id, role_code, space_id, pers_id_grantee, ag_id_grantee, pers_id_registerer, registration_timestamp, project_id) FROM stdin; +COPY public.role_assignments (id, role_code, space_id, pers_id_grantee, ag_id_grantee, pers_id_registerer, registration_timestamp, project_id) FROM stdin; 1 ETL_SERVER \N 2 \N 1 2013-04-12 10:06:08.930166+02 \N 2 ADMIN \N 3 \N 1 2013-04-12 10:07:44.572139+02 \N 3 ADMIN \N 4 \N 3 2013-04-12 14:37:02.947129+02 \N @@ -5204,21 +5280,21 @@ COPY role_assignments (id, role_code, space_id, pers_id_grantee, ag_id_grantee, -- Name: sample_code_seq; Type: SEQUENCE SET; Schema: public; Owner: - -- -SELECT pg_catalog.setval('sample_code_seq', 1, false); +SELECT pg_catalog.setval('public.sample_code_seq', 1, false); -- -- Name: sample_id_seq; Type: SEQUENCE SET; Schema: public; Owner: - -- -SELECT pg_catalog.setval('sample_id_seq', 353, true); +SELECT pg_catalog.setval('public.sample_id_seq', 353, true); -- -- Data for Name: sample_properties; Type: TABLE DATA; Schema: public; Owner: - -- -COPY sample_properties (id, samp_id, stpt_id, value, cvte_id, mate_prop_id, pers_id_registerer, registration_timestamp, pers_id_author, modification_timestamp) FROM stdin; +COPY public.sample_properties (id, samp_id, stpt_id, value, cvte_id, mate_prop_id, pers_id_registerer, registration_timestamp, pers_id_author, modification_timestamp) FROM stdin; 1 2 73 \N 243 \N 3 2013-04-12 14:01:43.729885+02 3 2013-04-12 14:01:48.03+02 2 3 73 \N 243 \N 3 2013-04-12 14:01:43.729885+02 3 2013-04-12 14:01:48.033+02 3 4 75 \N \N 6 3 2013-04-12 14:01:43.729885+02 3 2013-04-12 14:01:54.211+02 @@ -5907,7 +5983,7 @@ COPY sample_properties (id, samp_id, stpt_id, value, cvte_id, mate_prop_id, pers -- Data for Name: sample_properties_history; Type: TABLE DATA; Schema: public; Owner: - -- -COPY sample_properties_history (id, samp_id, stpt_id, value, vocabulary_term, material, pers_id_author, valid_from_timestamp, valid_until_timestamp) FROM stdin; +COPY public.sample_properties_history (id, samp_id, stpt_id, value, vocabulary_term, material, pers_id_author, valid_from_timestamp, valid_until_timestamp) FROM stdin; 682 345 76 0.8084392873570323 \N \N 4 2013-04-15 13:21:49.89+02 2013-04-15 14:02:02.746999+02 683 345 76 0.3461253938730806 \N \N 4 2013-04-15 14:02:03.947+02 2013-04-15 14:04:10.520983+02 684 345 76 0.9939973703585565 \N \N 4 2013-04-15 14:04:11.669+02 2013-04-15 15:01:43.682747+02 @@ -5930,21 +6006,21 @@ COPY sample_properties_history (id, samp_id, stpt_id, value, vocabulary_term, ma -- Name: sample_property_id_seq; Type: SEQUENCE SET; Schema: public; Owner: - -- -SELECT pg_catalog.setval('sample_property_id_seq', 696, true); +SELECT pg_catalog.setval('public.sample_property_id_seq', 696, true); -- -- Name: sample_relationship_id_seq; Type: SEQUENCE SET; Schema: public; Owner: - -- -SELECT pg_catalog.setval('sample_relationship_id_seq', 3, true); +SELECT pg_catalog.setval('public.sample_relationship_id_seq', 3, true); -- -- Data for Name: sample_relationships_all; Type: TABLE DATA; Schema: public; Owner: - -- -COPY sample_relationships_all (id, sample_id_parent, relationship_id, sample_id_child, del_id, pers_id_author, registration_timestamp, modification_timestamp) FROM stdin; +COPY public.sample_relationships_all (id, sample_id_parent, relationship_id, sample_id_child, del_id, pers_id_author, registration_timestamp, modification_timestamp) FROM stdin; 1 345 1 347 \N 3 2013-04-15 09:58:22.702187+02 2013-04-15 09:58:23.387+02 2 345 1 348 \N 3 2013-04-15 09:58:27.586828+02 2013-04-15 09:58:28.22+02 3 346 1 345 \N 3 2013-04-15 09:58:48.926426+02 2013-04-15 09:58:50.054+02 @@ -5955,7 +6031,7 @@ COPY sample_relationships_all (id, sample_id_parent, relationship_id, sample_id_ -- Data for Name: sample_relationships_history; Type: TABLE DATA; Schema: public; Owner: - -- -COPY sample_relationships_history (id, main_samp_id, relation_type, expe_id, samp_id, data_id, entity_perm_id, pers_id_author, valid_from_timestamp, valid_until_timestamp, space_id, proj_id) FROM stdin; +COPY public.sample_relationships_history (id, main_samp_id, relation_type, expe_id, samp_id, data_id, entity_perm_id, pers_id_author, valid_from_timestamp, valid_until_timestamp, space_id, proj_id) FROM stdin; 2 2 OWNED 2 \N \N 20130412105232616-2 3 2013-04-12 14:01:47.477+02 \N \N \N 3 3 OWNED 2 \N \N 20130412105232616-2 3 2013-04-12 14:01:47.735+02 \N \N \N 4 2 CONTAINER \N 4 \N 20130412140151638-22 3 2013-04-12 14:01:51.636+02 \N \N \N @@ -7017,21 +7093,21 @@ COPY sample_relationships_history (id, main_samp_id, relation_type, expe_id, sam -- Name: sample_relationships_history_id_seq; Type: SEQUENCE SET; Schema: public; Owner: - -- -SELECT pg_catalog.setval('sample_relationships_history_id_seq', 1068, true); +SELECT pg_catalog.setval('public.sample_relationships_history_id_seq', 1068, true); -- -- Name: sample_type_id_seq; Type: SEQUENCE SET; Schema: public; Owner: - -- -SELECT pg_catalog.setval('sample_type_id_seq', 13, true); +SELECT pg_catalog.setval('public.sample_type_id_seq', 13, true); -- -- Data for Name: sample_type_property_types; Type: TABLE DATA; Schema: public; Owner: - -- -COPY sample_type_property_types (id, saty_id, prty_id, is_mandatory, is_managed_internally, pers_id_registerer, registration_timestamp, is_displayed, ordinal, section, script_id, is_shown_edit, show_raw_value) FROM stdin; +COPY public.sample_type_property_types (id, saty_id, prty_id, is_mandatory, is_managed_internally, pers_id_registerer, registration_timestamp, is_displayed, ordinal, section, script_id, is_shown_edit, show_raw_value) FROM stdin; 6 2 73 f f 1 2013-04-12 10:04:56.658885+02 t 11 \N 1 f f 1 2 74 f f 1 2013-04-12 10:04:56.658885+02 t 2 \N \N t f 2 2 79 f f 1 2013-04-12 10:04:56.658885+02 t 6 \N \N t f @@ -7115,7 +7191,7 @@ COPY sample_type_property_types (id, saty_id, prty_id, is_mandatory, is_managed_ -- Data for Name: sample_types; Type: TABLE DATA; Schema: public; Owner: - -- -COPY sample_types (id, code, description, is_listable, generated_from_depth, part_of_depth, modification_timestamp, is_auto_generated_code, generated_code_prefix, is_subcode_unique, inherit_properties, validation_script_id, show_parent_metadata) FROM stdin; +COPY public.sample_types (id, code, description, is_listable, generated_from_depth, part_of_depth, modification_timestamp, is_auto_generated_code, generated_code_prefix, is_subcode_unique, inherit_properties, validation_script_id, show_parent_metadata) FROM stdin; 2 ILLUMINA_FLOW_CELL Container of ILLUMINA_FLOW_LANES\\ Can be created automatically by a drop box and the properties can be filled from the RunInfo.xml and runParameters.xml files t 0 0 2013-04-12 10:04:56.658885+02 f FLOWCELL- f f \N f 3 ILLUMINA_FLOW_LANE Child of LIBRARY or POOL t 1 1 2013-04-12 10:04:56.658885+02 f FLOWLANE- f f \N t 4 LIBRARY Child of RAW and potential parent of POOL t 1 0 2013-04-12 10:04:56.658885+02 t BSSE-QGF-LIBRARY- f f \N t @@ -7136,7 +7212,7 @@ COPY sample_types (id, code, description, is_listable, generated_from_depth, par -- Data for Name: samples_all; Type: TABLE DATA; Schema: public; Owner: - -- -COPY samples_all (id, perm_id, code, expe_id, saty_id, registration_timestamp, modification_timestamp, pers_id_registerer, del_id, orig_del, space_id, samp_id_part_of, pers_id_modifier, code_unique_check, subcode_unique_check, version, proj_id) FROM stdin; +COPY public.samples_all (id, perm_id, code, expe_id, saty_id, registration_timestamp, modification_timestamp, pers_id_registerer, del_id, orig_del, space_id, samp_id_part_of, pers_id_modifier, code_unique_check, subcode_unique_check, version, proj_id) FROM stdin; 4 20130412140151638-22 A1 2 12 2013-04-12 14:01:43.729885+02 2013-04-12 14:01:51.636+02 3 \N \N 2 2 3 A1,2,2 \N 0 \N 5 20130412140151651-23 A2 2 12 2013-04-12 14:01:43.729885+02 2013-04-12 14:01:51.651+02 3 \N \N 2 2 3 A2,2,2 \N 0 \N 6 20130412140151661-24 A3 2 12 2013-04-12 14:01:43.729885+02 2013-04-12 14:01:51.661+02 3 \N \N 2 2 3 A3,2,2 \N 0 \N @@ -7494,14 +7570,14 @@ COPY samples_all (id, perm_id, code, expe_id, saty_id, registration_timestamp, m -- Name: script_id_seq; Type: SEQUENCE SET; Schema: public; Owner: - -- -SELECT pg_catalog.setval('script_id_seq', 2, true); +SELECT pg_catalog.setval('public.script_id_seq', 2, true); -- -- Data for Name: scripts; Type: TABLE DATA; Schema: public; Owner: - -- -COPY scripts (id, name, script_type, description, script, registration_timestamp, pers_id_registerer, entity_kind, plugin_type, is_available) FROM stdin; +COPY public.scripts (id, name, script_type, description, script, registration_timestamp, pers_id_registerer, entity_kind, plugin_type, is_available) FROM stdin; 1 Diff_time DYNAMIC_PROPERTY Calculates the difference of two given dates from datetime import datetime\n\ndef dateTimeSplitter(openbisDate):\n dateAndTime, tz = openbisDate.rsplit(" ", 1)\n pythonDateTime = datetime.strptime(dateAndTime, "%Y-%m-%d %H:%M:%S") \n return pythonDateTime\n\ndef calculate():\n \n try:\n start = dateTimeSplitter(entity.propertyValue('FLOW_CELL_SEQUENCED_ON'))\n end = dateTimeSplitter(entity.propertyValue('SEQUENCER_FINISHED'))\n diffTime = end-start\n return str(diffTime)\n except:\n return "N/A"\n 2013-04-12 10:04:56.658885+02 1 \N JYTHON t 2 Has_Parents ENTITY_VALIDATION Check if the Entity has a parent def validate(entity, isNew):\n parents = entity.entityPE().parents\n if parents:\n return None\n else:\n return "No Parents have been selected!"\n 2013-04-12 10:04:56.658885+02 1 \N JYTHON t \. @@ -7511,20 +7587,20 @@ COPY scripts (id, name, script_type, description, script, registration_timestamp -- Name: semantic_annotation_id_seq; Type: SEQUENCE SET; Schema: public; Owner: - -- -SELECT pg_catalog.setval('semantic_annotation_id_seq', 6, true); +SELECT pg_catalog.setval('public.semantic_annotation_id_seq', 6, true); -- -- Data for Name: semantic_annotations; Type: TABLE DATA; Schema: public; Owner: - -- -COPY semantic_annotations (id, perm_id, saty_id, stpt_id, prty_id, predicate_ontology_id, predicate_ontology_version, predicate_accession_id, descriptor_ontology_id, descriptor_ontology_version, descriptor_accession_id, creation_date) FROM stdin; -1 ST_PLATE 11 \N \N testPredicateOntologyId1 testPredicateOntologyVersion1 testPredicateAccessionId1 testDescriptorOntologyId1 testDescriptorOntologyVersion1 testDescriptorAccessionId1 2017-09-18 09:18:10.893+01 -2 ST_SIRNA_WELL 12 \N \N testPredicateOntologyId2 testPredicateOntologyVersion2 testPredicateAccessionId2 testDescriptorOntologyId2 testDescriptorOntologyVersion2 testDescriptorAccessionId2 2017-09-18 09:18:10.893+01 -3 ST_ILLUMINA_FLOW_CELL_PT_CREATED_ON_CS \N 20 \N testPredicateOntologyId3 testPredicateOntologyVersion3 testPredicateAccessionId3 testDescriptorOntologyId3 testDescriptorOntologyVersion3 testDescriptorAccessionId3 2017-09-18 09:18:10.893+01 -4 ST_LIBRARY_PT_PREPARED_BY \N 30 \N testPredicateOntologyId4 testPredicateOntologyVersion4 testPredicateAccessionId4 testDescriptorOntologyId4 testDescriptorOntologyVersion4 testDescriptorAccessionId4 2017-09-18 09:18:10.893+01 -5 PT_DESCRIPTION \N \N 1 testPredicateOntologyId5 testPredicateOntologyVersion5 testPredicateAccessionId5 testDescriptorOntologyId5 testDescriptorOntologyVersion5 testDescriptorAccessionId5 2017-09-18 09:18:10.893+01 -6 PT_AGILENT_KIT \N \N 2 testPredicateOntologyId6 testPredicateOntologyVersion6 testPredicateAccessionId6 testDescriptorOntologyId6 testDescriptorOntologyVersion6 testDescriptorAccessionId6 2017-09-18 09:18:10.893+01 +COPY public.semantic_annotations (id, perm_id, saty_id, stpt_id, prty_id, predicate_ontology_id, predicate_ontology_version, predicate_accession_id, descriptor_ontology_id, descriptor_ontology_version, descriptor_accession_id, creation_date) FROM stdin; +1 ST_PLATE 11 \N \N testPredicateOntologyId1 testPredicateOntologyVersion1 testPredicateAccessionId1 testDescriptorOntologyId1 testDescriptorOntologyVersion1 testDescriptorAccessionId1 2017-09-18 10:18:10.893+02 +2 ST_SIRNA_WELL 12 \N \N testPredicateOntologyId2 testPredicateOntologyVersion2 testPredicateAccessionId2 testDescriptorOntologyId2 testDescriptorOntologyVersion2 testDescriptorAccessionId2 2017-09-18 10:18:10.893+02 +3 ST_ILLUMINA_FLOW_CELL_PT_CREATED_ON_CS \N 20 \N testPredicateOntologyId3 testPredicateOntologyVersion3 testPredicateAccessionId3 testDescriptorOntologyId3 testDescriptorOntologyVersion3 testDescriptorAccessionId3 2017-09-18 10:18:10.893+02 +4 ST_LIBRARY_PT_PREPARED_BY \N 30 \N testPredicateOntologyId4 testPredicateOntologyVersion4 testPredicateAccessionId4 testDescriptorOntologyId4 testDescriptorOntologyVersion4 testDescriptorAccessionId4 2017-09-18 10:18:10.893+02 +5 PT_DESCRIPTION \N \N 1 testPredicateOntologyId5 testPredicateOntologyVersion5 testPredicateAccessionId5 testDescriptorOntologyId5 testDescriptorOntologyVersion5 testDescriptorAccessionId5 2017-09-18 10:18:10.893+02 +6 PT_AGILENT_KIT \N \N 2 testPredicateOntologyId6 testPredicateOntologyVersion6 testPredicateAccessionId6 testDescriptorOntologyId6 testDescriptorOntologyVersion6 testDescriptorAccessionId6 2017-09-18 10:18:10.893+02 \. @@ -7532,14 +7608,14 @@ COPY semantic_annotations (id, perm_id, saty_id, stpt_id, prty_id, predicate_ont -- Name: space_id_seq; Type: SEQUENCE SET; Schema: public; Owner: - -- -SELECT pg_catalog.setval('space_id_seq', 3, true); +SELECT pg_catalog.setval('public.space_id_seq', 3, true); -- -- Data for Name: spaces; Type: TABLE DATA; Schema: public; Owner: - -- -COPY spaces (id, code, description, registration_timestamp, pers_id_registerer) FROM stdin; +COPY public.spaces (id, code, description, registration_timestamp, pers_id_registerer) FROM stdin; 2 PLATONIC \N 2013-04-12 10:36:41.094731+02 3 3 TEST \N 2013-04-12 14:59:00.75622+02 3 \. @@ -7549,902 +7625,910 @@ COPY spaces (id, code, description, registration_timestamp, pers_id_registerer) -- Name: stpt_id_seq; Type: SEQUENCE SET; Schema: public; Owner: - -- -SELECT pg_catalog.setval('stpt_id_seq', 76, true); +SELECT pg_catalog.setval('public.stpt_id_seq', 76, true); -- --- Name: ag_bk_uk; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: authorization_groups ag_bk_uk; Type: CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY authorization_groups +ALTER TABLE ONLY public.authorization_groups ADD CONSTRAINT ag_bk_uk UNIQUE (code); -- --- Name: ag_pk; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: authorization_groups ag_pk; Type: CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY authorization_groups +ALTER TABLE ONLY public.authorization_groups ADD CONSTRAINT ag_pk PRIMARY KEY (id); -- --- Name: agp_pk; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: authorization_group_persons agp_pk; Type: CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY authorization_group_persons +ALTER TABLE ONLY public.authorization_group_persons ADD CONSTRAINT agp_pk PRIMARY KEY (pers_id, ag_id); -- --- Name: atta_expe_bk_uk; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: attachments atta_expe_bk_uk; Type: CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY attachments +ALTER TABLE ONLY public.attachments ADD CONSTRAINT atta_expe_bk_uk UNIQUE (expe_id, file_name, version); -- --- Name: atta_pk; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: attachments atta_pk; Type: CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY attachments +ALTER TABLE ONLY public.attachments ADD CONSTRAINT atta_pk PRIMARY KEY (id); -- --- Name: atta_proj_bk_uk; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: attachments atta_proj_bk_uk; Type: CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY attachments +ALTER TABLE ONLY public.attachments ADD CONSTRAINT atta_proj_bk_uk UNIQUE (proj_id, file_name, version); -- --- Name: atta_samp_bk_uk; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: attachments atta_samp_bk_uk; Type: CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY attachments +ALTER TABLE ONLY public.attachments ADD CONSTRAINT atta_samp_bk_uk UNIQUE (samp_id, file_name, version); -- --- Name: coco_pk; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: content_copies coco_pk; Type: CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY content_copies +ALTER TABLE ONLY public.content_copies ADD CONSTRAINT coco_pk PRIMARY KEY (id); -- --- Name: content_copies_unique_check_uk; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: content_copies content_copies_unique_check_uk; Type: CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY content_copies +ALTER TABLE ONLY public.content_copies ADD CONSTRAINT content_copies_unique_check_uk UNIQUE (location_unique_check); -- --- Name: copl_name_ver_uk; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: core_plugins copl_name_ver_uk; Type: CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY core_plugins +ALTER TABLE ONLY public.core_plugins ADD CONSTRAINT copl_name_ver_uk UNIQUE (name, version); -- --- Name: covo_bk_uk; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: controlled_vocabularies covo_bk_uk; Type: CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY controlled_vocabularies +ALTER TABLE ONLY public.controlled_vocabularies ADD CONSTRAINT covo_bk_uk UNIQUE (code, is_internal_namespace); -- --- Name: covo_pk; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: controlled_vocabularies covo_pk; Type: CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY controlled_vocabularies +ALTER TABLE ONLY public.controlled_vocabularies ADD CONSTRAINT covo_pk PRIMARY KEY (id); -- --- Name: cvte_bk_uk; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: controlled_vocabulary_terms cvte_bk_uk; Type: CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY controlled_vocabulary_terms +ALTER TABLE ONLY public.controlled_vocabulary_terms ADD CONSTRAINT cvte_bk_uk UNIQUE (code, covo_id); -- --- Name: cvte_pk; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: controlled_vocabulary_terms cvte_pk; Type: CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY controlled_vocabulary_terms +ALTER TABLE ONLY public.controlled_vocabulary_terms ADD CONSTRAINT cvte_pk PRIMARY KEY (id); -- --- Name: dast_bk_uk; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: data_stores dast_bk_uk; Type: CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY data_stores +ALTER TABLE ONLY public.data_stores ADD CONSTRAINT dast_bk_uk UNIQUE (code, uuid); -- --- Name: dast_pk; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: data_stores dast_pk; Type: CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY data_stores +ALTER TABLE ONLY public.data_stores ADD CONSTRAINT dast_pk PRIMARY KEY (id); -- --- Name: data_bk_uk; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: data_all data_bk_uk; Type: CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY data_all +ALTER TABLE ONLY public.data_all ADD CONSTRAINT data_bk_uk UNIQUE (code); -- --- Name: data_pk; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: data_all data_pk; Type: CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY data_all +ALTER TABLE ONLY public.data_all ADD CONSTRAINT data_pk PRIMARY KEY (id); -- --- Name: datarelh_pk; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: data_set_relationships_history datarelh_pk; Type: CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY data_set_relationships_history +ALTER TABLE ONLY public.data_set_relationships_history ADD CONSTRAINT datarelh_pk PRIMARY KEY (id); -- --- Name: daty_bk_uk; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: data_types daty_bk_uk; Type: CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY data_types +ALTER TABLE ONLY public.data_types ADD CONSTRAINT daty_bk_uk UNIQUE (code); -- --- Name: daty_pk; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: data_types daty_pk; Type: CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY data_types +ALTER TABLE ONLY public.data_types ADD CONSTRAINT daty_pk PRIMARY KEY (id); -- --- Name: del_pk; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: deletions del_pk; Type: CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY deletions +ALTER TABLE ONLY public.deletions ADD CONSTRAINT del_pk PRIMARY KEY (id); -- --- Name: dsch_pk; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: data_set_copies_history dsch_pk; Type: CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY data_set_copies_history +ALTER TABLE ONLY public.data_set_copies_history ADD CONSTRAINT dsch_pk PRIMARY KEY (id); -- --- Name: dspr_bk_uk; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: data_set_properties dspr_bk_uk; Type: CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY data_set_properties +ALTER TABLE ONLY public.data_set_properties ADD CONSTRAINT dspr_bk_uk UNIQUE (ds_id, dstpt_id); -- --- Name: dspr_pk; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: data_set_properties dspr_pk; Type: CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY data_set_properties +ALTER TABLE ONLY public.data_set_properties ADD CONSTRAINT dspr_pk PRIMARY KEY (id); -- --- Name: dsprh_pk; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: data_set_properties_history dsprh_pk; Type: CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY data_set_properties_history +ALTER TABLE ONLY public.data_set_properties_history ADD CONSTRAINT dsprh_pk PRIMARY KEY (id); -- --- Name: dsre_bk_uk; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: data_set_relationships_all dsre_bk_uk; Type: CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY data_set_relationships_all +ALTER TABLE ONLY public.data_set_relationships_all ADD CONSTRAINT dsre_bk_uk UNIQUE (data_id_child, data_id_parent, relationship_id); -- --- Name: dssdst_bk_uk; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: data_store_service_data_set_types dssdst_bk_uk; Type: CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY data_store_service_data_set_types +ALTER TABLE ONLY public.data_store_service_data_set_types ADD CONSTRAINT dssdst_bk_uk UNIQUE (data_store_service_id, data_set_type_id); -- --- Name: dsse_bk_uk; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: data_store_services dsse_bk_uk; Type: CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY data_store_services +ALTER TABLE ONLY public.data_store_services ADD CONSTRAINT dsse_bk_uk UNIQUE (key, data_store_id); -- --- Name: dsse_pk; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: data_store_services dsse_pk; Type: CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY data_store_services +ALTER TABLE ONLY public.data_store_services ADD CONSTRAINT dsse_pk PRIMARY KEY (id); -- --- Name: dstpt_bk_uk; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: data_set_type_property_types dstpt_bk_uk; Type: CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY data_set_type_property_types +ALTER TABLE ONLY public.data_set_type_property_types ADD CONSTRAINT dstpt_bk_uk UNIQUE (dsty_id, prty_id); -- --- Name: dstpt_pk; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: data_set_type_property_types dstpt_pk; Type: CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY data_set_type_property_types +ALTER TABLE ONLY public.data_set_type_property_types ADD CONSTRAINT dstpt_pk PRIMARY KEY (id); -- --- Name: dsty_bk_uk; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: data_set_types dsty_bk_uk; Type: CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY data_set_types +ALTER TABLE ONLY public.data_set_types ADD CONSTRAINT dsty_bk_uk UNIQUE (code); -- --- Name: dsty_pk; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: data_set_types dsty_pk; Type: CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY data_set_types +ALTER TABLE ONLY public.data_set_types ADD CONSTRAINT dsty_pk PRIMARY KEY (id); -- --- Name: edms_code_uk; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: external_data_management_systems edms_code_uk; Type: CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY external_data_management_systems +ALTER TABLE ONLY public.external_data_management_systems ADD CONSTRAINT edms_code_uk UNIQUE (code); -- --- Name: edms_pk; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: external_data_management_systems edms_pk; Type: CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY external_data_management_systems +ALTER TABLE ONLY public.external_data_management_systems ADD CONSTRAINT edms_pk PRIMARY KEY (id); -- --- Name: eol_pk; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: entity_operations_log eol_pk; Type: CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY entity_operations_log +ALTER TABLE ONLY public.entity_operations_log ADD CONSTRAINT eol_pk PRIMARY KEY (id); -- --- Name: eol_reg_id_uk; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: entity_operations_log eol_reg_id_uk; Type: CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY entity_operations_log +ALTER TABLE ONLY public.entity_operations_log ADD CONSTRAINT eol_reg_id_uk UNIQUE (registration_id); -- --- Name: etpt_bk_uk; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: experiment_type_property_types etpt_bk_uk; Type: CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY experiment_type_property_types +ALTER TABLE ONLY public.experiment_type_property_types ADD CONSTRAINT etpt_bk_uk UNIQUE (exty_id, prty_id); -- --- Name: etpt_pk; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: experiment_type_property_types etpt_pk; Type: CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY experiment_type_property_types +ALTER TABLE ONLY public.experiment_type_property_types ADD CONSTRAINT etpt_pk PRIMARY KEY (id); -- --- Name: evnt_pk; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: events evnt_pk; Type: CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY events +ALTER TABLE ONLY public.events ADD CONSTRAINT evnt_pk PRIMARY KEY (id); -- --- Name: exac_pk; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: attachment_contents exac_pk; Type: CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY attachment_contents +ALTER TABLE ONLY public.attachment_contents ADD CONSTRAINT exac_pk PRIMARY KEY (id); -- --- Name: exda_bk_uk; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: external_data exda_bk_uk; Type: CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY external_data +ALTER TABLE ONLY public.external_data ADD CONSTRAINT exda_bk_uk UNIQUE (location, loty_id); -- --- Name: exda_pk; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: external_data exda_pk; Type: CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY external_data - ADD CONSTRAINT exda_pk PRIMARY KEY (data_id); +ALTER TABLE ONLY public.external_data + ADD CONSTRAINT exda_pk PRIMARY KEY (id); -- --- Name: expe_bk_uk; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: experiments_all expe_bk_uk; Type: CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY experiments_all +ALTER TABLE ONLY public.experiments_all ADD CONSTRAINT expe_bk_uk UNIQUE (code, proj_id); -- --- Name: expe_pi_uk; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: experiments_all expe_pi_uk; Type: CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY experiments_all +ALTER TABLE ONLY public.experiments_all ADD CONSTRAINT expe_pi_uk UNIQUE (perm_id); -- --- Name: expe_pk; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: experiments_all expe_pk; Type: CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY experiments_all +ALTER TABLE ONLY public.experiments_all ADD CONSTRAINT expe_pk PRIMARY KEY (id); -- --- Name: expr_bk_uk; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: experiment_properties expr_bk_uk; Type: CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY experiment_properties +ALTER TABLE ONLY public.experiment_properties ADD CONSTRAINT expr_bk_uk UNIQUE (expe_id, etpt_id); -- --- Name: expr_pk; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: experiment_properties expr_pk; Type: CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY experiment_properties +ALTER TABLE ONLY public.experiment_properties ADD CONSTRAINT expr_pk PRIMARY KEY (id); -- --- Name: exprh_pk; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: experiment_properties_history exprh_pk; Type: CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY experiment_properties_history +ALTER TABLE ONLY public.experiment_properties_history ADD CONSTRAINT exprh_pk PRIMARY KEY (id); -- --- Name: exrelh_pk; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: experiment_relationships_history exrelh_pk; Type: CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY experiment_relationships_history +ALTER TABLE ONLY public.experiment_relationships_history ADD CONSTRAINT exrelh_pk PRIMARY KEY (id); -- --- Name: exty_bk_uk; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: experiment_types exty_bk_uk; Type: CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY experiment_types +ALTER TABLE ONLY public.experiment_types ADD CONSTRAINT exty_bk_uk UNIQUE (code); -- --- Name: exty_pk; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: experiment_types exty_pk; Type: CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY experiment_types +ALTER TABLE ONLY public.experiment_types ADD CONSTRAINT exty_pk PRIMARY KEY (id); -- --- Name: ffty_bk_uk; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: file_format_types ffty_bk_uk; Type: CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY file_format_types +ALTER TABLE ONLY public.file_format_types ADD CONSTRAINT ffty_bk_uk UNIQUE (code); -- --- Name: ffty_pk; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: file_format_types ffty_pk; Type: CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY file_format_types +ALTER TABLE ONLY public.file_format_types ADD CONSTRAINT ffty_pk PRIMARY KEY (id); -- --- Name: filt_bk_uk; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: filters filt_bk_uk; Type: CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY filters +ALTER TABLE ONLY public.filters ADD CONSTRAINT filt_bk_uk UNIQUE (name, grid_id); -- --- Name: filt_pk; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: filters filt_pk; Type: CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY filters +ALTER TABLE ONLY public.filters ADD CONSTRAINT filt_pk PRIMARY KEY (id); -- --- Name: grid_custom_columns_bk_uk; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: grid_custom_columns grid_custom_columns_bk_uk; Type: CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY grid_custom_columns +ALTER TABLE ONLY public.grid_custom_columns ADD CONSTRAINT grid_custom_columns_bk_uk UNIQUE (code, grid_id); -- --- Name: grid_custom_columns_pk; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: grid_custom_columns grid_custom_columns_pk; Type: CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY grid_custom_columns +ALTER TABLE ONLY public.grid_custom_columns ADD CONSTRAINT grid_custom_columns_pk PRIMARY KEY (id); -- --- Name: lnda_pk; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: link_data lnda_pk; Type: CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY link_data - ADD CONSTRAINT lnda_pk PRIMARY KEY (data_id); +ALTER TABLE ONLY public.link_data + ADD CONSTRAINT lnda_pk PRIMARY KEY (id); -- --- Name: loty_bk_uk; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: locator_types loty_bk_uk; Type: CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY locator_types +ALTER TABLE ONLY public.locator_types ADD CONSTRAINT loty_bk_uk UNIQUE (code); -- --- Name: loty_pk; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: locator_types loty_pk; Type: CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY locator_types +ALTER TABLE ONLY public.locator_types ADD CONSTRAINT loty_pk PRIMARY KEY (id); -- --- Name: mapr_bk_uk; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: material_properties mapr_bk_uk; Type: CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY material_properties +ALTER TABLE ONLY public.material_properties ADD CONSTRAINT mapr_bk_uk UNIQUE (mate_id, mtpt_id); -- --- Name: mapr_pk; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: material_properties mapr_pk; Type: CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY material_properties +ALTER TABLE ONLY public.material_properties ADD CONSTRAINT mapr_pk PRIMARY KEY (id); -- --- Name: maprh_pk; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: material_properties_history maprh_pk; Type: CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY material_properties_history +ALTER TABLE ONLY public.material_properties_history ADD CONSTRAINT maprh_pk PRIMARY KEY (id); -- --- Name: mate_bk_uk; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: materials mate_bk_uk; Type: CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY materials +ALTER TABLE ONLY public.materials ADD CONSTRAINT mate_bk_uk UNIQUE (code, maty_id); -- --- Name: mate_pk; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: materials mate_pk; Type: CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY materials +ALTER TABLE ONLY public.materials ADD CONSTRAINT mate_pk PRIMARY KEY (id); -- --- Name: maty_bk_uk; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: material_types maty_bk_uk; Type: CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY material_types +ALTER TABLE ONLY public.material_types ADD CONSTRAINT maty_bk_uk UNIQUE (code); -- --- Name: maty_pk; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: material_types maty_pk; Type: CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY material_types +ALTER TABLE ONLY public.material_types ADD CONSTRAINT maty_pk PRIMARY KEY (id); -- --- Name: metaproject_assignments_all_mepr_id_data_id_uk; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: metaproject_assignments_all metaproject_assignments_all_mepr_id_data_id_uk; Type: CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY metaproject_assignments_all +ALTER TABLE ONLY public.metaproject_assignments_all ADD CONSTRAINT metaproject_assignments_all_mepr_id_data_id_uk UNIQUE (mepr_id, data_id); -- --- Name: metaproject_assignments_all_mepr_id_expe_id_uk; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: metaproject_assignments_all metaproject_assignments_all_mepr_id_expe_id_uk; Type: CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY metaproject_assignments_all +ALTER TABLE ONLY public.metaproject_assignments_all ADD CONSTRAINT metaproject_assignments_all_mepr_id_expe_id_uk UNIQUE (mepr_id, expe_id); -- --- Name: metaproject_assignments_all_mepr_id_mate_id_uk; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: metaproject_assignments_all metaproject_assignments_all_mepr_id_mate_id_uk; Type: CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY metaproject_assignments_all +ALTER TABLE ONLY public.metaproject_assignments_all ADD CONSTRAINT metaproject_assignments_all_mepr_id_mate_id_uk UNIQUE (mepr_id, mate_id); -- --- Name: metaproject_assignments_all_mepr_id_samp_id_uk; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: metaproject_assignments_all metaproject_assignments_all_mepr_id_samp_id_uk; Type: CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY metaproject_assignments_all +ALTER TABLE ONLY public.metaproject_assignments_all ADD CONSTRAINT metaproject_assignments_all_mepr_id_samp_id_uk UNIQUE (mepr_id, samp_id); -- --- Name: metaproject_assignments_all_pk; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: metaproject_assignments_all metaproject_assignments_all_pk; Type: CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY metaproject_assignments_all +ALTER TABLE ONLY public.metaproject_assignments_all ADD CONSTRAINT metaproject_assignments_all_pk PRIMARY KEY (id); -- --- Name: metaprojects_pk; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: metaprojects metaprojects_pk; Type: CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY metaprojects +ALTER TABLE ONLY public.metaprojects ADD CONSTRAINT metaprojects_pk PRIMARY KEY (id); -- --- Name: mtpt_bk_uk; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: material_type_property_types mtpt_bk_uk; Type: CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY material_type_property_types +ALTER TABLE ONLY public.material_type_property_types ADD CONSTRAINT mtpt_bk_uk UNIQUE (maty_id, prty_id); -- --- Name: mtpt_pk; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: material_type_property_types mtpt_pk; Type: CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY material_type_property_types +ALTER TABLE ONLY public.material_type_property_types ADD CONSTRAINT mtpt_pk PRIMARY KEY (id); -- --- Name: operation_executions_code_uk; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: operation_executions operation_executions_code_uk; Type: CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY operation_executions +ALTER TABLE ONLY public.operation_executions ADD CONSTRAINT operation_executions_code_uk UNIQUE (code); -- --- Name: operation_executions_pk; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: operation_executions operation_executions_pk; Type: CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY operation_executions +ALTER TABLE ONLY public.operation_executions ADD CONSTRAINT operation_executions_pk PRIMARY KEY (id); -- --- Name: pers_bk_uk; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: persons pers_bk_uk; Type: CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY persons +ALTER TABLE ONLY public.persons ADD CONSTRAINT pers_bk_uk UNIQUE (user_id); -- --- Name: pers_pk; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: persons pers_pk; Type: CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY persons +ALTER TABLE ONLY public.persons ADD CONSTRAINT pers_pk PRIMARY KEY (id); -- --- Name: prdq_pk; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: post_registration_dataset_queue prdq_pk; Type: CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY post_registration_dataset_queue +ALTER TABLE ONLY public.post_registration_dataset_queue ADD CONSTRAINT prdq_pk PRIMARY KEY (id); -- --- Name: proj_bk_uk; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: projects proj_bk_uk; Type: CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY projects +ALTER TABLE ONLY public.projects ADD CONSTRAINT proj_bk_uk UNIQUE (code, space_id); -- --- Name: proj_pi_uk; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: projects proj_pi_uk; Type: CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY projects +ALTER TABLE ONLY public.projects ADD CONSTRAINT proj_pi_uk UNIQUE (perm_id); -- --- Name: proj_pk; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: projects proj_pk; Type: CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY projects +ALTER TABLE ONLY public.projects ADD CONSTRAINT proj_pk PRIMARY KEY (id); -- --- Name: prrelh_pk; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: project_relationships_history prrelh_pk; Type: CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY project_relationships_history +ALTER TABLE ONLY public.project_relationships_history ADD CONSTRAINT prrelh_pk PRIMARY KEY (id); -- --- Name: prty_bk_uk; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: property_types prty_bk_uk; Type: CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY property_types +ALTER TABLE ONLY public.property_types ADD CONSTRAINT prty_bk_uk UNIQUE (code, is_internal_namespace); -- --- Name: prty_pk; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: property_types prty_pk; Type: CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY property_types +ALTER TABLE ONLY public.property_types ADD CONSTRAINT prty_pk PRIMARY KEY (id); -- --- Name: quer_bk_uk; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: queries quer_bk_uk; Type: CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY queries +ALTER TABLE ONLY public.queries ADD CONSTRAINT quer_bk_uk UNIQUE (name); -- --- Name: quer_pk; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: queries quer_pk; Type: CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY queries +ALTER TABLE ONLY public.queries ADD CONSTRAINT quer_pk PRIMARY KEY (id); -- --- Name: rety_pk; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: relationship_types rety_pk; Type: CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY relationship_types +ALTER TABLE ONLY public.relationship_types ADD CONSTRAINT rety_pk PRIMARY KEY (id); -- --- Name: rety_uk; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: relationship_types rety_uk; Type: CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY relationship_types +ALTER TABLE ONLY public.relationship_types ADD CONSTRAINT rety_uk UNIQUE (code); -- --- Name: roas_pk; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: role_assignments roas_pk; Type: CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY role_assignments +ALTER TABLE ONLY public.role_assignments ADD CONSTRAINT roas_pk PRIMARY KEY (id); -- --- Name: samp_code_unique_check_uk; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: samples_all samp_code_unique_check_uk; Type: CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY samples_all +ALTER TABLE ONLY public.samples_all ADD CONSTRAINT samp_code_unique_check_uk UNIQUE (code_unique_check); -- --- Name: samp_pi_uk; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: samples_all samp_pi_uk; Type: CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY samples_all +ALTER TABLE ONLY public.samples_all ADD CONSTRAINT samp_pi_uk UNIQUE (perm_id); -- --- Name: samp_pk; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: samples_all samp_pk; Type: CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY samples_all +ALTER TABLE ONLY public.samples_all ADD CONSTRAINT samp_pk PRIMARY KEY (id); -- --- Name: samp_subcode_unique_check_uk; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: samples_all samp_subcode_unique_check_uk; Type: CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY samples_all +ALTER TABLE ONLY public.samples_all ADD CONSTRAINT samp_subcode_unique_check_uk UNIQUE (subcode_unique_check); -- --- Name: samprelh_pk; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: sample_relationships_history samprelh_pk; Type: CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY sample_relationships_history +ALTER TABLE ONLY public.sample_relationships_history ADD CONSTRAINT samprelh_pk PRIMARY KEY (id); -- --- Name: sapr_bk_uk; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: sample_properties sapr_bk_uk; Type: CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY sample_properties +ALTER TABLE ONLY public.sample_properties ADD CONSTRAINT sapr_bk_uk UNIQUE (samp_id, stpt_id); -- --- Name: sapr_pk; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: sample_properties sapr_pk; Type: CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY sample_properties +ALTER TABLE ONLY public.sample_properties ADD CONSTRAINT sapr_pk PRIMARY KEY (id); -- --- Name: saprh_pk; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: sample_properties_history saprh_pk; Type: CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY sample_properties_history +ALTER TABLE ONLY public.sample_properties_history ADD CONSTRAINT saprh_pk PRIMARY KEY (id); -- --- Name: sare_bk_uk; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: sample_relationships_all sare_bk_uk; Type: CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY sample_relationships_all +ALTER TABLE ONLY public.sample_relationships_all ADD CONSTRAINT sare_bk_uk UNIQUE (sample_id_child, sample_id_parent, relationship_id); -- --- Name: sare_pk; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: sample_relationships_all sare_pk; Type: CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY sample_relationships_all +ALTER TABLE ONLY public.sample_relationships_all ADD CONSTRAINT sare_pk PRIMARY KEY (id); -- --- Name: saty_bk_uk; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: sample_types saty_bk_uk; Type: CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY sample_types +ALTER TABLE ONLY public.sample_types ADD CONSTRAINT saty_bk_uk UNIQUE (code); -- --- Name: saty_pk; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: sample_types saty_pk; Type: CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY sample_types +ALTER TABLE ONLY public.sample_types ADD CONSTRAINT saty_pk PRIMARY KEY (id); -- --- Name: scri_pk; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: scripts scri_pk; Type: CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY scripts +ALTER TABLE ONLY public.scripts ADD CONSTRAINT scri_pk PRIMARY KEY (id); -- --- Name: scri_uk; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: scripts scri_uk; Type: CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY scripts +ALTER TABLE ONLY public.scripts ADD CONSTRAINT scri_uk UNIQUE (name); -- --- Name: semantic_annotations_pk; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: semantic_annotations semantic_annotations_perm_id_uk; Type: CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY semantic_annotations +ALTER TABLE ONLY public.semantic_annotations + ADD CONSTRAINT semantic_annotations_perm_id_uk UNIQUE (perm_id); + + +-- +-- Name: semantic_annotations semantic_annotations_pk; Type: CONSTRAINT; Schema: public; Owner: - +-- + +ALTER TABLE ONLY public.semantic_annotations ADD CONSTRAINT semantic_annotations_pk PRIMARY KEY (id); -- --- Name: space_bk_uk; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: spaces space_bk_uk; Type: CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY spaces +ALTER TABLE ONLY public.spaces ADD CONSTRAINT space_bk_uk UNIQUE (code); -- --- Name: space_pk; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: spaces space_pk; Type: CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY spaces +ALTER TABLE ONLY public.spaces ADD CONSTRAINT space_pk PRIMARY KEY (id); -- --- Name: stpt_bk_uk; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: sample_type_property_types stpt_bk_uk; Type: CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY sample_type_property_types +ALTER TABLE ONLY public.sample_type_property_types ADD CONSTRAINT stpt_bk_uk UNIQUE (saty_id, prty_id); -- --- Name: stpt_pk; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: sample_type_property_types stpt_pk; Type: CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY sample_type_property_types +ALTER TABLE ONLY public.sample_type_property_types ADD CONSTRAINT stpt_pk PRIMARY KEY (id); @@ -8452,4540 +8536,4180 @@ ALTER TABLE ONLY sample_type_property_types -- Name: atta_exac_fk_i; Type: INDEX; Schema: public; Owner: - -- -CREATE INDEX atta_exac_fk_i ON attachments USING btree (exac_id); +CREATE INDEX atta_exac_fk_i ON public.attachments USING btree (exac_id); -- -- Name: atta_expe_fk_i; Type: INDEX; Schema: public; Owner: - -- -CREATE INDEX atta_expe_fk_i ON attachments USING btree (expe_id); +CREATE INDEX atta_expe_fk_i ON public.attachments USING btree (expe_id); -- -- Name: atta_pers_fk_i; Type: INDEX; Schema: public; Owner: - -- -CREATE INDEX atta_pers_fk_i ON attachments USING btree (pers_id_registerer); +CREATE INDEX atta_pers_fk_i ON public.attachments USING btree (pers_id_registerer); -- -- Name: atta_proj_fk_i; Type: INDEX; Schema: public; Owner: - -- -CREATE INDEX atta_proj_fk_i ON attachments USING btree (proj_id); +CREATE INDEX atta_proj_fk_i ON public.attachments USING btree (proj_id); -- -- Name: atta_samp_fk_i; Type: INDEX; Schema: public; Owner: - -- -CREATE INDEX atta_samp_fk_i ON attachments USING btree (samp_id); +CREATE INDEX atta_samp_fk_i ON public.attachments USING btree (samp_id); -- -- Name: covo_pers_fk_i; Type: INDEX; Schema: public; Owner: - -- -CREATE INDEX covo_pers_fk_i ON controlled_vocabularies USING btree (pers_id_registerer); +CREATE INDEX covo_pers_fk_i ON public.controlled_vocabularies USING btree (pers_id_registerer); -- -- Name: cvte_covo_fk_i; Type: INDEX; Schema: public; Owner: - -- -CREATE INDEX cvte_covo_fk_i ON controlled_vocabulary_terms USING btree (covo_id); +CREATE INDEX cvte_covo_fk_i ON public.controlled_vocabulary_terms USING btree (covo_id); -- -- Name: cvte_pers_fk_i; Type: INDEX; Schema: public; Owner: - -- -CREATE INDEX cvte_pers_fk_i ON controlled_vocabulary_terms USING btree (pers_id_registerer); +CREATE INDEX cvte_pers_fk_i ON public.controlled_vocabulary_terms USING btree (pers_id_registerer); -- -- Name: data_acct_i; Type: INDEX; Schema: public; Owner: - -- -CREATE INDEX data_acct_i ON data_all USING btree (access_timestamp); +CREATE INDEX data_acct_i ON public.data_all USING btree (access_timestamp); -- -- Name: data_del_fk_i; Type: INDEX; Schema: public; Owner: - -- -CREATE INDEX data_del_fk_i ON data_all USING btree (del_id); +CREATE INDEX data_del_fk_i ON public.data_all USING btree (del_id); -- -- Name: data_dsty_fk_i; Type: INDEX; Schema: public; Owner: - -- -CREATE INDEX data_dsty_fk_i ON data_all USING btree (dsty_id); +CREATE INDEX data_dsty_fk_i ON public.data_all USING btree (dsty_id); -- -- Name: data_expe_fk_i; Type: INDEX; Schema: public; Owner: - -- -CREATE INDEX data_expe_fk_i ON data_all USING btree (expe_id); +CREATE INDEX data_expe_fk_i ON public.data_all USING btree (expe_id); -- -- Name: data_samp_fk_i; Type: INDEX; Schema: public; Owner: - -- -CREATE INDEX data_samp_fk_i ON data_all USING btree (samp_id); +CREATE INDEX data_samp_fk_i ON public.data_all USING btree (samp_id); -- -- Name: datarelh_data_fk_i; Type: INDEX; Schema: public; Owner: - -- -CREATE INDEX datarelh_data_fk_i ON data_set_relationships_history USING btree (data_id); +CREATE INDEX datarelh_data_fk_i ON public.data_set_relationships_history USING btree (data_id); -- -- Name: datarelh_main_data_fk_data_fk_i; Type: INDEX; Schema: public; Owner: - -- -CREATE INDEX datarelh_main_data_fk_data_fk_i ON data_set_relationships_history USING btree (main_data_id, data_id); +CREATE INDEX datarelh_main_data_fk_data_fk_i ON public.data_set_relationships_history USING btree (main_data_id, data_id); -- -- Name: datarelh_main_data_fk_expe_fk_i; Type: INDEX; Schema: public; Owner: - -- -CREATE INDEX datarelh_main_data_fk_expe_fk_i ON data_set_relationships_history USING btree (main_data_id, expe_id); +CREATE INDEX datarelh_main_data_fk_expe_fk_i ON public.data_set_relationships_history USING btree (main_data_id, expe_id); -- -- Name: datarelh_main_data_fk_i; Type: INDEX; Schema: public; Owner: - -- -CREATE INDEX datarelh_main_data_fk_i ON data_set_relationships_history USING btree (main_data_id); +CREATE INDEX datarelh_main_data_fk_i ON public.data_set_relationships_history USING btree (main_data_id); -- -- Name: datarelh_main_data_fk_samp_fk_i; Type: INDEX; Schema: public; Owner: - -- -CREATE INDEX datarelh_main_data_fk_samp_fk_i ON data_set_relationships_history USING btree (main_data_id, samp_id); +CREATE INDEX datarelh_main_data_fk_samp_fk_i ON public.data_set_relationships_history USING btree (main_data_id, samp_id); -- -- Name: del_pers_fk_i; Type: INDEX; Schema: public; Owner: - -- -CREATE INDEX del_pers_fk_i ON deletions USING btree (pers_id_registerer); +CREATE INDEX del_pers_fk_i ON public.deletions USING btree (pers_id_registerer); -- -- Name: dspr_cvte_fk_i; Type: INDEX; Schema: public; Owner: - -- -CREATE INDEX dspr_cvte_fk_i ON data_set_properties USING btree (cvte_id); +CREATE INDEX dspr_cvte_fk_i ON public.data_set_properties USING btree (cvte_id); -- -- Name: dspr_ds_fk_i; Type: INDEX; Schema: public; Owner: - -- -CREATE INDEX dspr_ds_fk_i ON data_set_properties USING btree (ds_id); +CREATE INDEX dspr_ds_fk_i ON public.data_set_properties USING btree (ds_id); -- -- Name: dspr_dstpt_fk_i; Type: INDEX; Schema: public; Owner: - -- -CREATE INDEX dspr_dstpt_fk_i ON data_set_properties USING btree (dstpt_id); +CREATE INDEX dspr_dstpt_fk_i ON public.data_set_properties USING btree (dstpt_id); -- -- Name: dspr_mapr_fk_i; Type: INDEX; Schema: public; Owner: - -- -CREATE INDEX dspr_mapr_fk_i ON data_set_properties USING btree (mate_prop_id); +CREATE INDEX dspr_mapr_fk_i ON public.data_set_properties USING btree (mate_prop_id); -- -- Name: dspr_pers_fk_i; Type: INDEX; Schema: public; Owner: - -- -CREATE INDEX dspr_pers_fk_i ON data_set_properties USING btree (pers_id_registerer); +CREATE INDEX dspr_pers_fk_i ON public.data_set_properties USING btree (pers_id_registerer); -- -- Name: dsprh_etpt_fk_i; Type: INDEX; Schema: public; Owner: - -- -CREATE INDEX dsprh_etpt_fk_i ON data_set_properties_history USING btree (dstpt_id); +CREATE INDEX dsprh_etpt_fk_i ON public.data_set_properties_history USING btree (dstpt_id); -- -- Name: dsprh_expe_fk_i; Type: INDEX; Schema: public; Owner: - -- -CREATE INDEX dsprh_expe_fk_i ON data_set_properties_history USING btree (ds_id); +CREATE INDEX dsprh_expe_fk_i ON public.data_set_properties_history USING btree (ds_id); -- -- Name: dsprh_vuts_fk_i; Type: INDEX; Schema: public; Owner: - -- -CREATE INDEX dsprh_vuts_fk_i ON data_set_properties_history USING btree (valid_until_timestamp); +CREATE INDEX dsprh_vuts_fk_i ON public.data_set_properties_history USING btree (valid_until_timestamp); -- -- Name: dsre_data_fk_i_child; Type: INDEX; Schema: public; Owner: - -- -CREATE INDEX dsre_data_fk_i_child ON data_set_relationships_all USING btree (data_id_child); +CREATE INDEX dsre_data_fk_i_child ON public.data_set_relationships_all USING btree (data_id_child); -- -- Name: dsre_data_fk_i_parent; Type: INDEX; Schema: public; Owner: - -- -CREATE INDEX dsre_data_fk_i_parent ON data_set_relationships_all USING btree (data_id_parent); +CREATE INDEX dsre_data_fk_i_parent ON public.data_set_relationships_all USING btree (data_id_parent); -- -- Name: dsre_del_fk_i; Type: INDEX; Schema: public; Owner: - -- -CREATE INDEX dsre_del_fk_i ON data_set_relationships_all USING btree (del_id); +CREATE INDEX dsre_del_fk_i ON public.data_set_relationships_all USING btree (del_id); -- -- Name: dssdst_ds_fk_i; Type: INDEX; Schema: public; Owner: - -- -CREATE INDEX dssdst_ds_fk_i ON data_store_service_data_set_types USING btree (data_store_service_id); +CREATE INDEX dssdst_ds_fk_i ON public.data_store_service_data_set_types USING btree (data_store_service_id); -- -- Name: dssdst_dst_fk_i; Type: INDEX; Schema: public; Owner: - -- -CREATE INDEX dssdst_dst_fk_i ON data_store_service_data_set_types USING btree (data_set_type_id); +CREATE INDEX dssdst_dst_fk_i ON public.data_store_service_data_set_types USING btree (data_set_type_id); -- -- Name: dsse_ds_fk_i; Type: INDEX; Schema: public; Owner: - -- -CREATE INDEX dsse_ds_fk_i ON data_store_services USING btree (data_store_id); +CREATE INDEX dsse_ds_fk_i ON public.data_store_services USING btree (data_store_id); -- -- Name: dstpt_dsty_fk_i; Type: INDEX; Schema: public; Owner: - -- -CREATE INDEX dstpt_dsty_fk_i ON data_set_type_property_types USING btree (dsty_id); +CREATE INDEX dstpt_dsty_fk_i ON public.data_set_type_property_types USING btree (dsty_id); -- -- Name: dstpt_pers_fk_i; Type: INDEX; Schema: public; Owner: - -- -CREATE INDEX dstpt_pers_fk_i ON data_set_type_property_types USING btree (pers_id_registerer); +CREATE INDEX dstpt_pers_fk_i ON public.data_set_type_property_types USING btree (pers_id_registerer); -- -- Name: dstpt_prty_fk_i; Type: INDEX; Schema: public; Owner: - -- -CREATE INDEX dstpt_prty_fk_i ON data_set_type_property_types USING btree (prty_id); +CREATE INDEX dstpt_prty_fk_i ON public.data_set_type_property_types USING btree (prty_id); -- -- Name: entity_operations_log_rid_i; Type: INDEX; Schema: public; Owner: - -- -CREATE INDEX entity_operations_log_rid_i ON entity_operations_log USING btree (registration_id); +CREATE INDEX entity_operations_log_rid_i ON public.entity_operations_log USING btree (registration_id); -- -- Name: etpt_exty_fk_i; Type: INDEX; Schema: public; Owner: - -- -CREATE INDEX etpt_exty_fk_i ON experiment_type_property_types USING btree (exty_id); +CREATE INDEX etpt_exty_fk_i ON public.experiment_type_property_types USING btree (exty_id); -- -- Name: etpt_pers_fk_i; Type: INDEX; Schema: public; Owner: - -- -CREATE INDEX etpt_pers_fk_i ON experiment_type_property_types USING btree (pers_id_registerer); +CREATE INDEX etpt_pers_fk_i ON public.experiment_type_property_types USING btree (pers_id_registerer); -- -- Name: etpt_prty_fk_i; Type: INDEX; Schema: public; Owner: - -- -CREATE INDEX etpt_prty_fk_i ON experiment_type_property_types USING btree (prty_id); +CREATE INDEX etpt_prty_fk_i ON public.experiment_type_property_types USING btree (prty_id); -- -- Name: evnt_exac_fk_i; Type: INDEX; Schema: public; Owner: - -- -CREATE INDEX evnt_exac_fk_i ON events USING btree (exac_id); +CREATE INDEX evnt_exac_fk_i ON public.events USING btree (exac_id); -- -- Name: evnt_pers_fk_i; Type: INDEX; Schema: public; Owner: - -- -CREATE INDEX evnt_pers_fk_i ON events USING btree (pers_id_registerer); +CREATE INDEX evnt_pers_fk_i ON public.events USING btree (pers_id_registerer); -- -- Name: exda_cvte_fk_i; Type: INDEX; Schema: public; Owner: - -- -CREATE INDEX exda_cvte_fk_i ON external_data USING btree (cvte_id_stor_fmt); +CREATE INDEX exda_cvte_fk_i ON public.external_data USING btree (cvte_id_stor_fmt); -- -- Name: exda_cvte_stored_on_fk_i; Type: INDEX; Schema: public; Owner: - -- -CREATE INDEX exda_cvte_stored_on_fk_i ON external_data USING btree (cvte_id_store); +CREATE INDEX exda_cvte_stored_on_fk_i ON public.external_data USING btree (cvte_id_store); -- -- Name: exda_ffty_fk_i; Type: INDEX; Schema: public; Owner: - -- -CREATE INDEX exda_ffty_fk_i ON external_data USING btree (ffty_id); +CREATE INDEX exda_ffty_fk_i ON public.external_data USING btree (ffty_id); -- -- Name: exda_loty_fk_i; Type: INDEX; Schema: public; Owner: - -- -CREATE INDEX exda_loty_fk_i ON external_data USING btree (loty_id); +CREATE INDEX exda_loty_fk_i ON public.external_data USING btree (loty_id); -- -- Name: expe_del_fk_i; Type: INDEX; Schema: public; Owner: - -- -CREATE INDEX expe_del_fk_i ON experiments_all USING btree (del_id); +CREATE INDEX expe_del_fk_i ON public.experiments_all USING btree (del_id); -- -- Name: expe_exty_fk_i; Type: INDEX; Schema: public; Owner: - -- -CREATE INDEX expe_exty_fk_i ON experiments_all USING btree (exty_id); +CREATE INDEX expe_exty_fk_i ON public.experiments_all USING btree (exty_id); -- -- Name: expe_pers_fk_i; Type: INDEX; Schema: public; Owner: - -- -CREATE INDEX expe_pers_fk_i ON experiments_all USING btree (pers_id_registerer); +CREATE INDEX expe_pers_fk_i ON public.experiments_all USING btree (pers_id_registerer); -- -- Name: expe_proj_fk_i; Type: INDEX; Schema: public; Owner: - -- -CREATE INDEX expe_proj_fk_i ON experiments_all USING btree (proj_id); +CREATE INDEX expe_proj_fk_i ON public.experiments_all USING btree (proj_id); -- -- Name: expr_cvte_fk_i; Type: INDEX; Schema: public; Owner: - -- -CREATE INDEX expr_cvte_fk_i ON experiment_properties USING btree (cvte_id); +CREATE INDEX expr_cvte_fk_i ON public.experiment_properties USING btree (cvte_id); -- -- Name: expr_etpt_fk_i; Type: INDEX; Schema: public; Owner: - -- -CREATE INDEX expr_etpt_fk_i ON experiment_properties USING btree (etpt_id); +CREATE INDEX expr_etpt_fk_i ON public.experiment_properties USING btree (etpt_id); -- -- Name: expr_expe_fk_i; Type: INDEX; Schema: public; Owner: - -- -CREATE INDEX expr_expe_fk_i ON experiment_properties USING btree (expe_id); +CREATE INDEX expr_expe_fk_i ON public.experiment_properties USING btree (expe_id); -- -- Name: expr_mapr_fk_i; Type: INDEX; Schema: public; Owner: - -- -CREATE INDEX expr_mapr_fk_i ON experiment_properties USING btree (mate_prop_id); +CREATE INDEX expr_mapr_fk_i ON public.experiment_properties USING btree (mate_prop_id); -- -- Name: expr_pers_fk_i; Type: INDEX; Schema: public; Owner: - -- -CREATE INDEX expr_pers_fk_i ON experiment_properties USING btree (pers_id_registerer); +CREATE INDEX expr_pers_fk_i ON public.experiment_properties USING btree (pers_id_registerer); -- -- Name: exprh_etpt_fk_i; Type: INDEX; Schema: public; Owner: - -- -CREATE INDEX exprh_etpt_fk_i ON experiment_properties_history USING btree (etpt_id); +CREATE INDEX exprh_etpt_fk_i ON public.experiment_properties_history USING btree (etpt_id); -- -- Name: exprh_expe_fk_i; Type: INDEX; Schema: public; Owner: - -- -CREATE INDEX exprh_expe_fk_i ON experiment_properties_history USING btree (expe_id); +CREATE INDEX exprh_expe_fk_i ON public.experiment_properties_history USING btree (expe_id); -- -- Name: exprh_vuts_fk_i; Type: INDEX; Schema: public; Owner: - -- -CREATE INDEX exprh_vuts_fk_i ON experiment_properties_history USING btree (valid_until_timestamp); +CREATE INDEX exprh_vuts_fk_i ON public.experiment_properties_history USING btree (valid_until_timestamp); -- -- Name: exrelh_data_id_fk_i; Type: INDEX; Schema: public; Owner: - -- -CREATE INDEX exrelh_data_id_fk_i ON experiment_relationships_history USING btree (data_id); +CREATE INDEX exrelh_data_id_fk_i ON public.experiment_relationships_history USING btree (data_id); -- -- Name: exrelh_main_expe_fk_data_fk_i; Type: INDEX; Schema: public; Owner: - -- -CREATE INDEX exrelh_main_expe_fk_data_fk_i ON experiment_relationships_history USING btree (main_expe_id, data_id); +CREATE INDEX exrelh_main_expe_fk_data_fk_i ON public.experiment_relationships_history USING btree (main_expe_id, data_id); -- -- Name: exrelh_main_expe_fk_i; Type: INDEX; Schema: public; Owner: - -- -CREATE INDEX exrelh_main_expe_fk_i ON experiment_relationships_history USING btree (main_expe_id); +CREATE INDEX exrelh_main_expe_fk_i ON public.experiment_relationships_history USING btree (main_expe_id); -- -- Name: exrelh_main_expe_fk_proj_fk_i; Type: INDEX; Schema: public; Owner: - -- -CREATE INDEX exrelh_main_expe_fk_proj_fk_i ON experiment_relationships_history USING btree (main_expe_id, proj_id); +CREATE INDEX exrelh_main_expe_fk_proj_fk_i ON public.experiment_relationships_history USING btree (main_expe_id, proj_id); -- -- Name: exrelh_main_expe_fk_samp_fk_i; Type: INDEX; Schema: public; Owner: - -- -CREATE INDEX exrelh_main_expe_fk_samp_fk_i ON experiment_relationships_history USING btree (main_expe_id, samp_id); +CREATE INDEX exrelh_main_expe_fk_samp_fk_i ON public.experiment_relationships_history USING btree (main_expe_id, samp_id); -- -- Name: exrelh_samp_id_fk_i; Type: INDEX; Schema: public; Owner: - -- -CREATE INDEX exrelh_samp_id_fk_i ON experiment_relationships_history USING btree (samp_id); +CREATE INDEX exrelh_samp_id_fk_i ON public.experiment_relationships_history USING btree (samp_id); -- -- Name: filt_pers_fk_i; Type: INDEX; Schema: public; Owner: - -- -CREATE INDEX filt_pers_fk_i ON filters USING btree (pers_id_registerer); +CREATE INDEX filt_pers_fk_i ON public.filters USING btree (pers_id_registerer); -- -- Name: grid_custom_columns_pers_fk_i; Type: INDEX; Schema: public; Owner: - -- -CREATE INDEX grid_custom_columns_pers_fk_i ON grid_custom_columns USING btree (pers_id_registerer); +CREATE INDEX grid_custom_columns_pers_fk_i ON public.grid_custom_columns USING btree (pers_id_registerer); -- -- Name: mapr_cvte_fk_i; Type: INDEX; Schema: public; Owner: - -- -CREATE INDEX mapr_cvte_fk_i ON material_properties USING btree (cvte_id); +CREATE INDEX mapr_cvte_fk_i ON public.material_properties USING btree (cvte_id); -- -- Name: mapr_mapr_fk_i; Type: INDEX; Schema: public; Owner: - -- -CREATE INDEX mapr_mapr_fk_i ON material_properties USING btree (mate_prop_id); +CREATE INDEX mapr_mapr_fk_i ON public.material_properties USING btree (mate_prop_id); -- -- Name: mapr_mate_fk_i; Type: INDEX; Schema: public; Owner: - -- -CREATE INDEX mapr_mate_fk_i ON material_properties USING btree (mate_id); +CREATE INDEX mapr_mate_fk_i ON public.material_properties USING btree (mate_id); -- -- Name: mapr_mtpt_fk_i; Type: INDEX; Schema: public; Owner: - -- -CREATE INDEX mapr_mtpt_fk_i ON material_properties USING btree (mtpt_id); +CREATE INDEX mapr_mtpt_fk_i ON public.material_properties USING btree (mtpt_id); -- -- Name: mapr_pers_fk_i; Type: INDEX; Schema: public; Owner: - -- -CREATE INDEX mapr_pers_fk_i ON material_properties USING btree (pers_id_registerer); +CREATE INDEX mapr_pers_fk_i ON public.material_properties USING btree (pers_id_registerer); -- -- Name: maprh_etpt_fk_i; Type: INDEX; Schema: public; Owner: - -- -CREATE INDEX maprh_etpt_fk_i ON material_properties_history USING btree (mtpt_id); +CREATE INDEX maprh_etpt_fk_i ON public.material_properties_history USING btree (mtpt_id); -- -- Name: maprh_expe_fk_i; Type: INDEX; Schema: public; Owner: - -- -CREATE INDEX maprh_expe_fk_i ON material_properties_history USING btree (mate_id); +CREATE INDEX maprh_expe_fk_i ON public.material_properties_history USING btree (mate_id); -- -- Name: maprh_vuts_fk_i; Type: INDEX; Schema: public; Owner: - -- -CREATE INDEX maprh_vuts_fk_i ON material_properties_history USING btree (valid_until_timestamp); +CREATE INDEX maprh_vuts_fk_i ON public.material_properties_history USING btree (valid_until_timestamp); -- -- Name: mate_maty_fk_i; Type: INDEX; Schema: public; Owner: - -- -CREATE INDEX mate_maty_fk_i ON materials USING btree (maty_id); +CREATE INDEX mate_maty_fk_i ON public.materials USING btree (maty_id); -- -- Name: mate_pers_fk_i; Type: INDEX; Schema: public; Owner: - -- -CREATE INDEX mate_pers_fk_i ON materials USING btree (pers_id_registerer); +CREATE INDEX mate_pers_fk_i ON public.materials USING btree (pers_id_registerer); -- -- Name: metaproject_assignments_all_data_fk_i; Type: INDEX; Schema: public; Owner: - -- -CREATE INDEX metaproject_assignments_all_data_fk_i ON metaproject_assignments_all USING btree (data_id); +CREATE INDEX metaproject_assignments_all_data_fk_i ON public.metaproject_assignments_all USING btree (data_id); -- -- Name: metaproject_assignments_all_del_fk_i; Type: INDEX; Schema: public; Owner: - -- -CREATE INDEX metaproject_assignments_all_del_fk_i ON metaproject_assignments_all USING btree (del_id); +CREATE INDEX metaproject_assignments_all_del_fk_i ON public.metaproject_assignments_all USING btree (del_id); -- -- Name: metaproject_assignments_all_expe_fk_i; Type: INDEX; Schema: public; Owner: - -- -CREATE INDEX metaproject_assignments_all_expe_fk_i ON metaproject_assignments_all USING btree (expe_id); +CREATE INDEX metaproject_assignments_all_expe_fk_i ON public.metaproject_assignments_all USING btree (expe_id); -- -- Name: metaproject_assignments_all_mate_fk_i; Type: INDEX; Schema: public; Owner: - -- -CREATE INDEX metaproject_assignments_all_mate_fk_i ON metaproject_assignments_all USING btree (mate_id); +CREATE INDEX metaproject_assignments_all_mate_fk_i ON public.metaproject_assignments_all USING btree (mate_id); -- -- Name: metaproject_assignments_all_mepr_fk_i; Type: INDEX; Schema: public; Owner: - -- -CREATE INDEX metaproject_assignments_all_mepr_fk_i ON metaproject_assignments_all USING btree (mepr_id); +CREATE INDEX metaproject_assignments_all_mepr_fk_i ON public.metaproject_assignments_all USING btree (mepr_id); -- -- Name: metaproject_assignments_all_samp_fk_i; Type: INDEX; Schema: public; Owner: - -- -CREATE INDEX metaproject_assignments_all_samp_fk_i ON metaproject_assignments_all USING btree (samp_id); +CREATE INDEX metaproject_assignments_all_samp_fk_i ON public.metaproject_assignments_all USING btree (samp_id); -- -- Name: metaprojects_name_i; Type: INDEX; Schema: public; Owner: - -- -CREATE INDEX metaprojects_name_i ON metaprojects USING btree (name); +CREATE INDEX metaprojects_name_i ON public.metaprojects USING btree (name); -- -- Name: metaprojects_name_owner_uk; Type: INDEX; Schema: public; Owner: - -- -CREATE UNIQUE INDEX metaprojects_name_owner_uk ON metaprojects USING btree (lower((name)::text), owner); +CREATE UNIQUE INDEX metaprojects_name_owner_uk ON public.metaprojects USING btree (lower((name)::text), owner); -- -- Name: metaprojects_owner_fk_i; Type: INDEX; Schema: public; Owner: - -- -CREATE INDEX metaprojects_owner_fk_i ON metaprojects USING btree (owner); +CREATE INDEX metaprojects_owner_fk_i ON public.metaprojects USING btree (owner); -- -- Name: mtpt_maty_fk_i; Type: INDEX; Schema: public; Owner: - -- -CREATE INDEX mtpt_maty_fk_i ON material_type_property_types USING btree (maty_id); +CREATE INDEX mtpt_maty_fk_i ON public.material_type_property_types USING btree (maty_id); -- -- Name: mtpt_pers_fk_i; Type: INDEX; Schema: public; Owner: - -- -CREATE INDEX mtpt_pers_fk_i ON material_type_property_types USING btree (pers_id_registerer); +CREATE INDEX mtpt_pers_fk_i ON public.material_type_property_types USING btree (pers_id_registerer); -- -- Name: mtpt_prty_fk_i; Type: INDEX; Schema: public; Owner: - -- -CREATE INDEX mtpt_prty_fk_i ON material_type_property_types USING btree (prty_id); +CREATE INDEX mtpt_prty_fk_i ON public.material_type_property_types USING btree (prty_id); -- -- Name: operation_executions_availability_i; Type: INDEX; Schema: public; Owner: - -- -CREATE INDEX operation_executions_availability_i ON operation_executions USING btree (availability); +CREATE INDEX operation_executions_availability_i ON public.operation_executions USING btree (availability); -- -- Name: operation_executions_code_i; Type: INDEX; Schema: public; Owner: - -- -CREATE INDEX operation_executions_code_i ON operation_executions USING btree (code); +CREATE INDEX operation_executions_code_i ON public.operation_executions USING btree (code); -- -- Name: operation_executions_details_availability_i; Type: INDEX; Schema: public; Owner: - -- -CREATE INDEX operation_executions_details_availability_i ON operation_executions USING btree (details_availability); +CREATE INDEX operation_executions_details_availability_i ON public.operation_executions USING btree (details_availability); -- -- Name: operation_executions_owner_i; Type: INDEX; Schema: public; Owner: - -- -CREATE INDEX operation_executions_owner_i ON operation_executions USING btree (owner); +CREATE INDEX operation_executions_owner_i ON public.operation_executions USING btree (owner); -- -- Name: operation_executions_summary_availability_i; Type: INDEX; Schema: public; Owner: - -- -CREATE INDEX operation_executions_summary_availability_i ON operation_executions USING btree (summary_availability); +CREATE INDEX operation_executions_summary_availability_i ON public.operation_executions USING btree (summary_availability); -- -- Name: pers_is_active_i; Type: INDEX; Schema: public; Owner: - -- -CREATE INDEX pers_is_active_i ON persons USING btree (is_active); +CREATE INDEX pers_is_active_i ON public.persons USING btree (is_active); -- -- Name: pers_space_fk_i; Type: INDEX; Schema: public; Owner: - -- -CREATE INDEX pers_space_fk_i ON persons USING btree (space_id); +CREATE INDEX pers_space_fk_i ON public.persons USING btree (space_id); -- -- Name: proj_pers_fk_i_leader; Type: INDEX; Schema: public; Owner: - -- -CREATE INDEX proj_pers_fk_i_leader ON projects USING btree (pers_id_leader); +CREATE INDEX proj_pers_fk_i_leader ON public.projects USING btree (pers_id_leader); -- -- Name: proj_pers_fk_i_registerer; Type: INDEX; Schema: public; Owner: - -- -CREATE INDEX proj_pers_fk_i_registerer ON projects USING btree (pers_id_registerer); +CREATE INDEX proj_pers_fk_i_registerer ON public.projects USING btree (pers_id_registerer); -- -- Name: proj_space_fk_i; Type: INDEX; Schema: public; Owner: - -- -CREATE INDEX proj_space_fk_i ON projects USING btree (space_id); +CREATE INDEX proj_space_fk_i ON public.projects USING btree (space_id); -- -- Name: prrelh_main_proj_fk_expe_fk_i; Type: INDEX; Schema: public; Owner: - -- -CREATE INDEX prrelh_main_proj_fk_expe_fk_i ON project_relationships_history USING btree (main_proj_id, expe_id); +CREATE INDEX prrelh_main_proj_fk_expe_fk_i ON public.project_relationships_history USING btree (main_proj_id, expe_id); -- -- Name: prrelh_main_proj_fk_i; Type: INDEX; Schema: public; Owner: - -- -CREATE INDEX prrelh_main_proj_fk_i ON project_relationships_history USING btree (main_proj_id); +CREATE INDEX prrelh_main_proj_fk_i ON public.project_relationships_history USING btree (main_proj_id); -- -- Name: prrelh_main_proj_fk_space_fk_i; Type: INDEX; Schema: public; Owner: - -- -CREATE INDEX prrelh_main_proj_fk_space_fk_i ON project_relationships_history USING btree (main_proj_id, space_id); +CREATE INDEX prrelh_main_proj_fk_space_fk_i ON public.project_relationships_history USING btree (main_proj_id, space_id); -- -- Name: prty_covo_fk_i; Type: INDEX; Schema: public; Owner: - -- -CREATE INDEX prty_covo_fk_i ON property_types USING btree (covo_id); +CREATE INDEX prty_covo_fk_i ON public.property_types USING btree (covo_id); -- -- Name: prty_daty_fk_i; Type: INDEX; Schema: public; Owner: - -- -CREATE INDEX prty_daty_fk_i ON property_types USING btree (daty_id); +CREATE INDEX prty_daty_fk_i ON public.property_types USING btree (daty_id); -- -- Name: prty_pers_fk_i; Type: INDEX; Schema: public; Owner: - -- -CREATE INDEX prty_pers_fk_i ON property_types USING btree (pers_id_registerer); +CREATE INDEX prty_pers_fk_i ON public.property_types USING btree (pers_id_registerer); -- -- Name: roas_ag_fk_i_grantee; Type: INDEX; Schema: public; Owner: - -- -CREATE INDEX roas_ag_fk_i_grantee ON role_assignments USING btree (ag_id_grantee); +CREATE INDEX roas_ag_fk_i_grantee ON public.role_assignments USING btree (ag_id_grantee); -- -- Name: roas_ag_space_project_bk_uk; Type: INDEX; Schema: public; Owner: - -- -CREATE UNIQUE INDEX roas_ag_space_project_bk_uk ON role_assignments USING btree (ag_id_grantee, role_code, (COALESCE((space_id)::bigint, ('-1'::integer)::bigint)), (COALESCE((project_id)::bigint, ('-1'::integer)::bigint))); +CREATE UNIQUE INDEX roas_ag_space_project_bk_uk ON public.role_assignments USING btree (ag_id_grantee, role_code, (COALESCE((space_id)::bigint, ('-1'::integer)::bigint)), (COALESCE((project_id)::bigint, ('-1'::integer)::bigint))); -- -- Name: roas_pe_space_project_bk_uk; Type: INDEX; Schema: public; Owner: - -- -CREATE UNIQUE INDEX roas_pe_space_project_bk_uk ON role_assignments USING btree (pers_id_grantee, role_code, (COALESCE((space_id)::bigint, ('-1'::integer)::bigint)), (COALESCE((project_id)::bigint, ('-1'::integer)::bigint))); +CREATE UNIQUE INDEX roas_pe_space_project_bk_uk ON public.role_assignments USING btree (pers_id_grantee, role_code, (COALESCE((space_id)::bigint, ('-1'::integer)::bigint)), (COALESCE((project_id)::bigint, ('-1'::integer)::bigint))); -- -- Name: roas_pers_fk_i_grantee; Type: INDEX; Schema: public; Owner: - -- -CREATE INDEX roas_pers_fk_i_grantee ON role_assignments USING btree (pers_id_grantee); +CREATE INDEX roas_pers_fk_i_grantee ON public.role_assignments USING btree (pers_id_grantee); -- -- Name: roas_pers_fk_i_registerer; Type: INDEX; Schema: public; Owner: - -- -CREATE INDEX roas_pers_fk_i_registerer ON role_assignments USING btree (pers_id_registerer); +CREATE INDEX roas_pers_fk_i_registerer ON public.role_assignments USING btree (pers_id_registerer); -- -- Name: roas_project_fk_i; Type: INDEX; Schema: public; Owner: - -- -CREATE INDEX roas_project_fk_i ON role_assignments USING btree (project_id); +CREATE INDEX roas_project_fk_i ON public.role_assignments USING btree (project_id); -- -- Name: roas_space_fk_i; Type: INDEX; Schema: public; Owner: - -- -CREATE INDEX roas_space_fk_i ON role_assignments USING btree (space_id); +CREATE INDEX roas_space_fk_i ON public.role_assignments USING btree (space_id); -- -- Name: samp_code_i; Type: INDEX; Schema: public; Owner: - -- -CREATE INDEX samp_code_i ON samples_all USING btree (code); +CREATE INDEX samp_code_i ON public.samples_all USING btree (code); -- -- Name: samp_del_fk_i; Type: INDEX; Schema: public; Owner: - -- -CREATE INDEX samp_del_fk_i ON samples_all USING btree (del_id); +CREATE INDEX samp_del_fk_i ON public.samples_all USING btree (del_id); -- -- Name: samp_expe_fk_i; Type: INDEX; Schema: public; Owner: - -- -CREATE INDEX samp_expe_fk_i ON samples_all USING btree (expe_id); +CREATE INDEX samp_expe_fk_i ON public.samples_all USING btree (expe_id); -- -- Name: samp_pers_fk_i; Type: INDEX; Schema: public; Owner: - -- -CREATE INDEX samp_pers_fk_i ON samples_all USING btree (pers_id_registerer); +CREATE INDEX samp_pers_fk_i ON public.samples_all USING btree (pers_id_registerer); -- -- Name: samp_proj_fk_i; Type: INDEX; Schema: public; Owner: - -- -CREATE INDEX samp_proj_fk_i ON samples_all USING btree (proj_id); +CREATE INDEX samp_proj_fk_i ON public.samples_all USING btree (proj_id); -- -- Name: samp_samp_fk_i_part_of; Type: INDEX; Schema: public; Owner: - -- -CREATE INDEX samp_samp_fk_i_part_of ON samples_all USING btree (samp_id_part_of); +CREATE INDEX samp_samp_fk_i_part_of ON public.samples_all USING btree (samp_id_part_of); -- -- Name: samp_saty_fk_i; Type: INDEX; Schema: public; Owner: - -- -CREATE INDEX samp_saty_fk_i ON samples_all USING btree (saty_id); +CREATE INDEX samp_saty_fk_i ON public.samples_all USING btree (saty_id); -- -- Name: samprelh_data_id_fk_i; Type: INDEX; Schema: public; Owner: - -- -CREATE INDEX samprelh_data_id_fk_i ON sample_relationships_history USING btree (data_id); +CREATE INDEX samprelh_data_id_fk_i ON public.sample_relationships_history USING btree (data_id); -- -- Name: samprelh_main_samp_fk_data_fk_i; Type: INDEX; Schema: public; Owner: - -- -CREATE INDEX samprelh_main_samp_fk_data_fk_i ON sample_relationships_history USING btree (main_samp_id, data_id); +CREATE INDEX samprelh_main_samp_fk_data_fk_i ON public.sample_relationships_history USING btree (main_samp_id, data_id); -- -- Name: samprelh_main_samp_fk_expe_fk_i; Type: INDEX; Schema: public; Owner: - -- -CREATE INDEX samprelh_main_samp_fk_expe_fk_i ON sample_relationships_history USING btree (main_samp_id, expe_id); +CREATE INDEX samprelh_main_samp_fk_expe_fk_i ON public.sample_relationships_history USING btree (main_samp_id, expe_id); -- -- Name: samprelh_main_samp_fk_i; Type: INDEX; Schema: public; Owner: - -- -CREATE INDEX samprelh_main_samp_fk_i ON sample_relationships_history USING btree (main_samp_id); +CREATE INDEX samprelh_main_samp_fk_i ON public.sample_relationships_history USING btree (main_samp_id); -- -- Name: samprelh_main_samp_fk_proj_fk_i; Type: INDEX; Schema: public; Owner: - -- -CREATE INDEX samprelh_main_samp_fk_proj_fk_i ON sample_relationships_history USING btree (main_samp_id, proj_id); +CREATE INDEX samprelh_main_samp_fk_proj_fk_i ON public.sample_relationships_history USING btree (main_samp_id, proj_id); -- -- Name: samprelh_main_samp_fk_samp_fk_i; Type: INDEX; Schema: public; Owner: - -- -CREATE INDEX samprelh_main_samp_fk_samp_fk_i ON sample_relationships_history USING btree (main_samp_id, samp_id); +CREATE INDEX samprelh_main_samp_fk_samp_fk_i ON public.sample_relationships_history USING btree (main_samp_id, samp_id); -- -- Name: samprelh_main_samp_fk_space_fk_i; Type: INDEX; Schema: public; Owner: - -- -CREATE INDEX samprelh_main_samp_fk_space_fk_i ON sample_relationships_history USING btree (main_samp_id, space_id); +CREATE INDEX samprelh_main_samp_fk_space_fk_i ON public.sample_relationships_history USING btree (main_samp_id, space_id); -- -- Name: samprelh_samp_id_fk_i; Type: INDEX; Schema: public; Owner: - -- -CREATE INDEX samprelh_samp_id_fk_i ON sample_relationships_history USING btree (samp_id); +CREATE INDEX samprelh_samp_id_fk_i ON public.sample_relationships_history USING btree (samp_id); -- -- Name: sapr_cvte_fk_i; Type: INDEX; Schema: public; Owner: - -- -CREATE INDEX sapr_cvte_fk_i ON sample_properties USING btree (cvte_id); +CREATE INDEX sapr_cvte_fk_i ON public.sample_properties USING btree (cvte_id); -- -- Name: sapr_mapr_fk_i; Type: INDEX; Schema: public; Owner: - -- -CREATE INDEX sapr_mapr_fk_i ON sample_properties USING btree (mate_prop_id); +CREATE INDEX sapr_mapr_fk_i ON public.sample_properties USING btree (mate_prop_id); -- -- Name: sapr_pers_fk_i; Type: INDEX; Schema: public; Owner: - -- -CREATE INDEX sapr_pers_fk_i ON sample_properties USING btree (pers_id_registerer); +CREATE INDEX sapr_pers_fk_i ON public.sample_properties USING btree (pers_id_registerer); -- -- Name: sapr_samp_fk_i; Type: INDEX; Schema: public; Owner: - -- -CREATE INDEX sapr_samp_fk_i ON sample_properties USING btree (samp_id); +CREATE INDEX sapr_samp_fk_i ON public.sample_properties USING btree (samp_id); -- -- Name: sapr_stpt_fk_i; Type: INDEX; Schema: public; Owner: - -- -CREATE INDEX sapr_stpt_fk_i ON sample_properties USING btree (stpt_id); +CREATE INDEX sapr_stpt_fk_i ON public.sample_properties USING btree (stpt_id); -- -- Name: saprh_etpt_fk_i; Type: INDEX; Schema: public; Owner: - -- -CREATE INDEX saprh_etpt_fk_i ON sample_properties_history USING btree (stpt_id); +CREATE INDEX saprh_etpt_fk_i ON public.sample_properties_history USING btree (stpt_id); -- -- Name: saprh_expe_fk_i; Type: INDEX; Schema: public; Owner: - -- -CREATE INDEX saprh_expe_fk_i ON sample_properties_history USING btree (samp_id); +CREATE INDEX saprh_expe_fk_i ON public.sample_properties_history USING btree (samp_id); -- -- Name: saprh_vuts_fk_i; Type: INDEX; Schema: public; Owner: - -- -CREATE INDEX saprh_vuts_fk_i ON sample_properties_history USING btree (valid_until_timestamp); +CREATE INDEX saprh_vuts_fk_i ON public.sample_properties_history USING btree (valid_until_timestamp); -- -- Name: sare_data_fk_i_child; Type: INDEX; Schema: public; Owner: - -- -CREATE INDEX sare_data_fk_i_child ON sample_relationships_all USING btree (sample_id_child); +CREATE INDEX sare_data_fk_i_child ON public.sample_relationships_all USING btree (sample_id_child); -- -- Name: sare_data_fk_i_parent; Type: INDEX; Schema: public; Owner: - -- -CREATE INDEX sare_data_fk_i_parent ON sample_relationships_all USING btree (sample_id_parent); +CREATE INDEX sare_data_fk_i_parent ON public.sample_relationships_all USING btree (sample_id_parent); -- -- Name: sare_data_fk_i_relationship; Type: INDEX; Schema: public; Owner: - -- -CREATE INDEX sare_data_fk_i_relationship ON sample_relationships_all USING btree (relationship_id); +CREATE INDEX sare_data_fk_i_relationship ON public.sample_relationships_all USING btree (relationship_id); -- -- Name: sare_del_fk_i; Type: INDEX; Schema: public; Owner: - -- -CREATE INDEX sare_del_fk_i ON sample_relationships_all USING btree (del_id); +CREATE INDEX sare_del_fk_i ON public.sample_relationships_all USING btree (del_id); -- -- Name: script_pers_fk_i; Type: INDEX; Schema: public; Owner: - -- -CREATE INDEX script_pers_fk_i ON scripts USING btree (pers_id_registerer); +CREATE INDEX script_pers_fk_i ON public.scripts USING btree (pers_id_registerer); -- -- Name: semantic_annotations_prty_id_i; Type: INDEX; Schema: public; Owner: - -- -CREATE INDEX semantic_annotations_prty_id_i ON semantic_annotations USING btree (prty_id); +CREATE INDEX semantic_annotations_prty_id_i ON public.semantic_annotations USING btree (prty_id); -- -- Name: semantic_annotations_saty_id_i; Type: INDEX; Schema: public; Owner: - -- -CREATE INDEX semantic_annotations_saty_id_i ON semantic_annotations USING btree (saty_id); +CREATE INDEX semantic_annotations_saty_id_i ON public.semantic_annotations USING btree (saty_id); -- -- Name: semantic_annotations_stpt_id_i; Type: INDEX; Schema: public; Owner: - -- -CREATE INDEX semantic_annotations_stpt_id_i ON semantic_annotations USING btree (stpt_id); +CREATE INDEX semantic_annotations_stpt_id_i ON public.semantic_annotations USING btree (stpt_id); -- -- Name: space_pers_registered_by_fk_i; Type: INDEX; Schema: public; Owner: - -- -CREATE INDEX space_pers_registered_by_fk_i ON spaces USING btree (pers_id_registerer); +CREATE INDEX space_pers_registered_by_fk_i ON public.spaces USING btree (pers_id_registerer); -- -- Name: stpt_pers_fk_i; Type: INDEX; Schema: public; Owner: - -- -CREATE INDEX stpt_pers_fk_i ON sample_type_property_types USING btree (pers_id_registerer); +CREATE INDEX stpt_pers_fk_i ON public.sample_type_property_types USING btree (pers_id_registerer); -- -- Name: stpt_prty_fk_i; Type: INDEX; Schema: public; Owner: - -- -CREATE INDEX stpt_prty_fk_i ON sample_type_property_types USING btree (prty_id); +CREATE INDEX stpt_prty_fk_i ON public.sample_type_property_types USING btree (prty_id); -- -- Name: stpt_saty_fk_i; Type: INDEX; Schema: public; Owner: - -- -CREATE INDEX stpt_saty_fk_i ON sample_type_property_types USING btree (saty_id); +CREATE INDEX stpt_saty_fk_i ON public.sample_type_property_types USING btree (saty_id); -- --- Name: content_copies_history_delete; Type: RULE; Schema: public; Owner: - +-- Name: content_copies content_copies_history_delete; Type: RULE; Schema: public; Owner: - -- CREATE RULE content_copies_history_delete AS - ON DELETE TO content_copies DO UPDATE data_set_copies_history SET valid_until_timestamp = now() + ON DELETE TO public.content_copies DO UPDATE public.data_set_copies_history SET valid_until_timestamp = now() WHERE ((data_set_copies_history.cc_id)::bigint = (old.id)::bigint); -- --- Name: content_copies_history_insert; Type: RULE; Schema: public; Owner: - +-- Name: content_copies content_copies_history_insert; Type: RULE; Schema: public; Owner: - -- CREATE RULE content_copies_history_insert AS - ON INSERT TO content_copies DO INSERT INTO data_set_copies_history (id, cc_id, data_id, external_code, path, git_commit_hash, git_repository_id, edms_id, pers_id_author, valid_from_timestamp) - VALUES (nextval('data_set_copies_history_id_seq'::regclass), new.id, new.data_id, new.external_code, new.path, new.git_commit_hash, new.git_repository_id, new.edms_id, new.pers_id_registerer, new.registration_timestamp); + ON INSERT TO public.content_copies DO INSERT INTO public.data_set_copies_history (id, cc_id, data_id, external_code, path, git_commit_hash, git_repository_id, edms_id, edms_code, edms_label, edms_address, pers_id_author, valid_from_timestamp) + VALUES (nextval('public.data_set_copies_history_id_seq'::regclass), new.id, new.data_id, new.external_code, new.path, new.git_commit_hash, new.git_repository_id, new.edms_id, ( SELECT external_data_management_systems.code + FROM public.external_data_management_systems + WHERE ((external_data_management_systems.id)::bigint = (new.edms_id)::bigint)), ( SELECT external_data_management_systems.label + FROM public.external_data_management_systems + WHERE ((external_data_management_systems.id)::bigint = (new.edms_id)::bigint)), ( SELECT external_data_management_systems.address + FROM public.external_data_management_systems + WHERE ((external_data_management_systems.id)::bigint = (new.edms_id)::bigint)), new.pers_id_registerer, new.registration_timestamp); -- --- Name: data_all; Type: RULE; Schema: public; Owner: - +-- Name: data data_all; Type: RULE; Schema: public; Owner: - -- CREATE RULE data_all AS - ON DELETE TO data DO INSTEAD DELETE FROM data_all + ON DELETE TO public.data DO INSTEAD DELETE FROM public.data_all WHERE ((data_all.id)::bigint = (old.id)::bigint); -- --- Name: data_deleted_delete; Type: RULE; Schema: public; Owner: - +-- Name: data_deleted data_deleted_delete; Type: RULE; Schema: public; Owner: - -- CREATE RULE data_deleted_delete AS - ON DELETE TO data_deleted DO INSTEAD DELETE FROM data_all + ON DELETE TO public.data_deleted DO INSTEAD DELETE FROM public.data_all WHERE ((data_all.id)::bigint = (old.id)::bigint); -- --- Name: data_deleted_update; Type: RULE; Schema: public; Owner: - +-- Name: data_deleted data_deleted_update; Type: RULE; Schema: public; Owner: - -- CREATE RULE data_deleted_update AS - ON UPDATE TO data_deleted DO INSTEAD UPDATE data_all SET del_id = new.del_id, orig_del = new.orig_del, modification_timestamp = new.modification_timestamp, version = new.version + ON UPDATE TO public.data_deleted DO INSTEAD UPDATE public.data_all SET del_id = new.del_id, orig_del = new.orig_del, modification_timestamp = new.modification_timestamp, version = new.version WHERE ((data_all.id)::bigint = (new.id)::bigint); -- --- Name: data_insert; Type: RULE; Schema: public; Owner: - +-- Name: data data_insert; Type: RULE; Schema: public; Owner: - -- CREATE RULE data_insert AS - ON INSERT TO data DO INSTEAD INSERT INTO data_all (id, code, del_id, orig_del, expe_id, dast_id, data_producer_code, dsty_id, is_derived, is_valid, modification_timestamp, access_timestamp, pers_id_registerer, pers_id_modifier, production_timestamp, registration_timestamp, samp_id, version, data_set_kind) + ON INSERT TO public.data DO INSTEAD INSERT INTO public.data_all (id, code, del_id, orig_del, expe_id, dast_id, data_producer_code, dsty_id, is_derived, is_valid, modification_timestamp, access_timestamp, pers_id_registerer, pers_id_modifier, production_timestamp, registration_timestamp, samp_id, version, data_set_kind) VALUES (new.id, new.code, new.del_id, new.orig_del, new.expe_id, new.dast_id, new.data_producer_code, new.dsty_id, new.is_derived, new.is_valid, new.modification_timestamp, new.access_timestamp, new.pers_id_registerer, new.pers_id_modifier, new.production_timestamp, new.registration_timestamp, new.samp_id, new.version, new.data_set_kind); -- --- Name: data_relationship_delete; Type: RULE; Schema: public; Owner: - +-- Name: data_set_relationships_all data_relationship_delete; Type: RULE; Schema: public; Owner: - -- CREATE RULE data_relationship_delete AS - ON DELETE TO data_set_relationships_all - WHERE (old.del_id IS NULL) DO UPDATE data_set_relationships_history SET valid_until_timestamp = now() + ON DELETE TO public.data_set_relationships_all + WHERE (old.del_id IS NULL) DO UPDATE public.data_set_relationships_history SET valid_until_timestamp = now() WHERE ((((data_set_relationships_history.main_data_id)::bigint = (old.data_id_parent)::bigint) AND ((data_set_relationships_history.data_id)::bigint = (old.data_id_child)::bigint) AND ((data_set_relationships_history.relation_type)::text = ( SELECT upper((relationship_types.parent_label)::text) AS upper - FROM relationship_types + FROM public.relationship_types WHERE ((relationship_types.id)::bigint = (old.relationship_id)::bigint))) AND (data_set_relationships_history.valid_until_timestamp IS NULL)) OR (((data_set_relationships_history.main_data_id)::bigint = (old.data_id_child)::bigint) AND ((data_set_relationships_history.data_id)::bigint = (old.data_id_parent)::bigint) AND ((data_set_relationships_history.relation_type)::text = ( SELECT upper((relationship_types.child_label)::text) AS upper - FROM relationship_types + FROM public.relationship_types WHERE ((relationship_types.id)::bigint = (old.relationship_id)::bigint))) AND (data_set_relationships_history.valid_until_timestamp IS NULL))); -- --- Name: data_relationship_insert; Type: RULE; Schema: public; Owner: - +-- Name: data_set_relationships_all data_relationship_insert; Type: RULE; Schema: public; Owner: - -- CREATE RULE data_relationship_insert AS - ON INSERT TO data_set_relationships_all - WHERE (new.del_id IS NULL) DO ( INSERT INTO data_set_relationships_history (id, main_data_id, relation_type, data_id, entity_perm_id, pers_id_author, valid_from_timestamp, ordinal) - VALUES (nextval('data_set_relationships_history_id_seq'::regclass), new.data_id_parent, ( SELECT upper((relationship_types.parent_label)::text) AS upper - FROM relationship_types + ON INSERT TO public.data_set_relationships_all + WHERE (new.del_id IS NULL) DO ( INSERT INTO public.data_set_relationships_history (id, main_data_id, relation_type, data_id, entity_perm_id, pers_id_author, valid_from_timestamp, ordinal) + VALUES (nextval('public.data_set_relationships_history_id_seq'::regclass), new.data_id_parent, ( SELECT upper((relationship_types.parent_label)::text) AS upper + FROM public.relationship_types WHERE ((relationship_types.id)::bigint = (new.relationship_id)::bigint)), new.data_id_child, ( SELECT data_all.code - FROM data_all + FROM public.data_all WHERE ((data_all.id)::bigint = (new.data_id_child)::bigint)), new.pers_id_author, new.modification_timestamp, new.ordinal); - INSERT INTO data_set_relationships_history (id, main_data_id, relation_type, data_id, entity_perm_id, pers_id_author, valid_from_timestamp, ordinal) - VALUES (nextval('data_set_relationships_history_id_seq'::regclass), new.data_id_child, ( SELECT upper((relationship_types.child_label)::text) AS upper - FROM relationship_types + INSERT INTO public.data_set_relationships_history (id, main_data_id, relation_type, data_id, entity_perm_id, pers_id_author, valid_from_timestamp, ordinal) + VALUES (nextval('public.data_set_relationships_history_id_seq'::regclass), new.data_id_child, ( SELECT upper((relationship_types.child_label)::text) AS upper + FROM public.relationship_types WHERE ((relationship_types.id)::bigint = (new.relationship_id)::bigint)), new.data_id_parent, ( SELECT data_all.code - FROM data_all + FROM public.data_all WHERE ((data_all.id)::bigint = (new.data_id_parent)::bigint)), new.pers_id_author, new.modification_timestamp, new.ordinal); ); -- --- Name: data_relationship_trash_revert_update; Type: RULE; Schema: public; Owner: - +-- Name: data_set_relationships_all data_relationship_trash_revert_update; Type: RULE; Schema: public; Owner: - -- CREATE RULE data_relationship_trash_revert_update AS - ON UPDATE TO data_set_relationships_all - WHERE ((old.del_id IS NOT NULL) AND (new.del_id IS NULL)) DO ( INSERT INTO data_set_relationships_history (id, main_data_id, relation_type, data_id, entity_perm_id, pers_id_author, valid_from_timestamp, ordinal) - VALUES (nextval('data_set_relationships_history_id_seq'::regclass), new.data_id_parent, ( SELECT upper((relationship_types.parent_label)::text) AS upper - FROM relationship_types + ON UPDATE TO public.data_set_relationships_all + WHERE ((old.del_id IS NOT NULL) AND (new.del_id IS NULL)) DO ( INSERT INTO public.data_set_relationships_history (id, main_data_id, relation_type, data_id, entity_perm_id, pers_id_author, valid_from_timestamp, ordinal) + VALUES (nextval('public.data_set_relationships_history_id_seq'::regclass), new.data_id_parent, ( SELECT upper((relationship_types.parent_label)::text) AS upper + FROM public.relationship_types WHERE ((relationship_types.id)::bigint = (new.relationship_id)::bigint)), new.data_id_child, ( SELECT data_all.code - FROM data_all + FROM public.data_all WHERE ((data_all.id)::bigint = (new.data_id_child)::bigint)), new.pers_id_author, new.modification_timestamp, new.ordinal); - INSERT INTO data_set_relationships_history (id, main_data_id, relation_type, data_id, entity_perm_id, pers_id_author, valid_from_timestamp, ordinal) - VALUES (nextval('data_set_relationships_history_id_seq'::regclass), new.data_id_child, ( SELECT upper((relationship_types.child_label)::text) AS upper - FROM relationship_types + INSERT INTO public.data_set_relationships_history (id, main_data_id, relation_type, data_id, entity_perm_id, pers_id_author, valid_from_timestamp, ordinal) + VALUES (nextval('public.data_set_relationships_history_id_seq'::regclass), new.data_id_child, ( SELECT upper((relationship_types.child_label)::text) AS upper + FROM public.relationship_types WHERE ((relationship_types.id)::bigint = (new.relationship_id)::bigint)), new.data_id_parent, ( SELECT data_all.code - FROM data_all + FROM public.data_all WHERE ((data_all.id)::bigint = (new.data_id_parent)::bigint)), new.pers_id_author, new.modification_timestamp, new.ordinal); ); -- --- Name: data_relationship_trash_update; Type: RULE; Schema: public; Owner: - +-- Name: data_set_relationships_all data_relationship_trash_update; Type: RULE; Schema: public; Owner: - -- CREATE RULE data_relationship_trash_update AS - ON UPDATE TO data_set_relationships_all - WHERE ((new.del_id IS NOT NULL) AND (old.del_id IS NULL)) DO UPDATE data_set_relationships_history SET valid_until_timestamp = now() + ON UPDATE TO public.data_set_relationships_all + WHERE ((new.del_id IS NOT NULL) AND (old.del_id IS NULL)) DO UPDATE public.data_set_relationships_history SET valid_until_timestamp = now() WHERE ((((data_set_relationships_history.main_data_id)::bigint = (old.data_id_parent)::bigint) AND ((data_set_relationships_history.data_id)::bigint = (old.data_id_child)::bigint) AND ((data_set_relationships_history.relation_type)::text = ( SELECT upper((relationship_types.parent_label)::text) AS upper - FROM relationship_types + FROM public.relationship_types WHERE ((relationship_types.id)::bigint = (old.relationship_id)::bigint))) AND (data_set_relationships_history.valid_until_timestamp IS NULL)) OR (((data_set_relationships_history.main_data_id)::bigint = (old.data_id_child)::bigint) AND ((data_set_relationships_history.data_id)::bigint = (old.data_id_parent)::bigint) AND ((data_set_relationships_history.relation_type)::text = ( SELECT upper((relationship_types.child_label)::text) AS upper - FROM relationship_types + FROM public.relationship_types WHERE ((relationship_types.id)::bigint = (old.relationship_id)::bigint))) AND (data_set_relationships_history.valid_until_timestamp IS NULL))); -- --- Name: data_relationship_update; Type: RULE; Schema: public; Owner: - +-- Name: data_set_relationships_all data_relationship_update; Type: RULE; Schema: public; Owner: - -- CREATE RULE data_relationship_update AS - ON UPDATE TO data_set_relationships_all - WHERE ((new.del_id IS NULL) AND (old.del_id IS NULL)) DO ( UPDATE data_set_relationships_history SET valid_until_timestamp = now() + ON UPDATE TO public.data_set_relationships_all + WHERE ((new.del_id IS NULL) AND (old.del_id IS NULL)) DO ( UPDATE public.data_set_relationships_history SET valid_until_timestamp = now() WHERE ((((data_set_relationships_history.main_data_id)::bigint = (old.data_id_parent)::bigint) AND ((data_set_relationships_history.data_id)::bigint = (old.data_id_child)::bigint) AND ((data_set_relationships_history.relation_type)::text = ( SELECT upper((relationship_types.parent_label)::text) AS upper - FROM relationship_types + FROM public.relationship_types WHERE ((relationship_types.id)::bigint = (old.relationship_id)::bigint))) AND (data_set_relationships_history.valid_until_timestamp IS NULL)) OR (((data_set_relationships_history.main_data_id)::bigint = (old.data_id_child)::bigint) AND ((data_set_relationships_history.data_id)::bigint = (old.data_id_parent)::bigint) AND ((data_set_relationships_history.relation_type)::text = ( SELECT upper((relationship_types.child_label)::text) AS upper - FROM relationship_types + FROM public.relationship_types WHERE ((relationship_types.id)::bigint = (old.relationship_id)::bigint))) AND (data_set_relationships_history.valid_until_timestamp IS NULL))); - INSERT INTO data_set_relationships_history (id, main_data_id, relation_type, data_id, entity_perm_id, pers_id_author, valid_from_timestamp, ordinal) - VALUES (nextval('data_set_relationships_history_id_seq'::regclass), new.data_id_parent, ( SELECT upper((relationship_types.parent_label)::text) AS upper - FROM relationship_types + INSERT INTO public.data_set_relationships_history (id, main_data_id, relation_type, data_id, entity_perm_id, pers_id_author, valid_from_timestamp, ordinal) + VALUES (nextval('public.data_set_relationships_history_id_seq'::regclass), new.data_id_parent, ( SELECT upper((relationship_types.parent_label)::text) AS upper + FROM public.relationship_types WHERE ((relationship_types.id)::bigint = (new.relationship_id)::bigint)), new.data_id_child, ( SELECT data_all.code - FROM data_all + FROM public.data_all WHERE ((data_all.id)::bigint = (new.data_id_child)::bigint)), new.pers_id_author, new.modification_timestamp, new.ordinal); - INSERT INTO data_set_relationships_history (id, main_data_id, relation_type, data_id, entity_perm_id, pers_id_author, valid_from_timestamp, ordinal) - VALUES (nextval('data_set_relationships_history_id_seq'::regclass), new.data_id_child, ( SELECT upper((relationship_types.child_label)::text) AS upper - FROM relationship_types + INSERT INTO public.data_set_relationships_history (id, main_data_id, relation_type, data_id, entity_perm_id, pers_id_author, valid_from_timestamp, ordinal) + VALUES (nextval('public.data_set_relationships_history_id_seq'::regclass), new.data_id_child, ( SELECT upper((relationship_types.child_label)::text) AS upper + FROM public.relationship_types WHERE ((relationship_types.id)::bigint = (new.relationship_id)::bigint)), new.data_id_parent, ( SELECT data_all.code - FROM data_all + FROM public.data_all WHERE ((data_all.id)::bigint = (new.data_id_parent)::bigint)), new.pers_id_author, new.modification_timestamp, new.ordinal); ); -- --- Name: data_set_properties_delete; Type: RULE; Schema: public; Owner: - +-- Name: data_set_properties data_set_properties_delete; Type: RULE; Schema: public; Owner: - -- CREATE RULE data_set_properties_delete AS - ON DELETE TO data_set_properties + ON DELETE TO public.data_set_properties WHERE ((((old.value IS NOT NULL) AND (decode(replace("substring"((old.value)::text, 1, 1), '\'::text, '\\'::text), 'escape'::text) <> '\xefbfbd'::bytea)) OR (old.cvte_id IS NOT NULL) OR (old.mate_prop_id IS NOT NULL)) AND (( SELECT data_all.del_id - FROM data_all - WHERE ((data_all.id)::bigint = (old.ds_id)::bigint)) IS NULL)) DO INSERT INTO data_set_properties_history (id, ds_id, dstpt_id, value, vocabulary_term, material, pers_id_author, valid_from_timestamp, valid_until_timestamp) - VALUES (nextval('data_set_property_id_seq'::regclass), old.ds_id, old.dstpt_id, old.value, ( SELECT ((((t.code)::text || ' ['::text) || (v.code)::text) || ']'::text) - FROM (controlled_vocabulary_terms t - JOIN controlled_vocabularies v ON (((t.covo_id)::bigint = (v.id)::bigint))) + FROM public.data_all + WHERE ((data_all.id)::bigint = (old.ds_id)::bigint)) IS NULL)) DO INSERT INTO public.data_set_properties_history (id, ds_id, dstpt_id, value, vocabulary_term, material, pers_id_author, valid_from_timestamp, valid_until_timestamp) + VALUES (nextval('public.data_set_property_id_seq'::regclass), old.ds_id, old.dstpt_id, old.value, ( SELECT ((((t.code)::text || ' ['::text) || (v.code)::text) || ']'::text) + FROM (public.controlled_vocabulary_terms t + JOIN public.controlled_vocabularies v ON (((t.covo_id)::bigint = (v.id)::bigint))) WHERE ((t.id)::bigint = (old.cvte_id)::bigint)), ( SELECT ((((m.code)::text || ' ['::text) || (mt.code)::text) || ']'::text) - FROM (materials m - JOIN material_types mt ON (((m.maty_id)::bigint = (mt.id)::bigint))) + FROM (public.materials m + JOIN public.material_types mt ON (((m.maty_id)::bigint = (mt.id)::bigint))) WHERE ((m.id)::bigint = (old.mate_prop_id)::bigint)), old.pers_id_author, old.modification_timestamp, now()); -- --- Name: data_set_properties_update; Type: RULE; Schema: public; Owner: - +-- Name: data_set_properties data_set_properties_update; Type: RULE; Schema: public; Owner: - -- CREATE RULE data_set_properties_update AS - ON UPDATE TO data_set_properties - WHERE (((old.value IS NOT NULL) AND (decode(replace("substring"((old.value)::text, 1, 1), '\'::text, '\\'::text), 'escape'::text) <> '\xefbfbd'::bytea) AND ((old.value)::text <> (new.value)::text)) OR ((old.cvte_id IS NOT NULL) AND ((old.cvte_id)::bigint <> (new.cvte_id)::bigint)) OR ((old.mate_prop_id IS NOT NULL) AND ((old.mate_prop_id)::bigint <> (new.mate_prop_id)::bigint))) DO INSERT INTO data_set_properties_history (id, ds_id, dstpt_id, value, vocabulary_term, material, pers_id_author, valid_from_timestamp, valid_until_timestamp) - VALUES (nextval('data_set_property_id_seq'::regclass), old.ds_id, old.dstpt_id, old.value, ( SELECT ((((t.code)::text || ' ['::text) || (v.code)::text) || ']'::text) - FROM (controlled_vocabulary_terms t - JOIN controlled_vocabularies v ON (((t.covo_id)::bigint = (v.id)::bigint))) + ON UPDATE TO public.data_set_properties + WHERE (((old.value IS NOT NULL) AND (decode(replace("substring"((old.value)::text, 1, 1), '\'::text, '\\'::text), 'escape'::text) <> '\xefbfbd'::bytea) AND ((old.value)::text <> (new.value)::text)) OR ((old.cvte_id IS NOT NULL) AND ((old.cvte_id)::bigint <> (new.cvte_id)::bigint)) OR ((old.mate_prop_id IS NOT NULL) AND ((old.mate_prop_id)::bigint <> (new.mate_prop_id)::bigint))) DO INSERT INTO public.data_set_properties_history (id, ds_id, dstpt_id, value, vocabulary_term, material, pers_id_author, valid_from_timestamp, valid_until_timestamp) + VALUES (nextval('public.data_set_property_id_seq'::regclass), old.ds_id, old.dstpt_id, old.value, ( SELECT ((((t.code)::text || ' ['::text) || (v.code)::text) || ']'::text) + FROM (public.controlled_vocabulary_terms t + JOIN public.controlled_vocabularies v ON (((t.covo_id)::bigint = (v.id)::bigint))) WHERE ((t.id)::bigint = (old.cvte_id)::bigint)), ( SELECT ((((m.code)::text || ' ['::text) || (mt.code)::text) || ']'::text) - FROM (materials m - JOIN material_types mt ON (((m.maty_id)::bigint = (mt.id)::bigint))) + FROM (public.materials m + JOIN public.material_types mt ON (((m.maty_id)::bigint = (mt.id)::bigint))) WHERE ((m.id)::bigint = (old.mate_prop_id)::bigint)), old.pers_id_author, old.modification_timestamp, new.modification_timestamp); -- --- Name: data_set_relationships_delete; Type: RULE; Schema: public; Owner: - +-- Name: data_set_relationships data_set_relationships_delete; Type: RULE; Schema: public; Owner: - -- CREATE RULE data_set_relationships_delete AS - ON DELETE TO data_set_relationships DO INSTEAD DELETE FROM data_set_relationships_all + ON DELETE TO public.data_set_relationships DO INSTEAD DELETE FROM public.data_set_relationships_all WHERE (((data_set_relationships_all.data_id_parent)::bigint = (old.data_id_parent)::bigint) AND ((data_set_relationships_all.data_id_child)::bigint = (old.data_id_child)::bigint) AND ((data_set_relationships_all.relationship_id)::bigint = (old.relationship_id)::bigint)); -- --- Name: data_set_relationships_insert; Type: RULE; Schema: public; Owner: - +-- Name: data_set_relationships data_set_relationships_insert; Type: RULE; Schema: public; Owner: - -- CREATE RULE data_set_relationships_insert AS - ON INSERT TO data_set_relationships DO INSTEAD INSERT INTO data_set_relationships_all (data_id_parent, data_id_child, pers_id_author, relationship_id, ordinal, registration_timestamp, modification_timestamp) + ON INSERT TO public.data_set_relationships DO INSTEAD INSERT INTO public.data_set_relationships_all (data_id_parent, data_id_child, pers_id_author, relationship_id, ordinal, registration_timestamp, modification_timestamp) VALUES (new.data_id_parent, new.data_id_child, new.pers_id_author, new.relationship_id, new.ordinal, new.registration_timestamp, new.modification_timestamp); -- --- Name: data_set_relationships_update; Type: RULE; Schema: public; Owner: - +-- Name: data_set_relationships data_set_relationships_update; Type: RULE; Schema: public; Owner: - -- CREATE RULE data_set_relationships_update AS - ON UPDATE TO data_set_relationships DO INSTEAD UPDATE data_set_relationships_all SET data_id_parent = new.data_id_parent, data_id_child = new.data_id_child, del_id = new.del_id, relationship_id = new.relationship_id, ordinal = new.ordinal, pers_id_author = new.pers_id_author, registration_timestamp = new.registration_timestamp, modification_timestamp = new.modification_timestamp + ON UPDATE TO public.data_set_relationships DO INSTEAD UPDATE public.data_set_relationships_all SET data_id_parent = new.data_id_parent, data_id_child = new.data_id_child, del_id = new.del_id, relationship_id = new.relationship_id, ordinal = new.ordinal, pers_id_author = new.pers_id_author, registration_timestamp = new.registration_timestamp, modification_timestamp = new.modification_timestamp WHERE (((data_set_relationships_all.data_id_parent)::bigint = (new.data_id_parent)::bigint) AND ((data_set_relationships_all.data_id_child)::bigint = (new.data_id_child)::bigint) AND ((data_set_relationships_all.relationship_id)::bigint = (new.relationship_id)::bigint)); -- --- Name: data_update; Type: RULE; Schema: public; Owner: - +-- Name: data data_update; Type: RULE; Schema: public; Owner: - -- CREATE RULE data_update AS - ON UPDATE TO data DO INSTEAD UPDATE data_all SET code = new.code, del_id = new.del_id, orig_del = new.orig_del, expe_id = new.expe_id, dast_id = new.dast_id, data_producer_code = new.data_producer_code, dsty_id = new.dsty_id, is_derived = new.is_derived, is_valid = new.is_valid, modification_timestamp = new.modification_timestamp, access_timestamp = new.access_timestamp, pers_id_registerer = new.pers_id_registerer, pers_id_modifier = new.pers_id_modifier, production_timestamp = new.production_timestamp, registration_timestamp = new.registration_timestamp, samp_id = new.samp_id, version = new.version, data_set_kind = new.data_set_kind + ON UPDATE TO public.data DO INSTEAD UPDATE public.data_all SET code = new.code, del_id = new.del_id, orig_del = new.orig_del, expe_id = new.expe_id, dast_id = new.dast_id, data_producer_code = new.data_producer_code, dsty_id = new.dsty_id, is_derived = new.is_derived, is_valid = new.is_valid, modification_timestamp = new.modification_timestamp, access_timestamp = new.access_timestamp, pers_id_registerer = new.pers_id_registerer, pers_id_modifier = new.pers_id_modifier, production_timestamp = new.production_timestamp, registration_timestamp = new.registration_timestamp, samp_id = new.samp_id, version = new.version, data_set_kind = new.data_set_kind WHERE ((data_all.id)::bigint = (new.id)::bigint); -- --- Name: dataset_experiment_delete; Type: RULE; Schema: public; Owner: - +-- Name: data_all dataset_experiment_delete; Type: RULE; Schema: public; Owner: - -- CREATE RULE dataset_experiment_delete AS - ON DELETE TO data_all - WHERE ((old.expe_id IS NOT NULL) AND (old.samp_id IS NULL)) DO UPDATE experiment_relationships_history SET valid_until_timestamp = now() + ON DELETE TO public.data_all + WHERE ((old.expe_id IS NOT NULL) AND (old.samp_id IS NULL)) DO UPDATE public.experiment_relationships_history SET valid_until_timestamp = now() WHERE (((experiment_relationships_history.main_expe_id)::bigint = (old.expe_id)::bigint) AND ((experiment_relationships_history.data_id)::bigint = (old.id)::bigint) AND (experiment_relationships_history.valid_until_timestamp IS NULL)); -- --- Name: dataset_experiment_insert; Type: RULE; Schema: public; Owner: - +-- Name: data_all dataset_experiment_insert; Type: RULE; Schema: public; Owner: - -- CREATE RULE dataset_experiment_insert AS - ON INSERT TO data_all - WHERE ((new.expe_id IS NOT NULL) AND (new.samp_id IS NULL)) DO ( INSERT INTO experiment_relationships_history (id, main_expe_id, relation_type, data_id, entity_perm_id, pers_id_author, valid_from_timestamp) - VALUES (nextval('experiment_relationships_history_id_seq'::regclass), new.expe_id, 'OWNER'::text, new.id, new.code, new.pers_id_modifier, new.modification_timestamp); - INSERT INTO data_set_relationships_history (id, main_data_id, relation_type, expe_id, entity_perm_id, pers_id_author, valid_from_timestamp) - VALUES (nextval('data_set_relationships_history_id_seq'::regclass), new.id, 'OWNED'::text, new.expe_id, ( SELECT experiments_all.perm_id - FROM experiments_all + ON INSERT TO public.data_all + WHERE ((new.expe_id IS NOT NULL) AND (new.samp_id IS NULL)) DO ( INSERT INTO public.experiment_relationships_history (id, main_expe_id, relation_type, data_id, entity_perm_id, pers_id_author, valid_from_timestamp) + VALUES (nextval('public.experiment_relationships_history_id_seq'::regclass), new.expe_id, 'OWNER'::text, new.id, new.code, new.pers_id_modifier, new.modification_timestamp); + INSERT INTO public.data_set_relationships_history (id, main_data_id, relation_type, expe_id, entity_perm_id, pers_id_author, valid_from_timestamp) + VALUES (nextval('public.data_set_relationships_history_id_seq'::regclass), new.id, 'OWNED'::text, new.expe_id, ( SELECT experiments_all.perm_id + FROM public.experiments_all WHERE ((experiments_all.id)::bigint = (new.expe_id)::bigint)), new.pers_id_modifier, new.modification_timestamp); ); -- --- Name: dataset_experiment_remove_update; Type: RULE; Schema: public; Owner: - +-- Name: data_all dataset_experiment_remove_update; Type: RULE; Schema: public; Owner: - -- CREATE RULE dataset_experiment_remove_update AS - ON UPDATE TO data_all - WHERE ((old.samp_id IS NULL) AND (new.samp_id IS NOT NULL)) DO ( UPDATE experiment_relationships_history SET valid_until_timestamp = new.modification_timestamp + ON UPDATE TO public.data_all + WHERE ((old.samp_id IS NULL) AND (new.samp_id IS NOT NULL)) DO ( UPDATE public.experiment_relationships_history SET valid_until_timestamp = new.modification_timestamp WHERE (((experiment_relationships_history.main_expe_id)::bigint = (old.expe_id)::bigint) AND ((experiment_relationships_history.data_id)::bigint = (old.id)::bigint) AND (experiment_relationships_history.valid_until_timestamp IS NULL)); - UPDATE data_set_relationships_history SET valid_until_timestamp = new.modification_timestamp + UPDATE public.data_set_relationships_history SET valid_until_timestamp = new.modification_timestamp WHERE (((data_set_relationships_history.main_data_id)::bigint = (old.id)::bigint) AND ((data_set_relationships_history.expe_id)::bigint = (old.expe_id)::bigint) AND (data_set_relationships_history.valid_until_timestamp IS NULL)); ); -- --- Name: dataset_experiment_update; Type: RULE; Schema: public; Owner: - +-- Name: data_all dataset_experiment_update; Type: RULE; Schema: public; Owner: - -- CREATE RULE dataset_experiment_update AS - ON UPDATE TO data_all - WHERE ((((old.expe_id)::bigint <> (new.expe_id)::bigint) OR (old.samp_id IS NOT NULL)) AND (new.samp_id IS NULL)) DO ( UPDATE experiment_relationships_history SET valid_until_timestamp = new.modification_timestamp + ON UPDATE TO public.data_all + WHERE ((((old.expe_id)::bigint <> (new.expe_id)::bigint) OR (old.samp_id IS NOT NULL)) AND (new.samp_id IS NULL)) DO ( UPDATE public.experiment_relationships_history SET valid_until_timestamp = new.modification_timestamp WHERE (((experiment_relationships_history.main_expe_id)::bigint = (old.expe_id)::bigint) AND ((experiment_relationships_history.data_id)::bigint = (old.id)::bigint) AND (experiment_relationships_history.valid_until_timestamp IS NULL)); - INSERT INTO experiment_relationships_history (id, main_expe_id, relation_type, data_id, entity_perm_id, pers_id_author, valid_from_timestamp) - VALUES (nextval('experiment_relationships_history_id_seq'::regclass), new.expe_id, 'OWNER'::text, new.id, new.code, new.pers_id_modifier, new.modification_timestamp); - UPDATE data_set_relationships_history SET valid_until_timestamp = new.modification_timestamp + INSERT INTO public.experiment_relationships_history (id, main_expe_id, relation_type, data_id, entity_perm_id, pers_id_author, valid_from_timestamp) + VALUES (nextval('public.experiment_relationships_history_id_seq'::regclass), new.expe_id, 'OWNER'::text, new.id, new.code, new.pers_id_modifier, new.modification_timestamp); + UPDATE public.data_set_relationships_history SET valid_until_timestamp = new.modification_timestamp WHERE (((data_set_relationships_history.main_data_id)::bigint = (old.id)::bigint) AND ((data_set_relationships_history.expe_id)::bigint = (old.expe_id)::bigint) AND (data_set_relationships_history.valid_until_timestamp IS NULL)); - INSERT INTO data_set_relationships_history (id, main_data_id, relation_type, expe_id, entity_perm_id, pers_id_author, valid_from_timestamp) - VALUES (nextval('data_set_relationships_history_id_seq'::regclass), new.id, 'OWNED'::text, new.expe_id, ( SELECT experiments_all.perm_id - FROM experiments_all + INSERT INTO public.data_set_relationships_history (id, main_data_id, relation_type, expe_id, entity_perm_id, pers_id_author, valid_from_timestamp) + VALUES (nextval('public.data_set_relationships_history_id_seq'::regclass), new.id, 'OWNED'::text, new.expe_id, ( SELECT experiments_all.perm_id + FROM public.experiments_all WHERE ((experiments_all.id)::bigint = (new.expe_id)::bigint)), new.pers_id_modifier, new.modification_timestamp); ); -- --- Name: dataset_sample_delete; Type: RULE; Schema: public; Owner: - +-- Name: data_all dataset_sample_delete; Type: RULE; Schema: public; Owner: - -- CREATE RULE dataset_sample_delete AS - ON DELETE TO data_all - WHERE (old.samp_id IS NOT NULL) DO UPDATE sample_relationships_history SET valid_until_timestamp = now() + ON DELETE TO public.data_all + WHERE (old.samp_id IS NOT NULL) DO UPDATE public.sample_relationships_history SET valid_until_timestamp = now() WHERE (((sample_relationships_history.main_samp_id)::bigint = (old.samp_id)::bigint) AND ((sample_relationships_history.data_id)::bigint = (old.id)::bigint) AND (sample_relationships_history.valid_until_timestamp IS NULL)); -- --- Name: dataset_sample_insert; Type: RULE; Schema: public; Owner: - +-- Name: data_all dataset_sample_insert; Type: RULE; Schema: public; Owner: - -- CREATE RULE dataset_sample_insert AS - ON INSERT TO data_all - WHERE (new.samp_id IS NOT NULL) DO ( INSERT INTO sample_relationships_history (id, main_samp_id, relation_type, data_id, entity_perm_id, pers_id_author, valid_from_timestamp) - VALUES (nextval('sample_relationships_history_id_seq'::regclass), new.samp_id, 'OWNER'::text, new.id, new.code, new.pers_id_modifier, new.modification_timestamp); - INSERT INTO data_set_relationships_history (id, main_data_id, relation_type, samp_id, entity_perm_id, pers_id_author, valid_from_timestamp) - VALUES (nextval('data_set_relationships_history_id_seq'::regclass), new.id, 'OWNED'::text, new.samp_id, ( SELECT samples_all.perm_id - FROM samples_all + ON INSERT TO public.data_all + WHERE (new.samp_id IS NOT NULL) DO ( INSERT INTO public.sample_relationships_history (id, main_samp_id, relation_type, data_id, entity_perm_id, pers_id_author, valid_from_timestamp) + VALUES (nextval('public.sample_relationships_history_id_seq'::regclass), new.samp_id, 'OWNER'::text, new.id, new.code, new.pers_id_modifier, new.modification_timestamp); + INSERT INTO public.data_set_relationships_history (id, main_data_id, relation_type, samp_id, entity_perm_id, pers_id_author, valid_from_timestamp) + VALUES (nextval('public.data_set_relationships_history_id_seq'::regclass), new.id, 'OWNED'::text, new.samp_id, ( SELECT samples_all.perm_id + FROM public.samples_all WHERE ((samples_all.id)::bigint = (new.samp_id)::bigint)), new.pers_id_modifier, new.modification_timestamp); ); -- --- Name: dataset_sample_remove_update; Type: RULE; Schema: public; Owner: - +-- Name: data_all dataset_sample_remove_update; Type: RULE; Schema: public; Owner: - -- CREATE RULE dataset_sample_remove_update AS - ON UPDATE TO data_all - WHERE ((old.samp_id IS NOT NULL) AND (new.samp_id IS NULL)) DO ( UPDATE sample_relationships_history SET valid_until_timestamp = new.modification_timestamp + ON UPDATE TO public.data_all + WHERE ((old.samp_id IS NOT NULL) AND (new.samp_id IS NULL)) DO ( UPDATE public.sample_relationships_history SET valid_until_timestamp = new.modification_timestamp WHERE (((sample_relationships_history.main_samp_id)::bigint = (old.samp_id)::bigint) AND ((sample_relationships_history.data_id)::bigint = (old.id)::bigint) AND (sample_relationships_history.valid_until_timestamp IS NULL)); - UPDATE data_set_relationships_history SET valid_until_timestamp = new.modification_timestamp + UPDATE public.data_set_relationships_history SET valid_until_timestamp = new.modification_timestamp WHERE (((data_set_relationships_history.main_data_id)::bigint = (old.id)::bigint) AND ((data_set_relationships_history.samp_id)::bigint = (old.samp_id)::bigint) AND (data_set_relationships_history.valid_until_timestamp IS NULL)); ); -- --- Name: dataset_sample_update; Type: RULE; Schema: public; Owner: - +-- Name: data_all dataset_sample_update; Type: RULE; Schema: public; Owner: - -- CREATE RULE dataset_sample_update AS - ON UPDATE TO data_all - WHERE ((((old.samp_id)::bigint <> (new.samp_id)::bigint) OR (old.samp_id IS NULL)) AND (new.samp_id IS NOT NULL)) DO ( UPDATE sample_relationships_history SET valid_until_timestamp = new.modification_timestamp + ON UPDATE TO public.data_all + WHERE ((((old.samp_id)::bigint <> (new.samp_id)::bigint) OR (old.samp_id IS NULL)) AND (new.samp_id IS NOT NULL)) DO ( UPDATE public.sample_relationships_history SET valid_until_timestamp = new.modification_timestamp WHERE (((sample_relationships_history.main_samp_id)::bigint = (old.samp_id)::bigint) AND ((sample_relationships_history.data_id)::bigint = (old.id)::bigint) AND (sample_relationships_history.valid_until_timestamp IS NULL)); - INSERT INTO sample_relationships_history (id, main_samp_id, relation_type, data_id, entity_perm_id, pers_id_author, valid_from_timestamp) - VALUES (nextval('sample_relationships_history_id_seq'::regclass), new.samp_id, 'OWNER'::text, new.id, new.code, new.pers_id_modifier, new.modification_timestamp); - UPDATE data_set_relationships_history SET valid_until_timestamp = new.modification_timestamp + INSERT INTO public.sample_relationships_history (id, main_samp_id, relation_type, data_id, entity_perm_id, pers_id_author, valid_from_timestamp) + VALUES (nextval('public.sample_relationships_history_id_seq'::regclass), new.samp_id, 'OWNER'::text, new.id, new.code, new.pers_id_modifier, new.modification_timestamp); + UPDATE public.data_set_relationships_history SET valid_until_timestamp = new.modification_timestamp WHERE (((data_set_relationships_history.main_data_id)::bigint = (old.id)::bigint) AND ((data_set_relationships_history.samp_id)::bigint = (old.samp_id)::bigint) AND (data_set_relationships_history.valid_until_timestamp IS NULL)); - INSERT INTO data_set_relationships_history (id, main_data_id, relation_type, samp_id, entity_perm_id, pers_id_author, valid_from_timestamp) - VALUES (nextval('data_set_relationships_history_id_seq'::regclass), new.id, 'OWNED'::text, new.samp_id, ( SELECT samples_all.perm_id - FROM samples_all + INSERT INTO public.data_set_relationships_history (id, main_data_id, relation_type, samp_id, entity_perm_id, pers_id_author, valid_from_timestamp) + VALUES (nextval('public.data_set_relationships_history_id_seq'::regclass), new.id, 'OWNED'::text, new.samp_id, ( SELECT samples_all.perm_id + FROM public.samples_all WHERE ((samples_all.id)::bigint = (new.samp_id)::bigint)), new.pers_id_modifier, new.modification_timestamp); ); -- --- Name: experiment_delete; Type: RULE; Schema: public; Owner: - +-- Name: external_data_management_systems edms_a_insert_content_copy_history; Type: RULE; Schema: public; Owner: - +-- + +CREATE RULE edms_a_insert_content_copy_history AS + ON UPDATE TO public.external_data_management_systems DO INSERT INTO public.data_set_copies_history (id, cc_id, data_id, external_code, path, git_commit_hash, git_repository_id, edms_id, edms_code, edms_label, edms_address, pers_id_author, valid_from_timestamp) SELECT nextval('public.data_set_copies_history_id_seq'::regclass) AS nextval, + dsch.cc_id, + dsch.data_id, + dsch.external_code, + dsch.path, + dsch.git_commit_hash, + dsch.git_repository_id, + dsch.edms_id, + new.code, + new.label, + new.address, + dsch.pers_id_author, + now() AS now + FROM (public.data_set_copies_history dsch + JOIN public.external_data_management_systems edms ON (((edms.id)::bigint = (dsch.edms_id)::bigint))) + WHERE (((new.id)::bigint = (dsch.edms_id)::bigint) AND (dsch.valid_until_timestamp IS NULL)); + + +-- +-- Name: external_data_management_systems edms_b_expire_content_copy_history; Type: RULE; Schema: public; Owner: - +-- + +CREATE RULE edms_b_expire_content_copy_history AS + ON UPDATE TO public.external_data_management_systems DO UPDATE public.data_set_copies_history SET valid_until_timestamp = now() + WHERE ((data_set_copies_history.valid_until_timestamp IS NULL) AND ((data_set_copies_history.edms_id)::bigint = (new.id)::bigint) AND ((data_set_copies_history.valid_from_timestamp)::timestamp with time zone <> now())); + + +-- +-- Name: experiments experiment_delete; Type: RULE; Schema: public; Owner: - -- CREATE RULE experiment_delete AS - ON DELETE TO experiments DO INSTEAD DELETE FROM experiments_all + ON DELETE TO public.experiments DO INSTEAD DELETE FROM public.experiments_all WHERE ((experiments_all.id)::bigint = (old.id)::bigint); -- --- Name: experiment_insert; Type: RULE; Schema: public; Owner: - +-- Name: experiments experiment_insert; Type: RULE; Schema: public; Owner: - -- CREATE RULE experiment_insert AS - ON INSERT TO experiments DO INSTEAD INSERT INTO experiments_all (id, code, del_id, orig_del, exty_id, is_public, modification_timestamp, perm_id, pers_id_registerer, pers_id_modifier, proj_id, registration_timestamp, version) + ON INSERT TO public.experiments DO INSTEAD INSERT INTO public.experiments_all (id, code, del_id, orig_del, exty_id, is_public, modification_timestamp, perm_id, pers_id_registerer, pers_id_modifier, proj_id, registration_timestamp, version) VALUES (new.id, new.code, new.del_id, new.orig_del, new.exty_id, new.is_public, new.modification_timestamp, new.perm_id, new.pers_id_registerer, new.pers_id_modifier, new.proj_id, new.registration_timestamp, new.version); -- --- Name: experiment_project_delete; Type: RULE; Schema: public; Owner: - +-- Name: experiments_all experiment_project_delete; Type: RULE; Schema: public; Owner: - -- CREATE RULE experiment_project_delete AS - ON DELETE TO experiments_all - WHERE (old.proj_id IS NOT NULL) DO UPDATE project_relationships_history SET valid_until_timestamp = now() + ON DELETE TO public.experiments_all + WHERE (old.proj_id IS NOT NULL) DO UPDATE public.project_relationships_history SET valid_until_timestamp = now() WHERE (((project_relationships_history.main_proj_id)::bigint = (old.proj_id)::bigint) AND ((project_relationships_history.expe_id)::bigint = (old.id)::bigint) AND (project_relationships_history.valid_until_timestamp IS NULL)); -- --- Name: experiment_project_insert; Type: RULE; Schema: public; Owner: - +-- Name: experiments_all experiment_project_insert; Type: RULE; Schema: public; Owner: - -- CREATE RULE experiment_project_insert AS - ON INSERT TO experiments_all - WHERE (new.proj_id IS NOT NULL) DO ( INSERT INTO project_relationships_history (id, main_proj_id, relation_type, expe_id, entity_perm_id, pers_id_author, valid_from_timestamp) - VALUES (nextval('project_relationships_history_id_seq'::regclass), new.proj_id, 'OWNER'::text, new.id, new.perm_id, new.pers_id_modifier, new.modification_timestamp); - INSERT INTO experiment_relationships_history (id, main_expe_id, relation_type, proj_id, entity_perm_id, pers_id_author, valid_from_timestamp) - VALUES (nextval('experiment_relationships_history_id_seq'::regclass), new.id, 'OWNED'::text, new.proj_id, ( SELECT projects.perm_id - FROM projects + ON INSERT TO public.experiments_all + WHERE (new.proj_id IS NOT NULL) DO ( INSERT INTO public.project_relationships_history (id, main_proj_id, relation_type, expe_id, entity_perm_id, pers_id_author, valid_from_timestamp) + VALUES (nextval('public.project_relationships_history_id_seq'::regclass), new.proj_id, 'OWNER'::text, new.id, new.perm_id, new.pers_id_modifier, new.modification_timestamp); + INSERT INTO public.experiment_relationships_history (id, main_expe_id, relation_type, proj_id, entity_perm_id, pers_id_author, valid_from_timestamp) + VALUES (nextval('public.experiment_relationships_history_id_seq'::regclass), new.id, 'OWNED'::text, new.proj_id, ( SELECT projects.perm_id + FROM public.projects WHERE ((projects.id)::bigint = (new.proj_id)::bigint)), new.pers_id_modifier, new.modification_timestamp); ); -- --- Name: experiment_project_remove_update; Type: RULE; Schema: public; Owner: - +-- Name: experiments_all experiment_project_remove_update; Type: RULE; Schema: public; Owner: - -- CREATE RULE experiment_project_remove_update AS - ON UPDATE TO experiments_all - WHERE ((old.proj_id IS NOT NULL) AND (new.proj_id IS NULL)) DO ( UPDATE project_relationships_history SET valid_until_timestamp = new.modification_timestamp + ON UPDATE TO public.experiments_all + WHERE ((old.proj_id IS NOT NULL) AND (new.proj_id IS NULL)) DO ( UPDATE public.project_relationships_history SET valid_until_timestamp = new.modification_timestamp WHERE (((project_relationships_history.main_proj_id)::bigint = (old.proj_id)::bigint) AND ((project_relationships_history.expe_id)::bigint = (old.id)::bigint) AND (project_relationships_history.valid_until_timestamp IS NULL)); - UPDATE experiment_relationships_history SET valid_until_timestamp = new.modification_timestamp + UPDATE public.experiment_relationships_history SET valid_until_timestamp = new.modification_timestamp WHERE (((experiment_relationships_history.main_expe_id)::bigint = (old.id)::bigint) AND ((experiment_relationships_history.proj_id)::bigint = (old.proj_id)::bigint) AND (experiment_relationships_history.valid_until_timestamp IS NULL)); ); -- --- Name: experiment_project_update; Type: RULE; Schema: public; Owner: - +-- Name: experiments_all experiment_project_update; Type: RULE; Schema: public; Owner: - -- CREATE RULE experiment_project_update AS - ON UPDATE TO experiments_all - WHERE ((((old.proj_id)::bigint <> (new.proj_id)::bigint) OR (old.proj_id IS NULL)) AND (new.proj_id IS NOT NULL)) DO ( UPDATE project_relationships_history SET valid_until_timestamp = new.modification_timestamp + ON UPDATE TO public.experiments_all + WHERE ((((old.proj_id)::bigint <> (new.proj_id)::bigint) OR (old.proj_id IS NULL)) AND (new.proj_id IS NOT NULL)) DO ( UPDATE public.project_relationships_history SET valid_until_timestamp = new.modification_timestamp WHERE (((project_relationships_history.main_proj_id)::bigint = (old.proj_id)::bigint) AND ((project_relationships_history.expe_id)::bigint = (old.id)::bigint) AND (project_relationships_history.valid_until_timestamp IS NULL)); - INSERT INTO project_relationships_history (id, main_proj_id, relation_type, expe_id, entity_perm_id, pers_id_author, valid_from_timestamp) - VALUES (nextval('project_relationships_history_id_seq'::regclass), new.proj_id, 'OWNER'::text, new.id, new.perm_id, new.pers_id_modifier, new.modification_timestamp); - UPDATE experiment_relationships_history SET valid_until_timestamp = new.modification_timestamp + INSERT INTO public.project_relationships_history (id, main_proj_id, relation_type, expe_id, entity_perm_id, pers_id_author, valid_from_timestamp) + VALUES (nextval('public.project_relationships_history_id_seq'::regclass), new.proj_id, 'OWNER'::text, new.id, new.perm_id, new.pers_id_modifier, new.modification_timestamp); + UPDATE public.experiment_relationships_history SET valid_until_timestamp = new.modification_timestamp WHERE (((experiment_relationships_history.main_expe_id)::bigint = (old.id)::bigint) AND ((experiment_relationships_history.proj_id)::bigint = (old.proj_id)::bigint) AND (experiment_relationships_history.valid_until_timestamp IS NULL)); - INSERT INTO experiment_relationships_history (id, main_expe_id, relation_type, proj_id, entity_perm_id, pers_id_author, valid_from_timestamp) - VALUES (nextval('experiment_relationships_history_id_seq'::regclass), new.id, 'OWNED'::text, new.proj_id, ( SELECT projects.perm_id - FROM projects + INSERT INTO public.experiment_relationships_history (id, main_expe_id, relation_type, proj_id, entity_perm_id, pers_id_author, valid_from_timestamp) + VALUES (nextval('public.experiment_relationships_history_id_seq'::regclass), new.id, 'OWNED'::text, new.proj_id, ( SELECT projects.perm_id + FROM public.projects WHERE ((projects.id)::bigint = (new.proj_id)::bigint)), new.pers_id_modifier, new.modification_timestamp); ); -- --- Name: experiment_properties_delete; Type: RULE; Schema: public; Owner: - +-- Name: experiment_properties experiment_properties_delete; Type: RULE; Schema: public; Owner: - -- CREATE RULE experiment_properties_delete AS - ON DELETE TO experiment_properties - WHERE (((old.value IS NOT NULL) AND (decode(replace("substring"((old.value)::text, 1, 1), '\'::text, '\\'::text), 'escape'::text) <> '\xefbfbd'::bytea)) OR (old.cvte_id IS NOT NULL) OR (old.mate_prop_id IS NOT NULL)) DO INSERT INTO experiment_properties_history (id, expe_id, etpt_id, value, vocabulary_term, material, pers_id_author, valid_from_timestamp, valid_until_timestamp) - VALUES (nextval('experiment_property_id_seq'::regclass), old.expe_id, old.etpt_id, old.value, ( SELECT ((((t.code)::text || ' ['::text) || (v.code)::text) || ']'::text) - FROM (controlled_vocabulary_terms t - JOIN controlled_vocabularies v ON (((t.covo_id)::bigint = (v.id)::bigint))) + ON DELETE TO public.experiment_properties + WHERE (((old.value IS NOT NULL) AND (decode(replace("substring"((old.value)::text, 1, 1), '\'::text, '\\'::text), 'escape'::text) <> '\xefbfbd'::bytea)) OR (old.cvte_id IS NOT NULL) OR (old.mate_prop_id IS NOT NULL)) DO INSERT INTO public.experiment_properties_history (id, expe_id, etpt_id, value, vocabulary_term, material, pers_id_author, valid_from_timestamp, valid_until_timestamp) + VALUES (nextval('public.experiment_property_id_seq'::regclass), old.expe_id, old.etpt_id, old.value, ( SELECT ((((t.code)::text || ' ['::text) || (v.code)::text) || ']'::text) + FROM (public.controlled_vocabulary_terms t + JOIN public.controlled_vocabularies v ON (((t.covo_id)::bigint = (v.id)::bigint))) WHERE ((t.id)::bigint = (old.cvte_id)::bigint)), ( SELECT ((((m.code)::text || ' ['::text) || (mt.code)::text) || ']'::text) - FROM (materials m - JOIN material_types mt ON (((m.maty_id)::bigint = (mt.id)::bigint))) + FROM (public.materials m + JOIN public.material_types mt ON (((m.maty_id)::bigint = (mt.id)::bigint))) WHERE ((m.id)::bigint = (old.mate_prop_id)::bigint)), old.pers_id_author, old.modification_timestamp, now()); -- --- Name: experiment_properties_update; Type: RULE; Schema: public; Owner: - +-- Name: experiment_properties experiment_properties_update; Type: RULE; Schema: public; Owner: - -- CREATE RULE experiment_properties_update AS - ON UPDATE TO experiment_properties - WHERE (((old.value IS NOT NULL) AND (decode(replace("substring"((old.value)::text, 1, 1), '\'::text, '\\'::text), 'escape'::text) <> '\xefbfbd'::bytea) AND ((old.value)::text <> (new.value)::text)) OR ((old.cvte_id IS NOT NULL) AND ((old.cvte_id)::bigint <> (new.cvte_id)::bigint)) OR ((old.mate_prop_id IS NOT NULL) AND ((old.mate_prop_id)::bigint <> (new.mate_prop_id)::bigint))) DO INSERT INTO experiment_properties_history (id, expe_id, etpt_id, value, vocabulary_term, material, pers_id_author, valid_from_timestamp, valid_until_timestamp) - VALUES (nextval('experiment_property_id_seq'::regclass), old.expe_id, old.etpt_id, old.value, ( SELECT ((((t.code)::text || ' ['::text) || (v.code)::text) || ']'::text) - FROM (controlled_vocabulary_terms t - JOIN controlled_vocabularies v ON (((t.covo_id)::bigint = (v.id)::bigint))) + ON UPDATE TO public.experiment_properties + WHERE (((old.value IS NOT NULL) AND (decode(replace("substring"((old.value)::text, 1, 1), '\'::text, '\\'::text), 'escape'::text) <> '\xefbfbd'::bytea) AND ((old.value)::text <> (new.value)::text)) OR ((old.cvte_id IS NOT NULL) AND ((old.cvte_id)::bigint <> (new.cvte_id)::bigint)) OR ((old.mate_prop_id IS NOT NULL) AND ((old.mate_prop_id)::bigint <> (new.mate_prop_id)::bigint))) DO INSERT INTO public.experiment_properties_history (id, expe_id, etpt_id, value, vocabulary_term, material, pers_id_author, valid_from_timestamp, valid_until_timestamp) + VALUES (nextval('public.experiment_property_id_seq'::regclass), old.expe_id, old.etpt_id, old.value, ( SELECT ((((t.code)::text || ' ['::text) || (v.code)::text) || ']'::text) + FROM (public.controlled_vocabulary_terms t + JOIN public.controlled_vocabularies v ON (((t.covo_id)::bigint = (v.id)::bigint))) WHERE ((t.id)::bigint = (old.cvte_id)::bigint)), ( SELECT ((((m.code)::text || ' ['::text) || (mt.code)::text) || ']'::text) - FROM (materials m - JOIN material_types mt ON (((m.maty_id)::bigint = (mt.id)::bigint))) + FROM (public.materials m + JOIN public.material_types mt ON (((m.maty_id)::bigint = (mt.id)::bigint))) WHERE ((m.id)::bigint = (old.mate_prop_id)::bigint)), old.pers_id_author, old.modification_timestamp, new.modification_timestamp); -- --- Name: experiment_update; Type: RULE; Schema: public; Owner: - +-- Name: experiments experiment_update; Type: RULE; Schema: public; Owner: - -- CREATE RULE experiment_update AS - ON UPDATE TO experiments DO INSTEAD UPDATE experiments_all SET code = new.code, del_id = new.del_id, orig_del = new.orig_del, exty_id = new.exty_id, is_public = new.is_public, modification_timestamp = new.modification_timestamp, perm_id = new.perm_id, pers_id_registerer = new.pers_id_registerer, pers_id_modifier = new.pers_id_modifier, proj_id = new.proj_id, registration_timestamp = new.registration_timestamp, version = new.version + ON UPDATE TO public.experiments DO INSTEAD UPDATE public.experiments_all SET code = new.code, del_id = new.del_id, orig_del = new.orig_del, exty_id = new.exty_id, is_public = new.is_public, modification_timestamp = new.modification_timestamp, perm_id = new.perm_id, pers_id_registerer = new.pers_id_registerer, pers_id_modifier = new.pers_id_modifier, proj_id = new.proj_id, registration_timestamp = new.registration_timestamp, version = new.version WHERE ((experiments_all.id)::bigint = (new.id)::bigint); -- --- Name: experiments_deleted_delete; Type: RULE; Schema: public; Owner: - +-- Name: experiments_deleted experiments_deleted_delete; Type: RULE; Schema: public; Owner: - -- CREATE RULE experiments_deleted_delete AS - ON DELETE TO experiments_deleted DO INSTEAD DELETE FROM experiments_all + ON DELETE TO public.experiments_deleted DO INSTEAD DELETE FROM public.experiments_all WHERE ((experiments_all.id)::bigint = (old.id)::bigint); -- --- Name: experiments_deleted_update; Type: RULE; Schema: public; Owner: - +-- Name: experiments_deleted experiments_deleted_update; Type: RULE; Schema: public; Owner: - -- CREATE RULE experiments_deleted_update AS - ON UPDATE TO experiments_deleted DO INSTEAD UPDATE experiments_all SET del_id = new.del_id, orig_del = new.orig_del, modification_timestamp = new.modification_timestamp, version = new.version + ON UPDATE TO public.experiments_deleted DO INSTEAD UPDATE public.experiments_all SET del_id = new.del_id, orig_del = new.orig_del, modification_timestamp = new.modification_timestamp, version = new.version WHERE ((experiments_all.id)::bigint = (new.id)::bigint); -- --- Name: material_properties_delete; Type: RULE; Schema: public; Owner: - +-- Name: material_properties material_properties_delete; Type: RULE; Schema: public; Owner: - -- CREATE RULE material_properties_delete AS - ON DELETE TO material_properties - WHERE (((old.value IS NOT NULL) AND (decode(replace("substring"((old.value)::text, 1, 1), '\'::text, '\\'::text), 'escape'::text) <> '\xefbfbd'::bytea)) OR (old.cvte_id IS NOT NULL) OR (old.mate_prop_id IS NOT NULL)) DO INSERT INTO material_properties_history (id, mate_id, mtpt_id, value, vocabulary_term, material, pers_id_author, valid_from_timestamp, valid_until_timestamp) - VALUES (nextval('material_property_id_seq'::regclass), old.mate_id, old.mtpt_id, old.value, ( SELECT ((((t.code)::text || ' ['::text) || (v.code)::text) || ']'::text) - FROM (controlled_vocabulary_terms t - JOIN controlled_vocabularies v ON (((t.covo_id)::bigint = (v.id)::bigint))) + ON DELETE TO public.material_properties + WHERE (((old.value IS NOT NULL) AND (decode(replace("substring"((old.value)::text, 1, 1), '\'::text, '\\'::text), 'escape'::text) <> '\xefbfbd'::bytea)) OR (old.cvte_id IS NOT NULL) OR (old.mate_prop_id IS NOT NULL)) DO INSERT INTO public.material_properties_history (id, mate_id, mtpt_id, value, vocabulary_term, material, pers_id_author, valid_from_timestamp, valid_until_timestamp) + VALUES (nextval('public.material_property_id_seq'::regclass), old.mate_id, old.mtpt_id, old.value, ( SELECT ((((t.code)::text || ' ['::text) || (v.code)::text) || ']'::text) + FROM (public.controlled_vocabulary_terms t + JOIN public.controlled_vocabularies v ON (((t.covo_id)::bigint = (v.id)::bigint))) WHERE ((t.id)::bigint = (old.cvte_id)::bigint)), ( SELECT ((((m.code)::text || ' ['::text) || (mt.code)::text) || ']'::text) - FROM (materials m - JOIN material_types mt ON (((m.maty_id)::bigint = (mt.id)::bigint))) + FROM (public.materials m + JOIN public.material_types mt ON (((m.maty_id)::bigint = (mt.id)::bigint))) WHERE ((m.id)::bigint = (old.mate_prop_id)::bigint)), old.pers_id_author, old.modification_timestamp, now()); -- --- Name: material_properties_update; Type: RULE; Schema: public; Owner: - +-- Name: material_properties material_properties_update; Type: RULE; Schema: public; Owner: - -- CREATE RULE material_properties_update AS - ON UPDATE TO material_properties - WHERE (((old.value IS NOT NULL) AND (decode(replace("substring"((old.value)::text, 1, 1), '\'::text, '\\'::text), 'escape'::text) <> '\xefbfbd'::bytea) AND ((old.value)::text <> (new.value)::text)) OR ((old.cvte_id IS NOT NULL) AND ((old.cvte_id)::bigint <> (new.cvte_id)::bigint)) OR ((old.mate_prop_id IS NOT NULL) AND ((old.mate_prop_id)::bigint <> (new.mate_prop_id)::bigint))) DO INSERT INTO material_properties_history (id, mate_id, mtpt_id, value, vocabulary_term, material, pers_id_author, valid_from_timestamp, valid_until_timestamp) - VALUES (nextval('material_property_id_seq'::regclass), old.mate_id, old.mtpt_id, old.value, ( SELECT ((((t.code)::text || ' ['::text) || (v.code)::text) || ']'::text) - FROM (controlled_vocabulary_terms t - JOIN controlled_vocabularies v ON (((t.covo_id)::bigint = (v.id)::bigint))) + ON UPDATE TO public.material_properties + WHERE (((old.value IS NOT NULL) AND (decode(replace("substring"((old.value)::text, 1, 1), '\'::text, '\\'::text), 'escape'::text) <> '\xefbfbd'::bytea) AND ((old.value)::text <> (new.value)::text)) OR ((old.cvte_id IS NOT NULL) AND ((old.cvte_id)::bigint <> (new.cvte_id)::bigint)) OR ((old.mate_prop_id IS NOT NULL) AND ((old.mate_prop_id)::bigint <> (new.mate_prop_id)::bigint))) DO INSERT INTO public.material_properties_history (id, mate_id, mtpt_id, value, vocabulary_term, material, pers_id_author, valid_from_timestamp, valid_until_timestamp) + VALUES (nextval('public.material_property_id_seq'::regclass), old.mate_id, old.mtpt_id, old.value, ( SELECT ((((t.code)::text || ' ['::text) || (v.code)::text) || ']'::text) + FROM (public.controlled_vocabulary_terms t + JOIN public.controlled_vocabularies v ON (((t.covo_id)::bigint = (v.id)::bigint))) WHERE ((t.id)::bigint = (old.cvte_id)::bigint)), ( SELECT ((((m.code)::text || ' ['::text) || (mt.code)::text) || ']'::text) - FROM (materials m - JOIN material_types mt ON (((m.maty_id)::bigint = (mt.id)::bigint))) + FROM (public.materials m + JOIN public.material_types mt ON (((m.maty_id)::bigint = (mt.id)::bigint))) WHERE ((m.id)::bigint = (old.mate_prop_id)::bigint)), old.pers_id_author, old.modification_timestamp, new.modification_timestamp); -- --- Name: metaproject_assignments_delete; Type: RULE; Schema: public; Owner: - +-- Name: metaproject_assignments metaproject_assignments_delete; Type: RULE; Schema: public; Owner: - -- CREATE RULE metaproject_assignments_delete AS - ON DELETE TO metaproject_assignments DO INSTEAD DELETE FROM metaproject_assignments_all + ON DELETE TO public.metaproject_assignments DO INSTEAD DELETE FROM public.metaproject_assignments_all WHERE ((metaproject_assignments_all.id)::bigint = (old.id)::bigint); -- --- Name: metaproject_assignments_insert; Type: RULE; Schema: public; Owner: - +-- Name: metaproject_assignments metaproject_assignments_insert; Type: RULE; Schema: public; Owner: - -- CREATE RULE metaproject_assignments_insert AS - ON INSERT TO metaproject_assignments DO INSTEAD INSERT INTO metaproject_assignments_all (id, mepr_id, expe_id, samp_id, data_id, mate_id, del_id, creation_date) + ON INSERT TO public.metaproject_assignments DO INSTEAD INSERT INTO public.metaproject_assignments_all (id, mepr_id, expe_id, samp_id, data_id, mate_id, del_id, creation_date) VALUES (new.id, new.mepr_id, new.expe_id, new.samp_id, new.data_id, new.mate_id, new.del_id, new.creation_date); -- --- Name: metaproject_assignments_update; Type: RULE; Schema: public; Owner: - +-- Name: metaproject_assignments metaproject_assignments_update; Type: RULE; Schema: public; Owner: - -- CREATE RULE metaproject_assignments_update AS - ON UPDATE TO metaproject_assignments DO INSTEAD UPDATE metaproject_assignments_all SET id = new.id, mepr_id = new.mepr_id, expe_id = new.expe_id, samp_id = new.samp_id, data_id = new.data_id, mate_id = new.mate_id, del_id = new.del_id, creation_date = new.creation_date + ON UPDATE TO public.metaproject_assignments DO INSTEAD UPDATE public.metaproject_assignments_all SET id = new.id, mepr_id = new.mepr_id, expe_id = new.expe_id, samp_id = new.samp_id, data_id = new.data_id, mate_id = new.mate_id, del_id = new.del_id, creation_date = new.creation_date WHERE ((metaproject_assignments_all.id)::bigint = (new.id)::bigint); -- --- Name: project_space_insert; Type: RULE; Schema: public; Owner: - +-- Name: projects project_space_insert; Type: RULE; Schema: public; Owner: - -- CREATE RULE project_space_insert AS - ON INSERT TO projects - WHERE (new.space_id IS NOT NULL) DO INSERT INTO project_relationships_history (id, main_proj_id, relation_type, space_id, entity_perm_id, pers_id_author, valid_from_timestamp) - VALUES (nextval('project_relationships_history_id_seq'::regclass), new.id, 'OWNED'::text, new.space_id, ( SELECT spaces.code - FROM spaces + ON INSERT TO public.projects + WHERE (new.space_id IS NOT NULL) DO INSERT INTO public.project_relationships_history (id, main_proj_id, relation_type, space_id, entity_perm_id, pers_id_author, valid_from_timestamp) + VALUES (nextval('public.project_relationships_history_id_seq'::regclass), new.id, 'OWNED'::text, new.space_id, ( SELECT spaces.code + FROM public.spaces WHERE ((spaces.id)::bigint = (new.space_id)::bigint)), new.pers_id_modifier, new.modification_timestamp); -- --- Name: project_space_remove_update; Type: RULE; Schema: public; Owner: - +-- Name: projects project_space_remove_update; Type: RULE; Schema: public; Owner: - -- CREATE RULE project_space_remove_update AS - ON UPDATE TO projects - WHERE ((old.space_id IS NOT NULL) AND (new.space_id IS NULL)) DO UPDATE project_relationships_history SET valid_until_timestamp = new.modification_timestamp + ON UPDATE TO public.projects + WHERE ((old.space_id IS NOT NULL) AND (new.space_id IS NULL)) DO UPDATE public.project_relationships_history SET valid_until_timestamp = new.modification_timestamp WHERE (((project_relationships_history.main_proj_id)::bigint = (old.id)::bigint) AND ((project_relationships_history.space_id)::bigint = (old.space_id)::bigint) AND (project_relationships_history.valid_until_timestamp IS NULL)); -- --- Name: project_space_update; Type: RULE; Schema: public; Owner: - +-- Name: projects project_space_update; Type: RULE; Schema: public; Owner: - -- CREATE RULE project_space_update AS - ON UPDATE TO projects - WHERE ((((old.space_id)::bigint <> (new.space_id)::bigint) OR (old.space_id IS NULL)) AND (new.space_id IS NOT NULL)) DO ( UPDATE project_relationships_history SET valid_until_timestamp = new.modification_timestamp + ON UPDATE TO public.projects + WHERE ((((old.space_id)::bigint <> (new.space_id)::bigint) OR (old.space_id IS NULL)) AND (new.space_id IS NOT NULL)) DO ( UPDATE public.project_relationships_history SET valid_until_timestamp = new.modification_timestamp WHERE (((project_relationships_history.main_proj_id)::bigint = (old.id)::bigint) AND ((project_relationships_history.space_id)::bigint = (old.space_id)::bigint) AND (project_relationships_history.valid_until_timestamp IS NULL)); - INSERT INTO project_relationships_history (id, main_proj_id, relation_type, space_id, entity_perm_id, pers_id_author, valid_from_timestamp) - VALUES (nextval('project_relationships_history_id_seq'::regclass), new.id, 'OWNED'::text, new.space_id, ( SELECT spaces.code - FROM spaces + INSERT INTO public.project_relationships_history (id, main_proj_id, relation_type, space_id, entity_perm_id, pers_id_author, valid_from_timestamp) + VALUES (nextval('public.project_relationships_history_id_seq'::regclass), new.id, 'OWNED'::text, new.space_id, ( SELECT spaces.code + FROM public.spaces WHERE ((spaces.id)::bigint = (new.space_id)::bigint)), new.pers_id_modifier, new.modification_timestamp); ); -- --- Name: sample_container_delete; Type: RULE; Schema: public; Owner: - +-- Name: samples_all sample_container_delete; Type: RULE; Schema: public; Owner: - -- CREATE RULE sample_container_delete AS - ON DELETE TO samples_all - WHERE (old.samp_id_part_of IS NOT NULL) DO UPDATE sample_relationships_history SET valid_until_timestamp = now() + ON DELETE TO public.samples_all + WHERE (old.samp_id_part_of IS NOT NULL) DO UPDATE public.sample_relationships_history SET valid_until_timestamp = now() WHERE (((sample_relationships_history.main_samp_id)::bigint = (old.samp_id_part_of)::bigint) AND ((sample_relationships_history.samp_id)::bigint = (old.id)::bigint) AND (sample_relationships_history.valid_until_timestamp IS NULL) AND ((sample_relationships_history.relation_type)::text = 'CONTAINER'::text)); -- --- Name: sample_container_insert; Type: RULE; Schema: public; Owner: - +-- Name: samples_all sample_container_insert; Type: RULE; Schema: public; Owner: - -- CREATE RULE sample_container_insert AS - ON INSERT TO samples_all - WHERE (new.samp_id_part_of IS NOT NULL) DO ( INSERT INTO sample_relationships_history (id, main_samp_id, relation_type, samp_id, entity_perm_id, pers_id_author, valid_from_timestamp) - VALUES (nextval('sample_relationships_history_id_seq'::regclass), new.samp_id_part_of, 'CONTAINER'::text, new.id, new.perm_id, new.pers_id_modifier, new.modification_timestamp); - INSERT INTO sample_relationships_history (id, main_samp_id, relation_type, samp_id, entity_perm_id, pers_id_author, valid_from_timestamp) - VALUES (nextval('sample_relationships_history_id_seq'::regclass), new.id, 'CONTAINED'::text, new.samp_id_part_of, ( SELECT samples_all.perm_id - FROM samples_all + ON INSERT TO public.samples_all + WHERE (new.samp_id_part_of IS NOT NULL) DO ( INSERT INTO public.sample_relationships_history (id, main_samp_id, relation_type, samp_id, entity_perm_id, pers_id_author, valid_from_timestamp) + VALUES (nextval('public.sample_relationships_history_id_seq'::regclass), new.samp_id_part_of, 'CONTAINER'::text, new.id, new.perm_id, new.pers_id_modifier, new.modification_timestamp); + INSERT INTO public.sample_relationships_history (id, main_samp_id, relation_type, samp_id, entity_perm_id, pers_id_author, valid_from_timestamp) + VALUES (nextval('public.sample_relationships_history_id_seq'::regclass), new.id, 'CONTAINED'::text, new.samp_id_part_of, ( SELECT samples_all.perm_id + FROM public.samples_all WHERE ((samples_all.id)::bigint = (new.samp_id_part_of)::bigint)), new.pers_id_modifier, new.modification_timestamp); ); -- --- Name: sample_container_remove_update; Type: RULE; Schema: public; Owner: - +-- Name: samples_all sample_container_remove_update; Type: RULE; Schema: public; Owner: - -- CREATE RULE sample_container_remove_update AS - ON UPDATE TO samples_all - WHERE ((old.samp_id_part_of IS NOT NULL) AND (new.samp_id_part_of IS NULL)) DO UPDATE sample_relationships_history SET valid_until_timestamp = new.modification_timestamp + ON UPDATE TO public.samples_all + WHERE ((old.samp_id_part_of IS NOT NULL) AND (new.samp_id_part_of IS NULL)) DO UPDATE public.sample_relationships_history SET valid_until_timestamp = new.modification_timestamp WHERE ((((sample_relationships_history.main_samp_id)::bigint = (old.samp_id_part_of)::bigint) AND ((sample_relationships_history.samp_id)::bigint = (old.id)::bigint) AND (sample_relationships_history.valid_until_timestamp IS NULL) AND ((sample_relationships_history.relation_type)::text = 'CONTAINER'::text)) OR (((sample_relationships_history.main_samp_id)::bigint = (old.id)::bigint) AND ((sample_relationships_history.samp_id)::bigint = (old.samp_id_part_of)::bigint) AND (sample_relationships_history.valid_until_timestamp IS NULL) AND ((sample_relationships_history.relation_type)::text = 'CONTAINED'::text))); -- --- Name: sample_container_update; Type: RULE; Schema: public; Owner: - +-- Name: samples_all sample_container_update; Type: RULE; Schema: public; Owner: - -- CREATE RULE sample_container_update AS - ON UPDATE TO samples_all - WHERE ((((old.samp_id_part_of)::bigint <> (new.samp_id_part_of)::bigint) OR (old.samp_id_part_of IS NULL)) AND (new.samp_id_part_of IS NOT NULL)) DO ( UPDATE sample_relationships_history SET valid_until_timestamp = new.modification_timestamp + ON UPDATE TO public.samples_all + WHERE ((((old.samp_id_part_of)::bigint <> (new.samp_id_part_of)::bigint) OR (old.samp_id_part_of IS NULL)) AND (new.samp_id_part_of IS NOT NULL)) DO ( UPDATE public.sample_relationships_history SET valid_until_timestamp = new.modification_timestamp WHERE ((((sample_relationships_history.main_samp_id)::bigint = (old.samp_id_part_of)::bigint) AND ((sample_relationships_history.samp_id)::bigint = (old.id)::bigint) AND (sample_relationships_history.valid_until_timestamp IS NULL) AND ((sample_relationships_history.relation_type)::text = 'CONTAINER'::text)) OR (((sample_relationships_history.main_samp_id)::bigint = (old.id)::bigint) AND ((sample_relationships_history.samp_id)::bigint = (old.samp_id_part_of)::bigint) AND (sample_relationships_history.valid_until_timestamp IS NULL) AND ((sample_relationships_history.relation_type)::text = 'CONTAINED'::text))); - INSERT INTO sample_relationships_history (id, main_samp_id, relation_type, samp_id, entity_perm_id, pers_id_author, valid_from_timestamp) - VALUES (nextval('sample_relationships_history_id_seq'::regclass), new.samp_id_part_of, 'CONTAINER'::text, new.id, new.perm_id, new.pers_id_modifier, new.modification_timestamp); - INSERT INTO sample_relationships_history (id, main_samp_id, relation_type, samp_id, entity_perm_id, pers_id_author, valid_from_timestamp) - VALUES (nextval('sample_relationships_history_id_seq'::regclass), new.id, 'CONTAINED'::text, new.samp_id_part_of, ( SELECT samples_all.perm_id - FROM samples_all + INSERT INTO public.sample_relationships_history (id, main_samp_id, relation_type, samp_id, entity_perm_id, pers_id_author, valid_from_timestamp) + VALUES (nextval('public.sample_relationships_history_id_seq'::regclass), new.samp_id_part_of, 'CONTAINER'::text, new.id, new.perm_id, new.pers_id_modifier, new.modification_timestamp); + INSERT INTO public.sample_relationships_history (id, main_samp_id, relation_type, samp_id, entity_perm_id, pers_id_author, valid_from_timestamp) + VALUES (nextval('public.sample_relationships_history_id_seq'::regclass), new.id, 'CONTAINED'::text, new.samp_id_part_of, ( SELECT samples_all.perm_id + FROM public.samples_all WHERE ((samples_all.id)::bigint = (new.samp_id_part_of)::bigint)), new.pers_id_modifier, new.modification_timestamp); ); -- --- Name: sample_delete; Type: RULE; Schema: public; Owner: - +-- Name: samples sample_delete; Type: RULE; Schema: public; Owner: - -- CREATE RULE sample_delete AS - ON DELETE TO samples DO INSTEAD DELETE FROM samples_all + ON DELETE TO public.samples DO INSTEAD DELETE FROM public.samples_all WHERE ((samples_all.id)::bigint = (old.id)::bigint); -- --- Name: sample_deleted_delete; Type: RULE; Schema: public; Owner: - +-- Name: samples_deleted sample_deleted_delete; Type: RULE; Schema: public; Owner: - -- CREATE RULE sample_deleted_delete AS - ON DELETE TO samples_deleted DO INSTEAD DELETE FROM samples_all + ON DELETE TO public.samples_deleted DO INSTEAD DELETE FROM public.samples_all WHERE ((samples_all.id)::bigint = (old.id)::bigint); -- --- Name: sample_deleted_update; Type: RULE; Schema: public; Owner: - +-- Name: samples_deleted sample_deleted_update; Type: RULE; Schema: public; Owner: - -- CREATE RULE sample_deleted_update AS - ON UPDATE TO samples_deleted DO INSTEAD UPDATE samples_all SET del_id = new.del_id, orig_del = new.orig_del, modification_timestamp = new.modification_timestamp, version = new.version + ON UPDATE TO public.samples_deleted DO INSTEAD UPDATE public.samples_all SET del_id = new.del_id, orig_del = new.orig_del, modification_timestamp = new.modification_timestamp, version = new.version WHERE ((samples_all.id)::bigint = (new.id)::bigint); -- --- Name: sample_experiment_delete; Type: RULE; Schema: public; Owner: - +-- Name: samples_all sample_experiment_delete; Type: RULE; Schema: public; Owner: - -- CREATE RULE sample_experiment_delete AS - ON DELETE TO samples_all - WHERE (old.expe_id IS NOT NULL) DO UPDATE experiment_relationships_history SET valid_until_timestamp = now() + ON DELETE TO public.samples_all + WHERE (old.expe_id IS NOT NULL) DO UPDATE public.experiment_relationships_history SET valid_until_timestamp = now() WHERE (((experiment_relationships_history.main_expe_id)::bigint = (old.expe_id)::bigint) AND ((experiment_relationships_history.samp_id)::bigint = (old.id)::bigint) AND (experiment_relationships_history.valid_until_timestamp IS NULL)); -- --- Name: sample_experiment_insert; Type: RULE; Schema: public; Owner: - +-- Name: samples_all sample_experiment_insert; Type: RULE; Schema: public; Owner: - -- CREATE RULE sample_experiment_insert AS - ON INSERT TO samples_all - WHERE (new.expe_id IS NOT NULL) DO ( INSERT INTO experiment_relationships_history (id, main_expe_id, relation_type, samp_id, entity_perm_id, pers_id_author, valid_from_timestamp) - VALUES (nextval('experiment_relationships_history_id_seq'::regclass), new.expe_id, 'OWNER'::text, new.id, new.perm_id, new.pers_id_modifier, new.modification_timestamp); - INSERT INTO sample_relationships_history (id, main_samp_id, relation_type, expe_id, entity_perm_id, pers_id_author, valid_from_timestamp) - VALUES (nextval('sample_relationships_history_id_seq'::regclass), new.id, 'OWNED'::text, new.expe_id, ( SELECT experiments_all.perm_id - FROM experiments_all + ON INSERT TO public.samples_all + WHERE (new.expe_id IS NOT NULL) DO ( INSERT INTO public.experiment_relationships_history (id, main_expe_id, relation_type, samp_id, entity_perm_id, pers_id_author, valid_from_timestamp) + VALUES (nextval('public.experiment_relationships_history_id_seq'::regclass), new.expe_id, 'OWNER'::text, new.id, new.perm_id, new.pers_id_modifier, new.modification_timestamp); + INSERT INTO public.sample_relationships_history (id, main_samp_id, relation_type, expe_id, entity_perm_id, pers_id_author, valid_from_timestamp) + VALUES (nextval('public.sample_relationships_history_id_seq'::regclass), new.id, 'OWNED'::text, new.expe_id, ( SELECT experiments_all.perm_id + FROM public.experiments_all WHERE ((experiments_all.id)::bigint = (new.expe_id)::bigint)), new.pers_id_modifier, new.modification_timestamp); ); -- --- Name: sample_experiment_remove_update; Type: RULE; Schema: public; Owner: - +-- Name: samples_all sample_experiment_remove_update; Type: RULE; Schema: public; Owner: - -- CREATE RULE sample_experiment_remove_update AS - ON UPDATE TO samples_all - WHERE ((old.expe_id IS NOT NULL) AND (new.expe_id IS NULL)) DO ( UPDATE experiment_relationships_history SET valid_until_timestamp = new.modification_timestamp + ON UPDATE TO public.samples_all + WHERE ((old.expe_id IS NOT NULL) AND (new.expe_id IS NULL)) DO ( UPDATE public.experiment_relationships_history SET valid_until_timestamp = new.modification_timestamp WHERE (((experiment_relationships_history.main_expe_id)::bigint = (old.expe_id)::bigint) AND ((experiment_relationships_history.samp_id)::bigint = (old.id)::bigint) AND (experiment_relationships_history.valid_until_timestamp IS NULL)); - UPDATE sample_relationships_history SET valid_until_timestamp = new.modification_timestamp + UPDATE public.sample_relationships_history SET valid_until_timestamp = new.modification_timestamp WHERE (((sample_relationships_history.main_samp_id)::bigint = (old.id)::bigint) AND ((sample_relationships_history.expe_id)::bigint = (old.expe_id)::bigint) AND (sample_relationships_history.valid_until_timestamp IS NULL)); ); -- --- Name: sample_experiment_update; Type: RULE; Schema: public; Owner: - +-- Name: samples_all sample_experiment_update; Type: RULE; Schema: public; Owner: - -- CREATE RULE sample_experiment_update AS - ON UPDATE TO samples_all - WHERE ((((old.expe_id)::bigint <> (new.expe_id)::bigint) OR (old.expe_id IS NULL)) AND (new.expe_id IS NOT NULL)) DO ( UPDATE experiment_relationships_history SET valid_until_timestamp = new.modification_timestamp + ON UPDATE TO public.samples_all + WHERE ((((old.expe_id)::bigint <> (new.expe_id)::bigint) OR (old.expe_id IS NULL)) AND (new.expe_id IS NOT NULL)) DO ( UPDATE public.experiment_relationships_history SET valid_until_timestamp = new.modification_timestamp WHERE (((experiment_relationships_history.main_expe_id)::bigint = (old.expe_id)::bigint) AND ((experiment_relationships_history.samp_id)::bigint = (old.id)::bigint) AND (experiment_relationships_history.valid_until_timestamp IS NULL)); - INSERT INTO experiment_relationships_history (id, main_expe_id, relation_type, samp_id, entity_perm_id, pers_id_author, valid_from_timestamp) - VALUES (nextval('experiment_relationships_history_id_seq'::regclass), new.expe_id, 'OWNER'::text, new.id, new.perm_id, new.pers_id_modifier, new.modification_timestamp); - UPDATE sample_relationships_history SET valid_until_timestamp = new.modification_timestamp + INSERT INTO public.experiment_relationships_history (id, main_expe_id, relation_type, samp_id, entity_perm_id, pers_id_author, valid_from_timestamp) + VALUES (nextval('public.experiment_relationships_history_id_seq'::regclass), new.expe_id, 'OWNER'::text, new.id, new.perm_id, new.pers_id_modifier, new.modification_timestamp); + UPDATE public.sample_relationships_history SET valid_until_timestamp = new.modification_timestamp WHERE (((sample_relationships_history.main_samp_id)::bigint = (old.id)::bigint) AND ((sample_relationships_history.expe_id)::bigint = (old.expe_id)::bigint) AND (sample_relationships_history.valid_until_timestamp IS NULL)); - INSERT INTO sample_relationships_history (id, main_samp_id, relation_type, expe_id, entity_perm_id, pers_id_author, valid_from_timestamp) - VALUES (nextval('sample_relationships_history_id_seq'::regclass), new.id, 'OWNED'::text, new.expe_id, ( SELECT experiments_all.perm_id - FROM experiments_all + INSERT INTO public.sample_relationships_history (id, main_samp_id, relation_type, expe_id, entity_perm_id, pers_id_author, valid_from_timestamp) + VALUES (nextval('public.sample_relationships_history_id_seq'::regclass), new.id, 'OWNED'::text, new.expe_id, ( SELECT experiments_all.perm_id + FROM public.experiments_all WHERE ((experiments_all.id)::bigint = (new.expe_id)::bigint)), new.pers_id_modifier, new.modification_timestamp); ); -- --- Name: sample_insert; Type: RULE; Schema: public; Owner: - +-- Name: samples sample_insert; Type: RULE; Schema: public; Owner: - -- CREATE RULE sample_insert AS - ON INSERT TO samples DO INSTEAD INSERT INTO samples_all (id, code, del_id, orig_del, expe_id, proj_id, modification_timestamp, perm_id, pers_id_registerer, pers_id_modifier, registration_timestamp, samp_id_part_of, saty_id, space_id, version) + ON INSERT TO public.samples DO INSTEAD INSERT INTO public.samples_all (id, code, del_id, orig_del, expe_id, proj_id, modification_timestamp, perm_id, pers_id_registerer, pers_id_modifier, registration_timestamp, samp_id_part_of, saty_id, space_id, version) VALUES (new.id, new.code, new.del_id, new.orig_del, new.expe_id, new.proj_id, new.modification_timestamp, new.perm_id, new.pers_id_registerer, new.pers_id_modifier, new.registration_timestamp, new.samp_id_part_of, new.saty_id, new.space_id, new.version); -- --- Name: sample_parent_child_delete; Type: RULE; Schema: public; Owner: - +-- Name: sample_relationships_all sample_parent_child_delete; Type: RULE; Schema: public; Owner: - -- CREATE RULE sample_parent_child_delete AS - ON DELETE TO sample_relationships_all - WHERE (old.del_id IS NULL) DO UPDATE sample_relationships_history SET valid_until_timestamp = now() + ON DELETE TO public.sample_relationships_all + WHERE (old.del_id IS NULL) DO UPDATE public.sample_relationships_history SET valid_until_timestamp = now() WHERE ((((sample_relationships_history.main_samp_id)::bigint = (old.sample_id_parent)::bigint) AND ((sample_relationships_history.samp_id)::bigint = (old.sample_id_child)::bigint) AND (sample_relationships_history.valid_until_timestamp IS NULL)) OR (((sample_relationships_history.main_samp_id)::bigint = (old.sample_id_child)::bigint) AND ((sample_relationships_history.samp_id)::bigint = (old.sample_id_parent)::bigint) AND (sample_relationships_history.valid_until_timestamp IS NULL))); -- --- Name: sample_parent_child_insert; Type: RULE; Schema: public; Owner: - +-- Name: sample_relationships_all sample_parent_child_insert; Type: RULE; Schema: public; Owner: - -- CREATE RULE sample_parent_child_insert AS - ON INSERT TO sample_relationships_all - WHERE (new.del_id IS NULL) DO ( INSERT INTO sample_relationships_history (id, main_samp_id, relation_type, samp_id, entity_perm_id, pers_id_author, valid_from_timestamp) - VALUES (nextval('sample_relationships_history_id_seq'::regclass), new.sample_id_parent, 'PARENT'::text, new.sample_id_child, ( SELECT samples_all.perm_id - FROM samples_all + ON INSERT TO public.sample_relationships_all + WHERE (new.del_id IS NULL) DO ( INSERT INTO public.sample_relationships_history (id, main_samp_id, relation_type, samp_id, entity_perm_id, pers_id_author, valid_from_timestamp) + VALUES (nextval('public.sample_relationships_history_id_seq'::regclass), new.sample_id_parent, 'PARENT'::text, new.sample_id_child, ( SELECT samples_all.perm_id + FROM public.samples_all WHERE ((samples_all.id)::bigint = (new.sample_id_child)::bigint)), new.pers_id_author, new.modification_timestamp); - INSERT INTO sample_relationships_history (id, main_samp_id, relation_type, samp_id, entity_perm_id, pers_id_author, valid_from_timestamp) - VALUES (nextval('sample_relationships_history_id_seq'::regclass), new.sample_id_child, 'CHILD'::text, new.sample_id_parent, ( SELECT samples_all.perm_id - FROM samples_all + INSERT INTO public.sample_relationships_history (id, main_samp_id, relation_type, samp_id, entity_perm_id, pers_id_author, valid_from_timestamp) + VALUES (nextval('public.sample_relationships_history_id_seq'::regclass), new.sample_id_child, 'CHILD'::text, new.sample_id_parent, ( SELECT samples_all.perm_id + FROM public.samples_all WHERE ((samples_all.id)::bigint = (new.sample_id_parent)::bigint)), new.pers_id_author, new.modification_timestamp); ); -- --- Name: sample_parent_child_revert_update; Type: RULE; Schema: public; Owner: - +-- Name: sample_relationships_all sample_parent_child_revert_update; Type: RULE; Schema: public; Owner: - -- CREATE RULE sample_parent_child_revert_update AS - ON UPDATE TO sample_relationships_all - WHERE ((new.del_id IS NULL) AND (old.del_id IS NOT NULL)) DO ( INSERT INTO sample_relationships_history (id, main_samp_id, relation_type, samp_id, entity_perm_id, pers_id_author, valid_from_timestamp) - VALUES (nextval('sample_relationships_history_id_seq'::regclass), new.sample_id_parent, 'PARENT'::text, new.sample_id_child, ( SELECT samples_all.perm_id - FROM samples_all + ON UPDATE TO public.sample_relationships_all + WHERE ((new.del_id IS NULL) AND (old.del_id IS NOT NULL)) DO ( INSERT INTO public.sample_relationships_history (id, main_samp_id, relation_type, samp_id, entity_perm_id, pers_id_author, valid_from_timestamp) + VALUES (nextval('public.sample_relationships_history_id_seq'::regclass), new.sample_id_parent, 'PARENT'::text, new.sample_id_child, ( SELECT samples_all.perm_id + FROM public.samples_all WHERE ((samples_all.id)::bigint = (new.sample_id_child)::bigint)), new.pers_id_author, new.modification_timestamp); - INSERT INTO sample_relationships_history (id, main_samp_id, relation_type, samp_id, entity_perm_id, pers_id_author, valid_from_timestamp) - VALUES (nextval('sample_relationships_history_id_seq'::regclass), new.sample_id_child, 'CHILD'::text, new.sample_id_parent, ( SELECT samples_all.perm_id - FROM samples_all + INSERT INTO public.sample_relationships_history (id, main_samp_id, relation_type, samp_id, entity_perm_id, pers_id_author, valid_from_timestamp) + VALUES (nextval('public.sample_relationships_history_id_seq'::regclass), new.sample_id_child, 'CHILD'::text, new.sample_id_parent, ( SELECT samples_all.perm_id + FROM public.samples_all WHERE ((samples_all.id)::bigint = (new.sample_id_parent)::bigint)), new.pers_id_author, new.modification_timestamp); ); -- --- Name: sample_parent_child_update; Type: RULE; Schema: public; Owner: - +-- Name: sample_relationships_all sample_parent_child_update; Type: RULE; Schema: public; Owner: - -- CREATE RULE sample_parent_child_update AS - ON UPDATE TO sample_relationships_all - WHERE ((new.del_id IS NOT NULL) AND (old.del_id IS NULL)) DO UPDATE sample_relationships_history SET valid_until_timestamp = now() + ON UPDATE TO public.sample_relationships_all + WHERE ((new.del_id IS NOT NULL) AND (old.del_id IS NULL)) DO UPDATE public.sample_relationships_history SET valid_until_timestamp = now() WHERE ((((sample_relationships_history.main_samp_id)::bigint = (old.sample_id_parent)::bigint) AND ((sample_relationships_history.samp_id)::bigint = (old.sample_id_child)::bigint) AND (sample_relationships_history.valid_until_timestamp IS NULL)) OR (((sample_relationships_history.main_samp_id)::bigint = (old.sample_id_child)::bigint) AND ((sample_relationships_history.samp_id)::bigint = (old.sample_id_parent)::bigint) AND (sample_relationships_history.valid_until_timestamp IS NULL))); -- --- Name: sample_project_insert; Type: RULE; Schema: public; Owner: - +-- Name: samples_all sample_project_insert; Type: RULE; Schema: public; Owner: - -- CREATE RULE sample_project_insert AS - ON INSERT TO samples_all - WHERE ((new.expe_id IS NULL) AND (new.proj_id IS NOT NULL)) DO INSERT INTO sample_relationships_history (id, main_samp_id, relation_type, proj_id, entity_perm_id, pers_id_author, valid_from_timestamp) - VALUES (nextval('sample_relationships_history_id_seq'::regclass), new.id, 'OWNED'::text, new.proj_id, ( SELECT projects.perm_id - FROM projects + ON INSERT TO public.samples_all + WHERE ((new.expe_id IS NULL) AND (new.proj_id IS NOT NULL)) DO INSERT INTO public.sample_relationships_history (id, main_samp_id, relation_type, proj_id, entity_perm_id, pers_id_author, valid_from_timestamp) + VALUES (nextval('public.sample_relationships_history_id_seq'::regclass), new.id, 'OWNED'::text, new.proj_id, ( SELECT projects.perm_id + FROM public.projects WHERE ((projects.id)::bigint = (new.proj_id)::bigint)), new.pers_id_modifier, new.modification_timestamp); -- --- Name: sample_project_remove_update; Type: RULE; Schema: public; Owner: - +-- Name: samples_all sample_project_remove_update; Type: RULE; Schema: public; Owner: - -- CREATE RULE sample_project_remove_update AS - ON UPDATE TO samples_all - WHERE ((old.proj_id IS NOT NULL) AND ((new.proj_id IS NULL) OR ((old.expe_id IS NULL) AND (new.expe_id IS NOT NULL)))) DO UPDATE sample_relationships_history SET valid_until_timestamp = new.modification_timestamp + ON UPDATE TO public.samples_all + WHERE ((old.proj_id IS NOT NULL) AND ((new.proj_id IS NULL) OR ((old.expe_id IS NULL) AND (new.expe_id IS NOT NULL)))) DO UPDATE public.sample_relationships_history SET valid_until_timestamp = new.modification_timestamp WHERE (((sample_relationships_history.main_samp_id)::bigint = (old.id)::bigint) AND ((sample_relationships_history.proj_id)::bigint = (old.proj_id)::bigint) AND (sample_relationships_history.valid_until_timestamp IS NULL)); -- --- Name: sample_project_update; Type: RULE; Schema: public; Owner: - +-- Name: samples_all sample_project_update; Type: RULE; Schema: public; Owner: - -- CREATE RULE sample_project_update AS - ON UPDATE TO samples_all - WHERE ((((old.proj_id)::bigint <> (new.proj_id)::bigint) OR (old.proj_id IS NULL) OR (old.expe_id IS NOT NULL)) AND (new.proj_id IS NOT NULL) AND (new.expe_id IS NULL)) DO ( UPDATE sample_relationships_history SET valid_until_timestamp = new.modification_timestamp + ON UPDATE TO public.samples_all + WHERE ((((old.proj_id)::bigint <> (new.proj_id)::bigint) OR (old.proj_id IS NULL) OR (old.expe_id IS NOT NULL)) AND (new.proj_id IS NOT NULL) AND (new.expe_id IS NULL)) DO ( UPDATE public.sample_relationships_history SET valid_until_timestamp = new.modification_timestamp WHERE (((sample_relationships_history.main_samp_id)::bigint = (old.id)::bigint) AND ((sample_relationships_history.proj_id)::bigint = (old.proj_id)::bigint) AND (sample_relationships_history.valid_until_timestamp IS NULL)); - INSERT INTO sample_relationships_history (id, main_samp_id, relation_type, proj_id, entity_perm_id, pers_id_author, valid_from_timestamp) - VALUES (nextval('sample_relationships_history_id_seq'::regclass), new.id, 'OWNED'::text, new.proj_id, ( SELECT projects.perm_id - FROM projects + INSERT INTO public.sample_relationships_history (id, main_samp_id, relation_type, proj_id, entity_perm_id, pers_id_author, valid_from_timestamp) + VALUES (nextval('public.sample_relationships_history_id_seq'::regclass), new.id, 'OWNED'::text, new.proj_id, ( SELECT projects.perm_id + FROM public.projects WHERE ((projects.id)::bigint = (new.proj_id)::bigint)), new.pers_id_modifier, new.modification_timestamp); ); -- --- Name: sample_properties_delete; Type: RULE; Schema: public; Owner: - +-- Name: sample_properties sample_properties_delete; Type: RULE; Schema: public; Owner: - -- CREATE RULE sample_properties_delete AS - ON DELETE TO sample_properties + ON DELETE TO public.sample_properties WHERE ((((old.value IS NOT NULL) AND (decode(replace("substring"((old.value)::text, 1, 1), '\'::text, '\\'::text), 'escape'::text) <> '\xefbfbd'::bytea)) OR (old.cvte_id IS NOT NULL) OR (old.mate_prop_id IS NOT NULL)) AND (( SELECT samples_all.del_id - FROM samples_all - WHERE ((samples_all.id)::bigint = (old.samp_id)::bigint)) IS NULL)) DO INSERT INTO sample_properties_history (id, samp_id, stpt_id, value, vocabulary_term, material, pers_id_author, valid_from_timestamp, valid_until_timestamp) - VALUES (nextval('sample_property_id_seq'::regclass), old.samp_id, old.stpt_id, old.value, ( SELECT ((((t.code)::text || ' ['::text) || (v.code)::text) || ']'::text) - FROM (controlled_vocabulary_terms t - JOIN controlled_vocabularies v ON (((t.covo_id)::bigint = (v.id)::bigint))) + FROM public.samples_all + WHERE ((samples_all.id)::bigint = (old.samp_id)::bigint)) IS NULL)) DO INSERT INTO public.sample_properties_history (id, samp_id, stpt_id, value, vocabulary_term, material, pers_id_author, valid_from_timestamp, valid_until_timestamp) + VALUES (nextval('public.sample_property_id_seq'::regclass), old.samp_id, old.stpt_id, old.value, ( SELECT ((((t.code)::text || ' ['::text) || (v.code)::text) || ']'::text) + FROM (public.controlled_vocabulary_terms t + JOIN public.controlled_vocabularies v ON (((t.covo_id)::bigint = (v.id)::bigint))) WHERE ((t.id)::bigint = (old.cvte_id)::bigint)), ( SELECT ((((m.code)::text || ' ['::text) || (mt.code)::text) || ']'::text) - FROM (materials m - JOIN material_types mt ON (((m.maty_id)::bigint = (mt.id)::bigint))) + FROM (public.materials m + JOIN public.material_types mt ON (((m.maty_id)::bigint = (mt.id)::bigint))) WHERE ((m.id)::bigint = (old.mate_prop_id)::bigint)), old.pers_id_author, old.modification_timestamp, now()); -- --- Name: sample_properties_update; Type: RULE; Schema: public; Owner: - +-- Name: sample_properties sample_properties_update; Type: RULE; Schema: public; Owner: - -- CREATE RULE sample_properties_update AS - ON UPDATE TO sample_properties - WHERE (((old.value IS NOT NULL) AND (decode(replace("substring"((old.value)::text, 1, 1), '\'::text, '\\'::text), 'escape'::text) <> '\xefbfbd'::bytea) AND ((old.value)::text <> (new.value)::text)) OR ((old.cvte_id IS NOT NULL) AND ((old.cvte_id)::bigint <> (new.cvte_id)::bigint)) OR ((old.mate_prop_id IS NOT NULL) AND ((old.mate_prop_id)::bigint <> (new.mate_prop_id)::bigint))) DO INSERT INTO sample_properties_history (id, samp_id, stpt_id, value, vocabulary_term, material, pers_id_author, valid_from_timestamp, valid_until_timestamp) - VALUES (nextval('sample_property_id_seq'::regclass), old.samp_id, old.stpt_id, old.value, ( SELECT ((((t.code)::text || ' ['::text) || (v.code)::text) || ']'::text) - FROM (controlled_vocabulary_terms t - JOIN controlled_vocabularies v ON (((t.covo_id)::bigint = (v.id)::bigint))) + ON UPDATE TO public.sample_properties + WHERE (((old.value IS NOT NULL) AND (decode(replace("substring"((old.value)::text, 1, 1), '\'::text, '\\'::text), 'escape'::text) <> '\xefbfbd'::bytea) AND ((old.value)::text <> (new.value)::text)) OR ((old.cvte_id IS NOT NULL) AND ((old.cvte_id)::bigint <> (new.cvte_id)::bigint)) OR ((old.mate_prop_id IS NOT NULL) AND ((old.mate_prop_id)::bigint <> (new.mate_prop_id)::bigint))) DO INSERT INTO public.sample_properties_history (id, samp_id, stpt_id, value, vocabulary_term, material, pers_id_author, valid_from_timestamp, valid_until_timestamp) + VALUES (nextval('public.sample_property_id_seq'::regclass), old.samp_id, old.stpt_id, old.value, ( SELECT ((((t.code)::text || ' ['::text) || (v.code)::text) || ']'::text) + FROM (public.controlled_vocabulary_terms t + JOIN public.controlled_vocabularies v ON (((t.covo_id)::bigint = (v.id)::bigint))) WHERE ((t.id)::bigint = (old.cvte_id)::bigint)), ( SELECT ((((m.code)::text || ' ['::text) || (mt.code)::text) || ']'::text) - FROM (materials m - JOIN material_types mt ON (((m.maty_id)::bigint = (mt.id)::bigint))) + FROM (public.materials m + JOIN public.material_types mt ON (((m.maty_id)::bigint = (mt.id)::bigint))) WHERE ((m.id)::bigint = (old.mate_prop_id)::bigint)), old.pers_id_author, old.modification_timestamp, new.modification_timestamp); -- --- Name: sample_relationships_delete; Type: RULE; Schema: public; Owner: - +-- Name: sample_relationships sample_relationships_delete; Type: RULE; Schema: public; Owner: - -- CREATE RULE sample_relationships_delete AS - ON DELETE TO sample_relationships DO INSTEAD DELETE FROM sample_relationships_all + ON DELETE TO public.sample_relationships DO INSTEAD DELETE FROM public.sample_relationships_all WHERE ((sample_relationships_all.id)::bigint = (old.id)::bigint); -- --- Name: sample_relationships_insert; Type: RULE; Schema: public; Owner: - +-- Name: sample_relationships sample_relationships_insert; Type: RULE; Schema: public; Owner: - -- CREATE RULE sample_relationships_insert AS - ON INSERT TO sample_relationships DO INSTEAD INSERT INTO sample_relationships_all (id, sample_id_parent, relationship_id, sample_id_child, pers_id_author, registration_timestamp, modification_timestamp) + ON INSERT TO public.sample_relationships DO INSTEAD INSERT INTO public.sample_relationships_all (id, sample_id_parent, relationship_id, sample_id_child, pers_id_author, registration_timestamp, modification_timestamp) VALUES (new.id, new.sample_id_parent, new.relationship_id, new.sample_id_child, new.pers_id_author, new.registration_timestamp, new.modification_timestamp); -- --- Name: sample_relationships_update; Type: RULE; Schema: public; Owner: - +-- Name: sample_relationships sample_relationships_update; Type: RULE; Schema: public; Owner: - -- CREATE RULE sample_relationships_update AS - ON UPDATE TO sample_relationships DO INSTEAD UPDATE sample_relationships_all SET sample_id_parent = new.sample_id_parent, relationship_id = new.relationship_id, sample_id_child = new.sample_id_child, del_id = new.del_id, pers_id_author = new.pers_id_author, registration_timestamp = new.registration_timestamp, modification_timestamp = new.modification_timestamp + ON UPDATE TO public.sample_relationships DO INSTEAD UPDATE public.sample_relationships_all SET sample_id_parent = new.sample_id_parent, relationship_id = new.relationship_id, sample_id_child = new.sample_id_child, del_id = new.del_id, pers_id_author = new.pers_id_author, registration_timestamp = new.registration_timestamp, modification_timestamp = new.modification_timestamp WHERE ((sample_relationships_all.id)::bigint = (new.id)::bigint); -- --- Name: sample_space_insert; Type: RULE; Schema: public; Owner: - +-- Name: samples_all sample_space_insert; Type: RULE; Schema: public; Owner: - -- CREATE RULE sample_space_insert AS - ON INSERT TO samples_all - WHERE ((new.expe_id IS NULL) AND (new.space_id IS NOT NULL) AND (new.proj_id IS NULL)) DO INSERT INTO sample_relationships_history (id, main_samp_id, relation_type, space_id, entity_perm_id, pers_id_author, valid_from_timestamp) - VALUES (nextval('sample_relationships_history_id_seq'::regclass), new.id, 'OWNED'::text, new.space_id, ( SELECT spaces.code - FROM spaces + ON INSERT TO public.samples_all + WHERE ((new.expe_id IS NULL) AND (new.space_id IS NOT NULL) AND (new.proj_id IS NULL)) DO INSERT INTO public.sample_relationships_history (id, main_samp_id, relation_type, space_id, entity_perm_id, pers_id_author, valid_from_timestamp) + VALUES (nextval('public.sample_relationships_history_id_seq'::regclass), new.id, 'OWNED'::text, new.space_id, ( SELECT spaces.code + FROM public.spaces WHERE ((spaces.id)::bigint = (new.space_id)::bigint)), new.pers_id_modifier, new.modification_timestamp); -- --- Name: sample_space_remove_update; Type: RULE; Schema: public; Owner: - +-- Name: samples_all sample_space_remove_update; Type: RULE; Schema: public; Owner: - -- CREATE RULE sample_space_remove_update AS - ON UPDATE TO samples_all - WHERE ((old.space_id IS NOT NULL) AND ((new.space_id IS NULL) OR ((old.expe_id IS NULL) AND (new.expe_id IS NOT NULL)) OR ((old.proj_id IS NULL) AND (new.proj_id IS NOT NULL)))) DO UPDATE sample_relationships_history SET valid_until_timestamp = new.modification_timestamp + ON UPDATE TO public.samples_all + WHERE ((old.space_id IS NOT NULL) AND ((new.space_id IS NULL) OR ((old.expe_id IS NULL) AND (new.expe_id IS NOT NULL)) OR ((old.proj_id IS NULL) AND (new.proj_id IS NOT NULL)))) DO UPDATE public.sample_relationships_history SET valid_until_timestamp = new.modification_timestamp WHERE (((sample_relationships_history.main_samp_id)::bigint = (old.id)::bigint) AND ((sample_relationships_history.space_id)::bigint = (old.space_id)::bigint) AND (sample_relationships_history.valid_until_timestamp IS NULL)); -- --- Name: sample_space_update; Type: RULE; Schema: public; Owner: - +-- Name: samples_all sample_space_update; Type: RULE; Schema: public; Owner: - -- CREATE RULE sample_space_update AS - ON UPDATE TO samples_all - WHERE ((((old.space_id)::bigint <> (new.space_id)::bigint) OR (old.space_id IS NULL) OR (old.expe_id IS NOT NULL) OR (old.proj_id IS NOT NULL)) AND (new.space_id IS NOT NULL) AND (new.expe_id IS NULL) AND (new.proj_id IS NULL)) DO ( UPDATE sample_relationships_history SET valid_until_timestamp = new.modification_timestamp + ON UPDATE TO public.samples_all + WHERE ((((old.space_id)::bigint <> (new.space_id)::bigint) OR (old.space_id IS NULL) OR (old.expe_id IS NOT NULL) OR (old.proj_id IS NOT NULL)) AND (new.space_id IS NOT NULL) AND (new.expe_id IS NULL) AND (new.proj_id IS NULL)) DO ( UPDATE public.sample_relationships_history SET valid_until_timestamp = new.modification_timestamp WHERE (((sample_relationships_history.main_samp_id)::bigint = (old.id)::bigint) AND ((sample_relationships_history.space_id)::bigint = (old.space_id)::bigint) AND (sample_relationships_history.valid_until_timestamp IS NULL)); - INSERT INTO sample_relationships_history (id, main_samp_id, relation_type, space_id, entity_perm_id, pers_id_author, valid_from_timestamp) - VALUES (nextval('sample_relationships_history_id_seq'::regclass), new.id, 'OWNED'::text, new.space_id, ( SELECT spaces.code - FROM spaces + INSERT INTO public.sample_relationships_history (id, main_samp_id, relation_type, space_id, entity_perm_id, pers_id_author, valid_from_timestamp) + VALUES (nextval('public.sample_relationships_history_id_seq'::regclass), new.id, 'OWNED'::text, new.space_id, ( SELECT spaces.code + FROM public.spaces WHERE ((spaces.id)::bigint = (new.space_id)::bigint)), new.pers_id_modifier, new.modification_timestamp); ); -- --- Name: sample_update; Type: RULE; Schema: public; Owner: - +-- Name: samples sample_update; Type: RULE; Schema: public; Owner: - -- CREATE RULE sample_update AS - ON UPDATE TO samples DO INSTEAD UPDATE samples_all SET code = new.code, del_id = new.del_id, orig_del = new.orig_del, expe_id = new.expe_id, proj_id = new.proj_id, modification_timestamp = new.modification_timestamp, perm_id = new.perm_id, pers_id_registerer = new.pers_id_registerer, pers_id_modifier = new.pers_id_modifier, registration_timestamp = new.registration_timestamp, samp_id_part_of = new.samp_id_part_of, saty_id = new.saty_id, space_id = new.space_id, version = new.version + ON UPDATE TO public.samples DO INSTEAD UPDATE public.samples_all SET code = new.code, del_id = new.del_id, orig_del = new.orig_del, expe_id = new.expe_id, proj_id = new.proj_id, modification_timestamp = new.modification_timestamp, perm_id = new.perm_id, pers_id_registerer = new.pers_id_registerer, pers_id_modifier = new.pers_id_modifier, registration_timestamp = new.registration_timestamp, samp_id_part_of = new.samp_id_part_of, saty_id = new.saty_id, space_id = new.space_id, version = new.version WHERE ((samples_all.id)::bigint = (new.id)::bigint); -- --- Name: check_created_or_modified_data_set_owner_is_alive; Type: TRIGGER; Schema: public; Owner: - --- - -CREATE CONSTRAINT TRIGGER check_created_or_modified_data_set_owner_is_alive AFTER INSERT OR UPDATE ON data_all DEFERRABLE INITIALLY DEFERRED FOR EACH ROW EXECUTE PROCEDURE check_created_or_modified_data_set_owner_is_alive(); - - --- --- Name: check_created_or_modified_sample_owner_is_alive; Type: TRIGGER; Schema: public; Owner: - --- - -CREATE CONSTRAINT TRIGGER check_created_or_modified_sample_owner_is_alive AFTER INSERT OR UPDATE ON samples_all DEFERRABLE INITIALLY DEFERRED FOR EACH ROW EXECUTE PROCEDURE check_created_or_modified_sample_owner_is_alive(); - - --- --- Name: check_data_set_kind_link; Type: TRIGGER; Schema: public; Owner: - --- - -CREATE CONSTRAINT TRIGGER check_data_set_kind_link AFTER INSERT OR UPDATE ON link_data DEFERRABLE INITIALLY DEFERRED FOR EACH ROW EXECUTE PROCEDURE check_data_set_kind_link(); - - --- --- Name: check_data_set_kind_physical; Type: TRIGGER; Schema: public; Owner: - --- - -CREATE CONSTRAINT TRIGGER check_data_set_kind_physical AFTER INSERT OR UPDATE ON external_data DEFERRABLE INITIALLY DEFERRED FOR EACH ROW EXECUTE PROCEDURE check_data_set_kind_physical(); - - --- --- Name: check_deletion_consistency_on_experiment_deletion; Type: TRIGGER; Schema: public; Owner: - +-- Name: data_all check_created_or_modified_data_set_owner_is_alive; Type: TRIGGER; Schema: public; Owner: - -- -CREATE CONSTRAINT TRIGGER check_deletion_consistency_on_experiment_deletion AFTER UPDATE ON experiments_all DEFERRABLE INITIALLY DEFERRED FOR EACH ROW EXECUTE PROCEDURE check_deletion_consistency_on_experiment_deletion(); +CREATE CONSTRAINT TRIGGER check_created_or_modified_data_set_owner_is_alive AFTER INSERT OR UPDATE ON public.data_all DEFERRABLE INITIALLY DEFERRED FOR EACH ROW EXECUTE PROCEDURE public.check_created_or_modified_data_set_owner_is_alive(); -- --- Name: check_deletion_consistency_on_sample_deletion; Type: TRIGGER; Schema: public; Owner: - +-- Name: samples_all check_created_or_modified_sample_owner_is_alive; Type: TRIGGER; Schema: public; Owner: - -- -CREATE CONSTRAINT TRIGGER check_deletion_consistency_on_sample_deletion AFTER UPDATE ON samples_all DEFERRABLE INITIALLY DEFERRED FOR EACH ROW EXECUTE PROCEDURE check_deletion_consistency_on_sample_deletion(); +CREATE CONSTRAINT TRIGGER check_created_or_modified_sample_owner_is_alive AFTER INSERT OR UPDATE ON public.samples_all DEFERRABLE INITIALLY DEFERRED FOR EACH ROW EXECUTE PROCEDURE public.check_created_or_modified_sample_owner_is_alive(); -- --- Name: content_copies_location_type_check; Type: TRIGGER; Schema: public; Owner: - +-- Name: link_data check_data_set_kind_link; Type: TRIGGER; Schema: public; Owner: - -- -CREATE TRIGGER content_copies_location_type_check BEFORE INSERT OR UPDATE ON content_copies FOR EACH ROW EXECUTE PROCEDURE content_copies_location_type_check(); +CREATE CONSTRAINT TRIGGER check_data_set_kind_link AFTER INSERT OR UPDATE ON public.link_data DEFERRABLE INITIALLY DEFERRED FOR EACH ROW EXECUTE PROCEDURE public.check_data_set_kind_link(); -- --- Name: content_copies_uniqueness_check; Type: TRIGGER; Schema: public; Owner: - +-- Name: external_data check_data_set_kind_physical; Type: TRIGGER; Schema: public; Owner: - -- -CREATE TRIGGER content_copies_uniqueness_check BEFORE INSERT OR UPDATE ON content_copies FOR EACH ROW EXECUTE PROCEDURE content_copies_uniqueness_check(); +CREATE CONSTRAINT TRIGGER check_data_set_kind_physical AFTER INSERT OR UPDATE ON public.external_data DEFERRABLE INITIALLY DEFERRED FOR EACH ROW EXECUTE PROCEDURE public.check_data_set_kind_physical(); -- --- Name: controlled_vocabulary_check; Type: TRIGGER; Schema: public; Owner: - +-- Name: experiments_all check_deletion_consistency_on_experiment_deletion; Type: TRIGGER; Schema: public; Owner: - -- -CREATE TRIGGER controlled_vocabulary_check BEFORE INSERT OR UPDATE ON property_types FOR EACH ROW EXECUTE PROCEDURE controlled_vocabulary_check(); +CREATE CONSTRAINT TRIGGER check_deletion_consistency_on_experiment_deletion AFTER UPDATE ON public.experiments_all DEFERRABLE INITIALLY DEFERRED FOR EACH ROW EXECUTE PROCEDURE public.check_deletion_consistency_on_experiment_deletion(); -- --- Name: data_exp_or_sample_link_check; Type: TRIGGER; Schema: public; Owner: - +-- Name: samples_all check_deletion_consistency_on_sample_deletion; Type: TRIGGER; Schema: public; Owner: - -- -CREATE TRIGGER data_exp_or_sample_link_check BEFORE INSERT OR UPDATE ON data_all FOR EACH ROW EXECUTE PROCEDURE data_exp_or_sample_link_check(); +CREATE CONSTRAINT TRIGGER check_deletion_consistency_on_sample_deletion AFTER UPDATE ON public.samples_all DEFERRABLE INITIALLY DEFERRED FOR EACH ROW EXECUTE PROCEDURE public.check_deletion_consistency_on_sample_deletion(); -- --- Name: data_set_property_with_material_data_type_check; Type: TRIGGER; Schema: public; Owner: - +-- Name: content_copies content_copies_location_type_check; Type: TRIGGER; Schema: public; Owner: - -- -CREATE TRIGGER data_set_property_with_material_data_type_check BEFORE INSERT OR UPDATE ON data_set_properties FOR EACH ROW EXECUTE PROCEDURE data_set_property_with_material_data_type_check(); +CREATE TRIGGER content_copies_location_type_check BEFORE INSERT OR UPDATE ON public.content_copies FOR EACH ROW EXECUTE PROCEDURE public.content_copies_location_type_check(); -- --- Name: disable_project_level_samples; Type: TRIGGER; Schema: public; Owner: - +-- Name: content_copies content_copies_uniqueness_check; Type: TRIGGER; Schema: public; Owner: - -- -CREATE TRIGGER disable_project_level_samples BEFORE INSERT OR UPDATE ON samples_all FOR EACH ROW EXECUTE PROCEDURE disable_project_level_samples(); +CREATE TRIGGER content_copies_uniqueness_check BEFORE INSERT OR UPDATE ON public.content_copies FOR EACH ROW EXECUTE PROCEDURE public.content_copies_uniqueness_check(); -- --- Name: experiment_property_with_material_data_type_check; Type: TRIGGER; Schema: public; Owner: - +-- Name: property_types controlled_vocabulary_check; Type: TRIGGER; Schema: public; Owner: - -- -CREATE TRIGGER experiment_property_with_material_data_type_check BEFORE INSERT OR UPDATE ON experiment_properties FOR EACH ROW EXECUTE PROCEDURE experiment_property_with_material_data_type_check(); +CREATE TRIGGER controlled_vocabulary_check BEFORE INSERT OR UPDATE ON public.property_types FOR EACH ROW EXECUTE PROCEDURE public.controlled_vocabulary_check(); -- --- Name: external_data_storage_format_check; Type: TRIGGER; Schema: public; Owner: - +-- Name: data_all data_exp_or_sample_link_check; Type: TRIGGER; Schema: public; Owner: - -- -CREATE TRIGGER external_data_storage_format_check BEFORE INSERT OR UPDATE ON external_data FOR EACH ROW EXECUTE PROCEDURE external_data_storage_format_check(); +CREATE TRIGGER data_exp_or_sample_link_check BEFORE INSERT OR UPDATE ON public.data_all FOR EACH ROW EXECUTE PROCEDURE public.data_exp_or_sample_link_check(); -- --- Name: material_property_with_material_data_type_check; Type: TRIGGER; Schema: public; Owner: - +-- Name: data_set_properties data_set_property_with_material_data_type_check; Type: TRIGGER; Schema: public; Owner: - -- -CREATE TRIGGER material_property_with_material_data_type_check BEFORE INSERT OR UPDATE ON material_properties FOR EACH ROW EXECUTE PROCEDURE material_property_with_material_data_type_check(); +CREATE TRIGGER data_set_property_with_material_data_type_check BEFORE INSERT OR UPDATE ON public.data_set_properties FOR EACH ROW EXECUTE PROCEDURE public.data_set_property_with_material_data_type_check(); -- --- Name: preserve_deletion_consistency_on_data_set_relationships; Type: TRIGGER; Schema: public; Owner: - +-- Name: samples_all disable_project_level_samples; Type: TRIGGER; Schema: public; Owner: - -- -CREATE TRIGGER preserve_deletion_consistency_on_data_set_relationships BEFORE UPDATE ON data_set_relationships_all FOR EACH ROW EXECUTE PROCEDURE preserve_deletion_consistency_on_data_set_relationships(); +CREATE TRIGGER disable_project_level_samples BEFORE INSERT OR UPDATE ON public.samples_all FOR EACH ROW EXECUTE PROCEDURE public.disable_project_level_samples(); -- --- Name: preserve_deletion_consistency_on_sample_relationships; Type: TRIGGER; Schema: public; Owner: - +-- Name: experiment_properties experiment_property_with_material_data_type_check; Type: TRIGGER; Schema: public; Owner: - -- -CREATE TRIGGER preserve_deletion_consistency_on_sample_relationships BEFORE UPDATE ON sample_relationships_all FOR EACH ROW EXECUTE PROCEDURE preserve_deletion_consistency_on_sample_relationships(); +CREATE TRIGGER experiment_property_with_material_data_type_check BEFORE INSERT OR UPDATE ON public.experiment_properties FOR EACH ROW EXECUTE PROCEDURE public.experiment_property_with_material_data_type_check(); -- --- Name: sample_fill_code_unique_check; Type: TRIGGER; Schema: public; Owner: - +-- Name: external_data external_data_storage_format_check; Type: TRIGGER; Schema: public; Owner: - -- -CREATE TRIGGER sample_fill_code_unique_check BEFORE INSERT OR UPDATE ON samples_all FOR EACH ROW EXECUTE PROCEDURE sample_fill_code_unique_check(); +CREATE TRIGGER external_data_storage_format_check BEFORE INSERT OR UPDATE ON public.external_data FOR EACH ROW EXECUTE PROCEDURE public.external_data_storage_format_check(); -- --- Name: sample_fill_subcode_unique_check; Type: TRIGGER; Schema: public; Owner: - +-- Name: material_properties material_property_with_material_data_type_check; Type: TRIGGER; Schema: public; Owner: - -- -CREATE TRIGGER sample_fill_subcode_unique_check BEFORE INSERT OR UPDATE ON samples_all FOR EACH ROW EXECUTE PROCEDURE sample_fill_subcode_unique_check(); +CREATE TRIGGER material_property_with_material_data_type_check BEFORE INSERT OR UPDATE ON public.material_properties FOR EACH ROW EXECUTE PROCEDURE public.material_property_with_material_data_type_check(); -- --- Name: sample_property_with_material_data_type_check; Type: TRIGGER; Schema: public; Owner: - +-- Name: data_set_relationships_all preserve_deletion_consistency_on_data_set_relationships; Type: TRIGGER; Schema: public; Owner: - -- -CREATE TRIGGER sample_property_with_material_data_type_check BEFORE INSERT OR UPDATE ON sample_properties FOR EACH ROW EXECUTE PROCEDURE sample_property_with_material_data_type_check(); +CREATE TRIGGER preserve_deletion_consistency_on_data_set_relationships BEFORE UPDATE ON public.data_set_relationships_all FOR EACH ROW EXECUTE PROCEDURE public.preserve_deletion_consistency_on_data_set_relationships(); -- --- Name: sample_type_fill_subcode_unique_check; Type: TRIGGER; Schema: public; Owner: - +-- Name: sample_relationships_all preserve_deletion_consistency_on_sample_relationships; Type: TRIGGER; Schema: public; Owner: - -- -CREATE TRIGGER sample_type_fill_subcode_unique_check AFTER UPDATE ON sample_types FOR EACH ROW EXECUTE PROCEDURE sample_type_fill_subcode_unique_check(); +CREATE TRIGGER preserve_deletion_consistency_on_sample_relationships BEFORE UPDATE ON public.sample_relationships_all FOR EACH ROW EXECUTE PROCEDURE public.preserve_deletion_consistency_on_sample_relationships(); -- --- Name: ag_pers_fk; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: samples_all sample_fill_code_unique_check; Type: TRIGGER; Schema: public; Owner: - -- -ALTER TABLE ONLY authorization_groups - ADD CONSTRAINT ag_pers_fk FOREIGN KEY (pers_id_registerer) REFERENCES persons(id) DEFERRABLE INITIALLY DEFERRED; +CREATE TRIGGER sample_fill_code_unique_check BEFORE INSERT OR UPDATE ON public.samples_all FOR EACH ROW EXECUTE PROCEDURE public.sample_fill_code_unique_check(); -- --- Name: agp_ag_fk; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: samples_all sample_fill_subcode_unique_check; Type: TRIGGER; Schema: public; Owner: - -- -ALTER TABLE ONLY authorization_group_persons - ADD CONSTRAINT agp_ag_fk FOREIGN KEY (ag_id) REFERENCES authorization_groups(id); +CREATE TRIGGER sample_fill_subcode_unique_check BEFORE INSERT OR UPDATE ON public.samples_all FOR EACH ROW EXECUTE PROCEDURE public.sample_fill_subcode_unique_check(); -- --- Name: agp_pers_fk; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: sample_properties sample_property_with_material_data_type_check; Type: TRIGGER; Schema: public; Owner: - -- -ALTER TABLE ONLY authorization_group_persons - ADD CONSTRAINT agp_pers_fk FOREIGN KEY (pers_id) REFERENCES persons(id) DEFERRABLE INITIALLY DEFERRED; +CREATE TRIGGER sample_property_with_material_data_type_check BEFORE INSERT OR UPDATE ON public.sample_properties FOR EACH ROW EXECUTE PROCEDURE public.sample_property_with_material_data_type_check(); -- --- Name: atta_cont_fk; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: sample_types sample_type_fill_subcode_unique_check; Type: TRIGGER; Schema: public; Owner: - -- -ALTER TABLE ONLY attachments - ADD CONSTRAINT atta_cont_fk FOREIGN KEY (exac_id) REFERENCES attachment_contents(id); +CREATE TRIGGER sample_type_fill_subcode_unique_check AFTER UPDATE ON public.sample_types FOR EACH ROW EXECUTE PROCEDURE public.sample_type_fill_subcode_unique_check(); -- --- Name: atta_expe_fk; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: authorization_groups ag_pers_fk; Type: FK CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY attachments - ADD CONSTRAINT atta_expe_fk FOREIGN KEY (expe_id) REFERENCES experiments_all(id); +ALTER TABLE ONLY public.authorization_groups + ADD CONSTRAINT ag_pers_fk FOREIGN KEY (pers_id_registerer) REFERENCES public.persons(id) DEFERRABLE INITIALLY DEFERRED; -- --- Name: atta_pers_fk; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: authorization_group_persons agp_ag_fk; Type: FK CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY attachments - ADD CONSTRAINT atta_pers_fk FOREIGN KEY (pers_id_registerer) REFERENCES persons(id) DEFERRABLE INITIALLY DEFERRED; +ALTER TABLE ONLY public.authorization_group_persons + ADD CONSTRAINT agp_ag_fk FOREIGN KEY (ag_id) REFERENCES public.authorization_groups(id); -- --- Name: atta_proj_fk; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: authorization_group_persons agp_pers_fk; Type: FK CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY attachments - ADD CONSTRAINT atta_proj_fk FOREIGN KEY (proj_id) REFERENCES projects(id); +ALTER TABLE ONLY public.authorization_group_persons + ADD CONSTRAINT agp_pers_fk FOREIGN KEY (pers_id) REFERENCES public.persons(id) DEFERRABLE INITIALLY DEFERRED; -- --- Name: atta_samp_fk; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: attachments atta_cont_fk; Type: FK CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY attachments - ADD CONSTRAINT atta_samp_fk FOREIGN KEY (samp_id) REFERENCES samples_all(id); +ALTER TABLE ONLY public.attachments + ADD CONSTRAINT atta_cont_fk FOREIGN KEY (exac_id) REFERENCES public.attachment_contents(id); -- --- Name: coco_data_fk; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: attachments atta_expe_fk; Type: FK CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY content_copies - ADD CONSTRAINT coco_data_fk FOREIGN KEY (data_id) REFERENCES link_data(data_id); +ALTER TABLE ONLY public.attachments + ADD CONSTRAINT atta_expe_fk FOREIGN KEY (expe_id) REFERENCES public.experiments_all(id); -- --- Name: coco_edms_fk; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: attachments atta_pers_fk; Type: FK CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY content_copies - ADD CONSTRAINT coco_edms_fk FOREIGN KEY (edms_id) REFERENCES external_data_management_systems(id); +ALTER TABLE ONLY public.attachments + ADD CONSTRAINT atta_pers_fk FOREIGN KEY (pers_id_registerer) REFERENCES public.persons(id) DEFERRABLE INITIALLY DEFERRED; -- --- Name: covo_pers_fk; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: attachments atta_proj_fk; Type: FK CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY controlled_vocabularies - ADD CONSTRAINT covo_pers_fk FOREIGN KEY (pers_id_registerer) REFERENCES persons(id) DEFERRABLE INITIALLY DEFERRED; +ALTER TABLE ONLY public.attachments + ADD CONSTRAINT atta_proj_fk FOREIGN KEY (proj_id) REFERENCES public.projects(id); -- --- Name: cvte_covo_fk; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: attachments atta_samp_fk; Type: FK CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY controlled_vocabulary_terms - ADD CONSTRAINT cvte_covo_fk FOREIGN KEY (covo_id) REFERENCES controlled_vocabularies(id); +ALTER TABLE ONLY public.attachments + ADD CONSTRAINT atta_samp_fk FOREIGN KEY (samp_id) REFERENCES public.samples_all(id); -- --- Name: cvte_pers_fk; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: content_copies coco_data_fk; Type: FK CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY controlled_vocabulary_terms - ADD CONSTRAINT cvte_pers_fk FOREIGN KEY (pers_id_registerer) REFERENCES persons(id) DEFERRABLE INITIALLY DEFERRED; +ALTER TABLE ONLY public.content_copies + ADD CONSTRAINT coco_data_fk FOREIGN KEY (data_id) REFERENCES public.link_data(id); -- --- Name: data_dast_fk; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: content_copies coco_edms_fk; Type: FK CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY data_all - ADD CONSTRAINT data_dast_fk FOREIGN KEY (dast_id) REFERENCES data_stores(id); +ALTER TABLE ONLY public.content_copies + ADD CONSTRAINT coco_edms_fk FOREIGN KEY (edms_id) REFERENCES public.external_data_management_systems(id); -- --- Name: data_del_fk; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: controlled_vocabularies covo_pers_fk; Type: FK CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY data_all - ADD CONSTRAINT data_del_fk FOREIGN KEY (del_id) REFERENCES deletions(id); +ALTER TABLE ONLY public.controlled_vocabularies + ADD CONSTRAINT covo_pers_fk FOREIGN KEY (pers_id_registerer) REFERENCES public.persons(id) DEFERRABLE INITIALLY DEFERRED; -- --- Name: data_dsty_fk; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: controlled_vocabulary_terms cvte_covo_fk; Type: FK CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY data_all - ADD CONSTRAINT data_dsty_fk FOREIGN KEY (dsty_id) REFERENCES data_set_types(id); +ALTER TABLE ONLY public.controlled_vocabulary_terms + ADD CONSTRAINT cvte_covo_fk FOREIGN KEY (covo_id) REFERENCES public.controlled_vocabularies(id); -- --- Name: data_expe_fk; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: controlled_vocabulary_terms cvte_pers_fk; Type: FK CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY data_all - ADD CONSTRAINT data_expe_fk FOREIGN KEY (expe_id) REFERENCES experiments_all(id); +ALTER TABLE ONLY public.controlled_vocabulary_terms + ADD CONSTRAINT cvte_pers_fk FOREIGN KEY (pers_id_registerer) REFERENCES public.persons(id) DEFERRABLE INITIALLY DEFERRED; -- --- Name: data_pers_fk; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: data_all data_dast_fk; Type: FK CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY data_all - ADD CONSTRAINT data_pers_fk FOREIGN KEY (pers_id_registerer) REFERENCES persons(id) DEFERRABLE INITIALLY DEFERRED; +ALTER TABLE ONLY public.data_all + ADD CONSTRAINT data_dast_fk FOREIGN KEY (dast_id) REFERENCES public.data_stores(id); -- --- Name: data_pers_fk_mod; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: data_all data_del_fk; Type: FK CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY data_all - ADD CONSTRAINT data_pers_fk_mod FOREIGN KEY (pers_id_modifier) REFERENCES persons(id) DEFERRABLE INITIALLY DEFERRED; +ALTER TABLE ONLY public.data_all + ADD CONSTRAINT data_del_fk FOREIGN KEY (del_id) REFERENCES public.deletions(id); -- --- Name: data_samp_fk; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: data_all data_dsty_fk; Type: FK CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY data_all - ADD CONSTRAINT data_samp_fk FOREIGN KEY (samp_id) REFERENCES samples_all(id); +ALTER TABLE ONLY public.data_all + ADD CONSTRAINT data_dsty_fk FOREIGN KEY (dsty_id) REFERENCES public.data_set_types(id); -- --- Name: data_set_relationships_pers_fk; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: data_all data_expe_fk; Type: FK CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY data_set_relationships_all - ADD CONSTRAINT data_set_relationships_pers_fk FOREIGN KEY (pers_id_author) REFERENCES persons(id) DEFERRABLE INITIALLY DEFERRED; +ALTER TABLE ONLY public.data_all + ADD CONSTRAINT data_expe_fk FOREIGN KEY (expe_id) REFERENCES public.experiments_all(id); -- --- Name: datarelh_data_fk; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: data_all data_pers_fk; Type: FK CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY data_set_relationships_history - ADD CONSTRAINT datarelh_data_fk FOREIGN KEY (data_id) REFERENCES data_all(id) ON DELETE SET NULL; +ALTER TABLE ONLY public.data_all + ADD CONSTRAINT data_pers_fk FOREIGN KEY (pers_id_registerer) REFERENCES public.persons(id) DEFERRABLE INITIALLY DEFERRED; -- --- Name: datarelh_expe_fk; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: data_all data_pers_fk_mod; Type: FK CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY data_set_relationships_history - ADD CONSTRAINT datarelh_expe_fk FOREIGN KEY (expe_id) REFERENCES experiments_all(id) ON DELETE SET NULL; +ALTER TABLE ONLY public.data_all + ADD CONSTRAINT data_pers_fk_mod FOREIGN KEY (pers_id_modifier) REFERENCES public.persons(id) DEFERRABLE INITIALLY DEFERRED; -- --- Name: datarelh_main_data_fk; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: data_all data_samp_fk; Type: FK CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY data_set_relationships_history - ADD CONSTRAINT datarelh_main_data_fk FOREIGN KEY (main_data_id) REFERENCES data_all(id) ON DELETE CASCADE; +ALTER TABLE ONLY public.data_all + ADD CONSTRAINT data_samp_fk FOREIGN KEY (samp_id) REFERENCES public.samples_all(id); -- --- Name: datarelh_samp_fk; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: data_set_relationships_all data_set_relationships_pers_fk; Type: FK CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY data_set_relationships_history - ADD CONSTRAINT datarelh_samp_fk FOREIGN KEY (samp_id) REFERENCES samples_all(id) ON DELETE SET NULL; +ALTER TABLE ONLY public.data_set_relationships_all + ADD CONSTRAINT data_set_relationships_pers_fk FOREIGN KEY (pers_id_author) REFERENCES public.persons(id) DEFERRABLE INITIALLY DEFERRED; -- --- Name: del_pers_fk; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: data_set_relationships_history datarelh_data_fk; Type: FK CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY deletions - ADD CONSTRAINT del_pers_fk FOREIGN KEY (pers_id_registerer) REFERENCES persons(id) DEFERRABLE INITIALLY DEFERRED; +ALTER TABLE ONLY public.data_set_relationships_history + ADD CONSTRAINT datarelh_data_fk FOREIGN KEY (data_id) REFERENCES public.data_all(id) ON DELETE SET NULL; -- --- Name: dspr_cvte_fk; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: data_set_relationships_history datarelh_expe_fk; Type: FK CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY data_set_properties - ADD CONSTRAINT dspr_cvte_fk FOREIGN KEY (cvte_id) REFERENCES controlled_vocabulary_terms(id); +ALTER TABLE ONLY public.data_set_relationships_history + ADD CONSTRAINT datarelh_expe_fk FOREIGN KEY (expe_id) REFERENCES public.experiments_all(id) ON DELETE SET NULL; -- --- Name: dspr_ds_fk; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: data_set_relationships_history datarelh_main_data_fk; Type: FK CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY data_set_properties - ADD CONSTRAINT dspr_ds_fk FOREIGN KEY (ds_id) REFERENCES data_all(id); +ALTER TABLE ONLY public.data_set_relationships_history + ADD CONSTRAINT datarelh_main_data_fk FOREIGN KEY (main_data_id) REFERENCES public.data_all(id) ON DELETE CASCADE; -- --- Name: dspr_dstpt_fk; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: data_set_relationships_history datarelh_samp_fk; Type: FK CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY data_set_properties - ADD CONSTRAINT dspr_dstpt_fk FOREIGN KEY (dstpt_id) REFERENCES data_set_type_property_types(id) ON DELETE CASCADE; +ALTER TABLE ONLY public.data_set_relationships_history + ADD CONSTRAINT datarelh_samp_fk FOREIGN KEY (samp_id) REFERENCES public.samples_all(id) ON DELETE SET NULL; -- --- Name: dspr_mapr_fk; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: deletions del_pers_fk; Type: FK CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY data_set_properties - ADD CONSTRAINT dspr_mapr_fk FOREIGN KEY (mate_prop_id) REFERENCES materials(id); +ALTER TABLE ONLY public.deletions + ADD CONSTRAINT del_pers_fk FOREIGN KEY (pers_id_registerer) REFERENCES public.persons(id) DEFERRABLE INITIALLY DEFERRED; -- --- Name: dspr_pers_fk; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: data_set_properties dspr_cvte_fk; Type: FK CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY data_set_properties - ADD CONSTRAINT dspr_pers_fk FOREIGN KEY (pers_id_registerer) REFERENCES persons(id) DEFERRABLE INITIALLY DEFERRED; +ALTER TABLE ONLY public.data_set_properties + ADD CONSTRAINT dspr_cvte_fk FOREIGN KEY (cvte_id) REFERENCES public.controlled_vocabulary_terms(id); -- --- Name: dsprh_ds_fk; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: data_set_properties dspr_ds_fk; Type: FK CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY data_set_properties_history - ADD CONSTRAINT dsprh_ds_fk FOREIGN KEY (ds_id) REFERENCES data_all(id) ON DELETE CASCADE; +ALTER TABLE ONLY public.data_set_properties + ADD CONSTRAINT dspr_ds_fk FOREIGN KEY (ds_id) REFERENCES public.data_all(id); -- --- Name: dsprh_dstpt_fk; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: data_set_properties dspr_dstpt_fk; Type: FK CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY data_set_properties_history - ADD CONSTRAINT dsprh_dstpt_fk FOREIGN KEY (dstpt_id) REFERENCES data_set_type_property_types(id) ON DELETE CASCADE; +ALTER TABLE ONLY public.data_set_properties + ADD CONSTRAINT dspr_dstpt_fk FOREIGN KEY (dstpt_id) REFERENCES public.data_set_type_property_types(id) ON DELETE CASCADE; -- --- Name: dsre_data_fk_child; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: data_set_properties dspr_mapr_fk; Type: FK CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY data_set_relationships_all - ADD CONSTRAINT dsre_data_fk_child FOREIGN KEY (data_id_child) REFERENCES data_all(id) ON DELETE CASCADE; +ALTER TABLE ONLY public.data_set_properties + ADD CONSTRAINT dspr_mapr_fk FOREIGN KEY (mate_prop_id) REFERENCES public.materials(id); -- --- Name: dsre_data_fk_parent; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: data_set_properties dspr_pers_fk; Type: FK CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY data_set_relationships_all - ADD CONSTRAINT dsre_data_fk_parent FOREIGN KEY (data_id_parent) REFERENCES data_all(id) ON DELETE CASCADE; +ALTER TABLE ONLY public.data_set_properties + ADD CONSTRAINT dspr_pers_fk FOREIGN KEY (pers_id_registerer) REFERENCES public.persons(id) DEFERRABLE INITIALLY DEFERRED; -- --- Name: dsre_data_fk_relationship; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: data_set_properties_history dsprh_ds_fk; Type: FK CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY data_set_relationships_all - ADD CONSTRAINT dsre_data_fk_relationship FOREIGN KEY (relationship_id) REFERENCES relationship_types(id); +ALTER TABLE ONLY public.data_set_properties_history + ADD CONSTRAINT dsprh_ds_fk FOREIGN KEY (ds_id) REFERENCES public.data_all(id) ON DELETE CASCADE; -- --- Name: dsre_del_fk; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: data_set_properties_history dsprh_dstpt_fk; Type: FK CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY data_set_relationships_all - ADD CONSTRAINT dsre_del_fk FOREIGN KEY (del_id) REFERENCES deletions(id); +ALTER TABLE ONLY public.data_set_properties_history + ADD CONSTRAINT dsprh_dstpt_fk FOREIGN KEY (dstpt_id) REFERENCES public.data_set_type_property_types(id) ON DELETE CASCADE; -- --- Name: dssdst_ds_fk; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: data_set_relationships_all dsre_data_fk_child; Type: FK CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY data_store_service_data_set_types - ADD CONSTRAINT dssdst_ds_fk FOREIGN KEY (data_store_service_id) REFERENCES data_store_services(id) ON DELETE CASCADE; +ALTER TABLE ONLY public.data_set_relationships_all + ADD CONSTRAINT dsre_data_fk_child FOREIGN KEY (data_id_child) REFERENCES public.data_all(id) ON DELETE CASCADE; -- --- Name: dssdst_dst_fk; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: data_set_relationships_all dsre_data_fk_parent; Type: FK CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY data_store_service_data_set_types - ADD CONSTRAINT dssdst_dst_fk FOREIGN KEY (data_set_type_id) REFERENCES data_set_types(id) ON DELETE CASCADE; +ALTER TABLE ONLY public.data_set_relationships_all + ADD CONSTRAINT dsre_data_fk_parent FOREIGN KEY (data_id_parent) REFERENCES public.data_all(id) ON DELETE CASCADE; -- --- Name: dsse_ds_fk; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: data_set_relationships_all dsre_data_fk_relationship; Type: FK CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY data_store_services - ADD CONSTRAINT dsse_ds_fk FOREIGN KEY (data_store_id) REFERENCES data_stores(id) ON DELETE CASCADE; +ALTER TABLE ONLY public.data_set_relationships_all + ADD CONSTRAINT dsre_data_fk_relationship FOREIGN KEY (relationship_id) REFERENCES public.relationship_types(id); -- --- Name: dstpt_dsty_fk; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: data_set_relationships_all dsre_del_fk; Type: FK CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY data_set_type_property_types - ADD CONSTRAINT dstpt_dsty_fk FOREIGN KEY (dsty_id) REFERENCES data_set_types(id) ON DELETE CASCADE; +ALTER TABLE ONLY public.data_set_relationships_all + ADD CONSTRAINT dsre_del_fk FOREIGN KEY (del_id) REFERENCES public.deletions(id); -- --- Name: dstpt_pers_fk; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: data_store_service_data_set_types dssdst_ds_fk; Type: FK CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY data_set_type_property_types - ADD CONSTRAINT dstpt_pers_fk FOREIGN KEY (pers_id_registerer) REFERENCES persons(id) DEFERRABLE INITIALLY DEFERRED; +ALTER TABLE ONLY public.data_store_service_data_set_types + ADD CONSTRAINT dssdst_ds_fk FOREIGN KEY (data_store_service_id) REFERENCES public.data_store_services(id) ON DELETE CASCADE; -- --- Name: dstpt_prty_fk; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: data_store_service_data_set_types dssdst_dst_fk; Type: FK CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY data_set_type_property_types - ADD CONSTRAINT dstpt_prty_fk FOREIGN KEY (prty_id) REFERENCES property_types(id) ON DELETE CASCADE; +ALTER TABLE ONLY public.data_store_service_data_set_types + ADD CONSTRAINT dssdst_dst_fk FOREIGN KEY (data_set_type_id) REFERENCES public.data_set_types(id) ON DELETE CASCADE; -- --- Name: dstpt_script_fk; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: data_store_services dsse_ds_fk; Type: FK CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY data_set_type_property_types - ADD CONSTRAINT dstpt_script_fk FOREIGN KEY (script_id) REFERENCES scripts(id); +ALTER TABLE ONLY public.data_store_services + ADD CONSTRAINT dsse_ds_fk FOREIGN KEY (data_store_id) REFERENCES public.data_stores(id) ON DELETE CASCADE; -- --- Name: dsty_script_fk; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: data_set_type_property_types dstpt_dsty_fk; Type: FK CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY data_set_types - ADD CONSTRAINT dsty_script_fk FOREIGN KEY (validation_script_id) REFERENCES scripts(id); +ALTER TABLE ONLY public.data_set_type_property_types + ADD CONSTRAINT dstpt_dsty_fk FOREIGN KEY (dsty_id) REFERENCES public.data_set_types(id) ON DELETE CASCADE; -- --- Name: etpt_exty_fk; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: data_set_type_property_types dstpt_pers_fk; Type: FK CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY experiment_type_property_types - ADD CONSTRAINT etpt_exty_fk FOREIGN KEY (exty_id) REFERENCES experiment_types(id) ON DELETE CASCADE; +ALTER TABLE ONLY public.data_set_type_property_types + ADD CONSTRAINT dstpt_pers_fk FOREIGN KEY (pers_id_registerer) REFERENCES public.persons(id) DEFERRABLE INITIALLY DEFERRED; -- --- Name: etpt_pers_fk; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: data_set_type_property_types dstpt_prty_fk; Type: FK CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY experiment_type_property_types - ADD CONSTRAINT etpt_pers_fk FOREIGN KEY (pers_id_registerer) REFERENCES persons(id) DEFERRABLE INITIALLY DEFERRED; +ALTER TABLE ONLY public.data_set_type_property_types + ADD CONSTRAINT dstpt_prty_fk FOREIGN KEY (prty_id) REFERENCES public.property_types(id) ON DELETE CASCADE; -- --- Name: etpt_prty_fk; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: data_set_type_property_types dstpt_script_fk; Type: FK CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY experiment_type_property_types - ADD CONSTRAINT etpt_prty_fk FOREIGN KEY (prty_id) REFERENCES property_types(id) ON DELETE CASCADE; +ALTER TABLE ONLY public.data_set_type_property_types + ADD CONSTRAINT dstpt_script_fk FOREIGN KEY (script_id) REFERENCES public.scripts(id); -- --- Name: etpt_script_fk; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: data_set_types dsty_script_fk; Type: FK CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY experiment_type_property_types - ADD CONSTRAINT etpt_script_fk FOREIGN KEY (script_id) REFERENCES scripts(id); +ALTER TABLE ONLY public.data_set_types + ADD CONSTRAINT dsty_script_fk FOREIGN KEY (validation_script_id) REFERENCES public.scripts(id); -- --- Name: evnt_exac_fk; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: experiment_type_property_types etpt_exty_fk; Type: FK CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY events - ADD CONSTRAINT evnt_exac_fk FOREIGN KEY (exac_id) REFERENCES attachment_contents(id); +ALTER TABLE ONLY public.experiment_type_property_types + ADD CONSTRAINT etpt_exty_fk FOREIGN KEY (exty_id) REFERENCES public.experiment_types(id) ON DELETE CASCADE; -- --- Name: evnt_pers_fk; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: experiment_type_property_types etpt_pers_fk; Type: FK CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY events - ADD CONSTRAINT evnt_pers_fk FOREIGN KEY (pers_id_registerer) REFERENCES persons(id) DEFERRABLE INITIALLY DEFERRED; +ALTER TABLE ONLY public.experiment_type_property_types + ADD CONSTRAINT etpt_pers_fk FOREIGN KEY (pers_id_registerer) REFERENCES public.persons(id) DEFERRABLE INITIALLY DEFERRED; -- --- Name: exda_cvte_fk; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: experiment_type_property_types etpt_prty_fk; Type: FK CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY external_data - ADD CONSTRAINT exda_cvte_fk FOREIGN KEY (cvte_id_stor_fmt) REFERENCES controlled_vocabulary_terms(id); +ALTER TABLE ONLY public.experiment_type_property_types + ADD CONSTRAINT etpt_prty_fk FOREIGN KEY (prty_id) REFERENCES public.property_types(id) ON DELETE CASCADE; -- --- Name: exda_cvte_stored_on_fk; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: experiment_type_property_types etpt_script_fk; Type: FK CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY external_data - ADD CONSTRAINT exda_cvte_stored_on_fk FOREIGN KEY (cvte_id_store) REFERENCES controlled_vocabulary_terms(id); +ALTER TABLE ONLY public.experiment_type_property_types + ADD CONSTRAINT etpt_script_fk FOREIGN KEY (script_id) REFERENCES public.scripts(id); -- --- Name: exda_data_fk; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: events evnt_exac_fk; Type: FK CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY external_data - ADD CONSTRAINT exda_data_fk FOREIGN KEY (data_id) REFERENCES data_all(id); +ALTER TABLE ONLY public.events + ADD CONSTRAINT evnt_exac_fk FOREIGN KEY (exac_id) REFERENCES public.attachment_contents(id); -- --- Name: exda_ffty_fk; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: events evnt_pers_fk; Type: FK CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY external_data - ADD CONSTRAINT exda_ffty_fk FOREIGN KEY (ffty_id) REFERENCES file_format_types(id); +ALTER TABLE ONLY public.events + ADD CONSTRAINT evnt_pers_fk FOREIGN KEY (pers_id_registerer) REFERENCES public.persons(id) DEFERRABLE INITIALLY DEFERRED; -- --- Name: exda_loty_fk; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: external_data exda_cvte_fk; Type: FK CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY external_data - ADD CONSTRAINT exda_loty_fk FOREIGN KEY (loty_id) REFERENCES locator_types(id); +ALTER TABLE ONLY public.external_data + ADD CONSTRAINT exda_cvte_fk FOREIGN KEY (cvte_id_stor_fmt) REFERENCES public.controlled_vocabulary_terms(id); -- --- Name: expe_del_fk; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: external_data exda_cvte_stored_on_fk; Type: FK CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY experiments_all - ADD CONSTRAINT expe_del_fk FOREIGN KEY (del_id) REFERENCES deletions(id); +ALTER TABLE ONLY public.external_data + ADD CONSTRAINT exda_cvte_stored_on_fk FOREIGN KEY (cvte_id_store) REFERENCES public.controlled_vocabulary_terms(id); -- --- Name: expe_exty_fk; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: external_data exda_data_fk; Type: FK CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY experiments_all - ADD CONSTRAINT expe_exty_fk FOREIGN KEY (exty_id) REFERENCES experiment_types(id); +ALTER TABLE ONLY public.external_data + ADD CONSTRAINT exda_data_fk FOREIGN KEY (id) REFERENCES public.data_all(id); -- --- Name: expe_pers_fk; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: external_data exda_ffty_fk; Type: FK CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY experiments_all - ADD CONSTRAINT expe_pers_fk FOREIGN KEY (pers_id_registerer) REFERENCES persons(id) DEFERRABLE INITIALLY DEFERRED; +ALTER TABLE ONLY public.external_data + ADD CONSTRAINT exda_ffty_fk FOREIGN KEY (ffty_id) REFERENCES public.file_format_types(id); -- --- Name: expe_pers_fk_mod; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: external_data exda_loty_fk; Type: FK CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY experiments_all - ADD CONSTRAINT expe_pers_fk_mod FOREIGN KEY (pers_id_modifier) REFERENCES persons(id) DEFERRABLE INITIALLY DEFERRED; +ALTER TABLE ONLY public.external_data + ADD CONSTRAINT exda_loty_fk FOREIGN KEY (loty_id) REFERENCES public.locator_types(id); -- --- Name: expe_proj_fk; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: experiments_all expe_del_fk; Type: FK CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY experiments_all - ADD CONSTRAINT expe_proj_fk FOREIGN KEY (proj_id) REFERENCES projects(id); +ALTER TABLE ONLY public.experiments_all + ADD CONSTRAINT expe_del_fk FOREIGN KEY (del_id) REFERENCES public.deletions(id); -- --- Name: expr_cvte_fk; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: experiments_all expe_exty_fk; Type: FK CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY experiment_properties - ADD CONSTRAINT expr_cvte_fk FOREIGN KEY (cvte_id) REFERENCES controlled_vocabulary_terms(id); +ALTER TABLE ONLY public.experiments_all + ADD CONSTRAINT expe_exty_fk FOREIGN KEY (exty_id) REFERENCES public.experiment_types(id); -- --- Name: expr_etpt_fk; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: experiments_all expe_pers_fk; Type: FK CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY experiment_properties - ADD CONSTRAINT expr_etpt_fk FOREIGN KEY (etpt_id) REFERENCES experiment_type_property_types(id) ON DELETE CASCADE; +ALTER TABLE ONLY public.experiments_all + ADD CONSTRAINT expe_pers_fk FOREIGN KEY (pers_id_registerer) REFERENCES public.persons(id) DEFERRABLE INITIALLY DEFERRED; -- --- Name: expr_expe_fk; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: experiments_all expe_pers_fk_mod; Type: FK CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY experiment_properties - ADD CONSTRAINT expr_expe_fk FOREIGN KEY (expe_id) REFERENCES experiments_all(id); +ALTER TABLE ONLY public.experiments_all + ADD CONSTRAINT expe_pers_fk_mod FOREIGN KEY (pers_id_modifier) REFERENCES public.persons(id) DEFERRABLE INITIALLY DEFERRED; -- --- Name: expr_mapr_fk; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: experiments_all expe_proj_fk; Type: FK CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY experiment_properties - ADD CONSTRAINT expr_mapr_fk FOREIGN KEY (mate_prop_id) REFERENCES materials(id); +ALTER TABLE ONLY public.experiments_all + ADD CONSTRAINT expe_proj_fk FOREIGN KEY (proj_id) REFERENCES public.projects(id); -- --- Name: expr_pers_fk; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: experiment_properties expr_cvte_fk; Type: FK CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY experiment_properties - ADD CONSTRAINT expr_pers_fk FOREIGN KEY (pers_id_registerer) REFERENCES persons(id) DEFERRABLE INITIALLY DEFERRED; +ALTER TABLE ONLY public.experiment_properties + ADD CONSTRAINT expr_cvte_fk FOREIGN KEY (cvte_id) REFERENCES public.controlled_vocabulary_terms(id); -- --- Name: exprh_etpt_fk; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: experiment_properties expr_etpt_fk; Type: FK CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY experiment_properties_history - ADD CONSTRAINT exprh_etpt_fk FOREIGN KEY (etpt_id) REFERENCES experiment_type_property_types(id) ON DELETE CASCADE; +ALTER TABLE ONLY public.experiment_properties + ADD CONSTRAINT expr_etpt_fk FOREIGN KEY (etpt_id) REFERENCES public.experiment_type_property_types(id) ON DELETE CASCADE; -- --- Name: exprh_expe_fk; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: experiment_properties expr_expe_fk; Type: FK CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY experiment_properties_history - ADD CONSTRAINT exprh_expe_fk FOREIGN KEY (expe_id) REFERENCES experiments_all(id) ON DELETE CASCADE; +ALTER TABLE ONLY public.experiment_properties + ADD CONSTRAINT expr_expe_fk FOREIGN KEY (expe_id) REFERENCES public.experiments_all(id); -- --- Name: exrelh_data_fk; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: experiment_properties expr_mapr_fk; Type: FK CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY experiment_relationships_history - ADD CONSTRAINT exrelh_data_fk FOREIGN KEY (data_id) REFERENCES data_all(id) ON DELETE SET NULL; +ALTER TABLE ONLY public.experiment_properties + ADD CONSTRAINT expr_mapr_fk FOREIGN KEY (mate_prop_id) REFERENCES public.materials(id); -- --- Name: exrelh_main_expe_fk; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: experiment_properties expr_pers_fk; Type: FK CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY experiment_relationships_history - ADD CONSTRAINT exrelh_main_expe_fk FOREIGN KEY (main_expe_id) REFERENCES experiments_all(id) ON DELETE CASCADE; +ALTER TABLE ONLY public.experiment_properties + ADD CONSTRAINT expr_pers_fk FOREIGN KEY (pers_id_registerer) REFERENCES public.persons(id) DEFERRABLE INITIALLY DEFERRED; -- --- Name: exrelh_proj_fk; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: experiment_properties_history exprh_etpt_fk; Type: FK CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY experiment_relationships_history - ADD CONSTRAINT exrelh_proj_fk FOREIGN KEY (proj_id) REFERENCES projects(id) ON DELETE SET NULL; +ALTER TABLE ONLY public.experiment_properties_history + ADD CONSTRAINT exprh_etpt_fk FOREIGN KEY (etpt_id) REFERENCES public.experiment_type_property_types(id) ON DELETE CASCADE; -- --- Name: exrelh_samp_fk; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: experiment_properties_history exprh_expe_fk; Type: FK CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY experiment_relationships_history - ADD CONSTRAINT exrelh_samp_fk FOREIGN KEY (samp_id) REFERENCES samples_all(id) ON DELETE SET NULL; +ALTER TABLE ONLY public.experiment_properties_history + ADD CONSTRAINT exprh_expe_fk FOREIGN KEY (expe_id) REFERENCES public.experiments_all(id) ON DELETE CASCADE; -- --- Name: exty_script_fk; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: experiment_relationships_history exrelh_data_fk; Type: FK CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY experiment_types - ADD CONSTRAINT exty_script_fk FOREIGN KEY (validation_script_id) REFERENCES scripts(id); +ALTER TABLE ONLY public.experiment_relationships_history + ADD CONSTRAINT exrelh_data_fk FOREIGN KEY (data_id) REFERENCES public.data_all(id) ON DELETE SET NULL; -- --- Name: filt_pers_fk; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: experiment_relationships_history exrelh_main_expe_fk; Type: FK CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY filters - ADD CONSTRAINT filt_pers_fk FOREIGN KEY (pers_id_registerer) REFERENCES persons(id) DEFERRABLE INITIALLY DEFERRED; +ALTER TABLE ONLY public.experiment_relationships_history + ADD CONSTRAINT exrelh_main_expe_fk FOREIGN KEY (main_expe_id) REFERENCES public.experiments_all(id) ON DELETE CASCADE; -- --- Name: grid_custom_columns_pers_fk; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: experiment_relationships_history exrelh_proj_fk; Type: FK CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY grid_custom_columns - ADD CONSTRAINT grid_custom_columns_pers_fk FOREIGN KEY (pers_id_registerer) REFERENCES persons(id) DEFERRABLE INITIALLY DEFERRED; +ALTER TABLE ONLY public.experiment_relationships_history + ADD CONSTRAINT exrelh_proj_fk FOREIGN KEY (proj_id) REFERENCES public.projects(id) ON DELETE SET NULL; -- --- Name: lnda_data_fk; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: experiment_relationships_history exrelh_samp_fk; Type: FK CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY link_data - ADD CONSTRAINT lnda_data_fk FOREIGN KEY (data_id) REFERENCES data_all(id) ON DELETE CASCADE; +ALTER TABLE ONLY public.experiment_relationships_history + ADD CONSTRAINT exrelh_samp_fk FOREIGN KEY (samp_id) REFERENCES public.samples_all(id) ON DELETE SET NULL; -- --- Name: mapr_cvte_fk; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: experiment_types exty_script_fk; Type: FK CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY material_properties - ADD CONSTRAINT mapr_cvte_fk FOREIGN KEY (cvte_id) REFERENCES controlled_vocabulary_terms(id); +ALTER TABLE ONLY public.experiment_types + ADD CONSTRAINT exty_script_fk FOREIGN KEY (validation_script_id) REFERENCES public.scripts(id); -- --- Name: mapr_mapr_fk; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: filters filt_pers_fk; Type: FK CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY material_properties - ADD CONSTRAINT mapr_mapr_fk FOREIGN KEY (mate_prop_id) REFERENCES materials(id); +ALTER TABLE ONLY public.filters + ADD CONSTRAINT filt_pers_fk FOREIGN KEY (pers_id_registerer) REFERENCES public.persons(id) DEFERRABLE INITIALLY DEFERRED; -- --- Name: mapr_mate_fk; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: grid_custom_columns grid_custom_columns_pers_fk; Type: FK CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY material_properties - ADD CONSTRAINT mapr_mate_fk FOREIGN KEY (mate_id) REFERENCES materials(id); +ALTER TABLE ONLY public.grid_custom_columns + ADD CONSTRAINT grid_custom_columns_pers_fk FOREIGN KEY (pers_id_registerer) REFERENCES public.persons(id) DEFERRABLE INITIALLY DEFERRED; -- --- Name: mapr_mtpt_fk; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: link_data lnda_data_fk; Type: FK CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY material_properties - ADD CONSTRAINT mapr_mtpt_fk FOREIGN KEY (mtpt_id) REFERENCES material_type_property_types(id) ON DELETE CASCADE; +ALTER TABLE ONLY public.link_data + ADD CONSTRAINT lnda_data_fk FOREIGN KEY (id) REFERENCES public.data_all(id) ON DELETE CASCADE; -- --- Name: mapr_pers_fk; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: material_properties mapr_cvte_fk; Type: FK CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY material_properties - ADD CONSTRAINT mapr_pers_fk FOREIGN KEY (pers_id_registerer) REFERENCES persons(id) DEFERRABLE INITIALLY DEFERRED; +ALTER TABLE ONLY public.material_properties + ADD CONSTRAINT mapr_cvte_fk FOREIGN KEY (cvte_id) REFERENCES public.controlled_vocabulary_terms(id); -- --- Name: maprh_mate_fk; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: material_properties mapr_mapr_fk; Type: FK CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY material_properties_history - ADD CONSTRAINT maprh_mate_fk FOREIGN KEY (mate_id) REFERENCES materials(id) ON DELETE CASCADE; +ALTER TABLE ONLY public.material_properties + ADD CONSTRAINT mapr_mapr_fk FOREIGN KEY (mate_prop_id) REFERENCES public.materials(id); -- --- Name: maprh_mtpt_fk; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: material_properties mapr_mate_fk; Type: FK CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY material_properties_history - ADD CONSTRAINT maprh_mtpt_fk FOREIGN KEY (mtpt_id) REFERENCES material_type_property_types(id) ON DELETE CASCADE; +ALTER TABLE ONLY public.material_properties + ADD CONSTRAINT mapr_mate_fk FOREIGN KEY (mate_id) REFERENCES public.materials(id); -- --- Name: mate_maty_fk; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: material_properties mapr_mtpt_fk; Type: FK CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY materials - ADD CONSTRAINT mate_maty_fk FOREIGN KEY (maty_id) REFERENCES material_types(id); +ALTER TABLE ONLY public.material_properties + ADD CONSTRAINT mapr_mtpt_fk FOREIGN KEY (mtpt_id) REFERENCES public.material_type_property_types(id) ON DELETE CASCADE; -- --- Name: mate_pers_fk; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: material_properties mapr_pers_fk; Type: FK CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY materials - ADD CONSTRAINT mate_pers_fk FOREIGN KEY (pers_id_registerer) REFERENCES persons(id) DEFERRABLE INITIALLY DEFERRED; +ALTER TABLE ONLY public.material_properties + ADD CONSTRAINT mapr_pers_fk FOREIGN KEY (pers_id_registerer) REFERENCES public.persons(id) DEFERRABLE INITIALLY DEFERRED; -- --- Name: maty_script_fk; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: material_properties_history maprh_mate_fk; Type: FK CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY material_types - ADD CONSTRAINT maty_script_fk FOREIGN KEY (validation_script_id) REFERENCES scripts(id); +ALTER TABLE ONLY public.material_properties_history + ADD CONSTRAINT maprh_mate_fk FOREIGN KEY (mate_id) REFERENCES public.materials(id) ON DELETE CASCADE; -- --- Name: metaproject_assignments_all_data_id_fk; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: material_properties_history maprh_mtpt_fk; Type: FK CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY metaproject_assignments_all - ADD CONSTRAINT metaproject_assignments_all_data_id_fk FOREIGN KEY (data_id) REFERENCES data_all(id) ON DELETE CASCADE; +ALTER TABLE ONLY public.material_properties_history + ADD CONSTRAINT maprh_mtpt_fk FOREIGN KEY (mtpt_id) REFERENCES public.material_type_property_types(id) ON DELETE CASCADE; -- --- Name: metaproject_assignments_all_del_id_fk; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: materials mate_maty_fk; Type: FK CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY metaproject_assignments_all - ADD CONSTRAINT metaproject_assignments_all_del_id_fk FOREIGN KEY (del_id) REFERENCES deletions(id); +ALTER TABLE ONLY public.materials + ADD CONSTRAINT mate_maty_fk FOREIGN KEY (maty_id) REFERENCES public.material_types(id); -- --- Name: metaproject_assignments_all_expe_id_fk; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: materials mate_pers_fk; Type: FK CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY metaproject_assignments_all - ADD CONSTRAINT metaproject_assignments_all_expe_id_fk FOREIGN KEY (expe_id) REFERENCES experiments_all(id) ON DELETE CASCADE; +ALTER TABLE ONLY public.materials + ADD CONSTRAINT mate_pers_fk FOREIGN KEY (pers_id_registerer) REFERENCES public.persons(id) DEFERRABLE INITIALLY DEFERRED; -- --- Name: metaproject_assignments_all_mate_id_fk; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: material_types maty_script_fk; Type: FK CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY metaproject_assignments_all - ADD CONSTRAINT metaproject_assignments_all_mate_id_fk FOREIGN KEY (mate_id) REFERENCES materials(id) ON DELETE CASCADE; +ALTER TABLE ONLY public.material_types + ADD CONSTRAINT maty_script_fk FOREIGN KEY (validation_script_id) REFERENCES public.scripts(id); -- --- Name: metaproject_assignments_all_mepr_id_fk; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: metaproject_assignments_all metaproject_assignments_all_data_id_fk; Type: FK CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY metaproject_assignments_all - ADD CONSTRAINT metaproject_assignments_all_mepr_id_fk FOREIGN KEY (mepr_id) REFERENCES metaprojects(id) ON DELETE CASCADE; +ALTER TABLE ONLY public.metaproject_assignments_all + ADD CONSTRAINT metaproject_assignments_all_data_id_fk FOREIGN KEY (data_id) REFERENCES public.data_all(id) ON DELETE CASCADE; -- --- Name: metaproject_assignments_all_samp_id_fk; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: metaproject_assignments_all metaproject_assignments_all_del_id_fk; Type: FK CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY metaproject_assignments_all - ADD CONSTRAINT metaproject_assignments_all_samp_id_fk FOREIGN KEY (samp_id) REFERENCES samples_all(id) ON DELETE CASCADE; +ALTER TABLE ONLY public.metaproject_assignments_all + ADD CONSTRAINT metaproject_assignments_all_del_id_fk FOREIGN KEY (del_id) REFERENCES public.deletions(id); -- --- Name: metaprojects_owner_fk; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: metaproject_assignments_all metaproject_assignments_all_expe_id_fk; Type: FK CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY metaprojects - ADD CONSTRAINT metaprojects_owner_fk FOREIGN KEY (owner) REFERENCES persons(id) ON DELETE CASCADE DEFERRABLE INITIALLY DEFERRED; +ALTER TABLE ONLY public.metaproject_assignments_all + ADD CONSTRAINT metaproject_assignments_all_expe_id_fk FOREIGN KEY (expe_id) REFERENCES public.experiments_all(id) ON DELETE CASCADE; -- --- Name: mtpt_maty_fk; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: metaproject_assignments_all metaproject_assignments_all_mate_id_fk; Type: FK CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY material_type_property_types - ADD CONSTRAINT mtpt_maty_fk FOREIGN KEY (maty_id) REFERENCES material_types(id) ON DELETE CASCADE; +ALTER TABLE ONLY public.metaproject_assignments_all + ADD CONSTRAINT metaproject_assignments_all_mate_id_fk FOREIGN KEY (mate_id) REFERENCES public.materials(id) ON DELETE CASCADE; -- --- Name: mtpt_pers_fk; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: metaproject_assignments_all metaproject_assignments_all_mepr_id_fk; Type: FK CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY material_type_property_types - ADD CONSTRAINT mtpt_pers_fk FOREIGN KEY (pers_id_registerer) REFERENCES persons(id) DEFERRABLE INITIALLY DEFERRED; +ALTER TABLE ONLY public.metaproject_assignments_all + ADD CONSTRAINT metaproject_assignments_all_mepr_id_fk FOREIGN KEY (mepr_id) REFERENCES public.metaprojects(id) ON DELETE CASCADE; -- --- Name: mtpt_prty_fk; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: metaproject_assignments_all metaproject_assignments_all_samp_id_fk; Type: FK CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY material_type_property_types - ADD CONSTRAINT mtpt_prty_fk FOREIGN KEY (prty_id) REFERENCES property_types(id) ON DELETE CASCADE; +ALTER TABLE ONLY public.metaproject_assignments_all + ADD CONSTRAINT metaproject_assignments_all_samp_id_fk FOREIGN KEY (samp_id) REFERENCES public.samples_all(id) ON DELETE CASCADE; -- --- Name: mtpt_script_fk; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: metaprojects metaprojects_owner_fk; Type: FK CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY material_type_property_types - ADD CONSTRAINT mtpt_script_fk FOREIGN KEY (script_id) REFERENCES scripts(id); +ALTER TABLE ONLY public.metaprojects + ADD CONSTRAINT metaprojects_owner_fk FOREIGN KEY (owner) REFERENCES public.persons(id) ON DELETE CASCADE DEFERRABLE INITIALLY DEFERRED; -- --- Name: operation_executions_owner_fk; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: material_type_property_types mtpt_maty_fk; Type: FK CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY operation_executions - ADD CONSTRAINT operation_executions_owner_fk FOREIGN KEY (owner) REFERENCES persons(id) ON DELETE CASCADE DEFERRABLE INITIALLY DEFERRED; +ALTER TABLE ONLY public.material_type_property_types + ADD CONSTRAINT mtpt_maty_fk FOREIGN KEY (maty_id) REFERENCES public.material_types(id) ON DELETE CASCADE; -- --- Name: pers_pers_fk; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: material_type_property_types mtpt_pers_fk; Type: FK CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY persons - ADD CONSTRAINT pers_pers_fk FOREIGN KEY (pers_id_registerer) REFERENCES persons(id) DEFERRABLE INITIALLY DEFERRED; +ALTER TABLE ONLY public.material_type_property_types + ADD CONSTRAINT mtpt_pers_fk FOREIGN KEY (pers_id_registerer) REFERENCES public.persons(id) DEFERRABLE INITIALLY DEFERRED; -- --- Name: pers_space_fk; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: material_type_property_types mtpt_prty_fk; Type: FK CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY persons - ADD CONSTRAINT pers_space_fk FOREIGN KEY (space_id) REFERENCES spaces(id); +ALTER TABLE ONLY public.material_type_property_types + ADD CONSTRAINT mtpt_prty_fk FOREIGN KEY (prty_id) REFERENCES public.property_types(id) ON DELETE CASCADE; -- --- Name: prdq_ds_fk; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: material_type_property_types mtpt_script_fk; Type: FK CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY post_registration_dataset_queue - ADD CONSTRAINT prdq_ds_fk FOREIGN KEY (ds_id) REFERENCES data_all(id) ON DELETE CASCADE; +ALTER TABLE ONLY public.material_type_property_types + ADD CONSTRAINT mtpt_script_fk FOREIGN KEY (script_id) REFERENCES public.scripts(id); -- --- Name: proj_pers_fk_leader; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: operation_executions operation_executions_owner_fk; Type: FK CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY projects - ADD CONSTRAINT proj_pers_fk_leader FOREIGN KEY (pers_id_leader) REFERENCES persons(id) DEFERRABLE INITIALLY DEFERRED; +ALTER TABLE ONLY public.operation_executions + ADD CONSTRAINT operation_executions_owner_fk FOREIGN KEY (owner) REFERENCES public.persons(id) ON DELETE CASCADE DEFERRABLE INITIALLY DEFERRED; -- --- Name: proj_pers_fk_mod; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: persons pers_pers_fk; Type: FK CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY projects - ADD CONSTRAINT proj_pers_fk_mod FOREIGN KEY (pers_id_modifier) REFERENCES persons(id) DEFERRABLE INITIALLY DEFERRED; +ALTER TABLE ONLY public.persons + ADD CONSTRAINT pers_pers_fk FOREIGN KEY (pers_id_registerer) REFERENCES public.persons(id) DEFERRABLE INITIALLY DEFERRED; -- --- Name: proj_pers_fk_registerer; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: persons pers_space_fk; Type: FK CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY projects - ADD CONSTRAINT proj_pers_fk_registerer FOREIGN KEY (pers_id_registerer) REFERENCES persons(id) DEFERRABLE INITIALLY DEFERRED; +ALTER TABLE ONLY public.persons + ADD CONSTRAINT pers_space_fk FOREIGN KEY (space_id) REFERENCES public.spaces(id); -- --- Name: proj_space_fk; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: post_registration_dataset_queue prdq_ds_fk; Type: FK CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY projects - ADD CONSTRAINT proj_space_fk FOREIGN KEY (space_id) REFERENCES spaces(id); +ALTER TABLE ONLY public.post_registration_dataset_queue + ADD CONSTRAINT prdq_ds_fk FOREIGN KEY (ds_id) REFERENCES public.data_all(id) ON DELETE CASCADE; -- --- Name: prrelh_expe_fk; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: projects proj_pers_fk_leader; Type: FK CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY project_relationships_history - ADD CONSTRAINT prrelh_expe_fk FOREIGN KEY (expe_id) REFERENCES experiments_all(id) ON DELETE SET NULL; +ALTER TABLE ONLY public.projects + ADD CONSTRAINT proj_pers_fk_leader FOREIGN KEY (pers_id_leader) REFERENCES public.persons(id) DEFERRABLE INITIALLY DEFERRED; -- --- Name: prrelh_main_proj_fk; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: projects proj_pers_fk_mod; Type: FK CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY project_relationships_history - ADD CONSTRAINT prrelh_main_proj_fk FOREIGN KEY (main_proj_id) REFERENCES projects(id) ON DELETE CASCADE; +ALTER TABLE ONLY public.projects + ADD CONSTRAINT proj_pers_fk_mod FOREIGN KEY (pers_id_modifier) REFERENCES public.persons(id) DEFERRABLE INITIALLY DEFERRED; -- --- Name: prrelh_space_fk; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: projects proj_pers_fk_registerer; Type: FK CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY project_relationships_history - ADD CONSTRAINT prrelh_space_fk FOREIGN KEY (space_id) REFERENCES spaces(id) ON DELETE SET NULL; +ALTER TABLE ONLY public.projects + ADD CONSTRAINT proj_pers_fk_registerer FOREIGN KEY (pers_id_registerer) REFERENCES public.persons(id) DEFERRABLE INITIALLY DEFERRED; -- --- Name: prty_covo_fk; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: projects proj_space_fk; Type: FK CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY property_types - ADD CONSTRAINT prty_covo_fk FOREIGN KEY (covo_id) REFERENCES controlled_vocabularies(id); +ALTER TABLE ONLY public.projects + ADD CONSTRAINT proj_space_fk FOREIGN KEY (space_id) REFERENCES public.spaces(id); -- --- Name: prty_daty_fk; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: project_relationships_history prrelh_expe_fk; Type: FK CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY property_types - ADD CONSTRAINT prty_daty_fk FOREIGN KEY (daty_id) REFERENCES data_types(id); +ALTER TABLE ONLY public.project_relationships_history + ADD CONSTRAINT prrelh_expe_fk FOREIGN KEY (expe_id) REFERENCES public.experiments_all(id) ON DELETE SET NULL; -- --- Name: prty_maty_fk; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: project_relationships_history prrelh_main_proj_fk; Type: FK CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY property_types - ADD CONSTRAINT prty_maty_fk FOREIGN KEY (maty_prop_id) REFERENCES material_types(id) ON DELETE CASCADE; +ALTER TABLE ONLY public.project_relationships_history + ADD CONSTRAINT prrelh_main_proj_fk FOREIGN KEY (main_proj_id) REFERENCES public.projects(id) ON DELETE CASCADE; -- --- Name: prty_pers_fk; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: project_relationships_history prrelh_space_fk; Type: FK CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY property_types - ADD CONSTRAINT prty_pers_fk FOREIGN KEY (pers_id_registerer) REFERENCES persons(id) DEFERRABLE INITIALLY DEFERRED; +ALTER TABLE ONLY public.project_relationships_history + ADD CONSTRAINT prrelh_space_fk FOREIGN KEY (space_id) REFERENCES public.spaces(id) ON DELETE SET NULL; -- --- Name: quer_pers_fk; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: property_types prty_covo_fk; Type: FK CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY queries - ADD CONSTRAINT quer_pers_fk FOREIGN KEY (pers_id_registerer) REFERENCES persons(id) DEFERRABLE INITIALLY DEFERRED; +ALTER TABLE ONLY public.property_types + ADD CONSTRAINT prty_covo_fk FOREIGN KEY (covo_id) REFERENCES public.controlled_vocabularies(id); -- --- Name: roas_ag_fk_grantee; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: property_types prty_daty_fk; Type: FK CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY role_assignments - ADD CONSTRAINT roas_ag_fk_grantee FOREIGN KEY (ag_id_grantee) REFERENCES authorization_groups(id) ON DELETE CASCADE; +ALTER TABLE ONLY public.property_types + ADD CONSTRAINT prty_daty_fk FOREIGN KEY (daty_id) REFERENCES public.data_types(id); -- --- Name: roas_pers_fk_grantee; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: property_types prty_maty_fk; Type: FK CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY role_assignments - ADD CONSTRAINT roas_pers_fk_grantee FOREIGN KEY (pers_id_grantee) REFERENCES persons(id) ON DELETE CASCADE DEFERRABLE INITIALLY DEFERRED; +ALTER TABLE ONLY public.property_types + ADD CONSTRAINT prty_maty_fk FOREIGN KEY (maty_prop_id) REFERENCES public.material_types(id) ON DELETE CASCADE; -- --- Name: roas_pers_fk_registerer; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: property_types prty_pers_fk; Type: FK CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY role_assignments - ADD CONSTRAINT roas_pers_fk_registerer FOREIGN KEY (pers_id_registerer) REFERENCES persons(id) DEFERRABLE INITIALLY DEFERRED; +ALTER TABLE ONLY public.property_types + ADD CONSTRAINT prty_pers_fk FOREIGN KEY (pers_id_registerer) REFERENCES public.persons(id) DEFERRABLE INITIALLY DEFERRED; -- --- Name: roas_project_fk; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: queries quer_pers_fk; Type: FK CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY role_assignments - ADD CONSTRAINT roas_project_fk FOREIGN KEY (project_id) REFERENCES projects(id) ON DELETE CASCADE; +ALTER TABLE ONLY public.queries + ADD CONSTRAINT quer_pers_fk FOREIGN KEY (pers_id_registerer) REFERENCES public.persons(id) DEFERRABLE INITIALLY DEFERRED; -- --- Name: roas_space_fk; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: role_assignments roas_ag_fk_grantee; Type: FK CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY role_assignments - ADD CONSTRAINT roas_space_fk FOREIGN KEY (space_id) REFERENCES spaces(id) ON DELETE CASCADE; +ALTER TABLE ONLY public.role_assignments + ADD CONSTRAINT roas_ag_fk_grantee FOREIGN KEY (ag_id_grantee) REFERENCES public.authorization_groups(id) ON DELETE CASCADE; -- --- Name: samp_del_fk; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: role_assignments roas_pers_fk_grantee; Type: FK CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY samples_all - ADD CONSTRAINT samp_del_fk FOREIGN KEY (del_id) REFERENCES deletions(id); +ALTER TABLE ONLY public.role_assignments + ADD CONSTRAINT roas_pers_fk_grantee FOREIGN KEY (pers_id_grantee) REFERENCES public.persons(id) ON DELETE CASCADE DEFERRABLE INITIALLY DEFERRED; -- --- Name: samp_expe_fk; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: role_assignments roas_pers_fk_registerer; Type: FK CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY samples_all - ADD CONSTRAINT samp_expe_fk FOREIGN KEY (expe_id) REFERENCES experiments_all(id); +ALTER TABLE ONLY public.role_assignments + ADD CONSTRAINT roas_pers_fk_registerer FOREIGN KEY (pers_id_registerer) REFERENCES public.persons(id) DEFERRABLE INITIALLY DEFERRED; -- --- Name: samp_pers_fk; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: role_assignments roas_project_fk; Type: FK CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY samples_all - ADD CONSTRAINT samp_pers_fk FOREIGN KEY (pers_id_registerer) REFERENCES persons(id) DEFERRABLE INITIALLY DEFERRED; +ALTER TABLE ONLY public.role_assignments + ADD CONSTRAINT roas_project_fk FOREIGN KEY (project_id) REFERENCES public.projects(id) ON DELETE CASCADE; -- --- Name: samp_pers_fk_mod; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: role_assignments roas_space_fk; Type: FK CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY samples_all - ADD CONSTRAINT samp_pers_fk_mod FOREIGN KEY (pers_id_modifier) REFERENCES persons(id) DEFERRABLE INITIALLY DEFERRED; +ALTER TABLE ONLY public.role_assignments + ADD CONSTRAINT roas_space_fk FOREIGN KEY (space_id) REFERENCES public.spaces(id) ON DELETE CASCADE; -- --- Name: samp_proj_fk; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: samples_all samp_del_fk; Type: FK CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY samples_all - ADD CONSTRAINT samp_proj_fk FOREIGN KEY (proj_id) REFERENCES projects(id); +ALTER TABLE ONLY public.samples_all + ADD CONSTRAINT samp_del_fk FOREIGN KEY (del_id) REFERENCES public.deletions(id); -- --- Name: samp_samp_fk_part_of; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: samples_all samp_expe_fk; Type: FK CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY samples_all - ADD CONSTRAINT samp_samp_fk_part_of FOREIGN KEY (samp_id_part_of) REFERENCES samples_all(id); +ALTER TABLE ONLY public.samples_all + ADD CONSTRAINT samp_expe_fk FOREIGN KEY (expe_id) REFERENCES public.experiments_all(id); -- --- Name: samp_saty_fk; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: samples_all samp_pers_fk; Type: FK CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY samples_all - ADD CONSTRAINT samp_saty_fk FOREIGN KEY (saty_id) REFERENCES sample_types(id); +ALTER TABLE ONLY public.samples_all + ADD CONSTRAINT samp_pers_fk FOREIGN KEY (pers_id_registerer) REFERENCES public.persons(id) DEFERRABLE INITIALLY DEFERRED; -- --- Name: samp_space_fk; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: samples_all samp_pers_fk_mod; Type: FK CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY samples_all - ADD CONSTRAINT samp_space_fk FOREIGN KEY (space_id) REFERENCES spaces(id); +ALTER TABLE ONLY public.samples_all + ADD CONSTRAINT samp_pers_fk_mod FOREIGN KEY (pers_id_modifier) REFERENCES public.persons(id) DEFERRABLE INITIALLY DEFERRED; -- --- Name: sample_relationships_pers_fk; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: samples_all samp_proj_fk; Type: FK CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY sample_relationships_all - ADD CONSTRAINT sample_relationships_pers_fk FOREIGN KEY (pers_id_author) REFERENCES persons(id) DEFERRABLE INITIALLY DEFERRED; +ALTER TABLE ONLY public.samples_all + ADD CONSTRAINT samp_proj_fk FOREIGN KEY (proj_id) REFERENCES public.projects(id); -- --- Name: samprelh_data_fk; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: samples_all samp_samp_fk_part_of; Type: FK CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY sample_relationships_history - ADD CONSTRAINT samprelh_data_fk FOREIGN KEY (data_id) REFERENCES data_all(id) ON DELETE SET NULL; +ALTER TABLE ONLY public.samples_all + ADD CONSTRAINT samp_samp_fk_part_of FOREIGN KEY (samp_id_part_of) REFERENCES public.samples_all(id); -- --- Name: samprelh_expe_fk; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: samples_all samp_saty_fk; Type: FK CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY sample_relationships_history - ADD CONSTRAINT samprelh_expe_fk FOREIGN KEY (expe_id) REFERENCES experiments_all(id) ON DELETE SET NULL; +ALTER TABLE ONLY public.samples_all + ADD CONSTRAINT samp_saty_fk FOREIGN KEY (saty_id) REFERENCES public.sample_types(id); -- --- Name: samprelh_main_samp_fk; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: samples_all samp_space_fk; Type: FK CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY sample_relationships_history - ADD CONSTRAINT samprelh_main_samp_fk FOREIGN KEY (main_samp_id) REFERENCES samples_all(id) ON DELETE CASCADE; +ALTER TABLE ONLY public.samples_all + ADD CONSTRAINT samp_space_fk FOREIGN KEY (space_id) REFERENCES public.spaces(id); -- --- Name: samprelh_project_fk; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: sample_relationships_all sample_relationships_pers_fk; Type: FK CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY sample_relationships_history - ADD CONSTRAINT samprelh_project_fk FOREIGN KEY (proj_id) REFERENCES projects(id) ON DELETE SET NULL; +ALTER TABLE ONLY public.sample_relationships_all + ADD CONSTRAINT sample_relationships_pers_fk FOREIGN KEY (pers_id_author) REFERENCES public.persons(id) DEFERRABLE INITIALLY DEFERRED; -- --- Name: samprelh_samp_fk; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: sample_relationships_history samprelh_data_fk; Type: FK CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY sample_relationships_history - ADD CONSTRAINT samprelh_samp_fk FOREIGN KEY (samp_id) REFERENCES samples_all(id) ON DELETE SET NULL; +ALTER TABLE ONLY public.sample_relationships_history + ADD CONSTRAINT samprelh_data_fk FOREIGN KEY (data_id) REFERENCES public.data_all(id) ON DELETE SET NULL; -- --- Name: samprelh_space_fk; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: sample_relationships_history samprelh_expe_fk; Type: FK CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY sample_relationships_history - ADD CONSTRAINT samprelh_space_fk FOREIGN KEY (space_id) REFERENCES spaces(id) ON DELETE SET NULL; +ALTER TABLE ONLY public.sample_relationships_history + ADD CONSTRAINT samprelh_expe_fk FOREIGN KEY (expe_id) REFERENCES public.experiments_all(id) ON DELETE SET NULL; -- --- Name: sapr_cvte_fk; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: sample_relationships_history samprelh_main_samp_fk; Type: FK CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY sample_properties - ADD CONSTRAINT sapr_cvte_fk FOREIGN KEY (cvte_id) REFERENCES controlled_vocabulary_terms(id); +ALTER TABLE ONLY public.sample_relationships_history + ADD CONSTRAINT samprelh_main_samp_fk FOREIGN KEY (main_samp_id) REFERENCES public.samples_all(id) ON DELETE CASCADE; -- --- Name: sapr_mapr_fk; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: sample_relationships_history samprelh_project_fk; Type: FK CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY sample_properties - ADD CONSTRAINT sapr_mapr_fk FOREIGN KEY (mate_prop_id) REFERENCES materials(id); +ALTER TABLE ONLY public.sample_relationships_history + ADD CONSTRAINT samprelh_project_fk FOREIGN KEY (proj_id) REFERENCES public.projects(id) ON DELETE SET NULL; -- --- Name: sapr_pers_fk; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: sample_relationships_history samprelh_samp_fk; Type: FK CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY sample_properties - ADD CONSTRAINT sapr_pers_fk FOREIGN KEY (pers_id_registerer) REFERENCES persons(id) DEFERRABLE INITIALLY DEFERRED; +ALTER TABLE ONLY public.sample_relationships_history + ADD CONSTRAINT samprelh_samp_fk FOREIGN KEY (samp_id) REFERENCES public.samples_all(id) ON DELETE SET NULL; -- --- Name: sapr_samp_fk; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: sample_relationships_history samprelh_space_fk; Type: FK CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY sample_properties - ADD CONSTRAINT sapr_samp_fk FOREIGN KEY (samp_id) REFERENCES samples_all(id); +ALTER TABLE ONLY public.sample_relationships_history + ADD CONSTRAINT samprelh_space_fk FOREIGN KEY (space_id) REFERENCES public.spaces(id) ON DELETE SET NULL; -- --- Name: sapr_stpt_fk; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: sample_properties sapr_cvte_fk; Type: FK CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY sample_properties - ADD CONSTRAINT sapr_stpt_fk FOREIGN KEY (stpt_id) REFERENCES sample_type_property_types(id) ON DELETE CASCADE; +ALTER TABLE ONLY public.sample_properties + ADD CONSTRAINT sapr_cvte_fk FOREIGN KEY (cvte_id) REFERENCES public.controlled_vocabulary_terms(id); -- --- Name: saprh_samp_fk; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: sample_properties sapr_mapr_fk; Type: FK CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY sample_properties_history - ADD CONSTRAINT saprh_samp_fk FOREIGN KEY (samp_id) REFERENCES samples_all(id) ON DELETE CASCADE; +ALTER TABLE ONLY public.sample_properties + ADD CONSTRAINT sapr_mapr_fk FOREIGN KEY (mate_prop_id) REFERENCES public.materials(id); -- --- Name: saprh_stpt_fk; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: sample_properties sapr_pers_fk; Type: FK CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY sample_properties_history - ADD CONSTRAINT saprh_stpt_fk FOREIGN KEY (stpt_id) REFERENCES sample_type_property_types(id) ON DELETE CASCADE; +ALTER TABLE ONLY public.sample_properties + ADD CONSTRAINT sapr_pers_fk FOREIGN KEY (pers_id_registerer) REFERENCES public.persons(id) DEFERRABLE INITIALLY DEFERRED; -- --- Name: sare_data_fk_child; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: sample_properties sapr_samp_fk; Type: FK CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY sample_relationships_all - ADD CONSTRAINT sare_data_fk_child FOREIGN KEY (sample_id_child) REFERENCES samples_all(id) ON DELETE CASCADE; +ALTER TABLE ONLY public.sample_properties + ADD CONSTRAINT sapr_samp_fk FOREIGN KEY (samp_id) REFERENCES public.samples_all(id); -- --- Name: sare_data_fk_parent; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: sample_properties sapr_stpt_fk; Type: FK CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY sample_relationships_all - ADD CONSTRAINT sare_data_fk_parent FOREIGN KEY (sample_id_parent) REFERENCES samples_all(id) ON DELETE CASCADE; +ALTER TABLE ONLY public.sample_properties + ADD CONSTRAINT sapr_stpt_fk FOREIGN KEY (stpt_id) REFERENCES public.sample_type_property_types(id) ON DELETE CASCADE; -- --- Name: sare_data_fk_relationship; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: sample_properties_history saprh_samp_fk; Type: FK CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY sample_relationships_all - ADD CONSTRAINT sare_data_fk_relationship FOREIGN KEY (relationship_id) REFERENCES relationship_types(id); +ALTER TABLE ONLY public.sample_properties_history + ADD CONSTRAINT saprh_samp_fk FOREIGN KEY (samp_id) REFERENCES public.samples_all(id) ON DELETE CASCADE; -- --- Name: sare_del_fk; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: sample_properties_history saprh_stpt_fk; Type: FK CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY sample_relationships_all - ADD CONSTRAINT sare_del_fk FOREIGN KEY (del_id) REFERENCES deletions(id); +ALTER TABLE ONLY public.sample_properties_history + ADD CONSTRAINT saprh_stpt_fk FOREIGN KEY (stpt_id) REFERENCES public.sample_type_property_types(id) ON DELETE CASCADE; -- --- Name: saty_script_fk; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: sample_relationships_all sare_data_fk_child; Type: FK CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY sample_types - ADD CONSTRAINT saty_script_fk FOREIGN KEY (validation_script_id) REFERENCES scripts(id); +ALTER TABLE ONLY public.sample_relationships_all + ADD CONSTRAINT sare_data_fk_child FOREIGN KEY (sample_id_child) REFERENCES public.samples_all(id) ON DELETE CASCADE; -- --- Name: scri_pers_fk; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: sample_relationships_all sare_data_fk_parent; Type: FK CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY scripts - ADD CONSTRAINT scri_pers_fk FOREIGN KEY (pers_id_registerer) REFERENCES persons(id) DEFERRABLE INITIALLY DEFERRED; +ALTER TABLE ONLY public.sample_relationships_all + ADD CONSTRAINT sare_data_fk_parent FOREIGN KEY (sample_id_parent) REFERENCES public.samples_all(id) ON DELETE CASCADE; -- --- Name: semantic_annotations_prty_id_fk; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: sample_relationships_all sare_data_fk_relationship; Type: FK CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY semantic_annotations - ADD CONSTRAINT semantic_annotations_prty_id_fk FOREIGN KEY (prty_id) REFERENCES property_types(id) ON DELETE CASCADE DEFERRABLE INITIALLY DEFERRED; +ALTER TABLE ONLY public.sample_relationships_all + ADD CONSTRAINT sare_data_fk_relationship FOREIGN KEY (relationship_id) REFERENCES public.relationship_types(id); -- --- Name: semantic_annotations_saty_id_fk; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: sample_relationships_all sare_del_fk; Type: FK CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY semantic_annotations - ADD CONSTRAINT semantic_annotations_saty_id_fk FOREIGN KEY (saty_id) REFERENCES sample_types(id) ON DELETE CASCADE DEFERRABLE INITIALLY DEFERRED; +ALTER TABLE ONLY public.sample_relationships_all + ADD CONSTRAINT sare_del_fk FOREIGN KEY (del_id) REFERENCES public.deletions(id); -- --- Name: semantic_annotations_stpt_id_fk; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: sample_types saty_script_fk; Type: FK CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY semantic_annotations - ADD CONSTRAINT semantic_annotations_stpt_id_fk FOREIGN KEY (stpt_id) REFERENCES sample_type_property_types(id) ON DELETE CASCADE DEFERRABLE INITIALLY DEFERRED; +ALTER TABLE ONLY public.sample_types + ADD CONSTRAINT saty_script_fk FOREIGN KEY (validation_script_id) REFERENCES public.scripts(id); -- --- Name: space_pers_fk_registerer; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: scripts scri_pers_fk; Type: FK CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY spaces - ADD CONSTRAINT space_pers_fk_registerer FOREIGN KEY (pers_id_registerer) REFERENCES persons(id) DEFERRABLE INITIALLY DEFERRED; +ALTER TABLE ONLY public.scripts + ADD CONSTRAINT scri_pers_fk FOREIGN KEY (pers_id_registerer) REFERENCES public.persons(id) DEFERRABLE INITIALLY DEFERRED; -- --- Name: stpt_pers_fk; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: semantic_annotations semantic_annotations_prty_id_fk; Type: FK CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY sample_type_property_types - ADD CONSTRAINT stpt_pers_fk FOREIGN KEY (pers_id_registerer) REFERENCES persons(id) DEFERRABLE INITIALLY DEFERRED; +ALTER TABLE ONLY public.semantic_annotations + ADD CONSTRAINT semantic_annotations_prty_id_fk FOREIGN KEY (prty_id) REFERENCES public.property_types(id) ON DELETE CASCADE DEFERRABLE INITIALLY DEFERRED; -- --- Name: stpt_prty_fk; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: semantic_annotations semantic_annotations_saty_id_fk; Type: FK CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY sample_type_property_types - ADD CONSTRAINT stpt_prty_fk FOREIGN KEY (prty_id) REFERENCES property_types(id) ON DELETE CASCADE; +ALTER TABLE ONLY public.semantic_annotations + ADD CONSTRAINT semantic_annotations_saty_id_fk FOREIGN KEY (saty_id) REFERENCES public.sample_types(id) ON DELETE CASCADE DEFERRABLE INITIALLY DEFERRED; -- --- Name: stpt_saty_fk; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: semantic_annotations semantic_annotations_stpt_id_fk; Type: FK CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY sample_type_property_types - ADD CONSTRAINT stpt_saty_fk FOREIGN KEY (saty_id) REFERENCES sample_types(id) ON DELETE CASCADE; +ALTER TABLE ONLY public.semantic_annotations + ADD CONSTRAINT semantic_annotations_stpt_id_fk FOREIGN KEY (stpt_id) REFERENCES public.sample_type_property_types(id) ON DELETE CASCADE DEFERRABLE INITIALLY DEFERRED; -- --- Name: stpt_script_fk; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: spaces space_pers_fk_registerer; Type: FK CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY sample_type_property_types - ADD CONSTRAINT stpt_script_fk FOREIGN KEY (script_id) REFERENCES scripts(id); +ALTER TABLE ONLY public.spaces + ADD CONSTRAINT space_pers_fk_registerer FOREIGN KEY (pers_id_registerer) REFERENCES public.persons(id) DEFERRABLE INITIALLY DEFERRED; -- --- Name: public; Type: ACL; Schema: -; Owner: - +-- Name: sample_type_property_types stpt_pers_fk; Type: FK CONSTRAINT; Schema: public; Owner: - -- -REVOKE ALL ON SCHEMA public FROM PUBLIC; -REVOKE ALL ON SCHEMA public FROM pkupczyk; -GRANT ALL ON SCHEMA public TO pkupczyk; -GRANT ALL ON SCHEMA public TO postgres; -GRANT ALL ON SCHEMA public TO PUBLIC; +ALTER TABLE ONLY public.sample_type_property_types + ADD CONSTRAINT stpt_pers_fk FOREIGN KEY (pers_id_registerer) REFERENCES public.persons(id) DEFERRABLE INITIALLY DEFERRED; -- --- Name: attachment_content_id_seq; Type: ACL; Schema: public; Owner: - +-- Name: sample_type_property_types stpt_prty_fk; Type: FK CONSTRAINT; Schema: public; Owner: - -- -REVOKE ALL ON SEQUENCE attachment_content_id_seq FROM PUBLIC; -REVOKE ALL ON SEQUENCE attachment_content_id_seq FROM pkupczyk; -GRANT ALL ON SEQUENCE attachment_content_id_seq TO pkupczyk; -GRANT SELECT ON SEQUENCE attachment_content_id_seq TO openbis_readonly; +ALTER TABLE ONLY public.sample_type_property_types + ADD CONSTRAINT stpt_prty_fk FOREIGN KEY (prty_id) REFERENCES public.property_types(id) ON DELETE CASCADE; -- --- Name: attachment_contents; Type: ACL; Schema: public; Owner: - +-- Name: sample_type_property_types stpt_saty_fk; Type: FK CONSTRAINT; Schema: public; Owner: - -- -REVOKE ALL ON TABLE attachment_contents FROM PUBLIC; -REVOKE ALL ON TABLE attachment_contents FROM pkupczyk; -GRANT ALL ON TABLE attachment_contents TO pkupczyk; -GRANT SELECT ON TABLE attachment_contents TO openbis_readonly; +ALTER TABLE ONLY public.sample_type_property_types + ADD CONSTRAINT stpt_saty_fk FOREIGN KEY (saty_id) REFERENCES public.sample_types(id) ON DELETE CASCADE; -- --- Name: attachment_id_seq; Type: ACL; Schema: public; Owner: - +-- Name: sample_type_property_types stpt_script_fk; Type: FK CONSTRAINT; Schema: public; Owner: - -- -REVOKE ALL ON SEQUENCE attachment_id_seq FROM PUBLIC; -REVOKE ALL ON SEQUENCE attachment_id_seq FROM pkupczyk; -GRANT ALL ON SEQUENCE attachment_id_seq TO pkupczyk; -GRANT SELECT ON SEQUENCE attachment_id_seq TO openbis_readonly; +ALTER TABLE ONLY public.sample_type_property_types + ADD CONSTRAINT stpt_script_fk FOREIGN KEY (script_id) REFERENCES public.scripts(id); -- --- Name: attachments; Type: ACL; Schema: public; Owner: - +-- Name: SEQUENCE attachment_content_id_seq; Type: ACL; Schema: public; Owner: - -- -REVOKE ALL ON TABLE attachments FROM PUBLIC; -REVOKE ALL ON TABLE attachments FROM pkupczyk; -GRANT ALL ON TABLE attachments TO pkupczyk; -GRANT SELECT ON TABLE attachments TO openbis_readonly; +GRANT SELECT ON SEQUENCE public.attachment_content_id_seq TO openbis_readonly; -- --- Name: authorization_group_id_seq; Type: ACL; Schema: public; Owner: - +-- Name: TABLE attachment_contents; Type: ACL; Schema: public; Owner: - -- -REVOKE ALL ON SEQUENCE authorization_group_id_seq FROM PUBLIC; -REVOKE ALL ON SEQUENCE authorization_group_id_seq FROM pkupczyk; -GRANT ALL ON SEQUENCE authorization_group_id_seq TO pkupczyk; -GRANT SELECT ON SEQUENCE authorization_group_id_seq TO openbis_readonly; +GRANT SELECT ON TABLE public.attachment_contents TO openbis_readonly; -- --- Name: authorization_group_persons; Type: ACL; Schema: public; Owner: - +-- Name: SEQUENCE attachment_id_seq; Type: ACL; Schema: public; Owner: - -- -REVOKE ALL ON TABLE authorization_group_persons FROM PUBLIC; -REVOKE ALL ON TABLE authorization_group_persons FROM pkupczyk; -GRANT ALL ON TABLE authorization_group_persons TO pkupczyk; -GRANT SELECT ON TABLE authorization_group_persons TO openbis_readonly; +GRANT SELECT ON SEQUENCE public.attachment_id_seq TO openbis_readonly; -- --- Name: authorization_groups; Type: ACL; Schema: public; Owner: - +-- Name: TABLE attachments; Type: ACL; Schema: public; Owner: - -- -REVOKE ALL ON TABLE authorization_groups FROM PUBLIC; -REVOKE ALL ON TABLE authorization_groups FROM pkupczyk; -GRANT ALL ON TABLE authorization_groups TO pkupczyk; -GRANT SELECT ON TABLE authorization_groups TO openbis_readonly; +GRANT SELECT ON TABLE public.attachments TO openbis_readonly; -- --- Name: code_seq; Type: ACL; Schema: public; Owner: - +-- Name: SEQUENCE authorization_group_id_seq; Type: ACL; Schema: public; Owner: - -- -REVOKE ALL ON SEQUENCE code_seq FROM PUBLIC; -REVOKE ALL ON SEQUENCE code_seq FROM pkupczyk; -GRANT ALL ON SEQUENCE code_seq TO pkupczyk; -GRANT SELECT ON SEQUENCE code_seq TO openbis_readonly; +GRANT SELECT ON SEQUENCE public.authorization_group_id_seq TO openbis_readonly; -- --- Name: content_copies; Type: ACL; Schema: public; Owner: - +-- Name: TABLE authorization_group_persons; Type: ACL; Schema: public; Owner: - -- -REVOKE ALL ON TABLE content_copies FROM PUBLIC; -REVOKE ALL ON TABLE content_copies FROM pkupczyk; -GRANT ALL ON TABLE content_copies TO pkupczyk; -GRANT SELECT ON TABLE content_copies TO openbis_readonly; +GRANT SELECT ON TABLE public.authorization_group_persons TO openbis_readonly; -- --- Name: controlled_vocabularies; Type: ACL; Schema: public; Owner: - +-- Name: TABLE authorization_groups; Type: ACL; Schema: public; Owner: - -- -REVOKE ALL ON TABLE controlled_vocabularies FROM PUBLIC; -REVOKE ALL ON TABLE controlled_vocabularies FROM pkupczyk; -GRANT ALL ON TABLE controlled_vocabularies TO pkupczyk; -GRANT SELECT ON TABLE controlled_vocabularies TO openbis_readonly; +GRANT SELECT ON TABLE public.authorization_groups TO openbis_readonly; -- --- Name: controlled_vocabulary_id_seq; Type: ACL; Schema: public; Owner: - +-- Name: SEQUENCE code_seq; Type: ACL; Schema: public; Owner: - -- -REVOKE ALL ON SEQUENCE controlled_vocabulary_id_seq FROM PUBLIC; -REVOKE ALL ON SEQUENCE controlled_vocabulary_id_seq FROM pkupczyk; -GRANT ALL ON SEQUENCE controlled_vocabulary_id_seq TO pkupczyk; -GRANT SELECT ON SEQUENCE controlled_vocabulary_id_seq TO openbis_readonly; +GRANT SELECT ON SEQUENCE public.code_seq TO openbis_readonly; -- --- Name: controlled_vocabulary_terms; Type: ACL; Schema: public; Owner: - +-- Name: TABLE content_copies; Type: ACL; Schema: public; Owner: - -- -REVOKE ALL ON TABLE controlled_vocabulary_terms FROM PUBLIC; -REVOKE ALL ON TABLE controlled_vocabulary_terms FROM pkupczyk; -GRANT ALL ON TABLE controlled_vocabulary_terms TO pkupczyk; -GRANT SELECT ON TABLE controlled_vocabulary_terms TO openbis_readonly; +GRANT SELECT ON TABLE public.content_copies TO openbis_readonly; -- --- Name: core_plugin_id_seq; Type: ACL; Schema: public; Owner: - +-- Name: TABLE controlled_vocabularies; Type: ACL; Schema: public; Owner: - -- -REVOKE ALL ON SEQUENCE core_plugin_id_seq FROM PUBLIC; -REVOKE ALL ON SEQUENCE core_plugin_id_seq FROM pkupczyk; -GRANT ALL ON SEQUENCE core_plugin_id_seq TO pkupczyk; -GRANT SELECT ON SEQUENCE core_plugin_id_seq TO openbis_readonly; +GRANT SELECT ON TABLE public.controlled_vocabularies TO openbis_readonly; -- --- Name: core_plugins; Type: ACL; Schema: public; Owner: - +-- Name: SEQUENCE controlled_vocabulary_id_seq; Type: ACL; Schema: public; Owner: - -- -REVOKE ALL ON TABLE core_plugins FROM PUBLIC; -REVOKE ALL ON TABLE core_plugins FROM pkupczyk; -GRANT ALL ON TABLE core_plugins TO pkupczyk; -GRANT SELECT ON TABLE core_plugins TO openbis_readonly; +GRANT SELECT ON SEQUENCE public.controlled_vocabulary_id_seq TO openbis_readonly; -- --- Name: cvte_id_seq; Type: ACL; Schema: public; Owner: - +-- Name: TABLE controlled_vocabulary_terms; Type: ACL; Schema: public; Owner: - -- -REVOKE ALL ON SEQUENCE cvte_id_seq FROM PUBLIC; -REVOKE ALL ON SEQUENCE cvte_id_seq FROM pkupczyk; -GRANT ALL ON SEQUENCE cvte_id_seq TO pkupczyk; -GRANT SELECT ON SEQUENCE cvte_id_seq TO openbis_readonly; +GRANT SELECT ON TABLE public.controlled_vocabulary_terms TO openbis_readonly; -- --- Name: data_all; Type: ACL; Schema: public; Owner: - +-- Name: SEQUENCE core_plugin_id_seq; Type: ACL; Schema: public; Owner: - -- -REVOKE ALL ON TABLE data_all FROM PUBLIC; -REVOKE ALL ON TABLE data_all FROM pkupczyk; -GRANT ALL ON TABLE data_all TO pkupczyk; -GRANT SELECT ON TABLE data_all TO openbis_readonly; +GRANT SELECT ON SEQUENCE public.core_plugin_id_seq TO openbis_readonly; -- --- Name: data_id_seq; Type: ACL; Schema: public; Owner: - +-- Name: TABLE core_plugins; Type: ACL; Schema: public; Owner: - -- -REVOKE ALL ON SEQUENCE data_id_seq FROM PUBLIC; -REVOKE ALL ON SEQUENCE data_id_seq FROM pkupczyk; -GRANT ALL ON SEQUENCE data_id_seq TO pkupczyk; -GRANT SELECT ON SEQUENCE data_id_seq TO openbis_readonly; +GRANT SELECT ON TABLE public.core_plugins TO openbis_readonly; -- --- Name: data_set_properties_history; Type: ACL; Schema: public; Owner: - +-- Name: SEQUENCE cvte_id_seq; Type: ACL; Schema: public; Owner: - -- -REVOKE ALL ON TABLE data_set_properties_history FROM PUBLIC; -REVOKE ALL ON TABLE data_set_properties_history FROM pkupczyk; -GRANT ALL ON TABLE data_set_properties_history TO pkupczyk; -GRANT SELECT ON TABLE data_set_properties_history TO openbis_readonly; +GRANT SELECT ON SEQUENCE public.cvte_id_seq TO openbis_readonly; -- --- Name: data_set_relationships_history; Type: ACL; Schema: public; Owner: - +-- Name: TABLE data_all; Type: ACL; Schema: public; Owner: - -- -REVOKE ALL ON TABLE data_set_relationships_history FROM PUBLIC; -REVOKE ALL ON TABLE data_set_relationships_history FROM pkupczyk; -GRANT ALL ON TABLE data_set_relationships_history TO pkupczyk; -GRANT SELECT ON TABLE data_set_relationships_history TO openbis_readonly; +GRANT SELECT ON TABLE public.data_all TO openbis_readonly; -- --- Name: data_set_properties; Type: ACL; Schema: public; Owner: - +-- Name: SEQUENCE data_id_seq; Type: ACL; Schema: public; Owner: - -- -REVOKE ALL ON TABLE data_set_properties FROM PUBLIC; -REVOKE ALL ON TABLE data_set_properties FROM pkupczyk; -GRANT ALL ON TABLE data_set_properties TO pkupczyk; -GRANT SELECT ON TABLE data_set_properties TO openbis_readonly; +GRANT SELECT ON SEQUENCE public.data_id_seq TO openbis_readonly; -- --- Name: data_set_property_id_seq; Type: ACL; Schema: public; Owner: - +-- Name: TABLE data_set_properties_history; Type: ACL; Schema: public; Owner: - -- -REVOKE ALL ON SEQUENCE data_set_property_id_seq FROM PUBLIC; -REVOKE ALL ON SEQUENCE data_set_property_id_seq FROM pkupczyk; -GRANT ALL ON SEQUENCE data_set_property_id_seq TO pkupczyk; -GRANT SELECT ON SEQUENCE data_set_property_id_seq TO openbis_readonly; +GRANT SELECT ON TABLE public.data_set_properties_history TO openbis_readonly; -- --- Name: data_set_relationship_id_seq; Type: ACL; Schema: public; Owner: - +-- Name: TABLE data_set_relationships_history; Type: ACL; Schema: public; Owner: - -- -REVOKE ALL ON SEQUENCE data_set_relationship_id_seq FROM PUBLIC; -REVOKE ALL ON SEQUENCE data_set_relationship_id_seq FROM pkupczyk; -GRANT ALL ON SEQUENCE data_set_relationship_id_seq TO pkupczyk; -GRANT SELECT ON SEQUENCE data_set_relationship_id_seq TO openbis_readonly; +GRANT SELECT ON TABLE public.data_set_relationships_history TO openbis_readonly; -- --- Name: data_set_relationships_all; Type: ACL; Schema: public; Owner: - +-- Name: TABLE data_set_properties; Type: ACL; Schema: public; Owner: - -- -REVOKE ALL ON TABLE data_set_relationships_all FROM PUBLIC; -REVOKE ALL ON TABLE data_set_relationships_all FROM pkupczyk; -GRANT ALL ON TABLE data_set_relationships_all TO pkupczyk; -GRANT SELECT ON TABLE data_set_relationships_all TO openbis_readonly; +GRANT SELECT ON TABLE public.data_set_properties TO openbis_readonly; -- --- Name: data_set_relationships_history_id_seq; Type: ACL; Schema: public; Owner: - +-- Name: SEQUENCE data_set_property_id_seq; Type: ACL; Schema: public; Owner: - -- -REVOKE ALL ON SEQUENCE data_set_relationships_history_id_seq FROM PUBLIC; -REVOKE ALL ON SEQUENCE data_set_relationships_history_id_seq FROM pkupczyk; -GRANT ALL ON SEQUENCE data_set_relationships_history_id_seq TO pkupczyk; -GRANT SELECT ON SEQUENCE data_set_relationships_history_id_seq TO openbis_readonly; +GRANT SELECT ON SEQUENCE public.data_set_property_id_seq TO openbis_readonly; -- --- Name: data_set_type_id_seq; Type: ACL; Schema: public; Owner: - +-- Name: SEQUENCE data_set_relationship_id_seq; Type: ACL; Schema: public; Owner: - -- -REVOKE ALL ON SEQUENCE data_set_type_id_seq FROM PUBLIC; -REVOKE ALL ON SEQUENCE data_set_type_id_seq FROM pkupczyk; -GRANT ALL ON SEQUENCE data_set_type_id_seq TO pkupczyk; -GRANT SELECT ON SEQUENCE data_set_type_id_seq TO openbis_readonly; +GRANT SELECT ON SEQUENCE public.data_set_relationship_id_seq TO openbis_readonly; -- --- Name: data_set_type_property_types; Type: ACL; Schema: public; Owner: - +-- Name: TABLE data_set_relationships_all; Type: ACL; Schema: public; Owner: - -- -REVOKE ALL ON TABLE data_set_type_property_types FROM PUBLIC; -REVOKE ALL ON TABLE data_set_type_property_types FROM pkupczyk; -GRANT ALL ON TABLE data_set_type_property_types TO pkupczyk; -GRANT SELECT ON TABLE data_set_type_property_types TO openbis_readonly; +GRANT SELECT ON TABLE public.data_set_relationships_all TO openbis_readonly; -- --- Name: data_set_types; Type: ACL; Schema: public; Owner: - +-- Name: SEQUENCE data_set_relationships_history_id_seq; Type: ACL; Schema: public; Owner: - -- -REVOKE ALL ON TABLE data_set_types FROM PUBLIC; -REVOKE ALL ON TABLE data_set_types FROM pkupczyk; -GRANT ALL ON TABLE data_set_types TO pkupczyk; -GRANT SELECT ON TABLE data_set_types TO openbis_readonly; +GRANT SELECT ON SEQUENCE public.data_set_relationships_history_id_seq TO openbis_readonly; -- --- Name: data_store_id_seq; Type: ACL; Schema: public; Owner: - +-- Name: SEQUENCE data_set_type_id_seq; Type: ACL; Schema: public; Owner: - -- -REVOKE ALL ON SEQUENCE data_store_id_seq FROM PUBLIC; -REVOKE ALL ON SEQUENCE data_store_id_seq FROM pkupczyk; -GRANT ALL ON SEQUENCE data_store_id_seq TO pkupczyk; -GRANT SELECT ON SEQUENCE data_store_id_seq TO openbis_readonly; +GRANT SELECT ON SEQUENCE public.data_set_type_id_seq TO openbis_readonly; -- --- Name: data_store_service_data_set_types; Type: ACL; Schema: public; Owner: - +-- Name: TABLE data_set_type_property_types; Type: ACL; Schema: public; Owner: - -- -REVOKE ALL ON TABLE data_store_service_data_set_types FROM PUBLIC; -REVOKE ALL ON TABLE data_store_service_data_set_types FROM pkupczyk; -GRANT ALL ON TABLE data_store_service_data_set_types TO pkupczyk; -GRANT SELECT ON TABLE data_store_service_data_set_types TO openbis_readonly; +GRANT SELECT ON TABLE public.data_set_type_property_types TO openbis_readonly; -- --- Name: data_store_services; Type: ACL; Schema: public; Owner: - +-- Name: TABLE data_set_types; Type: ACL; Schema: public; Owner: - -- -REVOKE ALL ON TABLE data_store_services FROM PUBLIC; -REVOKE ALL ON TABLE data_store_services FROM pkupczyk; -GRANT ALL ON TABLE data_store_services TO pkupczyk; -GRANT SELECT ON TABLE data_store_services TO openbis_readonly; +GRANT SELECT ON TABLE public.data_set_types TO openbis_readonly; -- --- Name: data_store_services_id_seq; Type: ACL; Schema: public; Owner: - +-- Name: SEQUENCE data_store_id_seq; Type: ACL; Schema: public; Owner: - -- -REVOKE ALL ON SEQUENCE data_store_services_id_seq FROM PUBLIC; -REVOKE ALL ON SEQUENCE data_store_services_id_seq FROM pkupczyk; -GRANT ALL ON SEQUENCE data_store_services_id_seq TO pkupczyk; -GRANT SELECT ON SEQUENCE data_store_services_id_seq TO openbis_readonly; +GRANT SELECT ON SEQUENCE public.data_store_id_seq TO openbis_readonly; -- --- Name: data_stores; Type: ACL; Schema: public; Owner: - +-- Name: TABLE data_store_service_data_set_types; Type: ACL; Schema: public; Owner: - -- -REVOKE ALL ON TABLE data_stores FROM PUBLIC; -REVOKE ALL ON TABLE data_stores FROM pkupczyk; -GRANT ALL ON TABLE data_stores TO pkupczyk; -GRANT SELECT ON TABLE data_stores TO openbis_readonly; +GRANT SELECT ON TABLE public.data_store_service_data_set_types TO openbis_readonly; -- --- Name: data_type_id_seq; Type: ACL; Schema: public; Owner: - +-- Name: TABLE data_store_services; Type: ACL; Schema: public; Owner: - -- -REVOKE ALL ON SEQUENCE data_type_id_seq FROM PUBLIC; -REVOKE ALL ON SEQUENCE data_type_id_seq FROM pkupczyk; -GRANT ALL ON SEQUENCE data_type_id_seq TO pkupczyk; -GRANT SELECT ON SEQUENCE data_type_id_seq TO openbis_readonly; +GRANT SELECT ON TABLE public.data_store_services TO openbis_readonly; -- --- Name: data_types; Type: ACL; Schema: public; Owner: - +-- Name: SEQUENCE data_store_services_id_seq; Type: ACL; Schema: public; Owner: - -- -REVOKE ALL ON TABLE data_types FROM PUBLIC; -REVOKE ALL ON TABLE data_types FROM pkupczyk; -GRANT ALL ON TABLE data_types TO pkupczyk; -GRANT SELECT ON TABLE data_types TO openbis_readonly; +GRANT SELECT ON SEQUENCE public.data_store_services_id_seq TO openbis_readonly; -- --- Name: database_instance_id_seq; Type: ACL; Schema: public; Owner: - +-- Name: TABLE data_stores; Type: ACL; Schema: public; Owner: - -- -REVOKE ALL ON SEQUENCE database_instance_id_seq FROM PUBLIC; -REVOKE ALL ON SEQUENCE database_instance_id_seq FROM pkupczyk; -GRANT ALL ON SEQUENCE database_instance_id_seq TO pkupczyk; -GRANT SELECT ON SEQUENCE database_instance_id_seq TO openbis_readonly; +GRANT SELECT ON TABLE public.data_stores TO openbis_readonly; -- --- Name: database_version_logs; Type: ACL; Schema: public; Owner: - +-- Name: SEQUENCE data_type_id_seq; Type: ACL; Schema: public; Owner: - -- -REVOKE ALL ON TABLE database_version_logs FROM PUBLIC; -REVOKE ALL ON TABLE database_version_logs FROM pkupczyk; -GRANT ALL ON TABLE database_version_logs TO pkupczyk; -GRANT SELECT ON TABLE database_version_logs TO openbis_readonly; +GRANT SELECT ON SEQUENCE public.data_type_id_seq TO openbis_readonly; -- --- Name: deletion_id_seq; Type: ACL; Schema: public; Owner: - +-- Name: TABLE data_types; Type: ACL; Schema: public; Owner: - -- -REVOKE ALL ON SEQUENCE deletion_id_seq FROM PUBLIC; -REVOKE ALL ON SEQUENCE deletion_id_seq FROM pkupczyk; -GRANT ALL ON SEQUENCE deletion_id_seq TO pkupczyk; -GRANT SELECT ON SEQUENCE deletion_id_seq TO openbis_readonly; +GRANT SELECT ON TABLE public.data_types TO openbis_readonly; -- --- Name: deletions; Type: ACL; Schema: public; Owner: - +-- Name: SEQUENCE database_instance_id_seq; Type: ACL; Schema: public; Owner: - -- -REVOKE ALL ON TABLE deletions FROM PUBLIC; -REVOKE ALL ON TABLE deletions FROM pkupczyk; -GRANT ALL ON TABLE deletions TO pkupczyk; -GRANT SELECT ON TABLE deletions TO openbis_readonly; +GRANT SELECT ON SEQUENCE public.database_instance_id_seq TO openbis_readonly; -- --- Name: dstpt_id_seq; Type: ACL; Schema: public; Owner: - +-- Name: TABLE database_version_logs; Type: ACL; Schema: public; Owner: - -- -REVOKE ALL ON SEQUENCE dstpt_id_seq FROM PUBLIC; -REVOKE ALL ON SEQUENCE dstpt_id_seq FROM pkupczyk; -GRANT ALL ON SEQUENCE dstpt_id_seq TO pkupczyk; -GRANT SELECT ON SEQUENCE dstpt_id_seq TO openbis_readonly; +GRANT SELECT ON TABLE public.database_version_logs TO openbis_readonly; -- --- Name: entity_operations_log; Type: ACL; Schema: public; Owner: - +-- Name: SEQUENCE deletion_id_seq; Type: ACL; Schema: public; Owner: - -- -REVOKE ALL ON TABLE entity_operations_log FROM PUBLIC; -REVOKE ALL ON TABLE entity_operations_log FROM pkupczyk; -GRANT ALL ON TABLE entity_operations_log TO pkupczyk; -GRANT SELECT ON TABLE entity_operations_log TO openbis_readonly; +GRANT SELECT ON SEQUENCE public.deletion_id_seq TO openbis_readonly; -- --- Name: entity_operations_log_id_seq; Type: ACL; Schema: public; Owner: - +-- Name: TABLE deletions; Type: ACL; Schema: public; Owner: - -- -REVOKE ALL ON SEQUENCE entity_operations_log_id_seq FROM PUBLIC; -REVOKE ALL ON SEQUENCE entity_operations_log_id_seq FROM pkupczyk; -GRANT ALL ON SEQUENCE entity_operations_log_id_seq TO pkupczyk; -GRANT SELECT ON SEQUENCE entity_operations_log_id_seq TO openbis_readonly; +GRANT SELECT ON TABLE public.deletions TO openbis_readonly; -- --- Name: etpt_id_seq; Type: ACL; Schema: public; Owner: - +-- Name: SEQUENCE dstpt_id_seq; Type: ACL; Schema: public; Owner: - -- -REVOKE ALL ON SEQUENCE etpt_id_seq FROM PUBLIC; -REVOKE ALL ON SEQUENCE etpt_id_seq FROM pkupczyk; -GRANT ALL ON SEQUENCE etpt_id_seq TO pkupczyk; -GRANT SELECT ON SEQUENCE etpt_id_seq TO openbis_readonly; +GRANT SELECT ON SEQUENCE public.dstpt_id_seq TO openbis_readonly; -- --- Name: event_id_seq; Type: ACL; Schema: public; Owner: - +-- Name: TABLE entity_operations_log; Type: ACL; Schema: public; Owner: - -- -REVOKE ALL ON SEQUENCE event_id_seq FROM PUBLIC; -REVOKE ALL ON SEQUENCE event_id_seq FROM pkupczyk; -GRANT ALL ON SEQUENCE event_id_seq TO pkupczyk; -GRANT SELECT ON SEQUENCE event_id_seq TO openbis_readonly; +GRANT SELECT ON TABLE public.entity_operations_log TO openbis_readonly; -- --- Name: events; Type: ACL; Schema: public; Owner: - +-- Name: SEQUENCE entity_operations_log_id_seq; Type: ACL; Schema: public; Owner: - -- -REVOKE ALL ON TABLE events FROM PUBLIC; -REVOKE ALL ON TABLE events FROM pkupczyk; -GRANT ALL ON TABLE events TO pkupczyk; -GRANT SELECT ON TABLE events TO openbis_readonly; +GRANT SELECT ON SEQUENCE public.entity_operations_log_id_seq TO openbis_readonly; -- --- Name: experiment_code_seq; Type: ACL; Schema: public; Owner: - +-- Name: SEQUENCE etpt_id_seq; Type: ACL; Schema: public; Owner: - -- -REVOKE ALL ON SEQUENCE experiment_code_seq FROM PUBLIC; -REVOKE ALL ON SEQUENCE experiment_code_seq FROM pkupczyk; -GRANT ALL ON SEQUENCE experiment_code_seq TO pkupczyk; -GRANT SELECT ON SEQUENCE experiment_code_seq TO openbis_readonly; +GRANT SELECT ON SEQUENCE public.etpt_id_seq TO openbis_readonly; -- --- Name: experiment_properties_history; Type: ACL; Schema: public; Owner: - +-- Name: SEQUENCE event_id_seq; Type: ACL; Schema: public; Owner: - -- -REVOKE ALL ON TABLE experiment_properties_history FROM PUBLIC; -REVOKE ALL ON TABLE experiment_properties_history FROM pkupczyk; -GRANT ALL ON TABLE experiment_properties_history TO pkupczyk; -GRANT SELECT ON TABLE experiment_properties_history TO openbis_readonly; +GRANT SELECT ON SEQUENCE public.event_id_seq TO openbis_readonly; -- --- Name: experiment_relationships_history; Type: ACL; Schema: public; Owner: - +-- Name: TABLE events; Type: ACL; Schema: public; Owner: - -- -REVOKE ALL ON TABLE experiment_relationships_history FROM PUBLIC; -REVOKE ALL ON TABLE experiment_relationships_history FROM pkupczyk; -GRANT ALL ON TABLE experiment_relationships_history TO pkupczyk; -GRANT SELECT ON TABLE experiment_relationships_history TO openbis_readonly; +GRANT SELECT ON TABLE public.events TO openbis_readonly; -- --- Name: experiment_history_view; Type: ACL; Schema: public; Owner: - +-- Name: SEQUENCE experiment_code_seq; Type: ACL; Schema: public; Owner: - -- -REVOKE ALL ON TABLE experiment_history_view FROM PUBLIC; -REVOKE ALL ON TABLE experiment_history_view FROM pkupczyk; -GRANT ALL ON TABLE experiment_history_view TO pkupczyk; -GRANT SELECT ON TABLE experiment_history_view TO openbis_readonly; +GRANT SELECT ON SEQUENCE public.experiment_code_seq TO openbis_readonly; -- --- Name: experiment_id_seq; Type: ACL; Schema: public; Owner: - +-- Name: TABLE experiment_properties_history; Type: ACL; Schema: public; Owner: - -- -REVOKE ALL ON SEQUENCE experiment_id_seq FROM PUBLIC; -REVOKE ALL ON SEQUENCE experiment_id_seq FROM pkupczyk; -GRANT ALL ON SEQUENCE experiment_id_seq TO pkupczyk; -GRANT SELECT ON SEQUENCE experiment_id_seq TO openbis_readonly; +GRANT SELECT ON TABLE public.experiment_properties_history TO openbis_readonly; -- --- Name: experiment_properties; Type: ACL; Schema: public; Owner: - +-- Name: TABLE experiment_relationships_history; Type: ACL; Schema: public; Owner: - -- -REVOKE ALL ON TABLE experiment_properties FROM PUBLIC; -REVOKE ALL ON TABLE experiment_properties FROM pkupczyk; -GRANT ALL ON TABLE experiment_properties TO pkupczyk; -GRANT SELECT ON TABLE experiment_properties TO openbis_readonly; +GRANT SELECT ON TABLE public.experiment_relationships_history TO openbis_readonly; -- --- Name: experiment_property_id_seq; Type: ACL; Schema: public; Owner: - +-- Name: TABLE experiment_history_view; Type: ACL; Schema: public; Owner: - -- -REVOKE ALL ON SEQUENCE experiment_property_id_seq FROM PUBLIC; -REVOKE ALL ON SEQUENCE experiment_property_id_seq FROM pkupczyk; -GRANT ALL ON SEQUENCE experiment_property_id_seq TO pkupczyk; -GRANT SELECT ON SEQUENCE experiment_property_id_seq TO openbis_readonly; +GRANT SELECT ON TABLE public.experiment_history_view TO openbis_readonly; -- --- Name: experiment_relationships_history_id_seq; Type: ACL; Schema: public; Owner: - +-- Name: SEQUENCE experiment_id_seq; Type: ACL; Schema: public; Owner: - -- -REVOKE ALL ON SEQUENCE experiment_relationships_history_id_seq FROM PUBLIC; -REVOKE ALL ON SEQUENCE experiment_relationships_history_id_seq FROM pkupczyk; -GRANT ALL ON SEQUENCE experiment_relationships_history_id_seq TO pkupczyk; -GRANT SELECT ON SEQUENCE experiment_relationships_history_id_seq TO openbis_readonly; +GRANT SELECT ON SEQUENCE public.experiment_id_seq TO openbis_readonly; -- --- Name: experiment_type_id_seq; Type: ACL; Schema: public; Owner: - +-- Name: TABLE experiment_properties; Type: ACL; Schema: public; Owner: - -- -REVOKE ALL ON SEQUENCE experiment_type_id_seq FROM PUBLIC; -REVOKE ALL ON SEQUENCE experiment_type_id_seq FROM pkupczyk; -GRANT ALL ON SEQUENCE experiment_type_id_seq TO pkupczyk; -GRANT SELECT ON SEQUENCE experiment_type_id_seq TO openbis_readonly; +GRANT SELECT ON TABLE public.experiment_properties TO openbis_readonly; -- --- Name: experiment_type_property_types; Type: ACL; Schema: public; Owner: - +-- Name: SEQUENCE experiment_property_id_seq; Type: ACL; Schema: public; Owner: - -- -REVOKE ALL ON TABLE experiment_type_property_types FROM PUBLIC; -REVOKE ALL ON TABLE experiment_type_property_types FROM pkupczyk; -GRANT ALL ON TABLE experiment_type_property_types TO pkupczyk; -GRANT SELECT ON TABLE experiment_type_property_types TO openbis_readonly; +GRANT SELECT ON SEQUENCE public.experiment_property_id_seq TO openbis_readonly; -- --- Name: experiment_types; Type: ACL; Schema: public; Owner: - +-- Name: SEQUENCE experiment_relationships_history_id_seq; Type: ACL; Schema: public; Owner: - -- -REVOKE ALL ON TABLE experiment_types FROM PUBLIC; -REVOKE ALL ON TABLE experiment_types FROM pkupczyk; -GRANT ALL ON TABLE experiment_types TO pkupczyk; -GRANT SELECT ON TABLE experiment_types TO openbis_readonly; +GRANT SELECT ON SEQUENCE public.experiment_relationships_history_id_seq TO openbis_readonly; -- --- Name: experiments_all; Type: ACL; Schema: public; Owner: - +-- Name: SEQUENCE experiment_type_id_seq; Type: ACL; Schema: public; Owner: - -- -REVOKE ALL ON TABLE experiments_all FROM PUBLIC; -REVOKE ALL ON TABLE experiments_all FROM pkupczyk; -GRANT ALL ON TABLE experiments_all TO pkupczyk; -GRANT SELECT ON TABLE experiments_all TO openbis_readonly; +GRANT SELECT ON SEQUENCE public.experiment_type_id_seq TO openbis_readonly; -- --- Name: experiments; Type: ACL; Schema: public; Owner: - +-- Name: TABLE experiment_type_property_types; Type: ACL; Schema: public; Owner: - -- -REVOKE ALL ON TABLE experiments FROM PUBLIC; -REVOKE ALL ON TABLE experiments FROM pkupczyk; -GRANT ALL ON TABLE experiments TO pkupczyk; -GRANT SELECT ON TABLE experiments TO openbis_readonly; +GRANT SELECT ON TABLE public.experiment_type_property_types TO openbis_readonly; -- --- Name: experiments_deleted; Type: ACL; Schema: public; Owner: - +-- Name: TABLE experiment_types; Type: ACL; Schema: public; Owner: - -- -REVOKE ALL ON TABLE experiments_deleted FROM PUBLIC; -REVOKE ALL ON TABLE experiments_deleted FROM pkupczyk; -GRANT ALL ON TABLE experiments_deleted TO pkupczyk; -GRANT SELECT ON TABLE experiments_deleted TO openbis_readonly; +GRANT SELECT ON TABLE public.experiment_types TO openbis_readonly; -- --- Name: external_data; Type: ACL; Schema: public; Owner: - +-- Name: TABLE experiments_all; Type: ACL; Schema: public; Owner: - -- -REVOKE ALL ON TABLE external_data FROM PUBLIC; -REVOKE ALL ON TABLE external_data FROM pkupczyk; -GRANT ALL ON TABLE external_data TO pkupczyk; -GRANT SELECT ON TABLE external_data TO openbis_readonly; +GRANT SELECT ON TABLE public.experiments_all TO openbis_readonly; -- --- Name: external_data_management_system_id_seq; Type: ACL; Schema: public; Owner: - +-- Name: TABLE external_data; Type: ACL; Schema: public; Owner: - -- -REVOKE ALL ON SEQUENCE external_data_management_system_id_seq FROM PUBLIC; -REVOKE ALL ON SEQUENCE external_data_management_system_id_seq FROM pkupczyk; -GRANT ALL ON SEQUENCE external_data_management_system_id_seq TO pkupczyk; -GRANT SELECT ON SEQUENCE external_data_management_system_id_seq TO openbis_readonly; +GRANT SELECT ON TABLE public.external_data TO openbis_readonly; -- --- Name: external_data_management_systems; Type: ACL; Schema: public; Owner: - +-- Name: SEQUENCE external_data_management_system_id_seq; Type: ACL; Schema: public; Owner: - -- -REVOKE ALL ON TABLE external_data_management_systems FROM PUBLIC; -REVOKE ALL ON TABLE external_data_management_systems FROM pkupczyk; -GRANT ALL ON TABLE external_data_management_systems TO pkupczyk; -GRANT SELECT ON TABLE external_data_management_systems TO openbis_readonly; +GRANT SELECT ON SEQUENCE public.external_data_management_system_id_seq TO openbis_readonly; -- --- Name: file_format_type_id_seq; Type: ACL; Schema: public; Owner: - +-- Name: TABLE external_data_management_systems; Type: ACL; Schema: public; Owner: - -- -REVOKE ALL ON SEQUENCE file_format_type_id_seq FROM PUBLIC; -REVOKE ALL ON SEQUENCE file_format_type_id_seq FROM pkupczyk; -GRANT ALL ON SEQUENCE file_format_type_id_seq TO pkupczyk; -GRANT SELECT ON SEQUENCE file_format_type_id_seq TO openbis_readonly; +GRANT SELECT ON TABLE public.external_data_management_systems TO openbis_readonly; -- --- Name: file_format_types; Type: ACL; Schema: public; Owner: - +-- Name: SEQUENCE file_format_type_id_seq; Type: ACL; Schema: public; Owner: - -- -REVOKE ALL ON TABLE file_format_types FROM PUBLIC; -REVOKE ALL ON TABLE file_format_types FROM pkupczyk; -GRANT ALL ON TABLE file_format_types TO pkupczyk; -GRANT SELECT ON TABLE file_format_types TO openbis_readonly; +GRANT SELECT ON SEQUENCE public.file_format_type_id_seq TO openbis_readonly; -- --- Name: filter_id_seq; Type: ACL; Schema: public; Owner: - +-- Name: TABLE file_format_types; Type: ACL; Schema: public; Owner: - -- -REVOKE ALL ON SEQUENCE filter_id_seq FROM PUBLIC; -REVOKE ALL ON SEQUENCE filter_id_seq FROM pkupczyk; -GRANT ALL ON SEQUENCE filter_id_seq TO pkupczyk; -GRANT SELECT ON SEQUENCE filter_id_seq TO openbis_readonly; +GRANT SELECT ON TABLE public.file_format_types TO openbis_readonly; -- --- Name: filters; Type: ACL; Schema: public; Owner: - +-- Name: SEQUENCE filter_id_seq; Type: ACL; Schema: public; Owner: - -- -REVOKE ALL ON TABLE filters FROM PUBLIC; -REVOKE ALL ON TABLE filters FROM pkupczyk; -GRANT ALL ON TABLE filters TO pkupczyk; -GRANT SELECT ON TABLE filters TO openbis_readonly; +GRANT SELECT ON SEQUENCE public.filter_id_seq TO openbis_readonly; -- --- Name: grid_custom_columns; Type: ACL; Schema: public; Owner: - +-- Name: TABLE filters; Type: ACL; Schema: public; Owner: - -- -REVOKE ALL ON TABLE grid_custom_columns FROM PUBLIC; -REVOKE ALL ON TABLE grid_custom_columns FROM pkupczyk; -GRANT ALL ON TABLE grid_custom_columns TO pkupczyk; -GRANT SELECT ON TABLE grid_custom_columns TO openbis_readonly; +GRANT SELECT ON TABLE public.filters TO openbis_readonly; -- --- Name: grid_custom_columns_id_seq; Type: ACL; Schema: public; Owner: - +-- Name: TABLE grid_custom_columns; Type: ACL; Schema: public; Owner: - -- -REVOKE ALL ON SEQUENCE grid_custom_columns_id_seq FROM PUBLIC; -REVOKE ALL ON SEQUENCE grid_custom_columns_id_seq FROM pkupczyk; -GRANT ALL ON SEQUENCE grid_custom_columns_id_seq TO pkupczyk; -GRANT SELECT ON SEQUENCE grid_custom_columns_id_seq TO openbis_readonly; +GRANT SELECT ON TABLE public.grid_custom_columns TO openbis_readonly; -- --- Name: locator_type_id_seq; Type: ACL; Schema: public; Owner: - +-- Name: SEQUENCE grid_custom_columns_id_seq; Type: ACL; Schema: public; Owner: - -- -REVOKE ALL ON SEQUENCE locator_type_id_seq FROM PUBLIC; -REVOKE ALL ON SEQUENCE locator_type_id_seq FROM pkupczyk; -GRANT ALL ON SEQUENCE locator_type_id_seq TO pkupczyk; -GRANT SELECT ON SEQUENCE locator_type_id_seq TO openbis_readonly; +GRANT SELECT ON SEQUENCE public.grid_custom_columns_id_seq TO openbis_readonly; -- --- Name: locator_types; Type: ACL; Schema: public; Owner: - +-- Name: SEQUENCE locator_type_id_seq; Type: ACL; Schema: public; Owner: - -- -REVOKE ALL ON TABLE locator_types FROM PUBLIC; -REVOKE ALL ON TABLE locator_types FROM pkupczyk; -GRANT ALL ON TABLE locator_types TO pkupczyk; -GRANT SELECT ON TABLE locator_types TO openbis_readonly; +GRANT SELECT ON SEQUENCE public.locator_type_id_seq TO openbis_readonly; -- --- Name: material_id_seq; Type: ACL; Schema: public; Owner: - +-- Name: TABLE locator_types; Type: ACL; Schema: public; Owner: - -- -REVOKE ALL ON SEQUENCE material_id_seq FROM PUBLIC; -REVOKE ALL ON SEQUENCE material_id_seq FROM pkupczyk; -GRANT ALL ON SEQUENCE material_id_seq TO pkupczyk; -GRANT SELECT ON SEQUENCE material_id_seq TO openbis_readonly; +GRANT SELECT ON TABLE public.locator_types TO openbis_readonly; -- --- Name: material_properties; Type: ACL; Schema: public; Owner: - +-- Name: SEQUENCE material_id_seq; Type: ACL; Schema: public; Owner: - -- -REVOKE ALL ON TABLE material_properties FROM PUBLIC; -REVOKE ALL ON TABLE material_properties FROM pkupczyk; -GRANT ALL ON TABLE material_properties TO pkupczyk; -GRANT SELECT ON TABLE material_properties TO openbis_readonly; +GRANT SELECT ON SEQUENCE public.material_id_seq TO openbis_readonly; -- --- Name: material_properties_history; Type: ACL; Schema: public; Owner: - +-- Name: TABLE material_properties; Type: ACL; Schema: public; Owner: - -- -REVOKE ALL ON TABLE material_properties_history FROM PUBLIC; -REVOKE ALL ON TABLE material_properties_history FROM pkupczyk; -GRANT ALL ON TABLE material_properties_history TO pkupczyk; -GRANT SELECT ON TABLE material_properties_history TO openbis_readonly; +GRANT SELECT ON TABLE public.material_properties TO openbis_readonly; -- --- Name: material_property_id_seq; Type: ACL; Schema: public; Owner: - +-- Name: TABLE material_properties_history; Type: ACL; Schema: public; Owner: - -- -REVOKE ALL ON SEQUENCE material_property_id_seq FROM PUBLIC; -REVOKE ALL ON SEQUENCE material_property_id_seq FROM pkupczyk; -GRANT ALL ON SEQUENCE material_property_id_seq TO pkupczyk; -GRANT SELECT ON SEQUENCE material_property_id_seq TO openbis_readonly; +GRANT SELECT ON TABLE public.material_properties_history TO openbis_readonly; -- --- Name: material_type_id_seq; Type: ACL; Schema: public; Owner: - +-- Name: SEQUENCE material_property_id_seq; Type: ACL; Schema: public; Owner: - -- -REVOKE ALL ON SEQUENCE material_type_id_seq FROM PUBLIC; -REVOKE ALL ON SEQUENCE material_type_id_seq FROM pkupczyk; -GRANT ALL ON SEQUENCE material_type_id_seq TO pkupczyk; -GRANT SELECT ON SEQUENCE material_type_id_seq TO openbis_readonly; +GRANT SELECT ON SEQUENCE public.material_property_id_seq TO openbis_readonly; -- --- Name: material_type_property_types; Type: ACL; Schema: public; Owner: - +-- Name: SEQUENCE material_type_id_seq; Type: ACL; Schema: public; Owner: - -- -REVOKE ALL ON TABLE material_type_property_types FROM PUBLIC; -REVOKE ALL ON TABLE material_type_property_types FROM pkupczyk; -GRANT ALL ON TABLE material_type_property_types TO pkupczyk; -GRANT SELECT ON TABLE material_type_property_types TO openbis_readonly; +GRANT SELECT ON SEQUENCE public.material_type_id_seq TO openbis_readonly; -- --- Name: material_types; Type: ACL; Schema: public; Owner: - +-- Name: TABLE material_type_property_types; Type: ACL; Schema: public; Owner: - -- -REVOKE ALL ON TABLE material_types FROM PUBLIC; -REVOKE ALL ON TABLE material_types FROM pkupczyk; -GRANT ALL ON TABLE material_types TO pkupczyk; -GRANT SELECT ON TABLE material_types TO openbis_readonly; +GRANT SELECT ON TABLE public.material_type_property_types TO openbis_readonly; -- --- Name: materials; Type: ACL; Schema: public; Owner: - +-- Name: TABLE material_types; Type: ACL; Schema: public; Owner: - -- -REVOKE ALL ON TABLE materials FROM PUBLIC; -REVOKE ALL ON TABLE materials FROM pkupczyk; -GRANT ALL ON TABLE materials TO pkupczyk; -GRANT SELECT ON TABLE materials TO openbis_readonly; +GRANT SELECT ON TABLE public.material_types TO openbis_readonly; -- --- Name: metaproject_assignment_id_seq; Type: ACL; Schema: public; Owner: - +-- Name: TABLE materials; Type: ACL; Schema: public; Owner: - -- -REVOKE ALL ON SEQUENCE metaproject_assignment_id_seq FROM PUBLIC; -REVOKE ALL ON SEQUENCE metaproject_assignment_id_seq FROM pkupczyk; -GRANT ALL ON SEQUENCE metaproject_assignment_id_seq TO pkupczyk; -GRANT SELECT ON SEQUENCE metaproject_assignment_id_seq TO openbis_readonly; +GRANT SELECT ON TABLE public.materials TO openbis_readonly; -- --- Name: metaproject_assignments_all; Type: ACL; Schema: public; Owner: - +-- Name: SEQUENCE metaproject_assignment_id_seq; Type: ACL; Schema: public; Owner: - -- -REVOKE ALL ON TABLE metaproject_assignments_all FROM PUBLIC; -REVOKE ALL ON TABLE metaproject_assignments_all FROM pkupczyk; -GRANT ALL ON TABLE metaproject_assignments_all TO pkupczyk; -GRANT SELECT ON TABLE metaproject_assignments_all TO openbis_readonly; +GRANT SELECT ON SEQUENCE public.metaproject_assignment_id_seq TO openbis_readonly; -- --- Name: metaproject_assignments; Type: ACL; Schema: public; Owner: - +-- Name: TABLE metaproject_assignments_all; Type: ACL; Schema: public; Owner: - -- -REVOKE ALL ON TABLE metaproject_assignments FROM PUBLIC; -REVOKE ALL ON TABLE metaproject_assignments FROM pkupczyk; -GRANT ALL ON TABLE metaproject_assignments TO pkupczyk; -GRANT SELECT ON TABLE metaproject_assignments TO openbis_readonly; +GRANT SELECT ON TABLE public.metaproject_assignments_all TO openbis_readonly; -- --- Name: metaproject_id_seq; Type: ACL; Schema: public; Owner: - +-- Name: TABLE metaproject_assignments; Type: ACL; Schema: public; Owner: - -- -REVOKE ALL ON SEQUENCE metaproject_id_seq FROM PUBLIC; -REVOKE ALL ON SEQUENCE metaproject_id_seq FROM pkupczyk; -GRANT ALL ON SEQUENCE metaproject_id_seq TO pkupczyk; -GRANT SELECT ON SEQUENCE metaproject_id_seq TO openbis_readonly; +GRANT SELECT ON TABLE public.metaproject_assignments TO openbis_readonly; -- --- Name: metaprojects; Type: ACL; Schema: public; Owner: - +-- Name: SEQUENCE metaproject_id_seq; Type: ACL; Schema: public; Owner: - -- -REVOKE ALL ON TABLE metaprojects FROM PUBLIC; -REVOKE ALL ON TABLE metaprojects FROM pkupczyk; -GRANT ALL ON TABLE metaprojects TO pkupczyk; -GRANT SELECT ON TABLE metaprojects TO openbis_readonly; +GRANT SELECT ON SEQUENCE public.metaproject_id_seq TO openbis_readonly; -- --- Name: mtpt_id_seq; Type: ACL; Schema: public; Owner: - +-- Name: TABLE metaprojects; Type: ACL; Schema: public; Owner: - -- -REVOKE ALL ON SEQUENCE mtpt_id_seq FROM PUBLIC; -REVOKE ALL ON SEQUENCE mtpt_id_seq FROM pkupczyk; -GRANT ALL ON SEQUENCE mtpt_id_seq TO pkupczyk; -GRANT SELECT ON SEQUENCE mtpt_id_seq TO openbis_readonly; +GRANT SELECT ON TABLE public.metaprojects TO openbis_readonly; -- --- Name: operation_executions; Type: ACL; Schema: public; Owner: - +-- Name: SEQUENCE mtpt_id_seq; Type: ACL; Schema: public; Owner: - -- -REVOKE ALL ON TABLE operation_executions FROM PUBLIC; -REVOKE ALL ON TABLE operation_executions FROM pkupczyk; -GRANT ALL ON TABLE operation_executions TO pkupczyk; -GRANT SELECT ON TABLE operation_executions TO openbis_readonly; +GRANT SELECT ON SEQUENCE public.mtpt_id_seq TO openbis_readonly; -- --- Name: perm_id_seq; Type: ACL; Schema: public; Owner: - +-- Name: TABLE operation_executions; Type: ACL; Schema: public; Owner: - -- -REVOKE ALL ON SEQUENCE perm_id_seq FROM PUBLIC; -REVOKE ALL ON SEQUENCE perm_id_seq FROM pkupczyk; -GRANT ALL ON SEQUENCE perm_id_seq TO pkupczyk; -GRANT SELECT ON SEQUENCE perm_id_seq TO openbis_readonly; +GRANT SELECT ON TABLE public.operation_executions TO openbis_readonly; -- --- Name: person_id_seq; Type: ACL; Schema: public; Owner: - +-- Name: SEQUENCE perm_id_seq; Type: ACL; Schema: public; Owner: - -- -REVOKE ALL ON SEQUENCE person_id_seq FROM PUBLIC; -REVOKE ALL ON SEQUENCE person_id_seq FROM pkupczyk; -GRANT ALL ON SEQUENCE person_id_seq TO pkupczyk; -GRANT SELECT ON SEQUENCE person_id_seq TO openbis_readonly; +GRANT SELECT ON SEQUENCE public.perm_id_seq TO openbis_readonly; -- --- Name: persons; Type: ACL; Schema: public; Owner: - +-- Name: SEQUENCE person_id_seq; Type: ACL; Schema: public; Owner: - -- -REVOKE ALL ON TABLE persons FROM PUBLIC; -REVOKE ALL ON TABLE persons FROM pkupczyk; -GRANT ALL ON TABLE persons TO pkupczyk; -GRANT SELECT ON TABLE persons TO openbis_readonly; +GRANT SELECT ON SEQUENCE public.person_id_seq TO openbis_readonly; -- --- Name: post_registration_dataset_queue; Type: ACL; Schema: public; Owner: - +-- Name: TABLE persons; Type: ACL; Schema: public; Owner: - -- -REVOKE ALL ON TABLE post_registration_dataset_queue FROM PUBLIC; -REVOKE ALL ON TABLE post_registration_dataset_queue FROM pkupczyk; -GRANT ALL ON TABLE post_registration_dataset_queue TO pkupczyk; -GRANT SELECT ON TABLE post_registration_dataset_queue TO openbis_readonly; +GRANT SELECT ON TABLE public.persons TO openbis_readonly; -- --- Name: post_registration_dataset_queue_id_seq; Type: ACL; Schema: public; Owner: - +-- Name: TABLE post_registration_dataset_queue; Type: ACL; Schema: public; Owner: - -- -REVOKE ALL ON SEQUENCE post_registration_dataset_queue_id_seq FROM PUBLIC; -REVOKE ALL ON SEQUENCE post_registration_dataset_queue_id_seq FROM pkupczyk; -GRANT ALL ON SEQUENCE post_registration_dataset_queue_id_seq TO pkupczyk; -GRANT SELECT ON SEQUENCE post_registration_dataset_queue_id_seq TO openbis_readonly; +GRANT SELECT ON TABLE public.post_registration_dataset_queue TO openbis_readonly; -- --- Name: project_id_seq; Type: ACL; Schema: public; Owner: - +-- Name: SEQUENCE post_registration_dataset_queue_id_seq; Type: ACL; Schema: public; Owner: - -- -REVOKE ALL ON SEQUENCE project_id_seq FROM PUBLIC; -REVOKE ALL ON SEQUENCE project_id_seq FROM pkupczyk; -GRANT ALL ON SEQUENCE project_id_seq TO pkupczyk; -GRANT SELECT ON SEQUENCE project_id_seq TO openbis_readonly; +GRANT SELECT ON SEQUENCE public.post_registration_dataset_queue_id_seq TO openbis_readonly; -- --- Name: project_relationships_history; Type: ACL; Schema: public; Owner: - +-- Name: SEQUENCE project_id_seq; Type: ACL; Schema: public; Owner: - -- -REVOKE ALL ON TABLE project_relationships_history FROM PUBLIC; -REVOKE ALL ON TABLE project_relationships_history FROM pkupczyk; -GRANT ALL ON TABLE project_relationships_history TO pkupczyk; -GRANT SELECT ON TABLE project_relationships_history TO openbis_readonly; +GRANT SELECT ON SEQUENCE public.project_id_seq TO openbis_readonly; -- --- Name: project_relationships_history_id_seq; Type: ACL; Schema: public; Owner: - +-- Name: TABLE project_relationships_history; Type: ACL; Schema: public; Owner: - -- -REVOKE ALL ON SEQUENCE project_relationships_history_id_seq FROM PUBLIC; -REVOKE ALL ON SEQUENCE project_relationships_history_id_seq FROM pkupczyk; -GRANT ALL ON SEQUENCE project_relationships_history_id_seq TO pkupczyk; -GRANT SELECT ON SEQUENCE project_relationships_history_id_seq TO openbis_readonly; +GRANT SELECT ON TABLE public.project_relationships_history TO openbis_readonly; -- --- Name: projects; Type: ACL; Schema: public; Owner: - +-- Name: SEQUENCE project_relationships_history_id_seq; Type: ACL; Schema: public; Owner: - -- -REVOKE ALL ON TABLE projects FROM PUBLIC; -REVOKE ALL ON TABLE projects FROM pkupczyk; -GRANT ALL ON TABLE projects TO pkupczyk; -GRANT SELECT ON TABLE projects TO openbis_readonly; +GRANT SELECT ON SEQUENCE public.project_relationships_history_id_seq TO openbis_readonly; -- --- Name: property_type_id_seq; Type: ACL; Schema: public; Owner: - +-- Name: TABLE projects; Type: ACL; Schema: public; Owner: - -- -REVOKE ALL ON SEQUENCE property_type_id_seq FROM PUBLIC; -REVOKE ALL ON SEQUENCE property_type_id_seq FROM pkupczyk; -GRANT ALL ON SEQUENCE property_type_id_seq TO pkupczyk; -GRANT SELECT ON SEQUENCE property_type_id_seq TO openbis_readonly; +GRANT SELECT ON TABLE public.projects TO openbis_readonly; -- --- Name: property_types; Type: ACL; Schema: public; Owner: - +-- Name: SEQUENCE property_type_id_seq; Type: ACL; Schema: public; Owner: - -- -REVOKE ALL ON TABLE property_types FROM PUBLIC; -REVOKE ALL ON TABLE property_types FROM pkupczyk; -GRANT ALL ON TABLE property_types TO pkupczyk; -GRANT SELECT ON TABLE property_types TO openbis_readonly; +GRANT SELECT ON SEQUENCE public.property_type_id_seq TO openbis_readonly; -- --- Name: queries; Type: ACL; Schema: public; Owner: - +-- Name: TABLE property_types; Type: ACL; Schema: public; Owner: - -- -REVOKE ALL ON TABLE queries FROM PUBLIC; -REVOKE ALL ON TABLE queries FROM pkupczyk; -GRANT ALL ON TABLE queries TO pkupczyk; -GRANT SELECT ON TABLE queries TO openbis_readonly; +GRANT SELECT ON TABLE public.property_types TO openbis_readonly; -- --- Name: query_id_seq; Type: ACL; Schema: public; Owner: - +-- Name: TABLE queries; Type: ACL; Schema: public; Owner: - -- -REVOKE ALL ON SEQUENCE query_id_seq FROM PUBLIC; -REVOKE ALL ON SEQUENCE query_id_seq FROM pkupczyk; -GRANT ALL ON SEQUENCE query_id_seq TO pkupczyk; -GRANT SELECT ON SEQUENCE query_id_seq TO openbis_readonly; +GRANT SELECT ON TABLE public.queries TO openbis_readonly; -- --- Name: relationship_type_id_seq; Type: ACL; Schema: public; Owner: - +-- Name: SEQUENCE query_id_seq; Type: ACL; Schema: public; Owner: - -- -REVOKE ALL ON SEQUENCE relationship_type_id_seq FROM PUBLIC; -REVOKE ALL ON SEQUENCE relationship_type_id_seq FROM pkupczyk; -GRANT ALL ON SEQUENCE relationship_type_id_seq TO pkupczyk; -GRANT SELECT ON SEQUENCE relationship_type_id_seq TO openbis_readonly; +GRANT SELECT ON SEQUENCE public.query_id_seq TO openbis_readonly; -- --- Name: relationship_types; Type: ACL; Schema: public; Owner: - +-- Name: SEQUENCE relationship_type_id_seq; Type: ACL; Schema: public; Owner: - -- -REVOKE ALL ON TABLE relationship_types FROM PUBLIC; -REVOKE ALL ON TABLE relationship_types FROM pkupczyk; -GRANT ALL ON TABLE relationship_types TO pkupczyk; -GRANT SELECT ON TABLE relationship_types TO openbis_readonly; +GRANT SELECT ON SEQUENCE public.relationship_type_id_seq TO openbis_readonly; -- --- Name: role_assignment_id_seq; Type: ACL; Schema: public; Owner: - +-- Name: TABLE relationship_types; Type: ACL; Schema: public; Owner: - -- -REVOKE ALL ON SEQUENCE role_assignment_id_seq FROM PUBLIC; -REVOKE ALL ON SEQUENCE role_assignment_id_seq FROM pkupczyk; -GRANT ALL ON SEQUENCE role_assignment_id_seq TO pkupczyk; -GRANT SELECT ON SEQUENCE role_assignment_id_seq TO openbis_readonly; +GRANT SELECT ON TABLE public.relationship_types TO openbis_readonly; -- --- Name: role_assignments; Type: ACL; Schema: public; Owner: - +-- Name: SEQUENCE role_assignment_id_seq; Type: ACL; Schema: public; Owner: - -- -REVOKE ALL ON TABLE role_assignments FROM PUBLIC; -REVOKE ALL ON TABLE role_assignments FROM pkupczyk; -GRANT ALL ON TABLE role_assignments TO pkupczyk; -GRANT SELECT ON TABLE role_assignments TO openbis_readonly; +GRANT SELECT ON SEQUENCE public.role_assignment_id_seq TO openbis_readonly; -- --- Name: sample_code_seq; Type: ACL; Schema: public; Owner: - +-- Name: TABLE role_assignments; Type: ACL; Schema: public; Owner: - -- -REVOKE ALL ON SEQUENCE sample_code_seq FROM PUBLIC; -REVOKE ALL ON SEQUENCE sample_code_seq FROM pkupczyk; -GRANT ALL ON SEQUENCE sample_code_seq TO pkupczyk; -GRANT SELECT ON SEQUENCE sample_code_seq TO openbis_readonly; +GRANT SELECT ON TABLE public.role_assignments TO openbis_readonly; -- --- Name: sample_properties_history; Type: ACL; Schema: public; Owner: - +-- Name: SEQUENCE sample_code_seq; Type: ACL; Schema: public; Owner: - -- -REVOKE ALL ON TABLE sample_properties_history FROM PUBLIC; -REVOKE ALL ON TABLE sample_properties_history FROM pkupczyk; -GRANT ALL ON TABLE sample_properties_history TO pkupczyk; -GRANT SELECT ON TABLE sample_properties_history TO openbis_readonly; +GRANT SELECT ON SEQUENCE public.sample_code_seq TO openbis_readonly; -- --- Name: sample_relationships_history; Type: ACL; Schema: public; Owner: - +-- Name: TABLE sample_properties_history; Type: ACL; Schema: public; Owner: - -- -REVOKE ALL ON TABLE sample_relationships_history FROM PUBLIC; -REVOKE ALL ON TABLE sample_relationships_history FROM pkupczyk; -GRANT ALL ON TABLE sample_relationships_history TO pkupczyk; -GRANT SELECT ON TABLE sample_relationships_history TO openbis_readonly; +GRANT SELECT ON TABLE public.sample_properties_history TO openbis_readonly; -- --- Name: sample_id_seq; Type: ACL; Schema: public; Owner: - +-- Name: TABLE sample_relationships_history; Type: ACL; Schema: public; Owner: - -- -REVOKE ALL ON SEQUENCE sample_id_seq FROM PUBLIC; -REVOKE ALL ON SEQUENCE sample_id_seq FROM pkupczyk; -GRANT ALL ON SEQUENCE sample_id_seq TO pkupczyk; -GRANT SELECT ON SEQUENCE sample_id_seq TO openbis_readonly; +GRANT SELECT ON TABLE public.sample_relationships_history TO openbis_readonly; -- --- Name: sample_properties; Type: ACL; Schema: public; Owner: - +-- Name: SEQUENCE sample_id_seq; Type: ACL; Schema: public; Owner: - -- -REVOKE ALL ON TABLE sample_properties FROM PUBLIC; -REVOKE ALL ON TABLE sample_properties FROM pkupczyk; -GRANT ALL ON TABLE sample_properties TO pkupczyk; -GRANT SELECT ON TABLE sample_properties TO openbis_readonly; +GRANT SELECT ON SEQUENCE public.sample_id_seq TO openbis_readonly; -- --- Name: sample_property_id_seq; Type: ACL; Schema: public; Owner: - +-- Name: TABLE sample_properties; Type: ACL; Schema: public; Owner: - -- -REVOKE ALL ON SEQUENCE sample_property_id_seq FROM PUBLIC; -REVOKE ALL ON SEQUENCE sample_property_id_seq FROM pkupczyk; -GRANT ALL ON SEQUENCE sample_property_id_seq TO pkupczyk; -GRANT SELECT ON SEQUENCE sample_property_id_seq TO openbis_readonly; +GRANT SELECT ON TABLE public.sample_properties TO openbis_readonly; -- --- Name: sample_relationship_id_seq; Type: ACL; Schema: public; Owner: - +-- Name: SEQUENCE sample_property_id_seq; Type: ACL; Schema: public; Owner: - -- -REVOKE ALL ON SEQUENCE sample_relationship_id_seq FROM PUBLIC; -REVOKE ALL ON SEQUENCE sample_relationship_id_seq FROM pkupczyk; -GRANT ALL ON SEQUENCE sample_relationship_id_seq TO pkupczyk; -GRANT SELECT ON SEQUENCE sample_relationship_id_seq TO openbis_readonly; +GRANT SELECT ON SEQUENCE public.sample_property_id_seq TO openbis_readonly; -- --- Name: sample_relationships_all; Type: ACL; Schema: public; Owner: - +-- Name: SEQUENCE sample_relationship_id_seq; Type: ACL; Schema: public; Owner: - -- -REVOKE ALL ON TABLE sample_relationships_all FROM PUBLIC; -REVOKE ALL ON TABLE sample_relationships_all FROM pkupczyk; -GRANT ALL ON TABLE sample_relationships_all TO pkupczyk; -GRANT SELECT ON TABLE sample_relationships_all TO openbis_readonly; +GRANT SELECT ON SEQUENCE public.sample_relationship_id_seq TO openbis_readonly; -- --- Name: sample_relationships; Type: ACL; Schema: public; Owner: - +-- Name: TABLE sample_relationships_all; Type: ACL; Schema: public; Owner: - -- -REVOKE ALL ON TABLE sample_relationships FROM PUBLIC; -REVOKE ALL ON TABLE sample_relationships FROM pkupczyk; -GRANT ALL ON TABLE sample_relationships TO pkupczyk; -GRANT SELECT ON TABLE sample_relationships TO openbis_readonly; +GRANT SELECT ON TABLE public.sample_relationships_all TO openbis_readonly; -- --- Name: sample_relationships_history_id_seq; Type: ACL; Schema: public; Owner: - +-- Name: TABLE sample_relationships; Type: ACL; Schema: public; Owner: - -- -REVOKE ALL ON SEQUENCE sample_relationships_history_id_seq FROM PUBLIC; -REVOKE ALL ON SEQUENCE sample_relationships_history_id_seq FROM pkupczyk; -GRANT ALL ON SEQUENCE sample_relationships_history_id_seq TO pkupczyk; -GRANT SELECT ON SEQUENCE sample_relationships_history_id_seq TO openbis_readonly; +GRANT SELECT ON TABLE public.sample_relationships TO openbis_readonly; -- --- Name: sample_type_id_seq; Type: ACL; Schema: public; Owner: - +-- Name: SEQUENCE sample_relationships_history_id_seq; Type: ACL; Schema: public; Owner: - -- -REVOKE ALL ON SEQUENCE sample_type_id_seq FROM PUBLIC; -REVOKE ALL ON SEQUENCE sample_type_id_seq FROM pkupczyk; -GRANT ALL ON SEQUENCE sample_type_id_seq TO pkupczyk; -GRANT SELECT ON SEQUENCE sample_type_id_seq TO openbis_readonly; +GRANT SELECT ON SEQUENCE public.sample_relationships_history_id_seq TO openbis_readonly; -- --- Name: sample_type_property_types; Type: ACL; Schema: public; Owner: - +-- Name: SEQUENCE sample_type_id_seq; Type: ACL; Schema: public; Owner: - -- -REVOKE ALL ON TABLE sample_type_property_types FROM PUBLIC; -REVOKE ALL ON TABLE sample_type_property_types FROM pkupczyk; -GRANT ALL ON TABLE sample_type_property_types TO pkupczyk; -GRANT SELECT ON TABLE sample_type_property_types TO openbis_readonly; +GRANT SELECT ON SEQUENCE public.sample_type_id_seq TO openbis_readonly; -- --- Name: sample_types; Type: ACL; Schema: public; Owner: - +-- Name: TABLE sample_type_property_types; Type: ACL; Schema: public; Owner: - -- -REVOKE ALL ON TABLE sample_types FROM PUBLIC; -REVOKE ALL ON TABLE sample_types FROM pkupczyk; -GRANT ALL ON TABLE sample_types TO pkupczyk; -GRANT SELECT ON TABLE sample_types TO openbis_readonly; +GRANT SELECT ON TABLE public.sample_type_property_types TO openbis_readonly; -- --- Name: samples_all; Type: ACL; Schema: public; Owner: - +-- Name: TABLE sample_types; Type: ACL; Schema: public; Owner: - -- -REVOKE ALL ON TABLE samples_all FROM PUBLIC; -REVOKE ALL ON TABLE samples_all FROM pkupczyk; -GRANT ALL ON TABLE samples_all TO pkupczyk; -GRANT SELECT ON TABLE samples_all TO openbis_readonly; +GRANT SELECT ON TABLE public.sample_types TO openbis_readonly; -- --- Name: samples_deleted; Type: ACL; Schema: public; Owner: - +-- Name: TABLE samples_all; Type: ACL; Schema: public; Owner: - -- -REVOKE ALL ON TABLE samples_deleted FROM PUBLIC; -REVOKE ALL ON TABLE samples_deleted FROM pkupczyk; -GRANT ALL ON TABLE samples_deleted TO pkupczyk; -GRANT SELECT ON TABLE samples_deleted TO openbis_readonly; +GRANT SELECT ON TABLE public.samples_all TO openbis_readonly; -- --- Name: script_id_seq; Type: ACL; Schema: public; Owner: - +-- Name: SEQUENCE script_id_seq; Type: ACL; Schema: public; Owner: - -- -REVOKE ALL ON SEQUENCE script_id_seq FROM PUBLIC; -REVOKE ALL ON SEQUENCE script_id_seq FROM pkupczyk; -GRANT ALL ON SEQUENCE script_id_seq TO pkupczyk; -GRANT SELECT ON SEQUENCE script_id_seq TO openbis_readonly; +GRANT SELECT ON SEQUENCE public.script_id_seq TO openbis_readonly; -- --- Name: scripts; Type: ACL; Schema: public; Owner: - +-- Name: TABLE scripts; Type: ACL; Schema: public; Owner: - -- -REVOKE ALL ON TABLE scripts FROM PUBLIC; -REVOKE ALL ON TABLE scripts FROM pkupczyk; -GRANT ALL ON TABLE scripts TO pkupczyk; -GRANT SELECT ON TABLE scripts TO openbis_readonly; +GRANT SELECT ON TABLE public.scripts TO openbis_readonly; -- --- Name: semantic_annotations; Type: ACL; Schema: public; Owner: - +-- Name: TABLE semantic_annotations; Type: ACL; Schema: public; Owner: - -- -REVOKE ALL ON TABLE semantic_annotations FROM PUBLIC; -REVOKE ALL ON TABLE semantic_annotations FROM pkupczyk; -GRANT ALL ON TABLE semantic_annotations TO pkupczyk; -GRANT SELECT ON TABLE semantic_annotations TO openbis_readonly; +GRANT SELECT ON TABLE public.semantic_annotations TO openbis_readonly; -- --- Name: space_id_seq; Type: ACL; Schema: public; Owner: - +-- Name: SEQUENCE space_id_seq; Type: ACL; Schema: public; Owner: - -- -REVOKE ALL ON SEQUENCE space_id_seq FROM PUBLIC; -REVOKE ALL ON SEQUENCE space_id_seq FROM pkupczyk; -GRANT ALL ON SEQUENCE space_id_seq TO pkupczyk; -GRANT SELECT ON SEQUENCE space_id_seq TO openbis_readonly; +GRANT SELECT ON SEQUENCE public.space_id_seq TO openbis_readonly; -- --- Name: spaces; Type: ACL; Schema: public; Owner: - +-- Name: TABLE spaces; Type: ACL; Schema: public; Owner: - -- -REVOKE ALL ON TABLE spaces FROM PUBLIC; -REVOKE ALL ON TABLE spaces FROM pkupczyk; -GRANT ALL ON TABLE spaces TO pkupczyk; -GRANT SELECT ON TABLE spaces TO openbis_readonly; +GRANT SELECT ON TABLE public.spaces TO openbis_readonly; -- --- Name: stpt_id_seq; Type: ACL; Schema: public; Owner: - +-- Name: SEQUENCE stpt_id_seq; Type: ACL; Schema: public; Owner: - -- -REVOKE ALL ON SEQUENCE stpt_id_seq FROM PUBLIC; -REVOKE ALL ON SEQUENCE stpt_id_seq FROM pkupczyk; -GRANT ALL ON SEQUENCE stpt_id_seq TO pkupczyk; -GRANT SELECT ON SEQUENCE stpt_id_seq TO openbis_readonly; +GRANT SELECT ON SEQUENCE public.stpt_id_seq TO openbis_readonly; -- diff --git a/microservice-server/gradlew b/microservice-server/gradlew deleted file mode 100755 index 4453ccea33d960069d9137ee65f6b21fc65e7e92..0000000000000000000000000000000000000000 --- a/microservice-server/gradlew +++ /dev/null @@ -1,172 +0,0 @@ -#!/usr/bin/env sh - -############################################################################## -## -## Gradle start up script for UN*X -## -############################################################################## - -# Attempt to set APP_HOME -# Resolve links: $0 may be a link -PRG="$0" -# Need this for relative symlinks. -while [ -h "$PRG" ] ; do - ls=`ls -ld "$PRG"` - link=`expr "$ls" : '.*-> \(.*\)$'` - if expr "$link" : '/.*' > /dev/null; then - PRG="$link" - else - PRG=`dirname "$PRG"`"/$link" - fi -done -SAVED="`pwd`" -cd "`dirname \"$PRG\"`/" >/dev/null -APP_HOME="`pwd -P`" -cd "$SAVED" >/dev/null - -APP_NAME="Gradle" -APP_BASE_NAME=`basename "$0"` - -# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -DEFAULT_JVM_OPTS="" - -# Use the maximum available, or set MAX_FD != -1 to use that value. -MAX_FD="maximum" - -warn ( ) { - echo "$*" -} - -die ( ) { - echo - echo "$*" - echo - exit 1 -} - -# OS specific support (must be 'true' or 'false'). -cygwin=false -msys=false -darwin=false -nonstop=false -case "`uname`" in - CYGWIN* ) - cygwin=true - ;; - Darwin* ) - darwin=true - ;; - MINGW* ) - msys=true - ;; - NONSTOP* ) - nonstop=true - ;; -esac - -CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar - -# Determine the Java command to use to start the JVM. -if [ -n "$JAVA_HOME" ] ; then - if [ -x "$JAVA_HOME/jre/sh/java" ] ; then - # IBM's JDK on AIX uses strange locations for the executables - JAVACMD="$JAVA_HOME/jre/sh/java" - else - JAVACMD="$JAVA_HOME/bin/java" - fi - if [ ! -x "$JAVACMD" ] ; then - die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME - -Please set the JAVA_HOME variable in your environment to match the -location of your Java installation." - fi -else - JAVACMD="java" - which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. - -Please set the JAVA_HOME variable in your environment to match the -location of your Java installation." -fi - -# Increase the maximum file descriptors if we can. -if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then - MAX_FD_LIMIT=`ulimit -H -n` - if [ $? -eq 0 ] ; then - if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then - MAX_FD="$MAX_FD_LIMIT" - fi - ulimit -n $MAX_FD - if [ $? -ne 0 ] ; then - warn "Could not set maximum file descriptor limit: $MAX_FD" - fi - else - warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT" - fi -fi - -# For Darwin, add options to specify how the application appears in the dock -if $darwin; then - GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\"" -fi - -# For Cygwin, switch paths to Windows format before running java -if $cygwin ; then - APP_HOME=`cygpath --path --mixed "$APP_HOME"` - CLASSPATH=`cygpath --path --mixed "$CLASSPATH"` - JAVACMD=`cygpath --unix "$JAVACMD"` - - # We build the pattern for arguments to be converted via cygpath - ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null` - SEP="" - for dir in $ROOTDIRSRAW ; do - ROOTDIRS="$ROOTDIRS$SEP$dir" - SEP="|" - done - OURCYGPATTERN="(^($ROOTDIRS))" - # Add a user-defined pattern to the cygpath arguments - if [ "$GRADLE_CYGPATTERN" != "" ] ; then - OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)" - fi - # Now convert the arguments - kludge to limit ourselves to /bin/sh - i=0 - for arg in "$@" ; do - CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -` - CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option - - if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition - eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"` - else - eval `echo args$i`="\"$arg\"" - fi - i=$((i+1)) - done - case $i in - (0) set -- ;; - (1) set -- "$args0" ;; - (2) set -- "$args0" "$args1" ;; - (3) set -- "$args0" "$args1" "$args2" ;; - (4) set -- "$args0" "$args1" "$args2" "$args3" ;; - (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;; - (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;; - (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;; - (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;; - (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;; - esac -fi - -# Escape application args -save ( ) { - for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done - echo " " -} -APP_ARGS=$(save "$@") - -# Collect all arguments for the java command, following the shell quoting and substitution rules -eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS" - -# by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong -if [ "$(uname)" = "Darwin" ] && [ "$HOME" = "$PWD" ]; then - cd "$(dirname "$0")" -fi - -exec "$JAVACMD" "$@" diff --git a/microservice-server/gradlew.bat b/microservice-server/gradlew.bat deleted file mode 100644 index e95643d6a2ca62258464e83c72f5156dc941c609..0000000000000000000000000000000000000000 --- a/microservice-server/gradlew.bat +++ /dev/null @@ -1,84 +0,0 @@ -@if "%DEBUG%" == "" @echo off -@rem ########################################################################## -@rem -@rem Gradle startup script for Windows -@rem -@rem ########################################################################## - -@rem Set local scope for the variables with windows NT shell -if "%OS%"=="Windows_NT" setlocal - -set DIRNAME=%~dp0 -if "%DIRNAME%" == "" set DIRNAME=. -set APP_BASE_NAME=%~n0 -set APP_HOME=%DIRNAME% - -@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -set DEFAULT_JVM_OPTS= - -@rem Find java.exe -if defined JAVA_HOME goto findJavaFromJavaHome - -set JAVA_EXE=java.exe -%JAVA_EXE% -version >NUL 2>&1 -if "%ERRORLEVEL%" == "0" goto init - -echo. -echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. - -goto fail - -:findJavaFromJavaHome -set JAVA_HOME=%JAVA_HOME:"=% -set JAVA_EXE=%JAVA_HOME%/bin/java.exe - -if exist "%JAVA_EXE%" goto init - -echo. -echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. - -goto fail - -:init -@rem Get command-line arguments, handling Windows variants - -if not "%OS%" == "Windows_NT" goto win9xME_args - -:win9xME_args -@rem Slurp the command line arguments. -set CMD_LINE_ARGS= -set _SKIP=2 - -:win9xME_args_slurp -if "x%~1" == "x" goto execute - -set CMD_LINE_ARGS=%* - -:execute -@rem Setup the command line - -set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar - -@rem Execute Gradle -"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS% - -:end -@rem End local scope for the variables with windows NT shell -if "%ERRORLEVEL%"=="0" goto mainEnd - -:fail -rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of -rem the _cmd.exe /c_ return code! -if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 -exit /b 1 - -:mainEnd -if "%OS%"=="Windows_NT" endlocal - -:omega diff --git a/obis/.gitignore b/obis/.gitignore new file mode 100644 index 0000000000000000000000000000000000000000..fcb2fb420bb2a33c0899cb957f973577eb2f2d94 --- /dev/null +++ b/obis/.gitignore @@ -0,0 +1,6 @@ +**.vagrant +**.egg-info +**__pycache__ +**.cache +**.pytest_cache +src/vagrant/initialize/openBIS-installation-standard-technologies-* diff --git a/obis/src/bash/create_man.sh b/obis/src/bash/create_man.sh new file mode 100755 index 0000000000000000000000000000000000000000..957d079475bf823a366b8f82918f1062113cc8e7 --- /dev/null +++ b/obis/src/bash/create_man.sh @@ -0,0 +1,14 @@ +#!/bin/bash + +version=0.1.0 +commands=( addref clone collection commit config data_set download init init_analysis move object removeref repository settings status sync ) + +mkdir -p man/man1 + +for command in "${commands[@]}" +do + echo generating man page for $command... + help2man --version-string=$version "obis $command" > man/obis-addref.1 > man/man1/obis-$command.1 +done + +echo done. diff --git a/obis/src/python/integration_tests/integration_tests.py b/obis/src/python/integration_tests/integration_tests.py index 8813ad2faaafeca26464fb7785e32dd84abcb55c..7152493bb4ee80b1db9065ac5a1b8b34be694e76 100644 --- a/obis/src/python/integration_tests/integration_tests.py +++ b/obis/src/python/integration_tests/integration_tests.py @@ -2,7 +2,7 @@ # -*- coding: utf-8 -*- # can be run on vagrant like this: -# vagrant ssh obisserver -c 'cd /vagrant_python/OBis/integration_tests && pytest ./integration_tests.py' +# vagrant ssh obisserver -c 'cd /vagrant_python/integration_tests && pytest ./integration_tests.py' import json import os @@ -11,6 +11,7 @@ import subprocess from subprocess import PIPE from subprocess import SubprocessError from contextlib import contextmanager +from random import randrange from pybis import Openbis @@ -31,6 +32,7 @@ def test_obis(tmpdir): o = Openbis('https://obisserver:8443', verify_certificates=False) o.login('admin', 'admin', save_token=True) + setup_masterdata(o) output_buffer = '=================== 1. Global settings ===================\n' if os.path.exists('~/.obis'): @@ -55,7 +57,7 @@ def test_obis(tmpdir): with cd('data1'): cmd('touch file') result = cmd('obis status') - assert '?? file' in result + assert '? file' in result cmd('obis object set id=/DEFAULT/DEFAULT') result = cmd('obis commit -m \'commit-message\'') settings = get_settings() @@ -126,7 +128,7 @@ def test_obis(tmpdir): result = cmd('obis commit -m \'commit-message\'') assert 'Missing configuration settings for [\'object id or collection id\'].' in result result = cmd('obis status') - assert '?? file' in result + assert '? file' in result cmd('obis object set id=/DEFAULT/DEFAULT') result = cmd('obis commit -m \'commit-message\'') settings = get_settings() @@ -304,6 +306,18 @@ def test_obis(tmpdir): cmd('obis repository clear') assert get_settings()['repository'] == {'id': None, 'external_dms_id': None, 'data_set_id': None} + output_buffer = '=================== 22. changing identifier ===================\n' + settings = create_repository_and_commit(tmpdir, o, 'data14', '/DEFAULT/BIGDATA2') + move_sample(o, settings['object']['permId'], 'BIGDATA') + try: + settings = commit_new_change(tmpdir, o, 'data14') + assert settings['object']['id'] == '/BIGDATA/BIGDATA2' + finally: + move_sample(o, settings['object']['permId'], 'DEFAULT') + with cd('data14'): assert get_settings()['object']['permId'] is not None + cmd('obis object set id=/DEFAULT/DEFAULT') + with cd('data14'): assert get_settings()['object']['permId'] is not None + output_buffer = '=================== 16. User switch ===================\n' cmd('obis init data9') with cd('data9'): @@ -373,5 +387,57 @@ def assert_matching(settings, data_set, tmpdir, path): assert content_copy['gitRepositoryId'] == settings['repository']['id'] if settings['object']['id'] is not None: assert data_set['sample']['identifier']['identifier'] == settings['object']['id'] + assert data_set['sample']['permId']['permId'] == settings['object']['permId'] if settings['collection']['id'] is not None: assert data_set['experiment']['identifier']['identifier'] == settings['collection']['id'] + assert data_set['experiment']['permId']['permId'] == settings['collection']['permId'] + +def move_sample(o, sample_permId, space): + field_update_value = { + "@type": "as.dto.common.update.FieldUpdateValue", + "value": { + "@type": "as.dto.space.id.SpacePermId", + "permId": space, + }, + "isModified": True, + } + o.update_sample(sample_permId, space=field_update_value) + +def create_repository_and_commit(tmpdir, o, repo_name, object_id): + cmd('obis init ' + repo_name) + with cd(repo_name): + cmd('touch file') + result = cmd('obis status') + assert '? file' in result + cmd('obis object set id=' + object_id) + result = cmd('obis commit -m \'commit-message\'') + settings = get_settings() + assert settings['repository']['external_dms_id'].startswith('ADMIN-' + socket.gethostname().upper()) + assert len(settings['repository']['id']) == 36 + assert "Created data set {}.".format(settings['repository']['data_set_id']) in result + data_set = o.get_dataset(settings['repository']['data_set_id']).data + assert_matching(settings, data_set, tmpdir, 'obis_data/' + repo_name) + return settings + +def commit_new_change(tmpdir, o, repo_name): + with cd(repo_name): + filename = 'file' + str(randrange(100000)) + cmd('touch ' + filename) + result = cmd('obis status') + assert '? ' + filename in result + result = cmd('obis commit -m \'commit-message\'') + settings = get_settings() + assert settings['repository']['external_dms_id'].startswith('ADMIN-' + socket.gethostname().upper()) + assert len(settings['repository']['id']) == 36 + assert "Created data set {}.".format(settings['repository']['data_set_id']) in result + data_set = o.get_dataset(settings['repository']['data_set_id']).data + assert_matching(settings, data_set, tmpdir, 'obis_data/' + repo_name) + return settings + + +def setup_masterdata(o): + spaces = o.get_spaces() + if 'BIGDATA' not in o.get_spaces().df.code.values: + o.new_space(code='BIGDATA').save() + if '/DEFAULT/BIGDATA2' not in o.get_samples().df.identifier.values: + o.new_sample(type="UNKNOWN", code='BIGDATA2', space='DEFAULT').save() diff --git a/obis/src/python/man/man1/obis-addref.1 b/obis/src/python/man/man1/obis-addref.1 new file mode 100644 index 0000000000000000000000000000000000000000..bd125677d236597396fe0448fe0e2db93c40b95e --- /dev/null +++ b/obis/src/python/man/man1/obis-addref.1 @@ -0,0 +1,23 @@ +.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.47.6. +.TH OBIS ADDREF "1" "June 2018" "obis addref 0.1.0" "User Commands" +.SH NAME +obis addref \- manual page for obis addref 0.1.0 +.SH SYNOPSIS +.B obis +\fI\,addref \/\fR[\fI\,OPTIONS\/\fR] [\fI\,REPOSITORY\/\fR] +.SH OPTIONS +.TP +\fB\-\-help\fR +Show this message and exit. +.SH "SEE ALSO" +The full documentation for +.B obis addref +is maintained as a Texinfo manual. If the +.B info +and +.B obis addref +programs are properly installed at your site, the command +.IP +.B info obis addref +.PP +should give you access to the complete manual. diff --git a/obis/src/python/man/man1/obis-clone.1 b/obis/src/python/man/man1/obis-clone.1 new file mode 100644 index 0000000000000000000000000000000000000000..e256a16e811dc8d840c4a5ebe010a07bb925e1e5 --- /dev/null +++ b/obis/src/python/man/man1/obis-clone.1 @@ -0,0 +1,33 @@ +.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.47.6. +.TH OBIS CLONE "1" "June 2018" "obis clone 0.1.0" "User Commands" +.SH NAME +obis clone \- manual page for obis clone 0.1.0 +.SH SYNOPSIS +.B obis +\fI\,clone \/\fR[\fI\,OPTIONS\/\fR] \fI\,DATA_SET_ID\/\fR +.SH OPTIONS +.TP +\fB\-u\fR, \fB\-\-ssh_user\fR TEXT +User to connect to remote systems via ssh +.TP +\fB\-c\fR, \fB\-\-content_copy_index\fR INTEGER +Index of the content copy to clone from in +case there are multiple copies +.TP +\fB\-s\fR, \fB\-\-skip_integrity_check\fR +Skip file integrity check with checksums. +.TP +\fB\-\-help\fR +Show this message and exit. +.SH "SEE ALSO" +The full documentation for +.B obis clone +is maintained as a Texinfo manual. If the +.B info +and +.B obis clone +programs are properly installed at your site, the command +.IP +.B info obis clone +.PP +should give you access to the complete manual. diff --git a/obis/src/python/man/man1/obis-collection.1 b/obis/src/python/man/man1/obis-collection.1 new file mode 100644 index 0000000000000000000000000000000000000000..41308f44d8ac0e7f80705f55c27617a40a7dac12 --- /dev/null +++ b/obis/src/python/man/man1/obis-collection.1 @@ -0,0 +1,34 @@ +.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.47.6. +.TH OBIS COLLECTION "1" "June 2018" "obis collection 0.1.0" "User Commands" +.SH NAME +obis collection \- manual page for obis collection 0.1.0 +.SH SYNOPSIS +.B obis +\fI\,collection \/\fR[\fI\,OPTIONS\/\fR] \fI\,COMMAND \/\fR[\fI\,ARGS\/\fR]... +.SH DESCRIPTION +.IP +Get/set settings related to the collection. +.SH OPTIONS +.TP +\fB\-g\fR, \fB\-\-is_global\fR +Set/get global or local. +.TP +\fB\-\-help\fR +Show this message and exit. +.SS "Commands:" +.IP +clear +get +set +.SH "SEE ALSO" +The full documentation for +.B obis collection +is maintained as a Texinfo manual. If the +.B info +and +.B obis collection +programs are properly installed at your site, the command +.IP +.B info obis collection +.PP +should give you access to the complete manual. diff --git a/obis/src/python/man/man1/obis-commit.1 b/obis/src/python/man/man1/obis-commit.1 new file mode 100644 index 0000000000000000000000000000000000000000..a836528faf1a0c5a5838cc98e4105f0a25603b1c --- /dev/null +++ b/obis/src/python/man/man1/obis-commit.1 @@ -0,0 +1,32 @@ +.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.47.6. +.TH OBIS COMMIT "1" "June 2018" "obis commit 0.1.0" "User Commands" +.SH NAME +obis commit \- manual page for obis commit 0.1.0 +.SH SYNOPSIS +.B obis +\fI\,commit \/\fR[\fI\,OPTIONS\/\fR] [\fI\,REPOSITORY\/\fR] +.SH OPTIONS +.TP +\fB\-m\fR, \fB\-\-msg\fR TEXT +A message explaining what was done. +.TP +\fB\-a\fR, \fB\-\-auto_add\fR +Automatically add all untracked files. +.TP +\fB\-i\fR, \fB\-\-ignore_missing_parent\fR +If parent data set is missing, ignore it. +.TP +\fB\-\-help\fR +Show this message and exit. +.SH "SEE ALSO" +The full documentation for +.B obis commit +is maintained as a Texinfo manual. If the +.B info +and +.B obis commit +programs are properly installed at your site, the command +.IP +.B info obis commit +.PP +should give you access to the complete manual. diff --git a/obis/src/python/man/man1/obis-config.1 b/obis/src/python/man/man1/obis-config.1 new file mode 100644 index 0000000000000000000000000000000000000000..33a76ed822bf3024843d9893be9a95c857c50dc7 --- /dev/null +++ b/obis/src/python/man/man1/obis-config.1 @@ -0,0 +1,34 @@ +.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.47.6. +.TH OBIS CONFIG "1" "June 2018" "obis config 0.1.0" "User Commands" +.SH NAME +obis config \- manual page for obis config 0.1.0 +.SH SYNOPSIS +.B obis +\fI\,config \/\fR[\fI\,OPTIONS\/\fR] \fI\,COMMAND \/\fR[\fI\,ARGS\/\fR]... +.SH DESCRIPTION +.IP +Get/set configurations. +.SH OPTIONS +.TP +\fB\-g\fR, \fB\-\-is_global\fR +Set/get global or local. +.TP +\fB\-\-help\fR +Show this message and exit. +.SS "Commands:" +.IP +clear +get +set +.SH "SEE ALSO" +The full documentation for +.B obis config +is maintained as a Texinfo manual. If the +.B info +and +.B obis config +programs are properly installed at your site, the command +.IP +.B info obis config +.PP +should give you access to the complete manual. diff --git a/obis/src/python/man/man1/obis-data_set.1 b/obis/src/python/man/man1/obis-data_set.1 new file mode 100644 index 0000000000000000000000000000000000000000..ddf8530a726b57e7fd51558344598d70887f97ee --- /dev/null +++ b/obis/src/python/man/man1/obis-data_set.1 @@ -0,0 +1,40 @@ +.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.47.6. +.TH OBIS DATA_SET "1" "June 2018" "obis data_set 0.1.0" "User Commands" +.SH NAME +obis data_set \- manual page for obis data_set 0.1.0 +.SH SYNOPSIS +.B obis +\fI\,data_set \/\fR[\fI\,OPTIONS\/\fR] \fI\,COMMAND \/\fR[\fI\,ARGS\/\fR]... +.SH DESCRIPTION +.IP +Get/set settings related to the data set. +.SH OPTIONS +.TP +\fB\-g\fR, \fB\-\-is_global\fR +Set/get global or local. +.TP +\fB\-p\fR, \fB\-\-is_data_set_property\fR +Configure data set property. +.TP +\fB\-\-help\fR +Show this message and exit. +.SS "Commands:" +.IP +clear +clone Clone the repository found in the given data set id. +download Download files of a linked data set. +get +move Move the repository found in the given data set id. +set +.SH "SEE ALSO" +The full documentation for +.B obis data_set +is maintained as a Texinfo manual. If the +.B info +and +.B obis data_set +programs are properly installed at your site, the command +.IP +.B info obis data_set +.PP +should give you access to the complete manual. diff --git a/obis/src/python/man/man1/obis-download.1 b/obis/src/python/man/man1/obis-download.1 new file mode 100644 index 0000000000000000000000000000000000000000..e841fbbe0437527b79f9edb842bfc566a4bc4f1e --- /dev/null +++ b/obis/src/python/man/man1/obis-download.1 @@ -0,0 +1,33 @@ +.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.47.6. +.TH OBIS DOWNLOAD "1" "June 2018" "obis download 0.1.0" "User Commands" +.SH NAME +obis download \- manual page for obis download 0.1.0 +.SH SYNOPSIS +.B obis +\fI\,download \/\fR[\fI\,OPTIONS\/\fR] \fI\,DATA_SET_ID\/\fR +.SH OPTIONS +.TP +\fB\-c\fR, \fB\-\-content_copy_index\fR INTEGER +Index of the content copy to download from. +.TP +\fB\-f\fR, \fB\-\-file\fR TEXT +File in the data set to download \- +downloading all if not given. +.TP +\fB\-s\fR, \fB\-\-skip_integrity_check\fR +Skip file integrity check with checksums. +.TP +\fB\-\-help\fR +Show this message and exit. +.SH "SEE ALSO" +The full documentation for +.B obis download +is maintained as a Texinfo manual. If the +.B info +and +.B obis download +programs are properly installed at your site, the command +.IP +.B info obis download +.PP +should give you access to the complete manual. diff --git a/obis/src/python/man/man1/obis-init.1 b/obis/src/python/man/man1/obis-init.1 new file mode 100644 index 0000000000000000000000000000000000000000..d9ecf717fecc17c1d5a19064046d2bac752a994e --- /dev/null +++ b/obis/src/python/man/man1/obis-init.1 @@ -0,0 +1,29 @@ +.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.47.6. +.TH OBIS INIT "1" "June 2018" "obis init 0.1.0" "User Commands" +.SH NAME +obis init \- manual page for obis init 0.1.0 +.SH SYNOPSIS +.B obis +\fI\,init \/\fR[\fI\,OPTIONS\/\fR] [\fI\,REPOSITORY\/\fR] [\fI\,DESCRIPTION\/\fR] +.SH OPTIONS +.TP +\fB\-oi\fR, \fB\-\-object_id\fR TEXT +Set the id of the owning sample. +.TP +\fB\-ci\fR, \fB\-\-collection_id\fR TEXT +Set the id of the owning experiment. +.TP +\fB\-\-help\fR +Show this message and exit. +.SH "SEE ALSO" +The full documentation for +.B obis init +is maintained as a Texinfo manual. If the +.B info +and +.B obis init +programs are properly installed at your site, the command +.IP +.B info obis init +.PP +should give you access to the complete manual. diff --git a/obis/src/python/man/man1/obis-init_analysis.1 b/obis/src/python/man/man1/obis-init_analysis.1 new file mode 100644 index 0000000000000000000000000000000000000000..31a239dd49f750f0f550c29e3f45ee3a3e55a496 --- /dev/null +++ b/obis/src/python/man/man1/obis-init_analysis.1 @@ -0,0 +1,31 @@ +.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.47.6. +.TH OBIS INIT_ANALYSIS "1" "June 2018" "obis init_analysis 0.1.0" "User Commands" +.SH NAME +obis init_analysis \- manual page for obis init_analysis 0.1.0 +.SH SYNOPSIS +.B obis +\fI\,init_analysis \/\fR[\fI\,OPTIONS\/\fR] [\fI\,REPOSITORY\/\fR] [\fI\,DESCRIPTION\/\fR] +.SH OPTIONS +.HP +\fB\-p\fR, \fB\-\-parent\fR DIRECTORY +.TP +\fB\-oi\fR, \fB\-\-object_id\fR TEXT +Set the id of the owning sample. +.TP +\fB\-ci\fR, \fB\-\-collection_id\fR TEXT +Set the id of the owning experiment. +.TP +\fB\-\-help\fR +Show this message and exit. +.SH "SEE ALSO" +The full documentation for +.B obis init_analysis +is maintained as a Texinfo manual. If the +.B info +and +.B obis init_analysis +programs are properly installed at your site, the command +.IP +.B info obis init_analysis +.PP +should give you access to the complete manual. diff --git a/obis/src/python/man/man1/obis-move.1 b/obis/src/python/man/man1/obis-move.1 new file mode 100644 index 0000000000000000000000000000000000000000..1e162b2cab7000a9dea21976f5ae14e246db7a74 --- /dev/null +++ b/obis/src/python/man/man1/obis-move.1 @@ -0,0 +1,33 @@ +.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.47.6. +.TH OBIS MOVE "1" "June 2018" "obis move 0.1.0" "User Commands" +.SH NAME +obis move \- manual page for obis move 0.1.0 +.SH SYNOPSIS +.B obis +\fI\,move \/\fR[\fI\,OPTIONS\/\fR] \fI\,DATA_SET_ID\/\fR +.SH OPTIONS +.TP +\fB\-u\fR, \fB\-\-ssh_user\fR TEXT +User to connect to remote systems via ssh +.TP +\fB\-c\fR, \fB\-\-content_copy_index\fR INTEGER +Index of the content copy to clone from in +case there are multiple copies +.TP +\fB\-s\fR, \fB\-\-skip_integrity_check\fR +Skip file integrity check with checksums. +.TP +\fB\-\-help\fR +Show this message and exit. +.SH "SEE ALSO" +The full documentation for +.B obis move +is maintained as a Texinfo manual. If the +.B info +and +.B obis move +programs are properly installed at your site, the command +.IP +.B info obis move +.PP +should give you access to the complete manual. diff --git a/obis/src/python/man/man1/obis-object.1 b/obis/src/python/man/man1/obis-object.1 new file mode 100644 index 0000000000000000000000000000000000000000..dd8dad5da7f4a08435d6a01520131e0863de3a36 --- /dev/null +++ b/obis/src/python/man/man1/obis-object.1 @@ -0,0 +1,34 @@ +.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.47.6. +.TH OBIS OBJECT "1" "June 2018" "obis object 0.1.0" "User Commands" +.SH NAME +obis object \- manual page for obis object 0.1.0 +.SH SYNOPSIS +.B obis +\fI\,object \/\fR[\fI\,OPTIONS\/\fR] \fI\,COMMAND \/\fR[\fI\,ARGS\/\fR]... +.SH DESCRIPTION +.IP +Get/set settings related to the object. +.SH OPTIONS +.TP +\fB\-g\fR, \fB\-\-is_global\fR +Set/get global or local. +.TP +\fB\-\-help\fR +Show this message and exit. +.SS "Commands:" +.IP +clear +get +set +.SH "SEE ALSO" +The full documentation for +.B obis object +is maintained as a Texinfo manual. If the +.B info +and +.B obis object +programs are properly installed at your site, the command +.IP +.B info obis object +.PP +should give you access to the complete manual. diff --git a/obis/src/python/man/man1/obis-removeref.1 b/obis/src/python/man/man1/obis-removeref.1 new file mode 100644 index 0000000000000000000000000000000000000000..594aa0eea8dcf9cc1e24f768e2ae984ea8bf8363 --- /dev/null +++ b/obis/src/python/man/man1/obis-removeref.1 @@ -0,0 +1,23 @@ +.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.47.6. +.TH OBIS REMOVEREF "1" "June 2018" "obis removeref 0.1.0" "User Commands" +.SH NAME +obis removeref \- manual page for obis removeref 0.1.0 +.SH SYNOPSIS +.B obis +\fI\,removeref \/\fR[\fI\,OPTIONS\/\fR] [\fI\,REPOSITORY\/\fR] +.SH OPTIONS +.TP +\fB\-\-help\fR +Show this message and exit. +.SH "SEE ALSO" +The full documentation for +.B obis removeref +is maintained as a Texinfo manual. If the +.B info +and +.B obis removeref +programs are properly installed at your site, the command +.IP +.B info obis removeref +.PP +should give you access to the complete manual. diff --git a/obis/src/python/man/man1/obis-repository.1 b/obis/src/python/man/man1/obis-repository.1 new file mode 100644 index 0000000000000000000000000000000000000000..c12ea44e2fdfb12df8e029ca3eedcd8d5bb28bb0 --- /dev/null +++ b/obis/src/python/man/man1/obis-repository.1 @@ -0,0 +1,43 @@ +.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.47.6. +.TH OBIS REPOSITORY "1" "June 2018" "obis repository 0.1.0" "User Commands" +.SH NAME +obis repository \- manual page for obis repository 0.1.0 +.SH SYNOPSIS +.B obis +\fI\,repository \/\fR[\fI\,OPTIONS\/\fR] \fI\,COMMAND \/\fR[\fI\,ARGS\/\fR]... +.SH DESCRIPTION +.IP +Get/set settings related to the repository. +.SH OPTIONS +.TP +\fB\-g\fR, \fB\-\-is_global\fR +Set/get global or local. +.TP +\fB\-\-help\fR +Show this message and exit. +.SS "Commands:" +.TP +addref +Add the given repository as a reference to openBIS. +.IP +clear +commit Commit the repository to git and inform openBIS. +get +init Initialize the folder as a data repository. +init_analysis Initialize the folder as an analysis folder. +removeref Remove the reference to the given repository from openBIS. +set +status Show the state of the obis repository. +sync Sync the repository with openBIS. +.SH "SEE ALSO" +The full documentation for +.B obis repository +is maintained as a Texinfo manual. If the +.B info +and +.B obis repository +programs are properly installed at your site, the command +.IP +.B info obis repository +.PP +should give you access to the complete manual. diff --git a/obis/src/python/man/man1/obis-settings.1 b/obis/src/python/man/man1/obis-settings.1 new file mode 100644 index 0000000000000000000000000000000000000000..d1e89d40c5ce04a04e21bd39e284b0b0db5c72af --- /dev/null +++ b/obis/src/python/man/man1/obis-settings.1 @@ -0,0 +1,32 @@ +.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.47.6. +.TH OBIS SETTINGS "1" "June 2018" "obis settings 0.1.0" "User Commands" +.SH NAME +obis settings \- manual page for obis settings 0.1.0 +.SH SYNOPSIS +.B obis +\fI\,settings \/\fR[\fI\,OPTIONS\/\fR] \fI\,COMMAND \/\fR[\fI\,ARGS\/\fR]... +.SH DESCRIPTION +.IP +Get all settings. +.SH OPTIONS +.TP +\fB\-g\fR, \fB\-\-is_global\fR +Get global or local. +.TP +\fB\-\-help\fR +Show this message and exit. +.SS "Commands:" +.IP +get +.SH "SEE ALSO" +The full documentation for +.B obis settings +is maintained as a Texinfo manual. If the +.B info +and +.B obis settings +programs are properly installed at your site, the command +.IP +.B info obis settings +.PP +should give you access to the complete manual. diff --git a/obis/src/python/man/man1/obis-status.1 b/obis/src/python/man/man1/obis-status.1 new file mode 100644 index 0000000000000000000000000000000000000000..dedbc5b3b0d51bf01cc5f3847de539d2c902ec20 --- /dev/null +++ b/obis/src/python/man/man1/obis-status.1 @@ -0,0 +1,23 @@ +.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.47.6. +.TH OBIS STATUS "1" "June 2018" "obis status 0.1.0" "User Commands" +.SH NAME +obis status \- manual page for obis status 0.1.0 +.SH SYNOPSIS +.B obis +\fI\,status \/\fR[\fI\,OPTIONS\/\fR] [\fI\,REPOSITORY\/\fR] +.SH OPTIONS +.TP +\fB\-\-help\fR +Show this message and exit. +.SH "SEE ALSO" +The full documentation for +.B obis status +is maintained as a Texinfo manual. If the +.B info +and +.B obis status +programs are properly installed at your site, the command +.IP +.B info obis status +.PP +should give you access to the complete manual. diff --git a/obis/src/python/man/man1/obis-sync.1 b/obis/src/python/man/man1/obis-sync.1 new file mode 100644 index 0000000000000000000000000000000000000000..5eae1c9eb4b625472b4c0785d7b135e08f0b4fb5 --- /dev/null +++ b/obis/src/python/man/man1/obis-sync.1 @@ -0,0 +1,26 @@ +.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.47.6. +.TH OBIS SYNC "1" "June 2018" "obis sync 0.1.0" "User Commands" +.SH NAME +obis sync \- manual page for obis sync 0.1.0 +.SH SYNOPSIS +.B obis +\fI\,sync \/\fR[\fI\,OPTIONS\/\fR] [\fI\,REPOSITORY\/\fR] +.SH OPTIONS +.TP +\fB\-i\fR, \fB\-\-ignore_missing_parent\fR +If parent data set is missing, ignore it. +.TP +\fB\-\-help\fR +Show this message and exit. +.SH "SEE ALSO" +The full documentation for +.B obis sync +is maintained as a Texinfo manual. If the +.B info +and +.B obis sync +programs are properly installed at your site, the command +.IP +.B info obis sync +.PP +should give you access to the complete manual. diff --git a/obis/src/python/man/man1/obis.1 b/obis/src/python/man/man1/obis.1 new file mode 100644 index 0000000000000000000000000000000000000000..694b0a5f3f0c067ba873d4e12cf4a9211a7284f7 --- /dev/null +++ b/obis/src/python/man/man1/obis.1 @@ -0,0 +1,84 @@ +.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.47.6. +.TH OBIS, "1" "June 2018" "obis, version 0.1.0" "User Commands" +.SH NAME +obis, \- manual page for obis, version 0.1.0 +.SH SYNOPSIS +.B obis +[\fI\,OPTIONS\/\fR] \fI\,COMMAND \/\fR[\fI\,ARGS\/\fR]... +.SH OPTIONS +.TP +\fB\-\-version\fR +Show the version and exit. +.TP +\fB\-q\fR, \fB\-\-quiet\fR +Suppress status reporting. +.TP +\fB\-s\fR, \fB\-\-skip_verification\fR +Do not verify cerficiates +.TP +\fB\-d\fR, \fB\-\-debug\fR +Show stack trace on error. +.TP +\fB\-\-help\fR +Show this message and exit. +.SS "Commands:" +.TP +addref +Add the given repository as a reference to openBIS. +.TP +clone +Clone the repository found in the given data set id. +.TP +collection +Get/set settings related to the collection. +.TP +commit +Commit the repository to git and inform openBIS. +.TP +config +Get/set configurations. +.TP +data_set +Get/set settings related to the data set. +.TP +download +Download files of a linked data set. +.TP +init +Initialize the folder as a data repository. +.TP +init_analysis +Initialize the folder as an analysis folder. +.TP +move +Move the repository found in the given data set id. +.TP +object +Get/set settings related to the object. +.TP +removeref +Remove the reference to the given repository from openBIS. +.TP +repository +Get/set settings related to the repository. +.TP +settings +Get all settings. +.TP +status +Show the state of the obis repository. +.TP +sync +Sync the repository with openBIS. +.SH "SEE ALSO" +The full documentation for +.B obis, +is maintained as a Texinfo manual. If the +.B info +and +.B obis, +programs are properly installed at your site, the command +.IP +.B info obis, +.PP +should give you access to the complete manual. diff --git a/obis/src/python/obis/dm/checksum.py b/obis/src/python/obis/dm/checksum.py index f33baa3fa28f74ce308ad323d76c17ef7a735e69..2df5356dc4bd2db7adee47839de71cc6c15f8689 100644 --- a/obis/src/python/obis/dm/checksum.py +++ b/obis/src/python/obis/dm/checksum.py @@ -104,7 +104,7 @@ class ChecksumGeneratorWORM(object): def worm(self, file): modification_time = int(os.path.getmtime(file)) size = os.path.getsize(file) - return "WORM-s{}-m{}--{}".format(size, modification_time, file) + return "s{}-m{}--{}".format(size, modification_time, file) class ChecksumGeneratorGitAnnex(object): @@ -144,7 +144,7 @@ class ChecksumGeneratorGitAnnex(object): raise ValueError("Git annex backend not supported: " + self.backend) def _get_annex_backend(self): - with open('.gitattributes') as gitattributes: + with open('.git/info/attributes') as gitattributes: for line in gitattributes.readlines(): if 'annex.backend' in line: backend = line.split('=')[1].strip() diff --git a/obis/src/python/obis/dm/command_log.py b/obis/src/python/obis/dm/command_log.py new file mode 100644 index 0000000000000000000000000000000000000000..a8ad203d00b5144cfe6591ecdabbb5efe481ab9f --- /dev/null +++ b/obis/src/python/obis/dm/command_log.py @@ -0,0 +1,52 @@ +from datetime import datetime +import os + + +class CommandLog(object): + + def __init__(self): + self.folder_path = os.path.join(os.path.expanduser('~'), ".obis", "log") + self.file_paths = [] + self.logs = [] + self.most_recent_command = None + + + def any_log_exists(self): + if os.path.exists(self.folder_path) == False: + return False + return len(os.listdir(self.folder_path)) != 0 + + + def log(self, command, message): + # log first message only when second one is done + # error on first step does not need recovery + self.logs.append((command, message)) + if len(self.logs) == 1: + return + elif len(self.logs) == 2: + first_command, first_message = self.logs[0] + self._log(first_command, first_message) + self._log(command, message) + + + def log_error(self, error): + if self.most_recent_command is not None: + self._log(self.most_recent_command, error) + + + def _log(self, command, message): + self.most_recent_command = command + if os.path.exists(self.folder_path) == False: + os.makedirs(self.folder_path) + file_path = os.path.join(self.folder_path, command + ".log") + self.file_paths.append(file_path) + timestamp = datetime.now().strftime("%H:%M:%S") + with open(file_path, "a") as file: + file.write(timestamp + ": " + message + "\n") + + + def success(self): + for file_path in self.file_paths: + if os.path.exists(file_path): + os.remove(file_path) + os.rmdir(self.folder_path) diff --git a/obis/src/python/obis/dm/commands/clone.py b/obis/src/python/obis/dm/commands/clone.py index 286956ed4d7bb3c240be93834736629ca6a7da3a..e22aec7e2fe793ed57824bb324eddc7bfc3d2467 100644 --- a/obis/src/python/obis/dm/commands/clone.py +++ b/obis/src/python/obis/dm/commands/clone.py @@ -20,8 +20,8 @@ class Clone(OpenbisCommand): self.data_set_id = data_set_id self.ssh_user = ssh_user self.content_copy_index = content_copy_index - self.load_global_config(dm) self.skip_integrity_check = skip_integrity_check + self.load_global_config(dm) super(Clone, self).__init__(dm) diff --git a/obis/src/python/obis/dm/commands/move.py b/obis/src/python/obis/dm/commands/move.py index 7d3cdeb0bcf7ce4ff85fd11f410f43cda9512f5a..060f3ef830d87b643b4a5b86606becfb9fc4f4ac 100644 --- a/obis/src/python/obis/dm/commands/move.py +++ b/obis/src/python/obis/dm/commands/move.py @@ -26,11 +26,13 @@ class Move(OpenbisCommand): super(Move, self).__init__(dm) def run(self): + self.log("cloning repository...") clone = Clone(self.data_mgmt, self.data_set_id, self.ssh_user, self.content_copy_index, self.skip_integrity_check) result = clone.run() if result.failure(): return result + self.log("removing old content copy from openBIS...") self.openbis.delete_content_copy(self.data_set_id, clone.content_copy) host = clone.content_copy['externalDms']['address'].split(':')[0] @@ -42,6 +44,7 @@ class Move(OpenbisCommand): return CommandResult(returncode=0, output="Since the integrit check was skipped, please make sure the data was " + "copied correctly and delete the old copy manually {}.".format(old_repository_location)) + self.log("deleting old repository at {}:{}...".format(host, path)) delete_repository(self.ssh_user, host, path) return CommandResult(returncode=0, output="") diff --git a/obis/src/python/obis/dm/commands/openbis_command.py b/obis/src/python/obis/dm/commands/openbis_command.py index 5b6f94a10de20638ec10ced6bbc74f55b5e44fc2..599d66ca2400e5dda99a7e35d4daca1bb4814b6d 100644 --- a/obis/src/python/obis/dm/commands/openbis_command.py +++ b/obis/src/python/obis/dm/commands/openbis_command.py @@ -60,12 +60,18 @@ class OpenbisCommand(object): def object_id(self): return self.config_dict['object']['id'] + def object_permId(self): + return self.config_dict['object']['permId'] + def set_object_id(self, value): self.config_dict['object']['id'] = value def collection_id(self): return self.config_dict['collection']['id'] + def collection_permId(self): + return self.config_dict['collection']['permId'] + def set_collection_id(self, value): self.config_dict['collection']['id'] = value @@ -99,6 +105,12 @@ class OpenbisCommand(object): def set_openbis_url(self, value): self.config_dict['config']['openbis_url'] = value + + def log(self, message): + command = type(self).__name__ + self.data_mgmt.log.log(command, message) + + def prepare_run(self): result = self.check_configuration() if result.failure(): @@ -206,7 +218,7 @@ class OpenbisCommand(object): class ContentCopySelector(object): - def __init__(self, data_set, content_copy_index, get_index=False): + def __init__(self, data_set, content_copy_index=None, get_index=False): self.data_set = data_set self.content_copy_index = content_copy_index self.get_index = get_index diff --git a/obis/src/python/obis/dm/commands/openbis_sync.py b/obis/src/python/obis/dm/commands/openbis_sync.py index e6e1476a2ec4cdaad5075a5cd252d009be5853f7..69b87af12f6e509be95d8d370705d736c8bb8bc9 100644 --- a/obis/src/python/obis/dm/commands/openbis_sync.py +++ b/obis/src/python/obis/dm/commands/openbis_sync.py @@ -23,7 +23,7 @@ class OpenbisSync(OpenbisCommand): missing_config_settings.append('user') if self.data_set_type() is None: missing_config_settings.append('data_set type') - if self.object_id() is None and self.collection_id() is None: + if self.object_id() is None and self.object_permId() is None and self.collection_id() is None and self.collection_permId() is None: missing_config_settings.append('object id or collection id') if len(missing_config_settings) > 0: return CommandResult(returncode=-1, @@ -50,8 +50,7 @@ class OpenbisSync(OpenbisCommand): if result.failure(): return result commit_id = result.output - sample_id = self.object_id() - experiment_id = self.collection_id() + sample_id, experiment_id = self._update_and_get_object_or_collection_id() contents = GitRepoFileInfo(self.git_wrapper).contents(git_annex_hash_as_checksum=self.git_annex_hash_as_checksum()) try: data_set = self.openbis.new_git_data_set(data_set_type, top_level_path, commit_id, repository_id, external_dms.code, @@ -62,8 +61,40 @@ class OpenbisSync(OpenbisCommand): return CommandResult(returncode=-1, output=str(e)), None - def commit_metadata_updates(self, msg_fragment=None): - return self.data_mgmt.commit_metadata_updates(msg_fragment) + def _update_and_get_object_or_collection_id(self): + """ Updates identifier of object / collection in case it has changed in openBIS + if the permId is available. Returns sample / experiment identifier.""" + sample_id = self.object_id() + experiment_id = self.collection_id() + if self.object_permId() is not None: + sample_id = self.openbis.get_sample(self.object_permId()).identifier + if sample_id != self.object_id(): + self.settings_resolver.object.set_value_for_parameter('id', sample_id, 'local') + # permId is cleared when the id is set - set it again + self.settings_resolver.object.set_value_for_parameter('permId', self.object_permId(), 'local') + self.commit_metadata_updates("object identifier changed in openBIS") + if self.collection_permId() is not None: + experiment_id = self.openbis.get_experiment(self.collection_permId()).identifier + if experiment_id != self.collection_id(): + self.settings_resolver.collection.set_value_for_parameter('id', experiment_id, 'local') + # permId is cleared when the id is set - set it again + self.settings_resolver.collection.set_value_for_parameter('permId', self.collection_permId(), 'local') + self.commit_metadata_updates("collection identifier changed in openBIS") + return sample_id, experiment_id + + def _storePermId(self): + if self.object_permId() is None and self.object_id() is not None: + sample = self.openbis.get_sample(self.object_id()) + self.settings_resolver.object.set_value_for_parameter('permId', sample.permId, 'local') + self.commit_metadata_updates("object permId", omit_usersettings=False) + if self.collection_permId() is None and self.collection_id() is not None: + experiment = self.openbis.get_experiment(self.collection_id()) + self.settings_resolver.collection.set_value_for_parameter('permId', experiment.permId, 'local') + self.commit_metadata_updates("collection permId", omit_usersettings=False) + + + def commit_metadata_updates(self, msg_fragment=None, omit_usersettings=True): + return self.data_mgmt.commit_metadata_updates(msg_fragment, omit_usersettings=omit_usersettings) def prepare_repository_id(self): @@ -157,10 +188,14 @@ class OpenbisSync(OpenbisCommand): self.commit_metadata_updates() + # store permId of object / collection so we can use those as a reference in the future + self._storePermId() + # Update data set id as last commit so we can easily revert it on failure self.settings_resolver.repository.set_value_for_parameter('data_set_id', data_set_code, 'local') self.commit_metadata_updates("data set id") # create a data set, using the existing data set as a parent, if there is one result, data_set = self.create_data_set(data_set_code, external_dms, repository_id, ignore_parent) + return result diff --git a/obis/src/python/obis/dm/commands/removeref.py b/obis/src/python/obis/dm/commands/removeref.py index dd5edadfab17286b7246bc883ae4539ce436343f..ffc7481de635554e7cd1faf7796be7ffb21b4a22 100644 --- a/obis/src/python/obis/dm/commands/removeref.py +++ b/obis/src/python/obis/dm/commands/removeref.py @@ -1,7 +1,7 @@ import json import os -from .openbis_command import OpenbisCommand -from ..command_result import CommandResult +from .openbis_command import OpenbisCommand, ContentCopySelector +from ..command_result import CommandResult, CommandException from ..utils import complete_openbis_config @@ -11,34 +11,57 @@ class Removeref(OpenbisCommand): a new content copy to openBIS. """ - def __init__(self, dm): + def __init__(self, dm, data_set_id=None): + self._data_set_id = data_set_id + self.load_global_config(dm) super(Removeref, self).__init__(dm) def run(self): + + if self._data_set_id is None: + self._remove_content_copies_from_repository() + else: + self._remove_content_copies_from_data_set() + + + return CommandResult(returncode=0, output="") + + + def _remove_content_copies_from_repository(self): result = self.check_obis_repository() if result.failure(): - return result - - data_set = self.openbis.get_dataset(self.data_set_id()).data + raise CommandException(result) - if data_set['linkedData'] is None: - return CommandResult(returncode=-1, output="Data set has no linked data: " + self.data_set_id()) - if data_set['linkedData']['contentCopies'] is None: - return CommandResult(returncode=-1, output="Data set has no content copies: " + self.data_set_id()) + data_set = self.openbis.get_dataset(self.data_set_id()) + self._validate_data_set(data_set) - content_copies = data_set['linkedData']['contentCopies'] - matching_content_copies = list(filter(lambda cc: + content_copies = data_set.data['linkedData']['contentCopies'] + content_copies_to_delete = list(filter(lambda cc: cc['externalDms']['code'] == self.external_dms_id() and cc['path'] == self.path() , content_copies)) - if len(matching_content_copies) == 0: - return CommandResult(returncode=-1, output="Matching content copy not fount in data set: " + self.data_set_id()) + if len(content_copies_to_delete) == 0: + raise CommandException(CommandResult(returncode=-1, output="Matching content copy not fount in data set: " + self.data_set_id())) - for content_copy in matching_content_copies: + for content_copy in content_copies_to_delete: self.openbis.delete_content_copy(self.data_set_id(), content_copy) - return CommandResult(returncode=0, output="") + + def _remove_content_copies_from_data_set(self): + data_set = self.openbis.get_dataset(self._data_set_id) + self._validate_data_set(data_set) + selector = ContentCopySelector(data_set) + content_copy_to_delete = selector.select() + self.openbis.delete_content_copy(self._data_set_id, content_copy_to_delete) + + + def _validate_data_set(self, data_set): + if data_set.data['linkedData'] is None: + raise CommandException(CommandResult(returncode=-1, output="Data set has no linked data: " + self.data_set_id())) + + if data_set.data['linkedData']['contentCopies'] is None: + raise CommandException(CommandResult(returncode=-1, output="Data set has no content copies: " + self.data_set_id())) def check_obis_repository(self): diff --git a/obis/src/python/obis/dm/config.py b/obis/src/python/obis/dm/config.py index 82e03d27a57b319d371d14da476f5eb054f85ba7..512c859b635cc16121465262604ccd716875afa4 100644 --- a/obis/src/python/obis/dm/config.py +++ b/obis/src/python/obis/dm/config.py @@ -9,6 +9,7 @@ Configuration for obis. Created by Chandrasekhar Ramakrishnan on 2017-02-10. Copyright (c) 2017 Chandrasekhar Ramakrishnan. All rights reserved. """ +import abc import json import os @@ -78,8 +79,10 @@ class ConfigEnv(object): def __init__(self): self.locations = {} self.params = {} + self.rules = [] self.initialize_locations() self.initialize_params() + self.initialize_rules() def initialize_locations(self): self.add_location(ConfigLocation(['global'], 'user_home', '.obis')) @@ -106,6 +109,7 @@ class ConfigEnv(object): self.add_param(ConfigParam(name='allow_only_https', private=True, is_json=True, default_value=True)) self.add_param(ConfigParam(name='hostname', private=False)) self.add_param(ConfigParam(name='git_annex_hash_as_checksum', private=False, is_json=True, default_value=True)) + self.add_param(ConfigParam(name='git_annex_backend', private=False)) def add_param(self, param): self.params[param.name] = param @@ -119,17 +123,33 @@ class ConfigEnv(object): def is_usersetting(self): return True + def add_rule(self, rule): + self.rules.append(rule) + + def initialize_rules(self): + pass + class CollectionEnv(ConfigEnv): def initialize_params(self): self.add_param(ConfigParam(name='id', private=False, ignore_global=True)) + self.add_param(ConfigParam(name='permId', private=False, ignore_global=True)) + + def initialize_rules(self): + self.add_rule(ClearPermIdRule()) + self.add_rule(ClearIdentifierRule()) class ObjectEnv(ConfigEnv): def initialize_params(self): self.add_param(ConfigParam(name='id', private=False, ignore_global=True)) + self.add_param(ConfigParam(name='permId', private=False, ignore_global=True)) + + def initialize_rules(self): + self.add_rule(ClearPermIdRule()) + self.add_rule(ClearIdentifierRule()) class DataSetEnv(ConfigEnv): @@ -219,7 +239,7 @@ class ConfigResolver(object): result[name] = val return result - def set_value_for_parameter(self, name, value, loc): + def set_value_for_parameter(self, name, value, loc, apply_rules=False): """Set the value for the parameter :param name: Name of the parameter :param loc: Either 'local' or 'global' @@ -241,9 +261,13 @@ class ConfigResolver(object): os.makedirs(location_dir_path) config_path = os.path.join(location_dir_path, self.categoty + '.json') with open(config_path, "w") as f: - json.dump(location_config_dict, f, sort_keys=True) + json.dump(location_config_dict, f, sort_keys=True, indent=4) + + if apply_rules: + for rule in self.env.rules: + rule.on_set(self, name, value, loc) - def set_value_for_json_parameter(self, json_param_name, name, value, loc): + def set_value_for_json_parameter(self, json_param_name, name, value, loc, apply_rules=False): """Set one field for the json parameter :param json_param_name: Name of the json parameter :param name: Name of the field @@ -263,7 +287,7 @@ class ConfigResolver(object): json_value = {} json_value[name.upper()] = value - self.set_value_for_parameter(json_param_name, json.dumps(json_value), loc) + self.set_value_for_parameter(json_param_name, json.dumps(json_value), loc, apply_rules=apply_rules) def value_for_parameter(self, param, loc): @@ -330,10 +354,10 @@ class SettingsResolver(object): combined_dict[resolver.categoty] = resolver.config_dict(local_only=local_only) return combined_dict - def local_public_properties_paths(self, get_usersettings=False): + def local_public_properties_paths(self, omit_usersettings=True): paths = [] for resolver in self.resolvers: - if get_usersettings == resolver.is_usersetting(): + if omit_usersettings == False or resolver.is_usersetting() == False: paths.append(resolver.local_public_properties_path()) return paths @@ -348,3 +372,24 @@ class SettingsResolver(object): def set_location_search_order(self, order): for resolver in self.resolvers: resolver.location_search_order = order + + +class SettingRule(object): + """ Setting rules can react to setting changes and trigger further actions. """ + @abc.abstractmethod + def on_set(self, setting, value): + pass + + +class ClearPermIdRule(SettingRule): + """ When the user sets a new id, the permId might be invalid, so it will be cleared. """ + def on_set(self, config_resolver, name, value, loc): + if name == "id" and value is not None: + config_resolver.set_value_for_parameter("permId", None, loc) + + +class ClearIdentifierRule(SettingRule): + """ When the user sets a new id, the permId might be invalid, so it will be cleared. """ + def on_set(self, config_resolver, name, value, loc): + if name == "permId" and value is not None: + config_resolver.set_value_for_parameter("id", None, loc) diff --git a/obis/src/python/obis/dm/data_mgmt.py b/obis/src/python/obis/dm/data_mgmt.py index 33bd264c527df58b512e01912371afd7a572f95f..5c54b14b3ada109e90a1bed1f59e3a87a2e92481 100644 --- a/obis/src/python/obis/dm/data_mgmt.py +++ b/obis/src/python/obis/dm/data_mgmt.py @@ -24,6 +24,7 @@ from .commands.clone import Clone from .commands.move import Move from .commands.openbis_sync import OpenbisSync from .commands.download import Download +from .command_log import CommandLog from .command_result import CommandResult from .command_result import CommandException from .git import GitWrapper @@ -35,7 +36,7 @@ from ..scripts import cli # noinspection PyPep8Naming -def DataMgmt(echo_func=None, settings_resolver=None, openbis_config={}, git_config={}, openbis=None, debug=False): +def DataMgmt(echo_func=None, settings_resolver=None, openbis_config={}, git_config={}, openbis=None, log=None, debug=False): """Factory method for DataMgmt instances""" echo_func = echo_func if echo_func is not None else default_echo @@ -43,7 +44,7 @@ def DataMgmt(echo_func=None, settings_resolver=None, openbis_config={}, git_conf complete_git_config(git_config) git_wrapper = GitWrapper(**git_config) if not git_wrapper.can_run(): - return NoGitDataMgmt(settings_resolver, None, git_wrapper, openbis) + return NoGitDataMgmt(settings_resolver, None, git_wrapper, openbis, log) if settings_resolver is None: settings_resolver = dm_config.SettingsResolver() @@ -52,7 +53,7 @@ def DataMgmt(echo_func=None, settings_resolver=None, openbis_config={}, git_conf settings_resolver.set_resolver_location_roots('data_set', result.output) complete_openbis_config(openbis_config, settings_resolver) - return GitDataMgmt(settings_resolver, openbis_config, git_wrapper, openbis, debug) + return GitDataMgmt(settings_resolver, openbis_config, git_wrapper, openbis, log, debug) class AbstractDataMgmt(metaclass=abc.ABCMeta): @@ -61,17 +62,18 @@ class AbstractDataMgmt(metaclass=abc.ABCMeta): All operations throw an exepction if they fail. """ - def __init__(self, settings_resolver, openbis_config, git_wrapper, openbis, debug=False): + def __init__(self, settings_resolver, openbis_config, git_wrapper, openbis, log, debug=False): self.settings_resolver = settings_resolver self.openbis_config = openbis_config self.git_wrapper = git_wrapper self.openbis = openbis + self.log = log self.debug = debug def error_raise(self, command, reason): """Raise an exception.""" message = "'{}' failed. {}".format(command, reason) - raise ValueError(reason) + raise ValueError(message) @abc.abstractmethod def init_data(self, path, desc=None, create=True): @@ -150,8 +152,9 @@ class AbstractDataMgmt(metaclass=abc.ABCMeta): return @abc.abstractmethod - def removeref(self): + def removeref(self, data_set_id=None): """Remove the current folder / repository from openBIS. + :param data_set_id: Id of the data from which a reference should be removed. :return: A CommandResult. """ return @@ -194,7 +197,7 @@ class NoGitDataMgmt(AbstractDataMgmt): def addref(self): self.error_raise("addref", "No git command found.") - def removeref(self): + def removeref(self, data_set_id=None): self.error_raise("removeref", "No git command found.") def download(self, data_set_id, content_copy_index, file, skip_integrity_check): @@ -206,6 +209,21 @@ def restore_signal_handler(data_mgmt): sys.exit(0) +def with_log(f): + def f_with_log(self, *args): + try: + result = f(self, *args) + except Exception as e: + self.log.log_error(str(e)) + raise e + if result.failure() == False: + self.log.success() + else: + self.log.log_error(result.output) + return result + return f_with_log + + def with_restore(f): def f_with_restore(self, *args): self.set_restorepoint() @@ -260,10 +278,14 @@ class GitDataMgmt(AbstractDataMgmt): result = self.git_wrapper.git_init(path) if result.failure(): return result - result = self.git_wrapper.git_annex_init(path, desc) + git_annex_backend = self.settings_resolver.config.config_dict().get('git_annex_backend') + result = self.git_wrapper.git_annex_init(path, desc, git_annex_backend) if result.failure(): return result with cd(path): + result = self.git_wrapper.initial_commit() + if result.failure(): + return result # Update the resolvers location self.settings_resolver.set_resolver_location_roots('data_set', '.') self.settings_resolver.copy_global_to_local() @@ -346,8 +368,8 @@ class GitDataMgmt(AbstractDataMgmt): output += sync_status.output return CommandResult(returncode=0, output=output) - def commit_metadata_updates(self, msg_fragment=None): - properties_paths = self.settings_resolver.local_public_properties_paths() + def commit_metadata_updates(self, msg_fragment=None, omit_usersettings=True): + properties_paths = self.settings_resolver.local_public_properties_paths(omit_usersettings=omit_usersettings) total_status = '' for properties_path in properties_paths: status = self.git_wrapper.git_status(properties_path).output.strip() @@ -377,6 +399,7 @@ class GitDataMgmt(AbstractDataMgmt): cmd = Clone(self, data_set_id, ssh_user, content_copy_index, skip_integrity_check) return cmd.run() + @with_log def move(self, data_set_id, ssh_user, content_copy_index, skip_integrity_check): cmd = Move(self, data_set_id, ssh_user, content_copy_index, skip_integrity_check) return cmd.run() @@ -385,8 +408,8 @@ class GitDataMgmt(AbstractDataMgmt): cmd = Addref(self) return cmd.run() - def removeref(self): - cmd = Removeref(self) + def removeref(self, data_set_id=None): + cmd = Removeref(self, data_set_id=data_set_id) return cmd.run() def download(self, data_set_id, content_copy_index, file, skip_integrity_check): diff --git a/obis/src/python/obis/dm/data_mgmt_test.py b/obis/src/python/obis/dm/data_mgmt_test.py index e9fe1cbb887499fb5315a6804f0a451ca28892cf..4b6cf0222621b8534d1a9e2b0781531361caef0f 100644 --- a/obis/src/python/obis/dm/data_mgmt_test.py +++ b/obis/src/python/obis/dm/data_mgmt_test.py @@ -36,6 +36,7 @@ def shared_dm(): 'allow_http_but_do_not_use_this_in_production_and_only_within_safe_networks': True } dm = data_mgmt.DataMgmt(openbis_config=openbis_config) + dm.debug = True return dm @@ -93,7 +94,7 @@ def test_data_use_case(tmpdir): prepare_registration_expectations(dm) set_registration_configuration(dm) - raw_status = git_status() + raw_status = git_status(annex=True) status = dm.status() assert raw_status.returncode == status.returncode assert raw_status.output + '\nNot yet synchronized with openBIS.' == status.output @@ -107,10 +108,6 @@ def test_data_use_case(tmpdir): present_p = result.output.split('\n')[-1] assert present_p == 'present: true' - # This file should be in the annex and a hardlink - stat = os.stat("snb-data.zip") - assert stat.st_nlink == 2 - # The txt files should be in git normally result = utils.run_shell(['git', 'annex', 'info', 'text-data.txt']) assert 'Not a valid object name' in result.output @@ -118,9 +115,9 @@ def test_data_use_case(tmpdir): present_p = " ".join(result.output.split(' ')[1:]) assert present_p == 'Added data.' - # This file is not in the annex and should not be a hardlink - stat = os.stat("text-data.txt") - assert stat.st_nlink == 1 + # This file is not in the annex + result = utils.run_shell(['git', 'annex', 'info', 'text-data.txt']) + assert "Not a valid object name" in result.output status = dm.status() assert status.output == 'There are git commits which have not been synchronized.' @@ -193,7 +190,7 @@ def test_undo_commit_when_sync_fails(tmpdir): dm.git_wrapper.git_top_level_path = MagicMock(return_value = CommandResult(returncode=0, output=None)) dm.git_wrapper.git_add = MagicMock(return_value = CommandResult(returncode=0, output=None)) dm.git_wrapper.git_commit = MagicMock(return_value = CommandResult(returncode=0, output=None)) - dm._sync = lambda: CommandResult(returncode=-1, output="dummy error") + dm._sync = lambda *args: CommandResult(returncode=-1, output="dummy error") # when result = dm.commit("Added data.") # then @@ -273,6 +270,11 @@ def prepare_new_data_set_expectations(dm, properties={}): dm.openbis.new_git_data_set = MagicMock(return_value=data_set) dm.openbis.get_dataset = MagicMock(return_value=data_set) + sample = MagicMock() + sample.permId = "123-1" + sample.identifier = "/SAMPLE/ID" + dm.openbis.get_sample = MagicMock(return_value=sample) + def check_new_data_set_expectations(dm, tmp_dir_path, commit_id, repository_id, external_dms, data_set_id, parent_id, properties, diff --git a/obis/src/python/obis/dm/git.py b/obis/src/python/obis/dm/git.py index aa67e593f74d29293b880c0b1b160521766111dc..32a5b670283adf2f7b984694db52fcf77084f36f 100644 --- a/obis/src/python/obis/dm/git.py +++ b/obis/src/python/obis/dm/git.py @@ -1,7 +1,8 @@ import shutil import os +from pathlib import Path from .utils import run_shell -from .command_result import CommandException +from .command_result import CommandResult, CommandException from .checksum import ChecksumGeneratorCrc32, ChecksumGeneratorGitAnnex @@ -31,36 +32,73 @@ class GitWrapper(object): def git_status(self, path=None): if path is None: - return run_shell([self.git_path, "status", "--porcelain"], strip_leading_whitespace=False) + return run_shell([self.git_path, "annex", "status"], strip_leading_whitespace=False) else: - return run_shell([self.git_path, "status", "--porcelain", path], strip_leading_whitespace=False) + return run_shell([self.git_path, "annex", "status", path], strip_leading_whitespace=False) - def git_annex_init(self, path, desc): - cmd = [self.git_path, "-C", path, "annex", "init", "--version=6"] + def git_annex_init(self, path, desc, git_annex_backend=None): + cmd = [self.git_path, "-C", path, "annex", "init", "--version=5"] if desc is not None: cmd.append(desc) result = run_shell(cmd) if result.failure(): return result + # annex.thin to avoid copying big files cmd = [self.git_path, "-C", path, "config", "annex.thin", "true"] result = run_shell(cmd) if result.failure(): return result - attributes_src = os.path.join(os.path.dirname(__file__), "git-annex-attributes") - attributes_dst = os.path.join(path, ".gitattributes") - shutil.copyfile(attributes_src, attributes_dst) - cmd = [self.git_path, "-C", path, "add", ".gitattributes"] + # direct mode so annex uses hard links instead of soft links + cmd = [self.git_path, "-C", path, "annex", "direct"] result = run_shell(cmd) if result.failure(): return result - cmd = [self.git_path, "-C", path, "commit", "-m", "Initial commit."] + # re-enable the repository to be used with git directly + # though we need to know what we do since annex can lead to unexpected behaviour + cmd = [self.git_path, "-C", path, "config", "--unset", "core.bare"] result = run_shell(cmd) + if result.failure(): + return result + + attributes_src = os.path.join(os.path.dirname(__file__), "git-annex-attributes") + attributes_dst = os.path.join(path, ".git/info/attributes") + shutil.copyfile(attributes_src, attributes_dst) + self._apply_git_annex_backend(attributes_dst, git_annex_backend) + return result + def initial_commit(self): + # initial commit is needed. we can restore to it when something fails + folder = '.obis' + file = '.gitignore' + path = folder + '/' + file + if not os.path.exists(folder): + os.makedirs(folder) + Path(path).touch() + result = self.git_add(path) + if result.failure(): + return result + return self.git_commit("Initial commit.") + + def _apply_git_annex_backend(self, filename, git_annex_backend): + if git_annex_backend is not None: + lines = [] + file = open(filename, "r") + for line in file: + if "annex.backend" in line: + lines.append("* annex.backend=" + git_annex_backend + "\n") + else: + lines.append(line) + file.close() + file = open(filename, "w") + file.writelines(lines) + file.close() + def git_add(self, path): + # git annex add to avoid out of memory error when adding files bigger than RAM return run_shell([self.git_path, "annex", "add", path, "--include-dotfiles"]) def git_commit(self, msg): diff --git a/obis/src/python/obis/dm/repository_utils.py b/obis/src/python/obis/dm/repository_utils.py index 41c4d36afa51898e0343905d9ce7f512b34be16b..7b4ee0257975877f21964d58415388c6eab75a2f 100644 --- a/obis/src/python/obis/dm/repository_utils.py +++ b/obis/src/python/obis/dm/repository_utils.py @@ -5,7 +5,7 @@ from .utils import run_shell def copy_repository(ssh_user, host, path): - # abort if local folder already exists + # abort if local folder already exists repository_folder = path.split('/')[-1] if os.path.exists(repository_folder): return CommandResult(returncode=-1, output="Folder for repository to clone already exists: " + repository_folder) diff --git a/obis/src/python/obis/scripts/cli.py b/obis/src/python/obis/scripts/cli.py index 032eef6bfca03f22a91744f4f12dd5c7b57c02f5..1e551dd11bcbd32f407f110a53bfd32f562f4886 100644 --- a/obis/src/python/obis/scripts/cli.py +++ b/obis/src/python/obis/scripts/cli.py @@ -11,6 +11,7 @@ Created by Chandrasekhar Ramakrishnan on 2017-01-27. Copyright (c) 2017 Chandrasekhar Ramakrishnan. All rights reserved. """ import json +import sys from datetime import datetime import click @@ -19,6 +20,7 @@ from .. import dm from ..dm.command_result import CommandResult from ..dm.command_result import CommandException from ..dm.utils import cd +from ..dm.command_log import CommandLog def click_echo(message): @@ -44,12 +46,16 @@ def add_params(params): return _add_params -def shared_data_mgmt(context={}): +def shared_data_mgmt(context={}, halt_on_error_log=True): git_config = {'find_git': True} openbis_config = {} if context.get('verify_certificates') is not None: openbis_config['verify_certificates'] = context['verify_certificates'] - return dm.DataMgmt(openbis_config=openbis_config, git_config=git_config, debug=context['debug']) + log = CommandLog() + if halt_on_error_log and log.any_log_exists(): + click_echo("Error: A previous command did not finish. Please check the log ({}) and remove it when you want to continue using obis".format(log.folder_path)) + sys.exit(-1) + return dm.DataMgmt(openbis_config=openbis_config, git_config=git_config, log=log, debug=context['debug']) def check_result(command, result): @@ -72,6 +78,7 @@ def run(ctx, function): @click.group() +@click.version_option(version=None) @click.option('-q', '--quiet', default=False, is_flag=True, help='Suppress status reporting.') @click.option('-s', '--skip_verification', default=False, is_flag=True, help='Do not verify cerficiates') @click.option('-d', '--debug', default=False, is_flag=True, help="Show stack trace on error.") @@ -88,9 +95,9 @@ def set_property(data_mgmt, resolver, prop, value, is_global, is_data_set_proper loc = 'global' if is_global else 'local' try: if is_data_set_property: - resolver.set_value_for_json_parameter('properties', prop, value, loc) + resolver.set_value_for_json_parameter('properties', prop, value, loc, apply_rules=True) else: - resolver.set_value_for_parameter(prop, value, loc) + resolver.set_value_for_parameter(prop, value, loc, apply_rules=True) except ValueError as e: if data_mgmt.debug == True: raise e @@ -310,7 +317,7 @@ def settings(ctx, is_global): @settings.command('get') @click.pass_context def settings_get(ctx): - data_mgmt = shared_data_mgmt(ctx.obj) + data_mgmt = shared_data_mgmt(ctx.obj, halt_on_error_log=False) settings = data_mgmt.settings_resolver.config_dict() settings_str = json.dumps(settings, indent=4, sort_keys=True) click.echo("{}".format(settings_str)) @@ -325,7 +332,7 @@ def repository(ctx, is_global): """ Get/set settings related to the repository. """ ctx.obj['is_global'] = is_global - ctx.obj['data_mgmt'] = shared_data_mgmt(ctx.obj) + ctx.obj['data_mgmt'] = shared_data_mgmt(ctx.obj, halt_on_error_log=False) ctx.obj['resolver'] = ctx.obj['data_mgmt'].settings_resolver.repository @@ -362,7 +369,7 @@ def data_set(ctx, is_global, is_data_set_property): """ ctx.obj['is_global'] = is_global ctx.obj['is_data_set_property'] = is_data_set_property - ctx.obj['data_mgmt'] = shared_data_mgmt(ctx.obj) + ctx.obj['data_mgmt'] = shared_data_mgmt(ctx.obj, halt_on_error_log=False) ctx.obj['resolver'] = ctx.obj['data_mgmt'].settings_resolver.data_set @@ -397,7 +404,7 @@ def object(ctx, is_global): """ Get/set settings related to the object. """ ctx.obj['is_global'] = is_global - ctx.obj['data_mgmt'] = shared_data_mgmt(ctx.obj) + ctx.obj['data_mgmt'] = shared_data_mgmt(ctx.obj, halt_on_error_log=False) ctx.obj['resolver'] = ctx.obj['data_mgmt'].settings_resolver.object @@ -432,7 +439,7 @@ def collection(ctx, is_global): """ Get/set settings related to the collection. """ ctx.obj['is_global'] = is_global - ctx.obj['data_mgmt'] = shared_data_mgmt(ctx.obj) + ctx.obj['data_mgmt'] = shared_data_mgmt(ctx.obj, halt_on_error_log=False) ctx.obj['resolver'] = ctx.obj['data_mgmt'].settings_resolver.collection @@ -467,7 +474,7 @@ def config(ctx, is_global): """ Get/set configurations. """ ctx.obj['is_global'] = is_global - ctx.obj['data_mgmt'] = shared_data_mgmt(ctx.obj) + ctx.obj['data_mgmt'] = shared_data_mgmt(ctx.obj, halt_on_error_log=False) ctx.obj['resolver'] = ctx.obj['data_mgmt'].settings_resolver.config @@ -507,23 +514,19 @@ def _repository_commit(ctx, msg, auto_add, ignore_missing_parent): data_mgmt = shared_data_mgmt(ctx.obj) return check_result("commit", run(ctx, lambda: data_mgmt.commit(msg, auto_add, ignore_missing_parent))) -@repository.command("commit") +@repository.command("commit", short_help="Commit the repository to git and inform openBIS.") @click.pass_context @add_params(_commit_params) def repository_commit(ctx, msg, auto_add, ignore_missing_parent, repository): - """Commit the repository to git and inform openBIS. - """ if repository is None: return _repository_commit(ctx, msg, auto_add, ignore_missing_parent) with cd(repository): return _repository_commit(ctx, msg, auto_add, ignore_missing_parent) -@cli.command() +@cli.command(short_help="Commit the repository to git and inform openBIS.") @click.pass_context @add_params(_commit_params) def commit(ctx, msg, auto_add, ignore_missing_parent, repository): - """Commit the repository to git and inform openBIS. - """ ctx.invoke(repository_commit, msg=msg, auto_add=auto_add, ignore_missing_parent=ignore_missing_parent, repository=repository) ## init @@ -535,18 +538,16 @@ _init_params = [ click.argument('description', default=""), ] -@repository.command("init") +@repository.command("init", short_help="Initialize the folder as a data repository.") @click.pass_context @add_params(_init_params) def repository_init(ctx, object_id, collection_id, repository, description): - """Initialize the folder as a data repository.""" return init_data_impl(ctx, object_id, collection_id, repository, description) -@cli.command() +@cli.command(short_help="Initialize the folder as a data repository.") @click.pass_context @add_params(_init_params) def init(ctx, object_id, collection_id, repository, description): - """Initialize the folder as a data repository.""" ctx.invoke(repository_init, object_id=object_id, collection_id=collection_id, repository=repository, description=description) ## init analysis @@ -556,18 +557,16 @@ _init_analysis_params = [ ] _init_analysis_params += _init_params -@repository.command("init_analysis") +@repository.command("init_analysis", short_help="Initialize the folder as an analysis folder.") @click.pass_context @add_params(_init_analysis_params) def repository_init_analysis(ctx, parent, object_id, collection_id, repository, description): - """Initialize the folder as an analysis folder.""" return init_analysis_impl(ctx, parent, object_id, collection_id, repository, description) -@cli.command() +@cli.command(short_help="Initialize the folder as an analysis folder.") @click.pass_context @add_params(_init_analysis_params) def init_analysis(ctx, parent, object_id, collection_id, repository, description): - """Initialize the folder as an analysis folder.""" ctx.invoke(repository_init_analysis, parent=parent, object_id=object_id, collection_id=collection_id, repository=repository, description=description) ## status @@ -581,23 +580,19 @@ def _repository_status(ctx): result = run(ctx, data_mgmt.status) click.echo(result.output) -@repository.command("status") +@repository.command("status", short_help="Show the state of the obis repository.") @click.pass_context @add_params(_status_params) def repository_status(ctx, repository): - """Show the state of the obis repository. - """ if repository is None: return _repository_status(ctx) with cd(repository): return _repository_status(ctx) -@cli.command() +@cli.command(short_help="Show the state of the obis repository.") @click.pass_context @add_params(_status_params) def status(ctx, repository): - """Show the state of the obis repository. - """ ctx.invoke(repository_status, repository=repository) ## sync @@ -611,23 +606,19 @@ def _repository_sync(ctx, ignore_missing_parent): data_mgmt = shared_data_mgmt(ctx.obj) return check_result("sync", run(ctx, lambda: data_mgmt.sync(ignore_missing_parent))) -@repository.command("sync") +@repository.command("sync", short_help="Sync the repository with openBIS.") @click.pass_context @add_params(_sync_params) def repository_sync(ctx, ignore_missing_parent, repository): - """Sync the repository with openBIS. - """ if repository is None: return _repository_sync(ctx, ignore_missing_parent) with cd(repository): return _repository_sync(ctx, ignore_missing_parent) -@cli.command() +@cli.command(short_help="Sync the repository with openBIS.") @click.pass_context @add_params(_sync_params) def sync(ctx, ignore_missing_parent, repository): - """Sync the repository with openBIS. - """ ctx.invoke(repository_sync, ignore_missing_parent=ignore_missing_parent, repository=repository) ## addref @@ -640,53 +631,54 @@ def _repository_addref(ctx): data_mgmt = shared_data_mgmt(ctx.obj) return check_result("addref", run(ctx, data_mgmt.addref)) -@repository.command("addref") +@repository.command("addref", short_help="Add the given repository as a reference to openBIS.") @click.pass_context @add_params(_addref_params) def repository_addref(ctx, repository): - """Add the given repository as a reference to openBIS. - """ if repository is None: return _repository_addref(ctx) with cd(repository): return _repository_addref(ctx) -@cli.command() +@cli.command(short_help="Add the given repository as a reference to openBIS.") @click.pass_context @add_params(_addref_params) def addref(ctx, repository): - """Add the given repository as a reference to openBIS. - """ ctx.invoke(repository_addref, repository=repository) # removeref _removeref_params = [ + click.option('-d', '--data_set_id', help='Remove ref by data set id, in case the repository is not available anymore.'), click.argument('repository', type=click.Path(exists=True, file_okay=False), required=False), ] -def _repository_removeref(ctx): +def _repository_removeref(ctx, data_set_id=None): data_mgmt = shared_data_mgmt(ctx.obj) - return check_result("addref", run(ctx, data_mgmt.removeref)) + return check_result("removeref", run(ctx, lambda: data_mgmt.removeref(data_set_id=data_set_id))) -@repository.command("removeref") +@repository.command("removeref", short_help="Remove the reference to the given repository from openBIS.") @click.pass_context @add_params(_removeref_params) -def repository_removeref(ctx, repository): - """Remove the reference to the given repository from openBIS. - """ - if repository is None: - return _repository_removeref(ctx) - with cd(repository): - return _repository_removeref(ctx) +def repository_removeref(ctx, data_set_id, repository): + if data_set_id is None: + if repository is None: + return _repository_removeref(ctx) + with cd(repository): + return _repository_removeref(ctx) + else: + if repository is not None: + print(repository) + click_echo("Only provide the data_set id OR the repository.") + return -1 + return _repository_removeref(ctx, data_set_id=data_set_id) + -@cli.command() +@cli.command(short_help="Remove the reference to the given repository from openBIS.") @click.pass_context @add_params(_removeref_params) -def removeref(ctx, repository): - """Remove the reference to the given repository from openBIS. - """ - ctx.invoke(repository_removeref, repository=repository) +def removeref(ctx, data_set_id, repository): + ctx.invoke(repository_removeref, data_set_id=data_set_id, repository=repository) # data set commands: download / clone @@ -700,21 +692,17 @@ _download_params = [ click.argument('data_set_id'), ] -@data_set.command("download") +@data_set.command("download", short_help="Download files of a linked data set.") @add_params(_download_params) @click.pass_context def data_set_download(ctx, content_copy_index, file, data_set_id, skip_integrity_check): - """ Download files of a linked data set. - """ data_mgmt = shared_data_mgmt(ctx.obj) return check_result("download", run(ctx, lambda: data_mgmt.download(data_set_id, content_copy_index, file, skip_integrity_check))) -@cli.command() +@cli.command(short_help="Download files of a linked data set.") @add_params(_download_params) @click.pass_context def download(ctx, content_copy_index, file, data_set_id, skip_integrity_check): - """ Download files of a linked data set. - """ ctx.invoke(data_set_download, content_copy_index=content_copy_index, file=file, data_set_id=data_set_id, skip_integrity_check=skip_integrity_check) ## clone @@ -726,41 +714,33 @@ _clone_move_params = [ click.argument('data_set_id'), ] -@data_set.command("clone") +@data_set.command("clone", short_help="Clone the repository found in the given data set id.") @click.pass_context @add_params(_clone_move_params) def data_set_clone(ctx, ssh_user, content_copy_index, data_set_id, skip_integrity_check): - """Clone the repository found in the given data set id. - """ data_mgmt = shared_data_mgmt(ctx.obj) return check_result("clone", run(ctx, lambda: data_mgmt.clone(data_set_id, ssh_user, content_copy_index, skip_integrity_check))) -@cli.command() +@cli.command(short_help="Clone the repository found in the given data set id.") @click.pass_context @add_params(_clone_move_params) def clone(ctx, ssh_user, content_copy_index, data_set_id, skip_integrity_check): - """Clone the repository found in the given data set id. - """ ctx.invoke(data_set_clone, ssh_user=ssh_user, content_copy_index=content_copy_index, data_set_id=data_set_id, skip_integrity_check=skip_integrity_check) ## move -@data_set.command("move") +@data_set.command("move", short_help="Move the repository found in the given data set id.") @click.pass_context @add_params(_clone_move_params) def data_set_move(ctx, ssh_user, content_copy_index, data_set_id, skip_integrity_check): - """Move the repository found in the given data set id. - """ data_mgmt = shared_data_mgmt(ctx.obj) return check_result("move", run(ctx, lambda: data_mgmt.move(data_set_id, ssh_user, content_copy_index, skip_integrity_check))) -@cli.command() +@cli.command(short_help="Move the repository found in the given data set id.") @click.pass_context @add_params(_clone_move_params) def move(ctx, ssh_user, content_copy_index, data_set_id, skip_integrity_check): - """Move the repository found in the given data set id. - """ ctx.invoke(data_set_move, ssh_user=ssh_user, content_copy_index=content_copy_index, data_set_id=data_set_id, skip_integrity_check=skip_integrity_check) diff --git a/obis/src/python/setup.py b/obis/src/python/setup.py index ae1e49f85002ef86fc52fe4adbb5710eb8fb6c0c..474005d70e6f9da50d776447474105eee83d3904 100644 --- a/obis/src/python/setup.py +++ b/obis/src/python/setup.py @@ -2,6 +2,10 @@ import os from setuptools import setup +data_dir = os.path.join('man','man1') +data_files = [(d, [os.path.join(d,f) for f in files]) + for d, folders, files in os.walk(data_dir)] + setup(name='obis', version='0.1.0', description='Local data management with assistance from OpenBIS.', @@ -10,6 +14,7 @@ setup(name='obis', author_email='chandrasekhar.ramakrishnan@id.ethz.ch', license='BSD', packages=['obis', 'obis.dm', 'obis.dm.commands', 'obis.scripts'], + data_files=data_files, package_data={'obis' : ['dm/git-annex-attributes']}, install_requires=[ 'pyOpenSSL', diff --git a/obis/src/vagrant/README.md b/obis/src/vagrant/README.md index bbf888cbacb1693d8695cf6fd2b36c4524b01e9a..7fc07cd082c428450d15148c1a007b506006f463 100644 --- a/obis/src/vagrant/README.md +++ b/obis/src/vagrant/README.md @@ -5,8 +5,8 @@ To help users interested in trying out _obis_, we provide a vagrant setup that can be used to quickly create a test environment. The environment automates most of the installation process, but there are a few steps that must be done manually. 0. Download openbis from the https://wiki-bsse.ethz.ch/display/bis/Production+Releases -1. Put the extract the openbis installer to the src/vagrant/initialize folder -2. cd to `src/vagrant/obis` +1. Put the extract the openbis installer to the obis/src/vagrant/initialize folder +2. cd to `obis/src/vagrant` 3. `vagrant plugin install vagrant-vbguest` -- install the vagrant-vbguest plugin 3. `vagrant up --provision --provider virtualbox` -- initialize the virtual machine @@ -29,7 +29,7 @@ obis can be used on both vagrant machines. 1. `vagrant ssh obisserver` (or `obisclient`) 2. `sudo su obis` 3. `cd ~obis` -4. Configure the openbis_url: `obis config -g openbis_url https://obisserver:8443` +4. Configure the openbis_url: `obis config -g set openbis_url=https://obisserver:8443` 5. Use obis. 6. `exit` -- log off the virtual machine @@ -51,7 +51,7 @@ Also make sure that there is a sample with the identifier /DEMO/BIGDATA. The typ Check the obis configuration. - obis config -g + obis config -g get The following should be configured: @@ -62,10 +62,10 @@ The following should be configured: This is probably the case, but if it is not, you need to execute the following commands. We will set this environment globally, so it is not necessary for every single data set. - obis config -g openbis_url https://sprint-openbis.ethz.ch:8446 - obis config -g user adamsr - obis config -g data_set_type GIT_REPO - obis config -g verify_certificates false + obis config -g set openbis_url=https://sprint-openbis.ethz.ch:8446 + obis config -g set user=adamsr + obis config -g set data_set_type=GIT_REPO + obis config -g set verify_certificates=false ### Demo @@ -81,7 +81,7 @@ Now create a file and put some content into it. E.g., When finished, we need to set the sample_id or experiment_id this data set should be associated with. Then we can commit it. - obis config sample_id /DEMO/BIGDATA + obis object set id=/DEMO/BIGDATA obis commit -m"Initial data commit." Log into the sprint server https://sprint-openbis.ethz.ch:8446 and go to the sample /DEMO/BIGDATA. You should see the newly registered data set there. You can take a look at it and see file metadata for its contents. @@ -96,7 +96,7 @@ If you run You should see that the file is dirty. Now, before we commit, we will set some data set metadata. - obis config data_set_properties '{"DESCRIPTION": "Version 1"}' + obis data_set set properties='{"DESCRIPTION": "Version 1"}' And now we commit: diff --git a/obis/src/vagrant/Vagrantfile b/obis/src/vagrant/Vagrantfile index 539638b7ce70ee6dc997306dac553a88782a8143..280d0c244fb696f42cf09692d6888387bde1fcef 100644 --- a/obis/src/vagrant/Vagrantfile +++ b/obis/src/vagrant/Vagrantfile @@ -20,7 +20,7 @@ Vagrant.configure(2) do |config| # the path on the guest to mount the folder. And the optional third # argument is a set of non-required options. # config.vm.synced_folder "../data", "/vagrant_data" - config.vm.synced_folder "../../python", "/vagrant_python", type: "virtualbox" + config.vm.synced_folder "../python", "/vagrant_python", type: "virtualbox" config.vm.synced_folder "../../../", "/vagrant_repo", type: "virtualbox" config.vm.synced_folder "initialize", "/vagrant_initialize", type: "virtualbox" config.vm.synced_folder "./", "/vagrant", type: "virtualbox" diff --git a/obis/src/vagrant/initialize/install_obis.sh b/obis/src/vagrant/initialize/install_obis.sh index e1fe67a05ea9f1cb0acbabefdd45b140de6a3b4f..7719f6800b4438e1d1f3d04a73ee542e7f61ef2f 100755 --- a/obis/src/vagrant/initialize/install_obis.sh +++ b/obis/src/vagrant/initialize/install_obis.sh @@ -1,7 +1,7 @@ #!/bin/env bash -sudo pip3 install -e /vagrant_python/PyBis/ -sudo pip3 install -e /vagrant_python/OBis/ +sudo pip3 install -e /vagrant_repo/pybis/src/python/ +sudo pip3 install -e /vagrant_repo/obis/src/python/ sudo pip3 install pyOpenSSL diff --git a/obis/src/vagrant/initialize/setup_general.sh b/obis/src/vagrant/initialize/setup_general.sh index e0dc3c685855fef014cd910715cad55bb01342c2..cf0f8e8a1a6fb75ca9745fd3eaa7d0d5b47abd54 100755 --- a/obis/src/vagrant/initialize/setup_general.sh +++ b/obis/src/vagrant/initialize/setup_general.sh @@ -4,10 +4,6 @@ sudo rm /etc/localtime sudo ln -s /usr/share/zoneinfo/Europe/Zurich /etc/localtime -# set locale -sudo echo "export LC_ALL=en_US.utf8" >> /etc/environment -sudo echo "export LANG=en_US.utf8" >> /etc/environment - # install some often used packages sudo yum -y install wget sudo yum -y install epel-release diff --git a/openbis/build.gradle b/openbis/build.gradle index 6b45a02e579f614fc5876cd7faab36e3d90ff893..d28ed98fefe71ace3ca2f56acd139a6247cf3818 100644 --- a/openbis/build.gradle +++ b/openbis/build.gradle @@ -28,7 +28,7 @@ dependencies { 'springframework:spring-orm:+', 'cisd:cisd-hotdeploy:13.01.0', 'apache:poi-ooxml:3.17', - 'hibernate:hibernate-validator:4.2.0.Final', + 'hibernate:hibernate-validator:4.3.2.Final', 'unimi:fastutil:5.1.5', 'apache:commons-collections4:+', 'springframework:spring-context-support:+', diff --git a/openbis/resource/eclipse/Buildship openBIS compile GWT.launch b/openbis/resource/eclipse/Buildship openBIS compile GWT.launch new file mode 100644 index 0000000000000000000000000000000000000000..1a1b2aa0f2a802127fa42821e8b1898e9dd849c2 --- /dev/null +++ b/openbis/resource/eclipse/Buildship openBIS compile GWT.launch @@ -0,0 +1,18 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<launchConfiguration type="org.eclipse.buildship.core.launch.runconfiguration"> +<listAttribute key="arguments"> +<listEntry value="-Dopenbis.development-build=true"/> +</listAttribute> +<booleanAttribute key="build_scans_enabled" value="false"/> +<stringAttribute key="gradle_distribution" value="GRADLE_DISTRIBUTION(WRAPPER)"/> +<stringAttribute key="gradle_user_home" value=""/> +<listAttribute key="jvm_arguments"/> +<booleanAttribute key="offline_mode" value="false"/> +<booleanAttribute key="override_workspace_settings" value="false"/> +<booleanAttribute key="show_console_view" value="true"/> +<booleanAttribute key="show_execution_view" value="true"/> +<listAttribute key="tasks"> +<listEntry value=":openbis:compileGWT"/> +</listAttribute> +<stringAttribute key="working_dir" value="${workspace_loc:/gradle}"/> +</launchConfiguration> diff --git a/openbis/source/java/ch/ethz/sis/openbis/generic/server/asapi/v3/ApplicationServerApi.java b/openbis/source/java/ch/ethz/sis/openbis/generic/server/asapi/v3/ApplicationServerApi.java index e1188ac8d0e7849954643e30536245e61af872e4..c316c774ae9c95057dbe7000fc56789b6e6ed2fb 100644 --- a/openbis/source/java/ch/ethz/sis/openbis/generic/server/asapi/v3/ApplicationServerApi.java +++ b/openbis/source/java/ch/ethz/sis/openbis/generic/server/asapi/v3/ApplicationServerApi.java @@ -17,7 +17,6 @@ package ch.ethz.sis.openbis.generic.server.asapi.v3; import java.util.Arrays; -import java.util.HashMap; import java.util.List; import java.util.Map; @@ -43,6 +42,8 @@ import ch.ethz.sis.openbis.generic.asapi.v3.dto.authorizationgroup.search.Search import ch.ethz.sis.openbis.generic.asapi.v3.dto.authorizationgroup.update.AuthorizationGroupUpdate; import ch.ethz.sis.openbis.generic.asapi.v3.dto.authorizationgroup.update.UpdateAuthorizationGroupsOperation; import ch.ethz.sis.openbis.generic.asapi.v3.dto.common.TableModel; +import ch.ethz.sis.openbis.generic.asapi.v3.dto.common.get.GetServerInformationOperation; +import ch.ethz.sis.openbis.generic.asapi.v3.dto.common.get.GetServerInformationOperationResult; import ch.ethz.sis.openbis.generic.asapi.v3.dto.common.operation.IOperation; import ch.ethz.sis.openbis.generic.asapi.v3.dto.common.operation.IOperationResult; import ch.ethz.sis.openbis.generic.asapi.v3.dto.common.search.SearchResult; @@ -100,6 +101,8 @@ import ch.ethz.sis.openbis.generic.asapi.v3.dto.deletion.search.SearchDeletionsO import ch.ethz.sis.openbis.generic.asapi.v3.dto.deletion.search.SearchDeletionsOperationResult; import ch.ethz.sis.openbis.generic.asapi.v3.dto.entity.create.CreateCodesOperation; import ch.ethz.sis.openbis.generic.asapi.v3.dto.entity.create.CreateCodesOperationResult; +import ch.ethz.sis.openbis.generic.asapi.v3.dto.entity.create.CreatePermIdsOperation; +import ch.ethz.sis.openbis.generic.asapi.v3.dto.entity.create.CreatePermIdsOperationResult; import ch.ethz.sis.openbis.generic.asapi.v3.dto.entitytype.EntityKind; import ch.ethz.sis.openbis.generic.asapi.v3.dto.entitytype.id.EntityTypePermId; import ch.ethz.sis.openbis.generic.asapi.v3.dto.entitytype.id.IEntityTypeId; @@ -466,15 +469,12 @@ import ch.ethz.sis.openbis.generic.asapi.v3.dto.vocabulary.update.UpdateVocabula import ch.ethz.sis.openbis.generic.asapi.v3.dto.vocabulary.update.VocabularyTermUpdate; import ch.ethz.sis.openbis.generic.asapi.v3.dto.vocabulary.update.VocabularyUpdate; import ch.ethz.sis.openbis.generic.server.asapi.v3.executor.operation.IExecuteOperationExecutor; -import ch.systemsx.cisd.common.exceptions.UserFailureException; import ch.systemsx.cisd.openbis.common.spring.IInvocationLoggerContext; import ch.systemsx.cisd.openbis.generic.server.AbstractServer; -import ch.systemsx.cisd.openbis.generic.server.ComponentNames; import ch.systemsx.cisd.openbis.generic.server.business.IPropertiesBatchManager; import ch.systemsx.cisd.openbis.generic.server.dataaccess.IDAOFactory; import ch.systemsx.cisd.openbis.generic.server.plugin.IDataSetTypeSlaveServerPlugin; import ch.systemsx.cisd.openbis.generic.server.plugin.ISampleTypeSlaveServerPlugin; -import ch.systemsx.cisd.openbis.generic.shared.Constants; import ch.systemsx.cisd.openbis.generic.shared.IOpenBisSessionManager; import ch.systemsx.cisd.openbis.generic.shared.dto.SessionContextDTO; import ch.systemsx.cisd.openbis.generic.shared.managed_property.IManagedPropertyEvaluatorFactory; @@ -1616,37 +1616,16 @@ public class ApplicationServerApi extends AbstractServer<IApplicationServerApi> @Override public Map<String, String> getServerInformation(String sessionToken) { - checkSession(sessionToken); - Map<String, String> info = new HashMap<String, String>(); - info.put("api-version", getMajorVersion() + "." + getMinorVersion()); - info.put("project-samples-enabled", Boolean.toString(isProjectSamplesEnabled(null))); - info.put("archiving-configured", Boolean.toString(isArchivingConfigured(null))); - info.put("enabled-technologies", configurer.getResolvedProps().getProperty(Constants.ENABLED_MODULES_KEY)); - info.put("authentication-service", configurer.getResolvedProps().getProperty(ComponentNames.AUTHENTICATION_SERVICE)); - // String disabledText = tryGetDisabledText(); - // if (disabledText != null) - // { - // info.put("server-disabled-info", disabledText); - // } - return info; + GetServerInformationOperationResult result = executeOperation(sessionToken, new GetServerInformationOperation()); + return result.getServerInformation(); } @Override @Transactional public List<String> createPermIdStrings(String sessionToken, int count) { - checkSession(sessionToken); - if (count > 100) - { - throw new UserFailureException("Cannot create more than 100 ids in one call (" + count + " requested)"); - } - - if (count <= 0) - { - throw new UserFailureException("Invalid count: " + count); - } - - return getDAOFactory().getPermIdDAO().createPermIds(count); + CreatePermIdsOperationResult result = executeOperation(sessionToken, new CreatePermIdsOperation(count)); + return result.getPermIds(); } @Override diff --git a/openbis/source/java/ch/ethz/sis/openbis/generic/server/asapi/v3/executor/common/get/GetServerInformationOperationExecutor.java b/openbis/source/java/ch/ethz/sis/openbis/generic/server/asapi/v3/executor/common/get/GetServerInformationOperationExecutor.java new file mode 100644 index 0000000000000000000000000000000000000000..5397dd066d794423cd34fc392c273f7b3c6697f5 --- /dev/null +++ b/openbis/source/java/ch/ethz/sis/openbis/generic/server/asapi/v3/executor/common/get/GetServerInformationOperationExecutor.java @@ -0,0 +1,78 @@ +/* + * Copyright 2018 ETH Zuerich, SIS + * + * 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. + */ + +package ch.ethz.sis.openbis.generic.server.asapi.v3.executor.common.get; + +import java.util.Map; +import java.util.TreeMap; + +import javax.annotation.Resource; + +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Component; + +import ch.ethz.sis.openbis.generic.asapi.v3.dto.common.get.GetServerInformationOperation; +import ch.ethz.sis.openbis.generic.asapi.v3.dto.common.get.GetServerInformationOperationResult; +import ch.ethz.sis.openbis.generic.server.asapi.v3.ApplicationServerApi; +import ch.ethz.sis.openbis.generic.server.asapi.v3.IApplicationServerInternalApi; +import ch.ethz.sis.openbis.generic.server.asapi.v3.executor.IOperationContext; +import ch.ethz.sis.openbis.generic.server.asapi.v3.executor.common.OperationExecutor; +import ch.systemsx.cisd.common.spring.ExposablePropertyPlaceholderConfigurer; +import ch.systemsx.cisd.openbis.generic.server.ComponentNames; +import ch.systemsx.cisd.openbis.generic.shared.Constants; +import ch.systemsx.cisd.openbis.generic.shared.IServer; + +/** + * @author Franz-Josef Elmer + */ +@Component +public class GetServerInformationOperationExecutor + extends OperationExecutor<GetServerInformationOperation, GetServerInformationOperationResult> + implements IGetServerInformationOperationExecutor +{ + @Autowired + private IApplicationServerInternalApi server; + + @Resource(name = ApplicationServerApi.INTERNAL_SERVICE_NAME) + private IServer basicServer; + + @Resource(name = ExposablePropertyPlaceholderConfigurer.PROPERTY_CONFIGURER_BEAN_NAME) + private ExposablePropertyPlaceholderConfigurer configurer; + + @Override + protected Class<? extends GetServerInformationOperation> getOperationClass() + { + return GetServerInformationOperation.class; + } + + @Override + protected GetServerInformationOperationResult doExecute(IOperationContext context, GetServerInformationOperation operation) + { + Map<String, String> info = new TreeMap<>(); + info.put("api-version", server.getMajorVersion() + "." + server.getMinorVersion()); + info.put("project-samples-enabled", Boolean.toString(basicServer.isProjectSamplesEnabled(null))); + info.put("archiving-configured", Boolean.toString(basicServer.isArchivingConfigured(null))); + info.put("enabled-technologies", configurer.getResolvedProps().getProperty(Constants.ENABLED_MODULES_KEY)); + info.put("authentication-service", configurer.getResolvedProps().getProperty(ComponentNames.AUTHENTICATION_SERVICE)); + // String disabledText = server.tryGetDisabledText(); + // if (disabledText != null) + // { + // info.put("server-disabled-info", disabledText); + // } + return new GetServerInformationOperationResult(info); + } + +} diff --git a/base/source/java/ch/systemsx/cisd/base/namedthread/NamedCallable.java b/openbis/source/java/ch/ethz/sis/openbis/generic/server/asapi/v3/executor/common/get/IGetServerInformationOperationExecutor.java similarity index 65% rename from base/source/java/ch/systemsx/cisd/base/namedthread/NamedCallable.java rename to openbis/source/java/ch/ethz/sis/openbis/generic/server/asapi/v3/executor/common/get/IGetServerInformationOperationExecutor.java index 7bf30228763f1d8b7b7f7904385fb796c39c5500..0a16338c0f3dcc6ffa38976abcf8921350bfac3e 100644 --- a/base/source/java/ch/systemsx/cisd/base/namedthread/NamedCallable.java +++ b/openbis/source/java/ch/ethz/sis/openbis/generic/server/asapi/v3/executor/common/get/IGetServerInformationOperationExecutor.java @@ -1,5 +1,5 @@ /* - * Copyright 2008 ETH Zuerich, CISD + * Copyright 2018 ETH Zuerich, SIS * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,15 +14,15 @@ * limitations under the License. */ -package ch.systemsx.cisd.base.namedthread; +package ch.ethz.sis.openbis.generic.server.asapi.v3.executor.common.get; -import java.util.concurrent.Callable; +import ch.ethz.sis.openbis.generic.server.asapi.v3.executor.common.IOperationExecutor; /** - * A {@link Callable} with a name. + * @author Franz-Josef Elmer * - * @author Bernd Rinn */ -public interface NamedCallable<T> extends Callable<T>, ICallableNameProvider +public interface IGetServerInformationOperationExecutor extends IOperationExecutor { + } diff --git a/openbis/source/java/ch/ethz/sis/openbis/generic/server/asapi/v3/executor/dataset/ArchiveDataSetExecutor.java b/openbis/source/java/ch/ethz/sis/openbis/generic/server/asapi/v3/executor/dataset/ArchiveDataSetExecutor.java index 88add4b765a972e0c68198da1425649caacaeb52..4059e5540b126034e920da94b10436262e51eae3 100644 --- a/openbis/source/java/ch/ethz/sis/openbis/generic/server/asapi/v3/executor/dataset/ArchiveDataSetExecutor.java +++ b/openbis/source/java/ch/ethz/sis/openbis/generic/server/asapi/v3/executor/dataset/ArchiveDataSetExecutor.java @@ -45,7 +45,7 @@ public class ArchiveDataSetExecutor extends AbstractArchiveUnarchiveDataSetExecu @Override public void execute(IDataSetTable dataSetTable) { - dataSetTable.archiveDatasets(options.isRemoveFromDataStore()); + dataSetTable.archiveDatasets(options.isRemoveFromDataStore(), options.getOptions()); } }); } diff --git a/openbis/source/java/ch/ethz/sis/openbis/generic/server/asapi/v3/executor/dataset/SetDataSetPhysicalDataExecutor.java b/openbis/source/java/ch/ethz/sis/openbis/generic/server/asapi/v3/executor/dataset/SetDataSetPhysicalDataExecutor.java index fb71a96d6a4b854457a5f90ba304f4310acdd62c..78f995a56bb6791df66ab76b152ded01ece1cede 100644 --- a/openbis/source/java/ch/ethz/sis/openbis/generic/server/asapi/v3/executor/dataset/SetDataSetPhysicalDataExecutor.java +++ b/openbis/source/java/ch/ethz/sis/openbis/generic/server/asapi/v3/executor/dataset/SetDataSetPhysicalDataExecutor.java @@ -113,6 +113,7 @@ public class SetDataSetPhysicalDataExecutor implements ISetDataSetPhysicalDataEx dataSet.setComplete(complete); dataSet.setH5Folders(physicalCreation.isH5Folders()); dataSet.setH5arFolders(physicalCreation.isH5arFolders()); + dataSet.setArchivingRequested(physicalCreation.isArchivingRequested()); } } diff --git a/openbis/source/java/ch/ethz/sis/openbis/generic/server/asapi/v3/executor/dataset/UpdateDataSetPhysicalDataExecutor.java b/openbis/source/java/ch/ethz/sis/openbis/generic/server/asapi/v3/executor/dataset/UpdateDataSetPhysicalDataExecutor.java index a6571d981a2dde25143a463348d71ad379d96d28..c9b260806b0a010fa9ec5a1d8e989c4f5efd2fc5 100644 --- a/openbis/source/java/ch/ethz/sis/openbis/generic/server/asapi/v3/executor/dataset/UpdateDataSetPhysicalDataExecutor.java +++ b/openbis/source/java/ch/ethz/sis/openbis/generic/server/asapi/v3/executor/dataset/UpdateDataSetPhysicalDataExecutor.java @@ -16,13 +16,18 @@ package ch.ethz.sis.openbis.generic.server.asapi.v3.executor.dataset; +import java.util.Map.Entry; + import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Component; +import ch.ethz.sis.openbis.generic.asapi.v3.dto.common.update.FieldUpdateValue; import ch.ethz.sis.openbis.generic.asapi.v3.dto.dataset.update.DataSetUpdate; +import ch.ethz.sis.openbis.generic.asapi.v3.dto.dataset.update.PhysicalDataUpdate; import ch.ethz.sis.openbis.generic.server.asapi.v3.executor.IOperationContext; import ch.ethz.sis.openbis.generic.server.asapi.v3.helper.common.batch.MapBatch; import ch.systemsx.cisd.openbis.generic.shared.dto.DataPE; +import ch.systemsx.cisd.openbis.generic.shared.dto.ExternalDataPE; /** * @author pkupczyk @@ -38,6 +43,20 @@ public class UpdateDataSetPhysicalDataExecutor implements IUpdateDataSetPhysical public void update(IOperationContext context, MapBatch<DataSetUpdate, DataPE> batch) { updateDataSetFileFormatTypeExecutor.update(context, batch); + for (Entry<DataSetUpdate, DataPE> entry : batch.getObjects().entrySet()) { + DataSetUpdate dataSetUpdate = entry.getKey(); + DataPE dataPE = entry.getValue(); + if (dataPE instanceof ExternalDataPE) { + ExternalDataPE externalDataPE = (ExternalDataPE) dataPE; + FieldUpdateValue<PhysicalDataUpdate> physicalData = dataSetUpdate.getPhysicalData(); + if (physicalData != null && physicalData.getValue() != null) { + FieldUpdateValue<Boolean> archivingRequested = physicalData.getValue().isArchivingRequested(); + if (archivingRequested != null && archivingRequested.getValue() != null) { + externalDataPE.setArchivingRequested(archivingRequested.getValue()); + } + } + } + } } } diff --git a/openbis/source/java/ch/ethz/sis/openbis/generic/server/asapi/v3/executor/entity/CreatePermIdsOperationExecutor.java b/openbis/source/java/ch/ethz/sis/openbis/generic/server/asapi/v3/executor/entity/CreatePermIdsOperationExecutor.java new file mode 100644 index 0000000000000000000000000000000000000000..9e5258d7bbe4b071e9cec89b2b4038c66b931441 --- /dev/null +++ b/openbis/source/java/ch/ethz/sis/openbis/generic/server/asapi/v3/executor/entity/CreatePermIdsOperationExecutor.java @@ -0,0 +1,68 @@ +/* + * Copyright 2018 ETH Zuerich, SIS + * + * 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. + */ + +package ch.ethz.sis.openbis.generic.server.asapi.v3.executor.entity; + +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Component; + +import ch.ethz.sis.openbis.generic.asapi.v3.dto.entity.create.CreatePermIdsOperation; +import ch.ethz.sis.openbis.generic.asapi.v3.dto.entity.create.CreatePermIdsOperationResult; +import ch.ethz.sis.openbis.generic.server.asapi.v3.executor.IOperationContext; +import ch.ethz.sis.openbis.generic.server.asapi.v3.executor.common.OperationExecutor; +import ch.systemsx.cisd.common.exceptions.UserFailureException; +import ch.systemsx.cisd.openbis.generic.server.dataaccess.IDAOFactory; + +/** + * @author Franz-Josef Elmer + */ +@Component +public class CreatePermIdsOperationExecutor + extends OperationExecutor<CreatePermIdsOperation, CreatePermIdsOperationResult> + implements ICreatePermIdsOperationExecutor +{ + + @Autowired + private IDAOFactory daoFactory; + + @Autowired + private IEntityAuthorizationExecutor authorizationExecutor; + + @Override + protected Class<? extends CreatePermIdsOperation> getOperationClass() + { + return CreatePermIdsOperation.class; + } + + @Override + protected CreatePermIdsOperationResult doExecute(IOperationContext context, CreatePermIdsOperation operation) + { + int count = operation.getCount(); + if (count <= 0) + { + throw new UserFailureException("Count cannot be <= 0"); + } + if (count > 100) + { + throw new UserFailureException("Cannot create more than 100 ids in one call (" + count + " requested)"); + } + + authorizationExecutor.canCreatePermIds(context); + + return new CreatePermIdsOperationResult(daoFactory.getPermIdDAO().createPermIds(count)); + } + +} diff --git a/openbis/source/java/ch/ethz/sis/openbis/generic/server/asapi/v3/executor/entity/EntityAuthorizationExecutor.java b/openbis/source/java/ch/ethz/sis/openbis/generic/server/asapi/v3/executor/entity/EntityAuthorizationExecutor.java index ab08c4470b8f7e117a7ab208c9a93a2943eb2764..7b06c54881443079d12dafa07242662acf5cbea3 100644 --- a/openbis/source/java/ch/ethz/sis/openbis/generic/server/asapi/v3/executor/entity/EntityAuthorizationExecutor.java +++ b/openbis/source/java/ch/ethz/sis/openbis/generic/server/asapi/v3/executor/entity/EntityAuthorizationExecutor.java @@ -37,4 +37,11 @@ public class EntityAuthorizationExecutor implements IEntityAuthorizationExecutor { } + @Override + @RolesAllowed({ RoleWithHierarchy.PROJECT_USER, RoleWithHierarchy.SPACE_ETL_SERVER }) + @Capability("CREATE_PERM_IDS") + public void canCreatePermIds(IOperationContext context) + { + } + } diff --git a/base/source/java/ch/systemsx/cisd/base/exceptions/StopException.java b/openbis/source/java/ch/ethz/sis/openbis/generic/server/asapi/v3/executor/entity/ICreatePermIdsOperationExecutor.java similarity index 63% rename from base/source/java/ch/systemsx/cisd/base/exceptions/StopException.java rename to openbis/source/java/ch/ethz/sis/openbis/generic/server/asapi/v3/executor/entity/ICreatePermIdsOperationExecutor.java index 47c4b5b5d7c009bba7d633150fe6bef5d5c53b80..f527d11185449dde1b086e1be58da8f8100065f5 100644 --- a/base/source/java/ch/systemsx/cisd/base/exceptions/StopException.java +++ b/openbis/source/java/ch/ethz/sis/openbis/generic/server/asapi/v3/executor/entity/ICreatePermIdsOperationExecutor.java @@ -1,5 +1,5 @@ /* - * Copyright 2008 ETH Zuerich, CISD + * Copyright 2018 ETH Zuerich, SIS * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,16 +14,14 @@ * limitations under the License. */ -package ch.systemsx.cisd.base.exceptions; +package ch.ethz.sis.openbis.generic.server.asapi.v3.executor.entity; + +import ch.ethz.sis.openbis.generic.server.asapi.v3.executor.common.create.ICreateObjectsOperationExecutor; /** - * An exception that signals that <code>Thread.stop()</code> has been called on the current thread. - * - * @author Bernd Rinn + * @author Franz-Josef Elmer */ -public class StopException extends InterruptedExceptionUnchecked +public interface ICreatePermIdsOperationExecutor extends ICreateObjectsOperationExecutor { - private static final long serialVersionUID = 1L; - } diff --git a/openbis/source/java/ch/ethz/sis/openbis/generic/server/asapi/v3/executor/entity/IEntityAuthorizationExecutor.java b/openbis/source/java/ch/ethz/sis/openbis/generic/server/asapi/v3/executor/entity/IEntityAuthorizationExecutor.java index 42d724ddce4c444fcde6c49036e77156b7063024..079e6c461cb7caa53c58b8d345c4b9e964da9850 100644 --- a/openbis/source/java/ch/ethz/sis/openbis/generic/server/asapi/v3/executor/entity/IEntityAuthorizationExecutor.java +++ b/openbis/source/java/ch/ethz/sis/openbis/generic/server/asapi/v3/executor/entity/IEntityAuthorizationExecutor.java @@ -27,4 +27,6 @@ public interface IEntityAuthorizationExecutor extends IObjectAuthorizationExecut void canCreateCodes(IOperationContext context); + void canCreatePermIds(IOperationContext context); + } diff --git a/openbis/source/java/ch/ethz/sis/openbis/generic/server/asapi/v3/executor/externaldms/ExternalDmsAuthorizationExecutor.java b/openbis/source/java/ch/ethz/sis/openbis/generic/server/asapi/v3/executor/externaldms/ExternalDmsAuthorizationExecutor.java index fbc91387ba8f6749d27eb2ab568457c95e039f93..6330c653ff55ce0ac0a3920b7ed946cd75fe9ae8 100644 --- a/openbis/source/java/ch/ethz/sis/openbis/generic/server/asapi/v3/executor/externaldms/ExternalDmsAuthorizationExecutor.java +++ b/openbis/source/java/ch/ethz/sis/openbis/generic/server/asapi/v3/executor/externaldms/ExternalDmsAuthorizationExecutor.java @@ -39,24 +39,28 @@ public class ExternalDmsAuthorizationExecutor implements IExternalDmsAuthorizati @Override @RolesAllowed({ RoleWithHierarchy.INSTANCE_ADMIN }) + @Capability("CREATE_EXTERNAL_DMS") public void canCreate(IOperationContext context) { } @Override @RolesAllowed({ RoleWithHierarchy.INSTANCE_ADMIN }) + @Capability("DELETE_EXTERNAL_DMS") public void canDelete(IOperationContext context) { } @Override @RolesAllowed({ RoleWithHierarchy.PROJECT_OBSERVER, RoleWithHierarchy.SPACE_ETL_SERVER }) + @Capability("SEARCH_EXTERNAL_DMS") public void canSearch(IOperationContext context) { } @Override @RolesAllowed({ RoleWithHierarchy.INSTANCE_ADMIN }) + @Capability("UPDATE_EXTERNAL_DMS") public void canUpdate(IOperationContext contex) { } diff --git a/openbis/source/java/ch/ethz/sis/openbis/generic/server/asapi/v3/executor/operation/OperationsExecutor.java b/openbis/source/java/ch/ethz/sis/openbis/generic/server/asapi/v3/executor/operation/OperationsExecutor.java index f11a86ecb75109a81d0b8d8566dc56c7100ba5a6..40f29f069b5bf7a73ce94470ecd2c8f58ac31f3c 100644 --- a/openbis/source/java/ch/ethz/sis/openbis/generic/server/asapi/v3/executor/operation/OperationsExecutor.java +++ b/openbis/source/java/ch/ethz/sis/openbis/generic/server/asapi/v3/executor/operation/OperationsExecutor.java @@ -32,6 +32,7 @@ import ch.ethz.sis.openbis.generic.server.asapi.v3.executor.authorizationgroup.I import ch.ethz.sis.openbis.generic.server.asapi.v3.executor.authorizationgroup.IGetAuthorizationGroupsOperationExecutor; import ch.ethz.sis.openbis.generic.server.asapi.v3.executor.authorizationgroup.ISearchAuthorizationGroupsOperationExecutor; import ch.ethz.sis.openbis.generic.server.asapi.v3.executor.authorizationgroup.IUpdateAuthorizationGroupsOperationExecutor; +import ch.ethz.sis.openbis.generic.server.asapi.v3.executor.common.get.IGetServerInformationOperationExecutor; import ch.ethz.sis.openbis.generic.server.asapi.v3.executor.dataset.IArchiveDataSetsOperationExecutor; import ch.ethz.sis.openbis.generic.server.asapi.v3.executor.dataset.ICreateDataSetTypesOperationExecutor; import ch.ethz.sis.openbis.generic.server.asapi.v3.executor.dataset.ICreateDataSetsOperationExecutor; @@ -52,6 +53,7 @@ import ch.ethz.sis.openbis.generic.server.asapi.v3.executor.deletion.IConfirmDel import ch.ethz.sis.openbis.generic.server.asapi.v3.executor.deletion.IRevertDeletionsOperationExecutor; import ch.ethz.sis.openbis.generic.server.asapi.v3.executor.deletion.ISearchDeletionsOperationExecutor; import ch.ethz.sis.openbis.generic.server.asapi.v3.executor.entity.ICreateCodesOperationExecutor; +import ch.ethz.sis.openbis.generic.server.asapi.v3.executor.entity.ICreatePermIdsOperationExecutor; import ch.ethz.sis.openbis.generic.server.asapi.v3.executor.experiment.ICreateExperimentTypesOperationExecutor; import ch.ethz.sis.openbis.generic.server.asapi.v3.executor.experiment.ICreateExperimentsOperationExecutor; import ch.ethz.sis.openbis.generic.server.asapi.v3.executor.experiment.IDeleteExperimentTypesOperationExecutor; @@ -305,6 +307,9 @@ public class OperationsExecutor implements IOperationsExecutor @Autowired private ICreateCodesOperationExecutor createCodesExecutor; + @Autowired + private ICreatePermIdsOperationExecutor createPermIdsExecutor; + @Autowired private IUpdateSpacesOperationExecutor updateSpacesExecutor; @@ -449,6 +454,9 @@ public class OperationsExecutor implements IOperationsExecutor @Autowired private IGetQueriesOperationExecutor getQueriesExecutor; + @Autowired + private IGetServerInformationOperationExecutor getServerInformationExecutor; + @Autowired private ISearchSpacesOperationExecutor searchSpacesExecutor; @@ -705,6 +713,7 @@ public class OperationsExecutor implements IOperationsExecutor resultMap.putAll(getOperationExecutionsExecutor.execute(context, operations)); resultMap.putAll(getSemanticAnnotationsExecutor.execute(context, operations)); resultMap.putAll(getQueriesExecutor.execute(context, operations)); + resultMap.putAll(getServerInformationExecutor.execute(context, operations)); } private void verify(List<? extends IOperation> operations, @@ -767,6 +776,7 @@ public class OperationsExecutor implements IOperationsExecutor resultMap.putAll(createRoleAssignmentsExecutor.execute(context, operations)); resultMap.putAll(createQueriesExecutor.execute(context, operations)); resultMap.putAll(createCodesExecutor.execute(context, operations)); + resultMap.putAll(createPermIdsExecutor.execute(context, operations)); } private void executeDeletions(List<? extends IOperation> operations, diff --git a/openbis/source/java/ch/ethz/sis/openbis/generic/server/asapi/v3/executor/person/SearchPersonExecutor.java b/openbis/source/java/ch/ethz/sis/openbis/generic/server/asapi/v3/executor/person/SearchPersonExecutor.java index 9f86e13898b8b0dab65cb6da40fa1fd5e21e0fa4..27fc26085047b7cc05efbe4bf22b11ec9aaab3f6 100644 --- a/openbis/source/java/ch/ethz/sis/openbis/generic/server/asapi/v3/executor/person/SearchPersonExecutor.java +++ b/openbis/source/java/ch/ethz/sis/openbis/generic/server/asapi/v3/executor/person/SearchPersonExecutor.java @@ -19,6 +19,7 @@ package ch.ethz.sis.openbis.generic.server.asapi.v3.executor.person; import java.util.Collection; import java.util.List; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Component; import ch.ethz.sis.openbis.generic.asapi.v3.dto.common.search.ISearchCriteria; @@ -45,6 +46,15 @@ import ch.systemsx.cisd.openbis.generic.shared.dto.PersonPE; public class SearchPersonExecutor extends AbstractSearchObjectManuallyExecutor<PersonSearchCriteria, PersonPE> implements ISearchPersonExecutor { + @Autowired + private IPersonAuthorizationExecutor authorizationExecutor; + + @Override + public List<PersonPE> search(IOperationContext context, PersonSearchCriteria criteria) + { + authorizationExecutor.canGet(context); + return super.search(context, criteria); + } @Override protected List<PersonPE> listAll() diff --git a/openbis/source/java/ch/ethz/sis/openbis/generic/server/asapi/v3/executor/query/QueryAuthorizationExecutor.java b/openbis/source/java/ch/ethz/sis/openbis/generic/server/asapi/v3/executor/query/QueryAuthorizationExecutor.java index bf8ff10501d7693918e26bba0978eb8cbcd9672c..4a6fa3186d8d23e6e6b5c9f28e1f6ad9f7ee000e 100644 --- a/openbis/source/java/ch/ethz/sis/openbis/generic/server/asapi/v3/executor/query/QueryAuthorizationExecutor.java +++ b/openbis/source/java/ch/ethz/sis/openbis/generic/server/asapi/v3/executor/query/QueryAuthorizationExecutor.java @@ -98,6 +98,7 @@ public class QueryAuthorizationExecutor implements IQueryAuthorizationExecutor @Override @RolesAllowed({ RoleWithHierarchy.PROJECT_OBSERVER, RoleWithHierarchy.SPACE_ETL_SERVER }) + @Capability("EXECUTE_QUERY") public void canExecute(IOperationContext context, String sql, DatabaseDefinition database) { checkDatabaseExists(database.getKey()); diff --git a/openbis/source/java/ch/ethz/sis/openbis/generic/server/asapi/v3/executor/vocabulary/IVocabularyAuthorizationExecutor.java b/openbis/source/java/ch/ethz/sis/openbis/generic/server/asapi/v3/executor/vocabulary/IVocabularyAuthorizationExecutor.java index 0de3e319a4edc10d1480eadad93e627126ad773d..34a539324d4d9cbbb8559da87bb653696040226b 100644 --- a/openbis/source/java/ch/ethz/sis/openbis/generic/server/asapi/v3/executor/vocabulary/IVocabularyAuthorizationExecutor.java +++ b/openbis/source/java/ch/ethz/sis/openbis/generic/server/asapi/v3/executor/vocabulary/IVocabularyAuthorizationExecutor.java @@ -29,6 +29,8 @@ public interface IVocabularyAuthorizationExecutor extends IObjectAuthorizationEx void canGet(IOperationContext context); + void canSearch(IOperationContext context); + void canCreate(IOperationContext context); void canUpdate(IOperationContext context, IVocabularyId id, VocabularyPE entity); diff --git a/openbis/source/java/ch/ethz/sis/openbis/generic/server/asapi/v3/executor/vocabulary/SearchVocabularyExecutor.java b/openbis/source/java/ch/ethz/sis/openbis/generic/server/asapi/v3/executor/vocabulary/SearchVocabularyExecutor.java index ac826cc9474affdb1bb1bdb3210031963d1312d3..49135b3cd0fbfe8fd9e894cef7c9272d4d3187c5 100644 --- a/openbis/source/java/ch/ethz/sis/openbis/generic/server/asapi/v3/executor/vocabulary/SearchVocabularyExecutor.java +++ b/openbis/source/java/ch/ethz/sis/openbis/generic/server/asapi/v3/executor/vocabulary/SearchVocabularyExecutor.java @@ -18,6 +18,7 @@ package ch.ethz.sis.openbis.generic.server.asapi.v3.executor.vocabulary; import java.util.List; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Component; import ch.ethz.sis.openbis.generic.asapi.v3.dto.common.search.CodeSearchCriteria; @@ -40,6 +41,15 @@ import ch.systemsx.cisd.openbis.generic.shared.dto.VocabularyPE; public class SearchVocabularyExecutor extends AbstractSearchObjectManuallyExecutor<VocabularySearchCriteria, VocabularyPE> implements ISearchVocabularyExecutor { + @Autowired + private IVocabularyAuthorizationExecutor authorizationExecutor; + + @Override + public List<VocabularyPE> search(IOperationContext context, VocabularySearchCriteria criteria) + { + authorizationExecutor.canSearch(context); + return super.search(context, criteria); + } @Override protected List<VocabularyPE> listAll() diff --git a/openbis/source/java/ch/ethz/sis/openbis/generic/server/asapi/v3/executor/vocabulary/VocabularyAuthorizationExecutor.java b/openbis/source/java/ch/ethz/sis/openbis/generic/server/asapi/v3/executor/vocabulary/VocabularyAuthorizationExecutor.java index 07a2a289d242039df332a6e79e6e23abc2ab93d1..de93fd63160e6293c358301d3704a81cf39481b7 100644 --- a/openbis/source/java/ch/ethz/sis/openbis/generic/server/asapi/v3/executor/vocabulary/VocabularyAuthorizationExecutor.java +++ b/openbis/source/java/ch/ethz/sis/openbis/generic/server/asapi/v3/executor/vocabulary/VocabularyAuthorizationExecutor.java @@ -42,7 +42,7 @@ public class VocabularyAuthorizationExecutor implements IVocabularyAuthorization public void canCreate(IOperationContext context) { } - + @Override @RolesAllowed({ RoleWithHierarchy.PROJECT_OBSERVER, RoleWithHierarchy.SPACE_ETL_SERVER }) @Capability("GET_VOCABULARY") @@ -50,6 +50,13 @@ public class VocabularyAuthorizationExecutor implements IVocabularyAuthorization { } + @Override + @RolesAllowed({ RoleWithHierarchy.PROJECT_OBSERVER, RoleWithHierarchy.SPACE_ETL_SERVER }) + @Capability("SEARCH_VOCABULARY") + public void canSearch(IOperationContext context) + { + } + @Override @RolesAllowed({ RoleWithHierarchy.INSTANCE_ADMIN }) @DatabaseUpdateModification(value = ObjectKind.VOCABULARY) diff --git a/openbis/source/java/ch/ethz/sis/openbis/generic/server/asapi/v3/helper/entity/progress/VerifyProgress.java b/openbis/source/java/ch/ethz/sis/openbis/generic/server/asapi/v3/helper/entity/progress/VerifyProgress.java index f80024eb283eaa9c7413f8594f0a96d0032134d4..058b5254cd49de935af1f29070fde09da4206695 100644 --- a/openbis/source/java/ch/ethz/sis/openbis/generic/server/asapi/v3/helper/entity/progress/VerifyProgress.java +++ b/openbis/source/java/ch/ethz/sis/openbis/generic/server/asapi/v3/helper/entity/progress/VerifyProgress.java @@ -23,12 +23,13 @@ import ch.systemsx.cisd.openbis.generic.shared.basic.IIdentityHolder; */ public class VerifyProgress extends EntityProgress { - + public static final String VERIFYING = "verifying"; + private static final long serialVersionUID = 1L; public VerifyProgress(IIdentityHolder entity, int numItemsProcessed, int totalItemsToProcess) { - super("verifying", entity, numItemsProcessed, totalItemsToProcess); + super(VERIFYING, entity, numItemsProcessed, totalItemsToProcess); } } diff --git a/openbis/source/java/ch/ethz/sis/openbis/generic/server/asapi/v3/helper/generators/Generator.java b/openbis/source/java/ch/ethz/sis/openbis/generic/server/asapi/v3/helper/generators/Generator.java index 1cee161839953d26a147970e520d337556257b86..525fe3618d943ea8bf95850307e6387b04397bfc 100644 --- a/openbis/source/java/ch/ethz/sis/openbis/generic/server/asapi/v3/helper/generators/Generator.java +++ b/openbis/source/java/ch/ethz/sis/openbis/generic/server/asapi/v3/helper/generators/Generator.java @@ -342,6 +342,7 @@ public class Generator extends AbstractGenerator gen.addBooleanField("presentInArchive"); gen.addBooleanField("storageConfirmation"); gen.addSimpleField(Integer.class, "speedHint"); + gen.addBooleanField("archivingRequested"); gen.setToStringMethod("\"PhysicalData \" + location"); diff --git a/openbis/source/java/ch/ethz/sis/openbis/generic/server/asapi/v3/translator/dataset/DataSetQuery.java b/openbis/source/java/ch/ethz/sis/openbis/generic/server/asapi/v3/translator/dataset/DataSetQuery.java index 45a4220d5cc7354560f7c834e5b8e7d498515d3c..7c97fc33f2d1699554c2932dc3a1984b4c6fa1d2 100644 --- a/openbis/source/java/ch/ethz/sis/openbis/generic/server/asapi/v3/translator/dataset/DataSetQuery.java +++ b/openbis/source/java/ch/ethz/sis/openbis/generic/server/asapi/v3/translator/dataset/DataSetQuery.java @@ -44,7 +44,7 @@ public interface DataSetQuery extends ObjectQuery LongSetMapper.class }, fetchSize = FETCH_SIZE) public List<ObjectRelationRecord> getPhysicalDataIds(LongSet dataSetIds); - @Select(sql = "select ed.id as id, ed.share_id as shareId, ed.location, ed.size, ed.status, ed.is_complete as isComplete, ed.present_in_archive as isPresentInArchive, ed.storage_confirmation as isStorageConfirmed, ed.speed_hint as speedHint " + @Select(sql = "select ed.id as id, ed.share_id as shareId, ed.location, ed.size, ed.status, ed.is_complete as isComplete, ed.present_in_archive as isPresentInArchive, ed.storage_confirmation as isStorageConfirmed, ed.speed_hint as speedHint, ed.archiving_requested as isArchivingRequested " + "from external_data ed where ed.id = any(?{1})", parameterBindings = { LongSetMapper.class }, fetchSize = FETCH_SIZE) public List<PhysicalDataBaseRecord> getPhysicalDatas(LongSet dataSetIds); diff --git a/openbis/source/java/ch/ethz/sis/openbis/generic/server/asapi/v3/translator/dataset/PhysicalDataBaseRecord.java b/openbis/source/java/ch/ethz/sis/openbis/generic/server/asapi/v3/translator/dataset/PhysicalDataBaseRecord.java index a7b18b41e620444a1c189420c9e7483528281704..2f85bc385e68c3e9e3550d4e7b23c4f2a6596414 100644 --- a/openbis/source/java/ch/ethz/sis/openbis/generic/server/asapi/v3/translator/dataset/PhysicalDataBaseRecord.java +++ b/openbis/source/java/ch/ethz/sis/openbis/generic/server/asapi/v3/translator/dataset/PhysicalDataBaseRecord.java @@ -40,4 +40,6 @@ public class PhysicalDataBaseRecord extends ObjectBaseRecord public Integer speedHint; + public Boolean isArchivingRequested; + } diff --git a/openbis/source/java/ch/ethz/sis/openbis/generic/server/asapi/v3/translator/dataset/PhysicalDataTranslator.java b/openbis/source/java/ch/ethz/sis/openbis/generic/server/asapi/v3/translator/dataset/PhysicalDataTranslator.java index 94ed2c289439b4e1c0322548ce7726b5201de0c7..03a0e4293156e960feb9dd1871238158df9d50cf 100644 --- a/openbis/source/java/ch/ethz/sis/openbis/generic/server/asapi/v3/translator/dataset/PhysicalDataTranslator.java +++ b/openbis/source/java/ch/ethz/sis/openbis/generic/server/asapi/v3/translator/dataset/PhysicalDataTranslator.java @@ -100,6 +100,7 @@ public class PhysicalDataTranslator extends AbstractCachingTranslator<Long, Phys result.setPresentInArchive(baseRecord.isPresentInArchive); result.setStorageConfirmation(baseRecord.isStorageConfirmed); result.setSpeedHint(baseRecord.speedHint); + result.setArchivingRequested(baseRecord.isArchivingRequested); if (fetchOptions.hasFileFormatType()) { diff --git a/openbis/source/java/ch/ethz/sis/openbis/generic/server/asapi/v3/translator/dataset/search/PhysicalDataAttributeProvider.java b/openbis/source/java/ch/ethz/sis/openbis/generic/server/asapi/v3/translator/dataset/search/PhysicalDataAttributeProvider.java index 4cfbc41988eba01474115d817ac88e7898d81201..f57acf8feb288c93800ad2eacf0513bb42c3ce09 100644 --- a/openbis/source/java/ch/ethz/sis/openbis/generic/server/asapi/v3/translator/dataset/search/PhysicalDataAttributeProvider.java +++ b/openbis/source/java/ch/ethz/sis/openbis/generic/server/asapi/v3/translator/dataset/search/PhysicalDataAttributeProvider.java @@ -17,6 +17,7 @@ package ch.ethz.sis.openbis.generic.server.asapi.v3.translator.dataset.search; import ch.ethz.sis.openbis.generic.asapi.v3.dto.common.search.ISearchCriteria; +import ch.ethz.sis.openbis.generic.asapi.v3.dto.dataset.search.ArchivingRequestedSearchCriteria; import ch.ethz.sis.openbis.generic.asapi.v3.dto.dataset.search.CompleteSearchCriteria; import ch.ethz.sis.openbis.generic.asapi.v3.dto.dataset.search.LocationSearchCriteria; import ch.ethz.sis.openbis.generic.asapi.v3.dto.dataset.search.PresentInArchiveSearchCriteria; @@ -53,6 +54,9 @@ public class PhysicalDataAttributeProvider implements IObjectAttributeProvider } else if (criteria instanceof StatusSearchCriteria) { return DataSetAttributeSearchFieldKind.STATUS; + } else if (criteria instanceof ArchivingRequestedSearchCriteria) + { + return DataSetAttributeSearchFieldKind.ARCHIVING_REQUESTED; } else if (criteria instanceof PresentInArchiveSearchCriteria) { return DataSetAttributeSearchFieldKind.PRESENT_IN_ARCHIVE; diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/server/CommonClientService.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/server/CommonClientService.java index 5e40a49e48f729c1639f27939625f2d6ecc7bf2a..442675ddcd8a73c05b42cbd9a60af29afb38ab71 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/server/CommonClientService.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/server/CommonClientService.java @@ -22,6 +22,7 @@ import java.util.ArrayList; import java.util.Arrays; import java.util.Collection; import java.util.Collections; +import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; @@ -2355,7 +2356,7 @@ public final class CommonClientService extends AbstractClientService implements { final String sessionToken = getSessionToken(); List<String> datasetCodes = extractDatasetCodes(displayedOrSelectedDatasetCriteria); - int result = commonServer.archiveDatasets(sessionToken, datasetCodes, removeFromDataStore); + int result = commonServer.archiveDatasets(sessionToken, datasetCodes, removeFromDataStore, new HashMap<>()); return new ArchivingResult(datasetCodes.size(), result); } @@ -2680,7 +2681,7 @@ public final class CommonClientService extends AbstractClientService implements { final String sessionToken = getSessionToken(); List<String> datasetCodes = extractDatasetCodes(criteria); - int result = commonServer.archiveDatasets(sessionToken, datasetCodes, removeFromDataStore); + int result = commonServer.archiveDatasets(sessionToken, datasetCodes, removeFromDataStore, new HashMap<>()); return new ArchivingResult(datasetCodes.size(), result); } diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/AbstractCommonServer.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/AbstractCommonServer.java index 4c601910c706d50dfde2fc08b00e71d6b40d79a9..79ad4da257251fe2e1ee22676c68b5e68e6c0052 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/AbstractCommonServer.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/AbstractCommonServer.java @@ -165,12 +165,12 @@ abstract class AbstractCommonServer<T extends IServer> extends AbstractServer<T> } public int archiveDatasets(String sessionToken, List<String> datasetCodes, - boolean deleteFromDataStore) + boolean deleteFromDataStore, Map<String, String> options) { Session session = getSession(sessionToken); IDataSetTable dataSetTable = businessObjectFactory.createDataSetTable(session); dataSetTable.loadByDataSetCodes(datasetCodes, false, true); - return dataSetTable.archiveDatasets(deleteFromDataStore); + return dataSetTable.archiveDatasets(deleteFromDataStore, options); } public int unarchiveDatasets(String sessionToken, List<String> datasetCodes) diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/CommonServer.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/CommonServer.java index 1509262b9a055b5bdc0c9991309ba9ae5ce4d9f0..7a35eb8397716baeb42439ff6eeda2e5fd128453 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/CommonServer.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/CommonServer.java @@ -3212,9 +3212,10 @@ public final class CommonServer extends AbstractCommonServer<ICommonServerForInt @RolesAllowed(RoleWithHierarchy.PROJECT_POWER_USER) @Capability("ARCHIVE_DATASET") public int archiveDatasets(String sessionToken, - @AuthorizationGuard(guardClass = DataSetCodeCollectionPredicate.class) List<String> datasetCodes, boolean removeFromDataStore) + @AuthorizationGuard(guardClass = DataSetCodeCollectionPredicate.class) List<String> datasetCodes, + boolean removeFromDataStore, Map<String, String> options) { - return super.archiveDatasets(sessionToken, datasetCodes, removeFromDataStore); + return super.archiveDatasets(sessionToken, datasetCodes, removeFromDataStore, options); } @Override diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/ServiceForDataStoreServer.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/ServiceForDataStoreServer.java index df268d319792da19f835690bdc9b6d54719c65f0..c3250a9a55dccdcb10b2f1c92f7abcd5faa3b058 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/ServiceForDataStoreServer.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/ServiceForDataStoreServer.java @@ -1221,9 +1221,10 @@ public class ServiceForDataStoreServer extends AbstractCommonServer<IServiceForD @Override @RolesAllowed(RoleWithHierarchy.SPACE_ETL_SERVER) public int archiveDatasets(String sessionToken, - @AuthorizationGuard(guardClass = DataSetCodeCollectionPredicate.class) List<String> datasetCodes, boolean removeFromDataStore) + @AuthorizationGuard(guardClass = DataSetCodeCollectionPredicate.class) List<String> datasetCodes, + boolean removeFromDataStore, Map<String, String> options) { - return super.archiveDatasets(sessionToken, datasetCodes, removeFromDataStore); + return super.archiveDatasets(sessionToken, datasetCodes, removeFromDataStore, options); } @Override diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/business/bo/DataSetTable.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/business/bo/DataSetTable.java index e340cd6d8e157167db31f9ce2b95aa1360e7058c..b79264443ab4498d69a555f7d81f6523e6349255 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/business/bo/DataSetTable.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/business/bo/DataSetTable.java @@ -778,7 +778,7 @@ public final class DataSetTable extends AbstractDataSetBusinessObject implements // @Override - public int archiveDatasets(boolean removeFromDataStore) + public int archiveDatasets(boolean removeFromDataStore, Map<String, String> options) { Map<DataStorePE, List<ExternalDataPE>> datasetsByStore = groupExternalDataByDataStores(); Map<DataStoreWithService, List<ExternalDataPE>> datasetsWithService = @@ -790,7 +790,7 @@ public final class DataSetTable extends AbstractDataSetBusinessObject implements int result = filterByStatusAndUpdate(datasetsByStore, DataSetArchivingStatus.AVAILABLE, pendingStatus); - performArchiving(datasetsWithService, removeFromDataStore); + performArchiving(datasetsWithService, removeFromDataStore, options); return result; } @@ -939,7 +939,7 @@ public final class DataSetTable extends AbstractDataSetBusinessObject implements } private void performArchiving(Map<DataStoreWithService, List<ExternalDataPE>> datasetsByStore, - final boolean removeFromDataStore) + final boolean removeFromDataStore, Map<String, String> options) { performArchivingAction(datasetsByStore, new IArchivingAction() { @@ -948,7 +948,7 @@ public final class DataSetTable extends AbstractDataSetBusinessObject implements List<DatasetDescription> descriptions, String userId, String userEmailOrNull) { service.archiveDatasets(sessionToken, session.getSessionToken(), descriptions, - userId, userEmailOrNull, removeFromDataStore); + userId, userEmailOrNull, removeFromDataStore, options); } @Override diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/business/bo/IDataSetTable.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/business/bo/IDataSetTable.java index afaeb18469ad2030974a55894e8979a5e72f4aa8..052fafdfa4ac6b2d7217335a16da8dd049306e94 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/business/bo/IDataSetTable.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/business/bo/IDataSetTable.java @@ -99,9 +99,10 @@ public interface IDataSetTable * * @param removeFromDataStore when set to <code>true</code> the data sets will be removed from the data store after a successful archiving * operation. + * @param options which might be used by particular archivers. * @return number of data sets scheduled for archiving. */ - int archiveDatasets(boolean removeFromDataStore); + int archiveDatasets(boolean removeFromDataStore, Map<String, String> options); /** * Schedules unarchiving of loaded data sets. Only archived datasets will be unarchived. diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/business/bo/datasetlister/DatasetLister.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/business/bo/datasetlister/DatasetLister.java index f5c058b93165fb09507300c9244a2bb9f73e652a..5ea2edc3d28f467e27df4596844af1d85ed5016f 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/business/bo/datasetlister/DatasetLister.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/business/bo/datasetlister/DatasetLister.java @@ -1170,6 +1170,7 @@ public class DatasetLister extends AbstractLister implements IDatasetLister dataSet.setPostRegistered(record.is_post_registered); dataSet.setH5Folders(record.h5_folders); dataSet.setH5arFolders(record.h5ar_folders); + dataSet.setArchivingRequested(record.archiving_requested); return dataSet; } diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/business/bo/datasetlister/DatasetRecord.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/business/bo/datasetlister/DatasetRecord.java index 7788a3fab957358f9853c105dde6a5f16256ac38..033e8c41f7a8bfca12459eb6b99edf609bbbe896 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/business/bo/datasetlister/DatasetRecord.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/business/bo/datasetlister/DatasetRecord.java @@ -73,4 +73,6 @@ public class DatasetRecord extends CodeRecord public Boolean h5_folders; public Boolean h5ar_folders; + + public Boolean archiving_requested; } diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/business/bo/datasetlister/IDatasetListingQuery.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/business/bo/datasetlister/IDatasetListingQuery.java index 54c425cb8663ac8bcee2bc8f44b6cd6e35d60b89..ba81ab8b84f6b75db2beb0b67e55fcfef55bc93d 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/business/bo/datasetlister/IDatasetListingQuery.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/business/bo/datasetlister/IDatasetListingQuery.java @@ -61,7 +61,8 @@ public interface IDatasetListingQuery extends BaseQuery, IPropertyListingQuery + "external_data.speed_hint, " + "external_data.storage_confirmation, " + "external_data.h5_folders, " - + "external_data.h5ar_folders"; + + "external_data.h5ar_folders, " + + "external_data.archiving_requested"; public final static String SELECT_ALL = "select data.*, " + EXTERNAL_DATA_COLUMNS + ", link_data.id as link_data_id, content_copies.external_code, content_copies.edms_id, " @@ -111,7 +112,8 @@ public interface IDatasetListingQuery extends BaseQuery, IPropertyListingQuery + "ed.speed_hint, " + "ed.storage_confirmation, " + "ed.h5_folders, " - + "ed.h5ar_folders"; + + "ed.h5ar_folders, " + + "ed.archiving_requested"; @Select(sql = "with recursive connected_data as ( " + "select d.*," + ED_COLUMNS + ", ld.id as link_data_id, prdq.id IS NULL as is_post_registered " diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/db/DataDAO.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/db/DataDAO.java index 062f76312d4c278101926fa9b218d8bb2681ef46..93221b00914dbde25df0a443527c45f7b70cc0ea 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/db/DataDAO.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/db/DataDAO.java @@ -32,6 +32,7 @@ import java.util.TreeSet; import org.apache.log4j.Logger; import org.hibernate.FetchMode; import org.hibernate.HibernateException; +import org.hibernate.Query; import org.hibernate.SQLQuery; import org.hibernate.Session; import org.hibernate.StatelessSession; @@ -606,6 +607,7 @@ final class DataDAO extends AbstractGenericEntityWithPropertiesDAO<DataPE> imple }); } + scheduleDynamicPropertiesEvaluationForDataSets(dataSetCodes); hibernateTemplate.flush(); if (updatedRows != dataSetCodes.size()) { @@ -675,63 +677,16 @@ final class DataDAO extends AbstractGenericEntityWithPropertiesDAO<DataPE> imple { final int startIndexFinal = startIndex; final int endIndexFinal = endIndex; - updatedRows += (Integer) hibernateTemplate.execute(new HibernateCallback() - { - - // - // HibernateCallback - // - - @Override - public final Object doInHibernate(final Session session) - throws HibernateException - { - // NOTE: 'VERSIONED' makes modification time modified too - return session - .createQuery( - "UPDATE VERSIONED " - + EXTERNAL_DATA_TABLE_NAME - + " SET status = :status, presentInArchive = :presentInArchive" - + " WHERE code IN (:codes) ") - .setParameter("status", status) - .setParameter("presentInArchive", presentInArchive) - .setParameterList("codes", - dataSetCodes.subList(startIndexFinal, endIndexFinal)) - .executeUpdate(); - } - }); + final List<String> codes = dataSetCodes.subList(startIndexFinal, endIndexFinal); + updatedRows += (Integer) hibernateTemplate.execute(new StatusUpdater(presentInArchive, status, codes)); startIndex = endIndex; endIndex = Math.min(endIndex + MAX_BATCH_SIZE, len); } } else { - updatedRows = (Integer) hibernateTemplate.execute(new HibernateCallback() - { - - // - // HibernateCallback - // - - @Override - public final Object doInHibernate(final Session session) - throws HibernateException - { - // NOTE: 'VERSIONED' makes modification time modified too - return session - .createQuery( - "UPDATE VERSIONED " - + EXTERNAL_DATA_TABLE_NAME - + " SET status = :status, presentInArchive = :presentInArchive" - + " WHERE code IN (:codes) ") - .setParameter("status", status) - .setParameter("presentInArchive", presentInArchive) - .setParameterList("codes", dataSetCodes).executeUpdate(); - } - - }); + updatedRows = (Integer) hibernateTemplate.execute(new StatusUpdater(presentInArchive, status, dataSetCodes)); } - List<DataPE> dataSets = tryToFindFullDataSetsByCodes(dataSetCodes, false, false); - scheduleDynamicPropertiesEvaluation(dataSets); + scheduleDynamicPropertiesEvaluationForDataSets(dataSetCodes); hibernateTemplate.flush(); if (updatedRows != dataSetCodes.size()) { @@ -744,6 +699,12 @@ final class DataDAO extends AbstractGenericEntityWithPropertiesDAO<DataPE> imple } } + private void scheduleDynamicPropertiesEvaluationForDataSets(final List<String> dataSetCodes) + { + List<DataPE> dataSets = tryToFindFullDataSetsByCodes(dataSetCodes, false, false); + scheduleDynamicPropertiesEvaluation(dataSets); + } + @Override public void createDataSet(DataPE dataset, PersonPE modifier) { @@ -840,6 +801,55 @@ final class DataDAO extends AbstractGenericEntityWithPropertiesDAO<DataPE> imple executePermanentDeleteOfDataSets(EntityType.DATASET, dataIds, registrator, reason, sqls); } + private static final class StatusUpdater implements HibernateCallback + { + private final boolean presentInArchive; + + private final DataSetArchivingStatus status; + + private final List<String> codes; + + private StatusUpdater(boolean presentInArchive, DataSetArchivingStatus status, List<String> codes) + { + this.presentInArchive = presentInArchive; + this.status = status; + this.codes = codes; + } + + @Override + public final Object doInHibernate(final Session session) + throws HibernateException + { + + // NOTE: 'VERSIONED' makes modification time modified too + Query query; + if (presentInArchive) + { + query = session + .createQuery( + "UPDATE VERSIONED " + + EXTERNAL_DATA_TABLE_NAME + + " SET status = :status, presentInArchive = :presentInArchive, " + + " archivingRequested = 'f'" + + " WHERE code IN (:codes) "); + } else + { + query = session + .createQuery( + "UPDATE VERSIONED " + + EXTERNAL_DATA_TABLE_NAME + + " SET status = :status, presentInArchive = :presentInArchive" + + " WHERE code IN (:codes) "); + + } + return query + .setParameter("status", status) + .setParameter("presentInArchive", presentInArchive) + .setParameterList("codes", codes) + .executeUpdate(); + } + } + private static class DeletionEventSQLs { public String selectPermIds; diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/db/search/detailed/IndexFieldNameHelper.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/db/search/detailed/IndexFieldNameHelper.java index f5d91c4c5f27993ec5f14f3ac30afa8455835f80..86f0cd1cee116f73744f14691086cd1b8a968a6c 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/db/search/detailed/IndexFieldNameHelper.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/db/search/detailed/IndexFieldNameHelper.java @@ -162,6 +162,8 @@ class IndexFieldNameHelper return SearchFieldConstants.COMPLETE; case STATUS: return SearchFieldConstants.STATUS; + case ARCHIVING_REQUESTED: + return SearchFieldConstants.ARCHIVING_REQUESTED; case PRESENT_IN_ARCHIVE: return SearchFieldConstants.PRESENT_IN_ARCHIVE; case STORAGE_CONFIRMATION: diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/jython/api/v1/impl/MasterDataRegistrationTransaction.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/jython/api/v1/impl/MasterDataRegistrationTransaction.java index 6f6d8d9bf7569cfaa6e95d341c85f93f31bf927e..11d69fc1b311ab64a03aa4e42764932f4b26159f 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/jython/api/v1/impl/MasterDataRegistrationTransaction.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/jython/api/v1/impl/MasterDataRegistrationTransaction.java @@ -505,10 +505,10 @@ public class MasterDataRegistrationTransaction implements IMasterDataRegistratio registerVocabularies(createdVocabularies); addVocabularyTerms(createdVocabularyTerms); updateVocabularyTerms(updatedVocabularyTerms); + registerScripts(createdScripts); registerExperimentTypes(createdExperimentTypes); registerSampleTypes(createdSampleTypes); registerDataSetTypes(createdDataSetTypes); - registerScripts(createdScripts); registerMaterialTypes(createdMaterialTypes); registerPropertyTypes(createdPropertyTypes); registerPropertyAssignments(createdAssignments); diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/task/ArchivingByRequestTask.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/task/ArchivingByRequestTask.java new file mode 100644 index 0000000000000000000000000000000000000000..8a158ef246eade10a7adcc2c2bb318bd3f3b7819 --- /dev/null +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/task/ArchivingByRequestTask.java @@ -0,0 +1,287 @@ +/* + * Copyright 2018 ETH Zuerich, SIS + * + * 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. + */ + +package ch.systemsx.cisd.openbis.generic.server.task; + +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Properties; +import java.util.Set; +import java.util.TreeMap; +import java.util.TreeSet; +import java.util.stream.Collectors; + +import org.apache.commons.io.FileUtils; +import org.apache.commons.lang.StringUtils; + +import ch.ethz.sis.openbis.generic.asapi.v3.dto.dataset.ArchivingStatus; +import ch.ethz.sis.openbis.generic.asapi.v3.dto.dataset.DataSet; +import ch.ethz.sis.openbis.generic.asapi.v3.dto.dataset.archive.DataSetArchiveOptions; +import ch.ethz.sis.openbis.generic.asapi.v3.dto.dataset.fetchoptions.DataSetFetchOptions; +import ch.ethz.sis.openbis.generic.asapi.v3.dto.dataset.id.DataSetPermId; +import ch.ethz.sis.openbis.generic.asapi.v3.dto.dataset.search.DataSetSearchCriteria; +import ch.ethz.sis.openbis.generic.asapi.v3.dto.dataset.search.PhysicalDataSearchCriteria; +import ch.ethz.sis.openbis.generic.server.asapi.v3.IApplicationServerInternalApi; +import ch.systemsx.cisd.common.collection.CollectionUtils; +import ch.systemsx.cisd.common.collection.SimpleComparator; +import ch.systemsx.cisd.common.exceptions.ConfigurationFailureException; +import ch.systemsx.cisd.common.properties.PropertyUtils; +import ch.systemsx.cisd.openbis.generic.server.CommonServiceProvider; + +/** + * @author Franz-Josef Elmer + */ +public class ArchivingByRequestTask extends AbstractMaintenanceTask +{ + public static final String SUB_DIR_KEY = "sub-directory"; + + static final String KEEP_IN_STORE = "keep-in-store"; + + static final String MINIMUM_CONTAINER_SIZE_IN_BYTES = "minimum-container-size-in-bytes"; + + static final long DEFAULT_MINIMUM_CONTAINER_SIZE_IN_BYTES = 10 * FileUtils.ONE_GB; + + static final String MAXIMUM_CONTAINER_SIZE_IN_BYTES = "maximum-container-size-in-bytes"; + + static final long DEFAULT_MAXIMUM_CONTAINER_SIZE_IN_BYTES = 80 * FileUtils.ONE_GB; + + private long minimumContainerSize; + + private long maximumContainerSize; + + private boolean keepInStore; + + public ArchivingByRequestTask() + { + super(false); + } + + @Override + protected void setUpSpecific(Properties properties) + { + keepInStore = PropertyUtils.getBoolean(properties, KEEP_IN_STORE, false); + minimumContainerSize = PropertyUtils.getLong(properties, MINIMUM_CONTAINER_SIZE_IN_BYTES, DEFAULT_MINIMUM_CONTAINER_SIZE_IN_BYTES); + maximumContainerSize = PropertyUtils.getLong(properties, MAXIMUM_CONTAINER_SIZE_IN_BYTES, DEFAULT_MAXIMUM_CONTAINER_SIZE_IN_BYTES); + if (maximumContainerSize <= minimumContainerSize) + { + throw new ConfigurationFailureException(MINIMUM_CONTAINER_SIZE_IN_BYTES + "=" + minimumContainerSize + + " has to be less than " + MAXIMUM_CONTAINER_SIZE_IN_BYTES + "=" + maximumContainerSize); + } + if (minimumContainerSize < 0) + { + throw new ConfigurationFailureException(MINIMUM_CONTAINER_SIZE_IN_BYTES + "=" + minimumContainerSize + + " has to be greater or equal zero."); + } + } + + @Override + public void execute() + { + IApplicationServerInternalApi service = getService(); + String sessionToken = service.loginAsSystem(); + List<DataSet> dataSets = getDataSetsToBeArchived(service, sessionToken); + operationLog.info(dataSets.size() + " data sets to be archived."); + Map<String, List<DataSet>> dataSetsByGroups = getDataSetsByGroups(getGroups(), dataSets); + for (Entry<String, List<DataSet>> entry : dataSetsByGroups.entrySet()) + { + String groupKey = entry.getKey(); + List<DataSetHolder> items = entry.getValue().stream().map(DataSetHolder::new).collect(Collectors.toList()); + operationLog.info("Archive " + items.size() + " data sets" + + (StringUtils.isNotBlank(groupKey) ? (" for group " + groupKey) : "") + "."); + List<List<DataSetHolder>> chunks = getChunks(items, minimumContainerSize, maximumContainerSize); + for (List<DataSetHolder> chunk : chunks) + { + if (chunk.size() == 1 && chunk.get(0).getDataSet().getPhysicalData().getSize() > maximumContainerSize) + { + operationLog.warn("Data set " + chunk.get(0).getDataSet().getPermId() + " is larger than the " + + MAXIMUM_CONTAINER_SIZE_IN_BYTES + ": " + + chunk.get(0).getDataSet().getPhysicalData().getSize() + " > " + maximumContainerSize); + } + List<DataSetPermId> ids = chunk.stream().map(i -> i.getDataSet().getPermId()).collect(Collectors.toList()); + if (ids.isEmpty() == false) + { + DataSetArchiveOptions archiveOptions = new DataSetArchiveOptions(); + archiveOptions.setRemoveFromDataStore(keepInStore == false); + if (StringUtils.isNotBlank(groupKey)) + { + archiveOptions.withOption(SUB_DIR_KEY, groupKey.toLowerCase()); + } + service.archiveDataSets(sessionToken, ids, archiveOptions); + } + } + } + } + + static <T extends SizeHolder> List<List<T>> getChunks(List<T> items, long minChunkSize, long maxChunkSize) + { + Collections.sort(items, new SimpleComparator<T, Long>() + { + @Override + public Long evaluate(T item) + { + return -item.getSize(); + } + }); + List<List<T>> chunks = new ArrayList<>(); + List<T> currentChunk = new ArrayList<>(); + long currentChunkSize = 0; + for (T item : items) + { + long size = item.getSize(); + if (size >= maxChunkSize) + { + chunks.add(Arrays.asList(item)); + continue; + } + if (currentChunkSize >= minChunkSize) + { + if (currentChunkSize + size > maxChunkSize) + { + chunks.add(currentChunk); + currentChunk = new ArrayList<>(); + currentChunkSize = 0; + } + currentChunk.add(item); + currentChunkSize += size; + } else + { + if (currentChunkSize + size < maxChunkSize) + { + currentChunk.add(item); + currentChunkSize += size; + } + } + } + if (currentChunkSize >= minChunkSize) + { + chunks.add(currentChunk); + } + return chunks; + } + + private List<DataSet> getDataSetsToBeArchived(IApplicationServerInternalApi service, String sessionToken) + { + DataSetSearchCriteria searchCriteria = new DataSetSearchCriteria(); + PhysicalDataSearchCriteria physicalSearchCriteria = searchCriteria.withPhysicalData(); + physicalSearchCriteria.withPresentInArchive().thatEquals(false); + physicalSearchCriteria.withArchivingRequested().thatEquals(true); + physicalSearchCriteria.withStatus().thatEquals(ArchivingStatus.AVAILABLE); + DataSetFetchOptions fetchOptions = new DataSetFetchOptions(); + fetchOptions.withDataStore(); + fetchOptions.withPhysicalData(); + fetchOptions.withExperiment().withProject().withSpace(); + fetchOptions.withSample().withProject().withSpace(); + fetchOptions.withSample().withSpace(); + List<DataSet> dataSets = service.searchDataSets(sessionToken, searchCriteria, fetchOptions).getObjects(); + List<DataSet> result = new ArrayList<DataSet>(); + List<String> dataSetsWithUnknownSize = new ArrayList<String>(); + for (DataSet dataSet : dataSets) + { + Long size = dataSet.getPhysicalData().getSize(); + if (size == null) + { + dataSetsWithUnknownSize.add(dataSet.getCode()); + } else + { + result.add(dataSet); + } + } + if (dataSetsWithUnknownSize.isEmpty() == false) + { + operationLog.warn("The size of the following data sets is unknown: " + CollectionUtils.abbreviate(dataSetsWithUnknownSize, 100)); + } + return result; + } + + private Set<String> getGroups() + { + Set<String> groupKeys = new TreeSet<>(); + UserManagerConfig groupDefinitions = readGroupDefinitions(null); + if (groupDefinitions != null) + { + List<UserGroup> groups = groupDefinitions.getGroups(); + for (UserGroup group : groups) + { + groupKeys.add(group.getKey()); + } + } + return groupKeys; + } + + private Map<String, List<DataSet>> getDataSetsByGroups(Set<String> groupKeys, List<DataSet> dataSets) + { + Map<String, List<DataSet>> dataSetsByGroups = new TreeMap<>(); + for (DataSet dataSet : dataSets) + { + String spaceCode = dataSet.getExperiment().getProject().getSpace().getCode(); + String[] prefixAndCode = StringUtils.split(spaceCode, "_", 2); + String groupKey = ""; + if (prefixAndCode.length == 2) + { + String prefix = prefixAndCode[0]; + if (groupKeys.contains(prefix)) + { + groupKey = prefix; + } + } + List<DataSet> list = dataSetsByGroups.get(groupKey); + if (list == null) + { + list = new ArrayList<>(); + dataSetsByGroups.put(groupKey, list); + } + list.add(dataSet); + } + return dataSetsByGroups; + } + + protected IApplicationServerInternalApi getService() + { + return CommonServiceProvider.getApplicationServerApi(); + } + + static interface SizeHolder + { + long getSize(); + } + + private static class DataSetHolder implements SizeHolder + { + private final DataSet dataSet; + + public DataSetHolder(DataSet dataSet) + { + this.dataSet = dataSet; + } + + @Override + public long getSize() + { + return dataSet.getPhysicalData().getSize(); + } + + public DataSet getDataSet() + { + return dataSet; + } + + } + +} diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/AbstractServerLogger.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/AbstractServerLogger.java index 730a8a3dabc4588e83f5042e921793b0509caec5..7011f68bfa0c3a6fe072c892dfc53c75c50e995f 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/AbstractServerLogger.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/AbstractServerLogger.java @@ -439,7 +439,7 @@ public abstract class AbstractServerLogger implements IServer } public int archiveDatasets(String sessionToken, List<String> datasetCodes, - boolean removeFromDataStore) + boolean removeFromDataStore, Map<String, String> options) { logTracking(sessionToken, "archiveDatasets", "DATASETS(%s), REMOVE_FROM_DATA_STORE(%s)", abbreviate(datasetCodes), removeFromDataStore); diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/ICommonServer.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/ICommonServer.java index d584d3e2f939e4c36b21d7fd905cd5225f9d0a73..1ab69a7c32daec2930f0e58746d277a14327688e 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/ICommonServer.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/ICommonServer.java @@ -1191,7 +1191,7 @@ public interface ICommonServer extends IServer @Transactional @DatabaseUpdateModification(value = ObjectKind.DATA_SET) public int archiveDatasets(String sessionToken, List<String> datasetCodes, - boolean removeFromDataStore); + boolean removeFromDataStore, Map<String, String> options); /** * Schedules unarchiving of specified data sets. diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/IDataStoreService.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/IDataStoreService.java index 0f8aa36a02439c2cb53c3db4794d89a1512f50f1..c0acd5e62b1628db78f06ad7439c984d13732ab6 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/IDataStoreService.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/IDataStoreService.java @@ -112,10 +112,11 @@ public interface IDataStoreService * doesn't have email and no message will be send in such case. * @param removeFromDataStore when set to <code>true</code> the data sets will be removed from the data store after a successful archiving * operation. + * @param options which might be used by particular archivers */ public void archiveDatasets(String sessionToken, String userSessionToken, List<DatasetDescription> datasets, String userId, String userEmailOrNull, - boolean removeFromDataStore); + boolean removeFromDataStore, Map<String, String> options); /** * Schedules unarchiving of provided datasets. diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/IServiceForDataStoreServer.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/IServiceForDataStoreServer.java index d8e84bf4ff29fcf7e2fc0a26281c717dddc6332b..112f362b72864742aac4e11f50221621ee21d4a7 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/IServiceForDataStoreServer.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/IServiceForDataStoreServer.java @@ -566,7 +566,7 @@ public interface IServiceForDataStoreServer extends IServer, ISessionProvider @Transactional @DatabaseUpdateModification(value = ObjectKind.DATA_SET) public int archiveDatasets(String sessionToken, List<String> datasetCodes, - boolean removeFromDataStore); + boolean removeFromDataStore, Map<String, String> options); /** * Schedules unarchiving of specified data sets. diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/basic/dto/DataSetAttributeSearchFieldKind.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/basic/dto/DataSetAttributeSearchFieldKind.java index 94cd056c30ba233db5a02ea8e2265fd27dec955c..cfc50f83c1b4d72a6f8a01df6e1e5ffbb725474f 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/basic/dto/DataSetAttributeSearchFieldKind.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/basic/dto/DataSetAttributeSearchFieldKind.java @@ -90,8 +90,10 @@ public enum DataSetAttributeSearchFieldKind implements Serializable, IAttributeS STATUS("Status"), - PRESENT_IN_ARCHIVE("Present in archive"), + ARCHIVING_REQUESTED("Archiving requested"), + PRESENT_IN_ARCHIVE("Present in archive"), + STORAGE_CONFIRMATION("Storage confirmed", new SearchFieldAvailableForAdmins(), new SearchFieldBooleanCriterionFactory()), diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/basic/dto/PhysicalDataSet.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/basic/dto/PhysicalDataSet.java index 723a2419a8457063c5f8aa791110766f945c8ca9..896c07aad123b0c82577f56b33ccbf0305eb7b56 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/basic/dto/PhysicalDataSet.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/basic/dto/PhysicalDataSet.java @@ -45,6 +45,8 @@ public class PhysicalDataSet extends AbstractExternalData implements IDatasetLoc private boolean h5arFolders; + private boolean archivingRequested; + public PhysicalDataSet() { this(false); @@ -201,4 +203,14 @@ public class PhysicalDataSet extends AbstractExternalData implements IDatasetLoc this.h5arFolders = h5arFolders; } + public boolean isArchivingRequested() + { + return archivingRequested; + } + + public void setArchivingRequested(boolean archivingRequested) + { + this.archivingRequested = archivingRequested; + } + } diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/dto/ColumnNames.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/dto/ColumnNames.java index 707dc184f40934e74da0ad58f25a931ea5459a72..4bd35966ab051d506b0a3841a85ff7f1aa902a1c 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/dto/ColumnNames.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/dto/ColumnNames.java @@ -402,6 +402,8 @@ public final class ColumnNames public static final String DESCRIPTOR_ACCESSION_ID = "descriptor_accession_id"; + public static final String ARCHIVING_REQUESTED = "archiving_requested"; + private ColumnNames() { // Can not be instantiated. diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/dto/DatasetDescription.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/dto/DatasetDescription.java index 5a445dad25972e8f43dae2154039bc26d2feefd5..c132a17ad2fb21a1dac1f5afab75a1fe7cc5a629 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/dto/DatasetDescription.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/dto/DatasetDescription.java @@ -82,6 +82,8 @@ public class DatasetDescription implements Serializable, IDatasetLocation private boolean storageConfirmed; + private boolean archivingRequested; + public static List<String> extractCodes(List<DatasetDescription> dataSets) { List<String> result = new ArrayList<String>(); @@ -355,4 +357,14 @@ public class DatasetDescription implements Serializable, IDatasetLocation this.storageConfirmed = storageConfirmed; } + public boolean isArchivingRequested() + { + return archivingRequested; + } + + public void setArchivingRequested(boolean archivingRequested) + { + this.archivingRequested = archivingRequested; + } + } diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/dto/DeletedSamplePE.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/dto/DeletedSamplePE.java index 49f71af49b909aa72997b9d785713944ff662157..cf4c271e2d311a9c11a8ffcbec987a59d746360f 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/dto/DeletedSamplePE.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/dto/DeletedSamplePE.java @@ -42,7 +42,6 @@ import org.apache.commons.lang.builder.ToStringBuilder; import org.hibernate.annotations.Fetch; import org.hibernate.annotations.FetchMode; import org.hibernate.search.annotations.DocumentId; -import org.hibernate.search.annotations.FieldBridge; import org.hibernate.validator.constraints.Length; import ch.systemsx.cisd.common.reflection.ModifiedShortPrefixToStringStyle; @@ -78,6 +77,8 @@ public class DeletedSamplePE extends AbstractDeletedEntityPE private SpacePE space; + private ProjectPE project; + private Set<DeletedSampleRelationshipPE> parentRelationships; @Override @@ -163,6 +164,18 @@ public class DeletedSamplePE extends AbstractDeletedEntityPE this.space = space; } + @ManyToOne(fetch = FetchType.EAGER) + @JoinColumn(name = ColumnNames.PROJECT_COLUMN, updatable = false) + public ProjectPE getProject() + { + return project; + } + + public void setProject(final ProjectPE project) + { + this.project = project; + } + @Override @Transient public EntityTypePE getEntityType() diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/dto/ExternalDataPE.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/dto/ExternalDataPE.java index 956bed4801d9f14592eb8fccb21d586e5ac2260f..88f429f7946cb62cd565ae89a1023a1517080d2b 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/dto/ExternalDataPE.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/dto/ExternalDataPE.java @@ -96,6 +96,8 @@ public final class ExternalDataPE extends DataPE private int speedHint = Constants.DEFAULT_SPEED_HINT; + private boolean archivingRequested; + /** * Returns the id of the locator type of the location of this external data, or <code>null</code> if not yet set. */ @@ -290,6 +292,18 @@ public final class ExternalDataPE extends DataPE this.h5arFolders = h5arFolders; } + @Column(name = ColumnNames.ARCHIVING_REQUESTED) + @Field(name = SearchFieldConstants.ARCHIVING_REQUESTED, index = Index.YES, store = Store.YES) + public boolean isArchivingRequested() + { + return archivingRequested; + } + + public void setArchivingRequested(boolean archivingRequested) + { + this.archivingRequested = archivingRequested; + } + /** * return true if the data set if available in the data store. */ diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/dto/hibernate/SearchFieldConstants.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/dto/hibernate/SearchFieldConstants.java index ec86c8dac0d46aee5736068c7de5f405514ff669..0eedf2d46b8bd392b4953305f1b0ae63aa6509c1 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/dto/hibernate/SearchFieldConstants.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/dto/hibernate/SearchFieldConstants.java @@ -113,6 +113,8 @@ public final class SearchFieldConstants public static final String PRESENT_IN_ARCHIVE = "present_in_archive"; + public static final String ARCHIVING_REQUESTED = "archiving_requested"; + public static final String SPEED_HINT = "speed_hint"; public static final String EXTERNAL_CODE = "external_code"; diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/dto/identifier/IdentifierHelper.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/dto/identifier/IdentifierHelper.java index a22ff56a0f7ffcc4aa881acfd0ca452997a53c48..8bf44d14b70c88df46bb6209ec587b57499d9631 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/dto/identifier/IdentifierHelper.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/dto/identifier/IdentifierHelper.java @@ -103,9 +103,10 @@ public final class IdentifierHelper final DeletedSamplePE deletedSamplePE) { assert deletedSamplePE != null : "Unspecified sample"; + ProjectPE project = deletedSamplePE.getProject(); final SpacePE space = deletedSamplePE.getSpace(); final String sampleCode = deletedSamplePE.getCode(); - return createSampleIdentifier(null, space, sampleCode); + return createSampleIdentifier(project, space, sampleCode); } public final static SampleIdentifier createSampleIdentifier(SpaceIdentifier spaceIdentifier, String sampleCode, String sampleContainerCode) diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/translator/DataSetTranslator.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/translator/DataSetTranslator.java index 36e97b4b1834160f8e207ad19529d21d97599c47..03a8bfbdaa1d0d006be18d500cb672aaafe990aa 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/translator/DataSetTranslator.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/translator/DataSetTranslator.java @@ -100,6 +100,7 @@ public class DataSetTranslator description.setFileFormatType(dataSet.getFileFormatType().getCode()); description.setH5Folders(dataSet.isH5Folders()); description.setH5arFolders(dataSet.isH5arFolders()); + description.setArchivingRequested(dataSet.isArchivingRequested()); } description.setDataSetSize(data.getSize()); DataSetType dataSetType = data.getDataSetType(); @@ -392,6 +393,7 @@ public class DataSetTranslator dataSet.setLocatorType(TypeTranslator.translate(externalDataPE.getLocatorType())); dataSet.setH5Folders(externalDataPE.isH5Folders()); dataSet.setH5arFolders(externalDataPE.isH5arFolders()); + dataSet.setArchivingRequested(externalDataPE.isArchivingRequested()); return dataSet; } diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/public/resources/api/v3/as/dto/common/get/GetServerInformationOperation.js b/openbis/source/java/ch/systemsx/cisd/openbis/public/resources/api/v3/as/dto/common/get/GetServerInformationOperation.js new file mode 100644 index 0000000000000000000000000000000000000000..c15da6b7dc71585b75dc7212d0dd73c81bd2e501 --- /dev/null +++ b/openbis/source/java/ch/systemsx/cisd/openbis/public/resources/api/v3/as/dto/common/get/GetServerInformationOperation.js @@ -0,0 +1,12 @@ +define([ "stjs", "as/dto/common/operation/IOperation" ], function(stjs, IOperation) { + var GetServerInformationOperation = function() { + }; + stjs.extend(GetServerInformationOperation, null, [ IOperation ], function(constructor, prototype) { + prototype['@type'] = 'as.dto.common.get.GetServerInformationOperation'; + prototype.getMessage = function() { + return "GetServerInformationOperation"; + }; + }, { + }); + return GetServerInformationOperation; +}) diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/public/resources/api/v3/as/dto/common/get/GetServerInformationOperationResult.js b/openbis/source/java/ch/systemsx/cisd/openbis/public/resources/api/v3/as/dto/common/get/GetServerInformationOperationResult.js new file mode 100644 index 0000000000000000000000000000000000000000..8ec7211ce66de9c54ede084b3b5b9d167eec2065 --- /dev/null +++ b/openbis/source/java/ch/systemsx/cisd/openbis/public/resources/api/v3/as/dto/common/get/GetServerInformationOperationResult.js @@ -0,0 +1,22 @@ +define([ "stjs", "as/dto/common/operation/IOperationResult" ], function(stjs, IOperationResult) { + var GetServerInformationOperationResult = function(serverInformation) { + this.serverInformation = serverInformation; + }; + stjs.extend(GetServerInformationOperationResult, null, [ IOperationResult ], function(constructor, prototype) { + prototype['@type'] = 'as.dto.common.get.GetServerInformationOperationResult'; + prototype.serverInformation = null; + + prototype.getServerInformation = function() { + return this.serverInformation; + }; + prototype.getMessage = function() { + return "GetServerInformationOperationResult"; + }; + }, { + serverInformation : { + name : "Map", + arguments : [ "String", "String" ] + } + }); + return GetServerInformationOperationResult; +}) \ No newline at end of file diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/public/resources/api/v3/as/dto/dataset/PhysicalData.js b/openbis/source/java/ch/systemsx/cisd/openbis/public/resources/api/v3/as/dto/dataset/PhysicalData.js index b19b50db1f530b0efa7d3d445dd683d0c80694d3..362cb487d1877e671c4803fc90acfa8d4d4d0d29 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/public/resources/api/v3/as/dto/dataset/PhysicalData.js +++ b/openbis/source/java/ch/systemsx/cisd/openbis/public/resources/api/v3/as/dto/dataset/PhysicalData.js @@ -23,6 +23,7 @@ define([ "stjs", "util/Exceptions" ], function(stjs, exceptions) { prototype.presentInArchive = null; prototype.storageConfirmation = null; prototype.speedHint = null; + prototype.archivingRequested = null; prototype.getFetchOptions = function() { return this.fetchOptions; @@ -114,6 +115,12 @@ define([ "stjs", "util/Exceptions" ], function(stjs, exceptions) { prototype.setSpeedHint = function(speedHint) { this.speedHint = speedHint; }; + prototype.isArchivingRequested = function() { + return this.archivingRequested; + }; + prototype.setArchivingRequested = function(archivingRequested) { + this.archivingRequested = archivingRequested; + }; }, { fetchOptions : "PhysicalDataFetchOptions", storageFormat : "StorageFormat", diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/public/resources/api/v3/as/dto/dataset/archive/DataSetArchiveOptions.js b/openbis/source/java/ch/systemsx/cisd/openbis/public/resources/api/v3/as/dto/dataset/archive/DataSetArchiveOptions.js index 70bf1f9c12f4d78d3f9f11134e5a3d7caa484bfe..b084fbc161d7d37a756d6dbbdf07d65c15bd9ce7 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/public/resources/api/v3/as/dto/dataset/archive/DataSetArchiveOptions.js +++ b/openbis/source/java/ch/systemsx/cisd/openbis/public/resources/api/v3/as/dto/dataset/archive/DataSetArchiveOptions.js @@ -4,17 +4,30 @@ define([ "stjs" ], function(stjs) { var DataSetArchiveOptions = function() { this.removeFromDataStore = true; + this.options = {}; }; stjs.extend(DataSetArchiveOptions, null, [], function(constructor, prototype) { prototype['@type'] = 'as.dto.dataset.archive.DataSetArchiveOptions'; constructor.serialVersionUID = 1; prototype.removeFromDataStore = null; + prototype.options = null; prototype.isRemoveFromDataStore = function() { return this.removeFromDataStore; }; prototype.setRemoveFromDataStore = function(removeFromDataStore) { this.removeFromDataStore = removeFromDataStore; }; - }, {}); + prototype.withOption = function(option, value) { + this.options[option] = value; + } + prototype.getOptions = function() { + return this.options; + } + }, { + options : { + name : "Map", + arguments : [ null, null] + } + }); return DataSetArchiveOptions; }) \ No newline at end of file diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/public/resources/api/v3/as/dto/dataset/search/ArchivingRequestedSearchCriteria.js b/openbis/source/java/ch/systemsx/cisd/openbis/public/resources/api/v3/as/dto/dataset/search/ArchivingRequestedSearchCriteria.js new file mode 100644 index 0000000000000000000000000000000000000000..4cce650a58455de8353501195534ed18f7312c62 --- /dev/null +++ b/openbis/source/java/ch/systemsx/cisd/openbis/public/resources/api/v3/as/dto/dataset/search/ArchivingRequestedSearchCriteria.js @@ -0,0 +1,18 @@ +/** + * @author pkupczyk + */ +define([ "stjs", "as/dto/common/search/BooleanFieldSearchCriteria", "as/dto/common/search/SearchFieldType" ], function(stjs, BooleanFieldSearchCriteria, SearchFieldType) { + var ArchivingRequestedSearchCriteria = function() { + BooleanFieldSearchCriteria.call(this, "archivingRequested", SearchFieldType.ATTRIBUTE); + }; + stjs.extend(ArchivingRequestedSearchCriteria, BooleanFieldSearchCriteria, [ BooleanFieldSearchCriteria ], function(constructor, prototype) { + prototype['@type'] = 'as.dto.dataset.search.ArchivingRequestedSearchCriteria'; + constructor.serialVersionUID = 1; + }, { + fieldType : { + name : "Enum", + arguments : [ "SearchFieldType" ] + } + }); + return ArchivingRequestedSearchCriteria; +}) \ No newline at end of file diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/public/resources/api/v3/as/dto/dataset/search/PhysicalDataSearchCriteria.js b/openbis/source/java/ch/systemsx/cisd/openbis/public/resources/api/v3/as/dto/dataset/search/PhysicalDataSearchCriteria.js index eb4fb2c33683bb633d426ce6e9b991a9043d36c4..367692a4bfe2ec6ab83e15feed18dfccffd53a5f 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/public/resources/api/v3/as/dto/dataset/search/PhysicalDataSearchCriteria.js +++ b/openbis/source/java/ch/systemsx/cisd/openbis/public/resources/api/v3/as/dto/dataset/search/PhysicalDataSearchCriteria.js @@ -4,7 +4,7 @@ define([ "require", "stjs", "as/dto/common/search/AbstractCompositeSearchCriteria", "as/dto/dataset/search/ShareIdSearchCriteria", "as/dto/dataset/search/LocationSearchCriteria", "as/dto/dataset/search/SizeSearchCriteria", "as/dto/dataset/search/StorageFormatSearchCriteria", "as/dto/dataset/search/FileFormatTypeSearchCriteria", "as/dto/dataset/search/LocatorTypeSearchCriteria", "as/dto/dataset/search/CompleteSearchCriteria", "as/dto/dataset/search/StatusSearchCriteria", - "as/dto/dataset/search/PresentInArchiveSearchCriteria", "as/dto/dataset/search/StorageConfirmationSearchCriteria", "as/dto/dataset/search/SpeedHintSearchCriteria" ], function(require, stjs, + "as/dto/dataset/search/ArchivingRequestedSearchCriteria", "as/dto/dataset/search/PresentInArchiveSearchCriteria", "as/dto/dataset/search/StorageConfirmationSearchCriteria", "as/dto/dataset/search/SpeedHintSearchCriteria" ], function(require, stjs, AbstractCompositeSearchCriteria) { var PhysicalDataSearchCriteria = function() { AbstractCompositeSearchCriteria.call(this); @@ -47,6 +47,10 @@ define([ "require", "stjs", "as/dto/common/search/AbstractCompositeSearchCriteri var StatusSearchCriteria = require("as/dto/dataset/search/StatusSearchCriteria"); return this.addCriteria(new StatusSearchCriteria()); }; + prototype.withArchivingRequested = function() { + var ArchivingRequestedSearchCriteria = require("as/dto/dataset/search/ArchivingRequestedSearchCriteria"); + return this.addCriteria(new ArchivingRequestedSearchCriteria()); + }; prototype.withPresentInArchive = function() { var PresentInArchiveSearchCriteria = require("as/dto/dataset/search/PresentInArchiveSearchCriteria"); return this.addCriteria(new PresentInArchiveSearchCriteria()); diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/public/resources/api/v3/as/dto/dataset/update/PhysicalDataUpdate.js b/openbis/source/java/ch/systemsx/cisd/openbis/public/resources/api/v3/as/dto/dataset/update/PhysicalDataUpdate.js index ea6756522028d1682ab18f7db31d22406f69e8da..32ee3bc2486ed66151876398b5ef30a5e02d22d6 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/public/resources/api/v3/as/dto/dataset/update/PhysicalDataUpdate.js +++ b/openbis/source/java/ch/systemsx/cisd/openbis/public/resources/api/v3/as/dto/dataset/update/PhysicalDataUpdate.js @@ -4,6 +4,7 @@ define([ "stjs", "as/dto/common/update/FieldUpdateValue" ], function(stjs, FieldUpdateValue) { var PhysicalDataUpdate = function() { this.fileFormatTypeId = new FieldUpdateValue(); + this.archivingRequested = new FieldUpdateValue(); }; stjs.extend(PhysicalDataUpdate, null, [], function(constructor, prototype) { prototype['@type'] = 'as.dto.dataset.update.PhysicalDataUpdate'; @@ -13,6 +14,7 @@ define([ "stjs", "as/dto/common/update/FieldUpdateValue" ], function(stjs, Field * @Deprecated */ prototype.fileFormatTypeId = null; + prototype.archivingRequested = null; /* * @Deprecated @@ -26,10 +28,20 @@ define([ "stjs", "as/dto/common/update/FieldUpdateValue" ], function(stjs, Field prototype.setFileFormatTypeId = function(fileFormatTypeId) { this.fileFormatTypeId.setValue(fileFormatTypeId); }; + prototype.isArchivingRequested = function() { + return this.archivingRequested; + }; + prototype.setArchivingRequested = function(archivingRequested) { + this.archivingRequested.setValue(archivingRequested); + }; }, { fileFormatTypeId : { name : "FieldUpdateValue", arguments : [ "IFileFormatTypeId" ] + }, + archivingRequested : { + name : "FieldUpdateValue", + arguments : [ null ] } }); return PhysicalDataUpdate; diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/public/resources/api/v3/as/dto/entity/create/CreatePermIdsOperation.js b/openbis/source/java/ch/systemsx/cisd/openbis/public/resources/api/v3/as/dto/entity/create/CreatePermIdsOperation.js new file mode 100644 index 0000000000000000000000000000000000000000..d401d99251120b6312ee191e67e5601ec69d6320 --- /dev/null +++ b/openbis/source/java/ch/systemsx/cisd/openbis/public/resources/api/v3/as/dto/entity/create/CreatePermIdsOperation.js @@ -0,0 +1,21 @@ +/** + * @author pkupczyk + */ +define([ "stjs", "as/dto/common/operation/IOperation" ], function(stjs, IOperation) { + var CreatePermIdsOperation = function(count) { + this.count = count; + }; + stjs.extend(CreatePermIdsOperation, null, [ IOperation ], function(constructor, prototype) { + prototype['@type'] = 'as.dto.entity.create.CreatePermIdsOperation'; + prototype.count = null; + + prototype.getCount = function() { + return this.count; + }; + prototype.getMessage = function() { + return "CreatePermIdsOperation"; + }; + }, { + }); + return CreatePermIdsOperation; +}) diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/public/resources/api/v3/as/dto/entity/create/CreatePermIdsOperationResult.js b/openbis/source/java/ch/systemsx/cisd/openbis/public/resources/api/v3/as/dto/entity/create/CreatePermIdsOperationResult.js new file mode 100644 index 0000000000000000000000000000000000000000..a9b362cfb24aca97756db5c6c0863ab90b64e55e --- /dev/null +++ b/openbis/source/java/ch/systemsx/cisd/openbis/public/resources/api/v3/as/dto/entity/create/CreatePermIdsOperationResult.js @@ -0,0 +1,22 @@ +define([ "stjs", "as/dto/common/operation/IOperationResult" ], function(stjs, IOperationResult) { + var CreatePermIdsOperationResult = function(permIds) { + this.permIds = permIds; + }; + stjs.extend(CreatePermIdsOperationResult, null, [ IOperationResult ], function(constructor, prototype) { + prototype['@type'] = 'as.dto.entity.create.CreatePermIdsOperationResult'; + prototype.permIds = null; + + prototype.getPermIds = function() { + return this.permIds; + }; + prototype.getMessage = function() { + return "CreatePermIdsOperationResult"; + }; + }, { + permIds : { + name : "List", + arguments : [ "String" ] + } + }); + return CreatePermIdsOperationResult; +}) diff --git a/openbis/sourceTest/java/ch/ethz/sis/openbis/systemtest/asapi/v3/GetServerInformationTest.java b/openbis/sourceTest/java/ch/ethz/sis/openbis/systemtest/asapi/v3/GetServerInformationTest.java new file mode 100644 index 0000000000000000000000000000000000000000..92fae4874947313ad71178e9ad30bb4548b71999 --- /dev/null +++ b/openbis/sourceTest/java/ch/ethz/sis/openbis/systemtest/asapi/v3/GetServerInformationTest.java @@ -0,0 +1,46 @@ +/* + * Copyright 2018 ETH Zuerich, SIS + * + * 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. + */ + +package ch.ethz.sis.openbis.systemtest.asapi.v3; + +import static org.testng.Assert.assertEquals; + +import java.util.Map; +import java.util.TreeMap; + +import org.testng.annotations.Test; + +/** + * @author Franz-Josef Elmer + */ +public class GetServerInformationTest extends AbstractTest +{ + @Test + public void testGetServerInformation() + { + // Given + String sessionToken = v3api.login(TEST_USER, PASSWORD); + + // When + Map<String, String> result = v3api.getServerInformation(sessionToken); + + // Then + assertEquals(new TreeMap<>(result).toString(), "{api-version=3.5, archiving-configured=false, " + + "authentication-service=dummy-authentication-service, enabled-technologies=test-.*, " + + "project-samples-enabled=false}"); + v3api.logout(sessionToken); + } +} diff --git a/openbis/sourceTest/java/ch/ethz/sis/openbis/systemtest/asapi/v3/SearchDataSetTest.java b/openbis/sourceTest/java/ch/ethz/sis/openbis/systemtest/asapi/v3/SearchDataSetTest.java index 86b77af62cf2f5731df087254cde1348f03321f6..d1e3dc9d45bdf18303039235d759e13a4b8b6c11 100644 --- a/openbis/sourceTest/java/ch/ethz/sis/openbis/systemtest/asapi/v3/SearchDataSetTest.java +++ b/openbis/sourceTest/java/ch/ethz/sis/openbis/systemtest/asapi/v3/SearchDataSetTest.java @@ -500,6 +500,18 @@ public class SearchDataSetTest extends AbstractDataSetTest testSearch(TEST_USER, criteria); } + @Test + public void testSearchWithPhysicalDataWithArchivingRequestedThatEquals() + { + DataSetSearchCriteria criteria = new DataSetSearchCriteria(); + criteria.withPhysicalData().withArchivingRequested().thatEquals(true); + testSearch(TEST_USER, criteria, "20081105092159188-3"); + + criteria = new DataSetSearchCriteria(); + criteria.withPhysicalData().withArchivingRequested().thatEquals(false); + testSearch(TEST_USER, criteria, 24); + } + @Test public void testSearchWithPhysicalDataWithStorageConfirmationThatEquals() { diff --git a/openbis/sourceTest/java/ch/ethz/sis/openbis/systemtest/asapi/v3/UpdateDataSetTest.java b/openbis/sourceTest/java/ch/ethz/sis/openbis/systemtest/asapi/v3/UpdateDataSetTest.java index 28f0933119584c5cad3cfa3fb262d314c0575784..8026515372d4ace2ee343c23e2469941fa84f9a0 100644 --- a/openbis/sourceTest/java/ch/ethz/sis/openbis/systemtest/asapi/v3/UpdateDataSetTest.java +++ b/openbis/sourceTest/java/ch/ethz/sis/openbis/systemtest/asapi/v3/UpdateDataSetTest.java @@ -28,6 +28,7 @@ import java.util.Map; import org.testng.annotations.Test; import ch.ethz.sis.openbis.generic.asapi.v3.dto.dataset.DataSet; +import ch.ethz.sis.openbis.generic.asapi.v3.dto.dataset.PhysicalData; import ch.ethz.sis.openbis.generic.asapi.v3.dto.dataset.fetchoptions.DataSetFetchOptions; import ch.ethz.sis.openbis.generic.asapi.v3.dto.dataset.id.DataSetPermId; import ch.ethz.sis.openbis.generic.asapi.v3.dto.dataset.id.FileFormatTypePermId; @@ -394,6 +395,7 @@ public class UpdateDataSetTest extends AbstractSampleTest update.setDataSetId(dataSetId); PhysicalDataUpdate pdupt = new PhysicalDataUpdate(); pdupt.setFileFormatTypeId(new FileFormatTypePermId("PLKPROPRIETARY")); + pdupt.setArchivingRequested(true); update.setPhysicalData(pdupt); v3api.updateDataSets(sessionToken, Collections.singletonList(update)); @@ -403,7 +405,9 @@ public class UpdateDataSetTest extends AbstractSampleTest fe.withPhysicalData().withFileFormatType(); DataSet result = v3api.getDataSets(sessionToken, Collections.singletonList(dataSetId), fe).get(dataSetId); - assertEquals(result.getPhysicalData().getFileFormatType().getCode(), "PLKPROPRIETARY"); + PhysicalData physicalData = result.getPhysicalData(); + assertEquals(physicalData.getFileFormatType().getCode(), "PLKPROPRIETARY"); + assertEquals(physicalData.isArchivingRequested(), Boolean.TRUE); } @Test diff --git a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/server/CommonServerTest.java b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/server/CommonServerTest.java index 34f3e700c0e85104249d398bf194a34db7373adb..ee46faba944cc8303f74008b8733e527091247ec 100644 --- a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/server/CommonServerTest.java +++ b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/server/CommonServerTest.java @@ -25,6 +25,7 @@ import java.util.EnumSet; import java.util.HashMap; import java.util.HashSet; import java.util.List; +import java.util.Map; import java.util.Set; import org.apache.commons.lang.builder.EqualsBuilder; @@ -1872,6 +1873,7 @@ public final class CommonServerTest extends AbstractServerTestCase prepareGetSession(); final boolean removeFromDataStore = true; final List<String> dataSetCodes = Arrays.asList("a", "b"); + final Map<String, String> options = new HashMap<>(); context.checking(new Expectations() { { @@ -1879,11 +1881,11 @@ public final class CommonServerTest extends AbstractServerTestCase will(returnValue(dataSetTable)); one(dataSetTable).loadByDataSetCodes(dataSetCodes, false, true); - one(dataSetTable).archiveDatasets(removeFromDataStore); + one(dataSetTable).archiveDatasets(removeFromDataStore, options); } }); - createServer().archiveDatasets(SESSION_TOKEN, dataSetCodes, removeFromDataStore); + createServer().archiveDatasets(SESSION_TOKEN, dataSetCodes, removeFromDataStore, options); context.assertIsSatisfied(); } diff --git a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/server/business/bo/DataSetTableTest.java b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/server/business/bo/DataSetTableTest.java index 3e0cffff476a23cd1aa6808483af8a0d49d5ae03..ab192bad87f6def56305b6fa7f139dc3c3b216a7 100644 --- a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/server/business/bo/DataSetTableTest.java +++ b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/server/business/bo/DataSetTableTest.java @@ -26,7 +26,9 @@ import static ch.systemsx.cisd.openbis.generic.shared.basic.dto.DataSetArchiving import java.util.ArrayList; import java.util.Arrays; import java.util.Collections; +import java.util.HashMap; import java.util.List; +import java.util.Map; import java.util.Properties; import java.util.regex.Matcher; import java.util.regex.Pattern; @@ -78,6 +80,8 @@ import ch.systemsx.cisd.openbis.generic.shared.dto.identifier.ProjectIdentifier; @Friend(toClasses = DataSetTable.class) public final class DataSetTableTest extends AbstractBOTest { + private Map<String, String> options = new HashMap<>(); + private IDataStoreServiceFactory dssFactory; private DataStorePE dss1; @@ -235,9 +239,7 @@ public final class DataSetTableTest extends AbstractBOTest final ExternalDataPE d1 = createDataSet("d1", dss1); final ExternalDataPE d2 = createDataSet("d2", dss2); - prepareFindFullDatasets(new ExternalDataPE[] - { d1, d2 }, new ExternalDataPE[] - { d1 }, false, false); + prepareFindFullDatasets(new ExternalDataPE[] { d1, d2 }, new ExternalDataPE[] { d1 }, false, false); DataSetTable dataSetTable = createDataSetTable(); dataSetTable.loadByDataSetCodes(Arrays.asList(d1.getCode(), d2.getCode()), false, false); @@ -277,8 +279,7 @@ public final class DataSetTableTest extends AbstractBOTest context.checking(new Expectations() { { - prepareFindFullDatasets(new ExternalDataPE[] - { d1, d2 }, false, false); + prepareFindFullDatasets(new ExternalDataPE[] { d1, d2 }, false, false); } }); @@ -296,7 +297,7 @@ public final class DataSetTableTest extends AbstractBOTest final ExternalDataPE d4 = createDataSet("d4n", dss2, ARCHIVE_PENDING); final ExternalDataPE d5 = createDataSet("d5n", dss2, UNARCHIVE_PENDING); final ExternalDataPE[] allDataSets = - { d1, d2, d3, d4, d5 }; + { d1, d2, d3, d4, d5 }; context.checking(new Expectations() { { @@ -337,8 +338,7 @@ public final class DataSetTableTest extends AbstractBOTest context.checking(new Expectations() { { - prepareFindFullDatasets(new ExternalDataPE[] - { d1, d2 }, false, false); + prepareFindFullDatasets(new ExternalDataPE[] { d1, d2 }, false, false); PersonPE person = EXAMPLE_SESSION.tryGetPerson(); one(eventDAO).persist(createDeletionEvent(d1, person, reason)); @@ -375,8 +375,7 @@ public final class DataSetTableTest extends AbstractBOTest context.checking(new Expectations() { { - prepareFindFullDatasets(new ExternalDataPE[] - { d1PE, d2PE }, true, false); + prepareFindFullDatasets(new ExternalDataPE[] { d1PE, d2PE }, true, false); one(dataStoreServiceConversational2).uploadDataSetsToCIFEX( with(equal(dss2.getSessionToken())), @@ -401,7 +400,8 @@ public final class DataSetTableTest extends AbstractBOTest { description.appendText("Data set d2"); } - }), with(same(uploadContext))); + }), + with(same(uploadContext))); } }); @@ -423,7 +423,7 @@ public final class DataSetTableTest extends AbstractBOTest final ExternalDataPE d4 = createDataSet("d4n", dss2, ARCHIVE_PENDING); final ExternalDataPE d5 = createDataSet("d5n", dss2, UNARCHIVE_PENDING); final ExternalDataPE[] allDataSets = - { d1, d2, d3, d4, d5 }; + { d1, d2, d3, d4, d5 }; final DataSetUploadContext uploadContext = new DataSetUploadContext(); uploadContext.setCifexURL("cifexURL"); uploadContext.setUserID(EXAMPLE_SESSION.getUserName()); @@ -560,15 +560,14 @@ public final class DataSetTableTest extends AbstractBOTest final ExternalDataPE d3Available = createDataSet("d3a", dss3, AVAILABLE); final ExternalDataPE d3NonAvailable = createDataSet("d3n", dss3, ARCHIVED); final ExternalDataPE[] allDataSets = - { d2Available1, d2Available2, d2NonAvailable1, d2NonAvailable2, d3Available, - d3NonAvailable, d2NonAvailable3 }; + { d2Available1, d2Available2, d2NonAvailable1, d2NonAvailable2, d3Available, + d3NonAvailable, d2NonAvailable3 }; context.checking(new Expectations() { { prepareFindFullDatasets(allDataSets, false, true); - prepareUpdateDatasetStatuses(new ExternalDataPE[] - { d2Available1, d2Available2, d3Available }, ARCHIVE_PENDING); + prepareUpdateDatasetStatuses(new ExternalDataPE[] { d2Available1, d2Available2, d3Available }, ARCHIVE_PENDING); // prepareFlush(); @@ -580,7 +579,7 @@ public final class DataSetTableTest extends AbstractBOTest DataSetTable dataSetTable = createDataSetTable(); dataSetTable.loadByDataSetCodes(Code.extractCodes(Arrays.asList(allDataSets)), false, true); - int archived = dataSetTable.archiveDatasets(true); + int archived = dataSetTable.archiveDatasets(true, options); assertEquals(3, archived); } @@ -595,8 +594,8 @@ public final class DataSetTableTest extends AbstractBOTest final ExternalDataPE d3Archived = createDataSet("d3a", dss3, ARCHIVED); final ExternalDataPE d3NonArchived = createDataSet("d3n", dss3, AVAILABLE); final ExternalDataPE[] allDataSets = - { d2Archived1, d2Archived2, d2NonArchived1, d2NonArchived2, d3Archived, - d3NonArchived, d2NonAvailable3 }; + { d2Archived1, d2Archived2, d2NonArchived1, d2NonArchived2, d3Archived, + d3NonArchived, d2NonAvailable3 }; context.checking(new Expectations() { { @@ -605,8 +604,7 @@ public final class DataSetTableTest extends AbstractBOTest preparePrepareForUnarchiving(dataStoreService2, dss2, d2Archived1, d2Archived2, d2NonArchived1, d2NonArchived2, d2NonAvailable3); preparePrepareForUnarchiving(dataStoreService3, dss3, d3Archived, d3NonArchived); - prepareUpdateDatasetStatuses(new ExternalDataPE[] - { d2Archived1, d2Archived2, d3Archived }, UNARCHIVE_PENDING); + prepareUpdateDatasetStatuses(new ExternalDataPE[] { d2Archived1, d2Archived2, d3Archived }, UNARCHIVE_PENDING); prepareUnarchiving(dataStoreService2, dss2, d2Archived1, d2Archived2); prepareUnarchiving(dataStoreService3, dss3, d3Archived); @@ -625,9 +623,9 @@ public final class DataSetTableTest extends AbstractBOTest final ExternalDataPE d2Archived1 = createDataSet("d2a1", dss2, ARCHIVED); final ExternalDataPE d2Archived2 = createDataSet("d2a2", dss2, ARCHIVED); final ExternalDataPE[] argumentDataSets = - { d2Archived1 }; + { d2Archived1 }; final ExternalDataPE[] allDataSets = - { d2Archived1, d2Archived2 }; + { d2Archived1, d2Archived2 }; context.checking(new Expectations() { @@ -638,8 +636,7 @@ public final class DataSetTableTest extends AbstractBOTest prepareFindFullDatasets(allDataSets, false, true); - prepareUpdateDatasetStatuses(new ExternalDataPE[] - { d2Archived1, d2Archived2 }, UNARCHIVE_PENDING); + prepareUpdateDatasetStatuses(new ExternalDataPE[] { d2Archived1, d2Archived2 }, UNARCHIVE_PENDING); prepareUnarchiving(dataStoreService2, dss2, d2Archived1, d2Archived2); } @@ -692,7 +689,7 @@ public final class DataSetTableTest extends AbstractBOTest final DataStorePE dssX = createDataStore("dssX", true); final ExternalDataPE d1 = createDataSet("d1", dssX, AVAILABLE); final ExternalDataPE[] allDataSets = - { d1 }; + { d1 }; final String errorMessage = "unexpected local error"; context.checking(new Expectations() { @@ -709,7 +706,7 @@ public final class DataSetTableTest extends AbstractBOTest .loadByDataSetCodes(Code.extractCodes(Arrays.asList(allDataSets)), false, false); try { - dataSetTable.archiveDatasets(true); + dataSetTable.archiveDatasets(true, options); fail("RuntimeException expected"); } catch (RuntimeException re) { @@ -723,11 +720,11 @@ public final class DataSetTableTest extends AbstractBOTest final ExternalDataPE d2 = createDataSet("d2", dss2, AVAILABLE); final ExternalDataPE d3 = createDataSet("d3", dss3, AVAILABLE); final ExternalDataPE[] d2Array = - { d2 }; + { d2 }; final ExternalDataPE[] d3Array = - { d3 }; + { d3 }; final ExternalDataPE[] allDataSets = - { d2, d3 }; + { d2, d3 }; context.checking(new Expectations() { { @@ -741,7 +738,8 @@ public final class DataSetTableTest extends AbstractBOTest with(createDatasetDescriptionsMatcher(d2Array)), with(equal(ManagerTestTool.EXAMPLE_PERSON.getUserId())), with(equal(ManagerTestTool.EXAMPLE_PERSON.getEmail())), - with(equal(true))); + with(equal(true)), + with(equal(options))); will(throwException(new RuntimeException())); allowing(dataStoreService3).archiveDatasets( @@ -749,7 +747,8 @@ public final class DataSetTableTest extends AbstractBOTest with(createDatasetDescriptionsMatcher(d3Array)), with(equal(ManagerTestTool.EXAMPLE_PERSON.getUserId())), with(equal(ManagerTestTool.EXAMPLE_PERSON.getEmail())), - with(equal(true))); + with(equal(true)), + with(equal(options))); will(throwException(new RuntimeException())); // expect statuses to be reverted after an error @@ -762,7 +761,7 @@ public final class DataSetTableTest extends AbstractBOTest .loadByDataSetCodes(Code.extractCodes(Arrays.asList(allDataSets)), false, false); try { - dataSetTable.archiveDatasets(true); + dataSetTable.archiveDatasets(true, options); fail("UserFailureException expected"); } catch (UserFailureException ufe) { @@ -800,7 +799,8 @@ public final class DataSetTableTest extends AbstractBOTest with(createDatasetDescriptionsMatcher(dataSets)), with(equal(ManagerTestTool.EXAMPLE_PERSON.getUserId())), with(equal(ManagerTestTool.EXAMPLE_PERSON.getEmail())), - with(equal(true))); + with(equal(true)), + with(equal(options))); } }); } diff --git a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/server/task/ArchivingByRequestTaskTest.java b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/server/task/ArchivingByRequestTaskTest.java new file mode 100644 index 0000000000000000000000000000000000000000..2063637c20317acb887e68dcabcf238159c02098 --- /dev/null +++ b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/server/task/ArchivingByRequestTaskTest.java @@ -0,0 +1,199 @@ +/* + * Copyright 2018 ETH Zuerich, SIS + * + * 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. + */ + +package ch.systemsx.cisd.openbis.generic.server.task; + +import static org.testng.Assert.assertEquals; +import static org.testng.Assert.fail; + +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.Random; + +import org.testng.annotations.DataProvider; +import org.testng.annotations.Test; + +import ch.systemsx.cisd.openbis.generic.server.task.ArchivingByRequestTask.SizeHolder; + +/** + * @author Franz-Josef Elmer + */ +public class ArchivingByRequestTaskTest +{ + private static final class Item implements SizeHolder + { + private final long size; + + Item(long size) + { + this.size = size; + } + + @Override + public long getSize() + { + return size; + } + + @Override + public int hashCode() + { + return (int) size; + } + + @Override + public boolean equals(Object obj) + { + if (obj == this) + { + return true; + } + if (obj instanceof Item == false) + { + return false; + } + Item that = (Item) obj; + return that.size == this.size; + } + + @Override + public String toString() + { + return Long.toString(size); + } + } + + @Test(dataProvider = "test-cases") + public void testGetChunks(GetChunksTestCase testCase) + { + // Given + List<Item> items = new ArrayList<>(); + for (int item : testCase.items) + { + items.add(new Item(item)); + } + + // When + List<List<Item>> chunks = ArchivingByRequestTask.getChunks(items, testCase.min, testCase.max); + + // Then + assertEquals(chunks.toString(), testCase.expectedChunks); + } + + @Test + public void testGetChunksWithRandomExamples() + { + Random random = new Random(31); + for (int i = 0; i < 1000; i++) + { + // Given + long min = random.nextInt(100); + long max = min + random.nextInt(100); + List<Item> items = new ArrayList<>(); + for (int j = 0, n = random.nextInt(20); j < n; j++) + { + items.add(new Item(random.nextInt(120))); + } + String inputDescription = " {" + items + ", min=" + min + ", max=" + max + "}"; + + // When + List<List<Item>> chunks = ArchivingByRequestTask.getChunks(items, min, max); + + // Then + System.out.println(inputDescription + ": " + chunks); + for (List<Item> chunk : chunks) + { + long sum = 0; + for (Item item : chunk) + { + sum += item.getSize(); + if (items.remove(item) == false) + { + fail(item + " not in chunk " + chunk + inputDescription); + } + } + if (sum < min) + { + fail("chunk size " + sum + " too small" + inputDescription); + } + if (sum > max && chunk.size() > 1) + { + fail("chunk size " + sum + " too large" + inputDescription); + } + } + } + } + + @DataProvider(name = "test-cases") + public static Object[][] chunksExamples() + { + return new Object[][] { + { testCase(20, 100).items(12, 100, 150, 10).chunks("[[150], [100], [12, 10]]") }, + { testCase(20, 100).items(12, 80, 50, 10).chunks("[[80], [50, 12, 10]]") }, + { testCase(90, 100).items(12, 80, 50, 10).chunks("[[80, 12]]") }, + { testCase(20, 100).items(8, 40, 50, 11).chunks("[[50, 40]]") } + }; + } + + private static GetChunksTestCase testCase(long min, long max) + { + return new GetChunksTestCase().min(min).max(max); + } + + private static final class GetChunksTestCase + { + private long min; + + private long max; + + private Integer[] items; + + private String expectedChunks; + + GetChunksTestCase min(long min) + { + this.min = min; + return this; + } + + GetChunksTestCase max(long max) + { + this.max = max; + return this; + } + + GetChunksTestCase items(Integer... items) + { + this.items = items; + return this; + } + + GetChunksTestCase chunks(String expectedChunks) + { + this.expectedChunks = expectedChunks; + return this; + } + + @Override + public String toString() + { + return Arrays.asList(items) + ", min=" + min + ", max=" + max; + } + + } + +} diff --git a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/systemtest/CommonServerTest.java b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/systemtest/CommonServerTest.java index 2c81d317054df145084aa61c5ff653722e2d8aa0..0e096987a5f4bfcd83df8c187a75698709c23f1d 100644 --- a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/systemtest/CommonServerTest.java +++ b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/systemtest/CommonServerTest.java @@ -27,6 +27,7 @@ import java.util.Arrays; import java.util.Collection; import java.util.Collections; import java.util.Comparator; +import java.util.HashMap; import java.util.List; import java.util.Map; import java.util.Set; @@ -2192,12 +2193,12 @@ public class CommonServerTest extends SystemTestCase if (user.isInstanceUserOrTestSpaceUserOrEnabledTestProjectUser()) { - commonServer.archiveDatasets(session.getSessionToken(), Arrays.asList(dataSetCode), false); + commonServer.archiveDatasets(session.getSessionToken(), Arrays.asList(dataSetCode), false, new HashMap<>()); } else { try { - commonServer.archiveDatasets(session.getSessionToken(), Arrays.asList(dataSetCode), false); + commonServer.archiveDatasets(session.getSessionToken(), Arrays.asList(dataSetCode), false, new HashMap<>()); fail(); } catch (AuthorizationFailureException e) { diff --git a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/systemtest/optimistic_locking/MultiThreadDataSetOptimisticLockingTest.java b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/systemtest/optimistic_locking/MultiThreadDataSetOptimisticLockingTest.java index a2815e16f743c423940c11dddc627b6c53cf1509..e78e3a10623ac99f9ea4dd65c4110775cb6b1ab9 100644 --- a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/systemtest/optimistic_locking/MultiThreadDataSetOptimisticLockingTest.java +++ b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/systemtest/optimistic_locking/MultiThreadDataSetOptimisticLockingTest.java @@ -24,6 +24,7 @@ import java.util.Arrays; import org.apache.log4j.Logger; import org.testng.annotations.Test; +import ch.ethz.sis.openbis.generic.server.asapi.v3.helper.entity.progress.VerifyProgress; import ch.systemsx.cisd.common.concurrent.MessageChannel; import ch.systemsx.cisd.common.concurrent.MessageChannelBuilder; import ch.systemsx.cisd.common.logging.LogCategory; @@ -71,7 +72,7 @@ public class MultiThreadDataSetOptimisticLockingTest extends MultiThreadOptimist { logger.info(phaseName + " " + numItemsProcessed + "/" + totalItemsToProcess); - if (phaseName.equals(CREATING_ENTITIES) && numItemsProcessed == 2 + if (phaseName.equals(VerifyProgress.VERIFYING) && numItemsProcessed == 2 && totalItemsToProcess == 2) { messageChannelMain.send(ToolBox.FIRST_REGISTERED); diff --git a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/systemtest/optimistic_locking/MultiThreadExperimentOptimisticLockingTest.java b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/systemtest/optimistic_locking/MultiThreadExperimentOptimisticLockingTest.java index da881be2e198f86cf38eac91e7ba4871e2fad5fc..f543a076f8075ada06174d3989319999372bb797 100644 --- a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/systemtest/optimistic_locking/MultiThreadExperimentOptimisticLockingTest.java +++ b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/systemtest/optimistic_locking/MultiThreadExperimentOptimisticLockingTest.java @@ -25,6 +25,7 @@ import java.util.List; import org.apache.log4j.Logger; import org.testng.annotations.Test; +import ch.ethz.sis.openbis.generic.server.asapi.v3.helper.entity.progress.VerifyProgress; import ch.systemsx.cisd.common.concurrent.MessageChannel; import ch.systemsx.cisd.common.concurrent.MessageChannelBuilder; import ch.systemsx.cisd.common.logging.LogCategory; @@ -132,7 +133,7 @@ public class MultiThreadExperimentOptimisticLockingTest extends public void handleProgress(String phaseName, int totalItemsToProcess, int numItemsProcessed) { - if (phaseName.equals(CREATING_ENTITIES) && numItemsProcessed == 2 + if (phaseName.equals(VerifyProgress.VERIFYING) && numItemsProcessed == 2 && totalItemsToProcess == 2) { messageChannelMain.send(ToolBox.FIRST_REGISTERED); diff --git a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/systemtest/optimistic_locking/MultiThreadSampleOptimisticLockingTest.java b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/systemtest/optimistic_locking/MultiThreadSampleOptimisticLockingTest.java index 774fb1c6ecf01122313be53c25258ac1df8f5a31..2765e6a03ffa8ceb8f8b3bd15afa664542bd3a4b 100644 --- a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/systemtest/optimistic_locking/MultiThreadSampleOptimisticLockingTest.java +++ b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/systemtest/optimistic_locking/MultiThreadSampleOptimisticLockingTest.java @@ -24,6 +24,7 @@ import java.util.List; import org.apache.log4j.Logger; import org.testng.annotations.Test; +import ch.ethz.sis.openbis.generic.server.asapi.v3.helper.entity.progress.VerifyProgress; import ch.systemsx.cisd.common.concurrent.MessageChannel; import ch.systemsx.cisd.common.concurrent.MessageChannelBuilder; import ch.systemsx.cisd.common.logging.LogCategory; @@ -32,10 +33,10 @@ import ch.systemsx.cisd.openbis.common.conversation.context.ServiceConversations import ch.systemsx.cisd.openbis.common.conversation.progress.IServiceConversationProgressListener; import ch.systemsx.cisd.openbis.generic.server.util.TimeIntervalChecker; import ch.systemsx.cisd.openbis.generic.shared.basic.TechId; +import ch.systemsx.cisd.openbis.generic.shared.basic.dto.AbstractExternalData; import ch.systemsx.cisd.openbis.generic.shared.basic.dto.Deletion; import ch.systemsx.cisd.openbis.generic.shared.basic.dto.DeletionType; import ch.systemsx.cisd.openbis.generic.shared.basic.dto.Experiment; -import ch.systemsx.cisd.openbis.generic.shared.basic.dto.AbstractExternalData; import ch.systemsx.cisd.openbis.generic.shared.basic.dto.ListSampleCriteria; import ch.systemsx.cisd.openbis.generic.shared.basic.dto.NewSample; import ch.systemsx.cisd.openbis.generic.shared.basic.dto.Sample; @@ -163,10 +164,6 @@ public class MultiThreadSampleOptimisticLockingTest extends MultiThreadOptimisti } - /** - * This test is flaky. If the transaction of performEntityOperations() call in the new thread ends before the transaction of - * performEntityOperations() call in the main thread, the modifier of the sample will be "optimist" and the test fails. - */ @Test public void testRegisterDataSetsForSameSampleInTwoThreads() { @@ -185,7 +182,7 @@ public class MultiThreadSampleOptimisticLockingTest extends MultiThreadOptimisti public void handleProgress(String phaseName, int totalItemsToProcess, int numItemsProcessed) { - if (phaseName.equals(CREATING_ENTITIES) && numItemsProcessed == 2 + if (phaseName.equals(VerifyProgress.VERIFYING) && numItemsProcessed == 2 && totalItemsToProcess == 2) { messageChannelMain.send(ToolBox.FIRST_REGISTERED); diff --git a/openbis/sourceTest/sql/postgresql/172/031=external_data.tsv b/openbis/sourceTest/sql/postgresql/172/031=external_data.tsv index dfee6e4af2d05a4eff29d5c5ff131dbaaf1b20a2..20973db124901c0010b979d46a87a347dbe02a22 100644 --- a/openbis/sourceTest/sql/postgresql/172/031=external_data.tsv +++ b/openbis/sourceTest/sql/postgresql/172/031=external_data.tsv @@ -1,5 +1,5 @@ 2 xxx/yyy/zzz 1 1 4 U \N AVAILABLE \N \N f -50 t t t f -4 analysis/result 2 1 4 U \N AVAILABLE \N \N f -50 t t t f +4 analysis/result 2 1 4 U \N AVAILABLE \N \N f -50 t t t t 5 a/1 1 1 4 U \N AVAILABLE 42 4711 f 42 f t t f 6 a/2 2 1 4 U \N AVAILABLE \N \N f -50 t t t f 7 a/3 3 1 4 U \N AVAILABLE \N \N f -50 t t t f diff --git a/openbis_all/source/bash/build/build.sh b/openbis_all/source/bash/build/build.sh index 9744734ce2614d2cbd51c4712fa72e6dde7de258..7281afe5ec7bbcbb2aaff4e20bbe420941129868 100755 --- a/openbis_all/source/bash/build/build.sh +++ b/openbis_all/source/bash/build/build.sh @@ -61,6 +61,7 @@ cd - # move components to fileserver mv openbis/openbis_standard_technologies/targets/gradle/distributions/openBIS-clients-and-APIs*.zip . +mv openbis/openbis_standard_technologies/targets/gradle/distributions/big_data_link_server*.zip . mv openbis/installation/targets/gradle/distributions/openBIS-installation-standard-technologies*.tar.gz . mv openbis/plasmid/targets/gradle/distributions/datastore_server_plugin-plasmid*.zip . diff --git a/openbis_all/source/python/upload-sprint-to-confluence.py b/openbis_all/source/python/upload-sprint-to-confluence.py index f88c7834112973f20829543a2f5ded88224b8c1b..42fac1fef85223750c6e8039e647b43b525ffb32 100755 --- a/openbis_all/source/python/upload-sprint-to-confluence.py +++ b/openbis_all/source/python/upload-sprint-to-confluence.py @@ -68,7 +68,7 @@ def fetchBinaries(version): os.system("mkdir -p " + DOWNLOAD_FOLDER) os.system("rm {0}/*.zip".format(DOWNLOAD_FOLDER)) - file_patterns = ['openBIS-installation-standard-technologies', 'openBIS-clients-and-APIs'] + file_patterns = ['openBIS-installation-standard-technologies', 'openBIS-clients-and-APIs', 'microservice-server'] for file_pattern in file_patterns: print "Trying to download %s from sprint" % file_pattern os.system("scp sprint:/links/groups/cisd/sprint_builds/openBIS/*-{0}*/{1}-{0}*.* {2}".format(version, file_pattern, DOWNLOAD_FOLDER)) diff --git a/openbis_api/source/java/ch/ethz/sis/openbis/generic/asapi/v3/IApplicationServerApi.java b/openbis_api/source/java/ch/ethz/sis/openbis/generic/asapi/v3/IApplicationServerApi.java index b3686b4da720a729963e4b056632e73ac0ce1547..6cb34d1533ce27140dabacd9bfd6b19031d8ed58 100644 --- a/openbis_api/source/java/ch/ethz/sis/openbis/generic/asapi/v3/IApplicationServerApi.java +++ b/openbis_api/source/java/ch/ethz/sis/openbis/generic/asapi/v3/IApplicationServerApi.java @@ -243,6 +243,9 @@ import ch.systemsx.cisd.common.exceptions.UserFailureException; /** * V3 application server API. Detailed documentation on how to use the API together code examples in both Java and Javascript can be found at "openBIS * V3 API" openBIS WIKI page. + * <p> + * The required access rights of the methods are the default ones. They can be configured with a capability-role map. + * For more details see "Installation and Administrator Guide of the openBIS Server" openBIS WIKI page. * * @author pkupczyk */ diff --git a/base/source/java/ch/systemsx/cisd/base/image/IImageTransformerFactory.java b/openbis_api/source/java/ch/ethz/sis/openbis/generic/asapi/v3/dto/common/get/GetServerInformationOperation.java similarity index 55% rename from base/source/java/ch/systemsx/cisd/base/image/IImageTransformerFactory.java rename to openbis_api/source/java/ch/ethz/sis/openbis/generic/asapi/v3/dto/common/get/GetServerInformationOperation.java index c0c76a2a3f6f0103029487dc2fc4442c25397563..c7b1fd27b6bffc2833c92b28a500fdab8a9e32d1 100644 --- a/base/source/java/ch/systemsx/cisd/base/image/IImageTransformerFactory.java +++ b/openbis_api/source/java/ch/ethz/sis/openbis/generic/asapi/v3/dto/common/get/GetServerInformationOperation.java @@ -1,5 +1,5 @@ /* - * Copyright 2010 ETH Zuerich, CISD + * Copyright 2018 ETH Zuerich, SIS * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,23 +14,30 @@ * limitations under the License. */ -package ch.systemsx.cisd.base.image; - -import java.io.Serializable; +package ch.ethz.sis.openbis.generic.asapi.v3.dto.common.get; +import ch.ethz.sis.openbis.generic.asapi.v3.dto.common.operation.IOperation; import ch.systemsx.cisd.base.annotation.JsonObject; /** - * Factory creating an {@link IImageTransformer}. The parameters of the transformer should be - * stored as serializable attributes of concrete implementations of this interface. - * * @author Franz-Josef Elmer + * */ -@JsonObject(value="IImageTransformerFactory") -public interface IImageTransformerFactory extends Serializable +@JsonObject("as.dto.common.get.GetServerInformationOperation") +public class GetServerInformationOperation implements IOperation { - /** - * Creates a transformer object based on the attributes of the factory. - */ - public IImageTransformer createTransformer(); + private static final long serialVersionUID = 1L; + + @Override + public String getMessage() + { + return toString(); + } + + @Override + public String toString() + { + return getClass().getSimpleName(); + } + } diff --git a/openbis_api/source/java/ch/ethz/sis/openbis/generic/asapi/v3/dto/common/get/GetServerInformationOperationResult.java b/openbis_api/source/java/ch/ethz/sis/openbis/generic/asapi/v3/dto/common/get/GetServerInformationOperationResult.java new file mode 100644 index 0000000000000000000000000000000000000000..db2809bbc67fe810d46a39e7f83b91714fad534c --- /dev/null +++ b/openbis_api/source/java/ch/ethz/sis/openbis/generic/asapi/v3/dto/common/get/GetServerInformationOperationResult.java @@ -0,0 +1,62 @@ +/* + * Copyright 2018 ETH Zuerich, SIS + * + * 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. + */ + +package ch.ethz.sis.openbis.generic.asapi.v3.dto.common.get; + +import java.util.Map; + +import ch.ethz.sis.openbis.generic.asapi.v3.dto.common.operation.IOperationResult; +import ch.systemsx.cisd.base.annotation.JsonObject; + +/** + * @author Franz-Josef Elmer + */ +@JsonObject("as.dto.common.get.GetServerInformationOperationResult") +public class GetServerInformationOperationResult implements IOperationResult +{ + + private static final long serialVersionUID = 1L; + + private Map<String, String> serverInformation; + + @SuppressWarnings("unused") + private GetServerInformationOperationResult() + { + } + + public GetServerInformationOperationResult(Map<String, String> serverInformation) + { + this.serverInformation = serverInformation; + } + + public Map<String, String> getServerInformation() + { + return serverInformation; + } + + @Override + public String getMessage() + { + return toString(); + } + + @Override + public String toString() + { + return getClass().getSimpleName(); + } + +} diff --git a/openbis_api/source/java/ch/ethz/sis/openbis/generic/asapi/v3/dto/dataset/PhysicalData.java b/openbis_api/source/java/ch/ethz/sis/openbis/generic/asapi/v3/dto/dataset/PhysicalData.java index 389c9ca0449c8c305146462d2dacdff01635670d..d841f2e9842930f65a9ec2a93e846b762aa33ac9 100644 --- a/openbis_api/source/java/ch/ethz/sis/openbis/generic/asapi/v3/dto/dataset/PhysicalData.java +++ b/openbis_api/source/java/ch/ethz/sis/openbis/generic/asapi/v3/dto/dataset/PhysicalData.java @@ -72,6 +72,9 @@ public class PhysicalData implements Serializable @JsonProperty private Integer speedHint; + @JsonProperty + private Boolean archivingRequested; + // Method automatically generated with DtoGenerator @JsonIgnore public PhysicalDataFetchOptions getFetchOptions() @@ -251,6 +254,19 @@ public class PhysicalData implements Serializable this.speedHint = speedHint; } + // Method automatically generated with DtoGenerator + @JsonIgnore + public Boolean isArchivingRequested() + { + return archivingRequested; + } + + // Method automatically generated with DtoGenerator + public void setArchivingRequested(Boolean archivingRequested) + { + this.archivingRequested = archivingRequested; + } + // Method automatically generated with DtoGenerator @Override public String toString() diff --git a/openbis_api/source/java/ch/ethz/sis/openbis/generic/asapi/v3/dto/dataset/archive/DataSetArchiveOptions.java b/openbis_api/source/java/ch/ethz/sis/openbis/generic/asapi/v3/dto/dataset/archive/DataSetArchiveOptions.java index f7920f4a5912bf96b2328bb1f9026a61fdaa43b9..53820428f7b83d961847104dfd78775043f156c2 100644 --- a/openbis_api/source/java/ch/ethz/sis/openbis/generic/asapi/v3/dto/dataset/archive/DataSetArchiveOptions.java +++ b/openbis_api/source/java/ch/ethz/sis/openbis/generic/asapi/v3/dto/dataset/archive/DataSetArchiveOptions.java @@ -17,6 +17,8 @@ package ch.ethz.sis.openbis.generic.asapi.v3.dto.dataset.archive; import java.io.Serializable; +import java.util.HashMap; +import java.util.Map; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; @@ -36,6 +38,9 @@ public class DataSetArchiveOptions implements Serializable @JsonProperty private boolean removeFromDataStore = true; + @JsonProperty + private final Map<String, String> options = new HashMap<String, String>(); + @JsonIgnore public void setRemoveFromDataStore(boolean removeFromDataStore) { @@ -48,6 +53,18 @@ public class DataSetArchiveOptions implements Serializable return removeFromDataStore; } + public DataSetArchiveOptions withOption(String option, String value) + { + options.put(option, value); + return this; + } + + @JsonIgnore + public Map<String, String> getOptions() + { + return options; + } + @Override public String toString() { diff --git a/openbis_api/source/java/ch/ethz/sis/openbis/generic/asapi/v3/dto/dataset/create/PhysicalDataCreation.java b/openbis_api/source/java/ch/ethz/sis/openbis/generic/asapi/v3/dto/dataset/create/PhysicalDataCreation.java index 2c106fb375cec20d794591604f11775b0cdc63fd..77de19d3a6f995e34439871503047b372ace7eb8 100644 --- a/openbis_api/source/java/ch/ethz/sis/openbis/generic/asapi/v3/dto/dataset/create/PhysicalDataCreation.java +++ b/openbis_api/source/java/ch/ethz/sis/openbis/generic/asapi/v3/dto/dataset/create/PhysicalDataCreation.java @@ -63,6 +63,8 @@ public class PhysicalDataCreation implements ICreation private boolean h5arFolders = true; + private boolean archivingRequested = false; + public String getShareId() { return shareId; @@ -165,6 +167,16 @@ public class PhysicalDataCreation implements ICreation this.h5arFolders = h5arFolders; } + public boolean isArchivingRequested() + { + return archivingRequested; + } + + public void setArchivingRequested(boolean archivingRequested) + { + this.archivingRequested = archivingRequested; + } + @Override public String toString() { diff --git a/openbis_api/source/java/ch/ethz/sis/openbis/generic/asapi/v3/dto/dataset/search/ArchivingRequestedSearchCriteria.java b/openbis_api/source/java/ch/ethz/sis/openbis/generic/asapi/v3/dto/dataset/search/ArchivingRequestedSearchCriteria.java new file mode 100644 index 0000000000000000000000000000000000000000..0cb30176206ac2bcff12a7a3222f2c66c00e5354 --- /dev/null +++ b/openbis_api/source/java/ch/ethz/sis/openbis/generic/asapi/v3/dto/dataset/search/ArchivingRequestedSearchCriteria.java @@ -0,0 +1,37 @@ +/* + * Copyright 2018 ETH Zuerich, SIS + * + * 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. + */ + +package ch.ethz.sis.openbis.generic.asapi.v3.dto.dataset.search; + +import ch.ethz.sis.openbis.generic.asapi.v3.dto.common.search.BooleanFieldSearchCriteria; +import ch.ethz.sis.openbis.generic.asapi.v3.dto.common.search.SearchFieldType; +import ch.systemsx.cisd.base.annotation.JsonObject; + +/** + * @author Franz-Josef Elmer + * + */ +@JsonObject("as.dto.dataset.search.ArchivingRequestedSearchCriteria") +public class ArchivingRequestedSearchCriteria extends BooleanFieldSearchCriteria +{ + private static final long serialVersionUID = 1L; + + public ArchivingRequestedSearchCriteria() + { + super("archivingRequested", SearchFieldType.ATTRIBUTE); + } + +} diff --git a/openbis_api/source/java/ch/ethz/sis/openbis/generic/asapi/v3/dto/dataset/search/PhysicalDataSearchCriteria.java b/openbis_api/source/java/ch/ethz/sis/openbis/generic/asapi/v3/dto/dataset/search/PhysicalDataSearchCriteria.java index 6bc8b5c80c6b96bad690e0afc168ec9ccbf6fc55..7bbd6f10188aa5b8791e8fbd24b46499d0117583 100644 --- a/openbis_api/source/java/ch/ethz/sis/openbis/generic/asapi/v3/dto/dataset/search/PhysicalDataSearchCriteria.java +++ b/openbis_api/source/java/ch/ethz/sis/openbis/generic/asapi/v3/dto/dataset/search/PhysicalDataSearchCriteria.java @@ -70,6 +70,11 @@ public class PhysicalDataSearchCriteria extends AbstractCompositeSearchCriteria return with(new StatusSearchCriteria()); } + public ArchivingRequestedSearchCriteria withArchivingRequested() + { + return with(new ArchivingRequestedSearchCriteria()); + } + public PresentInArchiveSearchCriteria withPresentInArchive() { return with(new PresentInArchiveSearchCriteria()); diff --git a/openbis_api/source/java/ch/ethz/sis/openbis/generic/asapi/v3/dto/dataset/update/PhysicalDataUpdate.java b/openbis_api/source/java/ch/ethz/sis/openbis/generic/asapi/v3/dto/dataset/update/PhysicalDataUpdate.java index 5dba37e6bc4adbc5886a27d0386ec6448bf9ddde..7e268831ed3b5b81d43d6ce85788007ea6470784 100644 --- a/openbis_api/source/java/ch/ethz/sis/openbis/generic/asapi/v3/dto/dataset/update/PhysicalDataUpdate.java +++ b/openbis_api/source/java/ch/ethz/sis/openbis/generic/asapi/v3/dto/dataset/update/PhysicalDataUpdate.java @@ -37,6 +37,9 @@ public class PhysicalDataUpdate implements IUpdate @Deprecated private FieldUpdateValue<IFileFormatTypeId> fileFormatTypeId = new FieldUpdateValue<IFileFormatTypeId>(); + @JsonProperty + private FieldUpdateValue<Boolean> archivingRequested = new FieldUpdateValue<Boolean>(); + @JsonIgnore @Deprecated public FieldUpdateValue<IFileFormatTypeId> getFileFormatTypeId() @@ -51,6 +54,18 @@ public class PhysicalDataUpdate implements IUpdate this.fileFormatTypeId.setValue(fileFormatTypeId); } + @JsonIgnore + public FieldUpdateValue<Boolean> isArchivingRequested() + { + return archivingRequested; + } + + @JsonIgnore + public void setArchivingRequested(boolean archivingRequested) + { + this.archivingRequested.setValue(archivingRequested); + } + @Override public String toString() { diff --git a/openbis_api/source/java/ch/ethz/sis/openbis/generic/asapi/v3/dto/entity/create/CreatePermIdsOperation.java b/openbis_api/source/java/ch/ethz/sis/openbis/generic/asapi/v3/dto/entity/create/CreatePermIdsOperation.java new file mode 100644 index 0000000000000000000000000000000000000000..932a4f668dbc7b8e79525821df86bdc3f30692ce --- /dev/null +++ b/openbis_api/source/java/ch/ethz/sis/openbis/generic/asapi/v3/dto/entity/create/CreatePermIdsOperation.java @@ -0,0 +1,60 @@ +/* + * Copyright 2018 ETH Zuerich, SIS + * + * 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. + */ + +package ch.ethz.sis.openbis.generic.asapi.v3.dto.entity.create; + +import ch.ethz.sis.openbis.generic.asapi.v3.dto.common.operation.IOperation; +import ch.systemsx.cisd.base.annotation.JsonObject; + +/** + * @author Franz-Josef Elmer + * + */ +@JsonObject("as.dto.entity.create.CreatePermIdsOperation") +public class CreatePermIdsOperation implements IOperation +{ + private static final long serialVersionUID = 1L; + + private int count; + + @SuppressWarnings("unused") + private CreatePermIdsOperation() + { + } + + public CreatePermIdsOperation(int count) + { + this.count = count; + } + + public int getCount() + { + return count; + } + + @Override + public String getMessage() + { + return toString(); + } + + @Override + public String toString() + { + return getClass().getSimpleName(); + } + +} diff --git a/openbis_api/source/java/ch/ethz/sis/openbis/generic/asapi/v3/dto/entity/create/CreatePermIdsOperationResult.java b/openbis_api/source/java/ch/ethz/sis/openbis/generic/asapi/v3/dto/entity/create/CreatePermIdsOperationResult.java new file mode 100644 index 0000000000000000000000000000000000000000..dc8de223abb21fa10e8a83f19d6fd4095dce0613 --- /dev/null +++ b/openbis_api/source/java/ch/ethz/sis/openbis/generic/asapi/v3/dto/entity/create/CreatePermIdsOperationResult.java @@ -0,0 +1,62 @@ +/* + * Copyright 2018 ETH Zuerich, CISD + * + * 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. + */ + +package ch.ethz.sis.openbis.generic.asapi.v3.dto.entity.create; + +import java.util.List; + +import ch.ethz.sis.openbis.generic.asapi.v3.dto.common.operation.IOperationResult; +import ch.systemsx.cisd.base.annotation.JsonObject; + +/** + * @author pkupczyk + */ +@JsonObject("as.dto.entity.create.CreatePermIdsOperationResult") +public class CreatePermIdsOperationResult implements IOperationResult +{ + + private static final long serialVersionUID = 1L; + + private List<String> permIds; + + @SuppressWarnings("unused") + private CreatePermIdsOperationResult() + { + } + + public CreatePermIdsOperationResult(List<String> permIds) + { + this.permIds = permIds; + } + + public List<String> getPermIds() + { + return permIds; + } + + @Override + public String getMessage() + { + return toString(); + } + + @Override + public String toString() + { + return getClass().getSimpleName(); + } + +} diff --git a/openbis_api/sourceTest/java/ch/ethz/sis/openbis/generic/sharedapi/v3/dictionary.txt b/openbis_api/sourceTest/java/ch/ethz/sis/openbis/generic/sharedapi/v3/dictionary.txt index 0f6783c8cb07cfb7215970a811f6c91bde5e9e78..5267a108c147d3d71c6a5dabb9dbb6057ae8cc92 100644 --- a/openbis_api/sourceTest/java/ch/ethz/sis/openbis/generic/sharedapi/v3/dictionary.txt +++ b/openbis_api/sourceTest/java/ch/ethz/sis/openbis/generic/sharedapi/v3/dictionary.txt @@ -192,6 +192,7 @@ Generator get getAccessDate getActions +getArchivingRequested getAttachments getAuthor getCacheMode @@ -416,6 +417,7 @@ isAutoGeneratedCode isDirectory is Session Active ISearchCriteria +isArchivingRequested isEmpty isListable isMeasured @@ -592,6 +594,7 @@ set setAccessDate setActions setActive +setArchivingRequested setAttachments setAttachmentsActions setAuthor @@ -2217,4 +2220,14 @@ Create Codes Operation Result get Codes get Prefix Object To String -append \ No newline at end of file +append + +Create PermIds Operation +Create PermIds Operation Result +Get Server Information Operation +Get Server Information Operation Result + +Archiving Requested Search Criteria +with Archiving Requested + +with Option diff --git a/openbis_standard_technologies/build.gradle b/openbis_standard_technologies/build.gradle index 523c3b7ed36768da22b0b0c5bc9cc11be9303256..52b6d0428f651371d3971bad5d8e86aa6cc1b2d9 100644 --- a/openbis_standard_technologies/build.gradle +++ b/openbis_standard_technologies/build.gradle @@ -5,11 +5,13 @@ buildscript { dependencies { classpath 'apache:commons-codec:+', - 'owasp:dependency-check-gradle:+' + 'owasp:dependency-check-gradle:+', + 'paleozogt:symzip-plugin:+' } } apply plugin: org.owasp.dependencycheck.gradle.DependencyCheckPlugin +apply plugin: "org.paleozogt.symzip" dependencyCheck { failBuildOnCVSS = 7 // 0 - 4 = low, 4 - 7 = medium, 7 - 9 = high, 9-10 = critical @@ -36,6 +38,7 @@ evaluationDependsOn(':screening') evaluationDependsOn(':rtd_yeastx') evaluationDependsOn(':deep_sequencing_unit') evaluationDependsOn(':plasmid') +evaluationDependsOn(':big_data_link_server') apply from: '../gradle/javaproject.gradle' @@ -271,7 +274,9 @@ def downloadFile(url, filename) { } } -task zipCorePlugins(type: Zip) { +import org.paleozogt.gradle.zip.SymZip; + +task zipCorePlugins(type: SymZip) { archiveName 'core-plugins.zip' downloadFile('https://github.com/aarpon/obit_flow_core_technology/archive/release/18.x.zip', 'flow.zip') downloadFile('https://github.com/aarpon/obit_microscopy_core_technology/archive/release/18.x.zip', 'microscopy.zip') @@ -410,6 +415,11 @@ task zipDss(type: Zip, dependsOn: signWebStartJars) { } } +task zipBdlServer(type: Zip, dependsOn: project(':big_data_link_server').tasks.distZip) { + baseName 'big_data_link_server' + from zipTree('../big_data_link_server/build/distributions/big_data_link_server.zip') +} + task pybisZip(type: Zip) { baseName 'pybis' from '../pybis/' @@ -429,7 +439,7 @@ task clientsAndApis(type: Zip, dependsOn: [dssClientZip, queryApiZip, apiV3Zip, from screeningApiZip.archivePath from pybisZip.archivePath from obisZip.archivePath - from ('../openbis_all/dist/readme.txt') + from ('dist/client/readme.txt') rename { filename -> if (filename.startsWith('pybis-')) { def contentOfSetUpFile = zipTree(pybisZip.archivePath).getFiles().findAll {it.path.endsWith('src/python/setup.py') }.iterator().next().text @@ -460,6 +470,7 @@ task generateJavadoc(type: Javadoc) { build.dependsOn zip build.dependsOn zipDss +build.dependsOn zipBdlServer build.dependsOn clientsAndApis build.dependsOn dssUploadGuiStandaloneZip build.dependsOn dssUploadGuiStandaloneJar diff --git a/openbis_all/dist/readme.txt b/openbis_standard_technologies/dist/client/readme.txt similarity index 82% rename from openbis_all/dist/readme.txt rename to openbis_standard_technologies/dist/client/readme.txt index dea1c67d8047af9e9897b870efe04f7d27fd306a..4934eb720fb1d0d5cd8bafa281b45131748aedc1 100644 --- a/openbis_all/dist/readme.txt +++ b/openbis_standard_technologies/dist/client/readme.txt @@ -1,6 +1,8 @@ This package contains the following distributions of openBIS clients and APIs: - dss-client-<version>.zip: Command line client and GUI client for uploading data sets to openBIS. +- pybis-<version>.zip: Python client for openBIS AS and DSS. +- obis-<version>.zip: Big data link command line client. Needs pybis. - openBIS-API-V3-<version>.zip: Distribution (with Javadoc and source files) for openBIS API Version 3. - openBIS-query-API-<version>.zip: Distribution (with Javadoc and source files) for openBIS Query API. - openBIS-proteomics-API-<version>.zip: Distribution (with Javadoc and source files) for openBIS Proteomics API. diff --git a/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/elnTypes.py b/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/elnTypes.py index b63ea5b092d73373ca156eeb0e9e3241fca7bf6a..bf429e989588e5dcfc7708605cdab7f5519182ef 100644 --- a/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/elnTypes.py +++ b/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/elnTypes.py @@ -875,7 +875,6 @@ EXPERIMENTAL_STEP = [FIRST_TIME_VERSIONED, True, True, "EXPERIMENTAL_STEP", "", [MANDATORY_ITEM_VERSION, "END_DATE", "General", "End date", DataType.TIMESTAMP, None, "Date when the experimental step is completed", None, None], [MANDATORY_ITEM_VERSION, "EXPERIMENTAL_READOUT", "Readout details", "Experimental readout", DataType.CONTROLLEDVOCABULARY, "EXPERIMENTAL_READOUT", "Experimental readout used in the experiment", None, None], [MANDATORY_ITEM_VERSION, "MACHINE", "Readout details", "Machine", DataType.CONTROLLEDVOCABULARY, "MACHINE", "Machine used to perform the experiment", None, None], - [MANDATORY_ITEM_VERSION, "FREEFORM_TABLE_STATE", "Readout details", "Freeform Table State", DataType.MULTILINE_VARCHAR, None, "Table describing how the order of samples measured in the experiments", None, None, None, False], [MANDATORY_ITEM_VERSION, "PUBLICATION", "Comments", "Publication", DataType.MULTILINE_VARCHAR, None, "Publication from where the information was first found OR technical sheet given by the manufacturer", None, None], [MANDATORY_ITEM_VERSION, "NOTES", "Comments", "Notes", DataType.MULTILINE_VARCHAR, None, "Notes", None, None], [MANDATORY_ITEM_VERSION, "XMLCOMMENTS", "Comments", "Comments List", DataType.XML, None, "Several comments can be added by different users", "COMMENTS_SAMPLE", None], diff --git a/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/miscellaneous/file-service/plugin.properties b/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/miscellaneous/file-service/plugin.properties index 1a94cc1ff79ba568df20b9aeaedb0a0e09af3b54..881bb2e242144c226747ce8c8fda5a5aed180925 100644 --- a/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/miscellaneous/file-service/plugin.properties +++ b/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/miscellaneous/file-service/plugin.properties @@ -5,7 +5,6 @@ file-server.maximum-file-size-in-MB = 10 # # The absolute or relative path to the location in the file system where the files are stored. # Default value: ../../../data/file-server -# file-server.repository-path = ../../../data/file-server file-server.section_eln-lims.download-url-template = <script>window.parent.CKEDITOR.tools.callFunction(${CKEditorFuncNum}, '${download-url}');</script> diff --git a/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/etc/InstanceProfile.js b/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/etc/InstanceProfile.js new file mode 100644 index 0000000000000000000000000000000000000000..6c1f263af06aac8738d778b6b3af5c1ed358c517 --- /dev/null +++ b/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/etc/InstanceProfile.js @@ -0,0 +1,15 @@ +function InstanceProfile(serverFacade) { + this.init(serverFacade); +} + +$.extend(InstanceProfile.prototype, StandardProfile.prototype, { + init: function(serverFacade){ + StandardProfile.prototype.init.call(this, serverFacade); + +// BEGIN ANSIBLE MANAGED BLOCK +// this.jupyterIntegrationServerEndpoint = "https://jupyterhub-demo.labnotebook.ch:80"; +// this.jupyterEndpoint = "https://jupyterhub-demo.labnotebook.ch/"; +// END ANSIBLE MANAGED BLOCK + +} +}) diff --git a/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/etc/config.js b/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/etc/config.js index 6077e3794194e70b78a16ed12b2ab1bb47768a4c..d9ecc2821eb297dbba0f752861e624595bd53b8e 100644 --- a/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/etc/config.js +++ b/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/etc/config.js @@ -1,17 +1,17 @@ var loadJSResorce = function(pathToResource, onLoad) { - var head = document.getElementsByTagName('head')[0]; - var script= document.createElement('script'); - script.type= 'text/javascript'; - var src = pathToResource; - script.src= src; - script.onreadystatechange= function () { - if (this.readyState == 'complete') onLoad(); - } - script.onload = onLoad; - - head.appendChild(script); + var head = document.getElementsByTagName('head')[0]; + var script= document.createElement('script'); + script.type= 'text/javascript'; + var src = pathToResource; + script.src= src; + script.onreadystatechange= function () { + if (this.readyState == 'complete') onLoad(); + } + script.onload = onLoad; + + head.appendChild(script); } //<PROFILE_PLACEHOLDER> -loadJSResorce("./js/config/StandardProfile.js", function() { profile = new StandardProfile(); }); +loadJSResorce("./etc/InstanceProfile.js", function() { profile = new InstanceProfile(); }); //</PROFILE_PLACEHOLDER> \ No newline at end of file diff --git a/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/img/archive-archived-icon.png b/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/img/archive-archived-icon.png new file mode 100644 index 0000000000000000000000000000000000000000..1ad2d952847914fd75ac4f6406ac71d603a286cf Binary files /dev/null and b/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/img/archive-archived-icon.png differ diff --git a/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/img/archive-not-requested-icon.png b/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/img/archive-not-requested-icon.png new file mode 100644 index 0000000000000000000000000000000000000000..304b4a7c3f752ec68c3029d61be4b8e767130f0c Binary files /dev/null and b/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/img/archive-not-requested-icon.png differ diff --git a/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/img/archive-requested-icon.png b/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/img/archive-requested-icon.png new file mode 100644 index 0000000000000000000000000000000000000000..2bbaea9dc8c2e3e54e4688152789aa08c6a4ba31 Binary files /dev/null and b/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/img/archive-requested-icon.png differ diff --git a/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/img/openBIS_Logo.png b/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/img/openBIS_Logo.png index 87ae5e81899908f3968ea230205322dc19ff4ee5..e89004935f1b99500cec7ba5ab8c790481a9e5a9 100644 Binary files a/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/img/openBIS_Logo.png and b/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/img/openBIS_Logo.png differ diff --git a/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/index.html b/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/index.html index 0831873022f1d46079420783371afb6328d47b39..d0797055035c3b1c1d7e51f4f1bf972f775fd66a 100644 --- a/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/index.html +++ b/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/index.html @@ -44,6 +44,7 @@ <link type="text/css" rel="stylesheet" href="./css/style.css" /> <!-- Third party libraries --> + <script type="text/javascript" src="./lib/cycle/js/cycle.js"></script> <script type="text/javascript" src="./lib/jquery/js/jquery-1.11.3.min.js"></script> <script type="text/javascript" src="./lib/jquery-ui/js/jquery-ui.min.js"></script> <script type="text/javascript" src="./lib/jquery-fancytree/js/jquery.fancytree-all.min.js"></script> @@ -82,6 +83,7 @@ <script type="text/javascript" src="./js/controllers/LayoutManager.js"></script> <script type="text/javascript" src="./js/controllers/MainController.js"></script> + <script type="text/javascript" src="./js/util/IdentifierUtil.js"></script> <script type="text/javascript" src="./js/config/ELNDictionary.js"></script> <script type="text/javascript" src="./js/config/Profile.js"></script> <script type="text/javascript" src="./js/config/StandardProfile.js"></script> diff --git a/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/config/ELNDictionary.js b/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/config/ELNDictionary.js index 504ac9540998433362983aa6c261cf98cd0b582d..58dedcee5d42c7d45602cf8877bce9ca4fc03e32 100644 --- a/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/config/ELNDictionary.js +++ b/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/config/ELNDictionary.js @@ -14,7 +14,7 @@ ELNDictionary.getExperimentDualName = function() { } ELNDictionary.getExperimentKindName = function(identifier, isPlural) { - var space = identifier.split("/")[1]; + var space = IdentifierUtil.getSpaceCodeFromIdentifier(identifier); if(profile.isInventorySpace(space)) { return (isPlural)?ELNDictionary.ExperimentsInventory:ELNDictionary.ExperimentInventory; } else { @@ -56,5 +56,9 @@ ELNDictionary.settingsView = { title : ELNDictionary.Sample +" Type definitions Extension", info : "This section is used to extend the common openBIS definitions to: 1. Enable the storage. 2. Specify if the " + ELNDictionary.sample + " type is a protocol. 3. Add intended parent/children hints. 4. Support annotations for these links using properties. 5. Show in dropdowns.", }, + miscellaneous : { + title : "Miscellaneous", + info : "Miscellaneous settings." + }, } } diff --git a/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/config/Profile.js b/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/config/Profile.js index b428db291368b4561372d420c85d664b5eb6ee04..2db4dc9a1892e724dc717910bcc18ec961cbcf0c 100644 --- a/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/config/Profile.js +++ b/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/config/Profile.js @@ -36,6 +36,8 @@ $.extend(DefaultProfile.prototype, { // // DEFAULTS, TYPICALLY DON'T TOUCH IF YOU DON'T KNOW WHAT YOU DO // + this.showDatasetArchivingButton = false; + this.mainMenu = { showLabNotebook : true, showInventory : true, @@ -126,8 +128,8 @@ $.extend(DefaultProfile.prototype, { // this.jupyterIntegrationServerEndpoint = "https://127.0.0.1:8002"; // this.jupyterEndpoint = "https://127.0.0.1:8000/"; - this.systemProperties = ["ANNOTATIONS_STATE"]; - this.forcedDisableRTF = ["FREEFORM_TABLE_STATE","NAME", "SEQUENCE"]; + this.systemProperties = ["ANNOTATIONS_STATE", "FREEFORM_TABLE_STATE"]; + this.forcedDisableRTF = ["NAME", "SEQUENCE"]; this.forceMonospaceFont = ["SEQUENCE"]; this.isRTF = function(propertytype) { @@ -212,7 +214,7 @@ $.extend(DefaultProfile.prototype, { this.getStorageConfigCollectionForConfigSample = function(sample) { var prefix = this.getSampleConfigSpacePrefix(sample); - return "/" + prefix + "ELN_SETTINGS/" + prefix + "STORAGES/" + prefix + "STORAGES_COLLECTION"; + return IdentifierUtil.getExperimentIdentifier(prefix + "ELN_SETTINGS", prefix + "STORAGES", prefix + "STORAGES_COLLECTION"); } this.getStorageSpaceForSample = function(sample) { @@ -244,7 +246,7 @@ $.extend(DefaultProfile.prototype, { } this.isELNIdentifier = function(identifier) { - var space = identifier.split("/")[1]; + var space = IdentifierUtil.getSpaceCodeFromIdentifier(identifier); return !this.isInventorySpace(space); } @@ -556,6 +558,19 @@ $.extend(DefaultProfile.prototype, { return this.allPropertyTypes; } + this.getPropertyTypeFromSampleType = function(sampleType, propertyTypeCode) { + for(var i = 0; i < sampleType.propertyTypeGroups.length; i++) { + var propertyTypeGroup = sampleType.propertyTypeGroups[i]; + for(var j = 0; j < propertyTypeGroup.propertyTypes.length; j++) { + var propertyType = propertyTypeGroup.propertyTypes[j]; + if(propertyType.code === propertyTypeCode) { + return propertyType; + } + } + } + return null; + } + this.getPropertyType = function(propertyTypeCode) { for (var i = 0; i < this.allPropertyTypes.length; i++) { if(this.allPropertyTypes[i].code === propertyTypeCode) { @@ -719,6 +734,8 @@ $.extend(DefaultProfile.prototype, { this.datasetViewerImagePreviewIconSize = 25; // width in px this.datasetViewerMaxFilesizeForImagePreview = 50000000; // filesize in bytes + this.archivingThreshold = "ask your administrator"; + this.initPropertyTypes = function(callback) { var _this = this; this.serverFacade.listPropertyTypes(function(data) { @@ -892,20 +909,30 @@ $.extend(DefaultProfile.prototype, { } this.initSettings = function(callback) { + // sampleTypeDefinitionsExtension gets overwritten with settings if found + for (var sampleTypeCode of Object.keys(this.sampleTypeDefinitionsExtension)) { + var sampleTypDefExt = this.sampleTypeDefinitionsExtension[sampleTypeCode]; + // Add the types to hide == not show + if(!sampleTypDefExt.SHOW) { + this.hideTypes["sampleTypeCodes"].push(sampleTypeCode); + } + } + var settingsManager = new SettingsManager(this.serverFacade); settingsManager.loadSettingsAndApplyToProfile((function() { callback(); })); } - this.initAuth = function(callback) { + this.initServerInfo = function(callback) { var _this = this; this.serverFacade.getOpenbisV3(function(openbisV3) { openbisV3._private.sessionToken = mainController.serverFacade.getSession(); openbisV3.getServerInformation().done(function(serverInformation) { var authSystem = serverInformation["authentication-service"]; + IdentifierUtil.isProjectSamplesEnabled = (serverInformation["project-samples-enabled"] === "true"); if (authSystem && authSystem.indexOf("file") !== -1) { - _this.isFileAuthenticationService = true; + _this.isFileAuthenticationService = true; } callback(); }); @@ -931,7 +958,7 @@ $.extend(DefaultProfile.prototype, { _this.initDirectLinkURL(function() { _this.initIsAdmin(function() { _this.initDatasetTypeCodes(function() { - _this.initAuth(function() { + _this.initServerInfo(function() { _this.isFileAuthUser(function() { _this.initSpaces(function() { _this.initSettings(function() { diff --git a/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/config/SettingsManager.js b/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/config/SettingsManager.js index 58375a3ba1c2494e8b071284a1bcef01138aee06..80c7d7aa090e0762cdcf7144785fc5d92e5c938e 100644 --- a/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/config/SettingsManager.js +++ b/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/config/SettingsManager.js @@ -90,10 +90,11 @@ function SettingsManager(serverFacade) { var fieldsToOverride = [ "dataSetTypeForFileNameMap", "forcedDisableRTF", - "forceMonospaceFont" + "forceMonospaceFont", + "showDatasetArchivingButton" ]; for (var field of fieldsToOverride) { - if (settings[field]) { + if (settings[field] != null) { targetProfile[field] = settings[field]; } } @@ -120,12 +121,20 @@ function SettingsManager(serverFacade) { } } - // sampleTypeDefinitionsExtension gets overwritten with settings if found - for (var sampleType of Object.keys(settings.sampleTypeDefinitionsExtension)) { - profile.sampleTypeDefinitionsExtension[sampleType] = settings.sampleTypeDefinitionsExtension[sampleType]; - // Add the types to hide == not show - if(!settings.sampleTypeDefinitionsExtension[sampleType].SHOW) { - targetProfile.hideTypes["sampleTypeCodes"].push(sampleType); + + for (var sampleTypeCode of Object.keys(settings.sampleTypeDefinitionsExtension)) { + // sampleTypeDefinitionsExtension gets overwritten with settings if found + targetProfile.sampleTypeDefinitionsExtension[sampleTypeCode] = settings.sampleTypeDefinitionsExtension[sampleTypeCode]; + + // Remove current profile show config + if($.inArray(sampleTypeCode, targetProfile.hideTypes["sampleTypeCodes"]) !== -1) { + var indexToRemove = $.inArray(sampleTypeCode, targetProfile.hideTypes["sampleTypeCodes"]); + targetProfile.hideTypes["sampleTypeCodes"] = targetProfile.hideTypes["sampleTypeCodes"].splice(indexToRemove, 1); + } + + // Add current profile show config + if(!settings.sampleTypeDefinitionsExtension[sampleTypeCode].SHOW) { + targetProfile.hideTypes["sampleTypeCodes"].push(sampleTypeCode); } } } diff --git a/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/config/StandardProfile.js b/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/config/StandardProfile.js index 5262e59fd042f236e903afe5f541fb8f0e2a9170..519a37910dea18a60d24114f03424f18e3df0530 100644 --- a/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/config/StandardProfile.js +++ b/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/config/StandardProfile.js @@ -13,27 +13,36 @@ $.extend(StandardProfile.prototype, DefaultProfile.prototype, { /* New Sample definition tests*/ this.sampleTypeDefinitionsExtension = { + "UNKNOWN" : { + "SHOW" : false, + }, "ANTIBODY" : { + "SHOW" : false, "ENABLE_STORAGE" : true, }, "CHEMICAL" : { + "SHOW" : false, "ENABLE_STORAGE" : true, }, "ENZYME" : { + "SHOW" : false, "ENABLE_STORAGE" : true, }, "OLIGO" : { + "SHOW" : false, "ENABLE_STORAGE" : true, }, "RNA" : { + "SHOW" : false, "ENABLE_STORAGE" : true, }, "MEDIA" : { + "SHOW" : false, "ENABLE_STORAGE" : true, "SAMPLE_PARENTS_HINT" : [ { @@ -58,6 +67,7 @@ $.extend(StandardProfile.prototype, DefaultProfile.prototype, { }, "SOLUTION_BUFFER" : { + "SHOW" : false, "ENABLE_STORAGE" : true, "SAMPLE_PARENTS_HINT" : [ { @@ -82,32 +92,9 @@ $.extend(StandardProfile.prototype, DefaultProfile.prototype, { }, "GENERAL_PROTOCOL" : { + "SHOW" : false, "USE_AS_PROTOCOL" : true, "SAMPLE_PARENTS_HINT" : [ - { - "LABEL" : "Chemical", - "TYPE": "CHEMICAL", - "MIN_COUNT" : 0, - "ANNOTATION_PROPERTIES" : [{"TYPE" : "QUANTITY", "MANDATORY" : false }, {"TYPE" : "COMMENTS", "MANDATORY" : false }] - }, - { - "LABEL" : "Solution/Buffer", - "TYPE": "SOLUTION_BUFFER", - "MIN_COUNT" : 0, - "ANNOTATION_PROPERTIES" : [{"TYPE" : "QUANTITY", "MANDATORY" : false }, {"TYPE" : "COMMENTS", "MANDATORY" : false }] - }, - { - "LABEL" : "Media", - "TYPE": "MEDIA", - "MIN_COUNT" : 0, - "ANNOTATION_PROPERTIES" : [{"TYPE" : "QUANTITY", "MANDATORY" : false }, {"TYPE" : "COMMENTS", "MANDATORY" : false }] - }, - { - "LABEL" : "Enzyme", - "TYPE": "ENZYME", - "MIN_COUNT" : 0, - "ANNOTATION_PROPERTIES" : [{"TYPE" : "QUANTITY", "MANDATORY" : false }, {"TYPE" : "COMMENTS", "MANDATORY" : false }] - }, { "LABEL" : "General protocol", "TYPE": "GENERAL_PROTOCOL", @@ -118,6 +105,7 @@ $.extend(StandardProfile.prototype, DefaultProfile.prototype, { }, "PCR_PROTOCOL" : { + "SHOW" : false, "USE_AS_PROTOCOL" : true, "SAMPLE_PARENTS_HINT" : [ { @@ -142,6 +130,7 @@ $.extend(StandardProfile.prototype, DefaultProfile.prototype, { }, "WESTERN_BLOTTING_PROTOCOL" : { + "SHOW" : false, "USE_AS_PROTOCOL" : true, "SAMPLE_PARENTS_HINT" : [ { @@ -166,6 +155,7 @@ $.extend(StandardProfile.prototype, DefaultProfile.prototype, { }, "PLASMID" : { + "SHOW" : false, "ENABLE_STORAGE" : true, "SAMPLE_PARENTS_HINT" : [ { @@ -178,6 +168,7 @@ $.extend(StandardProfile.prototype, DefaultProfile.prototype, { }, "BACTERIA" : { + "SHOW" : false, "ENABLE_STORAGE" : true, "SAMPLE_PARENTS_HINT" : [ { @@ -196,6 +187,7 @@ $.extend(StandardProfile.prototype, DefaultProfile.prototype, { }, "YEAST" : { + "SHOW" : false, "ENABLE_STORAGE" : true, "SAMPLE_PARENTS_HINT" : [ { @@ -214,6 +206,7 @@ $.extend(StandardProfile.prototype, DefaultProfile.prototype, { }, "CELL_LINE" : { + "SHOW" : false, "ENABLE_STORAGE" : true, "SAMPLE_PARENTS_HINT" : [ { @@ -238,6 +231,7 @@ $.extend(StandardProfile.prototype, DefaultProfile.prototype, { }, "FLY" : { + "SHOW" : false, "ENABLE_STORAGE" : true, "SAMPLE_PARENTS_HINT" : [ { @@ -258,15 +252,16 @@ $.extend(StandardProfile.prototype, DefaultProfile.prototype, { "SHOW" : false }, "STORAGE" : { + "SHOW" : false, "SAMPLE_CHILDREN_DISABLED" : true, - "SAMPLE_PARENTS_DISABLED" : true, - "SHOW" : false + "SAMPLE_PARENTS_DISABLED" : true }, "STORAGE_POSITION" : { - "SAMPLE_CHILDREN_DISABLED" : true, - "SHOW" : false + "SHOW" : false, + "SAMPLE_CHILDREN_DISABLED" : true }, "REQUEST" : { + "SHOW" : false, "SAMPLE_PARENTS_TITLE" : "Products from Catalog", "SAMPLE_PARENTS_ANY_TYPE_DISABLED" : true, "SAMPLE_CHILDREN_DISABLED" : true, @@ -279,6 +274,7 @@ $.extend(StandardProfile.prototype, DefaultProfile.prototype, { }] }, "ORDER" : { + "SHOW" : false, "SAMPLE_PARENTS_TITLE" : "Requests", "SAMPLE_PARENTS_ANY_TYPE_DISABLED" : true, "SAMPLE_CHILDREN_DISABLED" : true, @@ -295,10 +291,12 @@ $.extend(StandardProfile.prototype, DefaultProfile.prototype, { }] }, "SUPPLIER" : { + "SHOW" : false, "SAMPLE_CHILDREN_DISABLED" : true, "SAMPLE_PARENTS_DISABLED" : true, }, "PRODUCT" : { + "SHOW" : false, "SAMPLE_CHILDREN_DISABLED" : true, "SAMPLE_PARENTS_TITLE" : "Suppliers", "SAMPLE_PARENTS_ANY_TYPE_DISABLED" : true, @@ -311,97 +309,14 @@ $.extend(StandardProfile.prototype, DefaultProfile.prototype, { }] }, "EXPERIMENTAL_STEP" : { + "SHOW" : false, "SAMPLE_PARENTS_HINT" : [ - { - "LABEL" : "Antibody", - "TYPE": "ANTIBODY", - "MIN_COUNT" : 0, - "ANNOTATION_PROPERTIES" : [ {"TYPE" : "COMMENTS", "MANDATORY" : false }] - }, - { - "LABEL" : "Bacteria", - "TYPE": "BACTERIA", - "MIN_COUNT" : 0, - "ANNOTATION_PROPERTIES" : [{"TYPE" : "COMMENTS", "MANDATORY" : false }] - }, - { - "LABEL" : "Cell line", - "TYPE": "CELL_LINE", - "MIN_COUNT" : 0, - "ANNOTATION_PROPERTIES" : [{"TYPE" : "COMMENTS", "MANDATORY" : false }] - }, - { - "LABEL" : "Chemical", - "TYPE": "CHEMICAL", - "MIN_COUNT" : 0, - "ANNOTATION_PROPERTIES" : [{"TYPE" : "COMMENTS", "MANDATORY" : false }] - }, - { - "LABEL" : "Enzyme", - "TYPE": "ENZYME", - "MIN_COUNT" : 0, - "ANNOTATION_PROPERTIES" : [{"TYPE" : "COMMENTS", "MANDATORY" : false }] - }, - { - "LABEL" : "Fly", - "TYPE": "FLY", - "MIN_COUNT" : 0, - "ANNOTATION_PROPERTIES" : [{"TYPE" : "COMMENTS", "MANDATORY" : false }] - }, - { - "LABEL" : "Media", - "TYPE": "MEDIA", - "MIN_COUNT" : 0, - "ANNOTATION_PROPERTIES" : [{"TYPE" : "COMMENTS", "MANDATORY" : false }] - }, - { - "LABEL" : "Oligo", - "TYPE": "OLIGO", - "MIN_COUNT" : 0, - "ANNOTATION_PROPERTIES" : [{"TYPE" : "COMMENTS", "MANDATORY" : false }] - }, - { - "LABEL" : "Plasmid", - "TYPE": "PLASMID", - "MIN_COUNT" : 0, - "ANNOTATION_PROPERTIES" : [{"TYPE" : "COMMENTS", "MANDATORY" : false }] - }, - { - "LABEL" : "RNA", - "TYPE": "RNA", - "MIN_COUNT" : 0, - "ANNOTATION_PROPERTIES" : [{"TYPE" : "COMMENTS", "MANDATORY" : false }] - }, - { - "LABEL" : "Solution/Buffer", - "TYPE": "SOLUTION_BUFFER", - "MIN_COUNT" : 0, - "ANNOTATION_PROPERTIES" : [{"TYPE" : "COMMENTS", "MANDATORY" : false }] - }, - { - "LABEL" : "Yeast", - "TYPE": "YEAST", - "MIN_COUNT" : 0, - "ANNOTATION_PROPERTIES" : [{"TYPE" : "COMMENTS", "MANDATORY" : false }] - }, { "LABEL" : "General protocol", "TYPE": "GENERAL_PROTOCOL", "MIN_COUNT" : 0, "ANNOTATION_PROPERTIES" : [{"TYPE" : "COMMENTS", "MANDATORY" : false }] - }, - { - "LABEL" : "PCR protocol", - "TYPE": "PCR_PROTOCOL", - "MIN_COUNT" : 0, - "ANNOTATION_PROPERTIES" : [{"TYPE" : "COMMENTS", "MANDATORY" : false }] - }, - { - "LABEL" : "Western blotting protocol", - "TYPE": "WESTERN_BLOTTING_PROTOCOL", - "MIN_COUNT" : 0, - "ANNOTATION_PROPERTIES" : [{"TYPE" : "COMMENTS", "MANDATORY" : false }] - } + } ], } @@ -414,7 +329,7 @@ $.extend(StandardProfile.prototype, DefaultProfile.prototype, { var changesToDo = null; if((orderStatus === "ORDERED" || orderStatus === "DELIVERED" || orderStatus === "PAID") && !sample.properties["ORDER_STATE"]) { //Set property - sample.properties["ORDER_STATE"] = window.btoa(unescape(encodeURIComponent(JSON.stringify(sample)))); + sample.properties["ORDER_STATE"] = window.btoa(unescape(encodeURIComponent(JSON.stringify(JSON.decycle(sample))))); //Update order state on the requests changesToDo = []; var requests = sample.parents; @@ -433,7 +348,8 @@ $.extend(StandardProfile.prototype, DefaultProfile.prototype, { } this.sampleFormContentExtra = function(sampleTypeCode, sample, containerId) { - if(sampleTypeCode === "EXPERIMENTAL_STEP") { + var sampleType = this.getSampleTypeForSampleTypeCode(sampleTypeCode); + if(this.getPropertyTypeFromSampleType(sampleType, "FREEFORM_TABLE_STATE")) { var isEnabled = mainController.currentView._sampleFormModel.mode !== FormMode.VIEW; var freeFormTableController = new FreeFormTableController(sample, isEnabled); freeFormTableController.init($("#" + containerId)); diff --git a/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/controllers/MainController.js b/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/controllers/MainController.js index 8a2f845fc78f7561f5e883a53185fda13373f613..f2636c514f411a9a58039108f9691ed98de11064 100644 --- a/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/controllers/MainController.js +++ b/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/controllers/MainController.js @@ -538,7 +538,7 @@ function MainController(profile) { window.alert("The item is no longer available, refresh the page, if the problem persists tell your admin that the Lucene index is probably corrupted."); } else { document.title = "" + ELNDictionary.Sample + " " + data[0].code; - var isELNSubExperiment = $.inArray(data[0].spaceCode, _this.profile.inventorySpaces) === -1&& _this.profile.inventorySpaces.length > 0; + var isELNSubExperiment = $.inArray(data[0].spaceCode, _this.profile.inventorySpaces) === -1 && _this.profile.inventorySpaces.length > 0; _this._showViewSamplePage(data[0], isELNSubExperiment, paginationInfo); //window.scrollTo(0,0); } @@ -585,8 +585,7 @@ function MainController(profile) { logicalOperator : "AND", rules : { "UUIDv4" : { type : "Attribute", name : "PERM_ID", value : arg } } }; - - this.serverFacade.searchForDataSetsAdvanced(dsCriteria, null, function(results) { + this.serverFacade.searchForDataSetsAdvanced(dsCriteria, {withPhysicalData: true}, function(results) { var datasetParentCodes = []; var dataset = results.objects[0]; if(dataset) { @@ -602,7 +601,7 @@ function MainController(profile) { if(dataSetData.result[0].sampleIdentifierOrNull) { _this.serverFacade.searchWithIdentifiers([dataSetData.result[0].sampleIdentifierOrNull], function(sampleData) { document.title = "Data Set " + dataSetData.result[0].code; - _this._showViewDataSetPage(sampleData[0], dataSetData.result[0]); + _this._showViewDataSetPage(sampleData[0], dataSetData.result[0], dataset); //window.scrollTo(0,0); }); } else if(dataSetData.result[0].experimentIdentifier) { @@ -611,7 +610,7 @@ function MainController(profile) { var experimentCriteria = { entityKind : "EXPERIMENT", logicalOperator : "AND", rules : experimentRules }; _this.serverFacade.searchForExperimentsAdvanced(experimentCriteria, null, function(experimentData) { document.title = "Data Set " + dataSetData.result[0].code; - _this._showViewDataSetPage(experimentData.objects[0], dataSetData.result[0]); + _this._showViewDataSetPage(experimentData.objects[0], dataSetData.result[0], dataset); //window.scrollTo(0,0); }); }); @@ -644,7 +643,7 @@ function MainController(profile) { if(dataSetData.result[0].sampleIdentifierOrNull) { _this.serverFacade.searchWithIdentifiers([dataSetData.result[0].sampleIdentifierOrNull], function(sampleData) { document.title = "Data Set " + dataSetData.result[0].code; - _this._showEditDataSetPage(sampleData[0], dataSetData.result[0]); + _this._showEditDataSetPage(sampleData[0], dataSetData.result[0], dataset); //window.scrollTo(0,0); }); } else if(dataSetData.result[0].experimentIdentifier) { @@ -653,7 +652,7 @@ function MainController(profile) { var experimentCriteria = { entityKind : "EXPERIMENT", logicalOperator : "AND", rules : experimentRules }; _this.serverFacade.searchForExperimentsAdvanced(experimentCriteria, null, function(experimentData) { document.title = "Data Set " + dataSetData.result[0].code; - _this._showEditDataSetPage(experimentData.objects[0], dataSetData.result[0]); + _this._showEditDataSetPage(experimentData.objects[0], dataSetData.result[0], dataset); //window.scrollTo(0,0); }); }); @@ -986,8 +985,9 @@ function MainController(profile) { //Show Form var sample = { sampleTypeCode : sampleTypeCode, + spaceCode : IdentifierUtil.getSpaceCodeFromIdentifier(experimentIdentifier), + projectCode : IdentifierUtil.getProjectCodeFromExperimentIdentifier(experimentIdentifier), experimentIdentifierOrNull : experimentIdentifier, - spaceCode : experimentIdentifier.substring(1, experimentIdentifier.indexOf('/', 1)), properties : {} } var sampleFormController = new SampleFormController(this, FormMode.CREATE, sample); @@ -1070,17 +1070,17 @@ function MainController(profile) { this.currentView = newView; } - this._showViewDataSetPage = function(sampleOrExperiment, dataset) { + this._showViewDataSetPage = function(sampleOrExperiment, dataset, datasetV3) { //Show Form - var newView = new DataSetFormController(this, FormMode.VIEW, sampleOrExperiment, dataset); + var newView = new DataSetFormController(this, FormMode.VIEW, sampleOrExperiment, dataset, null, datasetV3); var views = this._getNewViewModel(true, true, false); newView.init(views); this.currentView = newView; } - this._showEditDataSetPage = function(sampleOrExperiment, dataset) { + this._showEditDataSetPage = function(sampleOrExperiment, dataset, datasetV3) { //Show Form - var newView = new DataSetFormController(this, FormMode.EDIT, sampleOrExperiment, dataset); + var newView = new DataSetFormController(this, FormMode.EDIT, sampleOrExperiment, dataset, null, datasetV3); var views = this._getNewViewModel(true, true, false); newView.init(views); this.currentView = newView; diff --git a/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/server/ServerFacade.js b/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/server/ServerFacade.js index c614785e8ac9835acb97c7d1eee1f37a8321fd9f..03d062a1c1b7d64789ee1b7a82cac904c71d4339 100644 --- a/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/server/ServerFacade.js +++ b/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/server/ServerFacade.js @@ -357,7 +357,7 @@ function ServerFacade(openbisServer) { this.getProjectFromIdentifier = function(identifier, callbackFunction) { this.openbisServer.listProjects(function(data) { data.result.forEach(function(project){ - var projIden = "/" + project.spaceCode + "/" + project.code; + var projIden = IdentifierUtil.getProjectIdentifier(project.spaceCode, project.code); if(projIden === identifier) { callbackFunction(project); return; @@ -439,17 +439,12 @@ function ServerFacade(openbisServer) { } - this.deleteSamples = function(samplePermIdsOrIds, reason, callback, confirmDeletions) { - if(!confirmDeletions) { - var sampleIds = samplePermIdsOrIds; - this.openbisServer.deleteSamples(sampleIds, reason, "TRASH", callback); - } else { - var samplePermIds = samplePermIdsOrIds; - require(["as/dto/sample/id/SamplePermId", "as/dto/sample/delete/SampleDeletionOptions" ], + this.deleteSamples = function(samplePermIds, reason, callback, confirmDeletions) { + require(["as/dto/sample/id/SamplePermId", "as/dto/sample/delete/SampleDeletionOptions" ], function(SamplePermId, SampleDeletionOptions) { var samplePermIdsObj = []; for(var sPIdx = 0; sPIdx < samplePermIds.length; sPIdx++) { - samplePermIdsObj.push(new SamplePermId(samplePermIds[sPIdx])); + samplePermIdsObj.push(new SamplePermId(samplePermIds[sPIdx])); } var deletionOptions = new SampleDeletionOptions(); @@ -457,14 +452,16 @@ function ServerFacade(openbisServer) { // logical deletion (move objects to the trash can) mainController.openbisV3.deleteSamples(samplePermIdsObj, deletionOptions).done(function(deletionId) { - if(confirmDeletions) { - mainController.openbisV3.confirmDeletions([deletionId]).then(callback); - } else { - callback(deletionId); - } + if(confirmDeletions) { + // Confirm deletion of samples + mainController.openbisV3.confirmDeletions([deletionId]).then(function() { + callback({}); + }); + } else { + callback(deletionId); + } }); - }); - } + }); } this.deleteExperiments = function(experimentIds, reason, callback) { @@ -507,7 +504,7 @@ function ServerFacade(openbisServer) { if(sampleToSend.id !== -1) { //Is V1 Sample listDataSetsForV1Sample(sampleToSend); } else { //Ask for a V1 Sample - this.searchWithUniqueIdV1(sampleToSend.permId, function(sampleList) { + this.searchWithUniqueId(sampleToSend.permId, function(sampleList) { listDataSetsForV1Sample(sampleList[0]); }); } @@ -945,6 +942,9 @@ function ServerFacade(openbisServer) { if(fetchOptions.withLinkedData) { fetchOptions.withLinkedData(); } + if(fetchOptions.withPhysicalData) { + fetchOptions.withPhysicalData(); + } if(fetchOptions.withParents) { fetchOptions.withParentsUsing(fetchOptions); } @@ -1457,19 +1457,7 @@ function ServerFacade(openbisServer) { } if(sampleIdentifier) { - matchClauses.push({ - "@type":"AttributeMatchClause", - fieldType : "ATTRIBUTE", - attribute : "SPACE", - desiredValue : sampleIdentifier.split("/")[1] - }); - - matchClauses.push({ - "@type":"AttributeMatchClause", - fieldType : "ATTRIBUTE", - attribute : "CODE", - desiredValue : sampleIdentifier.split("/")[2] - }); + throw "Unexpected operation exception : v1 search by sampleIdentifier removed"; } if(sampleCode) { @@ -1553,7 +1541,6 @@ function ServerFacade(openbisServer) { } if(sampleExperimentIdentifier) { - var sampleExperimentIdentifierParts = sampleExperimentIdentifier.split("/"); subCriterias.push({ "@type" : "SearchSubCriteria", "targetEntityKind" : "EXPERIMENT", @@ -1562,17 +1549,17 @@ function ServerFacade(openbisServer) { "@type":"AttributeMatchClause", fieldType : "ATTRIBUTE", attribute : "SPACE", - desiredValue : sampleExperimentIdentifierParts[1] + desiredValue : IdentifierUtil.getSpaceCodeFromIdentifier(sampleExperimentIdentifier) },{ "@type":"AttributeMatchClause", fieldType : "ATTRIBUTE", attribute : "PROJECT", - desiredValue : sampleExperimentIdentifierParts[2] + desiredValue : IdentifierUtil.getProjectCodeFromExperimentIdentifier(sampleExperimentIdentifier) }, { "@type":"AttributeMatchClause", fieldType : "ATTRIBUTE", attribute : "CODE", - desiredValue : sampleExperimentIdentifierParts[3] + desiredValue : IdentifierUtil.getCodeFromIdentifier(sampleExperimentIdentifier) }], operator : "MATCH_ALL_CLAUSES" } @@ -1679,24 +1666,53 @@ function ServerFacade(openbisServer) { { if(profile.searchSamplesUsingV3OnDropbox) { this.searchSamplesV3DSS(fechOptions, callbackFunction); + } else if(fechOptions["sampleIdentifier"]) { + this.searchSamplesV1replacement(fechOptions, callbackFunction); } else { this.searchSamplesV1(fechOptions, callbackFunction); } } - this.searchWithUniqueId = function(samplePermId, callbackFunction) - { - this.searchSamples({ - "samplePermId" : samplePermId, - "withProperties" : true, - "withAncestors" : true, - "withDescendants" : true - }, callbackFunction); + this.searchSamplesV1replacement = function(fechOptions, callbackFunction) + { + var _this = this; + require([ "as/dto/sample/id/SamplePermId", "as/dto/sample/id/SampleIdentifier", "as/dto/sample/fetchoptions/SampleFetchOptions" ], + function(SamplePermId, SampleIdentifier, SampleFetchOptions) { + var fetchOptions = new SampleFetchOptions(); + fetchOptions.withSpace(); + fetchOptions.withType(); + fetchOptions.withRegistrator(); + fetchOptions.withModifier(); + fetchOptions.withExperiment(); + + if(fechOptions["withProperties"]) { + fetchOptions.withProperties(); + } + if(fechOptions["withAncestors"]) { + fetchOptions.withParentsUsing(fetchOptions); + } + if(fechOptions["withDescendants"]) { + fetchOptions.withChildrenUsing(fetchOptions); + } + + var id = null; + if(fechOptions["samplePermId"]) { + id = new SamplePermId(fechOptions["samplePermId"]); + } + if(fechOptions["sampleIdentifier"]) { + id = new SampleIdentifier(fechOptions["sampleIdentifier"]); + } + + mainController.openbisV3.getSamples([id], fetchOptions).done(function(map) { + var samples = Util.mapValuesToList(map); + callbackFunction(_this.getV3SamplesAsV1(samples)); + }); + }); } - this.searchWithUniqueIdV1 = function(samplePermId, callbackFunction) + this.searchWithUniqueId = function(samplePermId, callbackFunction) { - this.searchSamplesV1({ + this.searchSamples({ "samplePermId" : samplePermId, "withProperties" : true, "withAncestors" : true, @@ -2070,6 +2086,36 @@ function ServerFacade(openbisServer) { }); } + this.updateDataSet = function(dataSetPermId, newPhysicalData, callbackFunction) { + require([ "as/dto/dataset/id/DataSetPermId", "as/dto/dataset/update/DataSetUpdate", + "as/dto/dataset/update/PhysicalDataUpdate", "as/dto/common/update/FieldUpdateValue"], + function(DataSetPermId, DataSetUpdate, PhysicalDataUpdate, FieldUpdateValue) { + + var update = new DataSetUpdate(); + update.setDataSetId(new DataSetPermId(dataSetPermId)); + + if (newPhysicalData) { + var physicalDataUpdate = new PhysicalDataUpdate(); + for (var property in newPhysicalData) { + if (newPhysicalData.hasOwnProperty(property)) { + var setterName = "set" + property[0].toUpperCase() + property.substr(1); + if (typeof physicalDataUpdate[setterName] === 'function') { + physicalDataUpdate[setterName](newPhysicalData[property]); + } + } + } + update.setPhysicalData(physicalDataUpdate); + } + + mainController.openbisV3.updateDataSets([update]).done(function(result) { + callbackFunction(true); + }).fail(function(result) { + Util.showError("Call failed to server: " + JSON.stringify(result)); + callbackFunction(false); + }); + }); + } + this.getSessionInformation = function(callbackFunction) { mainController.openbisV3.getSessionInformation().done(function(sessionInfo) {                 callbackFunction(sessionInfo); diff --git a/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/util/FormUtil.js b/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/util/FormUtil.js index 6a13b7d03aee2296268d8b565ce79a15e0f345ef..e9318276b6c21f6121e490e421a8de0be341bd45 100644 --- a/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/util/FormUtil.js +++ b/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/util/FormUtil.js @@ -398,7 +398,7 @@ var FormUtil = new function() { for(var pIdx = 0; pIdx < projectsToUse.length; pIdx++) { var project = projectsToUse[pIdx]; - var projectIdentifier = "/" + project.spaceCode + "/" + project.code; + var projectIdentifier = IdentifierUtil.getProjectIdentifier(project.spaceCode, project.code); if(experiment.identifier.startsWith(projectIdentifier)) { if(!project.experiments) { project.experiments = []; @@ -424,7 +424,7 @@ var FormUtil = new function() { $component.append($("<option>").attr('value', '').attr('selected', '').attr('disabled', '').text(placeHolder)); for(var pIdx = 0; pIdx < projectsToUse.length; pIdx++) { var project = projectsToUse[pIdx]; - var projectIdentifier = "/" + project.spaceCode + "/" + project.code; + var projectIdentifier = IdentifierUtil.getProjectIdentifier(project.spaceCode, project.code); if(withProjects) { $component.append($("<option>").attr('value', projectIdentifier).text(projectIdentifier)); } @@ -932,10 +932,10 @@ var FormUtil = new function() { entityPath.append("/").append(this.getFormLink(spaceCode, 'Space', spaceCode)); } if(projectCode) { - entityPath.append("/").append(this.getFormLink(projectCode, 'Project', "/" + spaceCode + "/" + projectCode)); + entityPath.append("/").append(this.getFormLink(projectCode, 'Project', IdentifierUtil.getProjectIdentifier(spaceCode, projectCode))); } if(experimentCode) { - entityPath.append("/").append(this.getFormLink(experimentCode, 'Experiment', "/" + spaceCode + "/" + projectCode + "/"+ experimentCode)); + entityPath.append("/").append(this.getFormLink(experimentCode, 'Experiment', IdentifierUtil.getExperimentIdentifier(spaceCode, projectCode, experimentCode))); } if(sampleCode && sampleIdentifierOrPermId) { entityPath.append("/"); diff --git a/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/util/IdentifierUtil.js b/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/util/IdentifierUtil.js new file mode 100644 index 0000000000000000000000000000000000000000..47e7599b00bee83bc15aea33ca172fdbc372c266 --- /dev/null +++ b/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/util/IdentifierUtil.js @@ -0,0 +1,82 @@ +var IdentifierUtil = new function() { + this.isProjectSamplesEnabled = false; + + // + // Identifier Building + // + + this.getForcedSpaceIdentifier = function(spaceCode) { // Only used by ELN + return ('/' + spaceCode); + } + + this.getMaterialIdentifier = function(materialTypeCode, materialCode) { + return ('/' + materialTypeCode + '/' + materialCode); + } + + this.getProjectIdentifier = function(spaceCode, projectCode) { + return ('/' + spaceCode + '/' + projectCode); + } + + this.getExperimentIdentifier = function(spaceCode, projectCode, experimentCode) { + return ('/' + spaceCode + '/' + projectCode + '/' + experimentCode); + } + + this.getSampleIdentifier = function(spaceCode, projectCodeOrNull, sampleCode) { + return ('/' + spaceCode + '/' + ((projectCodeOrNull && this.isProjectSamplesEnabled)?projectCodeOrNull + '/':'') + sampleCode); + } + + // + // All Identifier Parsing + // + + this.getSpaceCodeFromIdentifier = function(identifier) { + var identifierParts = identifier.split('/'); + var spaceCode; + if(identifierParts.length > 2) { //If has less parts, is a shared sample + spaceCode = identifierParts[1]; + } + return spaceCode; + }; + + this.getCodeFromIdentifier = function(identifier) { + var identifierParts = identifier.split('/'); + return identifierParts[identifierParts.length - 1]; + } + + // + // Sample Identifier Parsing + // + + this.getProjectCodeFromSampleIdentifier = function(sampleIdentifier) { + var projectCode; + var sampleIdentifierParts = sampleIdentifier.split('/'); + if(sampleIdentifierParts.length === 4) { + projectCode = sampleIdentifierParts[2]; + } + return projectCode; + } + + this.getContainerSampleIdentifierFromContainedSampleIdentifier = function(sampleIdentifier) { + var containerSampleIdentifier; + var containerIdentifierEnd = sampleIdentifier.lastIndexOf(':'); + if(containerIdentifierEnd !== -1) { + containerSampleIdentifier = sampleIdentifier.substring(0, containerIdentifierEnd); + } + return containerSampleIdentifier; + } + + // + // Experiment Identifier Parsing + // + + this.getProjectIdentifierFromExperimentIdentifier = function(experimentIdentifier) { + var spaceCode = this.getSpaceCodeFromIdentifier(experimentIdentifier); + var projectCode = this.getProjectCodeFromExperimentIdentifier(experimentIdentifier); + return this.getProjectIdentifier(spaceCode, projectCode); + } + + this.getProjectCodeFromExperimentIdentifier = function(experimentIdentifier) { + return experimentIdentifier.split('/')[2]; + }; + +} \ No newline at end of file diff --git a/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/util/PrintUtil.js b/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/util/PrintUtil.js index 770def86b5e02f050c2af1c44a6ff70c470b2150..67c3ac4a715393b02865a1bad5a9d1bb9a45024e 100644 --- a/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/util/PrintUtil.js +++ b/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/util/PrintUtil.js @@ -54,7 +54,13 @@ var PrintUtil = new function() { if(sampleTypeCode === "STORAGE_POSITION") { samplesListOfCodes += Util.getStoragePositionDisplayName(sample); } else { - samplesListOfCodes += sample.code; + var name = sample.properties[profile.propertyReplacingCode]; + if(!name) { + samplesListOfCodes += sample.code; + } else { + samplesListOfCodes += sample.code + "(" + name + ")"; + } + } } samplesListOfCodes += "</br>"; @@ -240,7 +246,7 @@ var PrintUtil = new function() { this._getMaterialIdentifierFromPropertyValue = function(propertyValue) { var materialIdentifierParts = propertyValue.split(" "); var materialType = materialIdentifierParts[1].substring(1, materialIdentifierParts[1].length-1); - var materialIdentifier = "/" + materialType + "/" + materialIdentifierParts[0]; + var materialIdentifier = IdentifierUtil.getMaterialIdentifier(materialType, materialIdentifierParts[0]); return materialIdentifier; } diff --git a/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/util/Util.js b/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/util/Util.js index aa9144242022feee795fd630ac04ad28df8adcc6..8899f48aa27446e927422e88dd2ab875e7435082 100644 --- a/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/util/Util.js +++ b/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/util/Util.js @@ -267,6 +267,14 @@ var Util = new function() { }); } + this.mapValuesToList = function(map) { + var list = []; + for(e in map) { + list.push(map[e]); + } + return list; + } + this.getDirectLinkWindows = function(protocol, config, path) { var hostName = window.location.hostname; var suffix = config.UNCsuffix; @@ -750,4 +758,4 @@ Array.prototype.uniqueOBISEntity = function() { } return a; -}; +}; \ No newline at end of file diff --git a/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/views/AdvancedSearch/AdvancedSearchView.js b/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/views/AdvancedSearch/AdvancedSearchView.js index 71573066433f037da705dc434bfb0328ba0b8dfb..0845eefb4a042ea1d1972f81243b75c499050bb8 100644 --- a/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/views/AdvancedSearch/AdvancedSearchView.js +++ b/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/views/AdvancedSearch/AdvancedSearchView.js @@ -230,7 +230,7 @@ function AdvancedSearchView(advancedSearchController, advancedSearchModel) { case "SAMPLE": fieldTypeOptions = [{value : "All", label : "All", selected : true }, {value : "Property/Attribute", label : "Property"}, - {value : "Experiment", label : ELNDictionary.ExperimentELN + "/" + ELNDictionary.ExperimentInventory}, + {value : "Experiment", label : ELNDictionary.getExperimentDualName() }, {value : "Parent", label : "Parent"}, {value : "Children", label : "Children"}]; break; @@ -242,7 +242,7 @@ function AdvancedSearchView(advancedSearchController, advancedSearchModel) { fieldTypeOptions = [{value : "All", label : "All", selected : true }, {value : "Property/Attribute", label : "Property"}, {value : "Sample", label : "" + ELNDictionary.Sample + ""}, - {value : "Experiment", label : ELNDictionary.ExperimentELN + "/" + ELNDictionary.ExperimentInventory}, + {value : "Experiment", label : ELNDictionary.getExperimentDualName() }, // ELN-UI don't support this yet // {value : "Parent", label : "Parent"}, // {value : "Children", label : "Children"} @@ -446,7 +446,7 @@ function AdvancedSearchView(advancedSearchController, advancedSearchModel) { switch(entityKind) { case "EXPERIMENT": model = [{ value : "ATTR.CODE", label : "Code" }, - { value : "ATTR.EXPERIMENT_TYPE", label : ELNDictionary.ExperimentELN + "/" + ELNDictionary.ExperimentInventory + " Type" }, + { value : "ATTR.EXPERIMENT_TYPE", label : ELNDictionary.getExperimentDualName() + " Type" }, { value : "ATTR.PERM_ID", label : "Perm Id" }, { value : "ATTR.PROJECT", label : "Project" }, { value : "ATTR.PROJECT_PERM_ID", label : "Project Perm Id" }, @@ -490,7 +490,7 @@ function AdvancedSearchView(advancedSearchController, advancedSearchModel) { var _this = this; var model = []; model.push({ value : 'ALL', label : "All", selected : true }); - model.push({ value : 'EXPERIMENT', label : ELNDictionary.ExperimentELN + "/" + ELNDictionary.ExperimentInventory }); + model.push({ value : 'EXPERIMENT', label : ELNDictionary.getExperimentDualName() }); model.push({ value : 'SAMPLE', label : "" + ELNDictionary.Sample + "" }); model.push({ value : 'DATASET', label : "Dataset" }); model.push({ value : '', label : "--------------", disabled : true }); @@ -665,7 +665,7 @@ function AdvancedSearchView(advancedSearchController, advancedSearchModel) { return getLinkOnClick(data.identifier, data, paginationInfo); } }, { - label : ELNDictionary.ExperimentELN + '/' + ELNDictionary.ExperimentInventory, + label : ELNDictionary.getExperimentDualName(), property : 'experiment', isExportable: false, sortable : false diff --git a/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/views/DataGrid/SampleDataGridUtil.js b/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/views/DataGrid/SampleDataGridUtil.js index 6fd28cf609441638dd3d7f149eb2ef42cc4ef471..410e0c71dc7265544ab37a1a3bc12cc09ce6343c 100644 --- a/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/views/DataGrid/SampleDataGridUtil.js +++ b/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/views/DataGrid/SampleDataGridUtil.js @@ -185,7 +185,7 @@ var SampleDataGridUtil = new function() { if(withExperiment) { columnsFirst.push({ - label : ELNDictionary.ExperimentELN + '/' + ELNDictionary.ExperimentInventory, + label : ELNDictionary.getExperimentDualName(), property : 'experiment', isExportable: true, sortable : false diff --git a/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/views/DataSetForm/DataSetFormController.js b/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/views/DataSetForm/DataSetFormController.js index 0bdb278f00711b1f21b8be2dde8e10b152e35c4e..a05dc6db71a4f5f5969998feb6174f5f3c5dee48 100644 --- a/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/views/DataSetForm/DataSetFormController.js +++ b/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/views/DataSetForm/DataSetFormController.js @@ -14,9 +14,9 @@ * limitations under the License. */ -function DataSetFormController(parentController, mode, entity, dataSet, isMini) { +function DataSetFormController(parentController, mode, entity, dataSet, isMini, dataSetV3) { this._parentController = parentController; - this._dataSetFormModel = new DataSetFormModel(mode, entity, dataSet, isMini); + this._dataSetFormModel = new DataSetFormModel(mode, entity, dataSet, isMini, dataSetV3); this._dataSetFormView = new DataSetFormView(this, this._dataSetFormModel); this.init = function(views) { @@ -84,11 +84,11 @@ function DataSetFormController(parentController, mode, entity, dataSet, isMini) if(_this._dataSetFormModel.isExperiment()) { mainController.changeView('showExperimentPageFromIdentifier', _this._dataSetFormModel.entity.identifier.identifier); experimentIdentifier = _this._dataSetFormModel.entity.identifier.identifier; - space = experimentIdentifier.split("/")[1]; + space = IdentifierUtil.getSpaceCodeFromIdentifier(experimentIdentifier); } else { mainController.changeView('showViewSamplePageFromPermId', _this._dataSetFormModel.entity.permId); sampleIdentifier = _this._dataSetFormModel.entity.identifier; - space = sampleIdentifier.split("/")[1]; + space = IdentifierUtil.getSpaceCodeFromIdentifier(sampleIdentifier); } var isInventory = profile.isInventorySpace(space); @@ -146,10 +146,10 @@ function DataSetFormController(parentController, mode, entity, dataSet, isMini) if(this._dataSetFormModel.isExperiment()) { experimentIdentifier = this._dataSetFormModel.entity.identifier.identifier; - space = experimentIdentifier.split("/")[1]; + space = IdentifierUtil.getSpaceCodeFromIdentifier(experimentIdentifier); } else { sampleIdentifier = this._dataSetFormModel.entity.identifier; - space = sampleIdentifier.split("/")[1]; + space = IdentifierUtil.getSpaceCodeFromIdentifier(sampleIdentifier); } var isInventory = profile.isInventorySpace(space); @@ -225,4 +225,20 @@ function DataSetFormController(parentController, mode, entity, dataSet, isMini) Util.showError("No DSS available.", function() {Util.unblockUI();}); } } + + this.setArchivingRequested = function(archivingRequested) { + var _this = this; + var dataSetPermId = this._dataSetFormModel.dataSetV3.permId.permId; + var physicalDataUpdate = { archivingRequested : archivingRequested } + Util.blockUI(); + mainController.serverFacade.updateDataSet(dataSetPermId, physicalDataUpdate, function() { + if(_this._dataSetFormModel.mode === FormMode.VIEW) { + mainController.changeView('showViewDataSetPageFromPermId', _this._dataSetFormModel.dataSet.code); + } else { + mainController.changeView('showEditDataSetPageFromPermId', _this._dataSetFormModel.dataSet.code); + } + Util.unblockUI(); + }); + } + } \ No newline at end of file diff --git a/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/views/DataSetForm/DataSetFormModel.js b/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/views/DataSetForm/DataSetFormModel.js index bf613ee4dee523eee1e803cf3b03487192b341fc..d130df0fe3c3a4c99d894250b6bb0ca05593efa8 100644 --- a/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/views/DataSetForm/DataSetFormModel.js +++ b/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/views/DataSetForm/DataSetFormModel.js @@ -14,7 +14,7 @@ * limitations under the License. */ -function DataSetFormModel(mode, entity, dataSet, isMini) { +function DataSetFormModel(mode, entity, dataSet, isMini, dataSetV3) { this.mode = mode; this.isMini = isMini; this.isAutoUpload = true; @@ -30,6 +30,7 @@ function DataSetFormModel(mode, entity, dataSet, isMini) { this.dataSet = { properties : {} }; } else { this.dataSet = dataSet; + this.dataSetV3 = dataSetV3; } this.linkedData = null; diff --git a/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/views/DataSetForm/DataSetFormView.js b/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/views/DataSetForm/DataSetFormView.js index 117a9b39a975ead70da814501543652a52bb880f..145480947f6e6288a2c8382014ec85a400cdb324 100644 --- a/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/views/DataSetForm/DataSetFormView.js +++ b/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/views/DataSetForm/DataSetFormView.js @@ -17,6 +17,7 @@ function DataSetFormView(dataSetFormController, dataSetFormModel) { this._dataSetFormController = dataSetFormController; this._dataSetFormModel = dataSetFormModel; + this.enableSelect2 = []; this.repaint = function(views) { var $container = views.content; @@ -45,15 +46,15 @@ function DataSetFormView(dataSetFormController, dataSetFormModel) { experimentIdentifier = this._dataSetFormModel.entity.experimentIdentifierOrNull; } if(experimentIdentifier) { - spaceCode = experimentIdentifier.split("/")[1]; - projectCode = experimentIdentifier.split("/")[2]; - experimentCode = experimentIdentifier.split("/")[3]; + spaceCode = IdentifierUtil.getSpaceCodeFromIdentifier(experimentIdentifier); + projectCode = IdentifierUtil.getProjectCodeFromExperimentIdentifier(experimentIdentifier); + experimentCode = IdentifierUtil.getCodeFromIdentifier(experimentIdentifier); } var sampleCode; var sampleIdentifier; if(!this._dataSetFormModel.isExperiment()) { sampleCode = this._dataSetFormModel.entity.code; - spaceCode = this._dataSetFormModel.entity.identifier.split("/")[1]; + spaceCode = IdentifierUtil.getSpaceCodeFromIdentifier(this._dataSetFormModel.entity.identifier); sampleIdentifier = this._dataSetFormModel.entity.identifier; } var datasetCodeAndPermId = this._dataSetFormModel.dataSet.code; @@ -90,6 +91,29 @@ function DataSetFormView(dataSetFormController, dataSetFormModel) { mainController.changeView('showEditDataSetPageFromPermId', _this._dataSetFormModel.dataSet.code); }); toolbarModel.push({ component : $editBtn, tooltip: "Edit" }); + + //Archiving Requested Button + var physicalData = this._dataSetFormModel.dataSetV3.physicalData; + if (profile.showDatasetArchivingButton && physicalData) { + if (physicalData.presentInArchive) { + var $archivingRequestedBtn = FormUtil.getButtonWithImage("./img/archive-archived-icon.png"); + var tooltip = "Archived"; + $archivingRequestedBtn.attr("disabled", true); + } else { + if (physicalData.archivingRequested) { + var $archivingRequestedBtn = FormUtil.getButtonWithImage("./img/archive-requested-icon.png", function () { + _this._dataSetFormController.setArchivingRequested(false); + }); + var tooltip = "Revoke archiving request"; + } else { + var $archivingRequestedBtn = FormUtil.getButtonWithImage("./img/archive-not-requested-icon.png", function () { + _this.requestArchiving(); + }); + var tooltip = "Request archiving"; + } + } + toolbarModel.push({ component : $archivingRequestedBtn, tooltip: tooltip }); + } //Delete Button var $deleteBtn = FormUtil.getDeleteButton(function(reason) { @@ -158,7 +182,7 @@ function DataSetFormView(dataSetFormController, dataSetFormModel) { } _this.isFormDirty = true; }); - + this.enableSelect2.push($dataSetTypeSelector); var $dataSetTypeDropDown = $('<div>', { class : 'form-group' }); if(!this._dataSetFormModel.isMini) { $dataSetTypeDropDown.append($('<label>', {class: "control-label"}).html('Data Set Type (*):')); @@ -198,11 +222,7 @@ function DataSetFormView(dataSetFormController, dataSetFormModel) { owner = this._dataSetFormModel.entity.identifier.identifier; } else { ownerName = ELNDictionary.Sample; - if(this._dataSetFormModel.entity.experimentIdentifierOrNull) { - owner = this._dataSetFormModel.entity.experimentIdentifierOrNull + "/" + this._dataSetFormModel.entity.code; - } else { - owner = this._dataSetFormModel.entity.identifier; - } + owner = this._dataSetFormModel.entity.identifier; } if(!this._dataSetFormModel.isMini) { @@ -388,6 +408,12 @@ function DataSetFormView(dataSetFormController, dataSetFormModel) { var dataSetViewer = new DataSetViewerController("filesViewer", profile, this._dataSetFormModel.entity, mainController.serverFacade, profile.getDefaultDataStoreURL(), [this._dataSetFormModel.dataSet], false, true); dataSetViewer.init(); } + + // Select2 + for(var cIdx = 0;cIdx < this.enableSelect2.length; cIdx++) { + this.enableSelect2[cIdx].select2({ width: '100%', theme: "bootstrap" }); + } + // } this._updateFileOptions = function() { @@ -455,6 +481,7 @@ function DataSetFormView(dataSetFormController, dataSetFormModel) { this._repaintMetadata = function(dataSetType) { var _this = this; + this.enableSelect2 = []; $("#metadataContainer").empty(); var $wrapper = $("<div>"); @@ -500,7 +527,7 @@ function DataSetFormView(dataSetFormController, dataSetFormModel) { identifier = this._dataSetFormModel.entity.identifier; } - if(!(profile.inventorySpaces.length > 0 && $.inArray(identifier.split("/")[1], profile.inventorySpaces) === -1)) { + if(!(profile.inventorySpaces.length > 0 && $.inArray(IdentifierUtil.getSpaceCodeFromIdentifier(identifier), profile.inventorySpaces) === -1)) { continue; } } @@ -558,6 +585,10 @@ function DataSetFormView(dataSetFormController, dataSetFormModel) { } } + if(propertyType.dataType === "CONTROLLEDVOCABULARY") { + this.enableSelect2.push($component); + } + //Update values if is into edit mode if(this._dataSetFormModel.mode === FormMode.EDIT) { if(propertyType.dataType === "BOOLEAN") { @@ -599,5 +630,49 @@ function DataSetFormView(dataSetFormController, dataSetFormModel) { } $("#metadataContainer").append($wrapper); + + // Select2 + for(var cIdx = 0;cIdx < this.enableSelect2.length; cIdx++) { + this.enableSelect2[cIdx].select2({ width: '100%', theme: "bootstrap" }); + } + // + } + + this.requestArchiving = function() { + var _this = this; + + var $window = $('<form>', { 'action' : 'javascript:void(0);' }); + $window.submit(function() { +     _this._dataSetFormController.setArchivingRequested(true); +     Util.unblockUI(); + }); + + $window.append($('<legend>').append('Request archiving')); + + var threshold = profile.archivingThreshold; + var warning = "Remember that your dataset will only be archived when enough data from your group is available to do so (" + threshold + ")."; + var $warning = $('<p>').text(warning); + $window.append($warning); + + var $btnAccept = $('<input>', { 'type': 'submit', 'class' : 'btn btn-primary', 'value' : 'Accept' }); + var $btnCancel = $('<a>', { 'class' : 'btn btn-default' }).append('Cancel'); + $btnCancel.click(function() { +     Util.unblockUI(); + }); + + $window.append($btnAccept).append(' ').append($btnCancel); + + var css = { +         'text-align' : 'left', +         'top' : '15%', +         'width' : '70%', +         'left' : '15%', +         'right' : '20%', +         'overflow' : 'hidden', + 'background' : '#ffffbf' + }; + + Util.blockUI($window, css); } + } \ No newline at end of file diff --git a/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/views/DataSetForm/widgets/DatasetViewerController.js b/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/views/DataSetForm/widgets/DatasetViewerController.js index 00e6c09869cd327ee5c25db4b34de47cdbb54c38..8c160433fa53a857339756f312424df976492801 100644 --- a/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/views/DataSetForm/widgets/DatasetViewerController.js +++ b/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/views/DataSetForm/widgets/DatasetViewerController.js @@ -159,4 +159,4 @@ function DataSetViewerController(containerId, profile, entity, serverFacade, dat } -} \ No newline at end of file +} diff --git a/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/views/DataSetForm/widgets/DatasetViewerView.js b/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/views/DataSetForm/widgets/DatasetViewerView.js index 89ed5dcf73b68c486984ef92516ce9f1adb2676a..e4eb9d4c6cc8d359f6987ba9f1b4e107d3dc42a4 100644 --- a/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/views/DataSetForm/widgets/DatasetViewerView.js +++ b/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/views/DataSetForm/widgets/DatasetViewerView.js @@ -303,4 +303,4 @@ function DataSetViewerView(dataSetViewerController, dataSetViewerModel) { } return currentLevel < this._level } -} \ No newline at end of file +} diff --git a/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/views/ExperimentForm/ExperimentFormController.js b/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/views/ExperimentForm/ExperimentFormController.js index 0bd4cfb81c6f97b4ada631da5adf89dc9f08c1e5..db1a41b272cf2fa8867ab48e87ee3435cd5d9352 100644 --- a/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/views/ExperimentForm/ExperimentFormController.js +++ b/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/views/ExperimentForm/ExperimentFormController.js @@ -61,11 +61,10 @@ function ExperimentFormController(mainController, mode, experiment) { var experimentType = this._mainController.profile.getExperimentTypeForExperimentTypeCode(this._experimentFormModel.experiment.experimentTypeCode); //Identification Info (This way of collecting the identifier also works for the creation mode) - var projectIdentifier = this._experimentFormModel.experiment.identifier.split("/"); - var experimentSpace = projectIdentifier[1]; - var experimentProject = projectIdentifier[2]; + var experimentSpace = IdentifierUtil.getSpaceCodeFromIdentifier(this._experimentFormModel.experiment.identifier); + var experimentProject = IdentifierUtil.getProjectCodeFromExperimentIdentifier(this._experimentFormModel.experiment.identifier); var experimentCode = this._experimentFormModel.experiment.code; - var experimentIdentifier = "/" + experimentSpace + "/" + experimentProject + "/" + experimentCode; + var experimentIdentifier = IdentifierUtil.getExperimentIdentifier(experimentSpace, experimentProject, experimentCode); var method = ""; if(this._experimentFormModel.mode === FormMode.CREATE) { diff --git a/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/views/ExperimentForm/ExperimentFormView.js b/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/views/ExperimentForm/ExperimentFormView.js index 2963624187dc165c9fe686678b413bb224a87967..13f98ba90714ed2b7048c7c4fd0ed4902a7fd16b 100644 --- a/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/views/ExperimentForm/ExperimentFormView.js +++ b/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/views/ExperimentForm/ExperimentFormView.js @@ -17,6 +17,7 @@ function ExperimentFormView(experimentFormController, experimentFormModel) { this._experimentFormController = experimentFormController; this._experimentFormModel = experimentFormModel; + this.enableSelect2 = []; this.repaint = function(views) { var $container = views.content; @@ -47,9 +48,9 @@ function ExperimentFormView(experimentFormController, experimentFormModel) { nameLabel = this._experimentFormModel.experiment.code; } - var spaceCode = this._experimentFormModel.experiment.identifier.split("/")[1]; - var projectCode = this._experimentFormModel.experiment.identifier.split("/")[2]; - var experimentCode = (this._experimentFormModel.mode !== FormMode.CREATE)?this._experimentFormModel.experiment.identifier.split("/")[3]:null; + var spaceCode = IdentifierUtil.getSpaceCodeFromIdentifier(this._experimentFormModel.experiment.identifier); + var projectCode = IdentifierUtil.getProjectCodeFromExperimentIdentifier(this._experimentFormModel.experiment.identifier); + var experimentCode = (this._experimentFormModel.mode !== FormMode.CREATE)?IdentifierUtil.getCodeFromIdentifier(this._experimentFormModel.experiment.identifier):null; var entityPath = FormUtil.getFormPath(spaceCode, projectCode, experimentCode); @@ -78,7 +79,7 @@ function ExperimentFormView(experimentFormController, experimentFormModel) { var toolbarModel = []; if(this._experimentFormModel.mode === FormMode.VIEW) { //Create Experiment Step - if(profile.getSampleTypeForSampleTypeCode("EXPERIMENTAL_STEP") && !profile.isSampleTypeHidden("EXPERIMENTAL_STEP")) { + if(profile.getSampleTypeForSampleTypeCode("EXPERIMENTAL_STEP")) { var $createBtn = FormUtil.getButtonWithIcon("glyphicon-plus", function() { var argsMap = { "sampleTypeCode" : "EXPERIMENTAL_STEP", @@ -111,9 +112,8 @@ function ExperimentFormView(experimentFormController, experimentFormModel) { //Get dropbox folder name var $uploadBtn = FormUtil.getButtonWithIcon("glyphicon-circle-arrow-up", (function () { - var splitExperimentIdentifier = _this._experimentFormModel.experiment.identifier.split("/"); - var space = splitExperimentIdentifier[1]; - var project = splitExperimentIdentifier[2]; + var space = IdentifierUtil.getSpaceCodeFromIdentifier(_this._experimentFormModel.experiment.identifier); + var project = IdentifierUtil.getProjectCodeFromExperimentIdentifier(_this._experimentFormModel.experiment.identifier); var nameElements = [ "E", space, @@ -243,6 +243,12 @@ function ExperimentFormView(experimentFormController, experimentFormModel) { // $container.append($form); + // Select2 + for(var cIdx = 0;cIdx < this.enableSelect2.length; cIdx++) { + this.enableSelect2[cIdx].select2({ width: '100%', theme: "bootstrap" }); + } + // + Util.unblockUI(); if(this._experimentFormModel.mode !== FormMode.CREATE) { @@ -275,12 +281,11 @@ function ExperimentFormView(experimentFormController, experimentFormModel) { var $identificationInfo = $('<div>').append($('<legend>').text("Identification Info")); $formColumn.append($identificationInfo); - var identifierParts = this._experimentFormModel.experiment.identifier.split("/"); - + var projectIdentifier = IdentifierUtil.getProjectIdentifierFromExperimentIdentifier(this._experimentFormModel.experiment.identifier); $formColumn.append(FormUtil.getFieldForLabelWithText("Type", this._experimentFormModel.experiment.experimentTypeCode)); - $formColumn.append(FormUtil.getFieldForLabelWithText("Project", "/" + identifierParts[1] + "/" + identifierParts[2])); + $formColumn.append(FormUtil.getFieldForLabelWithText("Project", projectIdentifier)); var $projectField = FormUtil._getInputField("text", null, "project", null, true); - $projectField.val("/" + identifierParts[1] + "/" + identifierParts[2]); + $projectField.val(projectIdentifier); $projectField.hide(); $formColumn.append($projectField); @@ -288,7 +293,7 @@ function ExperimentFormView(experimentFormController, experimentFormModel) { $formColumn.append(FormUtil.getFieldForLabelWithText("Code", this._experimentFormModel.experiment.code)); var $codeField = FormUtil._getInputField("text", null, "code", null, true); - $codeField.val(identifierParts[3]); + $codeField.val(IdentifierUtil.getCodeFromIdentifier(this._experimentFormModel.experiment.identifier)); $codeField.hide(); $formColumn.append($codeField); } else if(this._experimentFormModel.mode === FormMode.CREATE) { @@ -302,8 +307,9 @@ function ExperimentFormView(experimentFormController, experimentFormModel) { _this._experimentFormModel.experiment.code = $(this).val(); //Full Identifier - var currentIdentifier = _this._experimentFormModel.experiment.identifier.split("/"); - var experimentIdentifier = "/" + currentIdentifier[1] + "/" + currentIdentifier[2] + "/" + _this._experimentFormModel.experiment.code; + var currentIdentifierSpace = IdentifierUtil.getSpaceCodeFromIdentifier(_this._experimentFormModel.experiment.identifier); + var currentIdentifierProject = IdentifierUtil.getProjectCodeFromExperimentIdentifier(_this._experimentFormModel.experiment.identifier); + var experimentIdentifier = IdentifierUtil.getExperimentIdentifier(currentIdentifierSpace, currentIdentifierProject, _this._experimentFormModel.experiment.code); _this._experimentFormModel.experiment.identifier = experimentIdentifier; }) var $codeFieldRow = FormUtil.getFieldForComponentWithLabel($codeField, "Code"); @@ -313,14 +319,16 @@ function ExperimentFormView(experimentFormController, experimentFormModel) { delete project["@id"]; delete project["@type"]; mainController.serverFacade.listExperiments([project], function(data) { - var autoGeneratedCode = identifierParts[2] + "_EXP_" + (data.result.length + 1); + var autoGeneratedCode = IdentifierUtil.getProjectCodeFromExperimentIdentifier(_this._experimentFormModel.experiment.identifier) + "_EXP_" + (data.result.length + 1); $codeField.val(autoGeneratedCode); _this._experimentFormModel.experiment.code = autoGeneratedCode; //Full Identifier - var currentIdentifier = _this._experimentFormModel.experiment.identifier.split("/"); - var experimentIdentifier = "/" + currentIdentifier[1] + "/" + currentIdentifier[2] + "/" + _this._experimentFormModel.experiment.code; + var currentIdentifierSpace = IdentifierUtil.getSpaceCodeFromIdentifier(_this._experimentFormModel.experiment.identifier); + var currentIdentifierProject = IdentifierUtil.getProjectCodeFromExperimentIdentifier(_this._experimentFormModel.experiment.identifier); + var experimentIdentifier = IdentifierUtil.getExperimentIdentifier(currentIdentifierSpace, currentIdentifierProject, _this._experimentFormModel.experiment.code); _this._experimentFormModel.experiment.identifier = experimentIdentifier; + _this._experimentFormModel.isFormDirty = true; }); }); @@ -382,7 +390,7 @@ function ExperimentFormView(experimentFormController, experimentFormModel) { } } else { if(propertyType.code === "SHOW_IN_PROJECT_OVERVIEW") { - if(!(profile.inventorySpaces.length > 0 && $.inArray(this._experimentFormModel.experiment.identifier.split("/")[1], profile.inventorySpaces) === -1)) { + if(!(profile.inventorySpaces.length > 0 && $.inArray(IdentifierUtil.getSpaceCodeFromIdentifier(this._experimentFormModel.experiment.identifier), profile.inventorySpaces) === -1)) { continue; } } @@ -405,8 +413,19 @@ function ExperimentFormView(experimentFormController, experimentFormModel) { continue; } } else { - var $component = FormUtil.getFieldForPropertyType(propertyType, value); + var $component = null; + if(propertyType.code === "DEFAULT_OBJECT_TYPE") { + $component = FormUtil.getSampleTypeDropdown(propertyType.code, true); + this.enableSelect2.push($component); + } else { + $component = FormUtil.getFieldForPropertyType(propertyType, value); + } + //Update values if is into edit mode + if(propertyType.dataType === "CONTROLLEDVOCABULARY") { + this.enableSelect2.push($component); + } + if(this._experimentFormModel.mode === FormMode.EDIT) { if(propertyType.dataType === "BOOLEAN") { $($($component.children()[0]).children()[0]).prop('checked', value === "true"); diff --git a/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/views/ExperimentTable/ExperimentTableView.js b/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/views/ExperimentTable/ExperimentTableView.js index 8344be47eb62afbf6dc2d2c8ea4b41929a67abae..cb6641b2a30c3e45f82fcf03d7b7236c9ccdc378 100644 --- a/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/views/ExperimentTable/ExperimentTableView.js +++ b/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/views/ExperimentTable/ExperimentTableView.js @@ -52,7 +52,7 @@ function ExperimentTableView(experimentTableController, experimentTableModel) { this._showExperimentFromOverviewDropdown = function() { var _this = this; var expDropModel = []; - var projectIdentifier = "/" + this._experimentTableModel.project.spaceCode + "/" + this._experimentTableModel.project.code; + var projectIdentifier = IdentifierUtil.getProjectIdentifier(this._experimentTableModel.project.spaceCode, this._experimentTableModel.project.code); expDropModel = [{value : "OVERVIEW", label : "Show only overview " + ELNDictionary.getExperimentKindName(projectIdentifier, true), selected : this._experimentTableModel.showInProjectOverview }, {value : "ALL", label : "Show all " + ELNDictionary.getExperimentKindName(projectIdentifier, true), selected : !this._experimentTableModel.showInProjectOverview }]; @@ -76,7 +76,7 @@ function ExperimentTableView(experimentTableController, experimentTableModel) { this._getProjectExperimentTypesDropdown = function() { var _this = this; var $typesSelector = $('<select>', { class : 'form-control' }); - var projectIdentifier = "/" + this._experimentTableModel.project.spaceCode + "/" + this._experimentTableModel.project.code; + var projectIdentifier = IdentifierUtil.getProjectIdentifier(this._experimentTableModel.project.spaceCode, this._experimentTableModel.project.code); $typesSelector.append($("<option>").attr('value', '').attr('selected', '').attr('disabled', '').text("Select an " + ELNDictionary.getExperimentKindName(projectIdentifier, true) + " type")); for(typeCode in this._experimentTableModel.types) { $typesSelector.append($('<option>', { 'value' : typeCode }).text(typeCode)); diff --git a/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/views/HierarchyTable/HierarchyTableModel.js b/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/views/HierarchyTable/HierarchyTableModel.js index 71217c16c0d43d59f3982ea3361edbe88a4ede5c..ead5b531db4a6e189b3879bdd8e34732c348a102 100644 --- a/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/views/HierarchyTable/HierarchyTableModel.js +++ b/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/views/HierarchyTable/HierarchyTableModel.js @@ -71,7 +71,7 @@ function HierarchyTableModel(entity) { var historyId = null; if(entity.properties && entity.properties["HISTORY_ID"]) { - historyId = dataset.properties["HISTORY_ID"]; + historyId = entity.properties["HISTORY_ID"]; } dataList.push({ diff --git a/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/views/ProjectForm/ProjectFormController.js b/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/views/ProjectForm/ProjectFormController.js index 5b34f7456d4ea4da03618b27d40ad41efeecbfeb..2e0aaa5fa1f15438eb9e3cdb029de675b7148b19 100644 --- a/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/views/ProjectForm/ProjectFormController.js +++ b/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/views/ProjectForm/ProjectFormController.js @@ -38,7 +38,7 @@ function ProjectFormController(mainController, mode, project) { this.createNewExperiment = function(experimentTypeCode) { var argsMap = { "experimentTypeCode" : experimentTypeCode, - "projectIdentifier" : "/" + this._projectFormModel.project.spaceCode + "/" + this._projectFormModel.project.code + "projectIdentifier" : IdentifierUtil.getProjectIdentifier(this._projectFormModel.project.spaceCode, this._projectFormModel.project.code) } var argsMapStr = JSON.stringify(argsMap); @@ -71,7 +71,7 @@ function ProjectFormController(mainController, mode, project) { //API Method "method" : method, //Identification Info - "projectIdentifier" : "/" + this._projectFormModel.project.spaceCode + "/" + this._projectFormModel.project.code, + "projectIdentifier" : IdentifierUtil.getProjectIdentifier(this._projectFormModel.project.spaceCode, this._projectFormModel.project.code), "projectDescription" : this._projectFormModel.project.description }; diff --git a/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/views/ProjectForm/ProjectFormView.js b/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/views/ProjectForm/ProjectFormView.js index 70240c1f632711ab666d771bf9ef1cfd3baf487b..3426f14f49ef247a3ffa929d9461fd668d1efd39 100644 --- a/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/views/ProjectForm/ProjectFormView.js +++ b/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/views/ProjectForm/ProjectFormView.js @@ -21,7 +21,7 @@ function ProjectFormView(projectFormController, projectFormModel) { this.repaint = function(views) { var $container = views.content; var _this = this; - + var projectIdentifier = IdentifierUtil.getProjectIdentifier(_this._projectFormModel.project.spaceCode, _this._projectFormModel.project.code); var $form = $("<div>"); var $formColumn = $("<form>", { @@ -63,7 +63,7 @@ function ProjectFormView(projectFormController, projectFormModel) { if(this._projectFormModel.mode === FormMode.VIEW) { var showSelectExperimentType = function() { var $dropdown = FormUtil.getExperimentTypeDropdown("experimentTypeDropdown", true); - Util.blockUI("Select the type for the " + ELNDictionary.getExperimentKindName("/" + _this._projectFormModel.project.spaceCode) + ": <br><br>" + $dropdown[0].outerHTML + "<br> or <a class='btn btn-default' id='experimentTypeDropdownCancel'>Cancel</a>"); + Util.blockUI("Select the type for the " + ELNDictionary.getExperimentKindName(projectIdentifier) + ": <br><br>" + $dropdown[0].outerHTML + "<br> or <a class='btn btn-default' id='experimentTypeDropdownCancel'>Cancel</a>"); $("#experimentTypeDropdown").on("change", function(event) { var experimentTypeCode = $("#experimentTypeDropdown")[0].value; @@ -90,8 +90,7 @@ function ProjectFormView(projectFormController, projectFormModel) { _this._projectFormController.createNewExperiment("DEFAULT_EXPERIMENT"); } }); - - toolbarModel.push({ component : $createExpBtn, tooltip: "Create " + ELNDictionary.getExperimentKindName("/" + _this._projectFormModel.project.spaceCode) }); + toolbarModel.push({ component : $createExpBtn, tooltip: "Create " + ELNDictionary.getExperimentKindName(projectIdentifier) }); } //Edit @@ -130,7 +129,7 @@ function ProjectFormView(projectFormController, projectFormModel) { } //Operations - var $operationsMenu = FormUtil.getOperationsMenu([{ label: "Create " + ELNDictionary.getExperimentKindName("/" + _this._projectFormModel.project.spaceCode), event: function() { + var $operationsMenu = FormUtil.getOperationsMenu([{ label: "Create " + ELNDictionary.getExperimentKindName(projectIdentifier), event: function() { showSelectExperimentType(); }}]); toolbarModel.push({ component : $operationsMenu, tooltip: "Extra operations" }); @@ -175,7 +174,7 @@ function ProjectFormView(projectFormController, projectFormModel) { // Experiment And Samples Table if(this._projectFormModel.mode !== FormMode.CREATE && !isInventoryProject) { var $experimentsContainer = $("<div>"); - $formColumn.append($("<legend>").append(ELNDictionary.getExperimentKindName("/" + _this._projectFormModel.project.spaceCode, true))) + $formColumn.append($("<legend>").append(ELNDictionary.getExperimentKindName(projectIdentifier, true))) $formColumn.append($experimentsContainer); var experimentTableController = new ExperimentTableController(this._projectFormController, null, jQuery.extend(true, {}, this._projectFormModel.project), true); diff --git a/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/views/SampleForm/SampleFormController.js b/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/views/SampleForm/SampleFormController.js index 11bb2c8bf1b5c03f14889e818e305239b76d6509..f2515780d0b02023c74a34b489ba70de3d1c238b 100644 --- a/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/views/SampleForm/SampleFormController.js +++ b/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/views/SampleForm/SampleFormController.js @@ -96,18 +96,18 @@ function SampleFormController(mainController, mode, sample, paginationInfo) { this.deleteSample = function(reason) { var _this = this; - var samplesToDelete = [this._sampleFormModel.sample.id]; + var samplesToDelete = [this._sampleFormModel.sample.permId]; for(var idx = 0; idx < this._sampleFormModel.sample.children.length; idx++) { var child = this._sampleFormModel.sample.children[idx]; if(child.sampleTypeCode === "STORAGE_POSITION") { - samplesToDelete.push(child.id); + samplesToDelete.push(child.permId); } } - mainController.serverFacade.deleteSamples(samplesToDelete, reason, function(data) { - if(data.error) { - Util.showError(data.error.message); + mainController.serverFacade.deleteSamples(samplesToDelete, reason, function(response) { + if(response.error) { + Util.showError(response.error.message); } else { Util.showSuccess("" + ELNDictionary.Sample + " Deleted"); if(_this._sampleFormModel.isELNSample) { @@ -231,9 +231,9 @@ function SampleFormController(mainController, mode, sample, paginationInfo) { var experimentIdentifier = sample.experimentIdentifierOrNull; if(experimentIdentifier) { //If there is a experiment detected, the sample should be attached to the experiment completely. - sampleSpace = experimentIdentifier.split("/")[1]; - sampleProject = experimentIdentifier.split("/")[2]; - sampleExperiment = experimentIdentifier.split("/")[3]; + sampleSpace = IdentifierUtil.getSpaceCodeFromIdentifier(experimentIdentifier); + sampleProject = IdentifierUtil.getProjectCodeFromExperimentIdentifier(experimentIdentifier); + sampleExperiment = IdentifierUtil.getCodeFromIdentifier(experimentIdentifier); } //Children to create @@ -276,7 +276,7 @@ function SampleFormController(mainController, mode, sample, paginationInfo) { if(!samplesToDelete) { samplesToDelete = []; } - samplesToDelete.push(child.id); + samplesToDelete.push(child.permId); } }); } @@ -372,6 +372,11 @@ function SampleFormController(mainController, mode, sample, paginationInfo) { var stacktrace = response.result.rows[0][1].value; Util.showStacktraceAsError(stacktrace); } else if (response.result.columns[0].title === "STATUS" && response.result.rows[0][0].value === "OK") { //Success Case + var permId = null; + if(response.result.columns[2].title === "RESULT" && response.result.rows[0][2].value) { + permId = response.result.rows[0][2].value; + } + var sampleType = profile.getSampleTypeForSampleTypeCode(_this._sampleFormModel.sample.sampleTypeCode); var sampleTypeDisplayName = sampleType.description; if(!sampleTypeDisplayName) { @@ -396,16 +401,9 @@ function SampleFormController(mainController, mode, sample, paginationInfo) { } } - var sampleIdentifierToOpen = null; - if(isCopyWithNewCode) { - sampleIdentifierToOpen = "/" + _this._sampleFormModel.sample.spaceCode + "/" + isCopyWithNewCode; - } else { - sampleIdentifierToOpen = "/" + _this._sampleFormModel.sample.spaceCode + "/" + _this._sampleFormModel.sample.code; - } - var searchUntilFound = null; searchUntilFound = function() { - mainController.serverFacade.searchWithIdentifiers([sampleIdentifierToOpen], function(data) { + mainController.serverFacade.searchWithUniqueId(permId, function(data) { if(data && data.length > 0) { mainController.changeView('showViewSamplePageFromPermId',data[0].permId); Util.unblockUI(); @@ -414,7 +412,6 @@ function SampleFormController(mainController, mode, sample, paginationInfo) { } }); } - searchUntilFound(); //First call } diff --git a/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/views/SampleForm/SampleFormView.js b/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/views/SampleForm/SampleFormView.js index 8db750519042b74a31eabc075af299f208b21ffe..97bfbe8d90b7da32f9f0aa2895cdfc691514f75b 100644 --- a/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/views/SampleForm/SampleFormView.js +++ b/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/views/SampleForm/SampleFormView.js @@ -17,6 +17,7 @@ function SampleFormView(sampleFormController, sampleFormModel) { this._sampleFormController = sampleFormController; this._sampleFormModel = sampleFormModel; + this.enableSelect2 = []; this.repaint = function(views, loadFromTemplate) { var $container = views.content; @@ -54,18 +55,15 @@ function SampleFormView(sampleFormController, sampleFormModel) { var experimentCode; if(this._sampleFormModel.sample.experimentIdentifierOrNull) { var experimentIdentifier = this._sampleFormModel.sample.experimentIdentifierOrNull; - projectCode = experimentIdentifier.split("/")[2]; - experimentCode = experimentIdentifier.split("/")[3]; + projectCode = IdentifierUtil.getProjectCodeFromExperimentIdentifier(experimentIdentifier); + experimentCode = IdentifierUtil.getCodeFromIdentifier(experimentIdentifier); } - var containerSampleCode; var containerSampleIdentifier; + var containerSampleCode; if(this._sampleFormModel.mode !== FormMode.CREATE) { - var containerIdentifierEnd = this._sampleFormModel.sample.identifier.lastIndexOf(":"); - if(containerIdentifierEnd !== -1) { - var containerCodeStart = this._sampleFormModel.sample.identifier.lastIndexOf("/") + 1; - var codeWithContainerParts = this._sampleFormModel.sample.identifier.substring(containerCodeStart).split(":"); - containerSampleCode = codeWithContainerParts[0]; - containerSampleIdentifier = this._sampleFormModel.sample.identifier.substring(0, containerIdentifierEnd); + containerSampleIdentifier = IdentifierUtil.getContainerSampleIdentifierFromContainedSampleIdentifier(this._sampleFormModel.sample.identifier); + if(containerSampleIdentifier) { + containerSampleCode = IdentifierUtil.getCodeFromIdentifier(containerSampleIdentifier); } } var sampleCode = this._sampleFormModel.sample.code; @@ -529,6 +527,12 @@ function SampleFormView(sampleFormController, sampleFormModel) { // $container.append($form); + // Select2 + for(var cIdx = 0;cIdx < this.enableSelect2.length; cIdx++) { + this.enableSelect2[cIdx].select2({ width: '100%', theme: "bootstrap" }); + } + // + // // Extra content // @@ -617,6 +621,11 @@ function SampleFormView(sampleFormController, sampleFormModel) { } } else { var $component = FormUtil.getFieldForPropertyType(propertyType, value); + + if(propertyType.dataType === "CONTROLLEDVOCABULARY") { + this.enableSelect2.push($component); + } + //Update values if is into edit mode if(this._sampleFormModel.mode === FormMode.EDIT || loadFromTemplate) { if(propertyType.dataType === "BOOLEAN") { @@ -696,7 +705,9 @@ function SampleFormView(sampleFormController, sampleFormModel) { $fieldsetOwner.append($fieldset); $fieldset.append(FormUtil.getFieldForLabelWithText("Type", this._sampleFormModel.sample.sampleTypeCode)); - $fieldset.append(FormUtil.getFieldForLabelWithText(ELNDictionary.getExperimentKindName("/" + this._sampleFormModel.sample.spaceCode), this._sampleFormModel.sample.experimentIdentifierOrNull)); + if(this._sampleFormModel.sample.experimentIdentifierOrNull) { + $fieldset.append(FormUtil.getFieldForLabelWithText(ELNDictionary.getExperimentKindName(this._sampleFormModel.sample.experimentIdentifierOrNull), this._sampleFormModel.sample.experimentIdentifierOrNull)); + } // // Identification Info - Code @@ -951,7 +962,7 @@ function SampleFormView(sampleFormController, sampleFormModel) { var $generateButton = $("<a>", { "class" : "btn btn-default" }).append("Generate!"); $generateButton.click(function(event) { var generatedChildrenSpace = _this._sampleFormModel.sample.spaceCode; - + var generatedChildrenProject = IdentifierUtil.getProjectCodeFromSampleIdentifier(_this._sampleFormModel.sample.identifier); var numberOfReplicas = parseInt($("#childrenReplicas").val()); if(isNaN(numberOfReplicas) || numberOfReplicas < 0 || numberOfReplicas > 1000) { Util.showError("The number of children replicas should be an integer number bigger than 0 and lower than 1000.", function() {}, true); @@ -967,7 +978,7 @@ function SampleFormView(sampleFormController, sampleFormModel) { virtualSample.newSample = true; virtualSample.permId = Util.guid(); virtualSample.code = generatedChildrenCodes[i]; - virtualSample.identifier = "/" + generatedChildrenSpace + "/" + virtualSample.code; + virtualSample.identifier = IdentifierUtil.getSampleIdentifier(generatedChildrenSpace, generatedChildrenProject, virtualSample.code); virtualSample.sampleTypeCode = generatedChildrenType; _this._sampleFormModel.sampleLinksChildren.addVirtualSample(virtualSample); } diff --git a/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/views/SampleForm/widgets/LinksView.js b/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/views/SampleForm/widgets/LinksView.js index c328e24d250cf1c94e14596c18f71f9c415f640d..2a1f5ec00cf3f175a969fef088faf11345a334dd 100644 --- a/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/views/SampleForm/widgets/LinksView.js +++ b/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/views/SampleForm/widgets/LinksView.js @@ -254,12 +254,15 @@ function LinksView(linksController, linksModel) { property : propertyAnnotationCode, isExportable: true, showByDefault: true, - sortable : true, + sortable : false, render : function(data) { var sample = data["$object"]; var currentValue = linksModel.readState(sample.permId, propertyType.code); if(linksModel.isDisabled) { + if(propertyType.dataType === "CONTROLLEDVOCABULARY") { + currentValue = FormUtil.getVocabularyLabelForTermCode(propertyType, currentValue); + } return currentValue; } else { var $field = FormUtil.getFieldForPropertyType(propertyType); @@ -313,7 +316,9 @@ function LinksView(linksController, linksModel) { $copyAndLink.click(function(e) { stopEventsBuble(e); var copyAndLink = function(code) { - var newSampleIdentifier = "/" + mainController.currentView._sampleFormModel.sample.spaceCode + "/" + code; + var newSampleIdentifier = IdentifierUtil.getSampleIdentifier(mainController.currentView._sampleFormModel.sample.spaceCode, + mainController.currentView._sampleFormModel.sample.projectCode, + code); Util.blockUI(); mainController.serverFacade.customELNApi({ "method" : "copyAndLinkAsParent", diff --git a/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/views/SampleForm/widgets/PlateController.js b/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/views/SampleForm/widgets/PlateController.js index f62270732b4a679c547d5a0639d5fac6826ded2c..67b3b7395f1a53b54294f094503290d5d3769512 100644 --- a/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/views/SampleForm/widgets/PlateController.js +++ b/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/views/SampleForm/widgets/PlateController.js @@ -60,8 +60,8 @@ function PlateController(sample, isDisabled) { this._getMaterialIdentifierFromPropertyValue = function(propertyValue) { var materialIdentifierParts = propertyValue.split(" "); - var materialType = materialIdentifierParts[1].substring(1, materialIdentifierParts[1].length-1); - var materialIdentifier = "/" + materialType + "/" + materialIdentifierParts[0]; + var materialType = materialIdentifierParts[1].substring(1, materialIdentifierParts[1].length - 1); + var materialIdentifier = IdentifierUtil.getMaterialIdentifier(materialType, materialIdentifierParts[0]); return materialIdentifier; } diff --git a/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/views/SampleForm/widgets/StorageListView.js b/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/views/SampleForm/widgets/StorageListView.js index 247902a6e25eb5cc45deb2233a8ebb4c3e77ac4f..342ed9f8c2a081429c090b7d36cf3150358f84ab 100644 --- a/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/views/SampleForm/widgets/StorageListView.js +++ b/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/views/SampleForm/widgets/StorageListView.js @@ -170,7 +170,7 @@ function StorageListView(storageListController, storageListModel) { newSample : true, newSampleJustCreated : true, code : uuid, - identifier : "/" + profile.getStorageSpaceForSample(_this._storageListModel.sample) + "/" + uuid, + identifier : IdentifierUtil.getSampleIdentifier(profile.getStorageSpaceForSample(_this._storageListModel.sample), null, uuid), sampleTypeCode : "STORAGE_POSITION", properties : {} }; diff --git a/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/views/SampleForm/widgets/ordering/NewProductsController.js b/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/views/SampleForm/widgets/ordering/NewProductsController.js index 0caf43d1e24081bb1ac7e86d83159a68c9c91eb2..f6ead7a643b2555e87d42c76efe72cba0eb30b64 100644 --- a/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/views/SampleForm/widgets/ordering/NewProductsController.js +++ b/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/views/SampleForm/widgets/ordering/NewProductsController.js @@ -39,7 +39,7 @@ function NewProductsController() { permId : "PERM_ID_PLACEHOLDER_FOR/STOCK_CATALOG/" + codePrefix + nextCodeNumber, sampleTypeCode : "PRODUCT", experimentIdentifierOrNull : "/STOCK_CATALOG/PRODUCTS/PRODUCT_COLLECTION", - identifier : "/STOCK_CATALOG/" + codePrefix + nextCodeNumber, + identifier : IdentifierUtil.getSampleIdentifier("STOCK_CATALOG", "PRODUCTS", codePrefix + nextCodeNumber), code : codePrefix + nextCodeNumber, parentsIdentifiers : [$($($productProperties[4]).children()[0]).val()], properties : { diff --git a/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/views/SampleTable/SampleTableController.js b/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/views/SampleTable/SampleTableController.js index 80822ec80279910ce038b10357b1ca4fdce6bfd0..455f5f2256afb4d1ddbef79f84a04202121bf75b 100644 --- a/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/views/SampleTable/SampleTableController.js +++ b/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/views/SampleTable/SampleTableController.js @@ -90,22 +90,22 @@ function SampleTableController(parentController, title, experimentIdentifier, pr Util.blockUI(); mainController.serverFacade.searchWithIdentifiers(sampleIdentifiers, function(selectedSamples) { - var sampleTechIds = []; + var samplePermIds = []; for(var sIdx = 0; sIdx < selectedSamples.length; sIdx++) { var selectedSample = selectedSamples[sIdx]; - sampleTechIds.push(selectedSample.id); + samplePermIds.push(selectedSample.permId); warningText += selectedSample.identifier + " "; for(var idx = 0; idx < selectedSample.children.length; idx++) { var child = selectedSample.children[idx]; if(child.sampleTypeCode === "STORAGE_POSITION") { - sampleTechIds.push(child.id); + samplePermIds.push(child.permId); } } } var modalView = new DeleteEntityController(function(reason) { - mainController.serverFacade.deleteSamples(sampleTechIds, reason, function(data) { + mainController.serverFacade.deleteSamples(samplePermIds, reason, function(data) { if(data.error) { Util.showError(data.error.message); } else { diff --git a/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/views/SampleTable/SampleTableView.js b/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/views/SampleTable/SampleTableView.js index 6bde1267c519390715daa68e161e7b4ee32c9355..8926c735710c3d34ba731a17f7c0dbefa4e65c1a 100644 --- a/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/views/SampleTable/SampleTableView.js +++ b/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/views/SampleTable/SampleTableView.js @@ -26,14 +26,14 @@ function SampleTableView(sampleTableController, sampleTableModel) { var $title = $("<div>"); if(this._sampleTableModel.title && this._sampleTableModel.experimentIdentifier) { - var title = "" + ELNDictionary.getExperimentKindName(this._sampleTableModel.experimentIdentifier) + ": " + this._sampleTableModel.experimentIdentifier.substring(this._sampleTableModel.experimentIdentifier.lastIndexOf("/") + 1); + var title = "" + ELNDictionary.getExperimentKindName(this._sampleTableModel.experimentIdentifier) + ": " + IdentifierUtil.getCodeFromIdentifier(this._sampleTableModel.experimentIdentifier); if(this._sampleTableModel.experiment && this._sampleTableModel.experiment.properties[profile.propertyReplacingCode]) { title = "" + ELNDictionary.getExperimentKindName(this._sampleTableModel.experimentIdentifier) + ": " + this._sampleTableModel.experiment.properties[profile.propertyReplacingCode]; } - var spaceCode = this._sampleTableModel.experimentIdentifier.split("/")[1]; - var projectCode = this._sampleTableModel.experimentIdentifier.split("/")[2]; - var experimentCode = this._sampleTableModel.experimentIdentifier.split("/")[3]; + var spaceCode = IdentifierUtil.getSpaceCodeFromIdentifier(this._sampleTableModel.experimentIdentifier); + var projectCode = IdentifierUtil.getProjectCodeFromExperimentIdentifier(this._sampleTableModel.experimentIdentifier); + var experimentCode = IdentifierUtil.getCodeFromIdentifier(this._sampleTableModel.experimentIdentifier); var entityPath = FormUtil.getFormPath(spaceCode, projectCode, experimentCode); $title @@ -48,8 +48,8 @@ function SampleTableView(sampleTableController, sampleTableModel) { // var toolbarModel = []; if(this._sampleTableModel.experimentIdentifier) { - var experimentSpace = this._sampleTableModel.experimentIdentifier.split("/")[1]; - var experimentCode = this._sampleTableModel.experimentIdentifier.split("/")[3]; + var experimentSpace = IdentifierUtil.getSpaceCodeFromIdentifier(this._sampleTableModel.experimentIdentifier); + var experimentCode = IdentifierUtil.getCodeFromIdentifier(this._sampleTableModel.experimentIdentifier); var allSampleTypes = profile.getAllSampleTypes(); var sampleTypeCodesFound = []; for(var aIdx = 0; aIdx < allSampleTypes.length; aIdx++) { @@ -219,7 +219,7 @@ function SampleTableView(sampleTableController, sampleTableModel) { allowedSampleTypes = [this._sampleTableModel.sampleTypeCodeToUse, "STORAGE_POSITION"]; } if(experimentIdentifier) { - forcedSpace = "/" + experimentIdentifier.split("/")[1]; + forcedSpace = IdentifierUtil.getForcedSpaceIdentifier(IdentifierUtil.getSpaceCodeFromIdentifier(experimentIdentifier)); } var typeAndFileController = new TypeAndFileController('Register ' + ELNDictionary.Samples + '', "REGISTRATION", function(type, file) { @@ -245,7 +245,7 @@ function SampleTableView(sampleTableController, sampleTableModel) { var experimentIdentifierOrDelete = experimentIdentifier; if(experimentIdentifierOrDelete && typeAndFileController.getSampleTypeCode() === "STORAGE_POSITION") { experimentIdentifierOrDelete = "__DELETE__"; - forcedSpace = "/STORAGE"; + forcedSpace = IdentifierUtil.getForcedSpaceIdentifier("STORAGE"); } if(infoData.result.identifiersPressent) { //If identifiers are present they should match the space of the experiment mainController.serverFacade.registerSamplesWithSilentOverrides(typeAndFileController.getSampleTypeCode(), forcedSpace, experimentIdentifierOrDelete, "sample-file-upload", null, finalCallback); @@ -266,7 +266,7 @@ function SampleTableView(sampleTableController, sampleTableModel) { allowedSampleTypes = [this._sampleTableModel.sampleTypeCodeToUse, "STORAGE_POSITION"]; } if(experimentIdentifier) { - forcedSpace = "/" + experimentIdentifier.split("/")[1]; + forcedSpace = IdentifierUtil.getForcedSpaceIdentifier(IdentifierUtil.getSpaceCodeFromIdentifier(experimentIdentifier)); } var typeAndFileController = new TypeAndFileController('Update ' + ELNDictionary.Samples + '', "UPDATE", function(type, file) { Util.blockUI(); @@ -286,7 +286,7 @@ function SampleTableView(sampleTableController, sampleTableModel) { var experimentIdentifierOrDelete = experimentIdentifier; if(experimentIdentifierOrDelete && typeAndFileController.getSampleTypeCode() === "STORAGE_POSITION") { experimentIdentifierOrDelete = "__DELETE__"; - forcedSpace = "/STORAGE"; + forcedSpace = IdentifierUtil.getForcedSpaceIdentifier("STORAGE"); } mainController.serverFacade.fileUpload(typeAndFileController.getFile(), function(result) { diff --git a/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/views/SampleTable/widgets/MoveSampleController.js b/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/views/SampleTable/widgets/MoveSampleController.js index 3d2aee2070ac3732f82dc232d56e8b7c73ceddc0..2ae9c23cbe8242bae4b23091b420fa29e65d1af1 100644 --- a/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/views/SampleTable/widgets/MoveSampleController.js +++ b/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/views/SampleTable/widgets/MoveSampleController.js @@ -57,11 +57,10 @@ function MoveSampleController(samplePermId, successAction) { //Add Experiment to the menu if new if(_this._moveSampleModel.isNewExperiment) { var experimentIdentifier = _this._moveSampleModel.experimentIdentifier; - var experimentIdentifierParts = experimentIdentifier.split("/"); - var isInventory = profile.isInventorySpace(experimentIdentifierParts[1]); + var isInventory = profile.isInventorySpace(IdentifierUtil.getSpaceCodeFromIdentifier(experimentIdentifier)); mainController.sideMenu.refreshExperiment({ identifier: _this._moveSampleModel.experimentIdentifier, - code: experimentIdentifierParts[3], + code: IdentifierUtil.getCodeFromIdentifier(experimentIdentifier), properties : {} }, isInventory); } diff --git a/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/views/SampleTable/widgets/MoveSampleView.js b/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/views/SampleTable/widgets/MoveSampleView.js index c0cb6e53f3226700883621c4b4570b237b639046..3847bfd44a3540bb3b72dd2159c1637f788ae97c 100644 --- a/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/views/SampleTable/widgets/MoveSampleView.js +++ b/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/views/SampleTable/widgets/MoveSampleView.js @@ -76,9 +76,11 @@ function MoveSampleView(moveSampleController, moveSampleModel) { //Events var newExpEvent = function(event){ $expNameField.val($expNameField.val().toUpperCase()); - var valueProject = $dropdown.val(); - var valueExperiment = $expNameField.val(); - _this._moveSampleModel.experimentIdentifier = valueProject + "/" + valueExperiment; + var projectIdentifier = $dropdown.val(); + var projectSpace = IdentifierUtil.getSpaceCodeFromIdentifier(projectIdentifier); + var projectCode = IdentifierUtil.getCodeFromIdentifier(projectIdentifier); + var experimentCode = $expNameField.val(); + _this._moveSampleModel.experimentIdentifier = IdentifierUtil.getExperimentIdentifier(projectSpace, projectCode, experimentCode); }; var newTypeEVent = function(event) { var value = $(event.target).val(); diff --git a/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/views/SampleTable/widgets/TypeAndFileView.js b/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/views/SampleTable/widgets/TypeAndFileView.js index d1469443edf61043776faa564cd6c3d742a64abf..742b9eae68018e5825dc8909e7f05a86d0aa3a48 100644 --- a/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/views/SampleTable/widgets/TypeAndFileView.js +++ b/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/views/SampleTable/widgets/TypeAndFileView.js @@ -29,8 +29,8 @@ function TypeAndFileView(typeAndFileController, typeAndFileModel) { }); $window.append($('<legend>').append(this._typeAndFileModel.title)); - - var $sampleTypeDropDown = FormUtil.getSampleTypeDropdown(null, true, ["STORAGE_POSITION"], this._typeAndFileModel.allowedSampleTypes); + + var $sampleTypeDropDown = FormUtil.getSampleTypeDropdown(null, true, this._typeAndFileModel.allowedSampleTypes, this._typeAndFileModel.allowedSampleTypes); $sampleTypeDropDown.change(function(event) { _this._typeAndFileModel.sampleTypeCode = $(this).val(); _this.updateLink($(this).val()); diff --git a/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/views/SettingsForm/SettingsFormView.js b/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/views/SettingsForm/SettingsFormView.js index 9e1c5b6bbe7bdd7db389dc7076796bc5f19ee97c..ce315a4e8875cd6e5059756bde5d987c652df3ed 100644 --- a/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/views/SettingsForm/SettingsFormView.js +++ b/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/views/SettingsForm/SettingsFormView.js @@ -27,6 +27,7 @@ function SettingsFormView(settingsFormController, settingsFormModel) { this._sampleTypeDefinitionsMiscellaneousSettingsTableModels = {}; // key: sample type; value: table model this._sampleTypeDefinitionsSettingsTableModels = {}; // key: sample type; value: table model this._sampleTypeDefinitionsHintsTableModels = {}; // key: sample type; value: table model + this._miscellaneousTableModel = null; this.repaint = function(views, profileToEdit) { var _this = this; @@ -85,6 +86,7 @@ function SettingsFormView(settingsFormController, settingsFormModel) { this._paintInventorySpacesSection($formColumn, texts.inventorySpaces); this._paintDataSetTypesForFileNamesSection($formColumn, texts.dataSetTypeForFileName); this._paintSampleTypesDefinition($formColumn,texts.sampleTypeDefinitionsExtension); + this._paintMiscellaneous($formColumn, texts.miscellaneous) $container.append($form); @@ -102,6 +104,7 @@ function SettingsFormView(settingsFormController, settingsFormModel) { forceMonospaceFont : this._forcedMonospaceTableModel.getValues(), inventorySpaces : this._inventorySpacesTableModel.getValues(), sampleTypeDefinitionsExtension : this._getSampleTypeDefinitionsExtension(), + showDatasetArchivingButton : this._miscellaneousTableModel.getValues()["Show Dataset archiving button"], }; } @@ -359,6 +362,46 @@ function SettingsFormView(settingsFormController, settingsFormModel) { } } + this._paintMiscellaneous = function($container, text) { + var $fieldset = this._getFieldset($container, text.title, "settings-section-miscellaneous"); + $fieldset.append(FormUtil.getInfoText(text.info)); + this._miscellaneousTableModel = this._getMiscellaneousTableModel(); + $fieldset.append(this._getTable(this._miscellaneousTableModel)); + } + + this._getMiscellaneousTableModel = function() { + var tableModel = this._getTableModel(); + tableModel.fullWidth = false; + // define columns + tableModel.columns = [{ label : "Setting"}, { label : "enabled"}]; + tableModel.rowBuilders = { + "Setting" : function(rowData) { + return $("<span>").text(rowData.showDataSetArchivingButton); + }, + "enabled" : function(rowData) { + var $checkbox = $("<input>", { type : "checkbox", name : "cb" }); + if (rowData.enabled) { + $checkbox.attr("checked", true); + } + return $checkbox; + } + }; + // add data + tableModel.addRow({ + showDataSetArchivingButton : "Show Dataset archiving button", + enabled : this._profileToEdit.showDatasetArchivingButton + }); + // transform output + tableModel.valuesTransformer = function(values) { + var settings = {}; + for (var value of values) { + settings[value["Setting"]] = value["enabled"]; + } + return settings; + }; + return tableModel; + } + this._getSampleTypesDefinitionMiscellaneousSettingsTableModel = function(sampleTypeSettings) { var tableModel = this._getTableModel(); tableModel.fullWidth = false; diff --git a/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/views/SideMenu/SideMenuWidgetView.js b/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/views/SideMenu/SideMenuWidgetView.js index 9f5a5014915539291676f09b23995c0a21789ee7..1ec0ea1eaeed4728cfb247d384ad4e23123956bd 100644 --- a/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/views/SideMenu/SideMenuWidgetView.js +++ b/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/views/SideMenu/SideMenuWidgetView.js @@ -379,7 +379,7 @@ function SideMenuWidgetView(sideMenuWidgetController, sideMenuWidgetModel) { if(experiment.properties && experiment.properties[profile.propertyReplacingCode]) { experimentDisplayName = experiment.properties[profile.propertyReplacingCode]; } - var isInventorySpace = profile.isInventorySpace(experiment.getIdentifier().getIdentifier().split("/")[1]); + var isInventorySpace = profile.isInventorySpace(IdentifierUtil.getSpaceCodeFromIdentifier(experiment.getIdentifier().getIdentifier())); var viewToUse = null; var loadSamples = null; if(isInventorySpace) { diff --git a/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/views/StorageManager/StorageManagerController.js b/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/views/StorageManager/StorageManagerController.js index ac82992429c41b49a0e62c931cde315684a40ae4..5661b61fc829403bf8321bc7598420e850e052f5 100644 --- a/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/views/StorageManager/StorageManagerController.js +++ b/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/views/StorageManager/StorageManagerController.js @@ -203,9 +203,9 @@ function StorageManagerController(mainController) { var experimentIdentifier = sample.experimentIdentifierOrNull; if(experimentIdentifier) { //If there is a experiment detected, the sample should be attached to the experiment completely. - sampleSpace = experimentIdentifier.split("/")[1]; - sampleProject = experimentIdentifier.split("/")[2]; - sampleExperiment = experimentIdentifier.split("/")[3]; + sampleSpace = IdentifierUtil.getSpaceCodeFromIdentifier(experimentIdentifier); + sampleProject = IdentifierUtil.getProjectCodeFromExperimentIdentifier(experimentIdentifier); + sampleExperiment = IdentifierUtil.getCodeFromIdentifier(experimentIdentifier); } var operation = { diff --git a/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/views/legacy/SampleHierarchy.js b/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/views/legacy/SampleHierarchy.js index 154f639434d6b3764e759e3812c77d99a5fd65f8..54b397207e900f0a63bc667ff3ebc73c2140368e 100644 --- a/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/views/legacy/SampleHierarchy.js +++ b/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/views/legacy/SampleHierarchy.js @@ -99,18 +99,22 @@ function SampleHierarchy(serverFacade, views, profile, sample) { return false; } + var FILTERED = {}; + var selectedSampleTypesFilter = function(sample, selectedSampleTypes) { - if(sample.parents) { - for(var i = 0; i < sample.parents.length; i++) { - sample.parents[i].showLabel = inArray(sample.parents[i].sampleTypeCode, selectedSampleTypes); - selectedSampleTypesFilter(sample.parents[i], selectedSampleTypes); + if(!FILTERED[sample.permId]) { + FILTERED[sample.permId] = true; + if(sample.parents) { + for(var i = 0; i < sample.parents.length; i++) { + sample.parents[i].showLabel = inArray(sample.parents[i].sampleTypeCode, selectedSampleTypes); + selectedSampleTypesFilter(sample.parents[i], selectedSampleTypes); + } } - - } - if(sample.children) { - for(var i = 0; i < sample.children.length; i++) { - sample.children[i].showLabel = inArray(sample.children[i].sampleTypeCode, selectedSampleTypes); - selectedSampleTypesFilter(sample.children[i], selectedSampleTypes); + if(sample.children) { + for(var i = 0; i < sample.children.length; i++) { + sample.children[i].showLabel = inArray(sample.children[i].sampleTypeCode, selectedSampleTypes); + selectedSampleTypesFilter(sample.children[i], selectedSampleTypes); + } } } } @@ -277,6 +281,8 @@ function SampleHierarchy(serverFacade, views, profile, sample) { var _this = this; function addSampleNodes(sample, rootPermId) { if(!NODES[sample.permId]) { + NODES[sample.permId] = true; + var nodeId = _this.nodeIdPrefix + sample.permId; var $nodeContent = $('<div>'); $nodeContent.css({ @@ -321,7 +327,6 @@ function SampleHierarchy(serverFacade, views, profile, sample) { var $sampleLink = $('<a>', { 'href' : "javascript:mainController.changeView('showViewSamplePageFromPermId', '" + sample.permId + "')"}).text(nameLabel); - if(sample.showLabel || (sample.permId === rootPermId)) { $nodeContent .append($hideLink) @@ -370,38 +375,38 @@ function SampleHierarchy(serverFacade, views, profile, sample) { } g.addNode(sample.permId, { label: $nodeContent[0].outerHTML}); - NODES[sample.permId] = true; - } - - if(sample.parents && !sample.hideGraphConnections && !sample.hideParents) { - sample.parents.forEach(addSampleNodes, rootPermId); - } - if(sample.children && !sample.hideGraphConnections && !sample.hideChildren) { - sample.children.forEach(addSampleNodes, rootPermId); + if(sample.parents && !sample.hideGraphConnections && !sample.hideParents) { + sample.parents.forEach(addSampleNodes, rootPermId); + } + if(sample.children && !sample.hideGraphConnections && !sample.hideChildren) { + sample.children.forEach(addSampleNodes, rootPermId); + } } } var EDGES = {}; function addSampleEdges(sample) { - if(sample.parents && !sample.hideGraphConnections && !sample.hideParents) { - for(var i=0; i < sample.parents.length; i++) { - if(!EDGES[sample.parents[i].permId + ' -> ' + sample.permId]) { - g.addEdge(null, sample.parents[i].permId, sample.permId); - EDGES[sample.parents[i].permId + ' -> ' + sample.permId] = true; + if(!EDGES[sample.permId]) { + EDGES[sample.permId] = true; + if(sample.parents && !sample.hideGraphConnections && !sample.hideParents) { + for(var i=0; i < sample.parents.length; i++) { + if(!EDGES[sample.parents[i].permId + ' -> ' + sample.permId]) { + g.addEdge(null, sample.parents[i].permId, sample.permId); + EDGES[sample.parents[i].permId + ' -> ' + sample.permId] = true; + } } + sample.parents.forEach(addSampleEdges); } - sample.parents.forEach(addSampleEdges); - } - if(sample.children && !sample.hideGraphConnections && !sample.hideChildren) { - for(var i=0; i < sample.children.length; i++) { - if(!EDGES[sample.permId + ' -> ' + sample.children[i].permId]) { - g.addEdge(null, sample.permId, sample.children[i].permId); - EDGES[sample.permId + ' -> ' + sample.children[i].permId] = true; + if(sample.children && !sample.hideGraphConnections && !sample.hideChildren) { + for(var i=0; i < sample.children.length; i++) { + if(!EDGES[sample.permId + ' -> ' + sample.children[i].permId]) { + g.addEdge(null, sample.permId, sample.children[i].permId); + EDGES[sample.permId + ' -> ' + sample.children[i].permId] = true; + } } + sample.children.forEach(addSampleEdges); } - - sample.children.forEach(addSampleEdges); } } diff --git a/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/lib/cycle/js/cycle.js b/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/lib/cycle/js/cycle.js new file mode 100644 index 0000000000000000000000000000000000000000..5cc45470f19671c21dd9899730c217e2f190857b --- /dev/null +++ b/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/lib/cycle/js/cycle.js @@ -0,0 +1,182 @@ +/* + cycle.js + 2018-05-15 + + Public Domain. + + NO WARRANTY EXPRESSED OR IMPLIED. USE AT YOUR OWN RISK. + + This code should be minified before deployment. + See http://javascript.crockford.com/jsmin.html + + USE YOUR OWN COPY. IT IS EXTREMELY UNWISE TO LOAD CODE FROM SERVERS YOU DO + NOT CONTROL. +*/ + +// The file uses the WeakMap feature of ES6. + +/*jslint eval */ + +/*property + $ref, decycle, forEach, get, indexOf, isArray, keys, length, push, + retrocycle, set, stringify, test +*/ + +if (typeof JSON.decycle !== "function") { + JSON.decycle = function decycle(object, replacer) { + "use strict"; + +// Make a deep copy of an object or array, assuring that there is at most +// one instance of each object or array in the resulting structure. The +// duplicate references (which might be forming cycles) are replaced with +// an object of the form + +// {"$ref": PATH} + +// where the PATH is a JSONPath string that locates the first occurance. + +// So, + +// var a = []; +// a[0] = a; +// return JSON.stringify(JSON.decycle(a)); + +// produces the string '[{"$ref":"$"}]'. + +// If a replacer function is provided, then it will be called for each value. +// A replacer function receives a value and returns a replacement value. + +// JSONPath is used to locate the unique object. $ indicates the top level of +// the object or array. [NUMBER] or [STRING] indicates a child element or +// property. + + var objects = new WeakMap(); // object to path mappings + + return (function derez(value, path) { + +// The derez function recurses through the object, producing the deep copy. + + var old_path; // The path of an earlier occurance of value + var nu; // The new object or array + +// If a replacer function was provided, then call it to get a replacement value. + + if (replacer !== undefined) { + value = replacer(value); + } + +// typeof null === "object", so go on if this value is really an object but not +// one of the weird builtin objects. + + if ( + typeof value === "object" + && value !== null + && !(value instanceof Boolean) + && !(value instanceof Date) + && !(value instanceof Number) + && !(value instanceof RegExp) + && !(value instanceof String) + ) { + +// If the value is an object or array, look to see if we have already +// encountered it. If so, return a {"$ref":PATH} object. This uses an +// ES6 WeakMap. + + old_path = objects.get(value); + if (old_path !== undefined) { + return {$ref: old_path}; + } + +// Otherwise, accumulate the unique value and its path. + + objects.set(value, path); + +// If it is an array, replicate the array. + + if (Array.isArray(value)) { + nu = []; + value.forEach(function (element, i) { + nu[i] = derez(element, path + "[" + i + "]"); + }); + } else { + +// If it is an object, replicate the object. + + nu = {}; + Object.keys(value).forEach(function (name) { + nu[name] = derez( + value[name], + path + "[" + JSON.stringify(name) + "]" + ); + }); + } + return nu; + } + return value; + }(object, "$")); + }; +} + + +if (typeof JSON.retrocycle !== "function") { + JSON.retrocycle = function retrocycle($) { + "use strict"; + +// Restore an object that was reduced by decycle. Members whose values are +// objects of the form +// {$ref: PATH} +// are replaced with references to the value found by the PATH. This will +// restore cycles. The object will be mutated. + +// The eval function is used to locate the values described by a PATH. The +// root object is kept in a $ variable. A regular expression is used to +// assure that the PATH is extremely well formed. The regexp contains nested +// * quantifiers. That has been known to have extremely bad performance +// problems on some browsers for very long strings. A PATH is expected to be +// reasonably short. A PATH is allowed to belong to a very restricted subset of +// Goessner's JSONPath. + +// So, +// var s = '[{"$ref":"$"}]'; +// return JSON.retrocycle(JSON.parse(s)); +// produces an array containing a single element which is the array itself. + + var px = /^\$(?:\[(?:\d+|"(?:[^\\"\u0000-\u001f]|\\(?:[\\"\/bfnrt]|u[0-9a-zA-Z]{4}))*")\])*$/; + + (function rez(value) { + +// The rez function walks recursively through the object looking for $ref +// properties. When it finds one that has a value that is a path, then it +// replaces the $ref object with a reference to the value that is found by +// the path. + + if (value && typeof value === "object") { + if (Array.isArray(value)) { + value.forEach(function (element, i) { + if (typeof element === "object" && element !== null) { + var path = element.$ref; + if (typeof path === "string" && px.test(path)) { + value[i] = eval(path); + } else { + rez(element); + } + } + }); + } else { + Object.keys(value).forEach(function (name) { + var item = value[name]; + if (typeof item === "object" && item !== null) { + var path = item.$ref; + if (typeof path === "string" && px.test(path)) { + value[name] = eval(path); + } else { + rez(item); + } + } + }); + } + } + }($)); + return $; + }; +} diff --git a/openbis_standard_technologies/dist/core-plugins/eln-lims/1/dss/reporting-plugins/eln-lims-api/script.py b/openbis_standard_technologies/dist/core-plugins/eln-lims/1/dss/reporting-plugins/eln-lims-api/script.py index 15cb416d85c76eb08540681e2b2d0a4556baf89f..ac2cea51cc06db647b5a52a30c905d38956b3b64 100644 --- a/openbis_standard_technologies/dist/core-plugins/eln-lims/1/dss/reporting-plugins/eln-lims-api/script.py +++ b/openbis_standard_technologies/dist/core-plugins/eln-lims/1/dss/reporting-plugins/eln-lims-api/script.py @@ -15,6 +15,7 @@ # # IDataSetRegistrationTransactionV2 Class +from ch.systemsx.cisd.openbis.dss.generic.shared import ServiceProvider from ch.systemsx.cisd.openbis.dss.client.api.v1 import DssComponentFactory from ch.systemsx.cisd.openbis.generic.shared.api.v1.dto import SearchCriteria from ch.systemsx.cisd.openbis.generic.shared.api.v1.dto.SearchCriteria import MatchClause, SearchOperator, MatchClauseAttribute @@ -103,7 +104,10 @@ def getDirectLinkURL(): "sftp" : sftpConfig }); - +def createSampleIdentifier(sampleSpace, sampleProject, sampleCode, projectSamplesEnabled): + template = '/%(sampleSpace)s/%(sampleProject)s/%(sampleCode)s' if projectSamplesEnabled and (sampleProject is not None) else '/%(sampleSpace)s/%(sampleCode)s' + return template % vars() + def isSampleTypeAvailable(sampleTypes, sampleTypeCode): for sampleType in sampleTypes: if sampleType.getCode() == sampleTypeCode: @@ -165,9 +169,17 @@ def getPropertyValue(propertiesInfo, metadata, key): propertyValue = updateIfIsPropertyRichText(propertiesInfo, key, propertyValue); return propertyValue; +def getProjectCodeFromSampleIdentifier(sampleIdentifier): + projectCode = None; + sampleIdentifierParts = sampleIdentifier.split("/"); + if len(sampleIdentifierParts) == 4: + projectCode = sampleIdentifierParts[2]; + return projectCode; + def getSampleByIdentifierForUpdate(tr, identifier): space = identifier.split("/")[1]; - code = identifier.split("/")[2]; + projectCode = getProjectCodeFromSampleIdentifier(identifier); + code = identifier.split("/")[-1]; criteria = SearchCriteria(); criteria.addMatchClause(MatchClause.createAttributeMatch(MatchClauseAttribute.SPACE, space)); @@ -176,10 +188,12 @@ def getSampleByIdentifierForUpdate(tr, identifier): searchService = tr.getSearchService(); found = list(searchService.searchForSamples(criteria)); - if len(found) == 1: - return tr.makeSampleMutable(found[0]); - else: - return None; + + # The search service can return more than one sample with project samples enabled, projects need to be filtered manually + for sample in found: + foundProjectCode = getProjectCodeFromSampleIdentifier(sample.getSampleIdentifier()); + if foundProjectCode == projectCode: + return tr.makeSampleMutable(sample); def username(sessiontoken): m = re.compile('(.*)-[^-]*').match(sessiontoken) @@ -195,14 +209,16 @@ def process(tr, parameters, tableBuilder): sessionToken = parameters.get("sessionToken"); #String sessionId = username(sessionToken); #String tr.setUserId(userId); + v3 = HttpInvokerUtils.createServiceStub(IApplicationServerApi, OPENBISURL + IApplicationServerApi.SERVICE_URL, 30 * 1000); + projectSamplesEnabled = v3.getServerInformation(sessionToken)['project-samples-enabled'] == 'true' if method == "init": - isOk = init(tr, parameters, tableBuilder); + isOk = init(tr, projectSamplesEnabled, parameters, tableBuilder); if method == "isFileAuthUser": result = isFileAuthUser(tr, parameters, tableBuilder); isOk = True; if method == "searchSamples": - result = searchSamples(tr, parameters, tableBuilder, sessionId); + result = searchSamples(tr, v3, parameters, tableBuilder, sessionId); isOk = True; if method == "registerUserPassword": isOk = registerUserPassword(tr, parameters, tableBuilder); @@ -216,7 +232,7 @@ def process(tr, parameters, tableBuilder): isOk = copyAndLinkAsParent(tr, parameters, tableBuilder); if method == "batchOperation": - isOk = batchOperation(tr, parameters, tableBuilder); + isOk = batchOperation(tr, projectSamplesEnabled, parameters, tableBuilder); if method == "insertProject": isOk = insertUpdateProject(tr, parameters, tableBuilder); @@ -231,13 +247,16 @@ def process(tr, parameters, tableBuilder): isOk = insertUpdateExperiment(tr, parameters, tableBuilder); if method == "copySample": - isOk = copySample(tr, parameters, tableBuilder); + result = copySample(tr, projectSamplesEnabled, parameters, tableBuilder); + isOk = True; if method == "insertSample": updatePropertiesToIgnore(tr); - isOk = insertUpdateSample(tr, parameters, tableBuilder); + result = insertUpdateSample(tr, projectSamplesEnabled, parameters, tableBuilder); + isOk = True; if method == "updateSample": updatePropertiesToIgnore(tr); - isOk = insertUpdateSample(tr, parameters, tableBuilder); + result = insertUpdateSample(tr, projectSamplesEnabled, parameters, tableBuilder); + isOk = True; if method == "moveSample": isOk = moveSample(tr, parameters, tableBuilder); if method == "insertDataSet": @@ -429,7 +448,7 @@ def insertSampleIfMissing(tr, sampleIdentifier, experiment, sampleType, properti sample.setPropertyValue(key, properties[key]); return sample; -def init(tr, parameters, tableBuilder): +def init(tr, projectSamplesEnabled, parameters, tableBuilder): projectsCache = {}; installedTypes = getSampleTypes(tr, parameters); inventorySpace = tr.getSpace("DEFAULT_LAB_NOTEBOOK"); @@ -468,7 +487,8 @@ def init(tr, parameters, tableBuilder): if isFirstTimeInstallingStorage: insertProjectIfMissing(tr, "/ELN_SETTINGS/STORAGES", projectsCache); storageCollection = insertExperimentIfMissing(tr, "/ELN_SETTINGS/STORAGES/STORAGES_COLLECTION", "COLLECTION", "Storages Collection"); - bench = insertSampleIfMissing(tr, "/ELN_SETTINGS/BENCH", storageCollection, "STORAGE", None); + benchIdentifier = createSampleIdentifier("ELN_SETTINGS", "STORAGES", "BENCH", projectSamplesEnabled) + bench = insertSampleIfMissing(tr, benchIdentifier, storageCollection, "STORAGE", None); bench.setPropertyValue("NAME", "Bench"); bench.setPropertyValue("ROW_NUM", "1"); bench.setPropertyValue("COLUMN_NUM", "1"); @@ -477,7 +497,8 @@ def init(tr, parameters, tableBuilder): bench.setPropertyValue("BOX_SPACE_WARNING", "80"); bench.setPropertyValue("STORAGE_VALIDATION_LEVEL", "BOX_POSITION"); - defaultStorage = insertSampleIfMissing(tr, "/ELN_SETTINGS/DEFAULT_STORAGE", storageCollection, "STORAGE", None); + defaultStorageIdentifier = createSampleIdentifier("ELN_SETTINGS", "STORAGES", "DEFAULT_STORAGE", projectSamplesEnabled) + defaultStorage = insertSampleIfMissing(tr, defaultStorageIdentifier, storageCollection, "STORAGE", None); defaultStorage.setPropertyValue("NAME", "Default Storage"); defaultStorage.setPropertyValue("ROW_NUM", "4"); defaultStorage.setPropertyValue("COLUMN_NUM", "4"); @@ -668,13 +689,13 @@ def insertDataSet(tr, parameters, tableBuilder): tempDirFile.mkdirs(); #tempDir = System.getProperty("java.io.tmpdir"); - dss_component = DssComponentFactory.tryCreate(parameters.get("sessionID"), OPENBISURL); + dss_component = ServiceProvider.getDssServiceRpcGeneric().getService(); for fileName in fileNames: folderFile = File(tempDir + "/" + folderName); folderFile.mkdir(); temFile = File(tempDir + "/" + folderName + "/" + fileName); - inputStream = dss_component.getFileFromSessionWorkspace(fileName); + inputStream = dss_component.getFileFromSessionWorkspace(parameters.get("sessionID"), fileName); outputStream = FileOutputStream(temFile); IOUtils.copyLarge(inputStream, outputStream); IOUtils.closeQuietly(inputStream); @@ -711,7 +732,7 @@ def insertDataSet(tr, parameters, tableBuilder): tr.moveFile(temFile.getAbsolutePath(), dataSet); #Clean Files from workspace for fileName in fileNames: - dss_component.deleteSessionWorkspaceFile(fileName); + dss_component.deleteSessionWorkspaceFile(parameters.get("sessionID"), fileName); #Return from the call return True; @@ -742,18 +763,19 @@ def copyAndLinkAsParent(tr, parameters, tableBuilder): return True; -def copySample(tr, parameters, tableBuilder): +def copySample(tr, projectSamplesEnabled, parameters, tableBuilder): #Store Children to copy later sampleSpace = parameters.get("sampleSpace"); #String + sampleProject = parameters.get("sampleProject"); #String sampleCode = parameters.get("sampleCode"); #String - sampleIdentifier = '/' + sampleSpace + '/' + sampleCode; + sampleIdentifier = createSampleIdentifier(sampleSpace, sampleProject, sampleCode, projectSamplesEnabled) sampleChildren = parameters.get("sampleChildren"); #List<String> Identifiers are in SPACE/CODE format parameters.put("sampleChildren", []); #List<String> Identifiers are in SPACE/CODE format #Create new Sample parameters.put("method", "insertSample"); #List<String> Identifiers are in SPACE/CODE format - insertUpdateSample(tr, parameters, tableBuilder); + permId = insertUpdateSample(tr, projectSamplesEnabled, parameters, tableBuilder); #Copy children and attach to Sample if sampleChildren != None: @@ -767,7 +789,7 @@ def copySample(tr, parameters, tableBuilder): except: #For all other children copyChildCode = parameters.get("sampleCode") + "_" + child.getCode(); - copyChildIdentifier = "/" + parameters.get("sampleSpace") + "/" + copyChildCode; + copyChildIdentifier = createSampleIdentifier(sampleSpace, sampleProject, copyChildCode, projectSamplesEnabled) # Create new sample children childCopy = tr.createNewSample(copyChildIdentifier, child.getSampleType()); #Create Sample given his id @@ -790,7 +812,7 @@ def copySample(tr, parameters, tableBuilder): if propValue != None: childCopy.setPropertyValue(propCode, propValue); - return True; + return permId; #This method is used to return the properties, deleting the storage ones and setting the default storage def getCopySampleChildrenPropertyValue(propCode, propValue, notCopyProperties, defaultBenchPropertyList, defaultBenchProperties): @@ -803,14 +825,14 @@ def getCopySampleChildrenPropertyValue(propCode, propValue, notCopyProperties, d else: return propValue; -def batchOperation(tr, parameters, tableBuilder): +def batchOperation(tr, projectSamplesEnabled, parameters, tableBuilder): for operationParameters in parameters.get("operations"): if operationParameters.get("method") == "updateSample": operationParameters["sessionToken"] = parameters.get("sessionToken"); - insertUpdateSample(tr, operationParameters, tableBuilder); + insertUpdateSample(tr, projectSamplesEnabled, operationParameters, tableBuilder); return True; -def insertUpdateSample(tr, parameters, tableBuilder): +def insertUpdateSample(tr, projectSamplesEnabled, parameters, tableBuilder): properties = getProperties(tr, parameters); #Mandatory parameters @@ -830,8 +852,8 @@ def insertUpdateSample(tr, parameters, tableBuilder): sampleParentsNew = parameters.get("sampleParentsNew"); #Create/Get for update sample - sampleIdentifier = '/' + sampleSpace + '/' + sampleCode; - + sampleIdentifier = createSampleIdentifier(sampleSpace, sampleProject, sampleCode, projectSamplesEnabled) + print "sampleIdentifier: " + sampleIdentifier method = parameters.get("method"); if method == "insertSample": sample = tr.createNewSample(sampleIdentifier, sampleType); #Create Sample given his id @@ -951,7 +973,7 @@ def insertUpdateSample(tr, parameters, tableBuilder): sampleWithChanges.setPropertyValue(key,propertyValue); #Return from the call - return True; + return sample.getPermId(); def moveSample(tr, parameters, tableBuilder): sampleIdentifier = parameters.get("sampleIdentifier"); #String @@ -988,9 +1010,7 @@ def insertUpdateExperiment(tr, parameters, tableBuilder): return True; -def searchSamples(tr, parameters, tableBuilder, sessionId): - v3 = HttpInvokerUtils.createServiceStub(IApplicationServerApi, OPENBISURL + IApplicationServerApi.SERVICE_URL, 30 * 1000); - +def searchSamples(tr, v3, parameters, tableBuilder, sessionId): ############### ############### V3 Search ############### diff --git a/openbis_standard_technologies/dist/core-plugins/eln-lims/1/dss/reporting-plugins/exports-api/exports-api.py b/openbis_standard_technologies/dist/core-plugins/eln-lims/1/dss/reporting-plugins/exports-api/exports-api.py index 967ac293879781a51622842803ec052a7c31af18..36fd450fa618975df6fd1fa9284b4a887c134521 100644 --- a/openbis_standard_technologies/dist/core-plugins/eln-lims/1/dss/reporting-plugins/exports-api/exports-api.py +++ b/openbis_standard_technologies/dist/core-plugins/eln-lims/1/dss/reporting-plugins/exports-api/exports-api.py @@ -344,8 +344,8 @@ def export(sessionToken, entities, includeRoot, userEmail, mailClient): fetchOps.withModifier(); fetchOps.withProperties(); fetchOps.withTags(); - fetchOps.withParents(); - fetchOps.withChildren(); + fetchOps.withParents().withProperties(); + fetchOps.withChildren().withProperties(); entityObj = v3.searchSamples(sessionToken, criteria, fetchOps).getObjects().get(0); entityFilePath = getFilePath(entityObj.getExperiment().getProject().getSpace().getCode(), entityObj.getExperiment().getProject().getCode(), entityObj.getExperiment().getCode(), entityObj.getCode(), None); if type == "DATASET": @@ -359,8 +359,8 @@ def export(sessionToken, entities, includeRoot, userEmail, mailClient): fetchOps.withModifier(); fetchOps.withProperties(); fetchOps.withTags(); - fetchOps.withParents(); - fetchOps.withChildren(); + fetchOps.withParents().withProperties(); + fetchOps.withChildren().withProperties(); entityObj = v3.searchDataSets(sessionToken, criteria, fetchOps).getObjects().get(0); sampleCode = None @@ -483,11 +483,18 @@ def getDOCX(entityObj, v3, sessionToken, isHTML): docxBuilder.addHeader("Parents"); parents = entityObj.getParents(); for parent in parents: - docxBuilder.addParagraph(parent.getCode()); + relCodeName = parent.getCode(); + if "NAME" in parent.getProperties(): + relCodeName = relCodeName + " (" + parent.getProperties()["NAME"] + ")"; + docxBuilder.addParagraph(relCodeName); + docxBuilder.addHeader("Children"); children = entityObj.getChildren(); for child in children: - docxBuilder.addParagraph(child.getCode()); + relCodeName = child.getCode(); + if "NAME" in child.getProperties(): + relCodeName = relCodeName + " (" + child.getProperties()["NAME"] + ")"; + docxBuilder.addParagraph(relCodeName); if not isinstance(entityObj, Project): docxBuilder.addHeader("Properties"); @@ -566,11 +573,17 @@ def getTXT(entityObj, v3, sessionToken, isRichText): txtBuilder.append("# Parents:").append("\n"); parents = entityObj.getParents(); for parent in parents: - txtBuilder.append("- ").append(parent.getCode()).append("\n"); + relCodeName = parent.getCode(); + if "NAME" in parent.getProperties(): + relCodeName = relCodeName + " (" + parent.getProperties()["NAME"] + ")"; + txtBuilder.append("- ").append(relCodeName).append("\n"); txtBuilder.append("# Children:").append("\n"); children = entityObj.getChildren(); for child in children: - txtBuilder.append("- ").append(child.getCode()).append("\n"); + relCodeName = child.getCode(); + if "NAME" in child.getProperties(): + relCodeName = relCodeName + " (" + child.getProperties()["NAME"] + ")"; + txtBuilder.append("- ").append(relCodeName).append("\n"); if not isinstance(entityObj, Project): txtBuilder.append("# Properties:").append("\n"); diff --git a/openbis_standard_technologies/dist/server/service.properties b/openbis_standard_technologies/dist/server/service.properties index 5a3431b14ebed33be0ad679a89087ad58659aec1..a18ff9c438c2504aa0524b96713e02755ddfa0d5 100644 --- a/openbis_standard_technologies/dist/server/service.properties +++ b/openbis_standard_technologies/dist/server/service.properties @@ -130,7 +130,7 @@ authorization.project-level.users = .* # Note: Changing to 'true' turns experiment samples to project samples # which can not be reverted after setting this flag back to 'false'. Also # the sample identifier will change for such samples. -project-samples-enabled = true +#project-samples-enabled = true # --------------------------------------------------------------------------- # Client configuration diff --git a/openbis_standard_technologies/dist/tarball/installer/data/doc/getting-started-with-openBIS.html b/openbis_standard_technologies/dist/tarball/installer/data/doc/getting-started-with-openBIS.html index 1ac0db79bd8579b616ee083eac6f8ae7cf3f127a..d68c42953b5070f8bf91477b1268ad2455d69579 100644 --- a/openbis_standard_technologies/dist/tarball/installer/data/doc/getting-started-with-openBIS.html +++ b/openbis_standard_technologies/dist/tarball/installer/data/doc/getting-started-with-openBIS.html @@ -65,7 +65,7 @@ <li>Log in to <a href="https://${HOSTNAME}:8443/openbis">openBIS</a> as admin. </li> - <li>Open the Experiment Browser by clicking on the menu item Browse -> Experiments and open the default experiment. </li> + <li>Open the Collection Browser by clicking on the menu item Browse -> Collections and open the default collection. </li> <li>Click on the Data Set Uploader tab and upload one or several files.</li> @@ -97,7 +97,7 @@ </ol> <div class="text"> - It will create an experiment in project /TEST/PROT which shows a list of proteins. We challenge you to go find it + It will create an collection in project /TEST/PROT which shows a list of proteins. We challenge you to go find it in the running application ! </div> @@ -109,9 +109,9 @@ <li>Log in to <a href="https://${HOSTNAME}:8443/openbis">openBIS</a> as admin. </li> - <li>Open experiment type browser by clicking on menu item Admin -> Types -> Experiment Types.</li> + <li>Open collection type browser by clicking on menu item Admin -> Types -> Collection Types.</li> - <li>Create experiment type SIRNA_HCS.</li> + <li>Create collection type SIRNA_HCS.</li> <li>At the console execute the command: @@ -137,7 +137,7 @@ </div> </li> - <li>A flow cell output from a HiSeq2000 is registered as a data set of the sample 120420_SN792_0109_BC0P8LACXX.<br> + <li>A flow cell output from a HiSeq2000 is registered as a data set of the object 120420_SN792_0109_BC0P8LACXX.<br> Additionally a data set is registered for each flow lane: @@ -159,14 +159,14 @@ </div> </li> - <li> For creating some samples we use the 'Sample Registration'. This is available under the 'Import' menu: <br> - Import -> Sample Registration -> Choose sample type '(multiple)' and browse to the file: + <li> For creating some objects we use the 'Object Registration'. This is available under the 'Import' menu: <br> + Import -> Object Registration -> Choose object type '(multiple)' and browse to the file: <div class="sourcecode"> ${DSS_ROOT_DIR}/examples/illumina-ngs/tsv-files/example_samples_with_parents.tsv</div> Tick 'Update existing'and press the 'Save' button. <br> - This created several samples which can be viewed via Browse -> Samples. You might need to select the Sample Type 'all' <br> + This created several objects which can be viewed via Browse -> Objects. You might need to select the Object Type 'all' <br> and the Space 'all'. <br> - Note that the samples are in a parent-/child relationship indicated by the samples shown in the 'Parents' column. + Note that the objects are in a parent-/child relationship indicated by the objects shown in the 'Parents' column. </li> <br> @@ -183,8 +183,8 @@ touch ${DSS_ROOT_DIR}/register-unaligned/.MARKER_is_finished_120420_SN792_0109_BC0P8LACXX; </div> <br> - The demultiplexed FASTQ files are a data set of the samples BSSE-QGF-LIBRARY-1 and BSSE-QGF-LIBRARY-2. Note that lane 1 and two <br> - contained both samples which results in two FASTQ data sets for each sample. + The demultiplexed FASTQ files are a data set of the objects BSSE-QGF-LIBRARY-1 and BSSE-QGF-LIBRARY-2. Note that lane 1 and two <br> + contained both objects which results in two FASTQ data sets for each object. </li> </ol><br> diff --git a/openbis_standard_technologies/dist/tarball/installer/data/examples/illumina-ngs/tsv-files/example_samples_with_parents.tsv b/openbis_standard_technologies/dist/tarball/installer/data/examples/illumina-ngs/tsv-files/example_samples_with_parents.tsv index a7aab24233660b50bb0c7d7621d280f8ca02fc0a..44ec8cc76928c583ab09107ff58f0eec855d8c61 100644 --- a/openbis_standard_technologies/dist/tarball/installer/data/examples/illumina-ngs/tsv-files/example_samples_with_parents.tsv +++ b/openbis_standard_technologies/dist/tarball/installer/data/examples/illumina-ngs/tsv-files/example_samples_with_parents.tsv @@ -1 +1 @@ -[MASTER_SAMPLE] identifier container parents experiment BIOLOGICAL_SAMPLE_ARRIVED CONTACT_PERSON_EMAIL PRINCIPAL_INVESTIGATOR_EMAIL CONTACT_PERSON_NAME PRINCIPAL_INVESTIGATOR_NAME NOTES NCBI_ORGANISM_TAXONOMY SAMPLE_KIND /BSSE_FLOWCELLS/FLOWCELLS/BSSE-QGF-MASTER-4 /BSSE_FLOWCELLS/FLOWCELLS/Test-Experiment 2013-04-24 11:00:00 +0100 My name mail22bsse mail@bsse PI Name 9606 CHIP [RAW_SAMPLE] identifier container parents experiment CONCENTRATION_ORIGINAL_ILLUMINA EXTERNAL_SAMPLE_NAME LIBRARY_PROCESSING_POSSIBLE_YES_NO NOTES PREPARED_BY KIT_PREPARED /BSSE_FLOWCELLS/FLOWCELLS/BSSE-QGF-RAW-6 /BSSE_FLOWCELLS/FLOWCELLS/BSSE-QGF-MASTER-4 /BSSE_FLOWCELLS/FLOWCELLS/Test-Experiment 4 Chip Seq1 YES me 2013-04-23 11:00:00 +0100 /BSSE_FLOWCELLS/FLOWCELLS/BSSE-QGF-RAW-8 /BSSE_FLOWCELLS/FLOWCELLS/BSSE-QGF-MASTER-4 /BSSE_FLOWCELLS/FLOWCELLS/Test-Experiment 6 CHiP2 YES Linda 2013-04-20 11:00:00 +0100 [LIBRARY] identifier container parents experiment AGILENT_KIT CONCENTRATION_PREPARED_ILLUMINA DNA_CONCENTRATION_OF_LIBRARY DATA_TRANSFERRED EXTERNAL_SAMPLE_NAME FRAGMENT_SIZE_PREPARED_ILLUMINA INDEX1 INDEX2 INVOICE LOT KIT LIBRARY_PROCESSING_FAILED LIBRARY_PROCESSING_SUCCESSFUL NANO_DROP NOTES PREPARED_BY QC_AT_DBSSE KIT_PREPARED STARTING_AMOUNT_OF_SAMPLE_IN_NG /BSSE_FLOWCELLS/FLOWCELLS/BSSE-QGF-LIBRARY-1 /BSSE_FLOWCELLS/FLOWCELLS/BSSE-QGF-RAW-6 /BSSE_FLOWCELLS/FLOWCELLS/Test-Experiment AGILENT_DNA_KIT_1000 5 6 CHiP1 ATCACGA FALSE CHIP_SEQ_SAMPLE_PREP FALSE FALSE CONCND3300 2013-04-24 11:00:00 +0100 /BSSE_FLOWCELLS/FLOWCELLS/BSSE-QGF-LIBRARY-2 /BSSE_FLOWCELLS/FLOWCELLS/BSSE-QGF-RAW-8 /BSSE_FLOWCELLS/FLOWCELLS/Test-Experiment AGILENT_DNA_KIT_1000 5 6 CHiP2 CGATGTA FALSE CHIP_SEQ_SAMPLE_PREP FALSE FALSE CONCND3300 2013-04-24 11:00:00 +0100 [LIBRARY_POOL] identifier container parents experiment AGILENT_KIT CONCENTRATION DNA_CONCENTRATION_POOL DNA_CONCENTRATION_QGF EXTERNAL_SAMPLE_NAME FRAGMENT_SIZE_BASE_PAIRS INVOICE NANO_DROP NOTES PREPARED_BY QC_REQUIRED /BSSE_FLOWCELLS/FLOWCELLS/BSSE-QGF-POOL-10 "/BSSE_FLOWCELLS/FLOWCELLS/BSSE-QGF-LIBRARY-1,/BSSE_FLOWCELLS/FLOWCELLS/BSSE-QGF-LIBRARY-2" /BSSE_FLOWCELLS/FLOWCELLS/Test-Experiment AGILENT_HIGH_SENSITIVITY_DNA_KIT 4 44 2 400 FALSE CONCND3300 Manuel YES [ILLUMINA_FLOW_LANE] identifier container parents experiment default_space CONCENTRATION_FLOWLANE NOTES /BSSE_FLOWCELLS/FLOWCELLS/C0P8LACXX:1 /BSSE_FLOWCELLS/FLOWCELLS/C0P8LACXX /BSSE_FLOWCELLS/FLOWCELLS/BSSE-QGF-POOL-10 /BSSE_FLOWCELLS/FLOWCELLS/Test-Experiment /BSSE_FLOWCELLS/FLOWCELLS/C0P8LACXX:2 /BSSE_FLOWCELLS/FLOWCELLS/C0P8LACXX /BSSE_FLOWCELLS/FLOWCELLS/BSSE-QGF-POOL-10 /BSSE_FLOWCELLS/FLOWCELLS/Test-Experiment \ No newline at end of file +[MASTER_SAMPLE] identifier container parents experiment BIOLOGICAL_SAMPLE_ARRIVED CONTACT_PERSON_EMAIL PRINCIPAL_INVESTIGATOR_EMAIL CONTACT_PERSON_NAME PRINCIPAL_INVESTIGATOR_NAME NOTES NCBI_ORGANISM_TAXONOMY SAMPLE_KIND /BSSE_FLOWCELLS/BSSE-QGF-MASTER-4 /BSSE_FLOWCELLS/FLOWCELLS/Test-Experiment 2013-04-24 11:00:00 +0100 My name mail22bsse mail@bsse PI Name 9606 CHIP [RAW_SAMPLE] identifier container parents experiment CONCENTRATION_ORIGINAL_ILLUMINA EXTERNAL_SAMPLE_NAME LIBRARY_PROCESSING_POSSIBLE_YES_NO NOTES PREPARED_BY KIT_PREPARED /BSSE_FLOWCELLS/BSSE-QGF-RAW-6 /BSSE_FLOWCELLS/BSSE-QGF-MASTER-4 /BSSE_FLOWCELLS/FLOWCELLS/Test-Experiment 4 Chip Seq1 YES me 2013-04-23 11:00:00 +0100 /BSSE_FLOWCELLS/BSSE-QGF-RAW-8 /BSSE_FLOWCELLS/BSSE-QGF-MASTER-4 /BSSE_FLOWCELLS/FLOWCELLS/Test-Experiment 6 CHiP2 YES Linda 2013-04-20 11:00:00 +0100 [LIBRARY] identifier container parents experiment AGILENT_KIT CONCENTRATION_PREPARED_ILLUMINA DNA_CONCENTRATION_OF_LIBRARY DATA_TRANSFERRED EXTERNAL_SAMPLE_NAME FRAGMENT_SIZE_PREPARED_ILLUMINA INDEX1 INDEX2 INVOICE LOT KIT LIBRARY_PROCESSING_FAILED LIBRARY_PROCESSING_SUCCESSFUL NANO_DROP NOTES PREPARED_BY QC_AT_DBSSE KIT_PREPARED STARTING_AMOUNT_OF_SAMPLE_IN_NG /BSSE_FLOWCELLS/BSSE-QGF-LIBRARY-1 /BSSE_FLOWCELLS/BSSE-QGF-RAW-6 /BSSE_FLOWCELLS/FLOWCELLS/Test-Experiment AGILENT_DNA_KIT_1000 5 6 CHiP1 ATCACGA FALSE CHIP_SEQ_SAMPLE_PREP FALSE FALSE CONCND3300 2013-04-24 11:00:00 +0100 /BSSE_FLOWCELLS/BSSE-QGF-LIBRARY-2 /BSSE_FLOWCELLS/BSSE-QGF-RAW-8 /BSSE_FLOWCELLS/FLOWCELLS/Test-Experiment AGILENT_DNA_KIT_1000 5 6 CHiP2 CGATGTA FALSE CHIP_SEQ_SAMPLE_PREP FALSE FALSE CONCND3300 2013-04-24 11:00:00 +0100 [LIBRARY_POOL] identifier container parents experiment AGILENT_KIT CONCENTRATION DNA_CONCENTRATION_POOL DNA_CONCENTRATION_QGF EXTERNAL_SAMPLE_NAME FRAGMENT_SIZE_BASE_PAIRS INVOICE NANO_DROP NOTES PREPARED_BY QC_REQUIRED /BSSE_FLOWCELLS/BSSE-QGF-POOL-10 "/BSSE_FLOWCELLS/BSSE-QGF-LIBRARY-1,/BSSE_FLOWCELLS/BSSE-QGF-LIBRARY-2" /BSSE_FLOWCELLS/FLOWCELLS/Test-Experiment AGILENT_HIGH_SENSITIVITY_DNA_KIT 4 44 2 400 FALSE CONCND3300 Manuel YES [ILLUMINA_FLOW_LANE] identifier container parents experiment default_space CONCENTRATION_FLOWLANE NOTES /BSSE_FLOWCELLS/C0P8LACXX:1 /BSSE_FLOWCELLS/C0P8LACXX /BSSE_FLOWCELLS/BSSE-QGF-POOL-10 /BSSE_FLOWCELLS/FLOWCELLS/Test-Experiment /BSSE_FLOWCELLS/C0P8LACXX:2 /BSSE_FLOWCELLS/C0P8LACXX /BSSE_FLOWCELLS/BSSE-QGF-POOL-10 /BSSE_FLOWCELLS/FLOWCELLS/Test-Experiment \ No newline at end of file diff --git a/openbis_standard_technologies/owasp_suppressing_false_positives.xml b/openbis_standard_technologies/owasp_suppressing_false_positives.xml index 300482bd3d1ea43eb9bd5d03840298069d784be0..a5d2f02acc7a93eb70aad82b58a338d8bb5e39e9 100644 --- a/openbis_standard_technologies/owasp_suppressing_false_positives.xml +++ b/openbis_standard_technologies/owasp_suppressing_false_positives.xml @@ -26,7 +26,7 @@ <cve>CVE-2014-3577</cve> <cve>CVE-2015-5262</cve> </suppress> - <!-- Jetty 8 - False positive, found in a POM file --> + <!-- Jetty 8 - False positive, found in a ehcache POM file --> <suppress> <notes><![CDATA[ ehcache-2.10.0.jar ]]></notes> <gav regex="true">^org\.eclipse\.jetty:jetty-continuation:.*$</gav> @@ -100,50 +100,52 @@ <cve>CVE-2018-1270</cve> <!-- We don't use web sockets endpoints --> <cve>CVE-2018-1271</cve> <!-- We don't deploy on Windows --> <cve>CVE-2018-1272</cve> <!-- We don't forward user input blindly to create packages from our web client --> + <cve>CVE-2018-1258</cve> <!-- We don't use the web-security jar --> </suppress> <suppress> <gav regex="true">^springframework:spring-beans:.*$</gav> - <cve>CVE-2015-0201</cve><cve>CVE-2015-3192</cve><cve>CVE-2015-5211</cve><cve>CVE-2016-5007</cve><cve>CVE-2018-1270</cve><cve>CVE-2018-1271</cve><cve>CVE-2018-1272</cve> + <cve>CVE-2018-1258</cve><cve>CVE-2015-0201</cve><cve>CVE-2015-3192</cve><cve>CVE-2015-5211</cve><cve>CVE-2016-5007</cve><cve>CVE-2018-1270</cve><cve>CVE-2018-1271</cve><cve>CVE-2018-1272</cve> </suppress> <suppress> <gav regex="true">^org\.springframework:spring-context:.*$</gav> - <cve>CVE-2015-0201</cve><cve>CVE-2015-3192</cve><cve>CVE-2015-5211</cve><cve>CVE-2016-5007</cve><cve>CVE-2018-1270</cve><cve>CVE-2018-1271</cve><cve>CVE-2018-1272</cve> + <cve>CVE-2018-1258</cve><cve>CVE-2015-0201</cve><cve>CVE-2015-3192</cve><cve>CVE-2015-5211</cve><cve>CVE-2016-5007</cve><cve>CVE-2018-1270</cve><cve>CVE-2018-1271</cve><cve>CVE-2018-1272</cve> </suppress> <suppress> <gav regex="true">^springframework:spring-core:.*$</gav> - <cve>CVE-2015-0201</cve><cve>CVE-2015-3192</cve><cve>CVE-2015-5211</cve><cve>CVE-2016-5007</cve><cve>CVE-2018-1270</cve><cve>CVE-2018-1271</cve><cve>CVE-2018-1272</cve> + <cve>CVE-2018-1258</cve><cve>CVE-2015-0201</cve><cve>CVE-2015-3192</cve><cve>CVE-2015-5211</cve><cve>CVE-2016-5007</cve><cve>CVE-2018-1270</cve><cve>CVE-2018-1271</cve><cve>CVE-2018-1272</cve> </suppress> <suppress> <gav regex="true">^springframework:spring-web:.*$</gav> - <cve>CVE-2015-0201</cve><cve>CVE-2015-3192</cve><cve>CVE-2015-5211</cve><cve>CVE-2016-5007</cve><cve>CVE-2018-1270</cve><cve>CVE-2018-1271</cve><cve>CVE-2018-1272</cve> + <cve>CVE-2018-1258</cve><cve>CVE-2015-0201</cve><cve>CVE-2015-3192</cve><cve>CVE-2015-5211</cve><cve>CVE-2016-5007</cve><cve>CVE-2018-1270</cve><cve>CVE-2018-1271</cve><cve>CVE-2018-1272</cve> </suppress> <suppress> <gav regex="true">^springframework:spring-webmvc:.*$</gav> - <cve>CVE-2015-0201</cve><cve>CVE-2015-3192</cve><cve>CVE-2015-5211</cve><cve>CVE-2016-5007</cve><cve>CVE-2018-1270</cve><cve>CVE-2018-1271</cve><cve>CVE-2018-1272</cve> + <cve>CVE-2018-1258</cve><cve>CVE-2015-0201</cve><cve>CVE-2015-3192</cve><cve>CVE-2015-5211</cve><cve>CVE-2016-5007</cve><cve>CVE-2018-1270</cve><cve>CVE-2018-1271</cve><cve>CVE-2018-1272</cve> </suppress> <suppress> <gav regex="true">^springframework:spring-expression:.*$</gav> - <cve>CVE-2015-0201</cve><cve>CVE-2015-3192</cve><cve>CVE-2015-5211</cve><cve>CVE-2016-5007</cve><cve>CVE-2018-1270</cve><cve>CVE-2018-1271</cve><cve>CVE-2018-1272</cve> + <cve>CVE-2018-1258</cve><cve>CVE-2015-0201</cve><cve>CVE-2015-3192</cve><cve>CVE-2015-5211</cve><cve>CVE-2016-5007</cve><cve>CVE-2018-1270</cve><cve>CVE-2018-1271</cve><cve>CVE-2018-1272</cve> </suppress> <suppress> <gav regex="true">^springframework:spring-tx:.*$</gav> - <cve>CVE-2015-0201</cve><cve>CVE-2015-3192</cve><cve>CVE-2015-5211</cve><cve>CVE-2016-5007</cve><cve>CVE-2018-1270</cve><cve>CVE-2018-1271</cve><cve>CVE-2018-1272</cve> + <cve>CVE-2018-1258</cve><cve>CVE-2015-0201</cve><cve>CVE-2015-3192</cve><cve>CVE-2015-5211</cve><cve>CVE-2016-5007</cve><cve>CVE-2018-1270</cve><cve>CVE-2018-1271</cve><cve>CVE-2018-1272</cve> </suppress> <suppress> <gav regex="true">^springframework:spring-context-support:.*$</gav> - <cve>CVE-2015-0201</cve><cve>CVE-2015-3192</cve><cve>CVE-2015-5211</cve><cve>CVE-2016-5007</cve><cve>CVE-2018-1270</cve><cve>CVE-2018-1271</cve><cve>CVE-2018-1272</cve> + <cve>CVE-2018-1258</cve><cve>CVE-2015-0201</cve><cve>CVE-2015-3192</cve><cve>CVE-2015-5211</cve><cve>CVE-2016-5007</cve><cve>CVE-2018-1270</cve><cve>CVE-2018-1271</cve><cve>CVE-2018-1272</cve> </suppress> <suppress> <gav regex="true">^springframework:spring-jdbc:.*$</gav> - <cve>CVE-2015-0201</cve><cve>CVE-2015-3192</cve><cve>CVE-2015-5211</cve><cve>CVE-2016-5007</cve><cve>CVE-2018-1270</cve><cve>CVE-2018-1271</cve><cve>CVE-2018-1272</cve> + <cve>CVE-2018-1258</cve><cve>CVE-2015-0201</cve><cve>CVE-2015-3192</cve><cve>CVE-2015-5211</cve><cve>CVE-2016-5007</cve><cve>CVE-2018-1270</cve><cve>CVE-2018-1271</cve><cve>CVE-2018-1272</cve> </suppress> <suppress> <gav regex="true">^org\.springframework:spring-orm:.*$</gav> - <cve>CVE-2015-0201</cve><cve>CVE-2015-3192</cve><cve>CVE-2015-5211</cve><cve>CVE-2016-5007</cve><cve>CVE-2018-1270</cve><cve>CVE-2018-1271</cve><cve>CVE-2018-1272</cve> + <cve>CVE-2018-1258</cve><cve>CVE-2015-0201</cve><cve>CVE-2015-3192</cve><cve>CVE-2015-5211</cve><cve>CVE-2016-5007</cve><cve>CVE-2018-1270</cve><cve>CVE-2018-1271</cve><cve>CVE-2018-1272</cve> </suppress> <!-- Postgresql JDBC --> <suppress> <gav regex="true">^org\.postgresql:postgresql:.*$</gav> <cve>CVE-2017-14798</cve> <!-- Clients can't use JDBC directly and execute their own SQL --> + <cve>CVE-2018-1115</cve> <!-- We don't use any admin pack --> </suppress> </suppressions> \ No newline at end of file diff --git a/openbis_standard_technologies/settings.gradle b/openbis_standard_technologies/settings.gradle index 082cc89513b79f50624b17c30e5b6463483a8412..f996c84ccde18315345bdd3df01884e9b585ec83 100644 --- a/openbis_standard_technologies/settings.gradle +++ b/openbis_standard_technologies/settings.gradle @@ -1,2 +1,2 @@ includeFlat 'commonbase', 'common', 'openbis_api', 'openbis-common', 'authentication', 'dbmigration', 'openbis', - 'datastore_server', 'screening', 'rtd_yeastx', 'rtd_phosphonetx', 'deep_sequencing_unit', 'plasmid' + 'datastore_server', 'screening', 'rtd_yeastx', 'rtd_phosphonetx', 'deep_sequencing_unit', 'plasmid', 'big_data_link_server' diff --git a/pybis/README.md b/pybis/README.md index 0a554d47c6d460bd57af02f018403e95dc0a1f52..8ca6b0570dfcd97a3419b71898a649d799e8a546 100644 --- a/pybis/README.md +++ b/pybis/README.md @@ -19,14 +19,3 @@ pyBIS is a Python module for interacting with openBIS, designed to be used in Ju - register the plugin by editing `openbis/servers/core-plugins/core-plugins.properties` : - `enabled-modules = jupyter-api` (separate multiple plugins with comma) - restart your DSS to activate the plugin - - -### Project Organization -This project is devided in several parts: - -- src/python/**PyBis** Python module which holds all the method to interact with OpenBIS -- src/python/**OBis** a command-line tool to register large datasets in OpenBIS without actually copying the data. Uses git annex for version control and OpenBIS linkedDataSet objects to register the metadata. -- src/python/**JupyterBis** a JupyterHub authenticator module which uses pyBIS for authenticating against openBIS, validating and storing the session token -- src/core-plugins/**jupyter-api**, an ingestion plug-in for openBIS, allowing people to upload new datasets -- src/vagrant/**jupyter-bis/Vagrantfile** to set up JupyterHub on a virtual machine (CentOS 7), which uses the JupyterBis authenticator module -- src/vagrant/**obis/Vagrantfile** to set up a complete OpenBIS instance on a virtual machine (CentOS 7) diff --git a/pybis/README.rst b/pybis/README.rst index 276cada835f86ea56c4082fcd39338886b9bb582..432cee9ea6de4a3d8ca679f99efdca9fa82e1247 100644 --- a/pybis/README.rst +++ b/pybis/README.rst @@ -252,6 +252,15 @@ Semantic Annotations # get semantic annotation by perm id sa = o.get_semantic_annotation("20171015135637955-30") + # search semantic annotations by entityType + sa = o.search_semantic_annotations(entityType="UNKNOWN") + + # search semantic annotations by propertyType + sa = o.search_semantic_annotations(propertyType="DESCRIPTION") + + # search semantic annotations by sample property assignments + sa = o.search_semantic_annotations(entityType="UNKNOWN", propertyType="DESCRIPTION") + # update semantic annotation sa.predicateOntologyId = 'new_po_id' sa.descriptorOntologyId = 'new_do_id' diff --git a/pybis/src/python/README.md b/pybis/src/python/README.md index 5e96b729ccfcb5fa37df6e0cd1292a4bdbfe2b24..8fab45d2c78335995842f7f099e41da6d85dd1ce 100644 --- a/pybis/src/python/README.md +++ b/pybis/src/python/README.md @@ -238,19 +238,7 @@ for dataset in datasets: ## Semantic Annotations ``` -# create semantic annotation for sample type (predicate and descriptor values omitted for brevity) -sa = o.new_semantic_annotation(entityType = 'UNKNOWN') -sa.save() - -# create semantic annotation for property type (predicate and descriptor values omitted for brevity) -sa = o.new_semantic_annotation(propertyType = 'DESCRIPTION') -sa.save() - -# create semantic annotation for sample property assignment (predicate and descriptor values omitted for brevity) -sa = o.new_semantic_annotation(entityType = 'UNKNOWN', propertyType = 'DESCRIPTION') -sa.save() - -# create semantic annotation with additional fields +# create semantic annotation for sample type 'UNKNOWN' sa = o.new_semantic_annotation(entityType = 'UNKNOWN', predicateOntologyId = 'po_id', predicateOntologyVersion = 'po_version', @@ -260,6 +248,19 @@ sa = o.new_semantic_annotation(entityType = 'UNKNOWN', descriptorAccessionId = 'da_id') sa.save() +# create semantic annotation for property type (predicate and descriptor values omitted for brevity) +sa = o.new_semantic_annotation(propertyType = 'DESCRIPTION', ...) +sa.save() + +# create semantic annotation for sample property assignment (predicate and descriptor values omitted for brevity) +sa = o.new_semantic_annotation(entityType = 'UNKNOWN', propertyType = 'DESCRIPTION', ...) +sa.save() + +# create a semantic annotation directly from a sample type +# will also create sample property assignment annotations when propertyType is given +st = o.get_sample_type("ORDER") +st.new_semantic_annotation(...) + # get all semantic annotations o.get_semantic_annotations() diff --git a/pybis/src/python/pybis playground localhost.ipynb b/pybis/src/python/pybis playground localhost.ipynb index 0463d18db106d216a161c7f4e9cba7587717acdf..f84995a66a744855cf798d16c09e4470300c68bf 100644 --- a/pybis/src/python/pybis playground localhost.ipynb +++ b/pybis/src/python/pybis playground localhost.ipynb @@ -1234,36 +1234,9 @@ }, { "cell_type": "code", - "execution_count": 14, + "execution_count": null, "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "{'@id': 1,\n", - " '@type': 'QueryTableModel',\n", - " 'columns': [{'@id': 2,\n", - " '@type': 'QueryTableColumn',\n", - " 'dataType': 'STRING',\n", - " 'title': 'STATUS'},\n", - " {'@id': 3,\n", - " '@type': 'QueryTableColumn',\n", - " 'dataType': 'STRING',\n", - " 'title': 'MESSAGE'},\n", - " {'@id': 4,\n", - " '@type': 'QueryTableColumn',\n", - " 'dataType': 'STRING',\n", - " 'title': 'RESULT'}],\n", - " 'rows': [[{'@id': 5, 'type': 'STRING', 'value': 'OK'},\n", - " {'@id': 6, 'type': 'STRING', 'value': 'Dataset registration successful'},\n", - " {'@id': 7, 'type': 'STRING', 'value': ''}]]}" - ] - }, - "execution_count": 14, - "metadata": {}, - "output_type": "execute_result" - } - ], + "outputs": [], "source": [ "o.new_analysis(\n", " name='my_delightful_analysis', \n", @@ -1283,48 +1256,270 @@ "## Semantic Annotation " ] }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### create semantic annotation for sample type\n", + "predicate and descriptor values omitted for brevity" + ] + }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ - "# create semantic annotation for sample type (predicate and descriptor values omitted for brevity)\n", "sa = o.new_semantic_annotation(entityType = 'UNKNOWN')\n", - "sa.save()\n", - "\n", - "# create semantic annotation for property type (predicate and descriptor values omitted for brevity)\n", - "sa = o.new_semantic_annotation(propertyType = 'DESCRIPTION')\n", - "sa.save()\n", - "\n", - "# create semantic annotation for sample property assignment (predicate and descriptor values omitted for brevity)\n", - "sa = o.new_semantic_annotation(entityType = 'UNKNOWN', propertyType = 'DESCRIPTION')\n", - "sa.save()\n", - "\n", - "# create semantic annotation with additional fields\n", - "sa = o.new_semantic_annotation(entityType = 'UNKNOWN', \n", - " predicateOntologyId = 'po_id', \n", - " predicateOntologyVersion = 'po_version', \n", - " predicateAccessionId = 'pa_id',\n", - " descriptorOntologyId = 'do_id',\n", - " descriptorOntologyVersion = 'do_version',\n", - " descriptorAccessionId = 'da_id')\n", - "sa.save()\n", - "\n", - "# get all semantic annotations\n", - "o.get_semantic_annotations()\n", - "\n", - "# get semantic annotation by perm id\n", - "sa = o.get_semantic_annotation(\"20171015135637955-30\")\n", - "\n", - "# update semantic annotation\n", + "sa.save()" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### create semantic annotation for property type\n", + "predicate and descriptor values omitted for brevity" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "sa = o.new_semantic_annotation(\n", + " propertyType = 'DESCRIPTION'\n", + ")\n", + "sa.save()" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### create semantic annotation for sample property assignment\n", + "predicate and descriptor values omitted for brevity" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "sa = o.new_semantic_annotation(\n", + " entityType = 'UNKNOWN',\n", + " propertyType = 'DESCRIPTION',\n", + " predicateOntologyId = 'po_id', \n", + " predicateOntologyVersion = 'po_version', \n", + " predicateAccessionId = 'pa_id',\n", + " descriptorOntologyId = 'do_id',\n", + " descriptorOntologyVersion = 'do_version',\n", + " descriptorAccessionId = 'da_id'\n", + ")\n", + "sa.save()" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### create semantic annotation with additional fields" + ] + }, + { + "cell_type": "code", + "execution_count": 23, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Semantic annotation successfully created.\n" + ] + } + ], + "source": [ + "sa = o.new_semantic_annotation(\n", + " entityType = 'UNKNOWN', \n", + " predicateOntologyId = 'po_id', \n", + " predicateOntologyVersion = 'po_version', \n", + " predicateAccessionId = 'pa_id',\n", + " descriptorOntologyId = 'do_id',\n", + " descriptorOntologyVersion = 'do_version',\n", + " descriptorAccessionId = 'da_id'\n", + ")\n", + "sa.save()" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "entityType.add_annotation()" + ] + }, + { + "cell_type": "code", + "execution_count": 29, + "metadata": {}, + "outputs": [], + "source": [ + "sample_type = o.get_sample_types()[0]" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "sample_type.add_annotation()" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### get all semantic annotations" + ] + }, + { + "cell_type": "code", + "execution_count": 26, + "metadata": { + "scrolled": false + }, + "outputs": [ + { + "data": { + "text/html": [ + "<div>\n", + "<table border=\"1\" class=\"dataframe\">\n", + " <thead>\n", + " <tr style=\"text-align: right;\">\n", + " <th></th>\n", + " <th>permId</th>\n", + " <th>entityType</th>\n", + " <th>propertyType</th>\n", + " <th>predicateOntologyId</th>\n", + " <th>predicateOntologyVersion</th>\n", + " <th>predicateAccessionId</th>\n", + " <th>descriptorOntologyId</th>\n", + " <th>descriptorOntologyVersion</th>\n", + " <th>descriptorAccessionId</th>\n", + " <th>creationDate</th>\n", + " </tr>\n", + " </thead>\n", + " <tbody>\n", + " <tr>\n", + " <th>0</th>\n", + " <td>20180810150941390-720</td>\n", + " <td>UNKNOWN</td>\n", + " <td>None</td>\n", + " <td>po_id</td>\n", + " <td>po_version</td>\n", + " <td>pa_id</td>\n", + " <td>do_id</td>\n", + " <td>do_version</td>\n", + " <td>da_id</td>\n", + " <td>2018-08-10 15:09:41</td>\n", + " </tr>\n", + " </tbody>\n", + "</table>\n", + "</div>" + ], + "text/plain": [ + " permId entityType propertyType predicateOntologyId predicateOntologyVersion predicateAccessionId descriptorOntologyId descriptorOntologyVersion descriptorAccessionId creationDate\n", + "-- --------------------- ------------ -------------- --------------------- -------------------------- ---------------------- ---------------------- --------------------------- ----------------------- -------------------\n", + " 0 20180810150941390-720 UNKNOWN po_id po_version pa_id do_id do_version da_id 2018-08-10 15:09:41" + ] + }, + "execution_count": 26, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "o.get_semantic_annotations()" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### get semantic annotation by perm id" + ] + }, + { + "cell_type": "code", + "execution_count": 18, + "metadata": {}, + "outputs": [], + "source": [ + "sa = o.get_semantic_annotation(\"20180810150658470-719\")" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### update semantic annotation" + ] + }, + { + "cell_type": "code", + "execution_count": 19, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Semantic annotation successfully updated.\n" + ] + } + ], + "source": [ "sa.predicateOntologyId = 'new_po_id'\n", "sa.descriptorOntologyId = 'new_do_id'\n", - "sa.save()\n", - " \n", - "# delete semantic annotation\n", + "sa.save()" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### delete semantic annotation" + ] + }, + { + "cell_type": "code", + "execution_count": 20, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Semantic annotation successfully deleted.\n" + ] + } + ], + "source": [ "sa.delete('reason')" ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [] } ], "metadata": { @@ -1343,7 +1538,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.6.3" + "version": "3.6.0" } }, "nbformat": 4, diff --git a/pybis/src/python/pybis/dataset.py b/pybis/src/python/pybis/dataset.py old mode 100644 new mode 100755 index d2178be94b331010bbc7de71a9820c29a05077ae..521e3cedf0a9ecc5df8291d8294ab1b3192b4102 --- a/pybis/src/python/pybis/dataset.py +++ b/pybis/src/python/pybis/dataset.py @@ -148,15 +148,21 @@ class DataSet(OpenBisObject): if destination is None: destination = self.openbis.hostname - - if self.data['kind'] == 'PHYSICAL': + + kind = None; + if 'kind' in self.data: # openBIS 18.6.x DTO + kind = self.data['kind'] + elif ('type' in self.data) and ('kind' in self.data['type']): # openBIS 16.5.x DTO + kind =self.data['type']['kind'] + + if kind == 'PHYSICAL': return self._download_physical(files, destination, wait_until_finished, workers) - elif self.data['kind'] == 'LINK': + elif kind == 'LINK': if linked_dataset_fileservice_url is None: raise ValueError("Can't download a LINK data set without the linked_dataset_fileservice_url parameters.") return self._download_link(files, destination, wait_until_finished, workers, linked_dataset_fileservice_url, content_copy_index) else: - raise ValueError("Can't download data set of kind {}.".format(self.data['kind'])) + raise ValueError("Can't download data set of kind {}.".format(kind)) def _download_physical(self, files, destination, wait_until_finished, workers): @@ -507,23 +513,25 @@ class DataSetDownloadQueue(): def download_file(self): while True: - url, filename, filename_dest, file_size, verify_certificates, write_mode = self.download_queue.get() - # create the necessary directory structure if they don't exist yet - os.makedirs(os.path.dirname(filename_dest), exist_ok=True) - - # request the file in streaming mode - r = requests.get(url, stream=True, verify=verify_certificates) - if r.ok == False: - raise ValueError("Could not download from {}: HTTP {}. Reason: {}".format(url, r.status_code, r.reason)) - - with open(filename_dest, write_mode) as f: - for chunk in r.iter_content(chunk_size=1024): - if chunk: # filter out keep-alive new chunks - f.write(chunk) - - if os.path.getsize(filename_dest) != int(file_size): - if self.collect_files_with_wrong_length: - self.files_with_wrong_length.append(filename) - else: - raise ValueError("File has the wrong length: {}".format(filename_dest)) - self.download_queue.task_done() + try: + url, filename, filename_dest, file_size, verify_certificates, write_mode = self.download_queue.get() + # create the necessary directory structure if they don't exist yet + os.makedirs(os.path.dirname(filename_dest), exist_ok=True) + + # request the file in streaming mode + r = requests.get(url, stream=True, verify=verify_certificates) + if r.ok == False: + raise ValueError("Could not download from {}: HTTP {}. Reason: {}".format(url, r.status_code, r.reason)) + + with open(filename_dest, write_mode) as f: + for chunk in r.iter_content(chunk_size=1024): + if chunk: # filter out keep-alive new chunks + f.write(chunk) + + if os.path.getsize(filename_dest) != int(file_size): + if self.collect_files_with_wrong_length: + self.files_with_wrong_length.append(filename) + else: + raise ValueError("File has the wrong length: {}".format(filename_dest)) + finally: + self.download_queue.task_done() diff --git a/pybis/src/python/pybis/definitions.py b/pybis/src/python/pybis/definitions.py index 81bd2c1e426879de0044b60319ddf9d130f0a354..fe41540303909d6591476f49183d6b3b3d0b34c3 100644 --- a/pybis/src/python/pybis/definitions.py +++ b/pybis/src/python/pybis/definitions.py @@ -34,9 +34,9 @@ def openbis_definitions(entity): "identifier": "experimentId", }, "Sample": { - "attrs_new": "code type parents children space experiment tags attachments".split(), - "attrs_up": "parents children space experiment tags attachments".split(), - "attrs": "code permId identifier type parents children components space experiment tags attachments".split(), + "attrs_new": "code type project parents children space experiment tags attachments".split(), + "attrs_up": "project parents children space experiment tags attachments".split(), + "attrs": "code permId identifier type project parents children components space experiment tags attachments".split(), "ids2type": { 'parentIds': {'permId': {'@type': 'as.dto.sample.id.SamplePermId'}}, 'childIds': {'permId': {'@type': 'as.dto.sample.id.SamplePermId'}}, diff --git a/pybis/src/python/pybis/pybis.py b/pybis/src/python/pybis/pybis.py index a78deb31a389256b4eade66b2016e07e39cc49c4..7e8f1e06411378080e37993333a0529143d5a63b 100644 --- a/pybis/src/python/pybis/pybis.py +++ b/pybis/src/python/pybis/pybis.py @@ -45,6 +45,7 @@ from .person import Person from .group import Group from .role_assignment import RoleAssignment from .tag import Tag +from .sample_type import SampleType from .semantic_annotation import SemanticAnnotation from .plugin import Plugin @@ -523,6 +524,7 @@ class Openbis: return [ 'url', 'port', 'hostname', 'login()', 'logout()', 'is_session_active()', 'token', 'is_token_valid("")', + "get_server_information()", "get_dataset('permId')", "get_datasets()", "get_dataset_type('raw_data')", @@ -725,6 +727,31 @@ class Openbis: os.environ['OPENBIS_TOKEN'] = self.token return self.token + + def get_server_information(self): + """ Returns a dict containing the following server information: + api-version, archiving-configured, authentication-service, enabled-technologies, project-samples-enabled + """ + request = { + "method": "getServerInformation", + "params": [self.token], + } + resp = self._post_request(self.as_v3, request) + if resp is not None: + # result is a dict of strings - use more useful types + keys_boolean = ['archiving-configured', 'project-samples-enabled'] + keys_csv = ['enabled-technologies'] + for key in keys_boolean: + if key in resp: + resp[key] = resp[key] == 'true' + for key in keys_csv: + if key in resp: + resp[key] = list(map(lambda item: item.strip(), resp[key].split(','))) + return ServerInformation(resp) + else: + raise ValueError("Could not get the server information") + + def create_permId(self): """Have the server generate a new permId""" # Request just 1 permId @@ -766,7 +793,6 @@ class Openbis: entity = entity.upper() entity2enum = { "DATASET" : "DATA_SET", - "DATASET" : "DATASET", "OBJECT" : "SAMPLE", "SAMPLE" : "SAMPLE", "EXPERIMENT" : "EXPERIMENT", @@ -1222,11 +1248,8 @@ class Openbis: }) ) if project: - exp_crit = _subcriteria_for_code(experiment, 'experiment') proj_crit = _subcriteria_for_code(project, 'project') - exp_crit['criteria'] = [] - exp_crit['criteria'].append(proj_crit) - sub_criteria.append(exp_crit) + sub_criteria.append(proj_crit) if experiment: sub_criteria.append(_subcriteria_for_code(experiment, 'experiment')) if properties is not None: @@ -1310,7 +1333,7 @@ class Openbis: get_objects = get_samples # Alias - def get_experiments(self, code=None, type=None, space=None, project=None, tags=None, is_finished=None, props=None, **properties): + def get_experiments(self, code=None, permId=None, type=None, space=None, project=None, tags=None, is_finished=None, props=None, **properties): """ Searches for all experiment which match the search criteria. Returns a «Things» object which can be used in many different situations. @@ -1332,6 +1355,8 @@ class Openbis: sub_criteria.append(_subcriteria_for_code(project, 'project')) if code: sub_criteria.append(_criteria_for_code(code)) + if permId: + sub_criteria.append(_common_search("as.dto.common.search.PermIdSearchCriteria", permId)) if type: sub_criteria.append(_subcriteria_for_type(type, 'Experiment')) if tags: @@ -2016,7 +2041,64 @@ class Openbis: else: return Tag(self, data=resp[permId]) - + + def search_semantic_annotations(self, permId=None, entityType=None, propertyType=None, only_data = False): + """ Get a list of semantic annotations for permId, entityType, propertyType or + property type assignment (DataFrame object). + :param permId: permId of the semantic annotation. + :param entityType: entity (sample) type to search for. + :param propertyType: property type to search for + :param only_data: return result as plain data object. + :return: Things of DataFrame objects or plain data object + """ + + criteria = [] + typeCriteria = [] + + if permId is not None: + criteria.append({ + "@type" : "as.dto.common.search.PermIdSearchCriteria", + "fieldValue" : { + "@type" : "as.dto.common.search.StringEqualToValue", + "value" : permId + } + }) + + if entityType is not None: + typeCriteria.append({ + "@type" : "as.dto.entitytype.search.EntityTypeSearchCriteria", + "criteria" : [_criteria_for_code(entityType)] + }) + + if propertyType is not None: + typeCriteria.append({ + "@type" : "as.dto.property.search.PropertyTypeSearchCriteria", + "criteria" : [_criteria_for_code(propertyType)] + }) + + if entityType is not None and propertyType is not None: + criteria.append({ + "@type" : "as.dto.property.search.PropertyAssignmentSearchCriteria", + "criteria" : typeCriteria + }) + else: + criteria += typeCriteria + + saCriteria = { + "@type" : "as.dto.semanticannotation.search.SemanticAnnotationSearchCriteria", + "criteria" : criteria + } + + objects = self._search_semantic_annotations(saCriteria) + + if only_data: + return objects + else: + attrs = ['permId', 'entityType', 'propertyType', 'predicateOntologyId', 'predicateOntologyVersion', 'predicateAccessionId', 'descriptorOntologyId', 'descriptorOntologyVersion', 'descriptorAccessionId', 'creationDate'] + annotations = DataFrame(objects) + annotations = annotations if len(objects) == 0 else annotations[attrs] + return Things(self, 'semantic_annotation', annotations, 'permId') + def _search_semantic_annotations(self, criteria): fetch_options = { @@ -2044,9 +2126,6 @@ class Openbis: if resp is not None: objects = resp['objects'] - if len(objects) is 0: - raise ValueError("No semantic annotations found!") - parse_jackson(objects) for object in objects: @@ -2062,7 +2141,7 @@ class Openbis: return objects else: - raise ValueError("No semantic annotations found!") + raise ValueError("Could not fetch semantic annotations!") def get_semantic_annotations(self): """ Get a list of all available semantic annotations (DataFrame object). @@ -2072,26 +2151,16 @@ class Openbis: attrs = ['permId', 'entityType', 'propertyType', 'predicateOntologyId', 'predicateOntologyVersion', 'predicateAccessionId', 'descriptorOntologyId', 'descriptorOntologyVersion', 'descriptorAccessionId', 'creationDate'] annotations = DataFrame(objects) return Things(self, 'semantic_annotation', annotations[attrs], 'permId') - def get_semantic_annotation(self, permId, only_data = False): - - criteria = { - "@type" : "as.dto.semanticannotation.search.SemanticAnnotationSearchCriteria", - "criteria" : [{ - "@type" : "as.dto.common.search.PermIdSearchCriteria", - "fieldValue" : { - "@type" : "as.dto.common.search.StringEqualToValue", - "value" : permId - } - }] - } - objects = self._search_semantic_annotations(criteria) + def get_semantic_annotation(self, permId, only_data = False): + objects = self.search_semantic_annotations(permId=permId, only_data=True) + if len(objects) == 0: + raise ValueError("Semantic annotation with permId " + permId + " not found.") object = objects[0] - if only_data: return object else: - return SemanticAnnotation(self, isNew=False, **object) + return SemanticAnnotation(self, isNew=False, **object) def get_plugins(self): @@ -2162,8 +2231,8 @@ class Openbis: else: return Plugin(self, data=resp[permId]) - def new_plugin(self, name, pluginType= "MANAGED_PROPERTY", pluginKind = "JYTHON", **kwargs): - """ Creates a new Plugin in openBIS. The attribute pluginKind must be one of + def new_plugin(self, pluginType= "MANAGED_PROPERTY", pluginKind = "JYTHON", **kwargs): + """ Note: not functional yet. Creates a new Plugin in openBIS. The attribute pluginKind must be one of the following: DYNAMIC_PROPERTY, MANAGED_PROPERTY, ENTITY_VALIDATION; @@ -2200,12 +2269,13 @@ class Openbis: def get_sample_type(self, type): try: - return self._get_types_of( + property_asignments = self._get_types_of( "searchSampleTypes", "Sample", type, ["generatedCodePrefix", "validationPluginId"] ) + return SampleType(self, property_asignments.data) except Exception: raise ValueError("no such sample type: {}".format(type)) @@ -2396,7 +2466,7 @@ class Openbis: search_request = search_request_for_identifier(sample_ident, 'sample') fetchopts = {"type": {"@type": "as.dto.sample.fetchoptions.SampleTypeFetchOptions"}} - for option in ['tags', 'properties', 'attachments', 'space', 'experiment', 'registrator', 'dataSets']: + for option in ['tags', 'properties', 'attachments', 'space', 'experiment', 'registrator', 'dataSets', 'project']: fetchopts[option] = fetch_option[option] if withAttachments: @@ -2424,7 +2494,11 @@ class Openbis: if only_data: return resp[sample_ident] else: - return Sample(self, self.get_sample_type(resp[sample_ident]["type"]["code"]), resp[sample_ident]) + return Sample( + openbis_obj = self, + type = self.get_sample_type(resp[sample_ident]["type"]["code"]), + data = resp[sample_ident] + ) get_object = get_sample # Alias @@ -2565,10 +2639,10 @@ class Openbis: } return dms_id - def new_sample(self, type, props=None, **kwargs): + def new_sample(self, type, project=None, props=None, **kwargs): """ Creates a new sample of a given sample type. """ - return Sample(self, self.get_sample_type(type), None, props, **kwargs) + return Sample(self, self.get_sample_type(type), project, None, props, **kwargs) new_object = new_sample # Alias @@ -2585,6 +2659,7 @@ class Openbis: return DataSet(self, type=type_obj, files=files, folder=folder, props=props, **kwargs) def new_semantic_annotation(self, entityType=None, propertyType=None, **kwargs): + """ Note: not functional yet. """ return SemanticAnnotation( openbis_obj=self, isNew=True, entityType=entityType, propertyType=propertyType, **kwargs @@ -2717,3 +2792,28 @@ class ExternalDMS(): return self.data.get('code', None) +class ServerInformation(): + + def __init__(self, info): + self._info = info + + def __dir__(self): + return [ + 'api_version', 'archiving_configured', 'authentication_service', + 'enabled_technologies', 'project_samples_enabled' + ] + + def __getattr__(self, name): + return self._info[name.replace('_', '-')] + + def get_major_version(self): + return int(self._info["api-version"].split(".")[0]); + + def get_minor_version(self): + return int(self._info["api-version"].split(".")[1]); + + def is_openbis_1605(self): + return (self.get_major_version() == 3) and (self.get_minor_version() <= 2); + + def is_openbis_1806(self): + return (self.get_major_version() == 3) and (self.get_minor_version() >= 5); diff --git a/pybis/src/python/pybis/sample.py b/pybis/src/python/pybis/sample.py index 769bda0f25a33ace991fd58034ca7c5b5342f21e..3a26529f7e7fdb1d11f5edc97d47a6f03936b8a7 100644 --- a/pybis/src/python/pybis/sample.py +++ b/pybis/src/python/pybis/sample.py @@ -4,11 +4,11 @@ from .openbis_object import OpenBisObject from .definitions import openbis_definitions from .utils import VERBOSE -class Sample(): +class Sample(OpenBisObject): """ A Sample is one of the most commonly used objects in openBIS. """ - def __init__(self, openbis_obj, type, data=None, props=None, **kwargs): + def __init__(self, openbis_obj, type, project=None, data=None, props=None, **kwargs): self.__dict__['openbis'] = openbis_obj self.__dict__['type'] = type self.__dict__['p'] = PropertyHolder(openbis_obj, type) @@ -17,6 +17,9 @@ class Sample(): if data is not None: self._set_data(data) + if project is not None: + setattr(self, 'project', project) + if props is not None: for key in props: setattr(self.p, key, props[key]) diff --git a/pybis/src/python/pybis/sample_type.py b/pybis/src/python/pybis/sample_type.py new file mode 100644 index 0000000000000000000000000000000000000000..83491132777046cd9c0f8e67c30ab6def876c1cf --- /dev/null +++ b/pybis/src/python/pybis/sample_type.py @@ -0,0 +1,17 @@ +from .property import PropertyAssignments +from .semantic_annotation import SemanticAnnotation + +class SampleType(PropertyAssignments): + """ Helper class for sample types, adding functionality. + """ + + def add_semantic_annotation(self, **kwargs): + semantic_annotation = SemanticAnnotation( + openbis_obj=self.openbis, isNew=True, + entityType=self.code, **kwargs + ) + semantic_annotation.save() + return semantic_annotation + + def get_semantic_annotations(self): + return self.openbis.search_semantic_annotations(entityType=self.code) diff --git a/pybis/src/python/pybis/semantic_annotation.py b/pybis/src/python/pybis/semantic_annotation.py index 19ad855503dc2d4eef85bb98544b4d9fad65dd96..657ca773f80bfe2fbd42c3377c62a82dd41fb30e 100644 --- a/pybis/src/python/pybis/semantic_annotation.py +++ b/pybis/src/python/pybis/semantic_annotation.py @@ -1,5 +1,10 @@ +from tabulate import tabulate +from .utils import VERBOSE class SemanticAnnotation(): + """ Semantic annotation for sample types, property types or property type assignments. + """ + def __init__(self, openbis_obj, isNew=True, **kwargs): self._openbis = openbis_obj self._isNew = isNew; @@ -73,8 +78,9 @@ class SemanticAnnotation(): ] } - self._openbis._post_request(self._openbis.as_v3, request) + response = self._openbis._post_request(self._openbis.as_v3, request) self._isNew = False + self.permId = response[0]['permId'] if VERBOSE: print("Semantic annotation successfully created.") @@ -109,3 +115,18 @@ class SemanticAnnotation(): def delete(self, reason): self._openbis.delete_entity(entity='SemanticAnnotation', id=self.permId, reason=reason) if VERBOSE: print("Semantic annotation successfully deleted.") + + def __repr__(self): + headers = ['attribute', 'value'] + lines = [] + lines.append(['permId', self.permId]) + lines.append(['entityType', self.entityType]) + lines.append(['propertyType', self.propertyType]) + lines.append(['predicateOntologyId', self.predicateOntologyId]) + lines.append(['predicateOntologyVersion', self.predicateOntologyVersion]) + lines.append(['predicateAccessionId', self.predicateAccessionId]) + lines.append(['descriptorOntologyId', self.descriptorOntologyId]) + lines.append(['descriptorOntologyVersion', self.descriptorOntologyVersion]) + lines.append(['descriptorAccessionId', self.descriptorAccessionId]) + lines.append(['creationDate', self.creationDate]) + return tabulate(lines, headers=headers) diff --git a/pybis/src/python/pybis/space.py b/pybis/src/python/pybis/space.py index 1be04c0d6d7a805bb7d9a5ddd648f1f139bfaa5c..01a1c0e548ff52060b9aed32f6e447f6b3d39036 100644 --- a/pybis/src/python/pybis/space.py +++ b/pybis/src/python/pybis/space.py @@ -39,12 +39,14 @@ class Space(OpenBisObject): get_objects = get_samples #Alias - def get_sample(self, sample_code): + def get_sample(self, sample_code, project_code=None): if is_identifier(sample_code) or is_permid(sample_code): return self.openbis.get_sample(sample_code) else: - # we assume we just got the code - return self.openbis.get_sample('/{}/{}'.format(self.code,sample_code) ) + if project_code is None: + return self.openbis.get_sample('/{}/{}'.format(self.code,sample_code) ) + else: + return self.openbis.get_sample('/{}/{}/{}'.format(self.code, project_code, sample_code) ) def get_projects(self, **kwargs): diff --git a/rtd_cina/settings.gradle b/rtd_cina/settings.gradle index f793f11e5941603fe307094dc7ea05d61725772f..201cae2c205d6fb7a02c16753d045ca6425c429e 100644 --- a/rtd_cina/settings.gradle +++ b/rtd_cina/settings.gradle @@ -1,2 +1,3 @@ includeFlat 'commonbase', 'common', 'openbis_api', 'openbis-common', 'authentication', 'dbmigration', 'openbis', - 'datastore_server', 'screening', 'rtd_yeastx', 'rtd_phosphonetx', 'deep_sequencing_unit', 'plasmid', 'openbis_standard_technologies' \ No newline at end of file + 'datastore_server', 'screening', 'rtd_yeastx', 'rtd_phosphonetx', 'deep_sequencing_unit', 'plasmid', 'openbis_standard_technologies', + 'big_data_link_server' diff --git a/screening/dist/etc/tabular-data-graph.properties b/screening/dist/etc/tabular-data-graph.properties new file mode 100644 index 0000000000000000000000000000000000000000..e747795c5c9fb69df03bb3034c6be72041ad14c5 --- /dev/null +++ b/screening/dist/etc/tabular-data-graph.properties @@ -0,0 +1,38 @@ +# ------------------------------------------------------------------ +# Properties File For Generating Graphs From Tabular Data +# ------------------------------------------------------------------ + +# The width of the full image +full-width = 800 + +# The height of the full image +full-height = 600 + +# The width of the table column +column-width = 300 + +# The height of the table row +column-height = 200 + +# The graphs shown per row +# Configure the graph names. You can add/remove graphs if you want. +graphs = graph1, graph2, graph3 + +# The properties for the first scatter plot +graph1.graph-type = scatterplot +graph1.x-axis = <x axis feature name, e.g. TotalCells> +graph1.y-axis = <y axis feature name, e.g. InfectedCells> +graph1.title = <title, e.g. Total vs. Infected> + +# The properties for the histogram +graph2.graph-type = histogram +graph2.column = <feature name, e.g. TotalCells> +graph2.number-of-bins = 20 +graph2.title = <title, e.g. Total Cells Histogram> + +# The properties for the heatmap +graph3.graph-type = heatmap +graph3.x-axis = <name of the column which contains plate row number, e.g. row or WellName> +graph3.y-axis = <name of the column which contains plate column number, e.g. col or WellName> +graph3.column = <feature name, e.g. InfectionIndex> +graph3.title = <title, e.g. Infection Index>