|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.waveset.util.AbstractXmlObject
com.waveset.object.LogicalExpression
A complex expression that contains:
logical operator
; and
attribute expressions
.
"logical AND"
or a "logical OR"
.
Logical expressions can be nested to form a "tree"
of attribute expressions
.
AttributeCondition
.
LogicalExpression
.
Field Summary | |
protected java.util.List |
_nodes
|
protected LogicalOperator |
_operator
|
static java.lang.String |
code_id
|
Fields inherited from class com.waveset.util.AbstractXmlObject |
_trace |
Constructor Summary | |
protected |
LogicalExpression()
Protected "empty" constructor for the convenience of subclasses and other classes in this package. |
|
LogicalExpression(org.w3c.dom.Element e)
Construct an LogicalExpression from an XML element |
|
LogicalExpression(java.lang.String xml)
Construct an LogicalExpression from an XML string |
Method Summary | |
void |
addNode(AttributeExpression expression)
|
protected java.lang.String |
checkMembers()
|
int |
compareTo(java.lang.Object o)
|
protected void |
confirmMembers()
|
static LogicalExpression |
convert(AttributeCondition attrCond)
Convert the specified array of attribute conditions to an equivalent logical expression. |
static LogicalExpression |
convert(AttributeCondition[] attrConds)
Convert the specified array of attribute conditions to an equivalent logical expression. |
static LogicalExpression |
convert(java.util.List attrConds)
Convert specified list of attribute conditions to an equivalent logical expression. |
static LogicalExpression |
convert(java.util.Map attrs)
Convert specified map of attribute values to an equivalent logical expression. |
static LogicalExpression |
convert(WSAttributes attrs)
Convert specified WSAttributes to an equivalent logical expression. |
boolean |
equals(java.lang.Object o)
|
java.util.List |
getAttributeConditions()
|
abstract java.lang.String |
getElementName()
Return the element name. |
java.util.List |
getNodes()
|
LogicalOperator |
getOperator()
|
java.lang.String |
getSymbol()
|
protected boolean |
isAConjunct()
|
protected boolean |
isADisjunct()
|
boolean |
isMetBy(WSAttributes attrs)
|
void |
parseXml(org.w3c.dom.Element e)
|
void |
parseXml(java.lang.String xml)
|
static LogicalExpression |
preProcess(Type type,
AttributeCondition[] attrConds,
ObjectGroupLister objectGroupLister,
java.lang.Object conn)
Bug#11392: Magically transmute any attribute condition that refers to Attribute.CONTAINED_BY_OBJECT_GROUP for a type other than Type.OBJECT_GROUP into an attribute condition that refers to MEMBER_OBJECT_GROUPS. |
static void |
println(java.lang.Object o)
Ubiquitous macro. |
protected void |
setNodes(java.util.List nodes)
|
java.lang.String |
toLdapSearchFilter()
|
static java.lang.String |
toLdapSearchFilter(AttributeCondition[] attrConds)
|
java.lang.String |
toString()
|
void |
toXml(java.lang.StringBuffer b)
Convert this LogicalExpression to an XML string adding it to the provided buffer. |
void |
toXml(java.lang.StringBuffer b,
int indent)
Convert this LogicalExpression to an XML string adding it to the provided buffer at the specified indent level |
Methods inherited from class com.waveset.util.AbstractXmlObject |
addXmlHeader, cloneObject, dump, dumpFile, getReference, setTrace, toIdentityString, toVerboseString, toVerboseString, toXml, toXml |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
public static final java.lang.String code_id
protected LogicalOperator _operator
protected java.util.List _nodes
Constructor Detail |
protected LogicalExpression()
public LogicalExpression(java.lang.String xml) throws WavesetException
xml
- - an LogicalExpression serialized as an XML string.public LogicalExpression(org.w3c.dom.Element e) throws WavesetException
e
- - the XML representation of the LogicalExpression to be
createdMethod Detail |
public LogicalOperator getOperator()
public java.lang.String getSymbol()
public java.util.List getNodes()
protected void setNodes(java.util.List nodes)
public void addNode(AttributeExpression expression)
public java.util.List getAttributeConditions()
Each leaf node in an attribute expression
is an attribute condition
.
Each interior node is a logical expression that applies a
logical operator such as "AND" or "OR" to its "child" nodes.
public java.lang.String toString()
public java.lang.String toLdapSearchFilter()
toLdapSearchFilter
in interface AttributeExpression
protected final void confirmMembers()
java.lang.IllegalArgumentException
- - if member validation failsprotected java.lang.String checkMembers()
protected boolean isAConjunct()
protected boolean isADisjunct()
public boolean isMetBy(WSAttributes attrs)
isMetBy
in interface AttributeExpression
true
if the attribute expression
evaluates to true in the context of the specified attribute values;
otherwise false
.public static final LogicalExpression convert(WSAttributes attrs)
public static final LogicalExpression convert(java.util.Map attrs)
public static final LogicalExpression convert(AttributeCondition attrCond)
public static final LogicalExpression convert(AttributeCondition[] attrConds)
public static final LogicalExpression convert(java.util.List attrConds)
public static LogicalExpression preProcess(Type type, AttributeCondition[] attrConds, ObjectGroupLister objectGroupLister, java.lang.Object conn) throws WavesetException
objectGroupLister
- - A handle to any class that implements
the ObjectGroupLister
interface.conn
- - Can be used to pass arbitrary data in to the
#identifyObjectGroups method of the ObjectGroupLister.
filter
that is equivalent to
the specified attribute conditions for the specified type.
WavesetException
public static final java.lang.String toLdapSearchFilter(AttributeCondition[] attrConds)
public abstract java.lang.String getElementName()
AbstractXmlObject
getElementName
in interface XmlObject
getElementName
in class AbstractXmlObject
public void toXml(java.lang.StringBuffer b)
toXml
in class AbstractXmlObject
b
- - the buffer to append the XML string to
Merely invokes toXml(b, 0).
public void toXml(java.lang.StringBuffer b, int indent)
toXml
in interface XmlObject
toXml
in class AbstractXmlObject
b
- - the buffer to append the XML string toindent
- - how many spaces to indent the XMLpublic void parseXml(java.lang.String xml) throws WavesetException
WavesetException
public void parseXml(org.w3c.dom.Element e) throws WavesetException
WavesetException
public boolean equals(java.lang.Object o)
public int compareTo(java.lang.Object o)
public static void println(java.lang.Object o)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |