@Description(value="Database using an in-memory hashtable and at least providing linear scans.") public class StaticArrayDatabase extends AbstractDatabase implements Database, Parameterizable
Modifier and Type | Class and Description |
---|---|
static class |
StaticArrayDatabase.Parameterizer
Parameterization class.
|
Modifier and Type | Field and Description |
---|---|
protected DatabaseConnection |
databaseConnection
The data source we get the initial data from.
|
private DBIDView |
idrep
The DBID representation we use
|
private ArrayDBIDs |
ids
IDs of this database
|
private static Logging |
logger
Our logger
|
eventManager, INDEX_ID, indexes, indexFactories, relations
Constructor and Description |
---|
StaticArrayDatabase()
Constructor with no indexes.
|
StaticArrayDatabase(DatabaseConnection databaseConnection,
Collection<IndexFactory<?,?>> indexFactories)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
addIndex(Index index)
Add a new index to the database.
|
private Relation<?> |
addNewRelation(SimpleTypeInformation<?> meta)
Add a new representation for the given meta.
|
protected Relation<?>[] |
alignColumns(ObjectBundle pack)
Find a mapping from package columns to database columns, eventually adding
new database columns when needed.
|
protected int |
findDBIDColumn(ObjectBundle pack)
Find an DBID column.
|
StaticDBIDs |
getDBIDs()
Deprecated.
|
Collection<Index> |
getIndexes()
Collection of known indexes
|
protected Logging |
getLogger() |
void |
initialize()
Initialize the database by getting the initial data from the database
connection.
|
void |
removeIndex(Index index)
Remove a particular index
|
int |
size()
Deprecated.
|
accumulateDataStoreEvents, addDataStoreListener, flushDataStoreEvents, getBundle, getDistanceQuery, getKNNQuery, getLongName, getRangeQuery, getRelation, getRelations, getRKNNQuery, getShortName, getSimilarityQuery, removeDataStoreListener
addChildResult, getHierarchy, setHierarchy
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
accumulateDataStoreEvents, addDataStoreListener, flushDataStoreEvents, getBundle, getDistanceQuery, getKNNQuery, getRangeQuery, getRelation, getRelations, getRKNNQuery, getSimilarityQuery, removeDataStoreListener
getHierarchy, setHierarchy
getLongName, getShortName
private static final Logging logger
private ArrayDBIDs ids
private DBIDView idrep
protected DatabaseConnection databaseConnection
public StaticArrayDatabase(DatabaseConnection databaseConnection, Collection<IndexFactory<?,?>> indexFactories)
databaseConnection
- Database connection to get the initial data from.indexFactories
- Indexes to addpublic StaticArrayDatabase()
public void initialize()
initialize
in interface Database
public void addIndex(Index index)
Database
addIndex
in interface Database
addIndex
in class AbstractDatabase
index
- Index to addpublic Collection<Index> getIndexes()
Database
getIndexes
in interface Database
getIndexes
in class AbstractDatabase
public void removeIndex(Index index)
Database
removeIndex
in interface Database
removeIndex
in class AbstractDatabase
index
- Index to removeprotected int findDBIDColumn(ObjectBundle pack)
pack
- Package to processprotected Relation<?>[] alignColumns(ObjectBundle pack)
pack
- Package to processprivate Relation<?> addNewRelation(SimpleTypeInformation<?> meta)
meta
- meta data@Deprecated public final int size()
Database
@Deprecated public StaticDBIDs getDBIDs()
Database
protected Logging getLogger()
getLogger
in class AbstractDatabase