Examples of IefSAXHandler


Examples of org.ita.capes.ief.IefSAXHandler

     
    } catch (FileNotFoundException e1) {
      e1.printStackTrace();
    }
    InputStream is = fis;
    IefSAXHandler handler = new IefSAXHandler();
    parser.setContentHandler(handler);
    InputSource input = new InputSource(is);
    try {
      parser.parse(input);
    } catch (IOException e) {
      e.printStackTrace();
    } catch (SAXException e) { 
      //e.printStackTrace();
    }
   
   
   
    handler.getCorrente();
   
  }
View Full Code Here

Examples of org.ita.capes.ief.IefSAXHandler

    while (iefCount!=-1){
        try {
          fis = new FileInputStream(myIefDir+iefCount+".txt");
                   
        InputStream is = fis;
        IefSAXHandler handler = new IefSAXHandler();
        parser.setContentHandler(handler);
        InputSource input = new InputSource(is);
       
        parser.parse(input);
        if(!handler.isErrorPageFromSite()) iefInfoTelaDAO.insert(handler.getCorrente());
        System.out.println("Thread "+numero+": Inserido ief "+iefCount);
       
      }catch (ApplicationException e) {
        e.printStackTrace();
      }
View Full Code Here

Examples of org.ita.capes.ief.IefSAXHandler

    while (iefCount!=-1){
        try {
          fis = new FileInputStream(myIefDir+iefCount+".txt");
                   
        InputStream is = fis;
        IefSAXHandler handler = new IefSAXHandler();
        parser.setContentHandler(handler);
        InputSource input = new InputSource(is);
       
        parser.parse(input);
        if(!handler.isErrorPageFromSite()) {
          IefInfoTela aux = new IefInfoTela();
          aux.setNum(handler.getCorrente().getNum());
          aux.setNome("");
          aux.setSigla("");
          aux.setOrganizacaoAcademica("");
          aux.setCategoriaAdministrativa("");
          aux.setInfo("");
          aux.setCep("");
          aux.setCidade("");
          aux.setEstado("");
          aux.setHomepage("");
          List<IefInfoTela> auxLista = iefInfoTelaDAO.query(aux);
          if(auxLista.size()>1) throw new ApplicationException("Mais de um IefInfoTela com num "+aux.getNum());
          else if(auxLista.size()==0) throw new ApplicationException("Sem elemento IefInfoTela com num "+aux.getNum());
          else {
            //todas informacoes que nao sao setadas em corrente
            handler.getCorrente().setIdIef(auxLista.get(0).getIdIef());
            handler.getCorrente().setLatitude(auxLista.get(0).getLatitude());
            handler.getCorrente().setLongitude(auxLista.get(0).getLongitude());
          }
         
          iefInfoTelaDAO.update(handler.getCorrente());
        }
        System.out.println("Thread "+numero+": Atualizado ief "+iefCount);
       
      }catch (ApplicationException e) {
        //e.printStackTrace();
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.