Package be.panako.strategy.olaf
Class OlafStrategy
java.lang.Object
be.panako.strategy.Strategy
be.panako.strategy.olaf.OlafStrategy
public class OlafStrategy extends Strategy
-
Constructor Summary
Constructors Constructor Description OlafStrategy()
-
Method Summary
Modifier and Type Method Description void
clear()
Clear al information from the key value storedouble
delete(java.lang.String resource, java.lang.String description)
boolean
hasResource(java.lang.String resource)
Are there fingerprints for this resource already stored in the database?boolean
isStorageAvailable()
void
load()
void
monitor(java.lang.String query, int maxNumberOfReqults, java.util.Set<java.lang.Integer> avoid, QueryResultHandler handler)
java.lang.String
name()
void
print(java.lang.String path, boolean sonicVisualizerOutput)
void
printStorageStatistics()
Print some storage statistics.void
query(java.lang.String query, int maxNumberOfResults, java.util.Set<java.lang.Integer> avoid, QueryResultHandler handler)
void
query(java.lang.String query, int maxNumberOfResults, java.util.Set<java.lang.Integer> avoid, QueryResultHandler handler, double startTimeOffset, double numberOfSeconds)
java.lang.String
resolve(java.lang.String filename)
Returns an internal identifier, probably an integer, for a given filename.double
store(java.lang.String resource, java.lang.String description)
Store an audio file in the data store.java.util.List<OlafFingerprint>
toFingerprints(java.lang.String resource)
java.util.List<OlafFingerprint>
toFingerprints(java.lang.String resource, double startTimeOffset, double numberOfSeconds)
Methods inherited from class be.panako.strategy.Strategy
classToName, getInstance
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Constructor Details
-
OlafStrategy
public OlafStrategy()
-
-
Method Details
-
store
public double store(java.lang.String resource, java.lang.String description)Description copied from class:Strategy
Store an audio file in the data store. The name of the resource is used to extract a numerical identifier. The description is arbitrary. -
delete
public double delete(java.lang.String resource, java.lang.String description) -
toFingerprints
-
toFingerprints
public java.util.List<OlafFingerprint> toFingerprints(java.lang.String resource, double startTimeOffset, double numberOfSeconds) -
query
public void query(java.lang.String query, int maxNumberOfResults, java.util.Set<java.lang.Integer> avoid, QueryResultHandler handler) -
query
public void query(java.lang.String query, int maxNumberOfResults, java.util.Set<java.lang.Integer> avoid, QueryResultHandler handler, double startTimeOffset, double numberOfSeconds) -
monitor
public void monitor(java.lang.String query, int maxNumberOfReqults, java.util.Set<java.lang.Integer> avoid, QueryResultHandler handler) -
hasResource
public boolean hasResource(java.lang.String resource)Description copied from class:Strategy
Are there fingerprints for this resource already stored in the database?- Specified by:
hasResource
in classStrategy
- Parameters:
resource
- The name of the resource.- Returns:
- True if the resource is already treated. False otherwise.
-
isStorageAvailable
public boolean isStorageAvailable()- Specified by:
isStorageAvailable
in classStrategy
- Returns:
- True if the storage is available, false otherwise.
-
printStorageStatistics
public void printStorageStatistics()Description copied from class:Strategy
Print some storage statistics.- Specified by:
printStorageStatistics
in classStrategy
-
resolve
public java.lang.String resolve(java.lang.String filename)Description copied from class:Strategy
Returns an internal identifier, probably an integer, for a given filename. -
load
public void load() -
print
public void print(java.lang.String path, boolean sonicVisualizerOutput) -
name
public java.lang.String name() -
clear
public void clear()Description copied from class:Strategy
Clear al information from the key value store
-