Examples of AppData


Examples of org.apache.turbine.torque.engine.database.model.AppData

        try
        {
            System.out.println ("Parsing SQL Schema");

            SQLToAppData sqlParser = new SQLToAppData(inputFile);
            AppData app = sqlParser.execute();

            System.out.println ("Preparing to write xml schema");
            FileWriter fr = new FileWriter (outputFile);
            BufferedWriter br = new BufferedWriter (fr);

            br.write (app.toString());

            System.out.println ("Writing xml schema");

            br.flush();
            br.close();
View Full Code Here

Examples of org.apache.turbine.torque.engine.database.model.AppData

    public Context initControlContext()
        throws Exception
    {
        super.initControlContext();

        AppData app = (AppData) getDataModels().elementAt(0);
        Database db = app.getDatabase();

        try
        {
            XmlToData dataXmlParser = new XmlToData(db, dataDTD);
            List data = dataXmlParser.parseFile(dataXmlFile);
View Full Code Here

Examples of org.apache.turbine.torque.engine.database.model.AppData

        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);
                }
            }
        }

        Iterator i = dataModels.iterator();
        databaseNames = new Hashtable();
        dataModelDbMap = new Hashtable();

        // Different datamodels may state the same database
        // names, we just want the unique names of databases.
        while (i.hasNext())
        {
            AppData ad = (AppData) i.next();
            Database database = ad.getDatabase();
            databaseNames.put(database.getName(), database.getName());
            dataModelDbMap.put(ad.getName(), database.getName());
        }

        // Create a new Velocity context.
        context = new VelocityContext();
View Full Code Here

Examples of org.apache.turbine.torque.engine.database.model.AppData

     * Execute the parser.
     */
    public AppData execute() throws IOException, ParseException
    {
        count = 0;
        appData = new AppData();
        appDataDB = new Database();
        appData.addDatabase(appDataDB);

        FileReader fr = new FileReader (sqlFile);
        BufferedReader br = new BufferedReader (fr);
View Full Code Here

Examples of org.apache.turbine.torque.engine.database.model.AppData

     * Just 4 testing.
     */
    public static void main (String args[]) throws Exception
    {
        SQLToAppData s2a = new SQLToAppData (args[0]);
        AppData ad = s2a.execute();
        System.out.println (ad);
    }
View Full Code Here

Examples of org.eurekastreams.server.domain.AppData

     * Simple test for dataset setup.
     */
    @Test
    public void testDatasetSetup()
    {
        AppData testAppData = jpaAppDataMapper.findById(new Long(testAppDataId));
        assertEquals("Person is not correct for retrieved AppData", testPersonId, testAppData.getPerson().getId());
        assertEquals("Viewcount is incorrect for retrieved AppData", "2", testAppData.getValues().get("viewcount"));
        assertEquals("Answer to question1answer is incorrect for retrieved AppData", "true", testAppData.getValues()
                .get("question1answer"));
    }
View Full Code Here

Examples of org.ogce.xregistry.doc.AppData

      if (xregAppDesc != null) {
        List<AppData> appDescList = new ArrayList<AppData>();
        for (int i = 0; i < xregAppDesc.length; i++) {
          try {
            FindAppDescResponseDocument.FindAppDescResponse.AppData xbeansData = xregAppDesc[i];
            AppData resultAppData = new AppData(xbeansData.getName(), xbeansData.getOwner(), xbeansData.getHostName());
            resultAppData.allowedAction = xbeansData.getAllowedAction();
            resultAppData.resourceID = xbeansData.getName();
            appDescList.add(resultAppData);
          } catch (XmlValueOutOfRangeException e) {
            throw new GfacException("Problem with retrieving object : " + e.getLocalizedMessage(), FaultCode.ErrorAtDependentService);
View Full Code Here

Examples of org.ogce.xregistry.doc.AppData

      if (xregAppDesc != null) {
        List<AppData> appDescList = new ArrayList<AppData>();
        for (int i = 0; i < xregAppDesc.length; i++) {
          try {
            xregistry.generated.FindAppDescResponseDocument.FindAppDescResponse.AppData xbeansData = xregAppDesc[i];
            AppData resultAppData = new AppData(xbeansData.getName(), xbeansData.getOwner(), xbeansData.getHostName());
            resultAppData.allowedAction = xbeansData.getAllowedAction();
            resultAppData.resourceID = xbeansData.getName();
            appDescList.add(resultAppData);
          } catch (XmlValueOutOfRangeException e) {
            throw new GfacException("Problem with retrieving object : " + e.getLocalizedMessage(), FaultCode.ErrorAtDependentService);
View Full Code Here

Examples of org.opensocial.models.AppData

      Client client = new Client(new OrkutSandboxProvider(useRest),
          new OAuth2LeggedScheme(ORKUT_KEY, ORKUT_SECRET, ORKUT_ID));
      Request request = AppDataService.getAppData();
      Response response = client.send(request);

      AppData data = response.getEntry();
      assertTrue(data.hasField(ORKUT_ID));
    } catch (Exception e) {
      fail("Exception occurred while processing request");
    }
  }
View Full Code Here

Examples of org.opensocial.models.AppData

    try {
      Request request = AppDataService.getAppData();
      Response response = client.send(request);

      AppData data = response.getEntry();
      assertTrue(data.getDataForUser(ORKUT_ID, "key").equals(randomValue));
    } catch (Exception e) {
      fail("Exception occurred while processing retrieve request");
    }

    try {
      Request request = AppDataService.deleteAppData("key");
      client.send(request);
    } catch (Exception e) {
      fail("Exception occurred while processing delete request");
    }

    try {
      Request request = AppDataService.getAppData();
      Response response = client.send(request);

      AppData data = response.getEntry();
      assertTrue(data.hasField(ORKUT_ID));
      assertTrue(data.getDataForUser(ORKUT_ID, "key") == null);
      assertTrue(data.getDataForUser(ORKUT_ID, "java") != null);
    } catch (Exception e) {
      fail("Exception occurred while processing retrieve request");
    }
  }
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.