org.sbml.jsbml.ext.layout
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.| Modifier and Type | Field and Description |
|---|---|
private boolean |
filterForReference
Decides whether to filter for the identifier of the referenced
NamedSBase or if to use id and name to filter for the instance of
AbstractReferenceGlyph itself. |
| Constructor and Description |
|---|
NamedSBaseReferenceFilter()
Creates a new
SpeciesReferenceFilter with undefined properties. |
NamedSBaseReferenceFilter(NamedSBase glyph)
Creates a new
NamedSBaseReferenceFilter that only accepts instances of
AbstractReferenceGlyph pointing to the id of the given NamedSBase. |
NamedSBaseReferenceFilter(java.lang.String id) |
NamedSBaseReferenceFilter(java.lang.String id,
java.lang.String name) |
| Modifier and Type | Method and 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, setNameprivate boolean filterForReference
NamedSBase or if to use id and name to filter for the instance of
AbstractReferenceGlyph itself.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)
Filteraccepts in interface Filteraccepts in class NameFiltero - some object whose properties are to be checked.public boolean isFilterForSpecies()
public void setFilterForReference(boolean filterForSpecies)
filterForSpecies - the filterForSpecies to set