net.sourceforge.rssowl.util.search
Class SearchDefinition

java.lang.Object
  extended by net.sourceforge.rssowl.util.search.SearchDefinition

public class SearchDefinition
extends java.lang.Object

A SearchDefinition describes a Pattern to search in a certain Scope.

Version:
1.2.4
Author:
Benjamin Pasero

Field Summary
private  boolean isCaseSensitive
           
private  boolean isPatternRegEx
           
private  boolean isWholeWord
           
static SearchDefinition NO_SEARCH
          Default indicator for no search
private  java.lang.String pattern
           
private  int scope
           
static int SCOPE_AUTHOR
          Scope: Author
static int SCOPE_CATEGORY
          Scope: Category
static int SCOPE_DESCRIPTION
          Scope: Description
static int SCOPE_ENCLOSURE
          Scope: Enclosure
static java.lang.String[] SCOPE_NAMES
          Human Readable Scope-Names
static int SCOPE_NEWS
          Scope: Entire News
static int SCOPE_NEWSFEED
          Scope: Newsfeed Title
static int SCOPE_PUBDATE
          Scope: Publish Date
static int SCOPE_TITLE
          Scope: Title
 
Constructor Summary
SearchDefinition(java.lang.String pattern, int scope)
          Instantiate a new SearchDefinition.
 
Method Summary
 boolean equals(java.lang.Object obj)
           This implementation of equals() is not checking all fields, because only the Pattern is currently relevent in the SearchDialog, where a List of searches is remembered.
 java.lang.String getPattern()
          Get the Pattern to use for the search.
 int getScope()
          Get the Scope to use for the search.
 int hashCode()
           
 boolean isCaseSensitive()
          Check wether this Search is Case Sensitive.
 boolean isPatternRegEx()
          Get wether the Pattern is a Regular Expression.
 boolean isWholeWord()
          Check if Search should only consider Whole Words.
 void setIsCaseSensitive(boolean isCaseSensitive)
          Set wether this Search is Case Sensitive
 void setIsWholeWord(boolean isWholeWord)
          Set wether Search should only consider Whole Words.
 void setPatternIsRegEx(boolean isPatternRegEx)
          Set wether the Pattern is a Regular Expression.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

NO_SEARCH

public static final SearchDefinition NO_SEARCH
Default indicator for no search


SCOPE_AUTHOR

public static final int SCOPE_AUTHOR
Scope: Author

See Also:
Constant Field Values

SCOPE_CATEGORY

public static final int SCOPE_CATEGORY
Scope: Category

See Also:
Constant Field Values

SCOPE_DESCRIPTION

public static final int SCOPE_DESCRIPTION
Scope: Description

See Also:
Constant Field Values

SCOPE_ENCLOSURE

public static final int SCOPE_ENCLOSURE
Scope: Enclosure

See Also:
Constant Field Values

SCOPE_NAMES

public static final java.lang.String[] SCOPE_NAMES
Human Readable Scope-Names


SCOPE_NEWS

public static final int SCOPE_NEWS
Scope: Entire News

See Also:
Constant Field Values

SCOPE_NEWSFEED

public static final int SCOPE_NEWSFEED
Scope: Newsfeed Title

See Also:
Constant Field Values

SCOPE_PUBDATE

public static final int SCOPE_PUBDATE
Scope: Publish Date

See Also:
Constant Field Values

SCOPE_TITLE

public static final int SCOPE_TITLE
Scope: Title

See Also:
Constant Field Values

isCaseSensitive

private boolean isCaseSensitive

isPatternRegEx

private boolean isPatternRegEx

isWholeWord

private boolean isWholeWord

pattern

private java.lang.String pattern

scope

private int scope
Constructor Detail

SearchDefinition

public SearchDefinition(java.lang.String pattern,
                        int scope)
Instantiate a new SearchDefinition.

Parameters:
pattern - The Pattern to search.
scope - The Scope of the search.
Method Detail

equals

public boolean equals(java.lang.Object obj)

This implementation of equals() is not checking all fields, because only the Pattern is currently relevent in the SearchDialog, where a List of searches is remembered.

Overrides:
equals in class java.lang.Object
See Also:
Object.equals(java.lang.Object)

getPattern

public java.lang.String getPattern()
Get the Pattern to use for the search.

Returns:
The Pattern to search.

getScope

public int getScope()
Get the Scope to use for the search.

Returns:
The Scope of the search.

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object
See Also:
Object.hashCode()

isCaseSensitive

public boolean isCaseSensitive()
Check wether this Search is Case Sensitive.

Returns:
TRUE if the Search is Case Sensitive.

isPatternRegEx

public boolean isPatternRegEx()
Get wether the Pattern is a Regular Expression.

Returns:
boolean TRUE if the Pattern should be used as Regular Expression directly.

isWholeWord

public boolean isWholeWord()
Check if Search should only consider Whole Words.

Returns:
TRUE if Search should only consider Whole Words.

setIsCaseSensitive

public void setIsCaseSensitive(boolean isCaseSensitive)
Set wether this Search is Case Sensitive

Parameters:
isCaseSensitive - TRUE for Case Sensitive Search.

setIsWholeWord

public void setIsWholeWord(boolean isWholeWord)
Set wether Search should only consider Whole Words.

Parameters:
isWholeWord - TRUE for Whole Words Search.

setPatternIsRegEx

public void setPatternIsRegEx(boolean isPatternRegEx)
Set wether the Pattern is a Regular Expression.

Parameters:
isPatternRegEx - Set TRUE if the Pattern should be used as Regular Expression directly.


RSSOwl - RSS / RDF / Atom Newsreader

SourceForge.net Logo