|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.iphrase.runtime.query.Feature | +--com.iphrase.runtime.query.constraint.Constraint
Abstract base class for all atomic constraints.
Inner Class Summary | |
static interface |
Constraint.Flags
Define Constraint feature flag values. |
Method Summary | |
void |
clearExplicit()
Remove the "Explicit" flag. |
void |
clearHidden()
Reveal the constraint, i.e. |
void |
clearNew()
Specify that the constraint is carried over from past queries. |
void |
clearNotSerialized()
Specify that the constraint applies after IR pruning, i.e., make it 'not prepruned'. |
void |
clearPrePruned()
Specify that the constraint applies after IR pruning, i.e., make it 'not prepruned'. |
void |
clearRequired()
Optionalize the constraint, i.e. |
void |
clearState(int state)
Clear the custom state |
boolean |
equals(java.lang.Object o)
Determine whether this Constraint is equivalent to another, passed as an Object because this method overrides Object.equals(java.lang.Object) . |
java.lang.String |
getConstraintLabel()
Gets the (optional) constraint label. |
abstract java.lang.String |
getConstraintSubType()
|
java.lang.String |
getDisplayPrefix()
Returns constraint display prefix. |
boolean |
getIsMentions()
Determine if this constraint is an instance of type Mentions . |
boolean |
getState(int state)
Determine if the custom state is set. |
java.lang.String |
getType()
|
abstract java.lang.Object |
getValue()
Get the value associated with this constraint. |
boolean |
isExplicit()
Determine if the constraint is 'Explicit'. |
boolean |
isHidden()
Determine if the constraint is 'hidden'. |
boolean |
isMentions()
Determine if this constraint is an instance of type Mentions . |
boolean |
isNew()
Determine if the constraint is 'new'. |
boolean |
isNotSerialized()
Determine if the constraint is 'prepruned'. |
boolean |
isPrePruned()
Determine if the constraint is 'prepruned'. |
static boolean |
isRangeConstraintType(java.lang.String type)
Determine whether a String constraint type represents a range constraint. |
boolean |
isRequired()
Determine if the constraint is 'required'. |
boolean |
matches(Constraint c)
Determine whether this constraint matches another. |
static Constraint |
newInstance(java.lang.String state)
Create a new Constraint from a OneStep serialization String . |
static Constraint |
newInstance(java.lang.String type,
java.lang.String op,
java.lang.String feature,
java.lang.Object value)
Create a new Constraint from (drill-down) tally tree data. |
static Constraint |
newInstance(java.lang.String type,
java.lang.String op,
java.lang.String feature,
java.lang.Object value,
java.lang.String label)
Create a new Constraint from (drill-down) tally tree data. |
void |
setExplicit()
Specify that the constraint explicitly set by user. |
void |
setHidden()
Hide the constraint, i.e. |
void |
setHidden(boolean isNotSerialized)
Hide the constraint and set its serialization state. |
void |
setNew()
Specify that the current query has just added this constraint. |
void |
setNotSerialized()
Specify that the constraint applies before IR pruning, i.e., make it 'prepruned'. |
void |
setPrePruned()
Specify that the constraint applies before IR pruning, i.e., make it 'prepruned'. |
void |
setRequired()
Require the constraint, i.e. |
void |
setState(int state)
Set the custom state |
Methods inherited from class com.iphrase.runtime.query.Feature |
getId |
Methods inherited from class java.lang.Object |
getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
public abstract java.lang.Object getValue()
Object
value associated with this constraintpublic boolean isMentions()
Mentions
.
This predicate is useful for contexts like JSTL, where instanceof is not available.true
if instanceof Mentions
, otherwise false
public boolean getIsMentions()
Mentions
.
Identical to isMentions()
, but starts with 'get' in order to
expose bean property to JSP/JSTL.true
if instance of Mentions
, otherwise false
public boolean isHidden()
public void setHidden()
isHidden()
public void clearHidden()
isHidden()
public boolean getState(int state)
state
- bitmaskpublic void setState(int state)
state
- bitmaskgetState(int)
public void clearState(int state)
state
- bitmaskgetState(int)
public void setHidden(boolean isNotSerialized)
isNotSerialized
- specifies either the constraint is serialized or notsetHidden()
public boolean isRequired()
public void setRequired()
isRequired()
public void clearRequired()
isRequired()
public boolean isPrePruned()
public void setPrePruned()
isPrePruned()
public void clearPrePruned()
isPrePruned()
public boolean isExplicit()
public void setExplicit()
isExplicit()
public void clearExplicit()
isExplicit()
public boolean isNew()
public void setNew()
isNew()
public void clearNew()
isNew()
public boolean isNotSerialized()
public void setNotSerialized()
isPrePruned()
public void clearNotSerialized()
isPrePruned()
public boolean matches(Constraint c)
c
- Constraint
to be matched against thistrue
if the two constraints are of the same type
and have identical fields except for their flags,
else false
.public boolean equals(java.lang.Object o)
Object
because this method overrides Object.equals(java.lang.Object)
.equals
in class java.lang.Object
o
- another constrainttrue
if the two constraints are of the same type
and have identical fields, else false
.public java.lang.String getDisplayPrefix()
public abstract java.lang.String getConstraintSubType()
public java.lang.String getType()
public static Constraint newInstance(java.lang.String type, java.lang.String op, java.lang.String feature, java.lang.Object value) throws ArgumentError
type
- String
constraint typeop
- String
constraint op (sub-type)feature
- String
feature idvalue
- Object
feature valuepublic static Constraint newInstance(java.lang.String type, java.lang.String op, java.lang.String feature, java.lang.Object value, java.lang.String label) throws ArgumentError
type
- String
constraint typeop
- String
constraint op (sub-type)feature
- String
feature idvalue
- Object
feature valuelabel
- String
optional labelpublic static Constraint newInstance(java.lang.String state) throws ArgumentError
String
.state
- OneStep serialization String
Constraint
instanceArgumentError
- public java.lang.String getConstraintLabel()
constraintLabel
propertypublic static boolean isRangeConstraintType(java.lang.String type)
String
constraint type represents a range constraint.type
- String
constraint typetrue
if range constraint type, else false
|
© Copyright 2005, 2006. IBM Corporation. All rights reserved. | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |