Package ca.odell.glazedlists.impl.adt.barcode2

Examples of ca.odell.glazedlists.impl.adt.barcode2.Element


  }
 
  public Document getInstituicaoXML(){
    int i;
   
    Element instXML = new Element("instituicao");
    Document doc = new Document(instXML);
   
    Element instNome = new Element("nome");
    instNome.setText(nome);
   
    Element instCnpj = new Element("cnpj");
    instCnpj.setText(formataString(cnpj));
   
    Element instTipo = new Element("tipo");
    instTipo.setText(tipo);
   
    instXML.addContent(instNome);
    instXML.addContent(instCnpj);
    instXML.addContent(instTipo);
   
    if(getNumeroDeTurmas() > 0){
      for(i=0;i<getNumeroDeTurmas();i++){
        Element turmaXML;
        turmaXML = turmas.get(i).exportarTurmaXml();
        instXML.addContent(turmaXML);
      }
    }
   
    Element instHash = new Element("hash");
    instHash.setText(md5Java(this));
    instXML.addContent(instHash);
   
    Element programaVersao = new Element("versao");
    programaVersao.setText(Cody.getInstancia().getVersaoDoSistema());
    instXML.addContent(programaVersao);
   
    return doc;   
  }
View Full Code Here


      }
    }
  }
 
  public Element exportarTesteAptidaoSaudeXML(){
    Element testeXML = new Element("testeAptidaoSaude");

    if((getNumAbdominais() != null) && (!getNumAbdominais().isEmpty())
    && (getNumAbdominais().length() != 0)){
      Element numAbdominaisXML = new Element("numAbdominais");
      numAbdominaisXML.setText(getNumAbdominais());
      testeXML.addContent(numAbdominaisXML);     
    }

    if((getImc() != null) && (!getImc().isEmpty())
    && (getImc().length() != 0)){
      Element imcXML = new Element("imc");
      imcXML.setText(getImc());
      testeXML.addContent(imcXML);   
    }
   
    if( getNoveMinutos() ){
      Element noveMinutosXML = new Element("noveMinutos");
      noveMinutosXML.setText("true");
      testeXML.addContent(noveMinutosXML);
    }else{
      Element noveMinutosXML = new Element("noveMinutos");
      noveMinutosXML.setText("false");
      testeXML.addContent(noveMinutosXML);
    }
   
    if((getSeisMinutos() != null) && (!getSeisMinutos().isEmpty())
    && (getSeisMinutos().length() != 0)){
      Element seisMinutosXML = new Element("seisMinutos");
      seisMinutosXML.setText(getSeisMinutos());
      testeXML.addContent(seisMinutosXML);
    }
   
    return testeXML;
  }
View Full Code Here

    return true;
  }
 
  public Element exportarTurmaXml(){
    int i;
    Element turmaXML = new Element("turma");
   
    Element turmaNome = new Element("nome");
    turmaNome.setText(nome);
   
    Element turmaAno = new Element("ano");
    turmaAno.setText(ano);
   
    turmaXML.addContent(turmaNome);
    turmaXML.addContent(turmaAno);
   
    if(getNumeroDeAlunos() > 0){
      for(i=0;i<getNumeroDeAlunos();i++){
        Element alunoXML;
        alunoXML = alunos.get(i).exportarAlunoXML();
        turmaXML.addContent(alunoXML);
      }
    }
    return turmaXML;
View Full Code Here

      }
    }
  }
 
  public Element exportarTesteAptidaoEsportivaXML(){
    Element testeXML = new Element("testeAptidaoEsportivo");

    if((getArremessoDeMedicineball() != null) && (!getArremessoDeMedicineball().isEmpty())
    && (getArremessoDeMedicineball().length() != 0)){   
      Element arremessoMedicineballXML = new Element("arremessoDeMedicineball");
      arremessoMedicineballXML.setText(getArremessoDeMedicineball());
      testeXML.addContent(arremessoMedicineballXML);
    }
 
    if((getCorridaVinteMetros() != null) && (!getCorridaVinteMetros().isEmpty())
    && (getCorridaVinteMetros().length() != 0)){ 
      Element corridaVinteMetrosXML = new Element("corridaVinteMetros");
      corridaVinteMetrosXML.setText(getCorridaVinteMetros());
      testeXML.addContent(corridaVinteMetrosXML);   
    }

    if((getQuadrado() != null) && (!getQuadrado().isEmpty())
    && (getQuadrado().length() != 0)){
      Element quadradoXML = new Element("quadrado");
      quadradoXML.setText(getQuadrado());
      testeXML.addContent(quadradoXML);   
    }

    if((getSaltoEmDistancia() != null) && (!getSaltoEmDistancia().isEmpty())
    && (getSaltoEmDistancia().length() != 0)){
      Element saltoEmDistanciaXML = new Element("saltoEmDistancia");
      saltoEmDistanciaXML.setText(getSaltoEmDistancia());
      testeXML.addContent(saltoEmDistanciaXML);   
    }

    if( getNoveMinutos() ){
      Element noveMinutosXML = new Element("noveMinutos");
      noveMinutosXML.setText("true");
      testeXML.addContent(noveMinutosXML);
    }else{
      Element noveMinutosXML = new Element("noveMinutos");
      noveMinutosXML.setText("false");
      testeXML.addContent(noveMinutosXML);
    }
   
    if((getSeisMinutos() != null) && (!getSeisMinutos().isEmpty())
    && (getSeisMinutos().length() != 0)){
      Element seisMinutosXML = new Element("seisMinutos");
      seisMinutosXML.setText(getSeisMinutos());
      testeXML.addContent(seisMinutosXML);
    }
   
    return testeXML; 
  }
View Full Code Here

   
     
    for(Element testeTag: listaTestesAlunos){
      nomeTeste = testeTag.getChildText("nome");
      data = testeTag.getChildText("data");
      Element TAS = testeTag.getChild("testeAptidaoSaude");
      Element TAE = testeTag.getChild("testeAptidaoEsportivo");
      Element MC = testeTag.getChild("medidaCrescimento");
     
     
      abdominal = TAS.getChildText("numAbdominais");
      imc = TAS.getChildText("imc");
       
      if("true".equals(TAS.getChildText("noveMinutos"))){
        noveMinutosTAS = true;
      }else{
        noveMinutosTAS = false;
      }
      seisMinutosTAS = TAS.getChildText("seisMinutos");
       
      instTAS = new TesteAptidaoSaude(data, nomeTeste, abdominal, imc, noveMinutosTAS, seisMinutosTAS );
      testAptSaude.add(instTAS);
       
   
      arremessoDeMedicineball = TAE.getChildText("arremessoDeMedicineball");
      corridaVinteMetros = TAE.getChildText("corridaVinteMetros");
      quadrado = TAE.getChildText("quadrado");
      saltoEmDistancia = TAE.getChildText("saltoEmDistancia");
      if("true".equals(TAE.getChildText("noveMinutos")) ){
        noveMinutosTAE = true;
      }else{
        noveMinutosTAE = false;
      }
     
      seisMinutosTAE = TAE.getChildText("seisMinutos");
         
      instTAE = new TesteAptidaoEsportivo(data, nomeTeste, arremessoDeMedicineball, corridaVinteMetros, quadrado, saltoEmDistancia, noveMinutosTAE, seisMinutosTAE);
      testAptEsp.add(instTAE);
       
     
      massaCorporal = MC.getChildText("massaCorporal");
      estatura = MC.getChildText("estatura");
      envergadura = MC.getChildText("envergadura");
         
      instMC = new MedidaCrescimento(data, nomeTeste, massaCorporal, estatura, envergadura);
      medida.add(instMC);
     
    }
View Full Code Here

   
   
 
  public Element exportarAlunoXML(){
    int i;
    Element alunoXML = new Element("aluno");
   
    Element alunoNome = new Element("nome");
    alunoNome.setText(nome);
    alunoXML.addContent(alunoNome);
   
    Element alunoDataNascimento = new Element("dataNascimento");
    alunoDataNascimento.setText(dataNascimento);
    alunoXML.addContent(alunoDataNascimento);
   
    if((nomeMae != null) && (!nomeMae.isEmpty())
    && (nomeMae.length() != 0)){
      Element alunoNomeMae = new Element("nomeMae");
      alunoNomeMae.setText(nomeMae);
      alunoXML.addContent(alunoNomeMae);
    }
   
    if((nomePai != null) && (!nomePai.isEmpty())
    && (nomePai.length() != 0)){
      Element alunoNomePai = new Element("nomePai");
      alunoNomePai.setText(nomePai)
      alunoXML.addContent(alunoNomePai);     
    }
   
    if((endereco != null) && (!endereco.isEmpty()) &&
    (endereco.length() != 0)){
      Element alunoEndereco = new Element("endereco");
      alunoEndereco.setText(endereco)
      alunoXML.addContent(alunoEndereco);
    }
   
    if((registroGeral != null) && (!registroGeral.isEmpty()) &&
    (registroGeral.length() != 0)){
      Element alunoRegistroGeral = new Element("registroGeral");
      alunoRegistroGeral.setText(registroGeral);
      alunoXML.addContent(alunoRegistroGeral);   
    }
   
    if((cadPessoaFisica != null) && (!cadPessoaFisica.isEmpty()) &&
    (nomeMae.length() != 0)){
      Element alunoCadPessoaFisica = new Element("cadPessoaFisica");
      alunoCadPessoaFisica.setText(cadPessoaFisica);
      alunoXML.addContent(alunoCadPessoaFisica);   
    }

    Element alunoGenero = new Element("genero");
    alunoGenero.setText(genero);
    alunoXML.addContent(alunoGenero);
   
    if((testAptSaude.size() == testAptEsp.size()) &&
    (testAptEsp.size() == medida.size())){     
      for(i=0;i<medida.size();i++){
        Element testeXML = new Element("teste");
       
        Element testeNome = new Element("nome");
        testeNome.setText(medida.get(i).getNome());
        testeXML.addContent(testeNome);
       
        Element testeData = new Element("data");
        testeData.setText(medida.get(i).getData());
        testeXML.addContent(testeData);
       
        Element testeAptSaudeXML;
        testeAptSaudeXML = testAptSaude.get(i).exportarTesteAptidaoSaudeXML();
        testeXML.addContent(testeAptSaudeXML);
       
        Element testeAptEsportivoXML;
        testeAptEsportivoXML = testAptEsp.get(i).exportarTesteAptidaoEsportivaXML();
        testeXML.addContent(testeAptEsportivoXML);
       
        Element testeMedidaCrescXML;
        testeMedidaCrescXML = medida.get(i).exportarMedidaCrescimentoXML();
        testeXML.addContent(testeMedidaCrescXML);

        alunoXML.addContent(testeXML);
      }
View Full Code Here

      }
    }
  }
 
  public Element exportarMedidaCrescimentoXML(){
    Element testeXML = new Element("medidaCrescimento");
   
    if((getMassaCorporal() != null) && (!getMassaCorporal().isEmpty())
    && (getMassaCorporal().length() != 0)){
      Element massaCorporalXML = new Element("massaCorporal");
      massaCorporalXML.setText(getMassaCorporal());
      testeXML.addContent(massaCorporalXML);   
    }
     
    if((getEstatura() != null) && (!getEstatura().isEmpty())
    && (getEstatura().length() != 0)){
      Element estaturaXML = new Element("estatura");
      estaturaXML.setText(getEstatura());
      testeXML.addContent(estaturaXML);   
    }
   
    if((getEnvergadura() != null) && (!getEnvergadura().isEmpty())
    && (getEnvergadura().length() != 0)){
      Element envergaduraXML = new Element("envergadura");
      envergaduraXML.setText(getEnvergadura());
      testeXML.addContent(envergaduraXML);     
    }
    return testeXML;   
  }
View Full Code Here

            httpclient.executeMethod(get);
           
            final String xml = get.getResponseBodyAsString();
            final SAXBuilder builder = new SAXBuilder();
            Document doc = builder.build(new StringReader(xml));
            Element root = doc.getRootElement();
            String lat = root.getChild("result").getChild("geometry").getChild("location").getChildTextTrim("lat");
            String lon = root.getChild("result").getChild("geometry").getChild("location").getChildTextTrim("lng");
            return Location.fromString(lat + ";" + lon);
        } catch (Exception ex) {
            return null;
        }
  }
View Full Code Here

                try
                {
                    String content = ReleaseUtil.readXmlFile(pomFile, ls);
                    SAXBuilder builder = new SAXBuilder();
                    Document document = builder.build(new StringReader( content ));
                    Element root = document.getRootElement();

                    Element scmElement = root.getChild("scm", getNamespaceOrNull(root));

                    if(null != scmElement)
                    {
                        String scmUrl = (null != scm.getDeveloperConnection()) ? scm.getDeveloperConnection() : scm.getConnection();
View Full Code Here

                File file = new File(filename);
                if(!file.exists())
                {
                    throw new FileNotFoundException(filename);
                }
                Element root = builder.build(file).getRootElement();
                int player_id = getPlayerId(root,player);
                role = getRole(root,player_id);
                for(Element e : root.getChild("history").getChildren("step"))
                {
                    String s = e.getChildren("step-number").get(0).getText();
                    int stepnum = Integer.parseInt(s);
                    String action_term = e.getChildren("move").get(player_id).getText();
                    GroundFact fact = createAction(action_term,role);
                    actions.put(stepnum, new SerializableAction(fact));
                }
            }
           
            // Register the state-action couples by browsing the step_x.xml
            // files in the right order.
            int step = 1;
            while(true)
            {
                String filename = getStateFilename(location,step);
                File file = new File(filename);
               
                if(!file.exists())
                {
                    break;
                }
               
                Element root = builder.build(file).getRootElement();
                List<Element> states = root.getChildren("state");
                SerializableState state = getState(states.get(0));
                SerializableAction action = actions.get(step);
                if(action != null)
                {
                    transitions.add(new Transition(state,action));
View Full Code Here

TOP

Related Classes of ca.odell.glazedlists.impl.adt.barcode2.Element

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.