net.sourceforge.atunes.kernel.modules.search
Interface SearchableObject

All Known Implementing Classes:
CommonAudioFileSearchableObject, DeviceSearchableObject, FavoritesSearchableObject, RepositorySearchableObject

public interface SearchableObject

This interface represents objects that can be searched with Lucene.


Method Summary
 Document getDocumentForElement(AudioObject audioObject)
          Builds a Lucene Document for a given AudioObject.
 java.util.List<AudioObject> getElementsToIndex()
          Returns elements to index.
 java.lang.String getPathToIndex()
          Returns path to index.
 java.util.List<java.lang.String> getSearchableAttributes()
          Returns a list of attributes that can be used in queries.
 java.lang.String getSearchableObjectName()
          Returns string representation of this searchable object.
 java.util.List<SearchResult> getSearchResult(Hits hits)
          Returns result from hits.
 SearchResultTableModel getSearchResultsTableModel(java.util.List<SearchResult> results)
          Returns a table model to show search results.
 

Method Detail

getSearchableObjectName

java.lang.String getSearchableObjectName()
Returns string representation of this searchable object.

Returns:
the searchable object name

getSearchableAttributes

java.util.List<java.lang.String> getSearchableAttributes()
Returns a list of attributes that can be used in queries.

Returns:
the searchable attributes

getPathToIndex

java.lang.String getPathToIndex()
Returns path to index.

Returns:
the path to index

getSearchResult

java.util.List<SearchResult> getSearchResult(Hits hits)
                                             throws CorruptIndexException,
                                                    java.io.IOException
Returns result from hits.

Parameters:
hits - the hits
Returns:
the search result
Throws:
CorruptIndexException - the corrupt index exception
java.io.IOException - Signals that an I/O exception has occurred.

getElementsToIndex

java.util.List<AudioObject> getElementsToIndex()
Returns elements to index.

Returns:
the elements to index

getDocumentForElement

Document getDocumentForElement(AudioObject audioObject)
Builds a Lucene Document for a given AudioObject.

Parameters:
audioObject - the audio object
Returns:
the document for element

getSearchResultsTableModel

SearchResultTableModel getSearchResultsTableModel(java.util.List<SearchResult> results)
Returns a table model to show search results.

Parameters:
results - the results
Returns:
the search results table model


Copyright © 2006-2008 The aTunes Team. All Rights Reserved.