public class SubstringNode extends LeafNode
| Modifier and Type | Field and Description |
|---|---|
private List<String> |
anyPattern
List of fragments between wildcard
|
private String |
finalPattern
The end fragment after wildcard
|
private String |
initialPattern
The initial fragment before any wildcard
|
attribute, attributeTypeannotations, assertionType| Constructor and Description |
|---|
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.
|
| Modifier and Type | Method and Description |
|---|---|
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() |
accept, escapeFilterValue, escapeFilterValue, getAttribute, getAttributeType, isLeaf, isSchemaAware, setAttribute, setAttributeTypeget, getAnnotations, getAssertionType, printRefinementToBuffer, setprivate String initialPattern
private String finalPattern
public SubstringNode(AttributeType attributeType, String initialPattern, String finalPattern)
attributeType - the name of the attributeType to substring assertinitialPattern - the initial fragmentfinalPattern - the final fragmentpublic 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 assertpublic 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 fragmentpublic 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 fragmentpublic static Pattern getRegex(String initialPattern, String[] anyPattern, String finalPattern)
initialPattern - the initial fragment before wildcardsanyPattern - fragments surrounded by wildcards if anyfinalPattern - the final fragment after last wildcard if anyPatternSyntaxException - 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 patternpublic final Pattern getRegex(Normalizer normalizer) throws LdapException
normalizer - the normalizer to use for pattern component normalizationLdapException - 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()Copyright © 2003–2019 The Apache Software Foundation. All rights reserved.