Package org.apache.turbine.torque.engine.database.transform

Examples of org.apache.turbine.torque.engine.database.transform.XmlToAppData


        /*
         * Transform the XML database schema into an
         * object that represents our model.
         */
        XmlToAppData xmlParser = new XmlToAppData();
        app = xmlParser.parseFile(xmlFile);

        /*
         * Place our model in the context.
         */
        context.put("appData", app);
View Full Code Here


        /*
         * Transform the XML database schema into an
         * object that represents our model.
         */
        XmlToAppData xmlParser = new XmlToAppData();
        app = xmlParser.parseFile(xmlFile);

        Database db = app.getDatabase(databaseName);
        if (db == null)
        {
            db = app.getDatabases()[0];
View Full Code Here

        /*
         * Transform the XML database schema into an
         * object that represents our model.
         */
        XmlToAppData xmlParser = new XmlToAppData();
        app = xmlParser.parseFile(xmlFile);

        /*
         * Place our model in the context.
         */
        Database dbm = app.getDatabase(databaseName);
View Full Code Here

        /*
         * Build our application model from the
         * XML schema. Can someone document the
         * double pass here?
         */
        XmlToAppData xmlParser = new XmlToAppData();
       
        app = xmlParser.parseFile(xmlFile);
        xmlParser.parseFile(xmlFile);
       
        /*
         * Place some initial values in the context.
         * most of these could be automatically fed
         * into the context with the contextProperties
View Full Code Here

       
        /*
         * Transform the XML database schema into an
         * object that represents our model.
         */
        XmlToAppData xmlParser = new XmlToAppData();
        app = xmlParser.parseFile(xmlFile);
       
        /*
         * Place our model in the context.
         */
        context.put("appData", app);
View Full Code Here

       
        /*
         * Transform the XML database schema into an
         * object that represents our model.
         */
        XmlToAppData xmlParser = new XmlToAppData();
        app = xmlParser.parseFile(xmlFile);

        Database db = app.getDatabase(databaseName);
        if (db==null)
        {
            db = app.getDatabases()[0];
View Full Code Here

        /*
         * Transform the XML database schema into an
         * object that represents our model.
         */
        XmlToAppData xmlParser = new XmlToAppData();
        app = xmlParser.parseFile(xmlFile);

        /*
         * Place our model in the context.
         */
        Database dbm = app.getDatabase(databaseName);
View Full Code Here

       
        /*
         * Transform the XML database schema into an
         * object that represents our model.
         */
        XmlToAppData xmlParser = new XmlToAppData();
        app = xmlParser.parseFile(xmlFile);
       
        /*
         * Place our model in the context.
         */
        context.put("appData", app);
View Full Code Here

     * @return  Description of the Returned Value
     */
    public Context initControlContext()
        throws Exception
    {
        XmlToAppData xmlParser;

        if (xmlFile == null && filesets.isEmpty())
        {
            throw new BuildException("You must specify an XML schema or " +
                "fileset of XML schemas!");
        }

        if (xmlFile != null)
        {
            // Transform the XML database schema into
            // data model object.
            xmlParser = new XmlToAppData();
            AppData ad = xmlParser.parseFile(xmlFile);
            xmlParser.parseFile(xmlFile);
            ad.setName(grokName(xmlFile));
            dataModels.addElement(ad);
        }
        else
        {
            // Deal with the filesets.
            for (int i = 0; i < filesets.size(); i++)
            {
                FileSet fs = (FileSet) filesets.elementAt(i);
                DirectoryScanner ds = fs.getDirectoryScanner(project);
                File srcDir = fs.getDir(project);

                String[] dataModelFiles = ds.getIncludedFiles();

                // Make a transaction for each file
                for (int j = 0; j < dataModelFiles.length; j++)
                {
                    File f = new File(srcDir, dataModelFiles[j]);
                    xmlParser = new XmlToAppData();
                    AppData ad = xmlParser.parseFile(f.toString());
                    xmlParser.parseFile(f.toString());
                    ad.setName(grokName(f.toString()));
                    dataModels.addElement(ad);
                }
            }
        }
View Full Code Here

        /*
         * Transform the XML database schema into an
         * object that represents our model.
         */
        XmlToAppData xmlParser = new XmlToAppData();
        app = xmlParser.parseFile(xmlFile);

        /*
         * Place our model in the context.
         */
        Database dbm = app.getDatabase(databaseName);
View Full Code Here

TOP

Related Classes of org.apache.turbine.torque.engine.database.transform.XmlToAppData

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.