Loading src/adql/db/DBChecker.java +13 −19 Original line number Diff line number Diff line Loading @@ -23,7 +23,6 @@ import java.util.ArrayList; import java.util.Collection; import java.util.HashMap; import adql.db.exception.UnresolvedColumnException; import adql.db.exception.UnresolvedIdentifiersException; import adql.db.exception.UnresolvedTableException; Loading Loading @@ -71,7 +70,6 @@ public class DBChecker implements QueryChecker { /** List of all available tables ({@link DBTable}). */ protected SearchTableList lstTables; /* ************ */ /* CONSTRUCTORS */ /* ************ */ Loading @@ -91,7 +89,6 @@ public class DBChecker implements QueryChecker { setTables(tables); } /* ****** */ /* SETTER */ /* ****** */ Loading @@ -114,7 +111,6 @@ public class DBChecker implements QueryChecker { lstTables = new SearchTableList(tables); } /* ************* */ /* CHECK METHODS */ /* ************* */ Loading Loading @@ -363,7 +359,6 @@ public class DBChecker implements QueryChecker { } } /* ************************************* */ /* DBTABLE & DBCOLUMN GENERATION METHODS */ /* ************************************* */ Loading @@ -388,7 +383,6 @@ public class DBChecker implements QueryChecker { return dbTable; } /* *************** */ /* SEARCH HANDLERS */ /* *************** */ Loading src/adql/db/DefaultDBTable.java +36 −39 Original line number Diff line number Diff line Loading @@ -41,7 +41,6 @@ public class DefaultDBTable implements DBTable { protected HashMap<String,DBColumn> columns = new HashMap<String,DBColumn>(); /** * <p>Builds a default {@link DBTable} with the given DB name.</p> * Loading Loading @@ -111,9 +110,7 @@ public class DefaultDBTable implements DBTable { * @param dbName Database table name. * @param adqlName Table name used in ADQL queries. */ public DefaultDBTable(final String dbCatName, final String adqlCatName , final String dbSchemName, final String adqlSchemName , final String dbName, final String adqlName){ public DefaultDBTable(final String dbCatName, final String adqlCatName, final String dbSchemName, final String adqlSchemName, final String dbName, final String adqlName){ if (dbName == null || dbName.length() == 0) throw new NullPointerException("Missing DB name !"); Loading src/adql/db/SearchColumnList.java +16 −20 Original line number Diff line number Diff line Loading @@ -58,7 +58,6 @@ public class SearchColumnList extends TextualSearchList<DBColumn> { /** Case-insensitive dictionary of table aliases. (tablealias <-> List<TableName>) */ private final HashMap<String,ArrayList<String>> mapAliases = new HashMap<String,ArrayList<String>>(); /* ************ */ /* CONSTRUCTORS */ /* ************ */ Loading Loading @@ -87,7 +86,6 @@ public class SearchColumnList extends TextualSearchList<DBColumn> { super(initialCapacity, new DBColumnKeyExtractor()); } /* ******* */ /* GETTERS */ /* ******* */ Loading @@ -109,7 +107,6 @@ public class SearchColumnList extends TextualSearchList<DBColumn> { this.distinct = distinct; } /* ********************** */ /* TABLE ALIAS MANAGEMENT */ /* ********************** */ Loading Loading @@ -228,7 +225,8 @@ public class SearchColumnList extends TextualSearchList<DBColumn> { DBTable dbTable = match.getTable(); if (IdentifierField.TABLE.isCaseSensitive(caseSensitivity)){ String tableName = tableAliases.get(table); if (tableName == null) tableName = table; if (tableName == null) tableName = table; if (!dbTable.getADQLName().equals(tableName)) continue; }else{ Loading Loading @@ -289,7 +287,6 @@ public class SearchColumnList extends TextualSearchList<DBColumn> { } } /* ***************** */ /* INHERITED METHODS */ /* ***************** */ Loading Loading @@ -331,7 +328,6 @@ public class SearchColumnList extends TextualSearchList<DBColumn> { return changed; } /** * Lets extracting the key to associate with a given {@link DBColumn} instance. * Loading src/adql/db/SearchTableList.java +7 −11 Original line number Diff line number Diff line Loading @@ -43,7 +43,6 @@ public class SearchTableList extends TextualSearchList<DBTable> { /** Indicates whether multiple occurrences are allowed. */ private boolean distinct = false; /* ************ */ /* CONSTRUCTORS */ /* ************ */ Loading Loading @@ -72,7 +71,6 @@ public class SearchTableList extends TextualSearchList<DBTable> { super(initialCapacity, new DBTableKeyExtractor()); } /* ******* */ /* GETTERS */ /* ******* */ Loading Loading @@ -183,7 +181,6 @@ public class SearchTableList extends TextualSearchList<DBTable> { return tmpResult; } /* ***************** */ /* INHERITED METHODS */ /* ***************** */ Loading @@ -195,7 +192,6 @@ public class SearchTableList extends TextualSearchList<DBTable> { return super.add(item); } /** * Lets extracting a key to associate with a given {@link DBTable} instance. * Loading src/adql/db/exception/UnresolvedIdentifiersException.java +5 −7 Original line number Diff line number Diff line Loading @@ -123,6 +123,4 @@ public class UnresolvedIdentifiersException extends ParseException implements It return exceptions.size() + " unresolved identifiers" + ((unresolvedIdentifiers != null) ? (": " + unresolvedIdentifiers) : "") + " !"; } } Loading
src/adql/db/DBChecker.java +13 −19 Original line number Diff line number Diff line Loading @@ -23,7 +23,6 @@ import java.util.ArrayList; import java.util.Collection; import java.util.HashMap; import adql.db.exception.UnresolvedColumnException; import adql.db.exception.UnresolvedIdentifiersException; import adql.db.exception.UnresolvedTableException; Loading Loading @@ -71,7 +70,6 @@ public class DBChecker implements QueryChecker { /** List of all available tables ({@link DBTable}). */ protected SearchTableList lstTables; /* ************ */ /* CONSTRUCTORS */ /* ************ */ Loading @@ -91,7 +89,6 @@ public class DBChecker implements QueryChecker { setTables(tables); } /* ****** */ /* SETTER */ /* ****** */ Loading @@ -114,7 +111,6 @@ public class DBChecker implements QueryChecker { lstTables = new SearchTableList(tables); } /* ************* */ /* CHECK METHODS */ /* ************* */ Loading Loading @@ -363,7 +359,6 @@ public class DBChecker implements QueryChecker { } } /* ************************************* */ /* DBTABLE & DBCOLUMN GENERATION METHODS */ /* ************************************* */ Loading @@ -388,7 +383,6 @@ public class DBChecker implements QueryChecker { return dbTable; } /* *************** */ /* SEARCH HANDLERS */ /* *************** */ Loading
src/adql/db/DefaultDBTable.java +36 −39 Original line number Diff line number Diff line Loading @@ -41,7 +41,6 @@ public class DefaultDBTable implements DBTable { protected HashMap<String,DBColumn> columns = new HashMap<String,DBColumn>(); /** * <p>Builds a default {@link DBTable} with the given DB name.</p> * Loading Loading @@ -111,9 +110,7 @@ public class DefaultDBTable implements DBTable { * @param dbName Database table name. * @param adqlName Table name used in ADQL queries. */ public DefaultDBTable(final String dbCatName, final String adqlCatName , final String dbSchemName, final String adqlSchemName , final String dbName, final String adqlName){ public DefaultDBTable(final String dbCatName, final String adqlCatName, final String dbSchemName, final String adqlSchemName, final String dbName, final String adqlName){ if (dbName == null || dbName.length() == 0) throw new NullPointerException("Missing DB name !"); Loading
src/adql/db/SearchColumnList.java +16 −20 Original line number Diff line number Diff line Loading @@ -58,7 +58,6 @@ public class SearchColumnList extends TextualSearchList<DBColumn> { /** Case-insensitive dictionary of table aliases. (tablealias <-> List<TableName>) */ private final HashMap<String,ArrayList<String>> mapAliases = new HashMap<String,ArrayList<String>>(); /* ************ */ /* CONSTRUCTORS */ /* ************ */ Loading Loading @@ -87,7 +86,6 @@ public class SearchColumnList extends TextualSearchList<DBColumn> { super(initialCapacity, new DBColumnKeyExtractor()); } /* ******* */ /* GETTERS */ /* ******* */ Loading @@ -109,7 +107,6 @@ public class SearchColumnList extends TextualSearchList<DBColumn> { this.distinct = distinct; } /* ********************** */ /* TABLE ALIAS MANAGEMENT */ /* ********************** */ Loading Loading @@ -228,7 +225,8 @@ public class SearchColumnList extends TextualSearchList<DBColumn> { DBTable dbTable = match.getTable(); if (IdentifierField.TABLE.isCaseSensitive(caseSensitivity)){ String tableName = tableAliases.get(table); if (tableName == null) tableName = table; if (tableName == null) tableName = table; if (!dbTable.getADQLName().equals(tableName)) continue; }else{ Loading Loading @@ -289,7 +287,6 @@ public class SearchColumnList extends TextualSearchList<DBColumn> { } } /* ***************** */ /* INHERITED METHODS */ /* ***************** */ Loading Loading @@ -331,7 +328,6 @@ public class SearchColumnList extends TextualSearchList<DBColumn> { return changed; } /** * Lets extracting the key to associate with a given {@link DBColumn} instance. * Loading
src/adql/db/SearchTableList.java +7 −11 Original line number Diff line number Diff line Loading @@ -43,7 +43,6 @@ public class SearchTableList extends TextualSearchList<DBTable> { /** Indicates whether multiple occurrences are allowed. */ private boolean distinct = false; /* ************ */ /* CONSTRUCTORS */ /* ************ */ Loading Loading @@ -72,7 +71,6 @@ public class SearchTableList extends TextualSearchList<DBTable> { super(initialCapacity, new DBTableKeyExtractor()); } /* ******* */ /* GETTERS */ /* ******* */ Loading Loading @@ -183,7 +181,6 @@ public class SearchTableList extends TextualSearchList<DBTable> { return tmpResult; } /* ***************** */ /* INHERITED METHODS */ /* ***************** */ Loading @@ -195,7 +192,6 @@ public class SearchTableList extends TextualSearchList<DBTable> { return super.add(item); } /** * Lets extracting a key to associate with a given {@link DBTable} instance. * Loading
src/adql/db/exception/UnresolvedIdentifiersException.java +5 −7 Original line number Diff line number Diff line Loading @@ -123,6 +123,4 @@ public class UnresolvedIdentifiersException extends ParseException implements It return exceptions.size() + " unresolved identifiers" + ((unresolvedIdentifiers != null) ? (": " + unresolvedIdentifiers) : "") + " !"; } }