public abstract class LeafNode extends AbstractExprNode
| Modifier and Type | Field and Description |
|---|---|
protected String |
attribute
attribute on which this leaf is based
|
protected AttributeType |
attributeType
attributeType on which this leaf is based
|
annotations, assertionType| Modifier | Constructor and Description |
|---|---|
protected |
LeafNode(AttributeType attributeType,
AssertionType assertionType)
Creates a leaf node.
|
protected |
LeafNode(String attribute,
AssertionType assertionType)
Creates a leaf node.
|
| Modifier and Type | Method and Description |
|---|---|
Object |
accept(FilterVisitor visitor)
Element/node accept method for visitor pattern.
|
boolean |
equals(Object other) |
private static String |
escapeBytes(byte[] bytes)
Escape a binary value into a String form that is accepted as a Filter
|
protected static String |
escapeFilterValue(AttributeType attributeType,
byte[] value)
Handles the escaping of special characters in LDAP search filter assertion values using the
<valueencoding> rule as described in
RFC 4515.
|
protected static String |
escapeFilterValue(String value)
Handles the escaping of special characters in LDAP search filter assertion values using the
<valueencoding> rule as described in
RFC 4515.
|
private static String |
escapeString(byte[] bytes)
Escape a String value into a String form that is accepted as a Filter
|
String |
getAttribute()
Gets the attribute this leaf node is based on.
|
AttributeType |
getAttributeType()
Gets the attributeType this leaf node is based on.
|
int |
hashCode() |
boolean |
isLeaf()
Gets whether this node is a leaf - the answer is always true here.
|
boolean |
isSchemaAware()
Tells if this Node is Schema aware.
|
void |
setAttribute(String attribute)
Sets the attribute this leaf node is based on.
|
void |
setAttributeType(AttributeType attributeType)
Sets the attributeType this leaf node is based on.
|
clone, get, getAnnotations, getAssertionType, printRefinementToBuffer, set, toStringprotected AttributeType attributeType
protected String attribute
protected LeafNode(AttributeType attributeType, AssertionType assertionType)
attributeType - the attribute this node is based onassertionType - the type of this leaf nodeprotected LeafNode(String attribute, AssertionType assertionType)
attribute - the attribute this node is based onassertionType - the type of this leaf nodepublic final boolean isLeaf()
public final AttributeType getAttributeType()
public final String getAttribute()
public void setAttributeType(AttributeType attributeType)
attributeType - the attributeType that is asserted by this filter nodepublic void setAttribute(String attribute)
attribute - the attribute that is asserted by this filter nodepublic final Object accept(FilterVisitor visitor)
ExprNodevisitor - the filter expression tree structure visitorExprNode.accept(
FilterVisitor)public boolean isSchemaAware()
private static String escapeBytes(byte[] bytes)
bytes - The data to escapeprivate static String escapeString(byte[] bytes)
bytes - The data to escapeprotected static String escapeFilterValue(AttributeType attributeType, byte[] value)
ExprNode.printRefinementToBuffer(StringBuilder) results in a valid filter string that can be parsed
again (as a way of cloning filters).attributeType - The associated AttributeTypevalue - Right hand side of "attrId=value" assertion occurring in an LDAP search filter.valueprotected static String escapeFilterValue(String value)
ExprNode.printRefinementToBuffer(StringBuilder) results in a valid filter string that can be parsed
again (as a way of cloning filters).value - Right hand side of "attrId=value" assertion occurring in an LDAP search filter.valuepublic int hashCode()
hashCode in class AbstractExprNodeObject.hashCode()public boolean equals(Object other)
equals in class AbstractExprNodetrue if both objects are equalObject.equals(java.lang.Object)Copyright © 2003–2022 The Apache Software Foundation. All rights reserved.