org.xnap.search
Class DefaultSearchFilter

java.lang.Object
  extended by org.xnap.search.DefaultSearchFilter
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable, SearchFilter

public class DefaultSearchFilter
extends java.lang.Object
implements java.lang.Cloneable, SearchFilter, java.io.Serializable

This class provides the default search filter implementation.

See Also:
Serialized Form

Field Summary
 
Fields inherited from interface org.xnap.search.SearchFilter
MAX_FILESIZE, MEDIA_TYPE, MIN_FILESIZE, PATH, TEXT
 
Constructor Summary
DefaultSearchFilter()
           
 
Method Summary
 java.lang.Object clone()
           
 java.lang.Object get(java.lang.String key)
          Returns a value.
 long getMaxFilesize()
          Returns the maximum filesize.
 MediaType getMediaType()
          Returns the media type.
 long getMinFilesize()
          Returns the minimum filesize.
 java.lang.String[] getPath()
          Returns the path.
 java.lang.String getText()
          Returns the search text.
 boolean matches(SearchResult result)
          Returns true, if the filter accepts result.
 void put(java.lang.String key, java.lang.Object value)
          Sets a value.
 java.lang.String toString()
          Returns the value of getText().
 void validate()
           
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DefaultSearchFilter

public DefaultSearchFilter()
Method Detail

clone

public java.lang.Object clone()
Overrides:
clone in class java.lang.Object

get

public java.lang.Object get(java.lang.String key)
Description copied from interface: SearchFilter
Returns a value.

Specified by:
get in interface SearchFilter

getMediaType

public MediaType getMediaType()
Returns the media type.

Specified by:
getMediaType in interface SearchFilter
Returns:
null, if none was set; the media type, otherwise

getMinFilesize

public long getMinFilesize()
Returns the minimum filesize.

Returns:
-1, if none was set

getMaxFilesize

public long getMaxFilesize()
Returns the maximum filesize.

Returns:
-1, if none was set

getPath

public java.lang.String[] getPath()
Returns the path.

Returns:
null, if none was set

getText

public java.lang.String getText()
Returns the search text.

Specified by:
getText in interface SearchFilter
Returns:
null, if none was set; the search text, otherwise

matches

public boolean matches(SearchResult result)
Description copied from interface: SearchFilter
Returns true, if the filter accepts result.

Specified by:
matches in interface SearchFilter

put

public void put(java.lang.String key,
                java.lang.Object value)
Description copied from interface: SearchFilter
Sets a value.

Specified by:
put in interface SearchFilter

toString

public java.lang.String toString()
Returns the value of getText().

Overrides:
toString in class java.lang.Object

validate

public void validate()
              throws java.lang.Exception
Throws:
java.lang.Exception


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