just move some logs to debug
git-svn-id: http://svn.research-infrastructures.eu/public/d4science/gcube/trunk/data-transfer/uri-resolver@174443 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
c3836d98fc
commit
b42eb0bc20
|
@ -257,6 +257,7 @@ public class GeonetworkResolver {
|
|||
@QueryParam(QUERY_PARAM_RESET_CACHED_SCOPE_PARAM) @Nullable String resetScope) {
|
||||
|
||||
logger.info(this.getClass().getSimpleName()+" POST starts...");
|
||||
logger.info("Params are [mode: "+mode+", scope: "+scope+", visibility: "+visibility+", filterKey: "+filterKey+", filterValue: "+filterValue+", remainPath: "+remainPath+"]");
|
||||
|
||||
if(scope==null || scope.isEmpty()){
|
||||
logger.error("Path Parameter 'scope' not found");
|
||||
|
@ -292,11 +293,15 @@ public class GeonetworkResolver {
|
|||
ExceptionManager.throwWrongParameterException(req, "The 'visibility' parameter must be value of "+toPrint, this.getClass(), help);
|
||||
}
|
||||
|
||||
//HOW TO PASS MORE THAN ONE?
|
||||
//HOW TO PASS ANY FILTER?
|
||||
//TODO INVESTIGATE ON HOW TO PASS MORE THAN ONE FILTER...
|
||||
Map<String,String> filters = new HashMap<String, String>();
|
||||
if(filterKey!=null && filterValue!=null){
|
||||
filters.put(filterKey, filterValue);
|
||||
logger.debug("Added filter parmas to map filters: "+filters);
|
||||
//IGNORING THE EMPTY FILTER 'null|null'
|
||||
if(filterKey.compareToIgnoreCase("null")!=0){
|
||||
filters.put(filterKey, filterValue);
|
||||
logger.debug("Added filter parmas to map filters: "+filters);
|
||||
}
|
||||
}
|
||||
|
||||
String gnCSWlURL = null;
|
||||
|
@ -350,7 +355,7 @@ public class GeonetworkResolver {
|
|||
HTTPCallsUtils httpUtils = new HTTPCallsUtils();
|
||||
|
||||
//PRIVATE LAYERS
|
||||
if(visibility.equals(VISIBILITY.PRV)){
|
||||
if(visibility.equals(VISIBILITY.PRV.name())){
|
||||
logger.info("Visibility: "+VISIBILITY.PRV+" getting private layers..");
|
||||
//VRE LAYERS
|
||||
if(mode.equals(MODE.VRE)){
|
||||
|
@ -371,7 +376,7 @@ public class GeonetworkResolver {
|
|||
}else{
|
||||
logger.info("Visibility: "+VISIBILITY.PUB+" getting public layers..");
|
||||
//VRE LAYERS
|
||||
if(mode.equals(MODE.VRE)){
|
||||
if(mode.equals(MODE.VRE.name())){
|
||||
logger.info("Getting "+MODE.VRE+" layers, the VRE account: "+account.getUser() +" will be used as owner user for filtering... Is it right?");
|
||||
filters.put("ownername", account.getUser());
|
||||
//HARVESTED LAYERS
|
||||
|
@ -397,7 +402,7 @@ public class GeonetworkResolver {
|
|||
|
||||
ReusableInputStream reus = new ReusableInputStream(in);
|
||||
|
||||
if(visibility.equals(VISIBILITY.PRV)){
|
||||
if(visibility.equals(VISIBILITY.PRV.name())){
|
||||
logger.info("Private VISIBILITY requested, retrieving public file identifiers to apply filtering..");
|
||||
FilterGetRecords filterGetRecords = new FilterGetRecords(byteArray.toString());
|
||||
if(filterGetRecords.getFoundPublicIds()!=null && filterGetRecords.getFoundPublicIds().size()>0){
|
||||
|
|
|
@ -146,7 +146,7 @@ public class GetResponseRecordFilter {
|
|||
|
||||
NodeList gcoLst = id.getElementsByTagName("gco:CharacterString");
|
||||
if(gcoLst==null || gcoLst.getLength()==0 || gcoLst.item(0)==null){
|
||||
logger.info("skipping identifier: " + identifier +" it has not gco:CharacterString");
|
||||
logger.debug("skipping identifier: " + identifier +" it has not gco:CharacterString");
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
|
@ -10,7 +10,6 @@ import org.gcube.spatial.data.geonetwork.LoginLevel;
|
|||
import org.gcube.spatial.data.geonetwork.configuration.Configuration;
|
||||
import org.gcube.spatial.data.geonetwork.model.Account;
|
||||
import org.gcube.spatial.data.geonetwork.model.Account.Type;
|
||||
import org.junit.Test;
|
||||
import org.opengis.metadata.Metadata;
|
||||
|
||||
/**
|
||||
|
@ -24,7 +23,7 @@ public class GeonetworkQueryTest {
|
|||
|
||||
private static final String UUID = "8a878105-ef06-4b1f-843f-120fc525b22b";
|
||||
|
||||
//private String[] scopes = {"/gcube/devNext/NextNext"};
|
||||
private String[] scopesProd = {"/gcube/devsec/devVRE"};
|
||||
|
||||
//private String[] scopesProd = {"/d4science.research-infrastructures.eu/gCubeApps/SIASPA"};
|
||||
|
||||
|
@ -32,7 +31,7 @@ public class GeonetworkQueryTest {
|
|||
|
||||
//private String[] scopesProd = {"/d4science.research-infrastructures.eu/D4Research"};
|
||||
|
||||
private String[] scopesProd = {"/d4science.research-infrastructures.eu"};
|
||||
//private String[] scopesProd = {"/d4science.research-infrastructures.eu"};
|
||||
|
||||
//private String[] scopesProd = {"/d4science.research-infrastructures.eu/gCubeApps/FAO_TunaAtlas"};
|
||||
|
||||
|
|
Loading…
Reference in New Issue