Package org.gdbms.engine.data.db

Examples of org.gdbms.engine.data.db.DBTableSourceDefinition


      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")));
   
    dsf.registerDataSource("foo", new DBTableSourceDefinition(new DBSource(null, 0, null, null, null, null, "jdbc:foo")));
    dsf.registerDataSource("shppuntos", new SpatialFileSourceDefinition(basedir + "/src/test/resources/puntos.shp"));
    dsf.registerDataSource("shplineas", new SpatialFileSourceDefinition(basedir + "/src/test/resources/lineas.shp"));
    dsf.registerDataSource("shppoligonos", new SpatialFileSourceDefinition(basedir + "/src/test/resources/poligonos.shp"));
    dsf.registerDataSource("dxfprueba", new SpatialFileSourceDefinition(basedir + "/src/test/resources/dxfprueba.dxf"));
    dsf.registerDataSource("spatialobjectpersona", new SpatialObjectSourceDefinition(new FakeSpatialObjectDriver()));
View Full Code Here


        ddm.addField("texto2", "CHAR");
        ddm.setPrimaryKey(new String[]{"entero"});
        DBSource dbsd = new DBSource(null, 0, "src/test/resources/testdb", "sa", "",
        "nuevo", "jdbc:hsqldb:file");
        ds.createDataSource(new DBSourceCreation(dbsd, ddm));
        ds.registerDataSource("nuevoDataSource", new DBTableSourceDefinition(dbsd));
        DataSource d = ds.getDataSource("nuevoDataSource");
        d.start();
        assertTrue(d.check(0, ValueFactory.createNullValue()) == null);
        assertTrue(d.check(0, ValueFactory.createValue("")) == null);
        assertTrue(d.check(0, ValueFactory.createValue("aa")) == null);
View Full Code Here

    /*
     * addDBDataSource("mysql", "192.168.0.1", -1, "root", "root", "mysql",
     * new String[]{"*"}, "user", null, "mysql");
     */

    ds.registerDataSource("pb", new DBTableSourceDefinition(new DBSource(
        "127.0.0.1", 5432, "sigusal", "root", "", "pbedifihistpol",
        "jdbc:postgresql")));
    ds.registerDataSource("person", new DBTableSourceDefinition(
        new DBSource("www.freesql.org", 3306, "fergonco", "fergonco",
            "fergonco", "person", "jdbc:mysql")));
    ds.registerDataSource("fernando", new DBTableSourceDefinition(
        new DBSource("www.freesql.org", 3306, "fergonco", "fergonco",
            "fergonco", "person", "mysql")));
    ds
        .registerDataSource(
            "ages",
View Full Code Here

   * @throws DataSourceCreationException
   *             If the instance creation fails
   */
  public AlphanumericDataSource getAlphanumericDataSource(DBSource dbSource)
      throws DriverLoadException, DataSourceCreationException {
    DBTableSourceDefinition fsd = new DBTableSourceDefinition(dbSource);
    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.db.DBTableSourceDefinition

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.