public abstract class StringFieldFilter extends Filter
Modifier and Type | Field and Description |
---|---|
protected boolean |
emptyOK
Option to accept objects if the field is empty or null.
|
Modifier | Constructor and Description |
---|---|
protected |
StringFieldFilter(boolean emptyOK,
String[] valid)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
protected void |
addAccessor(PathAccessor acc,
Class<? extends BioPAXElement> clazz)
Adds the given
PathAccessor to the list of accessors to use to get field values
of objects and their related objects. |
protected void |
addValidValue(String value)
Adds the given valid value to the set of valid values.
|
abstract void |
createFieldAccessors()
The child class should populate the list of PathAccessor object using the
addAccessor method. |
boolean |
isEmptyOK()
Gets the option to accept empty fields.
|
boolean |
okToTraverse(Level3Element ele)
Checks if the related values of the object are among valid values.
|
void |
setEmptyOK(boolean emptyOK)
Sets the parameter to accept empty field values.
|
protected boolean emptyOK
protected StringFieldFilter(boolean emptyOK, String[] valid)
emptyOK
- whether to always accept empty field when traversing the graph or rejectvalid
- filter values (strings' capitalization does not matter)public boolean isEmptyOK()
public void setEmptyOK(boolean emptyOK)
emptyOK
- parameter to accept empty filedpublic abstract void createFieldAccessors()
addAccessor
method.protected void addAccessor(PathAccessor acc, Class<? extends BioPAXElement> clazz)
PathAccessor
to the list of accessors to use to get field values
of objects and their related objects.acc
- accessorclazz
- the type of element that the accessor is appliedprotected void addValidValue(String value)
value
- a valid valuepublic boolean okToTraverse(Level3Element ele)
okToTraverse
in class Filter
ele
- level 3 element to checkCopyright © 2015 BioPAX. All rights reserved.