Package de.fuberlin.wiwiss.d2rq.sql

Examples of de.fuberlin.wiwiss.d2rq.sql.ConnectedDB


          D2RQException.PROPERTYBRIDGE_NONLITERAL_WITH_LANG);
    }
  }

  protected Relation buildRelation() {
    ConnectedDB database = belongsToClassMap.database().connectedDB();
    RelationBuilder builder = belongsToClassMap.relationBuilder(database);
    builder.addOther(relationBuilder(database));
    if (this.refersToClassMap != null) {
      builder.addAliased(this.refersToClassMap.relationBuilder(database));
    }
View Full Code Here


    this.resultSizeLimit = value;
  }
 
  private ConnectedDB getConnectedDB() {
    if (connectedDB == null) {
      connectedDB = new ConnectedDB(jdbcURL, username, password);
      if (sqlScript != null) {
        try {
          SQLScriptLoader.loadFile(new File(sqlScript), connectedDB.connection());
        } catch (IOException ex) {
          connectedDB.close();
View Full Code Here

  }
 
  public void testFindTableWithSchemaInspector() {
    DatabaseSchemaInspector schema =
      new DatabaseSchemaInspector(
          new ConnectedDB(
              db.getJdbcURL(), db.getUser(), db.getPassword()));
    assertEquals(new ArrayList<RelationName>() {{
          add(new RelationName(null, "TEST"));
        }}, schema.listTableNames(null));
  }
View Full Code Here

        Node.createURI(EX + "test/1"), RDF.Nodes.type, Node.createURI(EX + "Test")));
    assertEquals(1, g.size());
  }
 
  private Model generateDefaultMappingModel() {
    ConnectedDB cdb = new ConnectedDB(db.getJdbcURL(), db.getUser(), null);
    MappingGenerator generator = new MappingGenerator(cdb);
    return generator.mappingModel(EX);
  }
View Full Code Here

  public ConnectedDB connectedDB() {
    if (this.connection == null) {
      if (jdbcDriver != null) {
        ConnectedDB.registerJDBCDriver(jdbcDriver);
      }
      connection = new ConnectedDB(jdbcDSN, username, password,
          columnTypes, limit, fetchSize, connectionProperties);
      if (startupSQLScript != null) {
        try {
          URI url = URI.create(startupSQLScript);
          SQLScriptLoader.loadURI(url, connection.connection());
View Full Code Here

   */
  private Relation joinRelations(Collection<Relation> relations, Expression additionalCondition) {
    if (relations.isEmpty()) {
      return Relation.TRUE;
    }
    ConnectedDB connectedDB = ((Relation) relations.iterator().next()).database();
    AliasMap joinedAliases = AliasMap.NO_ALIASES;
    Collection<Expression> expressions = new HashSet<Expression>();
    expressions.add(additionalCondition);
    Collection<Expression> softConditions = new HashSet<Expression>();
    Set<Join> joins = new HashSet<Join>();
View Full Code Here

 
  private ConnectedDB db;
 
  public void setUp() throws Exception {
    Class.forName(driverClass);
    db = new ConnectedDB(jdbcURL, null, null);
  }
View Full Code Here

TOP

Related Classes of de.fuberlin.wiwiss.d2rq.sql.ConnectedDB

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.