Skip to content
This repository has been archived by the owner on Jan 3, 2021. It is now read-only.

Commit

Permalink
Bugfix for problem introduced by previous commit
Browse files Browse the repository at this point in the history
  • Loading branch information
cyganiak committed Aug 31, 2006
1 parent 2cfd50d commit 1ed6866
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/de/fuberlin/wiwiss/d2rq/mapgen/MappingGenerator.java
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ private void run() {
}

private void writeDatabase() {
this.out.println(":database a d2rq:Database;");
this.out.println(databaseName() + " a d2rq:Database;");
this.out.println("\td2rq:jdbcDriver \"" + this.driverClass + "\";");
this.out.println("\td2rq:jdbcDSN \"" + this.jdbcURL + "\";");
if (this.databaseUser != null) {
Expand All @@ -161,7 +161,7 @@ private void writeDatabase() {
public void writeTable(String tableName) {
this.out.println("# Table " + tableName);
this.out.println(classMapName(tableName) + " a d2rq:ClassMap;");
this.out.println("\td2rq:dataStorage :database;");
this.out.println("\td2rq:dataStorage " + databaseName() + ";");
if (!hasPrimaryKey(tableName)) {
this.out.println("\t# Sorry, I don't know which columns to put into the uriPattern");
this.out.println("\t# because the table doesn't have a primary key");
Expand Down Expand Up @@ -259,6 +259,10 @@ private void writeLink(String linkTableName) {
createLinkProperty(linkTableName, firstForeignColumn.getTableName(), secondForeignColumn.getTableName());
}

private String databaseName() {
return "map:database";
}

private String classMapName(String tableName) {
return "map:" + tableName;
}
Expand Down

0 comments on commit 1ed6866

Please sign in to comment.