diff --git a/src/main/java/org/caosdb/server/database/BackendTransaction.java b/src/main/java/org/caosdb/server/database/BackendTransaction.java index 8accff648bd97da90d7d4138ea4463ea6b5c98be..7c26db1ed05e76c30f9d30f0c3d9965ed0c59b6b 100644 --- a/src/main/java/org/caosdb/server/database/BackendTransaction.java +++ b/src/main/java/org/caosdb/server/database/BackendTransaction.java @@ -1,11 +1,10 @@ /* - * ** header v3.0 * This file is a part of the CaosDB Project. * * Copyright (C) 2018 Research Group Biomedical Physics, - * Max-Planck-Institute for Dynamics and Self-Organization Göttingen - * Copyright (C) 2020 IndiScale GmbH - * Copyright (C) 2020 Timm Fitschen (t.fitschen@indiscale.com) + * Max-Planck-Institute for Dynamics and Self-Organization Göttingen + * Copyright (C) 2019-2021 IndiScale GmbH <info@indiscale.com> + * Copyright (C) 2019-2021 Timm Fitschen <t.fitschen@indiscale.com> * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as @@ -19,8 +18,6 @@ * * You should have received a copy of the GNU Affero General Public License * along with this program. If not, see <https://www.gnu.org/licenses/>. - * - * ** end header */ package org.caosdb.server.database; diff --git a/src/main/java/org/caosdb/server/database/backend/implementation/MySQL/MySQLRetrieveAll.java b/src/main/java/org/caosdb/server/database/backend/implementation/MySQL/MySQLRetrieveAll.java index 7af4022595f64b909231c72c83ae1e151a9d06c1..77618e92d56a166eb9d0df96258b943fb9df52d5 100644 --- a/src/main/java/org/caosdb/server/database/backend/implementation/MySQL/MySQLRetrieveAll.java +++ b/src/main/java/org/caosdb/server/database/backend/implementation/MySQL/MySQLRetrieveAll.java @@ -1,9 +1,10 @@ /* - * ** header v3.0 * This file is a part of the CaosDB Project. * * Copyright (C) 2018 Research Group Biomedical Physics, * Max-Planck-Institute for Dynamics and Self-Organization Göttingen + * Copyright (C) 2019-2021 IndiScale GmbH <info@indiscale.com> + * Copyright (C) 2019-2021 Timm Fitschen <t.fitschen@indiscale.com> * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as @@ -17,8 +18,6 @@ * * You should have received a copy of the GNU Affero General Public License * along with this program. If not, see <https://www.gnu.org/licenses/>. - * - * ** end header */ package org.caosdb.server.database.backend.implementation.MySQL; diff --git a/src/main/java/org/caosdb/server/database/backend/transaction/InsertEntityTransaction.java b/src/main/java/org/caosdb/server/database/backend/transaction/InsertEntityTransaction.java index 9c86ba33bf47b8051bc365bb32a6f36d0342ff92..5871c97e8ff172fe58b37627cc93824e96c7b32e 100644 --- a/src/main/java/org/caosdb/server/database/backend/transaction/InsertEntityTransaction.java +++ b/src/main/java/org/caosdb/server/database/backend/transaction/InsertEntityTransaction.java @@ -1,9 +1,10 @@ /* - * ** header v3.0 * This file is a part of the CaosDB Project. * * Copyright (C) 2018 Research Group Biomedical Physics, * Max-Planck-Institute for Dynamics and Self-Organization Göttingen + * Copyright (C) 2019-2021 IndiScale GmbH <info@indiscale.com> + * Copyright (C) 2019-2021 Timm Fitschen <t.fitschen@indiscale.com> * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as @@ -17,8 +18,6 @@ * * You should have received a copy of the GNU Affero General Public License * along with this program. If not, see <https://www.gnu.org/licenses/>. - * - * ** end header */ package org.caosdb.server.database.backend.transaction; diff --git a/src/main/java/org/caosdb/server/database/backend/transaction/InsertTransactionHistory.java b/src/main/java/org/caosdb/server/database/backend/transaction/InsertTransactionHistory.java index eb345f85ebdd4372feed664c9db12944870b1078..6282ede52aa514353c21f0b8dd3345a85305725b 100644 --- a/src/main/java/org/caosdb/server/database/backend/transaction/InsertTransactionHistory.java +++ b/src/main/java/org/caosdb/server/database/backend/transaction/InsertTransactionHistory.java @@ -1,9 +1,10 @@ /* - * ** header v3.0 * This file is a part of the CaosDB Project. * * Copyright (C) 2018 Research Group Biomedical Physics, * Max-Planck-Institute for Dynamics and Self-Organization Göttingen + * Copyright (C) 2019-2021 IndiScale GmbH <info@indiscale.com> + * Copyright (C) 2019-2021 Timm Fitschen <t.fitschen@indiscale.com> * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as @@ -17,8 +18,6 @@ * * You should have received a copy of the GNU Affero General Public License * along with this program. If not, see <https://www.gnu.org/licenses/>. - * - * ** end header */ package org.caosdb.server.database.backend.transaction; diff --git a/src/main/java/org/caosdb/server/database/backend/transaction/UpdateEntityTransaction.java b/src/main/java/org/caosdb/server/database/backend/transaction/UpdateEntityTransaction.java index 275947abd9b42a2424141bc28111889859fb1475..17a9bc7f144474af2ad2a7f1f91ba32f84f3809b 100644 --- a/src/main/java/org/caosdb/server/database/backend/transaction/UpdateEntityTransaction.java +++ b/src/main/java/org/caosdb/server/database/backend/transaction/UpdateEntityTransaction.java @@ -1,9 +1,10 @@ /* - * ** header v3.0 * This file is a part of the CaosDB Project. * * Copyright (C) 2018 Research Group Biomedical Physics, * Max-Planck-Institute for Dynamics and Self-Organization Göttingen + * Copyright (C) 2019-2021 IndiScale GmbH <info@indiscale.com> + * Copyright (C) 2019-2021 Timm Fitschen <t.fitschen@indiscale.com> * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as @@ -17,8 +18,6 @@ * * You should have received a copy of the GNU Affero General Public License * along with this program. If not, see <https://www.gnu.org/licenses/>. - * - * ** end header */ package org.caosdb.server.database.backend.transaction; diff --git a/src/main/java/org/caosdb/server/entity/Message.java b/src/main/java/org/caosdb/server/entity/Message.java index 3e469b2dc84b07e3ac3de378f8990cc520989cc0..91720aed492a8b1875bb5613df2aaace7df3bef5 100644 --- a/src/main/java/org/caosdb/server/entity/Message.java +++ b/src/main/java/org/caosdb/server/entity/Message.java @@ -1,9 +1,10 @@ /* - * ** header v3.0 * This file is a part of the CaosDB Project. * * Copyright (C) 2018 Research Group Biomedical Physics, * Max-Planck-Institute for Dynamics and Self-Organization Göttingen + * Copyright (C) 2019-2021 IndiScale GmbH <info@indiscale.com> + * Copyright (C) 2019-2021 Timm Fitschen <t.fitschen@indiscale.com> * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as @@ -17,8 +18,6 @@ * * You should have received a copy of the GNU Affero General Public License * along with this program. If not, see <https://www.gnu.org/licenses/>. - * - * ** end header */ package org.caosdb.server.entity; diff --git a/src/main/java/org/caosdb/server/entity/UpdateEntity.java b/src/main/java/org/caosdb/server/entity/UpdateEntity.java index 884632b5ed3f92d740f2eea69ed49ef77511fd1b..221888b3da57694e5eabb64d0955cd6fca5e0b0e 100644 --- a/src/main/java/org/caosdb/server/entity/UpdateEntity.java +++ b/src/main/java/org/caosdb/server/entity/UpdateEntity.java @@ -1,9 +1,10 @@ /* - * ** header v3.0 * This file is a part of the CaosDB Project. * * Copyright (C) 2018 Research Group Biomedical Physics, * Max-Planck-Institute for Dynamics and Self-Organization Göttingen + * Copyright (C) 2019-2021 IndiScale GmbH <info@indiscale.com> + * Copyright (C) 2019-2021 Timm Fitschen <t.fitschen@indiscale.com> * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as @@ -17,8 +18,6 @@ * * You should have received a copy of the GNU Affero General Public License * along with this program. If not, see <https://www.gnu.org/licenses/>. - * - * ** end header */ package org.caosdb.server.entity; diff --git a/src/main/java/org/caosdb/server/entity/WritableEntity.java b/src/main/java/org/caosdb/server/entity/WritableEntity.java index ab8ccbb995430e267e84d1f2a235c0d928e6762d..22ffd6e869e871cf568e87363e5ead762e444400 100644 --- a/src/main/java/org/caosdb/server/entity/WritableEntity.java +++ b/src/main/java/org/caosdb/server/entity/WritableEntity.java @@ -1,9 +1,10 @@ /* - * ** header v3.0 * This file is a part of the CaosDB Project. * * Copyright (C) 2018 Research Group Biomedical Physics, * Max-Planck-Institute for Dynamics and Self-Organization Göttingen + * Copyright (C) 2019-2021 IndiScale GmbH <info@indiscale.com> + * Copyright (C) 2019-2021 Timm Fitschen <t.fitschen@indiscale.com> * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as @@ -17,8 +18,6 @@ * * You should have received a copy of the GNU Affero General Public License * along with this program. If not, see <https://www.gnu.org/licenses/>. - * - * ** end header */ package org.caosdb.server.entity; diff --git a/src/main/java/org/caosdb/server/entity/container/WritableContainer.java b/src/main/java/org/caosdb/server/entity/container/WritableContainer.java index 5fdb8c39ec7f01280278bec0a1f2928bfed7f5c2..fcc8de4e7a44ddcfff1e85b282c4f70311c80f34 100644 --- a/src/main/java/org/caosdb/server/entity/container/WritableContainer.java +++ b/src/main/java/org/caosdb/server/entity/container/WritableContainer.java @@ -1,5 +1,4 @@ /* - * ** header v3.0 * This file is a part of the CaosDB Project. * * Copyright (C) 2018 Research Group Biomedical Physics, @@ -19,8 +18,6 @@ * * You should have received a copy of the GNU Affero General Public License * along with this program. If not, see <https://www.gnu.org/licenses/>. - * - * ** end header */ package org.caosdb.server.entity.container; diff --git a/src/main/java/org/caosdb/server/jobs/Job.java b/src/main/java/org/caosdb/server/jobs/Job.java index cc943fbd0baf211d7f467cb54a7797616218f608..2de6b08537d82504bb989a4cf661f89ff473e4c2 100644 --- a/src/main/java/org/caosdb/server/jobs/Job.java +++ b/src/main/java/org/caosdb/server/jobs/Job.java @@ -1,11 +1,10 @@ /* - * ** header v3.0 * This file is a part of the CaosDB Project. * * Copyright (C) 2018 Research Group Biomedical Physics, * Max-Planck-Institute for Dynamics and Self-Organization Göttingen - * Copyright (C) 2020 IndiScale GmbH <info@indiscale.com> - * Copyright (C) 2020 Timm Fitschen <t.fitschen@indiscale.com> + * Copyright (C) 2020-2021 IndiScale GmbH <info@indiscale.com> + * Copyright (C) 2020-2021 Timm Fitschen <t.fitschen@indiscale.com> * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as @@ -19,8 +18,6 @@ * * You should have received a copy of the GNU Affero General Public License * along with this program. If not, see <https://www.gnu.org/licenses/>. - * - * ** end header */ package org.caosdb.server.jobs; diff --git a/src/main/java/org/caosdb/server/jobs/Schedule.java b/src/main/java/org/caosdb/server/jobs/Schedule.java index 0090ec92dffb310052b5b8cc82424e2edd0288f9..f33400099a951aa8fbcf1975208988085813a8b8 100644 --- a/src/main/java/org/caosdb/server/jobs/Schedule.java +++ b/src/main/java/org/caosdb/server/jobs/Schedule.java @@ -1,9 +1,10 @@ /* - * ** header v3.0 * This file is a part of the CaosDB Project. * * Copyright (C) 2018 Research Group Biomedical Physics, * Max-Planck-Institute for Dynamics and Self-Organization Göttingen + * Copyright (C) 2020-2021 IndiScale GmbH <info@indiscale.com> + * Copyright (C) 2020-2021 Timm Fitschen <t.fitschen@indiscale.com> * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as @@ -17,8 +18,6 @@ * * You should have received a copy of the GNU Affero General Public License * along with this program. If not, see <https://www.gnu.org/licenses/>. - * - * ** end header */ package org.caosdb.server.jobs; diff --git a/src/main/java/org/caosdb/server/jobs/ScheduledJob.java b/src/main/java/org/caosdb/server/jobs/ScheduledJob.java index 65bc3a1947baf5b76539f281e0d855e878a3bdfd..3affdfd21421961edc4721c25d80f392d914d1bb 100644 --- a/src/main/java/org/caosdb/server/jobs/ScheduledJob.java +++ b/src/main/java/org/caosdb/server/jobs/ScheduledJob.java @@ -1,5 +1,4 @@ /* - * ** header v3.0 * This file is a part of the CaosDB Project. * * Copyright (C) 2020 IndiScale GmbH <info@indiscale.com> @@ -17,8 +16,6 @@ * * You should have received a copy of the GNU Affero General Public License * along with this program. If not, see <https://www.gnu.org/licenses/>. - * - * ** end header */ package org.caosdb.server.jobs; diff --git a/src/main/java/org/caosdb/server/jobs/TransactionStage.java b/src/main/java/org/caosdb/server/jobs/TransactionStage.java index 8248140d913e08acfb699cbb553a14749c8e2f1f..9e15b4e556269def79d58e532bbe3c9e6cbb9bbd 100644 --- a/src/main/java/org/caosdb/server/jobs/TransactionStage.java +++ b/src/main/java/org/caosdb/server/jobs/TransactionStage.java @@ -1,9 +1,10 @@ /* - * ** header v3.0 * This file is a part of the CaosDB Project. * * Copyright (C) 2018 Research Group Biomedical Physics, * Max-Planck-Institute for Dynamics and Self-Organization Göttingen + * Copyright (C) 2021 IndiScale GmbH <info@indiscale.com> + * Copyright (C) 2021 Timm Fitschen <t.fitschen@indiscale.com> * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as @@ -17,8 +18,6 @@ * * You should have received a copy of the GNU Affero General Public License * along with this program. If not, see <https://www.gnu.org/licenses/>. - * - * ** end header */ package org.caosdb.server.jobs; diff --git a/src/main/java/org/caosdb/server/jobs/core/CheckParOblPropPresent.java b/src/main/java/org/caosdb/server/jobs/core/CheckParOblPropPresent.java index b706afdbcd2082fa2ac3d76c0128959abfb42bd9..9588a3056e15f7fb3847db37468bb6a628741203 100644 --- a/src/main/java/org/caosdb/server/jobs/core/CheckParOblPropPresent.java +++ b/src/main/java/org/caosdb/server/jobs/core/CheckParOblPropPresent.java @@ -1,9 +1,10 @@ /* - * ** header v3.0 * This file is a part of the CaosDB Project. * * Copyright (C) 2018 Research Group Biomedical Physics, * Max-Planck-Institute for Dynamics and Self-Organization Göttingen + * Copyright (C) 2019-2021 IndiScale GmbH <info@indiscale.com> + * Copyright (C) 2019-2021 Timm Fitschen <t.fitschen@indiscale.com> * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as @@ -17,8 +18,6 @@ * * You should have received a copy of the GNU Affero General Public License * along with this program. If not, see <https://www.gnu.org/licenses/>. - * - * ** end header */ package org.caosdb.server.jobs.core; @@ -35,7 +34,7 @@ import org.caosdb.server.utils.ServerMessages; /** * Check whether an entity implements all obligatory properties of all parents. * - * @author tf + * @author Timm Fitschen <t.fitschen@indiscale.com> */ public class CheckParOblPropPresent extends EntityJob { diff --git a/src/main/java/org/caosdb/server/jobs/core/CheckStateTransition.java b/src/main/java/org/caosdb/server/jobs/core/CheckStateTransition.java index d82a8a5be4baf265e6af263391751a68458a91f4..1a159910044a079baba3b64c62176883ad31b8ef 100644 --- a/src/main/java/org/caosdb/server/jobs/core/CheckStateTransition.java +++ b/src/main/java/org/caosdb/server/jobs/core/CheckStateTransition.java @@ -1,5 +1,4 @@ /* - * ** header v3.0 * This file is a part of the CaosDB Project. * * Copyright (C) 2020 IndiScale GmbH <info@indiscale.com> @@ -17,8 +16,6 @@ * * You should have received a copy of the GNU Affero General Public License * along with this program. If not, see <https://www.gnu.org/licenses/>. - * - * ** end header */ package org.caosdb.server.jobs.core; @@ -40,7 +37,7 @@ import org.caosdb.server.utils.ServerMessages; * <p>This job checks if the attempted state transition is in compliance with the state model. This * job runs during the CHECK phase and should do all necessary consistency and permission checks. * - * @author Timm Fitschen (t.fitschen@indiscale.com) + * @author Timm Fitschen <t.fitschen@indiscale.com> */ @JobAnnotation(stage = TransactionStage.POST_CHECK, transaction = WriteTransaction.class) public class CheckStateTransition extends EntityStateJob { diff --git a/src/main/java/org/caosdb/server/jobs/core/EntityStateJob.java b/src/main/java/org/caosdb/server/jobs/core/EntityStateJob.java index c20b18b6e4950c07967d2cfcdd776c95c25f4a53..e2f59a8827a682df508a26176a45a9fc1a874b4e 100644 --- a/src/main/java/org/caosdb/server/jobs/core/EntityStateJob.java +++ b/src/main/java/org/caosdb/server/jobs/core/EntityStateJob.java @@ -1,5 +1,4 @@ /* - * ** header v3.0 * This file is a part of the CaosDB Project. * * Copyright (C) 2020 IndiScale GmbH <info@indiscale.com> @@ -17,8 +16,6 @@ * * You should have received a copy of the GNU Affero General Public License * along with this program. If not, see <https://www.gnu.org/licenses/>. - * - * ** end header */ package org.caosdb.server.jobs.core; @@ -81,7 +78,7 @@ import org.jdom2.Element; * <p>Only the 4th job ({@link MakeStateMessage}) runs during Retrieve transitions. During * WriteTransactions all four jobs do run. * - * @author Timm Fitschen (t.fitschen@indiscale.com) + * @author Timm Fitschen <t.fitschen@indiscale.com> */ public abstract class EntityStateJob extends EntityJob { diff --git a/src/main/java/org/caosdb/server/jobs/core/InheritInitialState.java b/src/main/java/org/caosdb/server/jobs/core/InheritInitialState.java index 89ea4dcc17d143720c55a971e9eb8fcafbbfb30c..b905bfa0fcbf98f107506d1fb1e7d2142b3b8657 100644 --- a/src/main/java/org/caosdb/server/jobs/core/InheritInitialState.java +++ b/src/main/java/org/caosdb/server/jobs/core/InheritInitialState.java @@ -1,3 +1,22 @@ +/* + * This file is a part of the CaosDB Project. + * + * Copyright (C) 2020 IndiScale GmbH <info@indiscale.com> + * Copyright (C) 2020 Timm Fitschen <t.fitschen@indiscale.com> + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see <https://www.gnu.org/licenses/>. + */ package org.caosdb.server.jobs.core; import java.util.List; diff --git a/src/main/java/org/caosdb/server/jobs/core/Inheritance.java b/src/main/java/org/caosdb/server/jobs/core/Inheritance.java index 8b26ba196ce8d4d32f03acda8b38b6524217fcc1..56ac72fab9f980581cf755c5018dad48ad841f96 100644 --- a/src/main/java/org/caosdb/server/jobs/core/Inheritance.java +++ b/src/main/java/org/caosdb/server/jobs/core/Inheritance.java @@ -4,6 +4,8 @@ * * Copyright (C) 2018 Research Group Biomedical Physics, * Max-Planck-Institute for Dynamics and Self-Organization Göttingen + * Copyright (C) 2019-2021 IndiScale GmbH <info@indiscale.com> + * Copyright (C) 2019-2021 Timm Fitschen <t.fitschen@indiscale.com> * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as @@ -40,7 +42,7 @@ import org.caosdb.server.utils.EntityStatus; /** * Add all those properties from the parent to the child which have the same importance (or higher). * - * @author Timm Fitschen (t.fitschen@indiscale.com) + * @author Timm Fitschen <t.fitschen@indiscale.com> */ public class Inheritance extends EntityJob { diff --git a/src/main/java/org/caosdb/server/jobs/core/InitEntityStateJobs.java b/src/main/java/org/caosdb/server/jobs/core/InitEntityStateJobs.java index d3a1fc636761298f1b0586a4036be09ced835021..5cd6d67aa7eca6a231eecf627606f272ac0f0775 100644 --- a/src/main/java/org/caosdb/server/jobs/core/InitEntityStateJobs.java +++ b/src/main/java/org/caosdb/server/jobs/core/InitEntityStateJobs.java @@ -1,5 +1,4 @@ /* - * ** header v3.0 * This file is a part of the CaosDB Project. * * Copyright (C) 2020 IndiScale GmbH <info@indiscale.com> @@ -17,10 +16,7 @@ * * You should have received a copy of the GNU Affero General Public License * along with this program. If not, see <https://www.gnu.org/licenses/>. - * - * ** end header */ - package org.caosdb.server.jobs.core; import java.util.ArrayList; @@ -53,7 +49,7 @@ import org.caosdb.server.utils.Observer; * have a state anymore but the previous version had, because it has to be checked if the stateModel * allows to leave in this state. * - * @author Timm Fitschen (t.fitschen@indiscale.com) + * @author Timm Fitschen <t.fitschen@indiscale.com> */ @JobAnnotation( loadAlways = true, diff --git a/src/main/java/org/caosdb/server/jobs/core/MakeStateMessage.java b/src/main/java/org/caosdb/server/jobs/core/MakeStateMessage.java index 855d6a139aa80fa0b67cda652708b3e56ef5eb2b..d497a2ab5d955f0d6db0205b360a1a56ef90a4b7 100644 --- a/src/main/java/org/caosdb/server/jobs/core/MakeStateMessage.java +++ b/src/main/java/org/caosdb/server/jobs/core/MakeStateMessage.java @@ -1,5 +1,4 @@ /* - * ** header v3.0 * This file is a part of the CaosDB Project. * * Copyright (C) 2020 IndiScale GmbH <info@indiscale.com> @@ -17,10 +16,7 @@ * * You should have received a copy of the GNU Affero General Public License * along with this program. If not, see <https://www.gnu.org/licenses/>. - * - * ** end header */ - package org.caosdb.server.jobs.core; import java.util.List; diff --git a/src/main/java/org/caosdb/server/permissions/AbstractEntityACLFactory.java b/src/main/java/org/caosdb/server/permissions/AbstractEntityACLFactory.java index c8cd93e4a1d12125235819b4a2ba69fa12bd0256..d5d818fd42b6a9b65af07df8bab627be2aeb1551 100644 --- a/src/main/java/org/caosdb/server/permissions/AbstractEntityACLFactory.java +++ b/src/main/java/org/caosdb/server/permissions/AbstractEntityACLFactory.java @@ -1,9 +1,10 @@ /* - * ** header v3.0 * This file is a part of the CaosDB Project. * * Copyright (C) 2018 Research Group Biomedical Physics, * Max-Planck-Institute for Dynamics and Self-Organization Göttingen + * Copyright (C) 2019-2021 IndiScale GmbH <info@indiscale.com> + * Copyright (C) 2019-2021 Timm Fitschen <t.fitschen@indiscale.com> * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as @@ -17,8 +18,6 @@ * * You should have received a copy of the GNU Affero General Public License * along with this program. If not, see <https://www.gnu.org/licenses/>. - * - * ** end header */ package org.caosdb.server.permissions; diff --git a/src/main/java/org/caosdb/server/query/CQLLexer.g4 b/src/main/java/org/caosdb/server/query/CQLLexer.g4 index 71b41d480bc171aa02af3b2e61eadd16345b3c6d..a091027c40abafe60b307367929f1736b62ac046 100644 --- a/src/main/java/org/caosdb/server/query/CQLLexer.g4 +++ b/src/main/java/org/caosdb/server/query/CQLLexer.g4 @@ -1,9 +1,10 @@ /* - * ** header v3.0 * This file is a part of the CaosDB Project. * * Copyright (C) 2018 Research Group Biomedical Physics, * Max-Planck-Institute for Dynamics and Self-Organization Göttingen + * Copyright (C) 2019-2021 IndiScale GmbH <info@indiscale.com> + * Copyright (C) 2019-2021 Timm Fitschen <t.fitschen@indiscale.com> * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as @@ -17,40 +18,38 @@ * * You should have received a copy of the GNU Affero General Public License * along with this program. If not, see <https://www.gnu.org/licenses/>. - * - * ** end header */ lexer grammar CQLLexer; AS_A: - [Aa][Ss] (WHITE_SPACE_f? A)? WHITE_SPACE_f? + [Aa][Ss] (WHITE_SPACE_f? A)? WHITE_SPACE_f? ; IS_REFERENCED: - (IS_f WHITE_SPACE_f?)? [Rr][Ee][Ff][Ee][Rr][Ee][Nn][Cc][Ee][Dd] WHITE_SPACE_f? + (IS_f WHITE_SPACE_f?)? [Rr][Ee][Ff][Ee][Rr][Ee][Nn][Cc][Ee][Dd] WHITE_SPACE_f? ; BY: - [Bb][Yy] WHITE_SPACE_f? + [Bb][Yy] WHITE_SPACE_f? ; fragment OF_f: - [Oo][Ff] + [Oo][Ff] ; fragment ANY_f: - [Aa][Nn][Yy] + [Aa][Nn][Yy] ; fragment VERSION_f: - [Vv][Ee][Rr][Ss][Ii][Oo][Nn] + [Vv][Ee][Rr][Ss][Ii][Oo][Nn] ; ANY_VERSION_OF: - (ANY_f WHITE_SPACE_f VERSION_f WHITE_SPACE_f OF_f) WHITE_SPACE_f? + (ANY_f WHITE_SPACE_f VERSION_f WHITE_SPACE_f OF_f) WHITE_SPACE_f? ; SELECT: @@ -58,27 +57,27 @@ SELECT: ; INSERTED: - [Ii][Nn][Ss][Ee][Rr][Tt][Ee][Dd] WHITE_SPACE_f? + [Ii][Nn][Ss][Ee][Rr][Tt][Ee][Dd] WHITE_SPACE_f? ; CREATED: - [Cc][Rr][Ee][Aa][Tt][Ee][Dd] WHITE_SPACE_f? + [Cc][Rr][Ee][Aa][Tt][Ee][Dd] WHITE_SPACE_f? ; UPDATED: - [Uu][Pp][Dd][Aa][Tt][Ee][Dd] WHITE_SPACE_f? + [Uu][Pp][Dd][Aa][Tt][Ee][Dd] WHITE_SPACE_f? ; ON: - [Oo][Nn] WHITE_SPACE_f? + [Oo][Nn] WHITE_SPACE_f? ; IN: - [Ii][Nn] WHITE_SPACE_f? + [Ii][Nn] WHITE_SPACE_f? ; AFTER: - [Aa][Ff][Tt][Ee][Rr] WHITE_SPACE_f? + [Aa][Ff][Tt][Ee][Rr] WHITE_SPACE_f? ; BEFORE: @@ -90,258 +89,258 @@ UNTIL: ; SINCE: - [Ss][Ii][Nn][Cc][Ee] WHITE_SPACE_f? + [Ss][Ii][Nn][Cc][Ee] WHITE_SPACE_f? ; IS_STORED_AT: - (IS_f WHITE_SPACE_f?)? [Ss][Tt][Oo][Rr][Ee][Dd] (WHITE_SPACE_f? AT)? WHITE_SPACE_f? + (IS_f WHITE_SPACE_f?)? [Ss][Tt][Oo][Rr][Ee][Dd] (WHITE_SPACE_f? AT)? WHITE_SPACE_f? ; AT: - [Aa][Tt] WHITE_SPACE_f? + [Aa][Tt] WHITE_SPACE_f? ; FIND: - [Ff][Ii][Nn][Dd] WHITE_SPACE_f? + [Ff][Ii][Nn][Dd] WHITE_SPACE_f? ; COUNT: - [Cc][Oo][Uu][Nn][Tt] WHITE_SPACE_f? + [Cc][Oo][Uu][Nn][Tt] WHITE_SPACE_f? ; - + AND: - ( - ( - [Aa][Nn][Dd] - ) - | '&' - ) WHITE_SPACE_f? + ( + ( + [Aa][Nn][Dd] + ) + | '&' + ) WHITE_SPACE_f? ; OR: - ( - ( - [Oo][Rr] - ) - | '|' - ) WHITE_SPACE_f? + ( + ( + [Oo][Rr] + ) + | '|' + ) WHITE_SPACE_f? ; LPAREN: - '(' WHITE_SPACE_f? + '(' WHITE_SPACE_f? ; RPAREN: - ')' WHITE_SPACE_f? + ')' WHITE_SPACE_f? ; SINGLE_QUOTE_START: - '\'' -> pushMode(SINGLE_QUOTE_MODE) + '\'' -> pushMode(SINGLE_QUOTE_MODE) ; DOUBLE_QUOTE_START: - '"' -> pushMode(DOUBLE_QUOTE_MODE) + '"' -> pushMode(DOUBLE_QUOTE_MODE) ; OPERATOR: - '=' - | '<' - | '<=' - | '>=' - | '>' - | '!=' - | '->' - | [Rr][Ee][Ff][Ee][Rr][Ee][Nn][Cc][Ee]([Ss]|WHITE_SPACE_f? [Tt][Oo]) (WHITE_SPACE_f? A {_input.LA(1) == ' '}?)? {setText("->");} + '=' + | '<' + | '<=' + | '>=' + | '>' + | '!=' + | '->' + | [Rr][Ee][Ff][Ee][Rr][Ee][Nn][Cc][Ee]([Ss]|WHITE_SPACE_f? [Tt][Oo]) (WHITE_SPACE_f? A {_input.LA(1) == ' '}?)? {setText("->");} ; LIKE: - [Ll][Ii][Kk][Ee] WHITE_SPACE_f? + [Ll][Ii][Kk][Ee] WHITE_SPACE_f? ; IS_NULL: - IS_f WHITE_SPACE_f NULL_f WHITE_SPACE_f? + IS_f WHITE_SPACE_f NULL_f WHITE_SPACE_f? ; IS_NOT_NULL: - IS_f WHITE_SPACE_f NOT_f WHITE_SPACE_f NULL_f WHITE_SPACE_f? + IS_f WHITE_SPACE_f NOT_f WHITE_SPACE_f NULL_f WHITE_SPACE_f? ; fragment NULL_f: - [Nn][Uu][Ll][Ll] + [Nn][Uu][Ll][Ll] ; fragment DOES_f: - [Dd][Oo][Ee][Ss] + [Dd][Oo][Ee][Ss] ; fragment NOT_f: - [Nn][Oo][Tt] + [Nn][Oo][Tt] ; fragment DOESNT_f: - DOES_f WHITE_SPACE_f? NOT_f - | DOES_f [Nn] SINGLE_QUOTE [Tt] + DOES_f WHITE_SPACE_f? NOT_f + | DOES_f [Nn] SINGLE_QUOTE [Tt] ; fragment ISNT_f: - IS_f [Nn] SINGLE_QUOTE [Tt] + IS_f [Nn] SINGLE_QUOTE [Tt] ; fragment WERE_f: - [Ww][Ee][Rr][Ee] + [Ww][Ee][Rr][Ee] ; fragment WERENT_f: - WERE_f [Nn] SINGLE_QUOTE [Tt] + WERE_f [Nn] SINGLE_QUOTE [Tt] ; fragment HAVENT_f: - HAVE_f [Nn] SINGLE_QUOTE [Tt] + HAVE_f [Nn] SINGLE_QUOTE [Tt] ; fragment HADNT_f: - HAD_f [Nn] SINGLE_QUOTE [Tt] + HAD_f [Nn] SINGLE_QUOTE [Tt] ; fragment HAD_f: - [Hh][Aa][Dd] + [Hh][Aa][Dd] ; - + fragment HAVE_f: - [Hh][Aa][Vv][Ee] + [Hh][Aa][Vv][Ee] ; fragment HAS_f: - [Hh][Aa][Ss] + [Hh][Aa][Ss] ; fragment HASNT_f: - HAS_f [Nn] SINGLE_QUOTE [Tt] + HAS_f [Nn] SINGLE_QUOTE [Tt] ; fragment BEEN_f: - [Bb][Ee][Ee][Nn] + [Bb][Ee][Ee][Nn] ; fragment HAVE_A_f: - HAVE_f (WHITE_SPACE? A)? + HAVE_f (WHITE_SPACE? A)? ; fragment DO_f: - [Dd][Oo] + [Dd][Oo] ; fragment DONT_f: - DO_f NOT_f - | DO_f [Nn] SINGLE_QUOTE [Tt] + DO_f NOT_f + | DO_f [Nn] SINGLE_QUOTE [Tt] ; fragment WAS_f: - [Ww][Aa][Ss] + [Ww][Aa][Ss] ; fragment WASNT_f: - WAS_f [Nn] SINGLE_QUOTE [Tt] + WAS_f [Nn] SINGLE_QUOTE [Tt] ; NEGATION: - ( - '!' - | DOESNT_f (WHITE_SPACE? HAVE_A_f)? - | DONT_f (WHITE_SPACE? HAVE_A_f)? - | HASNT_f (WHITE_SPACE? BEEN_f)? - | ISNT_f (WHITE_SPACE? BEEN_f)? - | NOT_f (WHITE_SPACE? BEEN_f)? - | WERENT_f (WHITE_SPACE? BEEN_f)? - | WASNT_f (WHITE_SPACE? BEEN_f)? - | HAVENT_f (WHITE_SPACE? BEEN_f)? - | HADNT_f (WHITE_SPACE? BEEN_f)? - ) WHITE_SPACE_f? -; + ( + '!' + | DOESNT_f (WHITE_SPACE? HAVE_A_f)? + | DONT_f (WHITE_SPACE? HAVE_A_f)? + | HASNT_f (WHITE_SPACE? BEEN_f)? + | ISNT_f (WHITE_SPACE? BEEN_f)? + | NOT_f (WHITE_SPACE? BEEN_f)? + | WERENT_f (WHITE_SPACE? BEEN_f)? + | WASNT_f (WHITE_SPACE? BEEN_f)? + | HAVENT_f (WHITE_SPACE? BEEN_f)? + | HADNT_f (WHITE_SPACE? BEEN_f)? + ) WHITE_SPACE_f? +; WITH: - [Ww][Ii][Tt][Hh] WHITE_SPACE_f? + [Ww][Ii][Tt][Hh] WHITE_SPACE_f? ; -THE: - [Tt][Hh][Ee] WHITE_SPACE_f? +THE: + [Tt][Hh][Ee] WHITE_SPACE_f? ; GREATEST: - [Gg][Rr][Ee][Aa][Tt][Ee][Ss][Tt] WHITE_SPACE_f? + [Gg][Rr][Ee][Aa][Tt][Ee][Ss][Tt] WHITE_SPACE_f? ; SMALLEST: - [Ss][Mm][Aa][Ll][Ll][Ee][Ss][Tt] WHITE_SPACE_f? + [Ss][Mm][Aa][Ll][Ll][Ee][Ss][Tt] WHITE_SPACE_f? ; A: - [Aa][Nn]? WHITE_SPACE_f? + [Aa][Nn]? WHITE_SPACE_f? ; ME: - [Mm][Ee] WHITE_SPACE_f? + [Mm][Ee] WHITE_SPACE_f? ; SOMEONE: - [Ss][Oo][Mm][Ee][Oo][Nn][Ee] WHITE_SPACE_f? + [Ss][Oo][Mm][Ee][Oo][Nn][Ee] WHITE_SPACE_f? ; ELSE: - [Ee][Ll][Ss][Ee] WHITE_SPACE_f? + [Ee][Ll][Ss][Ee] WHITE_SPACE_f? ; WHERE: - [Ww][Hh][Ee][Rr][Ee] WHITE_SPACE_f? + [Ww][Hh][Ee][Rr][Ee] WHITE_SPACE_f? ; WHICH: - [Ww][Hh][Ii][Cc][Hh] WHITE_SPACE_f? + [Ww][Hh][Ii][Cc][Hh] WHITE_SPACE_f? ; HAS_A: - ( - (HAS_f | HAD_f | HAVE_f | WERE_f | WAS_f | IS_f) - ( - (WHITE_SPACE_f? A) - | (WHITE_SPACE_f? BEEN_f) - )? - ) WHITE_SPACE_f? + ( + (HAS_f | HAD_f | HAVE_f | WERE_f | WAS_f | IS_f) + ( + (WHITE_SPACE_f? A) + | (WHITE_SPACE_f? BEEN_f) + )? + ) WHITE_SPACE_f? ; PROPERTY: - [Pp][Rr][Oo][Pp][Ee][Rr][Tt]([Yy]|[Ii][Ee][Ss]) WHITE_SPACE_f? + [Pp][Rr][Oo][Pp][Ee][Rr][Tt]([Yy]|[Ii][Ee][Ss]) WHITE_SPACE_f? ; -RECORDTYPE: - [Rr][Ee][Cc][Oo][Rr][Dd][Tt][Yy][Pp][Ee]([Ss])? WHITE_SPACE_f? +RECORDTYPE: + [Rr][Ee][Cc][Oo][Rr][Dd][Tt][Yy][Pp][Ee]([Ss])? WHITE_SPACE_f? ; RECORD: - [Rr][Ee][Cc][Oo][Rr][Dd]([Ss])? WHITE_SPACE_f? + [Rr][Ee][Cc][Oo][Rr][Dd]([Ss])? WHITE_SPACE_f? ; FILE: - [Ff][Ii][Ll][Ee]([Ss])? WHITE_SPACE_f? + [Ff][Ii][Ll][Ee]([Ss])? WHITE_SPACE_f? ; ENTITY: @@ -349,99 +348,99 @@ ENTITY: ; QUERYTEMPLATE: - [Qq][Uu][Ee][Rr][yY][Tt][Ee][Mm][Pp][Ll][Aa][Tt][Ee] WHITE_SPACE_f? + [Qq][Uu][Ee][Rr][yY][Tt][Ee][Mm][Pp][Ll][Aa][Tt][Ee] WHITE_SPACE_f? ; fragment IS_f: - [Ii][Ss] + [Ii][Ss] ; fragment WHITE_SPACE_f: - [ \t\n\r]+ + [ \t\n\r]+ ; WHITE_SPACE: - [ \t\n\r]+ + [ \t\n\r]+ ; fragment DOUBLE_QUOTE: - '"' + '"' ; fragment SINGLE_QUOTE: - '\'' + '\'' ; REGEXP_MARKER: - '#' + '#' ; REGEXP_BEGIN: - '<<' + '<<' ; REGEXP_END: - '>>' + '>>' ; -ID: - [Ii][Dd] WHITE_SPACE_f? +ID: + [Ii][Dd] WHITE_SPACE_f? ; SLASH: - '/' + '/' ; STAR: - '*' + '*' ; DOT: - '.' + '.' ; QMARK: - '?' WHITE_SPACE_f? + '?' WHITE_SPACE_f? ; BUT: - [Bb][Uu][Tt] WHITE_SPACE_f? + [Bb][Uu][Tt] WHITE_SPACE_f? ; ESC_REGEXP_END: - ESC_MARKER - '>>' WHITE_SPACE_f? + ESC_MARKER + '>>' WHITE_SPACE_f? ; ESC_STAR: - ESC_MARKER - '*' WHITE_SPACE_f? + ESC_MARKER + '*' WHITE_SPACE_f? ; ESC_BS: - ESC_MARKER - '\\' WHITE_SPACE_f? + ESC_MARKER + '\\' WHITE_SPACE_f? ; -fragment +fragment ESC_MARKER: - '\\' + '\\' ; TODAY: - [Tt][Oo][Dd][Aa][Yy] WHITE_SPACE_f? + [Tt][Oo][Dd][Aa][Yy] WHITE_SPACE_f? ; HYPHEN: - '-' + '-' ; COLON: - ':' + ':' ; NUM: @@ -451,53 +450,53 @@ NUM: ; NUM_f: - ('0'..'9')+ + ('0'..'9')+ ; TXT: - ('a'..'z' | 'A'..'Z' | '0'..'9' | '_' | '-' {_input.LA(1) != '>'}? | '+' | '&' | ';' | ',' | '$' | ':' | '%' | '^' | '~' {_input.LA(1) != '='}? | '`' | '´' | 'ö' | 'ä' | 'ß' | 'ü' | 'Ö' | 'Ä' | 'Ü' | '@' | '[' | ']' | '{' | '}' )+ + ('a'..'z' | 'A'..'Z' | '0'..'9' | '_' | '-' {_input.LA(1) != '>'}? | '+' | '&' | ';' | ',' | '$' | ':' | '%' | '^' | '~' {_input.LA(1) != '='}? | '`' | '´' | 'ö' | 'ä' | 'ß' | 'ü' | 'Ö' | 'Ä' | 'Ü' | '@' | '[' | ']' | '{' | '}' )+ ; UNKNOWN_CHAR: . ; mode SINGLE_QUOTE_MODE; - SINGLE_QUOTE_ESCAPED_CHAR: - ESC_MARKER - ( '\'' | '\\' | '*' ) - ; - - SINGLE_QUOTE_END: - '\'' -> mode(DEFAULT_MODE) - ; - - SINGLE_QUOTE_STAR: - '*' - ; - - SINGLE_QUOTE_ANY_CHAR: - ~('\''|'\\'|'*')+ - ; - + SINGLE_QUOTE_ESCAPED_CHAR: + ESC_MARKER + ( '\'' | '\\' | '*' ) + ; + + SINGLE_QUOTE_END: + '\'' -> mode(DEFAULT_MODE) + ; + + SINGLE_QUOTE_STAR: + '*' + ; + + SINGLE_QUOTE_ANY_CHAR: + ~('\''|'\\'|'*')+ + ; + mode DOUBLE_QUOTE_MODE; - DOUBLE_QUOTE_ESCAPED_CHAR: - ESC_MARKER - ( '"' | '\\' | '*' ) - ; + DOUBLE_QUOTE_ESCAPED_CHAR: + ESC_MARKER + ( '"' | '\\' | '*' ) + ; + + DOUBLE_QUOTE_END: + '"' -> mode(DEFAULT_MODE) + ; + + DOUBLE_QUOTE_STAR: + '*' + ; - DOUBLE_QUOTE_END: - '"' -> mode(DEFAULT_MODE) - ; - - DOUBLE_QUOTE_STAR: - '*' - ; + DOUBLE_QUOTE_ANY_CHAR: + ~('"'|'\\'|'*')+ + ; - DOUBLE_QUOTE_ANY_CHAR: - ~('"'|'\\'|'*')+ - ; - mode SELECT_MODE; @@ -508,14 +507,11 @@ mode SELECT_MODE; SELECT_DOT: '.' ; - + SELECT_COMMA: ',' ; - + SELECTOR_TXT: - . + . ; - - - diff --git a/src/main/java/org/caosdb/server/query/CQLParser.g4 b/src/main/java/org/caosdb/server/query/CQLParser.g4 index 6aea8c55f006cd9127d68f0c09e1654d9f9842a9..c4311ac1cbe03f490b79456e091cc0e73b94c506 100644 --- a/src/main/java/org/caosdb/server/query/CQLParser.g4 +++ b/src/main/java/org/caosdb/server/query/CQLParser.g4 @@ -1,10 +1,10 @@ /* - * ** header v3.0 * This file is a part of the CaosDB Project. * * Copyright (C) 2018 Research Group Biomedical Physics, * Max-Planck-Institute for Dynamics and Self-Organization Göttingen - * Copyright (C) 2020 Indiscale GmbH <info@indiscale.com> + * Copyright (C) 2019-2021 IndiScale GmbH <info@indiscale.com> + * Copyright (C) 2019-2021 Timm Fitschen <t.fitschen@indiscale.com> * Copyright (C) 2020 Florian Spreckelsen <f.spreckelsen@indiscale.com> * * This program is free software: you can redistribute it and/or modify @@ -19,8 +19,6 @@ * * You should have received a copy of the GNU Affero General Public License * along with this program. If not, see <https://www.gnu.org/licenses/>. - * - * ** end header */ parser grammar CQLParser; @@ -32,38 +30,38 @@ options { tokenVocab = CQLLexer; } } cq returns [Query.Type t, List<Query.Selection> s, Query.Pattern e, Query.Role r, EntityFilterInterface filter, VersionFilter v] - @init{ - $s = null; - $e = null; - $r = null; - $v = VersionFilter.UNVERSIONED; - $filter = null; - } + @init{ + $s = null; + $e = null; + $r = null; + $v = VersionFilter.UNVERSIONED; + $filter = null; + } : - ( - SELECT prop_sel {$s = $prop_sel.s;} FROM {$t = Query.Type.FIND;} - | FIND {$t = Query.Type.FIND;} - | COUNT {$t = Query.Type.COUNT;}) - (version {$v = $version.v;})? - ( role {$r = $role.r;} )? - ( - entity_filter {$filter = $entity_filter.filter;} - | - entity WHITE_SPACE?{$e = $entity.ep;} - ( - entity_filter {$filter = $entity_filter.filter;} - )? - )? - EOF + ( + SELECT prop_sel {$s = $prop_sel.s;} FROM {$t = Query.Type.FIND;} + | FIND {$t = Query.Type.FIND;} + | COUNT {$t = Query.Type.COUNT;}) + (version {$v = $version.v;})? + ( role {$r = $role.r;} )? + ( + entity_filter {$filter = $entity_filter.filter;} + | + entity WHITE_SPACE?{$e = $entity.ep;} + ( + entity_filter {$filter = $entity_filter.filter;} + )? + )? + EOF ; version returns [VersionFilter v] - @init{ - $v = null; - } + @init{ + $v = null; + } : - ANY_VERSION_OF {$v = VersionFilter.ANY_VERSION;} + ANY_VERSION_OF {$v = VersionFilter.ANY_VERSION;} ; prop_sel returns [List<Query.Selection> s] @@ -83,110 +81,110 @@ selector_txt: SELECTOR_TXT+ ; -role returns [Query.Role r]: - RECORDTYPE {$r = Query.Role.RECORDTYPE;} - | RECORD {$r = Query.Role.RECORD;} - | PROPERTY {$r = Query.Role.PROPERTY;} - | FILE {$r = Query.Role.FILE;} - | QUERYTEMPLATE {$r = Query.Role.QUERYTEMPLATE;} - | ENTITY {$r = Query.Role.ENTITY;} +role returns [Query.Role r]: + RECORDTYPE {$r = Query.Role.RECORDTYPE;} + | RECORD {$r = Query.Role.RECORD;} + | PROPERTY {$r = Query.Role.PROPERTY;} + | FILE {$r = Query.Role.FILE;} + | QUERYTEMPLATE {$r = Query.Role.QUERYTEMPLATE;} + | ENTITY {$r = Query.Role.ENTITY;} ; entity_filter returns [EntityFilterInterface filter] - @init{ - $filter = null; - } + @init{ + $filter = null; + } : - which_exp - ( - ( - LPAREN WHITE_SPACE? - ( - filter_expression {$filter = $filter_expression.efi;} - | conjunction {$filter = $conjunction.c;} - | disjunction {$filter = $disjunction.d;} - ) - RPAREN - ) | ( - filter_expression {$filter = $filter_expression.efi;} - | conjunction {$filter = $conjunction.c;} - | disjunction {$filter = $disjunction.d;} - ) - )? + which_exp + ( + ( + LPAREN WHITE_SPACE? + ( + filter_expression {$filter = $filter_expression.efi;} + | conjunction {$filter = $conjunction.c;} + | disjunction {$filter = $disjunction.d;} + ) + RPAREN + ) | ( + filter_expression {$filter = $filter_expression.efi;} + | conjunction {$filter = $conjunction.c;} + | disjunction {$filter = $disjunction.d;} + ) + )? ; which_exp: - WHICH (HAS_A (PROPERTY)?)? - | HAS_A (PROPERTY)? - | WITH (A (PROPERTY)?)? - | WHERE - | DOT WHITE_SPACE? + WHICH (HAS_A (PROPERTY)?)? + | HAS_A (PROPERTY)? + | WITH (A (PROPERTY)?)? + | WHERE + | DOT WHITE_SPACE? ; filter_expression returns [EntityFilterInterface efi] : - backreference (subproperty {((Backreference) $backreference.ref).setSubProperty($subproperty.subp);})? {$efi = $backreference.ref;} - | idfilter {$efi=$idfilter.filter;} - | storedat {$efi=$storedat.filter;} - | transaction {$efi=$transaction.filter;} - | ( pov (subproperty {((POV) $pov.filter).setSubProperty($subproperty.subp);})? {$efi = $pov.filter;} ) - | subproperty {$efi=$subproperty.subp;} - | negation {$efi=$negation.n;} + backreference (subproperty {((Backreference) $backreference.ref).setSubProperty($subproperty.subp);})? {$efi = $backreference.ref;} + | idfilter {$efi=$idfilter.filter;} + | storedat {$efi=$storedat.filter;} + | transaction {$efi=$transaction.filter;} + | ( pov (subproperty {((POV) $pov.filter).setSubProperty($subproperty.subp);})? {$efi = $pov.filter;} ) + | subproperty {$efi=$subproperty.subp;} + | negation {$efi=$negation.n;} ; idfilter returns [IDFilter filter] locals [String o, String v, String a] @init{ - $a = null; - $o = null; - $v = null; -} + $a = null; + $o = null; + $v = null; +} @after{ - $filter = new IDFilter($o,$v,$a); + $filter = new IDFilter($o,$v,$a); } : - (minmax {$a=$minmax.agg;})?? - ID - ( - OPERATOR {$o = $OPERATOR.text;} - WHITE_SPACE? - value {$v = $value.str;} - )? + (minmax {$a=$minmax.agg;})?? + ID + ( + OPERATOR {$o = $OPERATOR.text;} + WHITE_SPACE? + value {$v = $value.str;} + )? ; transaction returns [TransactionFilter filter] locals [String type, TransactionFilter.Transactor user, String time, String time_op] @init{ - $time = null; - $user = null; - $type = null; - $time_op = null; + $time = null; + $user = null; + $type = null; + $time_op = null; } @after{ - $filter = new TransactionFilter($type,$user,$time,$time_op); + $filter = new TransactionFilter($type,$user,$time,$time_op); } : - ( - ( INSERTED | CREATED ) {$type = TransactionFilter.INSERTION;} - | ( UPDATED ) {$type = TransactionFilter.UPDATE;} - ) - - ( - transactor (transaction_time {$time = $transaction_time.tqp; $time_op = $transaction_time.op;})? {$user = $transactor.t;} - | transaction_time (transactor {$user = $transactor.t;})? {$time = $transaction_time.tqp; $time_op = $transaction_time.op;} - ) + ( + ( INSERTED | CREATED ) {$type = TransactionFilter.INSERTION;} + | ( UPDATED ) {$type = TransactionFilter.UPDATE;} + ) + + ( + transactor (transaction_time {$time = $transaction_time.tqp; $time_op = $transaction_time.op;})? {$user = $transactor.t;} + | transaction_time (transactor {$user = $transactor.t;})? {$time = $transaction_time.tqp; $time_op = $transaction_time.op;} + ) ; transactor returns [TransactionFilter.Transactor t] : - BY - ( - SOMEONE ELSE BUT ME {$t = TransactionFilter.neq_currentTransactor();} - | SOMEONE ELSE BUT entity {$t = TransactionFilter.neq_foreignTransactor($entity.ep);} - | SOMEONE ELSE BUT username {$t = TransactionFilter.neq_foreignTransactor($username.ep);} - | SOMEONE ELSE {$t = TransactionFilter.neq_currentTransactor();} - | ME {$t = TransactionFilter.eq_currentTransactor();} - | entity {$t = TransactionFilter.eq_foreignTransactor($entity.ep);} - | username {$t = TransactionFilter.eq_foreignTransactor($username.ep);} - ) + BY + ( + SOMEONE ELSE BUT ME {$t = TransactionFilter.neq_currentTransactor();} + | SOMEONE ELSE BUT entity {$t = TransactionFilter.neq_foreignTransactor($entity.ep);} + | SOMEONE ELSE BUT username {$t = TransactionFilter.neq_foreignTransactor($username.ep);} + | SOMEONE ELSE {$t = TransactionFilter.neq_currentTransactor();} + | ME {$t = TransactionFilter.eq_currentTransactor();} + | entity {$t = TransactionFilter.eq_foreignTransactor($entity.ep);} + | username {$t = TransactionFilter.eq_foreignTransactor($username.ep);} + ) ; username returns [Query.Pattern ep] locals [int type] @@ -205,14 +203,14 @@ transaction_time returns [String tqp, String op] $op = "("; } : - ( - AT {$op = "=";} + ( + AT {$op = "=";} | (ON | IN) | ( - BEFORE {$op = "<";} - | UNTIL {$op = "<=";} - | AFTER {$op = ">";} - | SINCE {$op = ">=";} + BEFORE {$op = "<";} + | UNTIL {$op = "<=";} + | AFTER {$op = ">";} + | SINCE {$op = ">=";} ) )? ( @@ -222,283 +220,283 @@ transaction_time returns [String tqp, String op] ; /* -* not fully compliant with iso 8601 (TODO) +* not fully compliant with iso 8601 (TODO) */ datetime : - NUM // year - ( - HYPHEN NUM // mon - ( - HYPHEN NUM // day of mon - ( - (m=TXT {$m.text.equals("T")}?)?// compliance with iso datetime - NUM // hour - ( - COLON NUM // minut - ( - COLON NUM // sec - ( - DOT NUM // millisec - )? - )? - )? - )? - )? - )? + NUM // year + ( + HYPHEN NUM // mon + ( + HYPHEN NUM // day of mon + ( + (m=TXT {$m.text.equals("T")}?)?// compliance with iso datetime + NUM // hour + ( + COLON NUM // minut + ( + COLON NUM // sec + ( + DOT NUM // millisec + )? + )? + )? + )? + )? + )? ; pov returns [POV filter] locals [Query.Pattern p, String o, String v, String a] - @init{ - $p = null; - $o = null; - $v = null; - $a = null; - } - @after{ - $filter = new POV($p,$o,$v,$a); - } + @init{ + $p = null; + $o = null; + $v = null; + $a = null; + } + @after{ + $filter = new POV($p,$o,$v,$a); + } : - ( - property {$p = $property.pp; $a=$property.agg;} - ( - ( - LIKE {$o = $LIKE.text.trim();} - ( like_pattern {$v = $like_pattern.ep.toString();} - | value {$v = $value.str;} ) - | OPERATOR {$o = $OPERATOR.text;} WHITE_SPACE? value {$v = $value.str;} - ) - | IS_NULL {$o = "0";} - | IS_NOT_NULL {$o = "!0";} - | IN value {$o = "("; $v=$value.str;} - | NEGATION IN value {$o = "!("; $v=$value.str;} - )? - ) - | - ( - ( LIKE {$o = $LIKE.text;} - ( like_pattern {$v = $like_pattern.ep.toString();} - | value {$v = $value.str;} ) - ) - | ( OPERATOR {$o = $OPERATOR.text;} WHITE_SPACE? value {$v = $value.str;} - ( AS_A - property {$p = $property.pp;} )? - ) - ) - WHITE_SPACE? + ( + property {$p = $property.pp; $a=$property.agg;} + ( + ( + LIKE {$o = $LIKE.text.trim();} + ( like_pattern {$v = $like_pattern.ep.toString();} + | value {$v = $value.str;} ) + | OPERATOR {$o = $OPERATOR.text;} WHITE_SPACE? value {$v = $value.str;} + ) + | IS_NULL {$o = "0";} + | IS_NOT_NULL {$o = "!0";} + | IN value {$o = "("; $v=$value.str;} + | NEGATION IN value {$o = "!("; $v=$value.str;} + )? + ) + | + ( + ( LIKE {$o = $LIKE.text;} + ( like_pattern {$v = $like_pattern.ep.toString();} + | value {$v = $value.str;} ) + ) + | ( OPERATOR {$o = $OPERATOR.text;} WHITE_SPACE? value {$v = $value.str;} + ( AS_A + property {$p = $property.pp;} )? + ) + ) + WHITE_SPACE? ; subproperty returns [SubProperty subp] locals [String p] @init{ - $p = null; - $subp = null; + $p = null; + $subp = null; } : - entity_filter {$subp = new SubProperty($entity_filter.filter);} + entity_filter {$subp = new SubProperty($entity_filter.filter);} ; backreference returns [Backreference ref] locals [Query.Pattern e, Query.Pattern p] - @init{ - $e = null; - $p = null; - } - @after{ - $ref = new Backreference($e, $p); - } + @init{ + $e = null; + $p = null; + } + @after{ + $ref = new Backreference($e, $p); + } : - IS_REFERENCED - (BY A? entity {$e=$entity.ep;})? - ( - WHITE_SPACE? - AS_A - property {$p=$property.pp;} - )? - WHITE_SPACE? + IS_REFERENCED + (BY A? entity {$e=$entity.ep;})? + ( + WHITE_SPACE? + AS_A + property {$p=$property.pp;} + )? + WHITE_SPACE? ; storedat returns [StoredAt filter] locals [String loc] - @init{ - $loc = null; - } - @after{ - $filter = new StoredAt($loc); - } + @init{ + $loc = null; + } + @after{ + $filter = new StoredAt($loc); + } : - IS_STORED_AT - location {$loc = $location.str;} - WHITE_SPACE? + IS_STORED_AT + location {$loc = $location.str;} + WHITE_SPACE? ; conjunction returns [Conjunction c] locals [Conjunction dummy] - @init{ - $c = new Conjunction(); - } + @init{ + $c = new Conjunction(); + } : - ( - f1 = filter_expression {$c.add($f1.efi);} - | - LPAREN WHITE_SPACE? - ( - f4 = filter_expression {$c.add($f4.efi);} - | disjunction {$c.add($disjunction.d);} - | c3=conjunction {$c.addAll($c3.c);} - ) - RPAREN - ) - ( - WHITE_SPACE? - AND - ( - ( which_exp | A (PROPERTY)?? ) - )? - ( - f2 = filter_expression {$c.add($f2.efi);} - | ( - LPAREN WHITE_SPACE? - ( - f3 = filter_expression {$c.add($f3.efi);} - | disjunction {$c.add($disjunction.d);} - | c2=conjunction {$c.addAll($c2.c);} - ) - RPAREN - ) - ) - )+ + ( + f1 = filter_expression {$c.add($f1.efi);} + | + LPAREN WHITE_SPACE? + ( + f4 = filter_expression {$c.add($f4.efi);} + | disjunction {$c.add($disjunction.d);} + | c3=conjunction {$c.addAll($c3.c);} + ) + RPAREN + ) + ( + WHITE_SPACE? + AND + ( + ( which_exp | A (PROPERTY)?? ) + )? + ( + f2 = filter_expression {$c.add($f2.efi);} + | ( + LPAREN WHITE_SPACE? + ( + f3 = filter_expression {$c.add($f3.efi);} + | disjunction {$c.add($disjunction.d);} + | c2=conjunction {$c.addAll($c2.c);} + ) + RPAREN + ) + ) + )+ ; disjunction returns [Disjunction d] - @init{ - $d = new Disjunction(); - } + @init{ + $d = new Disjunction(); + } : - ( - f1 = filter_expression {$d.add($f1.efi);} - | - LPAREN WHITE_SPACE? - ( - f4 = filter_expression {$d.add($f4.efi);} - | conjunction {$d.add($conjunction.c);} - | d3 = disjunction {$d.addAll($d3.d);} - ) - RPAREN - ) - ( - OR - ( - ( which_exp | A (PROPERTY)? ) - )? - ( - f2 = filter_expression {$d.add($f2.efi);} - | ( - LPAREN WHITE_SPACE? - ( - f3 = filter_expression {$d.add($f3.efi);} - | conjunction {$d.add($conjunction.c);} - | d2 = disjunction {$d.addAll($d2.d);} - ) - RPAREN - ) - ) - )+ + ( + f1 = filter_expression {$d.add($f1.efi);} + | + LPAREN WHITE_SPACE? + ( + f4 = filter_expression {$d.add($f4.efi);} + | conjunction {$d.add($conjunction.c);} + | d3 = disjunction {$d.addAll($d3.d);} + ) + RPAREN + ) + ( + OR + ( + ( which_exp | A (PROPERTY)? ) + )? + ( + f2 = filter_expression {$d.add($f2.efi);} + | ( + LPAREN WHITE_SPACE? + ( + f3 = filter_expression {$d.add($f3.efi);} + | conjunction {$d.add($conjunction.c);} + | d2 = disjunction {$d.addAll($d2.d);} + ) + RPAREN + ) + ) + )+ ; negation returns [Negation n] - @init{ - } -: - NEGATION - ( - f1 = filter_expression {$n = new Negation($f1.efi);} - | ( - LPAREN WHITE_SPACE? - ( - f2 = filter_expression {$n = new Negation($f2.efi);} - | disjunction {$n = new Negation($disjunction.d);} - | conjunction {$n = new Negation($conjunction.c);} - ) - RPAREN - ) - ) + @init{ + } +: + NEGATION + ( + f1 = filter_expression {$n = new Negation($f1.efi);} + | ( + LPAREN WHITE_SPACE? + ( + f2 = filter_expression {$n = new Negation($f2.efi);} + | disjunction {$n = new Negation($disjunction.d);} + | conjunction {$n = new Negation($conjunction.c);} + ) + RPAREN + ) + ) ; entity returns [Query.Pattern ep] -: - regexp_pattern {$ep = $regexp_pattern.ep;} - | like_pattern {$ep = $like_pattern.ep;} - | ( double_quoted {$ep = $double_quoted.ep;} ) - | ( single_quoted {$ep = $single_quoted.ep;} ) - | ENTITY {$ep = new Query.Pattern((String) $text.trim(), Query.Pattern.TYPE_NORMAL);} - | ( ~(ENTITY |WHITE_SPACE | DOT) )+ {$ep = new Query.Pattern((String) $text.trim(), Query.Pattern.TYPE_NORMAL);} +: + regexp_pattern {$ep = $regexp_pattern.ep;} + | like_pattern {$ep = $like_pattern.ep;} + | ( double_quoted {$ep = $double_quoted.ep;} ) + | ( single_quoted {$ep = $single_quoted.ep;} ) + | ENTITY {$ep = new Query.Pattern((String) $text.trim(), Query.Pattern.TYPE_NORMAL);} + | ( ~(ENTITY |WHITE_SPACE | DOT) )+ {$ep = new Query.Pattern((String) $text.trim(), Query.Pattern.TYPE_NORMAL);} ; regexp_pattern returns [Query.Pattern ep] locals [StringBuffer sb] - @init{ - $sb = new StringBuffer(); - } + @init{ + $sb = new StringBuffer(); + } : - REGEXP_BEGIN - (ESC_REGEXP_END {$sb.append(">>");} |m=. {$sb.append($m.text);})*? - REGEXP_END {$ep = new Query.Pattern((String) $sb.toString(), Query.Pattern.TYPE_REGEXP);} + REGEXP_BEGIN + (ESC_REGEXP_END {$sb.append(">>");} |m=. {$sb.append($m.text);})*? + REGEXP_END {$ep = new Query.Pattern((String) $sb.toString(), Query.Pattern.TYPE_REGEXP);} ; like_pattern returns [Query.Pattern ep] locals [StringBuffer sb] - @init{ - $sb = new StringBuffer(); - } + @init{ + $sb = new StringBuffer(); + } : - ~(WHITE_SPACE|DOT|LIKE|OPERATOR|AS_A|AND|OR|IS_STORED_AT|IS_REFERENCED)*? - STAR - ~(WHITE_SPACE|DOT|STAR)*? - {$ep = new Query.Pattern((String) $text, Query.Pattern.TYPE_LIKE);} + ~(WHITE_SPACE|DOT|LIKE|OPERATOR|AS_A|AND|OR|IS_STORED_AT|IS_REFERENCED)*? + STAR + ~(WHITE_SPACE|DOT|STAR)*? + {$ep = new Query.Pattern((String) $text, Query.Pattern.TYPE_LIKE);} ; property returns [Query.Pattern pp, String agg]locals [StringBuffer sb] - @init{ - $sb = new StringBuffer(); - $agg = null; - } + @init{ + $sb = new StringBuffer(); + $agg = null; + } : - (minmax {$agg=$minmax.agg;})?? - ( + (minmax {$agg=$minmax.agg;})?? + ( regexp_pattern {$pp = $regexp_pattern.ep;} | like_pattern {$pp = $like_pattern.ep;} | ( double_quoted {$pp = $double_quoted.ep;} ) | ( single_quoted {$pp = $single_quoted.ep;} ) | ((m=TXT | m=NUM | m=REGEXP_MARKER | m=ENTITY){$sb.append($m.text);})+ {$pp = new Query.Pattern($sb.toString(), Query.Pattern.TYPE_NORMAL);} - ) - WHITE_SPACE? + ) + WHITE_SPACE? ; minmax returns [String agg] : - (THE?? ( - GREATEST {$agg="max";} - | SMALLEST {$agg="min";} - )) + (THE?? ( + GREATEST {$agg="max";} + | SMALLEST {$agg="min";} + )) ; value returns [String str] -: - number_with_unit {$str = $number_with_unit.text;} - | datetime {$str = $datetime.text;} - | atom {$str = $atom.ep.toString();} - WHITE_SPACE? +: + number_with_unit {$str = $number_with_unit.text;} + | datetime {$str = $datetime.text;} + | atom {$str = $atom.ep.toString();} + WHITE_SPACE? ; number_with_unit : - HYPHEN?? - NUM - (WHITE_SPACE?? unit)? + HYPHEN?? + NUM + (WHITE_SPACE?? unit)? ; unit : - (~(WHITE_SPACE | WHICH | HAS_A | WITH | WHERE | DOT | AND | OR )) - (~(WHITE_SPACE))* - | - NUM SLASH (~(WHITE_SPACE))+ + (~(WHITE_SPACE | WHICH | HAS_A | WITH | WHERE | DOT | AND | OR )) + (~(WHITE_SPACE))* + | + NUM SLASH (~(WHITE_SPACE))+ ; location returns [String str] @@ -511,46 +509,46 @@ location returns [String str] atom returns [Query.Pattern ep] : double_quoted {$ep = $double_quoted.ep;} - | single_quoted {$ep = $single_quoted.ep;} - | (~(WHITE_SPACE | DOT ))+ {$ep = new Query.Pattern($text, Query.Pattern.TYPE_NORMAL);} + | single_quoted {$ep = $single_quoted.ep;} + | (~(WHITE_SPACE | DOT ))+ {$ep = new Query.Pattern($text, Query.Pattern.TYPE_NORMAL);} ; single_quoted returns [Query.Pattern ep] locals [StringBuffer sb, int patternType] - @init{ - $sb = new StringBuffer(); - $patternType = Query.Pattern.TYPE_NORMAL; - } - @after{ - $ep = new Query.Pattern($sb.toString(),$patternType); - } + @init{ + $sb = new StringBuffer(); + $patternType = Query.Pattern.TYPE_NORMAL; + } + @after{ + $ep = new Query.Pattern($sb.toString(),$patternType); + } : - SINGLE_QUOTE_START - ( - t = SINGLE_QUOTE_ESCAPED_CHAR {$sb.append($t.text.substring(1,$t.text.length()));} - | - r = SINGLE_QUOTE_STAR {$sb.append($r.text); $patternType = Query.Pattern.TYPE_LIKE;} - | - s = ~SINGLE_QUOTE_END {$sb.append($s.text);} - )*? - SINGLE_QUOTE_END + SINGLE_QUOTE_START + ( + t = SINGLE_QUOTE_ESCAPED_CHAR {$sb.append($t.text.substring(1,$t.text.length()));} + | + r = SINGLE_QUOTE_STAR {$sb.append($r.text); $patternType = Query.Pattern.TYPE_LIKE;} + | + s = ~SINGLE_QUOTE_END {$sb.append($s.text);} + )*? + SINGLE_QUOTE_END ; double_quoted returns [Query.Pattern ep] locals [StringBuffer sb, int patternType] - @init{ - $sb = new StringBuffer(); - $patternType = Query.Pattern.TYPE_NORMAL; - } - @after{ - $ep = new Query.Pattern($sb.toString(),$patternType); - } + @init{ + $sb = new StringBuffer(); + $patternType = Query.Pattern.TYPE_NORMAL; + } + @after{ + $ep = new Query.Pattern($sb.toString(),$patternType); + } : - DOUBLE_QUOTE_START - ( - t = DOUBLE_QUOTE_ESCAPED_CHAR {$sb.append($t.text.substring(1,$t.text.length()));} - | - r = DOUBLE_QUOTE_STAR {$sb.append($r.text); $patternType = Query.Pattern.TYPE_LIKE;} - | - s = ~DOUBLE_QUOTE_END {$sb.append($s.text);} - )*? - DOUBLE_QUOTE_END + DOUBLE_QUOTE_START + ( + t = DOUBLE_QUOTE_ESCAPED_CHAR {$sb.append($t.text.substring(1,$t.text.length()));} + | + r = DOUBLE_QUOTE_STAR {$sb.append($r.text); $patternType = Query.Pattern.TYPE_LIKE;} + | + s = ~DOUBLE_QUOTE_END {$sb.append($s.text);} + )*? + DOUBLE_QUOTE_END ; diff --git a/src/main/java/org/caosdb/server/query/Query.java b/src/main/java/org/caosdb/server/query/Query.java index 058fc619e021b96e1ac3d83750d7ed84c5acc2c0..dca63841df3ee1a5efa4148d24e3e8eb68cd2f50 100644 --- a/src/main/java/org/caosdb/server/query/Query.java +++ b/src/main/java/org/caosdb/server/query/Query.java @@ -1,9 +1,10 @@ /* - * ** header v3.0 * This file is a part of the CaosDB Project. * * Copyright (C) 2018 Research Group Biomedical Physics, * Max-Planck-Institute for Dynamics and Self-Organization Göttingen + * Copyright (C) 2019-2021 IndiScale GmbH <info@indiscale.com> + * Copyright (C) 2019-2021 Timm Fitschen <t.fitschen@indiscale.com> * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as @@ -17,8 +18,6 @@ * * You should have received a copy of the GNU Affero General Public License * along with this program. If not, see <https://www.gnu.org/licenses/>. - * - * ** end header */ package org.caosdb.server.query; diff --git a/src/main/java/org/caosdb/server/resource/transaction/EntityResource.java b/src/main/java/org/caosdb/server/resource/transaction/EntityResource.java index 704fcfb9aa92e56ad963365d763f70fa7feb470e..7003dfc1d9657def48da4295a189e72730ef9fa8 100644 --- a/src/main/java/org/caosdb/server/resource/transaction/EntityResource.java +++ b/src/main/java/org/caosdb/server/resource/transaction/EntityResource.java @@ -1,5 +1,4 @@ /* - * ** header v3.0 * This file is a part of the CaosDB Project. * * Copyright (C) 2018 Research Group Biomedical Physics, @@ -19,8 +18,6 @@ * * You should have received a copy of the GNU Affero General Public License * along with this program. If not, see <https://www.gnu.org/licenses/>. - * - * ** end header */ package org.caosdb.server.resource.transaction; diff --git a/src/main/java/org/caosdb/server/resource/transaction/RetrieveEntityResource.java b/src/main/java/org/caosdb/server/resource/transaction/RetrieveEntityResource.java index 5eb9db72f69f8f054dbb6f02b970d09e09ff366c..578eca4c855ed067aae7a9f2e18463808558b94d 100644 --- a/src/main/java/org/caosdb/server/resource/transaction/RetrieveEntityResource.java +++ b/src/main/java/org/caosdb/server/resource/transaction/RetrieveEntityResource.java @@ -1,5 +1,4 @@ /* - * ** header v3.0 * This file is a part of the CaosDB Project. * * Copyright (C) 2018 Research Group Biomedical Physics, @@ -19,8 +18,6 @@ * * You should have received a copy of the GNU Affero General Public License * along with this program. If not, see <https://www.gnu.org/licenses/>. - * - * ** end header */ package org.caosdb.server.resource.transaction; diff --git a/src/main/java/org/caosdb/server/transaction/Transaction.java b/src/main/java/org/caosdb/server/transaction/Transaction.java index b30d13b469ebe05222d2db1ab958fe0a4d3a0f26..fe0b63f333e0151aed161ce3fa3914794e5f3d52 100644 --- a/src/main/java/org/caosdb/server/transaction/Transaction.java +++ b/src/main/java/org/caosdb/server/transaction/Transaction.java @@ -1,11 +1,10 @@ /* - * ** header v3.0 * This file is a part of the CaosDB Project. * * Copyright (C) 2018 Research Group Biomedical Physics, * Max-Planck-Institute for Dynamics and Self-Organization Göttingen - * Copyright (C) 2020 Indiscale GmbH <info@indiscale.com> - * Copyright (C) 2020 Timm Fitschen <t.fitschen@indiscale.com> + * Copyright (C) 2019-2021 IndiScale GmbH <info@indiscale.com> + * Copyright (C) 2019-2021 Timm Fitschen <t.fitschen@indiscale.com> * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as @@ -19,8 +18,6 @@ * * You should have received a copy of the GNU Affero General Public License * along with this program. If not, see <https://www.gnu.org/licenses/>. - * - * ** end header */ package org.caosdb.server.transaction; diff --git a/src/main/java/org/caosdb/server/transaction/WriteTransaction.java b/src/main/java/org/caosdb/server/transaction/WriteTransaction.java index 670ff8bd6f4e78c6f20500dc057fc0e432872255..62a9beea1921f34dd3646bcc78ed9086d05e6098 100644 --- a/src/main/java/org/caosdb/server/transaction/WriteTransaction.java +++ b/src/main/java/org/caosdb/server/transaction/WriteTransaction.java @@ -1,11 +1,10 @@ /* - * ** header v3.0 * This file is a part of the CaosDB Project. * * Copyright (C) 2018 Research Group Biomedical Physics, * Max-Planck-Institute for Dynamics and Self-Organization Göttingen - * Copyright (C) 2021 IndiScale GmbH <info@indiscale.com> - * Copyright (C) 2021 Timm Fitschen <t.fitschen@indiscale.com> + * Copyright (C) 2019-2021 IndiScale GmbH <info@indiscale.com> + * Copyright (C) 2019-2021 Timm Fitschen <t.fitschen@indiscale.com> * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as @@ -19,8 +18,6 @@ * * You should have received a copy of the GNU Affero General Public License * along with this program. If not, see <https://www.gnu.org/licenses/>. - * - * ** end header */ package org.caosdb.server.transaction; diff --git a/src/test/java/org/caosdb/server/database/DatabaseAccessManagerTest.java b/src/test/java/org/caosdb/server/database/DatabaseAccessManagerTest.java index 0ba085b1fd050578b50e443613f82167890ea61f..1e8f6cc707299f5b0102ad774d127630dee51c08 100644 --- a/src/test/java/org/caosdb/server/database/DatabaseAccessManagerTest.java +++ b/src/test/java/org/caosdb/server/database/DatabaseAccessManagerTest.java @@ -1,9 +1,10 @@ /* - * ** header v3.0 * This file is a part of the CaosDB Project. * * Copyright (C) 2018 Research Group Biomedical Physics, * Max-Planck-Institute for Dynamics and Self-Organization Göttingen + * Copyright (C) 2019-2021 IndiScale GmbH <info@indiscale.com> + * Copyright (C) 2019-2021 Timm Fitschen <t.fitschen@indiscale.com> * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as @@ -17,8 +18,6 @@ * * You should have received a copy of the GNU Affero General Public License * along with this program. If not, see <https://www.gnu.org/licenses/>. - * - * ** end header */ package org.caosdb.server.database; diff --git a/src/test/java/org/caosdb/server/query/QueryTest.java b/src/test/java/org/caosdb/server/query/QueryTest.java index 26e43ec6c65414808c72b9e04b95c1d67011fc9a..8f3d4946c36d795e5e7bd9048a66f86cc0290a0b 100644 --- a/src/test/java/org/caosdb/server/query/QueryTest.java +++ b/src/test/java/org/caosdb/server/query/QueryTest.java @@ -1,3 +1,22 @@ +/* + * This file is a part of the CaosDB Project. + * + * Copyright (C) 2021 IndiScale GmbH <info@indiscale.com> + * Copyright (C) 2021 Timm Fitschen <t.fitschen@indiscale.com> + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see <https://www.gnu.org/licenses/>. + */ package org.caosdb.server.query; import static org.junit.Assert.assertEquals; diff --git a/src/test/java/org/caosdb/server/query/TestCQL.java b/src/test/java/org/caosdb/server/query/TestCQL.java index 154977a909a9d34ac2034c1ef352b81e7b2a3cb7..cf54bf71b69ea5f539744bd4bbe30fd1c37edcf4 100644 --- a/src/test/java/org/caosdb/server/query/TestCQL.java +++ b/src/test/java/org/caosdb/server/query/TestCQL.java @@ -1,9 +1,10 @@ /* - * ** header v3.0 * This file is a part of the CaosDB Project. * * Copyright (C) 2018 Research Group Biomedical Physics, * Max-Planck-Institute for Dynamics and Self-Organization Göttingen + * Copyright (C) 2019-2021 IndiScale GmbH <info@indiscale.com> + * Copyright (C) 2019-2021 Timm Fitschen <t.fitschen@indiscale.com> * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as @@ -17,8 +18,6 @@ * * You should have received a copy of the GNU Affero General Public License * along with this program. If not, see <https://www.gnu.org/licenses/>. - * - * ** end header */ package org.caosdb.server.query;