Package jifx.connection.translator

Examples of jifx.connection.translator.TranslateException


        }
      }
    }
    //Si el valor era requerido y no se pudo obtener se genera un error.
    if (valorObtenido == null && required)
      throw new TranslateException("Falta campo: "+source);
    else if (valorObtenido == null)
      return;

    //Verifco si est� presente el campo de procesado del valor obtenido
    if (pattern.trim().length() == 0) {
      variables.put(name, new String[] { valorObtenido.toString() });
    } else {
      //Si el campo no es vac�o proceso la expresi�n regular para extraer los valores.
      Pattern pat = Pattern.compile(pattern);
      Matcher matcher = pat.matcher(valorObtenido.toString());
      if (!matcher.matches())
        if (required)
          throw new TranslateException("El valor del campo "+source+" que es "+valorObtenido+" no machea con su RegEx");
        else
          return;
      String[] groups = new String[matcher.groupCount()];
      for (int i = 1; i <= matcher.groupCount(); i++)
        groups[i-1] = matcher.group(i);
View Full Code Here

TOP

Related Classes of jifx.connection.translator.TranslateException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.