Class Strategy

java.lang.Object
be.panako.strategy.Strategy
Direct Known Subclasses:
OlafStrategy, PanakoStrategy, PitchClassHistogramStrategy

public abstract class Strategy
extends java.lang.Object
  • Constructor Summary

    Constructors
    Constructor Description
    Strategy()  
  • Method Summary

    Modifier and Type Method Description
    static java.lang.String classToName​(java.lang.Class<? extends Strategy> c)  
    abstract void clear()
    Clear al information from the key value store
    static Strategy getInstance()  
    abstract boolean hasResource​(java.lang.String resource)
    Are there fingerprints for this resource already stored in the database?
    abstract boolean isStorageAvailable()  
    abstract void monitor​(java.lang.String query, int maxNumberOfReqults, java.util.Set<java.lang.Integer> avoid, QueryResultHandler handler)  
    void print​(java.lang.String path, boolean sonicVisualizerOutput)  
    abstract void printStorageStatistics()
    Print some storage statistics.
    abstract void query​(java.lang.String query, int maxNumberOfResults, java.util.Set<java.lang.Integer> avoid, QueryResultHandler handler)  
    abstract java.lang.String resolve​(java.lang.String filename)
    Returns an internal identifier, probably an integer, for a given filename.
    abstract double store​(java.lang.String resource, java.lang.String description)
    Store an audio file in the data store.

    Methods inherited from class java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • Strategy

      public Strategy()
  • Method Details

    • store

      public abstract double store​(java.lang.String resource, java.lang.String description)
      Store an audio file in the data store. The name of the resource is used to extract a numerical identifier. The description is arbitrary.
      Parameters:
      resource - The audio resource.
      description - An arbitrary description.
      Returns:
      The number of seconds of processed audio.
    • query

      public abstract void query​(java.lang.String query, int maxNumberOfResults, java.util.Set<java.lang.Integer> avoid, QueryResultHandler handler)
    • monitor

      public abstract void monitor​(java.lang.String query, int maxNumberOfReqults, java.util.Set<java.lang.Integer> avoid, QueryResultHandler handler)
    • hasResource

      public abstract boolean hasResource​(java.lang.String resource)
      Are there fingerprints for this resource already stored in the database?
      Parameters:
      resource - The name of the resource.
      Returns:
      True if the resource is already treated. False otherwise.
    • isStorageAvailable

      public abstract boolean isStorageAvailable()
      Returns:
      True if the storage is available, false otherwise.
    • printStorageStatistics

      public abstract void printStorageStatistics()
      Print some storage statistics.
    • getInstance

      public static Strategy getInstance()
    • classToName

      public static java.lang.String classToName​(java.lang.Class<? extends Strategy> c)
    • resolve

      public abstract java.lang.String resolve​(java.lang.String filename)
      Returns an internal identifier, probably an integer, for a given filename.
      Parameters:
      filename - the name of the file to resolve.
      Returns:
      An internal identifier, probably an integer, for a given filename.
    • print

      public void print​(java.lang.String path, boolean sonicVisualizerOutput)
    • clear

      public abstract void clear()
      Clear al information from the key value store