jvanzyl     01/10/27 12:24:40

  Modified:    src/java/org/apache/torque/task TorqueDataModelTask.java
  Log:
  - some notes on the naming of the schema. this will have to be
    fixed eventually but it's there as a part of the multiple
    database support. the various versions of the tdk will move to
    using the decoupled torque so it can be focused on.
  
  Revision  Changes    Path
  1.5       +15 -1     
jakarta-turbine-torque/src/java/org/apache/torque/task/TorqueDataModelTask.java
  
  Index: TorqueDataModelTask.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-turbine-torque/src/java/org/apache/torque/task/TorqueDataModelTask.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- TorqueDataModelTask.java  2001/10/27 19:04:38     1.4
  +++ TorqueDataModelTask.java  2001/10/27 19:24:40     1.5
  @@ -217,9 +217,15 @@
               xmlParser = new XmlToAppData();
               AppData ad = xmlParser.parseFile(xmlFile);
               xmlParser.parseFile(xmlFile);
  +            
  +            // This can't be set from the file name as it is an
  +            // unreliable method of naming the descriptor. Not everyone
  +            // uses the same method as I do in the TDK. jvz.
  +            
               String name = xmlFile.substring(
                   xmlFile.lastIndexOf(System.getProperty("file.separator"))+1,
                       xmlFile.indexOf("."));
  +            
               ad.setName(name);
               dataModels.addElement(ad);
           } 
  @@ -242,8 +248,16 @@
                           new File(srcDir, dataModelFiles[j]).toString());
                       xmlParser.parseFile(
                           new File(srcDir, dataModelFiles[j]).toString());
  +
  +                    // This can't be set from the file name as it is an
  +                    // unreliable method of naming the descriptor. Not everyone
  +                    // uses the same method as I do in the TDK. jvz.
                       
  -                    
ad.setName(dataModelFiles[j].substring(0,dataModelFiles[j].indexOf(".")));
  +                    String name = xmlFile.substring(
  +                        xmlFile.lastIndexOf(System.getProperty("file.separator"))+1,
  +                            xmlFile.indexOf("."));
  +
  +                    ad.setName(name);
                       dataModels.addElement(ad);
                   }
               }
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to