Skip to content

Commit

Permalink
fix of determining ADE database objects in graph
Browse files Browse the repository at this point in the history
  • Loading branch information
Zhihang Yao committed Apr 17, 2019
1 parent 424290b commit b4cde22
Show file tree
Hide file tree
Showing 3 changed files with 2,123 additions and 1,979 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -340,7 +340,8 @@ private void shrotenDatabaseObjectName() {
String originalDatabaseObjectName = (String) attr.getValueAt("name");
String shortenedName = null;
if (nodeTypeName.equalsIgnoreCase(GraphNodeArcType.DataTable) || nodeTypeName.equalsIgnoreCase(GraphNodeArcType.JoinTable)) {
if (!ADEschemaHelper.CityDB_Tables.containsValue(originalDatabaseObjectName)) {
boolean isADETable = (boolean) attr.getValueAt("isADE");
if (isADETable) {
shortenedName = NameShortener.shortenDbObjectName(originalDatabaseObjectName, maxTableNameLengthWithPrefix);
shortenedName = prefix + "_" + shortenedName;
shortenedName = this.processDuplicatedDbName(dbTableNameList, shortenedName, GlobalConstants.MAX_TABLE_NAME_LENGTH, 0);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -597,7 +597,9 @@ private void createTableForCityGMLClass(String citygmlNamespaceUri, String class

ValueMember attr1 = (ValueMember) valueTuple.getValueMemberAt("name");
attr1.setExprAsObject(ADEschemaHelper.CityDB_Tables.get(new QName(citygmlNamespaceUri, className)));

ValueMember attr2 = (ValueMember) valueTuple.getValueMemberAt("isADE");
attr2.setExprAsObject(false);

// create a primary key column linking with the class table
Node pkColumnNode = this.createNode(GraphNodeArcType.PrimaryKeyColumn);
this.createArc(GraphNodeArcType.BelongsTo, pkColumnNode, tableNode);
Expand Down
Loading

0 comments on commit b4cde22

Please sign in to comment.