org.xnap.plugin.gift.net
Class GiFTSearchResult

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

public class GiFTSearchResult
extends AbstractSearchResult

GiFTSearchResult

Metainfo for mp3:
                - album
                - artist
                - duration
                - bitrate
                - frequency
                - title
                - tracknumber
        

Version:
CVS $Id: GiFTSearchResult.java,v 1.9 2004/07/20 18:02:28 leist Exp $
Author:
Tammo van Lessen

Field Summary
 
Fields inherited from interface org.xnap.search.SearchResult
BITRATE, FREQUENCY, HIDE_PREFIX, LENGTH, MD5, SHA1, URN
 
Constructor Summary
GiFTSearchResult(GiFTDaemon daemon, long size, Peer user, java.lang.String filename, java.lang.String hash, java.lang.String node, java.lang.String mime, java.lang.String url, int score, java.util.Hashtable meta)
          Constructor for GiFTSearchResult.
 
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.
 java.lang.String getMimeType()
          Returns the mime-type.
 java.lang.String getNode()
          Returns the node.
 Peer getPeer()
          Returns the peer that offer this result for download.
 Plugin getPlugin()
          Returns the originating plugin.
 java.lang.String getUrl()
          Returns the url.
 
Methods inherited from class org.xnap.search.AbstractSearchResult
get, getPath, getShortFilename, getSourcesCount, keys, put
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GiFTSearchResult

public GiFTSearchResult(GiFTDaemon daemon,
                        long size,
                        Peer user,
                        java.lang.String filename,
                        java.lang.String hash,
                        java.lang.String node,
                        java.lang.String mime,
                        java.lang.String url,
                        int score,
                        java.util.Hashtable meta)
Constructor for GiFTSearchResult.

Parameters:
size -
user -
filename -
hash -
node -
mime -
url -
score -
meta -
Method Detail

getMimeType

public java.lang.String getMimeType()
Returns the mime-type.

Returns:
String

getNode

public java.lang.String getNode()
Returns the node.

Returns:
String

getUrl

public java.lang.String getUrl()
Returns the url.

Returns:
String

canGroup

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

See Also:
xnap.search.SearchResult#canGroup(xnap.search.SearchResult)

createContainer

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

See Also:
xnap.search.SearchResult#createContainer()

getActions

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

See Also:
xnap.search.SearchResult#getActions()

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)
See Also:
xnap.search.SearchResult#getAvailability()

getFilename

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

See Also:
xnap.search.SearchResult#getFilename()

getFilesize

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

See Also:
xnap.search.SearchResult#getFilesize()

getIcon

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

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

getPeer

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

See Also:
xnap.search.SearchResult#getPeer()

getPlugin

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

See Also:
xnap.search.SearchResult#getPlugin()

getHash

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



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