You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@directory.apache.org by ak...@apache.org on 2008/03/20 21:54:59 UTC

svn commit: r639454 - /directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/filter/

Author: akarasulu
Date: Thu Mar 20 13:54:57 2008
New Revision: 639454

URL: http://svn.apache.org/viewvc?rev=639454&view=rev
Log:
making sure we use the AssertionType enum in getAssertionType on nodes

Added:
    directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/filter/AssertionType.java
      - copied, changed from r639006, directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/filter/AssertionEnum.java
Removed:
    directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/filter/AssertionEnum.java
Modified:
    directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/filter/AbstractExprNode.java
    directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/filter/AndNode.java
    directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/filter/ApproximateNode.java
    directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/filter/AssertionNode.java
    directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/filter/BranchNode.java
    directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/filter/EqualityNode.java
    directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/filter/ExprNode.java
    directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/filter/ExtensibleNode.java
    directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/filter/GreaterEqNode.java
    directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/filter/LeafNode.java
    directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/filter/LessEqNode.java
    directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/filter/NotNode.java
    directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/filter/OrNode.java
    directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/filter/PresenceNode.java
    directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/filter/ScopeNode.java
    directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/filter/SimpleNode.java
    directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/filter/SubstringNode.java

Modified: directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/filter/AbstractExprNode.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/filter/AbstractExprNode.java?rev=639454&r1=639453&r2=639454&view=diff
==============================================================================
--- directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/filter/AbstractExprNode.java (original)
+++ directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/filter/AbstractExprNode.java Thu Mar 20 13:54:57 2008
@@ -35,11 +35,24 @@
     /** The map of annotations */
     protected Map<String, Object> annotations;
 
+    protected final AssertionType assertionType;
+    
+    
     /**
      * Creates a node by setting abstract node type.
      */
-    protected AbstractExprNode()
+    protected AbstractExprNode( AssertionType assertionType )
     {
+        this.assertionType = assertionType;
+    }
+    
+    
+    /**
+     * @see ExprNode#getAssertionType()
+     */
+    public AssertionType getAssertionType()
+    {
+        return assertionType;
     }
 
     

Modified: directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/filter/AndNode.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/filter/AndNode.java?rev=639454&r1=639453&r2=639454&view=diff
==============================================================================
--- directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/filter/AndNode.java (original)
+++ directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/filter/AndNode.java Thu Mar 20 13:54:57 2008
@@ -36,9 +36,9 @@
      * 
      * @param childList the child nodes under this branch node.
      */
-    public AndNode( List<ExprNode> children)
+    public AndNode( List<ExprNode> children )
     {
-        super( children );
+        super( children, AssertionType.AND );
     }
 
 
@@ -56,9 +56,9 @@
      * 
      * @return the operator constant.
      */
-    public AssertionEnum getOperator()
+    public AssertionType getOperator()
     {
-        return AssertionEnum.AND;
+        return AssertionType.AND;
     }
 
 
@@ -152,7 +152,7 @@
     public int hashCode()
     {
         int hash = 37;
-        hash = hash*17 + AssertionEnum.AND.hashCode();
+        hash = hash*17 + AssertionType.AND.hashCode();
         hash = hash*17 + ( annotations == null ? 0 : annotations.hashCode() );
         return hash;
     }

Modified: directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/filter/ApproximateNode.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/filter/ApproximateNode.java?rev=639454&r1=639453&r2=639454&view=diff
==============================================================================
--- directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/filter/ApproximateNode.java (original)
+++ directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/filter/ApproximateNode.java Thu Mar 20 13:54:57 2008
@@ -36,7 +36,7 @@
      */
     public ApproximateNode( String attribute, byte[] value )
     {
-        super( attribute, value );
+        super( attribute, value, AssertionType.APPROXIMATE );
     }
 
 
@@ -48,7 +48,7 @@
      */
     public ApproximateNode( String attribute, String value )
     {
-        super( attribute, value );
+        super( attribute, value, AssertionType.APPROXIMATE );
     }
 
 

Modified: directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/filter/AssertionNode.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/filter/AssertionNode.java?rev=639454&r1=639453&r2=639454&view=diff
==============================================================================
--- directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/filter/AssertionNode.java (original)
+++ directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/filter/AssertionNode.java Thu Mar 20 13:54:57 2008
@@ -48,7 +48,7 @@
      * 
      * @param assertion the arbitrary selection logic.
      */
-    public AssertionNode(Assertion assertion)
+    public AssertionNode( Assertion assertion )
     {
         this( assertion, "ASSERTION" );
     }
@@ -63,7 +63,7 @@
      */
     public AssertionNode( Assertion assertion, String desc )
     {
-        super();
+        super( AssertionType.ASSERTION );
         this.desc = desc;
         this.assertion = assertion;
 

Copied: directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/filter/AssertionType.java (from r639006, directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/filter/AssertionEnum.java)
URL: http://svn.apache.org/viewvc/directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/filter/AssertionType.java?p2=directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/filter/AssertionType.java&p1=directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/filter/AssertionEnum.java&r1=639006&r2=639454&rev=639454&view=diff
==============================================================================
--- directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/filter/AssertionEnum.java (original)
+++ directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/filter/AssertionType.java Thu Mar 20 13:54:57 2008
@@ -26,7 +26,7 @@
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  * @version $Rev: 470116 $
  */
-public enum AssertionEnum {
+public enum AssertionType {
     /** equality assertion node */
     EQUALITY(0),
 
@@ -72,7 +72,7 @@
      * 
      * @param value the integer value of the enumeration.
      */
-    private AssertionEnum( int value )
+    private AssertionType( int value )
     {
        this.value = value;
     }

Modified: directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/filter/BranchNode.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/filter/BranchNode.java?rev=639454&r1=639453&r2=639454&view=diff
==============================================================================
--- directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/filter/BranchNode.java (original)
+++ directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/filter/BranchNode.java Thu Mar 20 13:54:57 2008
@@ -42,9 +42,9 @@
      * 
      * @param childList the child nodes under this branch node.
      */
-    public BranchNode( List<ExprNode> children)
+    public BranchNode( List<ExprNode> children, AssertionType assertionType )
     {
-        super();
+        super( assertionType );
 
         if ( null == children )
         {
@@ -60,9 +60,9 @@
     /**
      * Creates a BranchNode using a logical operator.
      */
-    public BranchNode()
+    public BranchNode( AssertionType assertionType )
     {
-        this( null );
+        this( null, assertionType );
     }
 
     /**

Modified: directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/filter/EqualityNode.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/filter/EqualityNode.java?rev=639454&r1=639453&r2=639454&view=diff
==============================================================================
--- directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/filter/EqualityNode.java (original)
+++ directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/filter/EqualityNode.java Thu Mar 20 13:54:57 2008
@@ -36,7 +36,7 @@
      */
     public EqualityNode( String attribute, byte[] value )
     {
-        super( attribute, value );
+        super( attribute, value, AssertionType.EQUALITY );
     }
 
 
@@ -48,7 +48,7 @@
      */
     public EqualityNode( String attribute, String value )
     {
-        super( attribute, value );
+        super( attribute, value, AssertionType.EQUALITY );
     }
 
 

Modified: directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/filter/ExprNode.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/filter/ExprNode.java?rev=639454&r1=639453&r2=639454&view=diff
==============================================================================
--- directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/filter/ExprNode.java (original)
+++ directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/filter/ExprNode.java Thu Mar 20 13:54:57 2008
@@ -55,10 +55,18 @@
      */
     boolean isLeaf();
 
+    
+    /**
+     * Gets the assertion type of this node. Make it possible to use switch
+     * statements on the node type.
+     * 
+     * @return the assertion type
+     */
+    AssertionType getAssertionType();
 
     /**
      * Recursively appends the refinement string representation of this node and its
-     * descendents in prefix notation to a buffer.
+     * descendants in prefix notation to a buffer.
      * 
      * @param buf the buffer to append to.
      * @throws UnsupportedOperationException if this node isn't a part of a refinement.

Modified: directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/filter/ExtensibleNode.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/filter/ExtensibleNode.java?rev=639454&r1=639453&r2=639454&view=diff
==============================================================================
--- directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/filter/ExtensibleNode.java (original)
+++ directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/filter/ExtensibleNode.java Thu Mar 20 13:54:57 2008
@@ -48,7 +48,7 @@
      */
     public ExtensibleNode( String attribute )
     {
-        super( attribute );
+        super( attribute, AssertionType.EXTENSIBLE );
         
         dnAttributes = false;
     }
@@ -77,7 +77,7 @@
      */
     public ExtensibleNode( String attribute, byte[] value, String matchingRuleId, boolean dnAttributes )
     {
-        super( attribute );
+        super( attribute, AssertionType.EXTENSIBLE );
 
         if ( value != null )
         {

Modified: directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/filter/GreaterEqNode.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/filter/GreaterEqNode.java?rev=639454&r1=639453&r2=639454&view=diff
==============================================================================
--- directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/filter/GreaterEqNode.java (original)
+++ directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/filter/GreaterEqNode.java Thu Mar 20 13:54:57 2008
@@ -36,7 +36,7 @@
      */
     public GreaterEqNode( String attribute, byte[] value )
     {
-        super( attribute, value );
+        super( attribute, value, AssertionType.GREATEREQ );
     }
 
 
@@ -48,7 +48,7 @@
      */
     public GreaterEqNode( String attribute, String value )
     {
-        super( attribute, value );
+        super( attribute, value, AssertionType.GREATEREQ );
     }
 
 

Modified: directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/filter/LeafNode.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/filter/LeafNode.java?rev=639454&r1=639453&r2=639454&view=diff
==============================================================================
--- directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/filter/LeafNode.java (original)
+++ directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/filter/LeafNode.java Thu Mar 20 13:54:57 2008
@@ -38,9 +38,9 @@
      * @param attribute the attribute this node is based on
      * @param type the type of this leaf node
      */
-    protected LeafNode( String attribute )
+    protected LeafNode( String attribute, AssertionType assertionType )
     {
-        super();
+        super( assertionType );
         this.attribute = attribute;
     }
 

Modified: directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/filter/LessEqNode.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/filter/LessEqNode.java?rev=639454&r1=639453&r2=639454&view=diff
==============================================================================
--- directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/filter/LessEqNode.java (original)
+++ directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/filter/LessEqNode.java Thu Mar 20 13:54:57 2008
@@ -36,7 +36,7 @@
      */
     public LessEqNode( String attribute, byte[] value )
     {
-        super( attribute, value );
+        super( attribute, value, AssertionType.LESSEQ );
     }
 
 
@@ -48,7 +48,7 @@
      */
     public LessEqNode( String attribute, String value )
     {
-        super( attribute, value );
+        super( attribute, value, AssertionType.LESSEQ );
     }
 
     

Modified: directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/filter/NotNode.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/filter/NotNode.java?rev=639454&r1=639453&r2=639454&view=diff
==============================================================================
--- directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/filter/NotNode.java (original)
+++ directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/filter/NotNode.java Thu Mar 20 13:54:57 2008
@@ -38,9 +38,9 @@
      * 
      * @param childList the child nodes under this branch node.
      */
-    public NotNode( List<ExprNode> children)
+    public NotNode( List<ExprNode> children )
     {
-        super();
+        super( AssertionType.NOT );
         
     	if ( this.children.size() > 1 )
     	{
@@ -110,9 +110,9 @@
      * 
      * @return the operator constant.
      */
-    public AssertionEnum getOperator()
+    public AssertionType getOperator()
     {
-        return AssertionEnum.NOT;
+        return AssertionType.NOT;
     }
 
 
@@ -202,7 +202,7 @@
     public int hashCode()
     {
         int hash = 37;
-        hash = hash*17 + AssertionEnum.NOT.hashCode();
+        hash = hash*17 + AssertionType.NOT.hashCode();
         hash = hash*17 + ( annotations == null ? 0 : annotations.hashCode() );
         return hash;
     }

Modified: directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/filter/OrNode.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/filter/OrNode.java?rev=639454&r1=639453&r2=639454&view=diff
==============================================================================
--- directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/filter/OrNode.java (original)
+++ directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/filter/OrNode.java Thu Mar 20 13:54:57 2008
@@ -38,7 +38,7 @@
      */
     public OrNode( List<ExprNode> children)
     {
-        super( children );
+        super( children, AssertionType.OR );
     }
 
 
@@ -58,9 +58,9 @@
      * 
      * @return the operator constant.
      */
-    public AssertionEnum getOperator()
+    public AssertionType getOperator()
     {
-        return AssertionEnum.OR;
+        return AssertionType.OR;
     }
 
 
@@ -154,7 +154,7 @@
     public int hashCode()
     {
         int hash = 37;
-        hash = hash*17 + AssertionEnum.OR.hashCode();
+        hash = hash*17 + AssertionType.OR.hashCode();
         hash = hash*17 + ( annotations == null ? 0 : annotations.hashCode() );
         return hash;
     }

Modified: directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/filter/PresenceNode.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/filter/PresenceNode.java?rev=639454&r1=639453&r2=639454&view=diff
==============================================================================
--- directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/filter/PresenceNode.java (original)
+++ directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/filter/PresenceNode.java Thu Mar 20 13:54:57 2008
@@ -36,7 +36,7 @@
      */
     public PresenceNode( String attribute )
     {
-        super( attribute );
+        super( attribute, AssertionType.PRESENCE );
     }
 
 

Modified: directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/filter/ScopeNode.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/filter/ScopeNode.java?rev=639454&r1=639453&r2=639454&view=diff
==============================================================================
--- directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/filter/ScopeNode.java (original)
+++ directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/filter/ScopeNode.java Thu Mar 20 13:54:57 2008
@@ -53,7 +53,7 @@
      */
     public ScopeNode( AliasDerefMode aliasDerefAliases, String baseDn, int scope )
     {
-        super();
+        super( AssertionType.SCOPE );
         this.scope = scope;
         this.baseDn = baseDn;
         this.aliasDerefAliases = aliasDerefAliases;

Modified: directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/filter/SimpleNode.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/filter/SimpleNode.java?rev=639454&r1=639453&r2=639454&view=diff
==============================================================================
--- directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/filter/SimpleNode.java (original)
+++ directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/filter/SimpleNode.java Thu Mar 20 13:54:57 2008
@@ -43,9 +43,9 @@
      * @param attribute the attribute name
      * @param value the value to test for
      */
-    protected SimpleNode( String attribute, byte[] value )
+    protected SimpleNode( String attribute, byte[] value, AssertionType assertionType )
     {
-        super( attribute );
+        super( attribute, assertionType );
         this.value = value;
     }
 
@@ -56,9 +56,9 @@
      * @param attribute the attribute name
      * @param value the value to test for
      */
-    protected SimpleNode( String attribute, String value )
+    protected SimpleNode( String attribute, String value, AssertionType assertionType )
     {
-        super( attribute );
+        super( attribute, assertionType );
         this.value = value;
     }
 

Modified: directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/filter/SubstringNode.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/filter/SubstringNode.java?rev=639454&r1=639453&r2=639454&view=diff
==============================================================================
--- directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/filter/SubstringNode.java (original)
+++ directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/filter/SubstringNode.java Thu Mar 20 13:54:57 2008
@@ -58,7 +58,7 @@
      */
     public SubstringNode( String attribute, String initialPattern, String finalPattern )
     {
-        super( attribute );
+        super( attribute, AssertionType.SUBSTRING );
 
         anyPattern = new ArrayList<String>( 2 );
         this.finalPattern = finalPattern;
@@ -75,7 +75,7 @@
      */
     public SubstringNode( String attribute )
     {
-        super( attribute );
+        super( attribute, AssertionType.SUBSTRING );
 
         anyPattern = new ArrayList<String>( 2 );
         this.finalPattern = null;
@@ -94,7 +94,7 @@
      */
     public SubstringNode( List<String> anyPattern, String attribute, String initialPattern, String finalPattern )
     {
-        super( attribute );
+        super( attribute, AssertionType.SUBSTRING );
 
         this.anyPattern = anyPattern;
         this.finalPattern = finalPattern;