Skip to content
This repository has been archived by the owner on Mar 30, 2021. It is now read-only.

Commit

Permalink
Deferenciacion Uris
Browse files Browse the repository at this point in the history
  • Loading branch information
root authored and root committed Oct 19, 2015
1 parent 54a13d3 commit 32c5ec6
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -510,6 +510,12 @@ private void createmapping(EldaPDIStepMeta meta,String FileName) {


;
//nested
Resource rnoNested = fModel
.createResource( meta.getServicio());
rnoNested.addProperty(elda.supportsNestedSelect, "false");
//rnoNested.

//crear viewerMedium
Resource rvierwerMedium = fModel
.createResource( URLconfiguracion+"viewerMedium");
Expand Down Expand Up @@ -856,7 +862,7 @@ private String crearApiWhere(ArrayList<String> filtrosEndpoint,
if(band==0){
resp+=simboloSeparar+"{s1}"; //resp+="/{s1}";
}
resp += ", \"i\" )) \'" ; //", \"i\" \39 )) \' " ;
resp += "), \"i\" )) \'" ; //", \"i\" \39 )) \' " ;

System.out.println(resp);
//resp = resp.replace('\', "");//limpiar string
Expand Down Expand Up @@ -939,7 +945,12 @@ private ArrayList<String> obtenerParametrosFiltros( ArrayList<String> listaMuest
}*/
}
String entidadUri = listaMuestreo.get(0);
System.out.println(" /////////PALABRAS FILTROS PARTE IGUAL /// "+entidadUri.substring(posBaseUri, ultimaPosicionIgual));

//System.out.println(" /////////PALABRAS FILTROS PARTE IGUAL /// "+entidadUri.substring(posBaseUri, ultimaPosicionIgual));
int ultIndexPartigual=0; //para poder separar la parte para el match de la Uri , es decir la ultima palabra comun
ultIndexPartigual = entidadUri.substring(0, ultimaPosicionIgual-2).lastIndexOf("/") +1;
System.out.println(" /////////PENULTIMO SLASH ultIndexPartigual "+ultIndexPartigual);
System.out.println(" /////////PALABRAS FILTROS PARTE IGUAL /// "+entidadUri.substring(ultIndexPartigual, ultimaPosicionIgual));

ArrayList<String> resp = new ArrayList<String>() ;
//String entidadUri = listaMuestreo.get(0);
Expand All @@ -956,17 +967,28 @@ private ArrayList<String> obtenerParametrosFiltros( ArrayList<String> listaMuest
int posAntesId = listaMuestreo.get(0).lastIndexOf(simboloSeparar) ; //posicion antes ultimo /
ArrayList<Integer> indices = new ArrayList<Integer>(); //indices para separar

if (posBaseUri < posAntesId){ //validacion

if (ultIndexPartigual < posAntesId){ //validacion
//separar
String parteAnalizar = entidadUri.substring(posBaseUri, posAntesId);
String parteAnalizar = entidadUri.substring(ultIndexPartigual, posAntesId);
if (!parteAnalizar.contains("/")){simboloSeparar = "#";}else{simboloSeparar = "/";}
List<String> myList = new ArrayList<String>(Arrays.asList(parteAnalizar
.split(simboloSeparar)));

System.out.println(" /////////PALABRAS FILTROS /// "+myList.toString());
resp = (ArrayList<String>) myList;
}
}
// if (posBaseUri < posAntesId){ //VERSION POS base uri para separar
//
// //separar
// String parteAnalizar = entidadUri.substring(posBaseUri, posAntesId);
// if (!parteAnalizar.contains("/")){simboloSeparar = "#";}else{simboloSeparar = "/";}
// List<String> myList = new ArrayList<String>(Arrays.asList(parteAnalizar
// .split(simboloSeparar)));
//
// System.out.println(" /////////PALABRAS FILTROS /// "+myList.toString());
// resp = (ArrayList<String>) myList;
// }


return resp;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ public static Property li( int i )
public static final Property textSearchOperand = property("textSearchOperand");
public static final Property velocityTemplate = property("velocityTemplate");
public static final Property graphTemplate = property("graphTemplate");
public static final Property supportsNestedSelect = property("supportsNestedSelect");
/**
The same items of vocabulary, but at the Node level, parked inside a
nested class so that there's a simple way to refer to them.
Expand All @@ -50,6 +51,7 @@ nested class so that there's a simple way to refer to them.
public static final Node textSearchOperand = elda.textSearchOperand .asNode();
public static final Node velocityTemplate = elda.velocityTemplate .asNode();
public static final Node graphTemplate = elda.graphTemplate .asNode();
public static final Node supportsNestedSelect = elda.supportsNestedSelect .asNode();
}

}
Expand Down

0 comments on commit 32c5ec6

Please sign in to comment.