refactored to org.gcube.datacatalogue.utillibrary

This commit is contained in:
Francesco Mangiacrapa 2021-02-12 16:08:18 +01:00
parent 1e342b33f3
commit 31b12b587d
72 changed files with 206 additions and 184 deletions

View File

@ -27,6 +27,7 @@
<classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER">
<attributes>
<attribute name="maven.pomderived" value="true"/>
<attribute name="org.eclipse.jst.component.nondependency" value=""/>
</attributes>
</classpathentry>
<classpathentry kind="output" path="target/classes"/>

View File

@ -5,6 +5,11 @@
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.wst.common.project.facet.core.builder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
@ -15,9 +20,17 @@
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.wst.validation.validationbuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.jem.workbench.JavaEMFNature</nature>
<nature>org.eclipse.wst.common.modulecore.ModuleCoreNature</nature>
<nature>org.eclipse.jdt.core.javanature</nature>
<nature>org.eclipse.m2e.core.maven2Nature</nature>
<nature>org.eclipse.wst.common.project.facet.core.nature</nature>
</natures>
</projectDescription>

View File

@ -0,0 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?><project-modules id="moduleCoreId" project-version="1.5.0">
<wb-module deploy-name="catalogue-util-library">
<wb-resource deploy-path="/" source-path="/src/main/java"/>
</wb-module>
</project-modules>

View File

@ -0,0 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<faceted-project>
<installed facet="java" version="1.8"/>
<installed facet="jst.utility" version="1.0"/>
</faceted-project>

View File

@ -5,6 +5,6 @@ All notable changes to this project will be documented in this file.
This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## [v0.2.0-SNAPSHOT] - 2021-02-11
## [v0.3.0-SNAPSHOT] - 2021-02-11
[#19378] First Release

View File

@ -12,7 +12,7 @@
<groupId>org.gcube.datacatalogue</groupId>
<artifactId>catalogue-util-library</artifactId>
<version>0.2.0-SNAPSHOT</version>
<version>0.3.0-SNAPSHOT</version>
<name>Ckan utility library</name>
<description>

View File

@ -1,4 +1,4 @@
package org.gcube.datacatalogue.ckanutillibrary.ckan;
package org.gcube.datacatalogue.utillibrary.ckan;
import static com.google.common.base.Preconditions.checkNotNull;
@ -14,12 +14,12 @@ import javax.annotation.Nullable;
import org.apache.http.client.fluent.Request;
import org.apache.http.client.fluent.Response;
import org.gcube.com.fasterxml.jackson.databind.ObjectMapper;
import org.gcube.datacatalogue.ckanutillibrary.jackan.CkanClient;
import org.gcube.datacatalogue.ckanutillibrary.shared.jackan.model.CkanGroup;
import org.gcube.datacatalogue.ckanutillibrary.shared.jackan.model.CkanOrganization;
import org.gcube.datacatalogue.ckanutillibrary.shared.jackan.model.CkanResponse;
import org.gcube.datacatalogue.ckanutillibrary.shared.jackan.model.exceptions.CkanException;
import org.gcube.datacatalogue.ckanutillibrary.shared.jackan.model.exceptions.JackanException;
import org.gcube.datacatalogue.utillibrary.jackan.CkanClient;
import org.gcube.datacatalogue.utillibrary.shared.jackan.model.CkanGroup;
import org.gcube.datacatalogue.utillibrary.shared.jackan.model.CkanOrganization;
import org.gcube.datacatalogue.utillibrary.shared.jackan.model.CkanResponse;
import org.gcube.datacatalogue.utillibrary.shared.jackan.model.exceptions.CkanException;
import org.gcube.datacatalogue.utillibrary.shared.jackan.model.exceptions.JackanException;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@ -27,8 +27,6 @@ import com.google.common.base.Charsets;
import com.google.common.io.CharStreams;
/**
* The Class ExtendCkanClient.
*

View File

@ -1,4 +1,4 @@
package org.gcube.datacatalogue.ckanutillibrary.ckan;
package org.gcube.datacatalogue.utillibrary.ckan;
import java.io.IOException;
@ -6,9 +6,9 @@ import org.gcube.com.fasterxml.jackson.core.JsonParseException;
import org.gcube.com.fasterxml.jackson.core.JsonProcessingException;
import org.gcube.com.fasterxml.jackson.databind.JsonMappingException;
import org.gcube.com.fasterxml.jackson.databind.ObjectMapper;
import org.gcube.datacatalogue.ckanutillibrary.shared.jackan.model.CkanDataset;
import org.gcube.datacatalogue.ckanutillibrary.shared.jackan.model.CkanGroup;
import org.gcube.datacatalogue.ckanutillibrary.shared.jackan.model.CkanResource;
import org.gcube.datacatalogue.utillibrary.shared.jackan.model.CkanDataset;
import org.gcube.datacatalogue.utillibrary.shared.jackan.model.CkanGroup;
import org.gcube.datacatalogue.utillibrary.shared.jackan.model.CkanResource;

View File

@ -1,11 +1,11 @@
package org.gcube.datacatalogue.ckanutillibrary.ckan;
package org.gcube.datacatalogue.utillibrary.ckan;
import org.gcube.datacatalogue.ckanutillibrary.jackan.CkanClient;
import org.gcube.datacatalogue.ckanutillibrary.shared.jackan.model.CkanGroup;
import org.gcube.datacatalogue.ckanutillibrary.shared.jackan.model.CkanOrganization;
import org.gcube.datacatalogue.ckanutillibrary.shared.jackan.model.CkanResponse;
import org.gcube.datacatalogue.ckanutillibrary.shared.jackan.model.exceptions.CkanException;
import org.gcube.datacatalogue.ckanutillibrary.shared.jackan.model.exceptions.JackanException;
import org.gcube.datacatalogue.utillibrary.jackan.CkanClient;
import org.gcube.datacatalogue.utillibrary.shared.jackan.model.CkanGroup;
import org.gcube.datacatalogue.utillibrary.shared.jackan.model.CkanOrganization;
import org.gcube.datacatalogue.utillibrary.shared.jackan.model.CkanResponse;
import org.gcube.datacatalogue.utillibrary.shared.jackan.model.exceptions.CkanException;
import org.gcube.datacatalogue.utillibrary.shared.jackan.model.exceptions.JackanException;
/**
* The Interface PatchedCkan.

View File

@ -1,4 +1,4 @@
package org.gcube.datacatalogue.ckanutillibrary.db;
package org.gcube.datacatalogue.utillibrary.db;
import static com.google.common.base.Preconditions.checkArgument;
import static com.google.common.base.Preconditions.checkNotNull;
@ -11,7 +11,7 @@ import java.sql.SQLException;
import java.util.HashMap;
import java.util.Map;
import org.gcube.datacatalogue.ckanutillibrary.shared.RolesCkanGroupOrOrg;
import org.gcube.datacatalogue.utillibrary.shared.RolesCkanGroupOrOrg;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

View File

@ -1,7 +1,7 @@
/*
*
*/
package org.gcube.datacatalogue.ckanutillibrary.gcat;
package org.gcube.datacatalogue.utillibrary.gcat;
import java.net.MalformedURLException;

View File

@ -13,11 +13,11 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.gcube.datacatalogue.ckanutillibrary.jackan;
package org.gcube.datacatalogue.utillibrary.jackan;
import static com.google.common.base.Preconditions.checkNotNull;
import static org.gcube.datacatalogue.ckanutillibrary.server.utils.GenericUtils.checkNotEmpty;
import static org.gcube.datacatalogue.ckanutillibrary.server.utils.GenericUtils.isNotEmpty;
import static org.gcube.datacatalogue.utillibrary.server.utils.GenericUtils.checkNotEmpty;
import static org.gcube.datacatalogue.utillibrary.server.utils.GenericUtils.isNotEmpty;
import java.net.MalformedURLException;
import java.net.URISyntaxException;
@ -27,15 +27,15 @@ import java.util.UUID;
import javax.annotation.Nullable;
import org.gcube.datacatalogue.ckanutillibrary.shared.jackan.model.CkanDataset;
import org.gcube.datacatalogue.ckanutillibrary.shared.jackan.model.CkanDatasetBase;
import org.gcube.datacatalogue.ckanutillibrary.shared.jackan.model.CkanGroup;
import org.gcube.datacatalogue.ckanutillibrary.shared.jackan.model.CkanLicense;
import org.gcube.datacatalogue.ckanutillibrary.shared.jackan.model.CkanOrganization;
import org.gcube.datacatalogue.ckanutillibrary.shared.jackan.model.CkanResource;
import org.gcube.datacatalogue.ckanutillibrary.shared.jackan.model.CkanResourceBase;
import org.gcube.datacatalogue.ckanutillibrary.shared.jackan.model.exceptions.CkanNotFoundException;
import org.gcube.datacatalogue.ckanutillibrary.shared.jackan.model.exceptions.CkanValidationException;
import org.gcube.datacatalogue.utillibrary.shared.jackan.model.CkanDataset;
import org.gcube.datacatalogue.utillibrary.shared.jackan.model.CkanDatasetBase;
import org.gcube.datacatalogue.utillibrary.shared.jackan.model.CkanGroup;
import org.gcube.datacatalogue.utillibrary.shared.jackan.model.CkanLicense;
import org.gcube.datacatalogue.utillibrary.shared.jackan.model.CkanOrganization;
import org.gcube.datacatalogue.utillibrary.shared.jackan.model.CkanResource;
import org.gcube.datacatalogue.utillibrary.shared.jackan.model.CkanResourceBase;
import org.gcube.datacatalogue.utillibrary.shared.jackan.model.exceptions.CkanNotFoundException;
import org.gcube.datacatalogue.utillibrary.shared.jackan.model.exceptions.CkanValidationException;
/**
* This client performs additional checks when writing to CKAN to ensure written

View File

@ -13,12 +13,12 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.gcube.datacatalogue.ckanutillibrary.jackan;
package org.gcube.datacatalogue.utillibrary.jackan;
import static com.google.common.base.Preconditions.checkArgument;
import static com.google.common.base.Preconditions.checkNotNull;
import static org.gcube.datacatalogue.ckanutillibrary.server.utils.GenericUtils.checkNotEmpty;
import static org.gcube.datacatalogue.ckanutillibrary.server.utils.GenericUtils.removeTrailingSlash;
import static org.gcube.datacatalogue.utillibrary.server.utils.GenericUtils.checkNotEmpty;
import static org.gcube.datacatalogue.utillibrary.server.utils.GenericUtils.removeTrailingSlash;
import java.io.IOException;
import java.io.InputStream;
@ -49,29 +49,29 @@ import org.gcube.com.fasterxml.jackson.annotation.JsonInclude.Include;
import org.gcube.com.fasterxml.jackson.databind.DeserializationFeature;
import org.gcube.com.fasterxml.jackson.databind.ObjectMapper;
import org.gcube.com.fasterxml.jackson.databind.annotation.JsonSerialize;
import org.gcube.datacatalogue.ckanutillibrary.shared.jackan.model.CkanDataset;
import org.gcube.datacatalogue.ckanutillibrary.shared.jackan.model.CkanDatasetBase;
import org.gcube.datacatalogue.ckanutillibrary.shared.jackan.model.CkanDatasetRelationship;
import org.gcube.datacatalogue.ckanutillibrary.shared.jackan.model.CkanError;
import org.gcube.datacatalogue.ckanutillibrary.shared.jackan.model.CkanGroup;
import org.gcube.datacatalogue.ckanutillibrary.shared.jackan.model.CkanGroupOrgBase;
import org.gcube.datacatalogue.ckanutillibrary.shared.jackan.model.CkanLicense;
import org.gcube.datacatalogue.ckanutillibrary.shared.jackan.model.CkanOrganization;
import org.gcube.datacatalogue.ckanutillibrary.shared.jackan.model.CkanPair;
import org.gcube.datacatalogue.ckanutillibrary.shared.jackan.model.CkanResource;
import org.gcube.datacatalogue.ckanutillibrary.shared.jackan.model.CkanResourceBase;
import org.gcube.datacatalogue.ckanutillibrary.shared.jackan.model.CkanResponse;
import org.gcube.datacatalogue.ckanutillibrary.shared.jackan.model.CkanTag;
import org.gcube.datacatalogue.ckanutillibrary.shared.jackan.model.CkanTagBase;
import org.gcube.datacatalogue.ckanutillibrary.shared.jackan.model.CkanUser;
import org.gcube.datacatalogue.ckanutillibrary.shared.jackan.model.CkanUserBase;
import org.gcube.datacatalogue.ckanutillibrary.shared.jackan.model.CkanVocabulary;
import org.gcube.datacatalogue.ckanutillibrary.shared.jackan.model.CkanVocabularyBase;
import org.gcube.datacatalogue.ckanutillibrary.shared.jackan.model.exceptions.CkanAuthorizationException;
import org.gcube.datacatalogue.ckanutillibrary.shared.jackan.model.exceptions.CkanException;
import org.gcube.datacatalogue.ckanutillibrary.shared.jackan.model.exceptions.CkanNotFoundException;
import org.gcube.datacatalogue.ckanutillibrary.shared.jackan.model.exceptions.CkanValidationException;
import org.gcube.datacatalogue.ckanutillibrary.shared.jackan.model.exceptions.JackanException;
import org.gcube.datacatalogue.utillibrary.shared.jackan.model.CkanDataset;
import org.gcube.datacatalogue.utillibrary.shared.jackan.model.CkanDatasetBase;
import org.gcube.datacatalogue.utillibrary.shared.jackan.model.CkanDatasetRelationship;
import org.gcube.datacatalogue.utillibrary.shared.jackan.model.CkanError;
import org.gcube.datacatalogue.utillibrary.shared.jackan.model.CkanGroup;
import org.gcube.datacatalogue.utillibrary.shared.jackan.model.CkanGroupOrgBase;
import org.gcube.datacatalogue.utillibrary.shared.jackan.model.CkanLicense;
import org.gcube.datacatalogue.utillibrary.shared.jackan.model.CkanOrganization;
import org.gcube.datacatalogue.utillibrary.shared.jackan.model.CkanPair;
import org.gcube.datacatalogue.utillibrary.shared.jackan.model.CkanResource;
import org.gcube.datacatalogue.utillibrary.shared.jackan.model.CkanResourceBase;
import org.gcube.datacatalogue.utillibrary.shared.jackan.model.CkanResponse;
import org.gcube.datacatalogue.utillibrary.shared.jackan.model.CkanTag;
import org.gcube.datacatalogue.utillibrary.shared.jackan.model.CkanTagBase;
import org.gcube.datacatalogue.utillibrary.shared.jackan.model.CkanUser;
import org.gcube.datacatalogue.utillibrary.shared.jackan.model.CkanUserBase;
import org.gcube.datacatalogue.utillibrary.shared.jackan.model.CkanVocabulary;
import org.gcube.datacatalogue.utillibrary.shared.jackan.model.CkanVocabularyBase;
import org.gcube.datacatalogue.utillibrary.shared.jackan.model.exceptions.CkanAuthorizationException;
import org.gcube.datacatalogue.utillibrary.shared.jackan.model.exceptions.CkanException;
import org.gcube.datacatalogue.utillibrary.shared.jackan.model.exceptions.CkanNotFoundException;
import org.gcube.datacatalogue.utillibrary.shared.jackan.model.exceptions.CkanValidationException;
import org.gcube.datacatalogue.utillibrary.shared.jackan.model.exceptions.JackanException;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

View File

@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.gcube.datacatalogue.ckanutillibrary.jackan;
package org.gcube.datacatalogue.utillibrary.jackan;
import java.util.ArrayList;
import java.util.Arrays;

View File

@ -13,10 +13,10 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.gcube.datacatalogue.ckanutillibrary.jackan;
package org.gcube.datacatalogue.utillibrary.jackan;
import static org.gcube.datacatalogue.ckanutillibrary.jackan.CkanClient.formatTimestamp;
import static org.gcube.datacatalogue.utillibrary.jackan.CkanClient.formatTimestamp;
import java.io.IOException;
import java.sql.Timestamp;
@ -33,7 +33,7 @@ import org.gcube.com.fasterxml.jackson.databind.PropertyNamingStrategy;
import org.gcube.com.fasterxml.jackson.databind.SerializerProvider;
import org.gcube.com.fasterxml.jackson.databind.module.SimpleModule;
import org.gcube.com.fasterxml.jackson.databind.ser.std.StdSerializer;
import org.gcube.datacatalogue.ckanutillibrary.shared.jackan.model.CkanDataset;
import org.gcube.datacatalogue.utillibrary.shared.jackan.model.CkanDataset;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

View File

@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.gcube.datacatalogue.ckanutillibrary.jackan;
package org.gcube.datacatalogue.utillibrary.jackan;
import java.util.List;

View File

@ -1,4 +1,4 @@
package org.gcube.datacatalogue.ckanutillibrary.server;
package org.gcube.datacatalogue.utillibrary.server;
import static org.gcube.resources.discovery.icclient.ICFactory.client;
@ -11,7 +11,7 @@ import javax.xml.parsers.DocumentBuilderFactory;
import org.gcube.common.portal.PortalContext;
import org.gcube.common.resources.gcore.utils.XPathHelper;
import org.gcube.common.scope.api.ScopeProvider;
import org.gcube.datacatalogue.ckanutillibrary.shared.ex.ApplicationProfileNotFoundException;
import org.gcube.datacatalogue.utillibrary.shared.ex.ApplicationProfileNotFoundException;
import org.gcube.resources.discovery.client.api.DiscoveryClient;
import org.gcube.resources.discovery.client.queries.api.Query;
import org.gcube.resources.discovery.client.queries.impl.QueryBox;

View File

@ -1,4 +1,4 @@
package org.gcube.datacatalogue.ckanutillibrary.server;
package org.gcube.datacatalogue.utillibrary.server;
/**
* The Class CKANTokenBean.

View File

@ -1,15 +1,15 @@
package org.gcube.datacatalogue.ckanutillibrary.server;
package org.gcube.datacatalogue.utillibrary.server;
import java.util.List;
import java.util.Map;
import org.gcube.datacatalogue.ckanutillibrary.shared.LandingPages;
import org.gcube.datacatalogue.ckanutillibrary.shared.ResourceBean;
import org.gcube.datacatalogue.ckanutillibrary.shared.RolesCkanGroupOrOrg;
import org.gcube.datacatalogue.ckanutillibrary.shared.jackan.model.CkanDataset;
import org.gcube.datacatalogue.ckanutillibrary.shared.jackan.model.CkanGroup;
import org.gcube.datacatalogue.ckanutillibrary.shared.jackan.model.CkanLicense;
import org.gcube.datacatalogue.ckanutillibrary.shared.jackan.model.CkanOrganization;
import org.gcube.datacatalogue.utillibrary.shared.LandingPages;
import org.gcube.datacatalogue.utillibrary.shared.ResourceBean;
import org.gcube.datacatalogue.utillibrary.shared.RolesCkanGroupOrOrg;
import org.gcube.datacatalogue.utillibrary.shared.jackan.model.CkanDataset;
import org.gcube.datacatalogue.utillibrary.shared.jackan.model.CkanGroup;
import org.gcube.datacatalogue.utillibrary.shared.jackan.model.CkanLicense;
import org.gcube.datacatalogue.utillibrary.shared.jackan.model.CkanOrganization;
/**

View File

@ -1,4 +1,4 @@
package org.gcube.datacatalogue.ckanutillibrary.server;
package org.gcube.datacatalogue.utillibrary.server;
import java.util.concurrent.ConcurrentHashMap;

View File

@ -1,4 +1,4 @@
package org.gcube.datacatalogue.ckanutillibrary.server;
package org.gcube.datacatalogue.utillibrary.server;
import static com.google.common.base.Preconditions.checkArgument;
import static com.google.common.base.Preconditions.checkNotNull;
@ -29,28 +29,28 @@ import org.gcube.common.authorization.library.provider.SecurityTokenProvider;
import org.gcube.common.scope.api.ScopeProvider;
import org.gcube.common.scope.impl.ScopeBean;
import org.gcube.common.scope.impl.ScopeBean.Type;
import org.gcube.datacatalogue.ckanutillibrary.ckan.ExtendCkanClient;
import org.gcube.datacatalogue.ckanutillibrary.ckan.MarshUnmarshCkanObject;
import org.gcube.datacatalogue.ckanutillibrary.ckan.MarshUnmarshCkanObject.METHOD;
import org.gcube.datacatalogue.ckanutillibrary.db.DBCaller;
import org.gcube.datacatalogue.ckanutillibrary.gcat.GCatCaller;
import org.gcube.datacatalogue.ckanutillibrary.server.DataCatalogueRunningCluster.ACCESS_LEVEL_TO_CATALOGUE_PORTLET;
import org.gcube.datacatalogue.ckanutillibrary.server.utils.CKANConveter;
import org.gcube.datacatalogue.ckanutillibrary.server.utils.CatalogueUtilMethods;
import org.gcube.datacatalogue.ckanutillibrary.server.utils.GCubeUtils;
import org.gcube.datacatalogue.ckanutillibrary.server.utils.GCubeUtils.GCUBE_SCOPE_LEVEL;
import org.gcube.datacatalogue.ckanutillibrary.server.utils.url.EntityContext;
import org.gcube.datacatalogue.ckanutillibrary.shared.LandingPages;
import org.gcube.datacatalogue.ckanutillibrary.shared.ResourceBean;
import org.gcube.datacatalogue.ckanutillibrary.shared.RolesCkanGroupOrOrg;
import org.gcube.datacatalogue.ckanutillibrary.shared.State;
import org.gcube.datacatalogue.ckanutillibrary.shared.jackan.model.CkanDataset;
import org.gcube.datacatalogue.ckanutillibrary.shared.jackan.model.CkanGroup;
import org.gcube.datacatalogue.ckanutillibrary.shared.jackan.model.CkanLicense;
import org.gcube.datacatalogue.ckanutillibrary.shared.jackan.model.CkanOrganization;
import org.gcube.datacatalogue.ckanutillibrary.shared.jackan.model.CkanResource;
import org.gcube.datacatalogue.ckanutillibrary.shared.jackan.model.CkanUser;
import org.gcube.datacatalogue.ckanutillibrary.shared.jackan.model.exceptions.JackanException;
import org.gcube.datacatalogue.utillibrary.ckan.ExtendCkanClient;
import org.gcube.datacatalogue.utillibrary.ckan.MarshUnmarshCkanObject;
import org.gcube.datacatalogue.utillibrary.ckan.MarshUnmarshCkanObject.METHOD;
import org.gcube.datacatalogue.utillibrary.db.DBCaller;
import org.gcube.datacatalogue.utillibrary.gcat.GCatCaller;
import org.gcube.datacatalogue.utillibrary.server.DataCatalogueRunningCluster.ACCESS_LEVEL_TO_CATALOGUE_PORTLET;
import org.gcube.datacatalogue.utillibrary.server.utils.CKANConveter;
import org.gcube.datacatalogue.utillibrary.server.utils.CatalogueUtilMethods;
import org.gcube.datacatalogue.utillibrary.server.utils.GCubeUtils;
import org.gcube.datacatalogue.utillibrary.server.utils.GCubeUtils.GCUBE_SCOPE_LEVEL;
import org.gcube.datacatalogue.utillibrary.server.utils.url.EntityContext;
import org.gcube.datacatalogue.utillibrary.shared.LandingPages;
import org.gcube.datacatalogue.utillibrary.shared.ResourceBean;
import org.gcube.datacatalogue.utillibrary.shared.RolesCkanGroupOrOrg;
import org.gcube.datacatalogue.utillibrary.shared.State;
import org.gcube.datacatalogue.utillibrary.shared.jackan.model.CkanDataset;
import org.gcube.datacatalogue.utillibrary.shared.jackan.model.CkanGroup;
import org.gcube.datacatalogue.utillibrary.shared.jackan.model.CkanLicense;
import org.gcube.datacatalogue.utillibrary.shared.jackan.model.CkanOrganization;
import org.gcube.datacatalogue.utillibrary.shared.jackan.model.CkanResource;
import org.gcube.datacatalogue.utillibrary.shared.jackan.model.CkanUser;
import org.gcube.datacatalogue.utillibrary.shared.jackan.model.exceptions.JackanException;
import org.json.simple.JSONArray;
import org.json.simple.JSONObject;
import org.json.simple.parser.JSONParser;

View File

@ -1,4 +1,4 @@
package org.gcube.datacatalogue.ckanutillibrary.server;
package org.gcube.datacatalogue.utillibrary.server;
import static org.gcube.resources.discovery.icclient.ICFactory.client;
import static org.gcube.resources.discovery.icclient.ICFactory.clientFor;
@ -22,10 +22,10 @@ import org.gcube.common.resources.gcore.ServiceEndpoint.AccessPoint;
import org.gcube.common.resources.gcore.ServiceEndpoint.Property;
import org.gcube.common.resources.gcore.utils.XPathHelper;
import org.gcube.common.scope.api.ScopeProvider;
import org.gcube.datacatalogue.ckanutillibrary.shared.ex.ApplicationProfileNotFoundException;
import org.gcube.datacatalogue.ckanutillibrary.shared.ex.NoApplicationProfileMasterException;
import org.gcube.datacatalogue.ckanutillibrary.shared.ex.NoDataCatalogueRuntimeResourceException;
import org.gcube.datacatalogue.ckanutillibrary.shared.ex.ServiceEndPointException;
import org.gcube.datacatalogue.utillibrary.shared.ex.ApplicationProfileNotFoundException;
import org.gcube.datacatalogue.utillibrary.shared.ex.NoApplicationProfileMasterException;
import org.gcube.datacatalogue.utillibrary.shared.ex.NoDataCatalogueRuntimeResourceException;
import org.gcube.datacatalogue.utillibrary.shared.ex.ServiceEndPointException;
import org.gcube.resources.discovery.client.api.DiscoveryClient;
import org.gcube.resources.discovery.client.queries.api.Query;
import org.gcube.resources.discovery.client.queries.api.SimpleQuery;

View File

@ -1,4 +1,4 @@
package org.gcube.datacatalogue.ckanutillibrary.server.utils;
package org.gcube.datacatalogue.utillibrary.server.utils;
import java.util.ArrayList;
import java.util.Iterator;
@ -6,13 +6,13 @@ import java.util.List;
import java.util.Map;
import java.util.Map.Entry;
import org.gcube.datacatalogue.ckanutillibrary.ckan.ExtendCkanClient;
import org.gcube.datacatalogue.ckanutillibrary.shared.ResourceBean;
import org.gcube.datacatalogue.ckanutillibrary.shared.jackan.model.CkanDataset;
import org.gcube.datacatalogue.ckanutillibrary.shared.jackan.model.CkanOrganization;
import org.gcube.datacatalogue.ckanutillibrary.shared.jackan.model.CkanPair;
import org.gcube.datacatalogue.ckanutillibrary.shared.jackan.model.CkanResource;
import org.gcube.datacatalogue.ckanutillibrary.shared.jackan.model.CkanTag;
import org.gcube.datacatalogue.utillibrary.ckan.ExtendCkanClient;
import org.gcube.datacatalogue.utillibrary.shared.ResourceBean;
import org.gcube.datacatalogue.utillibrary.shared.jackan.model.CkanDataset;
import org.gcube.datacatalogue.utillibrary.shared.jackan.model.CkanOrganization;
import org.gcube.datacatalogue.utillibrary.shared.jackan.model.CkanPair;
import org.gcube.datacatalogue.utillibrary.shared.jackan.model.CkanResource;
import org.gcube.datacatalogue.utillibrary.shared.jackan.model.CkanTag;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

View File

@ -1,4 +1,4 @@
package org.gcube.datacatalogue.ckanutillibrary.server.utils;
package org.gcube.datacatalogue.utillibrary.server.utils;
import java.net.HttpURLConnection;
import java.net.URL;

View File

@ -1,4 +1,4 @@
package org.gcube.datacatalogue.ckanutillibrary.server.utils;
package org.gcube.datacatalogue.utillibrary.server.utils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

View File

@ -1,4 +1,4 @@
package org.gcube.datacatalogue.ckanutillibrary.server.utils;
package org.gcube.datacatalogue.utillibrary.server.utils;
import static com.google.common.base.Preconditions.checkArgument;
import static com.google.common.base.Preconditions.checkNotNull;

View File

@ -1,4 +1,4 @@
package org.gcube.datacatalogue.ckanutillibrary.server.utils;
package org.gcube.datacatalogue.utillibrary.server.utils;
/**
* A list of attributes that are saved into http session.

View File

@ -1,4 +1,4 @@
package org.gcube.datacatalogue.ckanutillibrary.server.utils.url;
package org.gcube.datacatalogue.utillibrary.server.utils.url;
/**
* Entity context for uri resolver

View File

@ -1,4 +1,4 @@
package org.gcube.datacatalogue.ckanutillibrary.shared;
package org.gcube.datacatalogue.utillibrary.shared;
import java.io.Serializable;

View File

@ -1,4 +1,4 @@
package org.gcube.datacatalogue.ckanutillibrary.shared;
package org.gcube.datacatalogue.utillibrary.shared;
import static com.google.common.base.Preconditions.checkNotNull;

View File

@ -1,4 +1,4 @@
package org.gcube.datacatalogue.ckanutillibrary.shared;
package org.gcube.datacatalogue.utillibrary.shared;
/**
* Allowed relationships between packages(datasets). Some of them are not supported yet due to the problem

View File

@ -1,4 +1,4 @@
package org.gcube.datacatalogue.ckanutillibrary.shared;
package org.gcube.datacatalogue.utillibrary.shared;
import java.io.Serializable;

View File

@ -1,4 +1,4 @@
package org.gcube.datacatalogue.ckanutillibrary.shared;
package org.gcube.datacatalogue.utillibrary.shared;
import java.io.Serializable;

View File

@ -1,4 +1,4 @@
package org.gcube.datacatalogue.ckanutillibrary.shared;
package org.gcube.datacatalogue.utillibrary.shared;
/**
* Roles that user can have into organizations/groups.

View File

@ -1,4 +1,4 @@
package org.gcube.datacatalogue.ckanutillibrary.shared;
package org.gcube.datacatalogue.utillibrary.shared;
/**
* The current state of this group/user

View File

@ -1,4 +1,4 @@
package org.gcube.datacatalogue.ckanutillibrary.shared;
package org.gcube.datacatalogue.utillibrary.shared;
import java.io.Serializable;

View File

@ -1,4 +1,4 @@
package org.gcube.datacatalogue.ckanutillibrary.shared.ex;
package org.gcube.datacatalogue.utillibrary.shared.ex;
@SuppressWarnings("serial")
/**

View File

@ -1,4 +1,4 @@
package org.gcube.datacatalogue.ckanutillibrary.shared.ex;
package org.gcube.datacatalogue.utillibrary.shared.ex;
/**
* Thrown when there are more than one application profile, but none of them was set as master

View File

@ -1,4 +1,4 @@
package org.gcube.datacatalogue.ckanutillibrary.shared.ex;
package org.gcube.datacatalogue.utillibrary.shared.ex;
/**
* No Data Catalogue node found.

View File

@ -1,4 +1,4 @@
package org.gcube.datacatalogue.ckanutillibrary.shared.ex;
package org.gcube.datacatalogue.utillibrary.shared.ex;
/**
* Exception thrown when it is not possible retrieve information from the ServiceEndpoint

View File

@ -1,4 +1,4 @@
package org.gcube.datacatalogue.ckanutillibrary.shared.ex;
package org.gcube.datacatalogue.utillibrary.shared.ex;
/**
* Too many clusters in this scope exception.

View File

@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.gcube.datacatalogue.ckanutillibrary.shared.jackan.model;
package org.gcube.datacatalogue.utillibrary.shared.jackan.model;
import java.sql.Timestamp;
import java.util.List;

View File

@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.gcube.datacatalogue.ckanutillibrary.shared.jackan.model;
package org.gcube.datacatalogue.utillibrary.shared.jackan.model;
/**
* Actually they are lower case in ckan, but 'public' and 'private' clash with

View File

@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.gcube.datacatalogue.ckanutillibrary.shared.jackan.model;
package org.gcube.datacatalogue.utillibrary.shared.jackan.model;
import java.sql.Timestamp;

View File

@ -13,9 +13,9 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.gcube.datacatalogue.ckanutillibrary.shared.jackan.model;
package org.gcube.datacatalogue.utillibrary.shared.jackan.model;
import static org.gcube.datacatalogue.ckanutillibrary.server.utils.GenericUtils.isNotEmpty;
import static org.gcube.datacatalogue.utillibrary.server.utils.GenericUtils.isNotEmpty;
import java.util.ArrayList;
import java.util.Collections;

View File

@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.gcube.datacatalogue.ckanutillibrary.shared.jackan.model;
package org.gcube.datacatalogue.utillibrary.shared.jackan.model;
/**
*

View File

@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.gcube.datacatalogue.ckanutillibrary.shared.jackan.model;
package org.gcube.datacatalogue.utillibrary.shared.jackan.model;
import java.util.HashMap;
import java.util.Map;

View File

@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.gcube.datacatalogue.ckanutillibrary.shared.jackan.model;
package org.gcube.datacatalogue.utillibrary.shared.jackan.model;
/**
* Class to explicitly model a Ckan group, which is <i> not </i> an organization,

View File

@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.gcube.datacatalogue.ckanutillibrary.shared.jackan.model;
package org.gcube.datacatalogue.utillibrary.shared.jackan.model;
import java.sql.Timestamp;

View File

@ -13,10 +13,10 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.gcube.datacatalogue.ckanutillibrary.shared.jackan.model;
package org.gcube.datacatalogue.utillibrary.shared.jackan.model;
import static org.gcube.datacatalogue.ckanutillibrary.server.utils.GenericUtils.isNotEmpty;
import static org.gcube.datacatalogue.utillibrary.server.utils.GenericUtils.isNotEmpty;
import java.util.List;
@ -24,7 +24,7 @@ import javax.annotation.Nullable;
import org.gcube.com.fasterxml.jackson.annotation.JsonProperty;
import org.gcube.com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import org.gcube.datacatalogue.ckanutillibrary.jackan.JackanModule;
import org.gcube.datacatalogue.utillibrary.jackan.JackanModule;

View File

@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.gcube.datacatalogue.ckanutillibrary.shared.jackan.model;
package org.gcube.datacatalogue.utillibrary.shared.jackan.model;
import org.gcube.com.fasterxml.jackson.annotation.JsonProperty;

View File

@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.gcube.datacatalogue.ckanutillibrary.shared.jackan.model;
package org.gcube.datacatalogue.utillibrary.shared.jackan.model;
/**

View File

@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.gcube.datacatalogue.ckanutillibrary.shared.jackan.model;
package org.gcube.datacatalogue.utillibrary.shared.jackan.model;
import java.util.Objects;

View File

@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.gcube.datacatalogue.ckanutillibrary.shared.jackan.model;
package org.gcube.datacatalogue.utillibrary.shared.jackan.model;
import javax.annotation.Nullable;

View File

@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.gcube.datacatalogue.ckanutillibrary.shared.jackan.model;
package org.gcube.datacatalogue.utillibrary.shared.jackan.model;
import java.io.File;
import java.sql.Timestamp;
@ -25,7 +25,7 @@ import javax.annotation.Nullable;
import org.gcube.com.fasterxml.jackson.annotation.JsonAnyGetter;
import org.gcube.com.fasterxml.jackson.annotation.JsonAnySetter;
import org.gcube.com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import org.gcube.datacatalogue.ckanutillibrary.shared.jackan.model.exceptions.JackanException;
import org.gcube.datacatalogue.utillibrary.shared.jackan.model.exceptions.JackanException;
import org.slf4j.Logger;

View File

@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.gcube.datacatalogue.ckanutillibrary.shared.jackan.model;
package org.gcube.datacatalogue.utillibrary.shared.jackan.model;
/**
*

View File

@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.gcube.datacatalogue.ckanutillibrary.shared.jackan.model;
package org.gcube.datacatalogue.utillibrary.shared.jackan.model;
/**
* Possible states of a Dataset or Resource - only active datasets show up in

View File

@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.gcube.datacatalogue.ckanutillibrary.shared.jackan.model;
package org.gcube.datacatalogue.utillibrary.shared.jackan.model;
import java.sql.Timestamp;

View File

@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.gcube.datacatalogue.ckanutillibrary.shared.jackan.model;
package org.gcube.datacatalogue.utillibrary.shared.jackan.model;
/**
* A Ckan Tag. Tags can be free or belong to a controlled vocabulary.

View File

@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.gcube.datacatalogue.ckanutillibrary.shared.jackan.model;
package org.gcube.datacatalogue.utillibrary.shared.jackan.model;
/**
* Just don't know what it is.

View File

@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.gcube.datacatalogue.ckanutillibrary.shared.jackan.model;
package org.gcube.datacatalogue.utillibrary.shared.jackan.model;
import java.sql.Timestamp;
import java.util.List;

View File

@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.gcube.datacatalogue.ckanutillibrary.shared.jackan.model;
package org.gcube.datacatalogue.utillibrary.shared.jackan.model;
import javax.annotation.Nullable;

View File

@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.gcube.datacatalogue.ckanutillibrary.shared.jackan.model;
package org.gcube.datacatalogue.utillibrary.shared.jackan.model;
import java.util.List;

View File

@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.gcube.datacatalogue.ckanutillibrary.shared.jackan.model;
package org.gcube.datacatalogue.utillibrary.shared.jackan.model;
import java.util.List;

View File

@ -13,10 +13,10 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.gcube.datacatalogue.ckanutillibrary.shared.jackan.model.exceptions;
package org.gcube.datacatalogue.utillibrary.shared.jackan.model.exceptions;
import org.gcube.datacatalogue.ckanutillibrary.jackan.CkanClient;
import org.gcube.datacatalogue.ckanutillibrary.shared.jackan.model.CkanResponse;
import org.gcube.datacatalogue.utillibrary.jackan.CkanClient;
import org.gcube.datacatalogue.utillibrary.shared.jackan.model.CkanResponse;
/**
* Exception raised when the user is not authorized to call the action.

View File

@ -13,13 +13,13 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.gcube.datacatalogue.ckanutillibrary.shared.jackan.model.exceptions;
package org.gcube.datacatalogue.utillibrary.shared.jackan.model.exceptions;
import javax.annotation.Nullable;
import org.gcube.datacatalogue.ckanutillibrary.jackan.CkanClient;
import org.gcube.datacatalogue.ckanutillibrary.shared.jackan.model.CkanResponse;
import org.gcube.datacatalogue.utillibrary.jackan.CkanClient;
import org.gcube.datacatalogue.utillibrary.shared.jackan.model.CkanResponse;
/**
* Runtime exception for ckan-related problems. For possible cases description, see {@link eu.trentorise.opendata.jackan.model.CkanError CkanError}

View File

@ -13,10 +13,10 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.gcube.datacatalogue.ckanutillibrary.shared.jackan.model.exceptions;
package org.gcube.datacatalogue.utillibrary.shared.jackan.model.exceptions;
import org.gcube.datacatalogue.ckanutillibrary.jackan.CkanClient;
import org.gcube.datacatalogue.ckanutillibrary.shared.jackan.model.CkanResponse;
import org.gcube.datacatalogue.utillibrary.jackan.CkanClient;
import org.gcube.datacatalogue.utillibrary.shared.jackan.model.CkanResponse;
/**
* Thrown when Ckan tells us something was not found. Notice this is not related

View File

@ -13,10 +13,10 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.gcube.datacatalogue.ckanutillibrary.shared.jackan.model.exceptions;
package org.gcube.datacatalogue.utillibrary.shared.jackan.model.exceptions;
import org.gcube.datacatalogue.ckanutillibrary.jackan.CkanClient;
import org.gcube.datacatalogue.ckanutillibrary.shared.jackan.model.CkanResponse;
import org.gcube.datacatalogue.utillibrary.jackan.CkanClient;
import org.gcube.datacatalogue.utillibrary.shared.jackan.model.CkanResponse;
/**
* Thrown when Ckan tells us something was not in the proper format.

View File

@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.gcube.datacatalogue.ckanutillibrary.shared.jackan.model.exceptions;
package org.gcube.datacatalogue.utillibrary.shared.jackan.model.exceptions;
/**

View File

@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.gcube.datacatalogue.ckanutillibrary.shared.jackan.model.exceptions;
package org.gcube.datacatalogue.utillibrary.shared.jackan.model.exceptions;
/**
* A runtime exception to raise when something is not found. Note this is not

View File

@ -1,4 +1,4 @@
package org.gcube.datacatalogue.ckanutillibrary.test;
package org.gcube.datacatalogue.utillibrary.test;
import java.util.ArrayList;
@ -10,14 +10,14 @@ import java.util.Random;
import org.gcube.common.authorization.library.provider.SecurityTokenProvider;
import org.gcube.common.scope.api.ScopeProvider;
import org.gcube.datacatalogue.ckanutillibrary.server.ApplicationProfileScopePerUrlReader;
import org.gcube.datacatalogue.ckanutillibrary.server.DataCatalogueFactory;
import org.gcube.datacatalogue.ckanutillibrary.server.DataCatalogueImpl;
import org.gcube.datacatalogue.ckanutillibrary.shared.ResourceBean;
import org.gcube.datacatalogue.ckanutillibrary.shared.jackan.model.CkanDataset;
import org.gcube.datacatalogue.ckanutillibrary.shared.jackan.model.CkanGroup;
import org.gcube.datacatalogue.ckanutillibrary.shared.jackan.model.CkanOrganization;
import org.gcube.datacatalogue.ckanutillibrary.shared.jackan.model.CkanUser;
import org.gcube.datacatalogue.utillibrary.server.ApplicationProfileScopePerUrlReader;
import org.gcube.datacatalogue.utillibrary.server.DataCatalogueFactory;
import org.gcube.datacatalogue.utillibrary.server.DataCatalogueImpl;
import org.gcube.datacatalogue.utillibrary.shared.ResourceBean;
import org.gcube.datacatalogue.utillibrary.shared.jackan.model.CkanDataset;
import org.gcube.datacatalogue.utillibrary.shared.jackan.model.CkanGroup;
import org.gcube.datacatalogue.utillibrary.shared.jackan.model.CkanOrganization;
import org.gcube.datacatalogue.utillibrary.shared.jackan.model.CkanUser;
import org.junit.Before;
import org.junit.Test;
import org.slf4j.LoggerFactory;