Examples of Acteurs


Examples of com.vgo.movie.domain.Acteurs

          for(int j = 0; j< tmpDivNodeContent.size(); j++){
            tmpNode = tmpDivNodeContent.elementAt(j);

            if(tmpNode.toHtml().indexOf("alt=\"Cast\"") > -1 && !acteursVu){
              LinkedList<Acteurs> tmpListActeur = new LinkedList<Acteurs>();
              Acteurs tmpActeur = null;

              String tmpContenu = tmpNode.toHtml().toString();
              if(tmpContenu.indexOf("<table class=\"cast\">") >-1 && tmpContenu.indexOf("<table class=\"cast\">") < tmpContenu.indexOf("</table>",tmpContenu.indexOf("<table class=\"cast\">"))){
                tmpContenu = tmpContenu.substring(tmpContenu.indexOf("<table class=\"cast\">"),tmpContenu.indexOf("</table>",tmpContenu.indexOf("<table class=\"cast\">")));
                String tmpLigne = null;
                indexDeb = 0;
                indexFin = 0;

                while(tmpContenu.indexOf("<tr class=\"odd\">") > -1 || tmpContenu.indexOf("<tr class=\"even\">") > -1){
                  indexDeb = tmpContenu.indexOf("<tr class=");
                  indexFin = tmpContenu.indexOf("</tr>", indexDeb+3)+5;

                  tmpLigne = tmpContenu.substring(indexDeb, indexFin);
                  tmpActeur = new Acteurs();

                  try {
                    indexDeb = tmpLigne.indexOf("<img src=\"") + 10 ;
                    indexFin = tmpLigne.indexOf("\"", indexDeb);                 
                    tmpActeur.setImage(tmpLigne.substring(indexDeb, indexFin));                 

                    indexDeb = tmpLigne.indexOf("\">",tmpLigne.indexOf("<td class=\"nm\"><a href=\"")+18) + 2;
                    indexFin = tmpLigne.indexOf("</a></td>", indexDeb);                 
                    tmpActeur.setActeur(replaceHtmlCode(tmpLigne.substring(indexDeb, indexFin)));

                    indexDeb = tmpLigne.indexOf("<td class=\"char\">")+ 17;
                    indexFin = tmpLigne.indexOf("</td>", indexDeb);                 
                    tmpActeur.setPersonnage(replaceHtmlCode(tmpLigne.substring(indexDeb, indexFin)));

                    tmpListActeur.add(tmpActeur);
                  } catch (IndexOutOfBoundsException e) {
                    //do nothing
                  }             
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.