|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.directory.api.ldap.model.filter.AbstractExprNode
org.apache.directory.api.ldap.model.filter.LeafNode
org.apache.directory.api.ldap.model.filter.SubstringNode
public class SubstringNode
Filter expression tree node used to represent a substring assertion.
| Field Summary |
|---|
| Fields inherited from class org.apache.directory.api.ldap.model.filter.LeafNode |
|---|
attribute, attributeType |
| Fields inherited from class org.apache.directory.api.ldap.model.filter.AbstractExprNode |
|---|
annotations, assertionType, isSchemaAware |
| Constructor Summary | |
|---|---|
SubstringNode(AttributeType attribute)
Creates a new SubstringNode object without any value |
|
SubstringNode(AttributeType attributeType,
String initialPattern,
String finalPattern)
Creates a new SubstringNode object with only one wildcard and no internal any fragments between wildcards. |
|
SubstringNode(List<String> anyPattern,
AttributeType attributeType,
String initialPattern,
String finalPattern)
Creates a new SubstringNode object more than one wildcard and an any list. |
|
SubstringNode(List<String> anyPattern,
String attribute,
String initialPattern,
String finalPattern)
Creates a new SubstringNode object more than one wildcard and an any list. |
|
SubstringNode(String attributeType)
Creates a new SubstringNode object without any value |
|
SubstringNode(String attribute,
String initialPattern,
String finalPattern)
Creates a new SubstringNode object with only one wildcard and no internal any fragments between wildcards. |
|
| Method Summary | |
|---|---|
void |
addAny(String anyPattern)
Add an any pattern |
ExprNode |
clone()
Clone the Node |
boolean |
equals(Object obj)
|
List<String> |
getAny()
Gets the list of wildcard surrounded any fragments. |
String |
getFinal()
Gets the final fragment or suffix. |
String |
getInitial()
Gets the initial fragment. |
Pattern |
getRegex(Normalizer normalizer)
Gets the compiled regular expression for the substring expression. |
static Pattern |
getRegex(String initialPattern,
String[] anyPattern,
String finalPattern)
Creates a regular expression from an LDAP substring assertion filter specification. |
int |
hashCode()
|
void |
setAny(List<String> anyPattern)
Set the any patterns |
void |
setFinal(String finalPattern)
Set the final pattern |
void |
setInitial(String initialPattern)
Set the initial pattern |
String |
toString()
|
| Methods inherited from class org.apache.directory.api.ldap.model.filter.LeafNode |
|---|
accept, getAttribute, getAttributeType, isLeaf, setAttribute, setAttributeType |
| Methods inherited from class org.apache.directory.api.ldap.model.filter.AbstractExprNode |
|---|
escapeFilterValue, get, getAnnotations, getAssertionType, isSchemaAware, printRefinementToBuffer, set |
| Methods inherited from class java.lang.Object |
|---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public SubstringNode(AttributeType attributeType,
String initialPattern,
String finalPattern)
attributeType - the name of the attributeType to substring assertinitialPattern - the initial fragmentfinalPattern - the final fragment
public SubstringNode(String attribute,
String initialPattern,
String finalPattern)
attribute - the name of the attribute to substring assertinitialPattern - the initial fragmentfinalPattern - the final fragmentpublic SubstringNode(AttributeType attribute)
attribute - the name of the attribute to substring assertpublic SubstringNode(String attributeType)
attributeType - the attributeType to substring assert
public SubstringNode(List<String> anyPattern,
AttributeType attributeType,
String initialPattern,
String finalPattern)
anyPattern - list of internal fragments between wildcardsattributeType - the attributeType to substring assertinitialPattern - the initial fragmentfinalPattern - the final fragment
public SubstringNode(List<String> anyPattern,
String attribute,
String initialPattern,
String finalPattern)
anyPattern - list of internal fragments between wildcardsattribute - the name of the attribute to substring assertinitialPattern - the initial fragmentfinalPattern - the final fragment| Method Detail |
|---|
public static Pattern getRegex(String initialPattern,
String[] anyPattern,
String finalPattern)
throws PatternSyntaxException
initialPattern - the initial fragment before wildcardsanyPattern - fragments surrounded by wildcards if anyfinalPattern - the final fragment after last wildcard if any
PatternSyntaxException - if a syntactically correct regular expression cannot be
compiledpublic ExprNode clone()
clone in interface ExprNodeclone in class AbstractExprNodepublic final String getInitial()
public void setInitial(String initialPattern)
initialPattern - The initial patternpublic final String getFinal()
public void setFinal(String finalPattern)
finalPattern - The final patternpublic final List<String> getAny()
public void setAny(List<String> anyPattern)
anyPattern - The any patternspublic void addAny(String anyPattern)
anyPattern - The any pattern
public final Pattern getRegex(Normalizer normalizer)
throws LdapException
normalizer - the normalizer to use for pattern component normalization
LdapException - if there are problems while normalizingpublic boolean equals(Object obj)
equals in class LeafNodetrue if both objects are equalObject.equals(java.lang.Object)public int hashCode()
hashCode in class LeafNodeObject.hashCode()public String toString()
toString in class AbstractExprNodeObject.toString()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||