public class SubstringNode extends LeafNode
attribute, attributeType
annotations, assertionType, isSchemaAware
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, getAttribute, getAttributeType, isLeaf, setAttribute, setAttributeType
escapeFilterValue, get, getAnnotations, getAssertionType, isSchemaAware, printRefinementToBuffer, set
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) throws PatternSyntaxException
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 ExprNode
clone
in class AbstractExprNode
public final String getInitial()
public void setInitial(String initialPattern)
initialPattern
- The initial patternpublic 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 LeafNode
true
if both objects are equalObject.equals(java.lang.Object)
public int hashCode()
hashCode
in class LeafNode
Object.hashCode()
public String toString()
toString
in class AbstractExprNode
Object.toString()
Copyright © 2003-2014 The Apache Software Foundation. All Rights Reserved.