public interface Database extends HierarchicalResult
Modifier and Type | Method and Description |
---|---|
void |
accumulateDataStoreEvents()
Collects all insertion, deletion and update events until
flushDataStoreEvents() is called. |
void |
addDataStoreListener(DataStoreListener l)
Adds a listener for the
DataStoreEvent posted after the
content of the database changes. |
void |
flushDataStoreEvents()
Fires all collected insertion, deletion and update events as one
DataStoreEvent, i.e. notifies all registered DataStoreListener how the
content of the database has been changed since
accumulateDataStoreEvents() has been called. |
SingleObjectBundle |
getBundle(DBIDRef id)
Returns the DatabaseObject represented by the specified id.
|
<O> DistanceQuery<O> |
getDistanceQuery(Relation<O> relation,
DistanceFunction<? super O> distanceFunction,
java.lang.Object... hints)
Get the distance query for a particular distance function.
|
<O> KNNQuery<O> |
getKNNQuery(DistanceQuery<O> distanceQuery,
java.lang.Object... hints)
Get a KNN query object for the given distance query.
|
<O> RangeQuery<O> |
getRangeQuery(DistanceQuery<O> distanceQuery,
java.lang.Object... hints)
Get a range query object for the given distance query for radius-based
neighbor search.
|
<O> Relation<O> |
getRelation(TypeInformation restriction,
java.lang.Object... hints)
Get an object representation.
|
java.util.Collection<Relation<?>> |
getRelations()
Get all relations of a database.
|
<O> RKNNQuery<O> |
getRKNNQuery(DistanceQuery<O> distanceQuery,
java.lang.Object... hints)
Get a rKNN query object for the given distance query.
|
<O> SimilarityQuery<O> |
getSimilarityQuery(Relation<O> relation,
SimilarityFunction<? super O> similarityFunction,
java.lang.Object... hints)
Get the similarity query for a particular similarity function.
|
<O> RangeQuery<O> |
getSimilarityRangeQuery(SimilarityQuery<O> simQuery,
java.lang.Object... hints)
Get a range query object for the given distance query for radius-based
neighbor search.
|
void |
initialize()
Initialize the database, for example by loading the input data.
|
void |
removeDataStoreListener(DataStoreListener l)
Removes a listener previously added with
addDataStoreListener(DataStoreListener) . |
getHierarchy, setHierarchy
getLongName, getShortName
void initialize()
java.util.Collection<Relation<?>> getRelations()
<O> Relation<O> getRelation(TypeInformation restriction, java.lang.Object... hints) throws NoSupportedDataTypeException
O
- Object typerestriction
- Type restrictionhints
- Optimizer hintsNoSupportedDataTypeException
<O> DistanceQuery<O> getDistanceQuery(Relation<O> relation, DistanceFunction<? super O> distanceFunction, java.lang.Object... hints)
O
- Object typerelation
- Relation useddistanceFunction
- Distance function to usehints
- Optimizer hints<O> SimilarityQuery<O> getSimilarityQuery(Relation<O> relation, SimilarityFunction<? super O> similarityFunction, java.lang.Object... hints)
O
- Object typerelation
- Relation usedsimilarityFunction
- Similarity function to usehints
- Optimizer hints<O> KNNQuery<O> getKNNQuery(DistanceQuery<O> distanceQuery, java.lang.Object... hints)
DatabaseQuery.HINT_BULK
bulk query neededO
- Object typedistanceQuery
- Distance queryhints
- Optimizer hints<O> RangeQuery<O> getRangeQuery(DistanceQuery<O> distanceQuery, java.lang.Object... hints)
DatabaseQuery.HINT_BULK
bulk query neededO
- Object typedistanceQuery
- Distance queryhints
- Optimizer hints<O> RangeQuery<O> getSimilarityRangeQuery(SimilarityQuery<O> simQuery, java.lang.Object... hints)
DatabaseQuery.HINT_BULK
bulk query neededO
- Object typesimQuery
- Similarity queryhints
- Optimizer hints<O> RKNNQuery<O> getRKNNQuery(DistanceQuery<O> distanceQuery, java.lang.Object... hints)
DatabaseQuery.HINT_BULK
bulk query neededO
- Object typedistanceQuery
- Distance queryhints
- Optimizer hintsSingleObjectBundle getBundle(DBIDRef id)
id
- the id of the Object to be obtained from the Databasevoid addDataStoreListener(DataStoreListener l)
DataStoreEvent
posted after the
content of the database changes.l
- the listener to addremoveDataStoreListener(DataStoreListener)
,
DataStoreListener
,
DataStoreEvent
void removeDataStoreListener(DataStoreListener l)
addDataStoreListener(DataStoreListener)
.l
- the listener to removeaddDataStoreListener(DataStoreListener)
,
DataStoreListener
,
DataStoreEvent
void accumulateDataStoreEvents()
flushDataStoreEvents()
is called.DataStoreEvent
void flushDataStoreEvents()
accumulateDataStoreEvents()
has been called.DataStoreListener
,
DataStoreEvent
Copyright © 2019 ELKI Development Team. License information.