Commit ec10963d authored by Matija Obreza's avatar Matija Obreza

Moved catalog model and JPA repositories to right packages

parent 74eb82e2
......@@ -25,3 +25,4 @@ npm-debug.log
.pmd
node_tmp
effective.pom
src/main/resources/genesys.properties
......@@ -581,8 +581,8 @@
<!-- List packages to be processed -->
<include>org.genesys2.server.model</include>
<include>org.genesys2.server.model.*</include>
<include>org.genesys.catalog.server.model</include>
<include>org.genesys.catalog.server.model.*</include>
<include>org.genesys.catalog.model</include>
<include>org.genesys.catalog.model.*</include>
</includes>
<outputDirectory>target/generated-sources/querydsl</outputDirectory>
<processor>com.querydsl.apt.jpa.JPAAnnotationProcessor</processor>
......
......@@ -13,15 +13,15 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.genesys.catalog.server.annotations;
import org.genesys.catalog.server.service.PublishValidationInterface;
package org.genesys.catalog.annotations;
import java.lang.annotation.Documented;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
import org.genesys.catalog.service.PublishValidationInterface;
import static java.lang.annotation.ElementType.FIELD;
/**
......
......@@ -13,11 +13,13 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.genesys.catalog.server.exceptions;
package org.genesys.catalog.annotations;
import java.util.HashMap;
import java.util.Map;
import org.genesys.catalog.exceptions.InvalidApiUsageException;
/**
* The Class PublishValidationException.
*
......
......@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.genesys.catalog.server.exceptions;
package org.genesys.catalog.exceptions;
/**
* Parent exception for cases where data does not match business logic.
......
......@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.genesys.catalog.server.exceptions;
package org.genesys.catalog.exceptions;
/**
* This exception should generate when some element not found somewhere.
......
......@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.genesys.catalog.server.model;
package org.genesys.catalog.model;
import com.fasterxml.jackson.annotation.JsonIdentityInfo;
import com.fasterxml.jackson.annotation.JsonIgnore;
......@@ -21,9 +21,9 @@ import com.fasterxml.jackson.annotation.ObjectIdGenerators;
import org.genesys.blocks.model.SelfCleaning;
import org.genesys.blocks.model.UuidModel;
import org.genesys.blocks.security.model.AclAwareModel;
import org.genesys.catalog.server.model.traits.Descriptor;
import org.genesys.catalog.server.model.traits.DescriptorList;
import org.genesys.catalog.server.model.vocab.ControlledVocabulary;
import org.genesys.catalog.model.traits.Descriptor;
import org.genesys.catalog.model.traits.DescriptorList;
import org.genesys.catalog.model.vocab.ControlledVocabulary;
import org.springframework.data.elasticsearch.annotations.Document;
import javax.persistence.*;
......
......@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.genesys.catalog.server.model;
package org.genesys.catalog.model;
import org.genesys.blocks.model.EntityId;
import org.hibernate.annotations.Type;
......
......@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.genesys.catalog.server.model.dataset;
package org.genesys.catalog.model.dataset;
import javax.persistence.Column;
import javax.persistence.Embeddable;
......
......@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.genesys.catalog.server.model.dataset;
package org.genesys.catalog.model.dataset;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonView;
......@@ -23,10 +23,10 @@ import org.genesys.blocks.model.Publishable;
import org.genesys.blocks.model.SelfCleaning;
import org.genesys.blocks.model.UuidModel;
import org.genesys.blocks.security.model.AclAwareModel;
import org.genesys.catalog.server.annotations.PublishValidation;
import org.genesys.catalog.server.model.Partner;
import org.genesys.catalog.server.model.traits.Descriptor;
import org.genesys.catalog.server.service.PublishValidationInterface;
import org.genesys.catalog.annotations.PublishValidation;
import org.genesys.catalog.model.Partner;
import org.genesys.catalog.model.traits.Descriptor;
import org.genesys.catalog.service.PublishValidationInterface;
import org.genesys.filerepository.model.RepositoryFile;
import org.springframework.data.elasticsearch.annotations.Document;
import org.springframework.data.elasticsearch.annotations.Field;
......
......@@ -13,12 +13,12 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.genesys.catalog.server.model.dataset;
package org.genesys.catalog.model.dataset;
import com.fasterxml.jackson.annotation.JsonIgnore;
import org.genesys.blocks.model.UuidModel;
import org.genesys.catalog.server.annotations.PublishValidation;
import org.genesys.catalog.server.service.PublishValidationInterface;
import org.genesys.catalog.annotations.PublishValidation;
import org.genesys.catalog.service.PublishValidationInterface;
import javax.persistence.*;
import java.util.Map;
......
......@@ -13,12 +13,12 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.genesys.catalog.server.model.dataset;
package org.genesys.catalog.model.dataset;
import com.fasterxml.jackson.annotation.JsonIgnore;
import org.genesys.blocks.model.UuidModel;
import org.genesys.catalog.server.annotations.PublishValidation;
import org.genesys.catalog.server.service.PublishValidationInterface;
import org.genesys.catalog.annotations.PublishValidation;
import org.genesys.catalog.service.PublishValidationInterface;
import javax.persistence.*;
import java.util.Map;
......
......@@ -13,10 +13,10 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.genesys.catalog.server.model.dataset;
package org.genesys.catalog.model.dataset;
import org.genesys.blocks.model.UuidModel;
import org.genesys.catalog.server.annotations.PublishValidation;
import org.genesys.catalog.annotations.PublishValidation;
import javax.persistence.Entity;
import javax.persistence.FetchType;
......
......@@ -13,17 +13,18 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.genesys.catalog.server.service.filters;
package org.genesys.catalog.model.filters;
import java.util.HashSet;
import java.util.Set;
import org.genesys.blocks.model.filters.StringFilter;
import org.genesys.catalog.model.dataset.AccessionIdentifier;
import org.genesys.catalog.model.dataset.QAccessionIdentifier;
import com.querydsl.core.BooleanBuilder;
import com.querydsl.core.types.Predicate;
import com.querydsl.core.types.dsl.SetPath;
import org.genesys.blocks.model.filters.StringFilter;
import org.genesys.catalog.server.model.dataset.AccessionIdentifier;
import org.genesys.catalog.server.model.dataset.QAccessionIdentifier;
import java.util.HashSet;
import java.util.Set;
/**
* The Class AccessionIdentifierFilter.
......
......@@ -13,16 +13,17 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.genesys.catalog.server.service.filters;
package org.genesys.catalog.model.filters;
import static org.genesys.catalog.model.vocab.QControlledVocabulary.controlledVocabulary;
import com.querydsl.core.BooleanBuilder;
import com.querydsl.core.types.Predicate;
import com.querydsl.jpa.JPAExpressions;
import org.genesys.blocks.model.filters.StringFilter;
import org.genesys.blocks.model.filters.UuidModelFilter;
import org.genesys.catalog.server.model.QPartner;
import org.genesys.catalog.model.QPartner;
import static org.genesys.catalog.server.model.vocab.QControlledVocabulary.controlledVocabulary;
import com.querydsl.core.BooleanBuilder;
import com.querydsl.core.types.Predicate;
import com.querydsl.jpa.JPAExpressions;
public class ControlledVocabularyFilter extends UuidModelFilter {
......
......@@ -13,19 +13,20 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.genesys.catalog.server.service.filters;
package org.genesys.catalog.model.filters;
import static org.genesys.catalog.model.dataset.QDataset.dataset;
import java.util.Set;
import com.querydsl.core.BooleanBuilder;
import com.querydsl.core.types.Predicate;
import org.apache.commons.collections4.CollectionUtils;
import org.apache.commons.lang3.ArrayUtils;
import org.apache.commons.lang3.StringUtils;
import org.genesys.blocks.model.filters.StringFilter;
import org.genesys.blocks.model.filters.UuidModelFilter;
import java.util.Set;
import static org.genesys.catalog.server.model.dataset.QDataset.dataset;
import com.querydsl.core.BooleanBuilder;
import com.querydsl.core.types.Predicate;
/**
* The Class DatasetFilter.
......
......@@ -13,24 +13,25 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.genesys.catalog.server.service.filters;
package org.genesys.catalog.model.filters;
import static org.genesys.catalog.model.traits.QDescriptor.descriptor;
import java.util.Set;
import com.querydsl.core.BooleanBuilder;
import com.querydsl.core.types.Predicate;
import com.querydsl.jpa.JPAExpressions;
import org.apache.commons.lang3.ArrayUtils;
import org.apache.commons.lang3.StringUtils;
import org.genesys.blocks.model.filters.NumberFilter;
import org.genesys.blocks.model.filters.StringFilter;
import org.genesys.blocks.model.filters.UuidModelFilter;
import org.genesys.catalog.server.model.traits.Descriptor;
import org.genesys.catalog.server.model.traits.QDescriptor;
import org.genesys.catalog.server.model.traits.QDescriptorList;
import org.genesys.catalog.server.model.QPartner;
import org.genesys.catalog.model.QPartner;
import org.genesys.catalog.model.traits.Descriptor;
import org.genesys.catalog.model.traits.QDescriptor;
import org.genesys.catalog.model.traits.QDescriptorList;
import java.util.Set;
import static org.genesys.catalog.server.model.traits.QDescriptor.descriptor;
import com.querydsl.core.BooleanBuilder;
import com.querydsl.core.types.Predicate;
import com.querydsl.jpa.JPAExpressions;
/**
* The Class DescriptorFilter.
......
......@@ -13,18 +13,19 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.genesys.catalog.server.service.filters;
package org.genesys.catalog.model.filters;
import static org.genesys.catalog.server.model.traits.QDescriptorList.descriptorList;
import static org.genesys.catalog.model.traits.QDescriptorList.descriptorList;
import java.util.Set;
import com.querydsl.core.BooleanBuilder;
import com.querydsl.core.types.Predicate;
import org.apache.commons.lang3.ArrayUtils;
import org.apache.commons.lang3.StringUtils;
import org.genesys.blocks.model.filters.StringFilter;
import org.genesys.blocks.model.filters.UuidModelFilter;
import java.util.Set;
import com.querydsl.core.BooleanBuilder;
import com.querydsl.core.types.Predicate;
/**
* The Class DescriptorListFilter.
......
......@@ -13,15 +13,15 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.genesys.catalog.server.service.filters;
package org.genesys.catalog.model.filters;
import java.util.Arrays;
import java.util.regex.Pattern;
import com.querydsl.core.types.Predicate;
import com.querydsl.core.types.dsl.BooleanExpression;
import com.querydsl.core.types.dsl.StringPath;
import java.util.Arrays;
import java.util.regex.Pattern;
/**
* Filter Helpers.
*/
......
......@@ -13,18 +13,19 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.genesys.catalog.server.service.filters;
package org.genesys.catalog.model.filters;
import static org.genesys.catalog.model.QPartner.partner;
import java.util.Set;
import com.querydsl.core.BooleanBuilder;
import com.querydsl.core.types.Predicate;
import org.apache.commons.collections4.CollectionUtils;
import org.genesys.blocks.model.filters.StringFilter;
import org.genesys.blocks.model.filters.UuidModelFilter;
import org.genesys.catalog.server.model.QPartner;
import org.genesys.catalog.model.QPartner;
import java.util.Set;
import static org.genesys.catalog.server.model.QPartner.partner;
import com.querydsl.core.BooleanBuilder;
import com.querydsl.core.types.Predicate;
/**
* The Class PartnerFilter.
......
......@@ -13,16 +13,16 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.genesys.catalog.server.model.traits;
package org.genesys.catalog.model.traits;
import com.fasterxml.jackson.annotation.*;
import org.genesys.blocks.auditlog.annotations.Audited;
import org.genesys.blocks.model.*;
import org.genesys.blocks.security.model.AclAwareModel;
import org.genesys.catalog.server.model.Partner;
import org.genesys.catalog.server.model.dataset.Dataset;
import org.genesys.catalog.server.model.vocab.ControlledVocabulary;
import org.genesys.catalog.server.model.vocab.VocabularyTerm;
import org.genesys.catalog.model.Partner;
import org.genesys.catalog.model.dataset.Dataset;
import org.genesys.catalog.model.vocab.ControlledVocabulary;
import org.genesys.catalog.model.vocab.VocabularyTerm;
import org.springframework.dao.DataIntegrityViolationException;
import org.springframework.data.elasticsearch.annotations.Document;
import org.springframework.data.elasticsearch.annotations.Field;
......
......@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.genesys.catalog.server.model.traits;
package org.genesys.catalog.model.traits;
import com.fasterxml.jackson.annotation.JsonIdentityInfo;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
......@@ -25,7 +25,7 @@ import org.genesys.blocks.model.Publishable;
import org.genesys.blocks.model.SelfCleaning;
import org.genesys.blocks.model.UuidModel;
import org.genesys.blocks.security.model.AclAwareModel;
import org.genesys.catalog.server.model.Partner;
import org.genesys.catalog.model.Partner;
import org.springframework.data.elasticsearch.annotations.Document;
import org.springframework.data.elasticsearch.annotations.Field;
import org.springframework.data.elasticsearch.annotations.FieldType;
......
......@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.genesys.catalog.server.model.vocab;
package org.genesys.catalog.model.vocab;
import com.fasterxml.jackson.annotation.*;
import org.genesys.blocks.model.JsonViews;
......@@ -21,7 +21,7 @@ import org.genesys.blocks.model.Publishable;
import org.genesys.blocks.model.SelfCleaning;
import org.genesys.blocks.model.UuidModel;
import org.genesys.blocks.security.model.AclAwareModel;
import org.genesys.catalog.server.model.Partner;
import org.genesys.catalog.model.Partner;
import org.hibernate.annotations.ColumnDefault;
import org.springframework.data.elasticsearch.annotations.Document;
import org.springframework.data.elasticsearch.annotations.Field;
......
......@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.genesys.catalog.server.model.vocab;
package org.genesys.catalog.model.vocab;
import com.fasterxml.jackson.annotation.JsonIdentityReference;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
......@@ -21,7 +21,7 @@ import com.fasterxml.jackson.annotation.JsonView;
import org.genesys.blocks.model.BasicModel;
import org.genesys.blocks.model.JsonViews;
import org.genesys.blocks.model.SelfCleaning;
import org.genesys.catalog.server.model.traits.Descriptor;
import org.genesys.catalog.model.traits.Descriptor;
import org.springframework.data.elasticsearch.annotations.Document;
import org.springframework.data.elasticsearch.annotations.Field;
import org.springframework.data.elasticsearch.annotations.FieldType;
......
......@@ -13,9 +13,9 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.genesys.catalog.server.persistence;
package org.genesys.catalog.persistence;
import org.genesys.catalog.server.model.Partner;
import org.genesys.catalog.model.Partner;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.querydsl.QueryDslPredicateExecutor;
......
......@@ -13,9 +13,9 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.genesys.catalog.server.persistence;
package org.genesys.catalog.persistence;
import org.genesys.catalog.server.model.ShortFilter;
import org.genesys.catalog.model.ShortFilter;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.querydsl.QueryDslPredicateExecutor;
import org.springframework.stereotype.Repository;
......
......@@ -13,9 +13,9 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.genesys.catalog.server.persistence.dataset;
package org.genesys.catalog.persistence.dataset;
import org.genesys.catalog.server.model.dataset.DatasetCreator;
import org.genesys.catalog.model.dataset.DatasetCreator;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.JpaRepository;
......
......@@ -13,9 +13,9 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.genesys.catalog.server.persistence.dataset;
package org.genesys.catalog.persistence.dataset;
import org.genesys.catalog.server.model.dataset.DatasetLocation;
import org.genesys.catalog.model.dataset.DatasetLocation;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.JpaRepository;
......
......@@ -13,9 +13,9 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.genesys.catalog.server.persistence.dataset;
package org.genesys.catalog.persistence.dataset;
import org.genesys.catalog.server.model.dataset.Dataset;
import org.genesys.catalog.model.dataset.Dataset;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.JpaRepository;
......
......@@ -13,9 +13,9 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.genesys.catalog.server.persistence.dataset;
package org.genesys.catalog.persistence.dataset;
import org.genesys.catalog.server.model.dataset.DatasetVersions;
import org.genesys.catalog.model.dataset.DatasetVersions;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.querydsl.QueryDslPredicateExecutor;
import org.springframework.stereotype.Repository;
......
......@@ -13,9 +13,9 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.genesys.catalog.server.persistence.traits;
package org.genesys.catalog.persistence.traits;
import org.genesys.catalog.server.model.traits.DescriptorList;
import org.genesys.catalog.model.traits.DescriptorList;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.querydsl.QueryDslPredicateExecutor;
import org.springframework.stereotype.Repository;
......
......@@ -13,11 +13,11 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.genesys.catalog.server.persistence.traits;
package org.genesys.catalog.persistence.traits;
import org.genesys.catalog.server.model.dataset.Dataset;
import org.genesys.catalog.server.model.traits.Descriptor;
import org.genesys.catalog.server.model.traits.DescriptorList;
import org.genesys.catalog.model.dataset.Dataset;
import org.genesys.catalog.model.traits.Descriptor;
import org.genesys.catalog.model.traits.DescriptorList;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.querydsl.QueryDslPredicateExecutor;
......
......@@ -13,10 +13,10 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.genesys.catalog.server.persistence.vocab;
package org.genesys.catalog.persistence.vocab;
import org.genesys.catalog.server.model.vocab.ControlledVocabulary;
import org.genesys.catalog.server.model.vocab.VocabularyTerm;
import org.genesys.catalog.model.vocab.ControlledVocabulary;
import org.genesys.catalog.model.vocab.VocabularyTerm;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.JpaRepository;
......
......@@ -13,9 +13,9 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.genesys.catalog.server.persistence.vocab;
package org.genesys.catalog.persistence.vocab;
import org.genesys.catalog.server.model.vocab.VocabularyTerm;
import org.genesys.catalog.model.vocab.VocabularyTerm;
import org.springframework.data.jpa.repository.JpaRepository;