org.xnap.plugin.overnet.net
Class OvernetSearchResult

java.lang.Object
  extended by org.xnap.search.AbstractSearchResult
      extended by org.xnap.plugin.overnet.net.OvernetSearchResult
All Implemented Interfaces:
SearchResult

public class OvernetSearchResult
extends AbstractSearchResult


Field Summary
 
Fields inherited from interface org.xnap.search.SearchResult
BITRATE, FREQUENCY, HIDE_PREFIX, LENGTH, MD5, SHA1, URN
 
Constructor Summary
OvernetSearchResult(SearchResultMessage sm)
           
 
Method Summary
 boolean canGroup(SearchResult result)
          Returns true, if this object and result can be grouped together.
 SearchResultContainer createContainer()
          Creates a group root that has this object's properties.
 javax.swing.Action[] getActions()
          Returns the actions for this search result.
 int getAvailability()
          Returns a score between 1 and 255.
 java.lang.String getFilename()
          Returns the full filename.
 long getFilesize()
          Returns the filesize.
 java.lang.Object getHash()
          Used for grouping of results.
 javax.swing.Icon getIcon()
          Returns null.
 Peer getPeer()
          Returns the peer that offer this result for download.
 Plugin getPlugin()
          Returns the originating plugin.
 int getSourcesCount()
          Returns 1.
 
Methods inherited from class org.xnap.search.AbstractSearchResult
get, getPath, getShortFilename, keys, put
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OvernetSearchResult

public OvernetSearchResult(SearchResultMessage sm)
Method Detail

canGroup

public boolean canGroup(SearchResult result)
Description copied from interface: SearchResult
Returns true, if this object and result can be grouped together.


createContainer

public SearchResultContainer createContainer()
Description copied from interface: SearchResult
Creates a group root that has this object's properties.


getActions

public javax.swing.Action[] getActions()
Description copied from interface: SearchResult
Returns the actions for this search result.


getAvailability

public int getAvailability()
Description copied from interface: SearchResult
Returns a score between 1 and 255. Higher number means better availability. Return 1 if unsure.

Returns:
0, if this makes no sense (i.e. for a local file)

getSourcesCount

public int getSourcesCount()
Description copied from class: AbstractSearchResult
Returns 1.

Specified by:
getSourcesCount in interface SearchResult
Overrides:
getSourcesCount in class AbstractSearchResult

getFilename

public java.lang.String getFilename()
Description copied from interface: SearchResult
Returns the full filename. Used by SearchFilter for matching.

See Also:
xnap.search.SearchFilter

getFilesize

public long getFilesize()
Description copied from interface: SearchResult
Returns the filesize.


getHash

public java.lang.Object getHash()
Description copied from interface: SearchResult
Used for grouping of results.


getIcon

public javax.swing.Icon getIcon()
Description copied from class: AbstractSearchResult
Returns null.

Specified by:
getIcon in interface SearchResult
Overrides:
getIcon in class AbstractSearchResult

getPlugin

public Plugin getPlugin()
Description copied from interface: SearchResult
Returns the originating plugin.


getPeer

public Peer getPeer()
Description copied from interface: SearchResult
Returns the peer that offer this result for download.



Copyright © 2001-2005 XNap Team. All Rights Reserved.