Package org.gdbms.engine.data.file

Examples of org.gdbms.engine.data.file.FileSourceDefinition


      createDataBase(basedir);
     
      createFiles(basedir);

    //Setup de las tablas
    dsf.registerDataSource("persona", new FileSourceDefinition(new File(basedir + "/src/test/resources/persona.csvf")));
    dsf.registerDataSource("sort", new FileSourceDefinition(basedir + "/src/test/resources/sort.csv"));
    dsf.registerDataSource("hsqldbpersona", new DBTableSourceDefinition(new DBSource(null, 0, basedir + "/src/test/resources/testdb", "sa", "",
        "persona", "jdbc:hsqldb:file")));
    dsf.registerDataSource("hsqldbpersonatransactional", new DBTableSourceDefinition(new DBSource(null, 0, basedir + "/src/test/resources/testdb", "sa", "",
        "persona", "jdbc:hsqldb:file")));
    dsf.registerDataSource("hsqldbapellido", new DBQuerySourceDefinition(new DBSource(null, 0,
            basedir + "/src/test/resources/testdb", "sa", "", null, "jdbc:hsqldb:file"), "select apellido from persona"));
    dsf.registerDataSource("nulos", new FileSourceDefinition(basedir + "/src/test/resources/nulos.csv"));
   
        dsf.registerDataSource("points0", new SpatialDBTableSourceDefinition(new DBSpatialSource("127.0.0.1", 5432,
                "orbiscad", "postgres", "", "points0", "the_geom", "jdbc:postgresql")));
        dsf.registerDataSource("pgWithGDBMS", new SpatialDBTableSourceDefinition(new DBSpatialSource("127.0.0.1", 5432,
                "orbiscad", "postgres", "", "polygon0", "the_geom", "jdbc:postgresql")));
View Full Code Here


        DefaultDriverMetadata ddm = new DefaultDriverMetadata();
        ddm.addField("id", "STRING");
        ddm.addField("nombre", "STRING");
        ds.createDataSource(new FileSourceCreation(new File(path),
                ddm));
        ds.registerDataSource("persona_created", new FileSourceDefinition(path));
       
        Value v1 = ValueFactory.createValue("Fernando");
        Value v2 = ValueFactory.createValue("Gonz�lez");

        DataSource d = ds.getDataSource("persona_created");
View Full Code Here

        DefaultDriverMetadata ddm = new DefaultDriverMetadata();
        ddm.addField("id", "STRING");
        ddm.addField("name", "STRING");
        DataSourceCreation dsc = new FileSourceCreation(new File("src/test/resources/nuevo.csv"), ddm);
        ds.createDataSource(dsc);
        DataSourceDefinition dsd = new FileSourceDefinition("src/test/resources/nuevo.csv");
        ds.registerDataSource("nuevo", dsd);
        DataSource nuevo = ds.getDataSource("nuevo");
        nuevo.beginTrans();
        nuevo.insertFilledRow(new Value[] {ValueFactory.createValue("0"), ValueFactory.createValue("fernan")});
        nuevo.insertFilledRow(new Value[] {ValueFactory.createValue("1"), ValueFactory.createValue("paco")});
        nuevo.commitTrans();
       
        DataSourceCreation dsc2 = new FileSourceCreation(new File("src/test/resources/nuevo2.csv"), ddm);
        ds.createDataSource(dsc2);
        DataSourceDefinition dsd2 = new FileSourceDefinition("src/test/resources/nuevo2.csv");
        ds.registerDataSource("nuevo2", dsd2);
        DataSource nuevo2 = ds.getDataSource("nuevo2");
       
        nuevo2.saveData(nuevo);
        nuevo2.start();
View Full Code Here

    ds = new DataSourceFactory();
    ds.setDriverManager(dm);

    // Setup de las tablas
    ds.registerDataSource("persona",
        new FileSourceDefinition("persona.csv"));
    ds.registerDataSource("coche", new FileSourceDefinition("coche.csv"));
    ds
        .registerDataSource(
            "provin",
            new FileSourceDefinition(
                "C:\\Documents and Settings\\fernando\\Mis documentos\\province.dbf"));
    ds.registerDataSource("vias", new FileSourceDefinition(
        "/root/cartografia/win/vias.dbf"));

    // addDataSource(new FooReadDriver(), "foo");
    /*
     * addDBDataSource("mysql", "192.168.0.1", -1, "root", "root", "mysql",
View Full Code Here

   * @throws DataSourceCreationException
   *             If the instance creation fails
   */
  public AlphanumericDataSource getAlphanumericDataSource(File file)
      throws DriverLoadException, DataSourceCreationException {
    FileSourceDefinition fsd = new FileSourceDefinition(file);
    String name = nameAndRegisterDataSource(fsd);
    try {
      return (AlphanumericDataSource) getDataSource(name);
    } catch (NoSuchTableException e) {
      throw new RuntimeException(e);
View Full Code Here

TOP

Related Classes of org.gdbms.engine.data.file.FileSourceDefinition

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.