Exemple #1
0
  private LinkedHashMap[] obtenerMapeos(CliGol cliGol, NodeList variables, String[] excluye) {

    LinkedHashMap<String, Object> mapa = new LinkedHashMap<String, Object>();

    LinkedHashMap<String, String> puntos = new LinkedHashMap<String, String>();

    List<String> ex = Arrays.asList(excluye);

    for (int i = 0; i < variables.getLength(); i++) {

      String nom = variables.item(i).getNodeName();

      if (!ex.contains(nom)) {

        String golMapdijo = GolMap.xmlGol(nom);

        String val = null;
        if (golMapdijo != null) {
          val = buscaValEnCli(golMapdijo, cliGol);
          mapa.put(nom, val);

          puntos.put(nom, variables.item(i).getTextContent());
        }
      }
    }

    return new LinkedHashMap[] {mapa, puntos};
  }
Exemple #2
0
  private String sustraerInformacionNodo(CliGol cliGol, Node nodo) {

    String[] excluye = {
      "CLI_ID",
      "CLI_SAP",
      "CliApePat",
      "CliApeMat",
      "CliNom",
      "CLI_FEC_NAC",
      "CLI_DOM_CAL",
      "CLI_DOM_NUM_EXT",
      "CLI_DOM_NUM_INT",
      "CLI_DOM_COL",
      "CLI_POS_ID",
      "CliGolP1",
      "CliGolP8",
      "CliGolP10",
      "CliGolP11",
      "CliGolP15",
      "CliGolP17",
      "CliGolP18",
      "CliGolP25",
      "CliGolResAct",
      "CliGolNumTar",
      "CliGolCtaChe",
      "CliGolCrePer",
      "CliGolCreAut",
      "CliGolCreHip",
      "CliGolOtrCre",
      "CliBurMens",
      "PagRnt",
      "CliGolBurCre",
      "CliBurValr",
      "CliGolIng",
      "CliGolImpRen"
    };

    NodeList variables = nodo.getChildNodes();

    LinkedHashMap[] mapas = obtenerMapeos(cliGol, variables, excluye);

    Dao dao = new Dao();
    Object[] descripciones = dao.ObtenLista(mapas[0], Arrays.asList(excluye));

    // <variable,puntos>,descripciones
    return unirMapeos(mapas[1], descripciones);
  }