public class SearchGroup extends AbstractGroup implements SearchRule
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
ID |
INCLUDING, INDEPENDENT, m_context, m_name, QUOTE_CHAR, REFINING, SEPARATOR| Constructor and Description |
|---|
SearchGroup(java.lang.String name,
java.lang.String searchExpression,
boolean caseSensitive,
boolean regExp,
int context)
Creates a SearchGroup with the specified properties.
|
| Modifier and Type | Method and Description |
|---|---|
javax.swing.undo.AbstractUndoableEdit |
add(BibtexEntry[] entries)
Adds the specified entries to this group.
|
int |
applyRule(java.util.Map<java.lang.String,java.lang.String> searchOptions,
BibtexEntry entry) |
boolean |
contains(BibtexEntry entry) |
boolean |
contains(java.util.Map<java.lang.String,java.lang.String> searchOptions,
BibtexEntry entry) |
AbstractGroup |
deepCopy() |
protected static java.lang.String |
describeNode(antlr.collections.AST node,
boolean regExp,
boolean not,
boolean and,
boolean or) |
boolean |
equals(java.lang.Object o) |
static AbstractGroup |
fromString(java.lang.String s,
BibtexDatabase db,
int version)
Parses s and recreates the SearchGroup from it.
|
java.lang.String |
getDescription()
Returns a lengthy textual description of this instance (for
the groups editor).
|
static java.lang.String |
getDescriptionForPreview(java.lang.String expr,
antlr.collections.AST ast,
boolean caseSensitive,
boolean regExp) |
java.lang.String |
getSearchExpression() |
SearchRule |
getSearchRule() |
java.lang.String |
getShortDescription()
Returns a short description of the group in HTML (for a tooltip).
|
java.lang.String |
getTypeId() |
boolean |
isCaseSensitive() |
boolean |
isDynamic()
Returns true if this group is dynamic, i.e.
|
boolean |
isRegExp() |
javax.swing.undo.AbstractUndoableEdit |
remove(BibtexEntry[] entries)
Removes the specified entries from this group.
|
boolean |
supportsAdd() |
boolean |
supportsRemove() |
java.lang.String |
toString()
Returns a String representation of this object that can be used to
reconstruct it.
|
boolean |
validateSearchStrings(java.util.Map<java.lang.String,java.lang.String> searchStrings) |
containsAll, containsAny, getHierarchicalContext, getName, refreshForNewDatabase, setHierarchicalContext, setNamepublic static final java.lang.String ID
public SearchGroup(java.lang.String name,
java.lang.String searchExpression,
boolean caseSensitive,
boolean regExp,
int context)
public static AbstractGroup fromString(java.lang.String s, BibtexDatabase db, int version) throws java.lang.Exception
s - The String representation obtained from
SearchGroup.toString(), or null if incompatiblejava.lang.Exceptionpublic java.lang.String getTypeId()
getTypeId in class AbstractGrouppublic SearchRule getSearchRule()
getSearchRule in class AbstractGroupAbstractGroup.getSearchRule()public java.lang.String toString()
toString in class java.lang.Objectpublic java.lang.String getSearchExpression()
public boolean supportsAdd()
supportsAdd in class AbstractGrouppublic boolean supportsRemove()
supportsRemove in class AbstractGrouppublic javax.swing.undo.AbstractUndoableEdit add(BibtexEntry[] entries)
AbstractGroupadd in class AbstractGrouppublic javax.swing.undo.AbstractUndoableEdit remove(BibtexEntry[] entries)
AbstractGroupremove in class AbstractGrouppublic boolean equals(java.lang.Object o)
equals in class java.lang.Objectpublic boolean contains(java.util.Map<java.lang.String,java.lang.String> searchOptions,
BibtexEntry entry)
contains in class AbstractGroupsearchOptions - The search options to apply.public boolean contains(BibtexEntry entry)
contains in class AbstractGrouppublic int applyRule(java.util.Map<java.lang.String,java.lang.String> searchOptions,
BibtexEntry entry)
applyRule in interface SearchRulepublic AbstractGroup deepCopy()
deepCopy in class AbstractGrouppublic boolean isCaseSensitive()
public boolean isRegExp()
public boolean isDynamic()
AbstractGroupisDynamic in class AbstractGrouppublic java.lang.String getDescription()
AbstractGroupgetDescription in class AbstractGrouppublic static java.lang.String getDescriptionForPreview(java.lang.String expr,
antlr.collections.AST ast,
boolean caseSensitive,
boolean regExp)
protected static java.lang.String describeNode(antlr.collections.AST node,
boolean regExp,
boolean not,
boolean and,
boolean or)
public java.lang.String getShortDescription()
AbstractGroupgetShortDescription in class AbstractGrouppublic boolean validateSearchStrings(java.util.Map<java.lang.String,java.lang.String> searchStrings)
validateSearchStrings in interface SearchRule