Package elki.database
Class AbstractDatabase
- java.lang.Object
-
- elki.database.AbstractDatabase
-
- All Implemented Interfaces:
elki.database.Database
- Direct Known Subclasses:
HashmapDatabase,ProxyDatabase,StaticArrayDatabase
public abstract class AbstractDatabase extends java.lang.Object implements elki.database.DatabaseAbstract base class for database API implementations. Provides default management of relations, indexes and events as well as default query matching.Note: when debugging index usage, set logging for this package to FINEST via -enableDebug elki.database=FINEST
- Since:
- 0.1
- Author:
- Erich Schubert
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classAbstractDatabase.ParParameterization class.
-
Field Summary
Fields Modifier and Type Field Description protected DatabaseEventManagereventManagerThe event manager, collects events and fires them on demand.protected java.util.Collection<elki.index.IndexFactory<?>>indexFactoriesIndex factories.protected java.util.List<elki.database.relation.Relation<?>>relationsThe relations we manage.
-
Constructor Summary
Constructors Constructor Description AbstractDatabase()Constructor.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description voidaccumulateDataStoreEvents()voidaddDataStoreListener(elki.database.datastore.DataStoreListener l)voidflushDataStoreEvents()elki.datasource.bundle.SingleObjectBundlegetBundle(elki.database.ids.DBIDRef id)protected abstract elki.logging.LogginggetLogger()Get the class logger.java.lang.StringgetLongName()<O> elki.database.relation.Relation<O>getRelation(elki.data.type.TypeInformation restriction, java.lang.Object... hints)java.util.Collection<elki.database.relation.Relation<?>>getRelations()java.lang.StringgetShortName()voidremoveDataStoreListener(elki.database.datastore.DataStoreListener l)
-
-
-
Field Detail
-
eventManager
protected final DatabaseEventManager eventManager
The event manager, collects events and fires them on demand.
-
relations
protected final java.util.List<elki.database.relation.Relation<?>> relations
The relations we manage.
-
indexFactories
protected final java.util.Collection<elki.index.IndexFactory<?>> indexFactories
Index factories.
-
-
Method Detail
-
getBundle
public elki.datasource.bundle.SingleObjectBundle getBundle(elki.database.ids.DBIDRef id)
- Specified by:
getBundlein interfaceelki.database.Database
-
getRelations
public java.util.Collection<elki.database.relation.Relation<?>> getRelations()
- Specified by:
getRelationsin interfaceelki.database.Database
-
getRelation
public <O> elki.database.relation.Relation<O> getRelation(elki.data.type.TypeInformation restriction, java.lang.Object... hints) throws elki.data.type.NoSupportedDataTypeException- Specified by:
getRelationin interfaceelki.database.Database- Throws:
elki.data.type.NoSupportedDataTypeException
-
addDataStoreListener
public void addDataStoreListener(elki.database.datastore.DataStoreListener l)
- Specified by:
addDataStoreListenerin interfaceelki.database.Database
-
removeDataStoreListener
public void removeDataStoreListener(elki.database.datastore.DataStoreListener l)
- Specified by:
removeDataStoreListenerin interfaceelki.database.Database
-
accumulateDataStoreEvents
public void accumulateDataStoreEvents()
- Specified by:
accumulateDataStoreEventsin interfaceelki.database.Database
-
flushDataStoreEvents
public void flushDataStoreEvents()
- Specified by:
flushDataStoreEventsin interfaceelki.database.Database
-
getLongName
public java.lang.String getLongName()
-
getShortName
public java.lang.String getShortName()
-
getLogger
protected abstract elki.logging.Logging getLogger()
Get the class logger.- Returns:
- Class logger
-
-