Diff for /FM2SQL/Attic/Convert.java between versions 1.3 and 1.4

version 1.3, 2004/01/08 10:31:18 version 1.4, 2004/01/08 11:03:12
Line 622  class Convert Line 622  class Convert
     }      }
     else if (alterMe.charAt(j) == '.')      else if (alterMe.charAt(j) == '.')
     {      {
       System.out.println("dube "+alterMe);  
       if(j==length-1)        if(j==length-1)
       {        {
         alterMe.delete(j, j);           alterMe.delete(j, j); 
         length--;          length--;
         continue;  
       }        }
     }      }
   
Line 635  class Convert Line 633  class Convert
   }    }
     return alterMe.toString();      return alterMe.toString();
   }    }
     public static String convertToEntities(String newName)
     {
       StringBuffer alterMe = new StringBuffer(newName.trim());
       int length = alterMe.length();
       int j = 0;
   
       while (j < length)
       {
   
         if (alterMe.charAt(j) == '>')
         {
           alterMe.setCharAt(j, '&');
           alterMe.insert(j + 1, "gt;");
           length = length + 2;
           if (j < length - 1)
             j = j + 1;
   
         } else if (alterMe.charAt(j) == '<')
         {
           alterMe.setCharAt(j, '&');
           alterMe.insert(j + 1, "lt;");
           length = length + 2;
           if (j < length - 1)
             j = j + 1;
   
         }
         ++j;
       }
       return alterMe.toString();
     }
   public static String convertUml(String newName)    public static String convertUml(String newName)
    {     {
      StringBuffer alterMe = new StringBuffer(newName.trim());       StringBuffer alterMe = new StringBuffer(newName.trim());
Line 749  class Convert Line 777  class Convert
     {      {
       boolean finished = false;        boolean finished = false;
       // parse string and build document tree        // parse string and build document tree
       Node  root = new Xparse().parse(sb.toString());        Xparse parser =new Xparse();
         parser.changeEntities = true;
         Node  root = parser.parse(sb.toString());
        // printContents(root);         // printContents(root);
       Vector databases= new Vector();        Vector databases= new Vector();
       Vector tables = new Vector();        Vector tables = new Vector();
Line 964  class Convert Line 994  class Convert
       
        boolean finished = false;         boolean finished = false;
        // parse string and build document tree         // parse string and build document tree
        Node  root = new Xparse().parse(sb.toString());         Xparse parser =new Xparse();
          parser.changeEntities = true;
          Node  root = parser.parse(sb.toString());
         // printContents(root);          // printContents(root);
        Vector databases= new Vector();         Vector databases= new Vector();
        Vector tables = new Vector();         Vector tables = new Vector();
Line 1159  public static class DataBase Line 1191  public static class DataBase
        String create=(String)creates.get(index);         String create=(String)creates.get(index);
         
        buffr.write("      <table name = \""+table+"\" layout = \""+layout+"\">\n");         buffr.write("      <table name = \""+table+"\" layout = \""+layout+"\">\n");
        buffr.write("         <select>"+select+"</select>\n");         buffr.write("         <select>"+ convertToEntities(select)+"</select>\n");
        if(!create.equals(""))         if(!create.equals(""))
        buffr.write("         <create>"+create+"         </create>\n");          buffr.write("         <create>"+create+"         </create>\n"); 
        buffr.write("      </table>\n");         buffr.write("      </table>\n");

Removed from v.1.3  
changed lines
  Added in v.1.4


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>