Lucio Lelii 2016-12-13 13:21:59 +00:00
parent 928c944f07
commit 81062f433d
1 changed files with 1 additions and 42 deletions

View File

@ -25,11 +25,9 @@ public class Helper {
{ {
String scope = ScopeProvider.instance.get(); String scope = ScopeProvider.instance.get();
System.out.println("inside filter");
if (scope==null || !new ScopeBean(scope).is(VRE)) if (scope==null || !new ScopeBean(scope).is(VRE))
return expression; return expression;
System.out.println("filtering");
int wherePathIndex=0; int wherePathIndex=0;
int returnPathIndex=0; int returnPathIndex=0;
@ -188,51 +186,12 @@ public class Helper {
for (Entry<String, String> entry: varReplacementMap.entrySet()) for (Entry<String, String> entry: varReplacementMap.entrySet())
queryFiltered = queryFiltered.replace(entry.getKey(), entry.getValue()); queryFiltered = queryFiltered.replace(entry.getKey(), entry.getValue());
/*
if (inSubResultString.compareTo("")!=0){
String newInSubResultString = inSubResultString;
for (Entry<String, String> entry: varReplacementMap.entrySet())
newInSubResultString = newInSubResultString.replace(entry.getKey(), entry.getValue());
queryFiltered =queryFiltered.replace(inSubResultString, newInSubResultString);
/*
String firstVar=inSubResultMat.group(2);
String replaceVar=inSubResultMat.group(3);
queryFiltered= queryFiltered.replace(firstVar, replaceVar);
System.out.println(firstVar);
System.out.println(replaceVar);
System.out.println("query filtered final: "+queryFiltered);
} else
queryFiltered=queryFiltered.replace(inSubResultString, "");
*/
log.trace("submitting filtered query: {}",queryFiltered); log.trace("submitting filtered query: {}",queryFiltered);
System.out.println("filtering "+queryFiltered);
return queryFiltered; return queryFiltered;
} }
/*
private static class Pair {
private String toInsert;
//is strange Behaviour is true if we are searching for RI , GHN or Service
private boolean isStrangeBehaviour;
public Pair(String toInsert, boolean isStrangeBehaviour){
this.toInsert= toInsert;
this.isStrangeBehaviour= isStrangeBehaviour;
}
public String getToInsert(){
return this.toInsert;
}
public boolean isStrangeBehaviour(){
return this.isStrangeBehaviour;
}
}
*/
} }