Filter
public class NamedSBaseReferenceFilter extends NameFilter
NameFilter
that allows users to search for a
AbstractReferenceGlyph
that refers to a NamedSBase
with the
given identifier attribute. The boolean switch filterForReference
that
can be changed using the setFilterForReference(boolean)
method decides
whether this NamedSBaseReferenceFilter
should use the given identifier
to filter for the actual AbstractReferenceGlyph
or for the referenced
NamedSBase
.Constructor | Description |
---|---|
NamedSBaseReferenceFilter() |
Creates a new
SpeciesReferenceFilter with undefined properties. |
NamedSBaseReferenceFilter(java.lang.String id) |
|
NamedSBaseReferenceFilter(java.lang.String id,
java.lang.String name) |
|
NamedSBaseReferenceFilter(NamedSBase glyph) |
Creates a new
NamedSBaseReferenceFilter that only accepts instances of
AbstractReferenceGlyph pointing to the id of the given NamedSBase . |
Modifier and Type | Method | Description |
---|---|---|
boolean |
accepts(java.lang.Object o) |
This method checks whether the given object is of the correct type and
has the desired properties set to be acceptable.
|
boolean |
isFilterForSpecies() |
|
void |
setFilterForReference(boolean filterForSpecies) |
getId, getName, setId, setName
public NamedSBaseReferenceFilter()
SpeciesReferenceFilter
with undefined properties.public NamedSBaseReferenceFilter(NamedSBase glyph)
NamedSBaseReferenceFilter
that only accepts instances of
AbstractReferenceGlyph
pointing to the id of the given NamedSBase
.glyph
- the NamedSBase
of interest.public NamedSBaseReferenceFilter(java.lang.String id)
id
- the identifier of a NamedSBase
or AbstractReferenceGlyph
we
are interested in. Whether we accept the id of a NamedSBase
or
a AbstractReferenceGlyph
depends on the flag that can be defined
with setFilterForReference(boolean)
.setFilterForReference(boolean)
public NamedSBaseReferenceFilter(java.lang.String id, java.lang.String name)
id
- the identifier of a NamedSBase
or AbstractReferenceGlyph
we
are interested in. Whether we accept the id of a NamedSBase
or
a AbstractReferenceGlyph
depends on the flag that can be defined
with setFilterForReference(boolean)
.name
- the name of the element we are interested in.setFilterForReference(boolean)
public boolean accepts(java.lang.Object o)
Filter
accepts
in interface Filter
accepts
in class NameFilter
o
- some object whose properties are to be checked.public boolean isFilterForSpecies()
public void setFilterForReference(boolean filterForSpecies)
filterForSpecies
- the filterForSpecies to set