public abstract class AbstractGroup
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static int |
INCLUDING
Group's content is the union of its own content with its subgroups'
content.
|
static int |
INDEPENDENT
Group's contents are independent of its hierarchical position.
|
protected int |
m_context
The hierarchical context of the group (INDEPENDENT, REFINING, or
INCLUDING).
|
protected java.lang.String |
m_name
The group's name (every type of group has one).
|
protected static char |
QUOTE_CHAR
Character used for quoting in the string representation.
|
static int |
REFINING
Group's content is the intersection of its own content with its
supergroup's content.
|
protected static java.lang.String |
SEPARATOR
For separating units (e.g.
|
Constructor and Description |
---|
AbstractGroup(java.lang.String name,
int context) |
Modifier and Type | Method and Description |
---|---|
abstract javax.swing.undo.AbstractUndoableEdit |
add(BibtexEntry[] entries)
Adds the specified entries to this group.
|
abstract boolean |
contains(BibtexEntry entry) |
abstract boolean |
contains(java.util.Map<java.lang.String,java.lang.String> searchOptions,
BibtexEntry entry) |
boolean |
containsAll(BibtexEntry[] entries) |
boolean |
containsAny(BibtexEntry[] entries) |
abstract AbstractGroup |
deepCopy() |
static AbstractGroup |
fromString(java.lang.String s,
BibtexDatabase db,
int version)
Re-create a group instance from a textual representation.
|
abstract java.lang.String |
getDescription()
Returns a lengthy textual description of this instance (for
the groups editor).
|
int |
getHierarchicalContext()
Returns the group's hierarchical context.
|
java.lang.String |
getName()
Returns this group's name, e.g.
|
abstract SearchRule |
getSearchRule() |
abstract java.lang.String |
getShortDescription()
Returns a short description of the group in HTML (for a tooltip).
|
abstract java.lang.String |
getTypeId() |
abstract boolean |
isDynamic()
Returns true if this group is dynamic, i.e.
|
void |
refreshForNewDatabase(BibtexDatabase db)
Update the group, if necessary, to handle the situation where the group
is applied to a different BibtexDatabase than it was created for.
|
abstract javax.swing.undo.AbstractUndoableEdit |
remove(BibtexEntry[] entries)
Removes the specified entries from this group.
|
void |
setHierarchicalContext(int context)
Sets the groups's hierarchical context.
|
void |
setName(java.lang.String name)
Sets the group's name.
|
abstract boolean |
supportsAdd() |
abstract boolean |
supportsRemove() |
protected java.lang.String m_name
protected int m_context
public static final int INDEPENDENT
public static final int REFINING
public static final int INCLUDING
protected static final char QUOTE_CHAR
protected static final java.lang.String SEPARATOR
public abstract java.lang.String getTypeId()
public abstract SearchRule getSearchRule()
public static AbstractGroup fromString(java.lang.String s, BibtexDatabase db, int version) throws java.lang.Exception
s
- The result from the group's toString() method.java.lang.Exception
- If an error occured and a group could not be created, e.g.
due to a malformed regular expression.public final java.lang.String getName()
public final void setName(java.lang.String name)
public abstract boolean supportsAdd()
public abstract boolean supportsRemove()
public abstract javax.swing.undo.AbstractUndoableEdit add(BibtexEntry[] entries)
public abstract javax.swing.undo.AbstractUndoableEdit remove(BibtexEntry[] entries)
public abstract boolean contains(java.util.Map<java.lang.String,java.lang.String> searchOptions, BibtexEntry entry)
searchOptions
- The search options to apply.public abstract boolean contains(BibtexEntry entry)
public boolean containsAny(BibtexEntry[] entries)
public boolean containsAll(BibtexEntry[] entries)
public abstract boolean isDynamic()
public void setHierarchicalContext(int context)
public int getHierarchicalContext()
public abstract java.lang.String getDescription()
public abstract AbstractGroup deepCopy()
public abstract java.lang.String getShortDescription()
public void refreshForNewDatabase(BibtexDatabase db)
db
- The database to refresh for.