Package org.intermine.web.struts
Class QueryBuilderConstraintForm
- java.lang.Object
-
- org.apache.struts.action.ActionForm
-
- org.intermine.web.struts.QueryBuilderConstraintForm
-
- All Implemented Interfaces:
java.io.Serializable
public class QueryBuilderConstraintForm extends org.apache.struts.action.ActionFormThe form used for editing QueryBuilder constraints- Author:
- Mark Woodbridge, Thomas Riley
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected java.lang.StringattributeOpprotected java.lang.StringattributeOptionsprotected java.lang.StringattributeValueprotected java.lang.StringbagOpprotected java.lang.StringbagValueprotected booleaneditableprotected java.lang.StringextraValueprotected java.lang.StringjoinTypeprotected java.lang.StringloopQueryOpprotected java.lang.StringloopQueryValueprotected java.lang.StringmultiValueAttributeprotected java.lang.StringnullConstraintprotected java.lang.Stringoperatorprotected java.lang.Stringpathprotected java.lang.StringrangeConstraintprotected java.lang.StringrangeOpprotected java.util.Set<java.lang.String>rangesprotected java.lang.StringsubclassValueprotected java.lang.Stringswitchableprotected java.lang.StringtemplateLabelprotected java.lang.StringuseJoin
-
Constructor Summary
Constructors Constructor Description QueryBuilderConstraintForm()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddRange(java.lang.String range)java.lang.StringgetAttributeOp()Gets the value of attributeOpjava.lang.StringgetAttributeOptions()Gets the value of attributeValuejava.lang.StringgetAttributeValue()Gets the value of attributeValuejava.lang.StringgetBagOp()Gets the value of bagOpjava.lang.StringgetBagValue()Gets the value of bagValuejava.lang.StringgetEditingConstraintCode()Get the constraint that is being edited or null if creating a new constraint.java.lang.StringgetExtraValue()Gets the value of extraValuejava.lang.StringgetJoinType()java.lang.StringgetLoopQueryOp()Gets the value of loopQueryOpjava.lang.StringgetLoopQueryValue()Gets the value of loopQueryValuejava.lang.StringgetMultiValueAttribute()Returs the value of multiValueAttributejava.lang.StringgetNullConstraint()Get the null/not null constraint value.java.lang.StringgetOperator()Get the operator.java.lang.StringgetPath()Gets the value of pathjava.lang.StringgetRangeConstraint()Get the range constraint value.java.lang.StringgetRangeOp()java.util.Set<java.lang.String>getRanges()java.lang.StringgetSubclassValue()Gets the value of subclassValuejava.lang.StringgetSwitchable()Get the switchable value (on, off, locked).java.lang.StringgetTemplateLabel()Get the template label.java.lang.StringgetUseJoin()booleanisEditable()Get the editable flag (when building a template).static java.lang.ObjectparseValue(java.lang.String value, java.lang.Class<?> type, org.apache.struts.action.ActionMessages errors)Parse an attribute valuevoidreset(org.apache.struts.action.ActionMapping mapping, javax.servlet.http.HttpServletRequest request)voidsetAttributeOp(java.lang.String attributeOp)Sets the value of attributeOpvoidsetAttributeOptions(java.lang.String attributeOptions)Sets the value of attributeOptionsvoidsetAttributeValue(java.lang.String attributeValue)Sets the value of attributeValuevoidsetBagOp(java.lang.String bagOp)Sets the value of bagOpvoidsetBagValue(java.lang.String bagValue)Sets the value of bagValuevoidsetEditable(boolean editable)Set the editable flag (when building a template).voidsetEditingConstraintCode(java.lang.String code)Set the code of an existing constraint that is being edited.voidsetExtraValue(java.lang.String extraValue)Sets the value of extraValuevoidsetJoinType(java.lang.String joinType)voidsetLoopQueryOp(java.lang.String loopOp)Sets the value of loopQueryOpvoidsetLoopQueryValue(java.lang.String loopQuery)Sets the value of loopQueryValuevoidsetMultiValueAttribute(java.lang.String multiValueAttribute)Sets the value of multiValueAttribute, a string representing the values selected by the user separated by a comma.voidsetNullConstraint(java.lang.String nullConstraint)Set the null/not null constraint.voidsetOperator(java.lang.String operator)Set the operator, "and" or "or"voidsetPath(java.lang.String path)Sets the value of pathvoidsetRangeConstraint(java.lang.String rangeConstraint)Set the range constraint value.voidsetRangeOp(java.lang.String rangeOp)voidsetSubclassValue(java.lang.String subclassValue)Sets the value of subclassValuevoidsetSwitchable(java.lang.String switchable)voidsetTemplateLabel(java.lang.String templateLabel)Set the template label.voidsetUseJoin(java.lang.String useJoin)org.apache.struts.action.ActionErrorsvalidate(org.apache.struts.action.ActionMapping mapping, javax.servlet.http.HttpServletRequest request)
-
-
-
Field Detail
-
bagOp
protected java.lang.String bagOp
-
bagValue
protected java.lang.String bagValue
-
attributeOp
protected java.lang.String attributeOp
-
attributeValue
protected java.lang.String attributeValue
-
attributeOptions
protected java.lang.String attributeOptions
-
extraValue
protected java.lang.String extraValue
-
multiValueAttribute
protected java.lang.String multiValueAttribute
-
subclassValue
protected java.lang.String subclassValue
-
loopQueryOp
protected java.lang.String loopQueryOp
-
loopQueryValue
protected java.lang.String loopQueryValue
-
joinType
protected java.lang.String joinType
-
useJoin
protected java.lang.String useJoin
-
path
protected java.lang.String path
-
operator
protected java.lang.String operator
-
nullConstraint
protected java.lang.String nullConstraint
-
rangeOp
protected java.lang.String rangeOp
-
rangeConstraint
protected java.lang.String rangeConstraint
-
ranges
protected java.util.Set<java.lang.String> ranges
-
editable
protected boolean editable
-
templateLabel
protected java.lang.String templateLabel
-
switchable
protected java.lang.String switchable
-
-
Method Detail
-
setEditingConstraintCode
public void setEditingConstraintCode(java.lang.String code)
Set the code of an existing constraint that is being edited.- Parameters:
code- the code of the constraint in the query
-
getEditingConstraintCode
public java.lang.String getEditingConstraintCode()
Get the constraint that is being edited or null if creating a new constraint.- Returns:
- the constraint being edited or null
-
getLoopQueryOp
public java.lang.String getLoopQueryOp()
Gets the value of loopQueryOp- Returns:
- the value of loopQueryOp
-
setLoopQueryOp
public void setLoopQueryOp(java.lang.String loopOp)
Sets the value of loopQueryOp- Parameters:
loopOp- Value to assign to loopQueryOp
-
getLoopQueryValue
public java.lang.String getLoopQueryValue()
Gets the value of loopQueryValue- Returns:
- the value of loopQueryValue
-
setLoopQueryValue
public void setLoopQueryValue(java.lang.String loopQuery)
Sets the value of loopQueryValue- Parameters:
loopQuery- value to assign to loopQueryValue
-
getBagOp
public java.lang.String getBagOp()
Gets the value of bagOp- Returns:
- the value of bagOp
-
setBagOp
public void setBagOp(java.lang.String bagOp)
Sets the value of bagOp- Parameters:
bagOp- Value to assign to bagOp
-
getBagValue
public java.lang.String getBagValue()
Gets the value of bagValue- Returns:
- the value of bagValue
-
setBagValue
public void setBagValue(java.lang.String bagValue)
Sets the value of bagValue- Parameters:
bagValue- value to assign to bagValue
-
getAttributeOp
public java.lang.String getAttributeOp()
Gets the value of attributeOp- Returns:
- the value of attributeOp
-
setAttributeOp
public void setAttributeOp(java.lang.String attributeOp)
Sets the value of attributeOp- Parameters:
attributeOp- value to assign to attributeOp
-
getAttributeValue
public java.lang.String getAttributeValue()
Gets the value of attributeValue- Returns:
- the value of attributeValue
-
setAttributeValue
public void setAttributeValue(java.lang.String attributeValue)
Sets the value of attributeValue- Parameters:
attributeValue- value to assign to attributeValue
-
getExtraValue
public java.lang.String getExtraValue()
Gets the value of extraValue- Returns:
- the value of extraValue
-
setExtraValue
public void setExtraValue(java.lang.String extraValue)
Sets the value of extraValue- Parameters:
extraValue- the value to assign to extraValue
-
getMultiValueAttribute
public java.lang.String getMultiValueAttribute()
Returs the value of multiValueAttribute- Returns:
- a String rapresenting the value of multiValueAttribute
-
setMultiValueAttribute
public void setMultiValueAttribute(java.lang.String multiValueAttribute)
Sets the value of multiValueAttribute, a string representing the values selected by the user separated by a comma.- Parameters:
multiValueAttribute- the value to assign to multiValueAttribute
-
getAttributeOptions
public java.lang.String getAttributeOptions()
Gets the value of attributeValue- Returns:
- the value of attributeValue
-
setAttributeOptions
public void setAttributeOptions(java.lang.String attributeOptions)
Sets the value of attributeOptions- Parameters:
attributeOptions- value to assign to attributeOptions
-
getSubclassValue
public java.lang.String getSubclassValue()
Gets the value of subclassValue- Returns:
- the value of subclassValue
-
setSubclassValue
public void setSubclassValue(java.lang.String subclassValue)
Sets the value of subclassValue- Parameters:
subclassValue- value to assign to subclassValue
-
getPath
public java.lang.String getPath()
Gets the value of path- Returns:
- the value of path
-
setPath
public void setPath(java.lang.String path)
Sets the value of path- Parameters:
path- value to assign to path
-
getOperator
public java.lang.String getOperator()
Get the operator.- Returns:
- "and" or "or"
-
setOperator
public void setOperator(java.lang.String operator)
Set the operator, "and" or "or"- Parameters:
operator- the operator
-
getNullConstraint
public java.lang.String getNullConstraint()
Get the null/not null constraint value. Returned value will be either "NULL" or "NotNULL".- Returns:
- null/not null constraint value
-
setNullConstraint
public void setNullConstraint(java.lang.String nullConstraint)
Set the null/not null constraint. Parameter should be either "NULL" or "NotNULL".- Parameters:
nullConstraint- null/not null constraint
-
setRangeConstraint
public void setRangeConstraint(java.lang.String rangeConstraint)
Set the range constraint value. Will be one or more ranges separated by commas- Parameters:
rangeConstraint- the range constraint value
-
getRangeConstraint
public java.lang.String getRangeConstraint()
Get the range constraint value. Will be one or more ranges separated by commas- Returns:
- the range constraint value
-
getRanges
public java.util.Set<java.lang.String> getRanges()
- Returns:
- the ranges to constrain by, e.g. 2R:123..456
-
addRange
public void addRange(java.lang.String range)
- Parameters:
range- the range to constrain by, e.g. 2R:123..456
-
getRangeOp
public java.lang.String getRangeOp()
- Returns:
- the operator for this range constraint, e.g. OVERLAPS
-
setRangeOp
public void setRangeOp(java.lang.String rangeOp)
- Parameters:
rangeOp- the operator for this range constraint, e.g. OVERLAPS
-
getTemplateLabel
public java.lang.String getTemplateLabel()
Get the template label.- Returns:
- the template label
-
setTemplateLabel
public void setTemplateLabel(java.lang.String templateLabel)
Set the template label.- Parameters:
templateLabel- the template label
-
getJoinType
public java.lang.String getJoinType()
- Returns:
- the joinType
-
setJoinType
public void setJoinType(java.lang.String joinType)
- Parameters:
joinType- the joinType to set
-
getUseJoin
public java.lang.String getUseJoin()
- Returns:
- the useJoin
-
setUseJoin
public void setUseJoin(java.lang.String useJoin)
- Parameters:
useJoin- the useJoin to set
-
isEditable
public boolean isEditable()
Get the editable flag (when building a template).- Returns:
- whether this constraint is editable
-
setEditable
public void setEditable(boolean editable)
Set the editable flag (when building a template).- Parameters:
editable- whether or not this constraint should be editable
-
getSwitchable
public java.lang.String getSwitchable()
Get the switchable value (on, off, locked).- Returns:
- switchable
-
setSwitchable
public void setSwitchable(java.lang.String switchable)
- Parameters:
switchable- the switchable values (on, off, locked) to set
-
validate
public org.apache.struts.action.ActionErrors validate(org.apache.struts.action.ActionMapping mapping, javax.servlet.http.HttpServletRequest request)- Overrides:
validatein classorg.apache.struts.action.ActionForm
-
parseValue
public static java.lang.Object parseValue(java.lang.String value, java.lang.Class<?> type, org.apache.struts.action.ActionMessages errors)Parse an attribute value- Parameters:
value- the value as a Stringtype- the type of the parsed valueerrors- ActionErrors to which any parse errors are added- Returns:
- the parsed value
-
reset
public void reset(org.apache.struts.action.ActionMapping mapping, javax.servlet.http.HttpServletRequest request)- Overrides:
resetin classorg.apache.struts.action.ActionForm
-
-