directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From seelm...@apache.org
Subject svn commit: r593835 - in /directory/studio/trunk: studio-aciitemeditor/src/main/java/org/apache/directory/studio/aciitemeditor/model/ studio-aciitemeditor/src/main/java/org/apache/directory/studio/aciitemeditor/valueeditors/ studio-aciitemeditor/src/ma...
Date Sun, 11 Nov 2007 00:40:57 GMT
Author: seelmann
Date: Sat Nov 10 16:40:56 2007
New Revision: 593835

URL: http://svn.apache.org/viewvc?rev=593835&view=rev
Log:
Updated to shared-ldap 0.9.8-SNAPSHOT

Modified:
    directory/studio/trunk/studio-aciitemeditor/src/main/java/org/apache/directory/studio/aciitemeditor/model/ProtectedItemWrapper.java
    directory/studio/trunk/studio-aciitemeditor/src/main/java/org/apache/directory/studio/aciitemeditor/model/UserClassWrapper.java
    directory/studio/trunk/studio-aciitemeditor/src/main/java/org/apache/directory/studio/aciitemeditor/valueeditors/SubtreeSpecificationDialog.java
    directory/studio/trunk/studio-aciitemeditor/src/main/java/org/apache/directory/studio/aciitemeditor/widgets/ACIItemGeneralComposite.java
    directory/studio/trunk/studio-aciitemeditor/src/main/java/org/apache/directory/studio/aciitemeditor/widgets/ACIItemSourceEditorComposite.java
    directory/studio/trunk/studio-aciitemeditor/src/main/java/org/apache/directory/studio/aciitemeditor/widgets/ACIItemVisualEditorComposite.java
    directory/studio/trunk/studio-jars/.classpath
    directory/studio/trunk/studio-jars/META-INF/MANIFEST.MF
    directory/studio/trunk/studio-jars/build.properties
    directory/studio/trunk/studio-jars/ivy.xml
    directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/ExportDsmlJob.java

Modified: directory/studio/trunk/studio-aciitemeditor/src/main/java/org/apache/directory/studio/aciitemeditor/model/ProtectedItemWrapper.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-aciitemeditor/src/main/java/org/apache/directory/studio/aciitemeditor/model/ProtectedItemWrapper.java?rev=593835&r1=593834&r2=593835&view=diff
==============================================================================
--- directory/studio/trunk/studio-aciitemeditor/src/main/java/org/apache/directory/studio/aciitemeditor/model/ProtectedItemWrapper.java
(original)
+++ directory/studio/trunk/studio-aciitemeditor/src/main/java/org/apache/directory/studio/aciitemeditor/model/ProtectedItemWrapper.java
Sat Nov 10 16:40:56 2007
@@ -233,9 +233,7 @@
         else if ( item.getClass() == ProtectedItem.RangeOfValues.class )
         {
             ProtectedItem.RangeOfValues rov = ( ProtectedItem.RangeOfValues ) item;
-            StringBuffer buffer = new StringBuffer();
-            rov.getFilter().printToBuffer( buffer );
-            values.add( buffer.toString() );
+            values.add( rov.getFilter().toString() );
         }
         else if ( item.getClass() == ProtectedItem.MaxValueCount.class )
         {
@@ -243,9 +241,7 @@
             for ( Iterator it = mvc.iterator(); it.hasNext(); )
             {
                 ProtectedItem.MaxValueCountItem mvci = ( ProtectedItem.MaxValueCountItem
) it.next();
-                StringBuffer buffer = new StringBuffer();
-                mvci.printToBuffer( buffer );
-                values.add( buffer.toString() );
+                values.add( mvci.toString() );
             }
         }
         else if ( item.getClass() == ProtectedItem.MaxImmSub.class )
@@ -259,17 +255,13 @@
             for ( Iterator it = rb.iterator(); it.hasNext(); )
             {
                 ProtectedItem.RestrictedByItem rbi = ( ProtectedItem.RestrictedByItem ) it.next();
-                StringBuffer buffer = new StringBuffer();
-                rbi.printToBuffer( buffer );
-                values.add( buffer.toString() );
+                values.add( rbi.toString() );
             }
         }
         else if ( item.getClass() == ProtectedItem.Classes.class )
         {
             ProtectedItem.Classes classes = ( ProtectedItem.Classes ) item;
-            StringBuffer buffer = new StringBuffer();
-            classes.getClasses().printRefinementToBuffer( buffer );
-            values.add( buffer.toString() );
+            values.add( classes.toString() );
         }
 
     }

Modified: directory/studio/trunk/studio-aciitemeditor/src/main/java/org/apache/directory/studio/aciitemeditor/model/UserClassWrapper.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-aciitemeditor/src/main/java/org/apache/directory/studio/aciitemeditor/model/UserClassWrapper.java?rev=593835&r1=593834&r2=593835&view=diff
==============================================================================
--- directory/studio/trunk/studio-aciitemeditor/src/main/java/org/apache/directory/studio/aciitemeditor/model/UserClassWrapper.java
(original)
+++ directory/studio/trunk/studio-aciitemeditor/src/main/java/org/apache/directory/studio/aciitemeditor/model/UserClassWrapper.java
Sat Nov 10 16:40:56 2007
@@ -187,7 +187,7 @@
             Collection<SubtreeSpecification> subtreeSpecifications = subtree.getSubtreeSpecifications();
             for ( SubtreeSpecification subtreeSpecification : subtreeSpecifications )
             {
-                StringBuffer buffer = new StringBuffer();
+                StringBuilder buffer = new StringBuilder();
                 subtreeSpecification.printToBuffer( buffer );
                 String s = buffer.toString();
                 values.add( s );

Modified: directory/studio/trunk/studio-aciitemeditor/src/main/java/org/apache/directory/studio/aciitemeditor/valueeditors/SubtreeSpecificationDialog.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-aciitemeditor/src/main/java/org/apache/directory/studio/aciitemeditor/valueeditors/SubtreeSpecificationDialog.java?rev=593835&r1=593834&r2=593835&view=diff
==============================================================================
--- directory/studio/trunk/studio-aciitemeditor/src/main/java/org/apache/directory/studio/aciitemeditor/valueeditors/SubtreeSpecificationDialog.java
(original)
+++ directory/studio/trunk/studio-aciitemeditor/src/main/java/org/apache/directory/studio/aciitemeditor/valueeditors/SubtreeSpecificationDialog.java
Sat Nov 10 16:40:56 2007
@@ -182,7 +182,7 @@
     {
         // set return value
         //returnValue = buildSubreeSpecification();
-        StringBuffer sb = new StringBuffer();
+        StringBuilder sb = new StringBuilder();
         subtreeSpecification.printToBuffer( sb );
         returnValue = sb.toString();
 
@@ -412,7 +412,7 @@
         refinementText.setLayoutData( gd );
         try
         {
-            StringBuffer refinementBuffer = new StringBuffer();
+            StringBuilder refinementBuffer = new StringBuilder();
             if ( subtreeSpecification.getRefinement() != null )
             {
                 subtreeSpecification.getRefinement().printRefinementToBuffer( refinementBuffer
);
@@ -434,12 +434,12 @@
             .getString( "SubtreeValueEditor.SubtreeValueEditor.label.filter" ), 2 ); //$NON-NLS-1$
 
         // filter widget
-        StringBuffer filterBuffer = new StringBuffer();
+        String filter = "";
         if ( subtreeSpecification.getRefinement() != null )
         {
-            subtreeSpecification.getRefinement().printToBuffer( filterBuffer );
+            filter = subtreeSpecification.getRefinement().toString();
         }
-        filterWidget = new FilterWidget( connection, filterBuffer.toString().trim() );
+        filterWidget = new FilterWidget( connection, filter );
         filterWidget.createWidget( composite );
         filterButton.setSelection( !refinementButton.getSelection() );
         filterWidget.setEnabled( !refinementButton.getSelection() );

Modified: directory/studio/trunk/studio-aciitemeditor/src/main/java/org/apache/directory/studio/aciitemeditor/widgets/ACIItemGeneralComposite.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-aciitemeditor/src/main/java/org/apache/directory/studio/aciitemeditor/widgets/ACIItemGeneralComposite.java?rev=593835&r1=593834&r2=593835&view=diff
==============================================================================
--- directory/studio/trunk/studio-aciitemeditor/src/main/java/org/apache/directory/studio/aciitemeditor/widgets/ACIItemGeneralComposite.java
(original)
+++ directory/studio/trunk/studio-aciitemeditor/src/main/java/org/apache/directory/studio/aciitemeditor/widgets/ACIItemGeneralComposite.java
Sat Nov 10 16:40:56 2007
@@ -23,7 +23,7 @@
 import java.util.ArrayList;
 import java.util.List;
 
-import org.apache.directory.shared.ldap.aci.AuthenticationLevel;
+import org.apache.directory.shared.ldap.constants.AuthenticationLevel;
 import org.eclipse.jface.viewers.ArrayContentProvider;
 import org.eclipse.jface.viewers.ComboViewer;
 import org.eclipse.jface.viewers.IStructuredSelection;

Modified: directory/studio/trunk/studio-aciitemeditor/src/main/java/org/apache/directory/studio/aciitemeditor/widgets/ACIItemSourceEditorComposite.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-aciitemeditor/src/main/java/org/apache/directory/studio/aciitemeditor/widgets/ACIItemSourceEditorComposite.java?rev=593835&r1=593834&r2=593835&view=diff
==============================================================================
--- directory/studio/trunk/studio-aciitemeditor/src/main/java/org/apache/directory/studio/aciitemeditor/widgets/ACIItemSourceEditorComposite.java
(original)
+++ directory/studio/trunk/studio-aciitemeditor/src/main/java/org/apache/directory/studio/aciitemeditor/widgets/ACIItemSourceEditorComposite.java
Sat Nov 10 16:40:56 2007
@@ -146,12 +146,12 @@
         ACIItemParser parser = Activator.getDefault().getACIItemParser();
         ACIItem aciItem = parser.parse( input );
 
-        StringBuffer buffer = new StringBuffer();
+        String aci = "";
         if ( aciItem != null )
         {
-            aciItem.printToBuffer( buffer );
+            aci = aciItem.toString();
         }
-        return buffer.toString();
+        return aci;
     }
 
 

Modified: directory/studio/trunk/studio-aciitemeditor/src/main/java/org/apache/directory/studio/aciitemeditor/widgets/ACIItemVisualEditorComposite.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-aciitemeditor/src/main/java/org/apache/directory/studio/aciitemeditor/widgets/ACIItemVisualEditorComposite.java?rev=593835&r1=593834&r2=593835&view=diff
==============================================================================
--- directory/studio/trunk/studio-aciitemeditor/src/main/java/org/apache/directory/studio/aciitemeditor/widgets/ACIItemVisualEditorComposite.java
(original)
+++ directory/studio/trunk/studio-aciitemeditor/src/main/java/org/apache/directory/studio/aciitemeditor/widgets/ACIItemVisualEditorComposite.java
Sat Nov 10 16:40:56 2007
@@ -25,9 +25,9 @@
 
 import org.apache.directory.shared.ldap.aci.ACIItem;
 import org.apache.directory.shared.ldap.aci.ACIItemParser;
-import org.apache.directory.shared.ldap.aci.AuthenticationLevel;
 import org.apache.directory.shared.ldap.aci.ItemFirstACIItem;
 import org.apache.directory.shared.ldap.aci.UserFirstACIItem;
+import org.apache.directory.shared.ldap.constants.AuthenticationLevel;
 import org.apache.directory.studio.aciitemeditor.ACIItemValueWithContext;
 import org.eclipse.swt.SWT;
 import org.eclipse.swt.custom.ScrolledComposite;
@@ -237,12 +237,12 @@
             aciItem = null;
         }
 
-        StringBuffer buffer = new StringBuffer();
+        String aci = "";
         if ( aciItem != null )
         {
-            aciItem.printToBuffer( buffer );
+            aci = aciItem.toString();
         }
-        return buffer.toString();
+        return aci;
     }
 
 

Modified: directory/studio/trunk/studio-jars/.classpath
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-jars/.classpath?rev=593835&r1=593834&r2=593835&view=diff
==============================================================================
--- directory/studio/trunk/studio-jars/.classpath (original)
+++ directory/studio/trunk/studio-jars/.classpath Sat Nov 10 16:40:56 2007
@@ -1,16 +1,17 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <classpath>
+	<classpathentry exported="true" kind="lib" path="lib/studio-dsml-parser-0.4.1.jar"/>
+	<classpathentry exported="true" kind="lib" path="lib/shared-asn1-0.9.8-SNAPSHOT.jar"/>
+	<classpathentry exported="true" kind="lib" path="lib/shared-ldap-0.9.8-SNAPSHOT.jar"/>
+	<classpathentry exported="true" kind="lib" path="lib/shared-ldap-constants-0.9.8-SNAPSHOT.jar"/>
 	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
 	<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
 	<classpathentry exported="true" kind="lib" path="lib/xpp3-1.1.3_8.jar"/>
-	<classpathentry exported="true" kind="lib" path="lib/studio-dsml-parser-0.4.jar"/>
-	<classpathentry exported="true" kind="lib" path="lib/shared-ldap-0.9.7-SNAPSHOT.jar"/>
-	<classpathentry exported="true" kind="lib" path="lib/shared-asn1-0.9.7-SNAPSHOT.jar"/>
 	<classpathentry exported="true" kind="lib" path="lib/nlog4j-1.2.25.jar"/>
 	<classpathentry exported="true" kind="lib" path="lib/dom4j-1.6.1.jar"/>
 	<classpathentry exported="true" kind="lib" path="lib/commons-collections-3.2.jar"/>
 	<classpathentry exported="true" kind="lib" path="lib/antlr-2.7.6.jar"/>
 	<classpathentry kind="src" path="src/main/java"/>
-	<classpathentry kind="output" path="target/classes"/>
 	<classpathentry kind="src" output="target/test-classes" path="src/test/java"/>
+	<classpathentry kind="output" path="target/classes"/>
 </classpath>

Modified: directory/studio/trunk/studio-jars/META-INF/MANIFEST.MF
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-jars/META-INF/MANIFEST.MF?rev=593835&r1=593834&r2=593835&view=diff
==============================================================================
--- directory/studio/trunk/studio-jars/META-INF/MANIFEST.MF (original)
+++ directory/studio/trunk/studio-jars/META-INF/MANIFEST.MF Sat Nov 10 16:40:56 2007
@@ -8,11 +8,13 @@
 Bundle-ClassPath: lib/antlr-2.7.6.jar,
  lib/commons-collections-3.2.jar,
  lib/dom4j-1.6.1.jar,
- lib/studio-dsml-parser-0.4.jar,
  lib/nlog4j-1.2.25.jar,
  lib/xpp3-1.1.3_8.jar,
- lib/shared-asn1-0.9.7-SNAPSHOT.jar,
- lib/shared-ldap-0.9.7-SNAPSHOT.jar
+ lib/shared-asn1-0.9.8-SNAPSHOT.jar,
+ lib/shared-ldap-0.9.8-SNAPSHOT.jar,
+ lib/shared-ldap-constants-0.9.8-SNAPSHOT.jar,
+ lib/studio-dsml-parser-0.4.1.jar,
+ .
 Export-Package: antlr,
  antlr.ASdebug,
  antlr.actions.cpp,
@@ -57,6 +59,7 @@
  org.apache.directory.shared.ldap.codec.add,
  org.apache.directory.shared.ldap.codec.bind,
  org.apache.directory.shared.ldap.codec.compare,
+ org.apache.directory.shared.ldap.codec.controls,
  org.apache.directory.shared.ldap.codec.del,
  org.apache.directory.shared.ldap.codec.extended,
  org.apache.directory.shared.ldap.codec.extended.operations,
@@ -66,6 +69,10 @@
  org.apache.directory.shared.ldap.codec.search.controls,
  org.apache.directory.shared.ldap.codec.unbind,
  org.apache.directory.shared.ldap.codec.util,
+ org.apache.directory.shared.ldap.common,
+ org.apache.directory.shared.ldap.constants,
+ org.apache.directory.shared.ldap.entry,
+ org.apache.directory.shared.ldap.entry.client,
  org.apache.directory.shared.ldap.exception,
  org.apache.directory.shared.ldap.filter,
  org.apache.directory.shared.ldap.ldif,

Modified: directory/studio/trunk/studio-jars/build.properties
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-jars/build.properties?rev=593835&r1=593834&r2=593835&view=diff
==============================================================================
--- directory/studio/trunk/studio-jars/build.properties (original)
+++ directory/studio/trunk/studio-jars/build.properties Sat Nov 10 16:40:56 2007
@@ -5,8 +5,10 @@
                lib/studio-dsml-parser-0.4.jar,\
                lib/nlog4j-1.2.25.jar,\
                lib/xpp3-1.1.3_8.jar,\
-               lib/shared-asn1-0.9.7-SNAPSHOT.jar,\
-               lib/shared-ldap-0.9.7-SNAPSHOT.jar,\
-               .
+               .,\
+               lib/shared-asn1-0.9.8-SNAPSHOT.jar,\
+               lib/shared-ldap-0.9.8-SNAPSHOT.jar,\
+               lib/shared-ldap-constants-0.9.8-SNAPSHOT.jar,\
+               lib/studio-dsml-parser-0.4.1.jar
 source.. = src/main/java/,\
            src/test/java/

Modified: directory/studio/trunk/studio-jars/ivy.xml
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-jars/ivy.xml?rev=593835&r1=593834&r2=593835&view=diff
==============================================================================
--- directory/studio/trunk/studio-jars/ivy.xml (original)
+++ directory/studio/trunk/studio-jars/ivy.xml Sat Nov 10 16:40:56 2007
@@ -20,6 +20,6 @@
 	<info organisation="org.apache.directory.studio" module="studio-jars"/>
 	<dependencies>
 		<dependency org="antlr" name="antlr" rev="2.7.6"/>
-    	<dependency org="org.apache.directory.studio" name="studio-dsml-parser" rev="0.4"/>
+    	<dependency org="org.apache.directory.studio" name="studio-dsml-parser" rev="0.4.1"/>
     </dependencies>
-</ivy-module>
\ No newline at end of file
+</ivy-module>

Modified: directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/ExportDsmlJob.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/ExportDsmlJob.java?rev=593835&r1=593834&r2=593835&view=diff
==============================================================================
--- directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/ExportDsmlJob.java
(original)
+++ directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/ExportDsmlJob.java
Sat Nov 10 16:40:56 2007
@@ -41,11 +41,17 @@
 import org.apache.directory.shared.ldap.codec.search.PresentFilter;
 import org.apache.directory.shared.ldap.codec.search.SearchRequest;
 import org.apache.directory.shared.ldap.codec.search.SubstringFilter;
+import org.apache.directory.shared.ldap.filter.AndNode;
+import org.apache.directory.shared.ldap.filter.ApproximateNode;
 import org.apache.directory.shared.ldap.filter.BranchNode;
+import org.apache.directory.shared.ldap.filter.EqualityNode;
 import org.apache.directory.shared.ldap.filter.ExprNode;
 import org.apache.directory.shared.ldap.filter.ExtensibleNode;
 import org.apache.directory.shared.ldap.filter.FilterParser;
-import org.apache.directory.shared.ldap.filter.FilterParserImpl;
+import org.apache.directory.shared.ldap.filter.GreaterEqNode;
+import org.apache.directory.shared.ldap.filter.LessEqNode;
+import org.apache.directory.shared.ldap.filter.NotNode;
+import org.apache.directory.shared.ldap.filter.OrNode;
 import org.apache.directory.shared.ldap.filter.PresenceNode;
 import org.apache.directory.shared.ldap.filter.SimpleNode;
 import org.apache.directory.shared.ldap.filter.SubstringNode;
@@ -253,10 +259,7 @@
     public static Filter convertToSharedLdapFilter( String filter ) throws IOException, ParseException,
         DecoderException
     {
-        FilterParser filterParser = new FilterParserImpl();
-
-        ExprNode exprNode = filterParser.parse( filter );
-
+        ExprNode exprNode = FilterParser.parse( filter );
         return convertToSharedLdapFilter( exprNode );
     }
 
@@ -278,36 +281,35 @@
         {
             BranchNode branchNode = ( BranchNode ) exprNode;
 
-            switch ( branchNode.getOperator() )
+            if( branchNode instanceof AndNode )
             {
-                case AND:
-                    AndFilter andFilter = new AndFilter();
-                    sharedLdapFilter = andFilter;
-
-                    List<Filter> andFilters = iterateOnFilters( branchNode.getChildren()
);
-                    for ( int i = 0; i < andFilters.size(); i++ )
-                    {
-                        andFilter.addFilter( andFilters.get( i ) );
-                    }
-                    break;
-
-                case OR:
-                    OrFilter orFilter = new OrFilter();
-                    sharedLdapFilter = orFilter;
-
-                    List<Filter> orFilters = iterateOnFilters( branchNode.getChildren()
);
-                    for ( int i = 0; i < orFilters.size(); i++ )
-                    {
-                        orFilter.addFilter( orFilters.get( i ) );
-                    }
-                    break;
-                case NOT:
-                    NotFilter notFilter = new NotFilter();
-                    sharedLdapFilter = notFilter;
-
-                    List<Filter> notFilters = iterateOnFilters( branchNode.getChildren()
);
-                    notFilter.setNotFilter( notFilters.get( 0 ) );
-                    break;
+                AndFilter andFilter = new AndFilter();
+                sharedLdapFilter = andFilter;
+                
+                List<Filter> andFilters = iterateOnFilters( branchNode.getChildren()
);
+                for ( int i = 0; i < andFilters.size(); i++ )
+                {
+                    andFilter.addFilter( andFilters.get( i ) );
+                }
+            }
+            else if( branchNode instanceof OrNode )
+            {
+                OrFilter orFilter = new OrFilter();
+                sharedLdapFilter = orFilter;
+                
+                List<Filter> orFilters = iterateOnFilters( branchNode.getChildren()
);
+                for ( int i = 0; i < orFilters.size(); i++ )
+                {
+                    orFilter.addFilter( orFilters.get( i ) );
+                }
+            }
+            else if( branchNode instanceof NotNode )
+            {
+                NotFilter notFilter = new NotFilter();
+                sharedLdapFilter = notFilter;
+                
+                List<Filter> notFilters = iterateOnFilters( branchNode.getChildren()
);
+                notFilter.setNotFilter( notFilters.get( 0 ) );
             }
         }
         else if ( exprNode instanceof PresenceNode )
@@ -323,31 +325,29 @@
         {
             SimpleNode simpleNode = ( SimpleNode ) exprNode;
 
-            switch ( simpleNode.getAssertionType() )
+            if ( simpleNode instanceof ApproximateNode )
             {
-                case APPROXIMATE:
-                    AttributeValueAssertionFilter approxMatchFilter = createAttributeValueAssertionFilter(
simpleNode,
-                        LdapConstants.APPROX_MATCH_FILTER );
-                    sharedLdapFilter = approxMatchFilter;
-                    break;
-
-                case EQUALITY:
-                    AttributeValueAssertionFilter equalityMatchFilter = createAttributeValueAssertionFilter(
-                        simpleNode, LdapConstants.EQUALITY_MATCH_FILTER );
-                    sharedLdapFilter = equalityMatchFilter;
-                    break;
-
-                case GREATEREQ:
-                    AttributeValueAssertionFilter greaterOrEqualFilter = createAttributeValueAssertionFilter(
-                        simpleNode, LdapConstants.GREATER_OR_EQUAL_FILTER );
-                    sharedLdapFilter = greaterOrEqualFilter;
-                    break;
-
-                case LESSEQ:
-                    AttributeValueAssertionFilter lessOrEqualFilter = createAttributeValueAssertionFilter(
simpleNode,
-                        LdapConstants.LESS_OR_EQUAL_FILTER );
-                    sharedLdapFilter = lessOrEqualFilter;
-                    break;
+                AttributeValueAssertionFilter approxMatchFilter = createAttributeValueAssertionFilter(
simpleNode,
+                    LdapConstants.APPROX_MATCH_FILTER );
+                sharedLdapFilter = approxMatchFilter;
+            }
+            else if ( simpleNode instanceof EqualityNode )
+            {
+                AttributeValueAssertionFilter equalityMatchFilter = createAttributeValueAssertionFilter(
+                    simpleNode, LdapConstants.EQUALITY_MATCH_FILTER );
+                sharedLdapFilter = equalityMatchFilter;
+            }
+            else if ( simpleNode instanceof GreaterEqNode )
+            {
+                AttributeValueAssertionFilter greaterOrEqualFilter = createAttributeValueAssertionFilter(
+                    simpleNode, LdapConstants.GREATER_OR_EQUAL_FILTER );
+                sharedLdapFilter = greaterOrEqualFilter;
+            }
+            else if ( simpleNode instanceof LessEqNode )
+            {
+                AttributeValueAssertionFilter lessOrEqualFilter = createAttributeValueAssertionFilter(
simpleNode,
+                    LdapConstants.LESS_OR_EQUAL_FILTER );
+                sharedLdapFilter = lessOrEqualFilter;
             }
         }
         else if ( exprNode instanceof ExtensibleNode )
@@ -357,7 +357,7 @@
             ExtensibleMatchFilter extensibleMatchFilter = new ExtensibleMatchFilter();
             sharedLdapFilter = extensibleMatchFilter;
 
-            extensibleMatchFilter.setDnAttributes( extensibleNode.dnAttributes() );
+            extensibleMatchFilter.setDnAttributes( extensibleNode.hasDnAttributes() );
             extensibleMatchFilter.setMatchingRule( extensibleNode.getMatchingRuleId() );
             extensibleMatchFilter.setMatchValue( extensibleNode.getValue() );
             extensibleMatchFilter.setType( extensibleNode.getAttribute() );
@@ -372,10 +372,10 @@
             substringFilter.setType( substringNode.getAttribute() );
             substringFilter.setInitialSubstrings( substringNode.getInitial() );
             substringFilter.setFinalSubstrings( substringNode.getFinal() );
-            List anys = substringNode.getAny();
+            List<String> anys = substringNode.getAny();
             for ( int i = 0; i < anys.size(); i++ )
             {
-                substringFilter.addAnySubstrings( ( String ) anys.get( i ) );
+                substringFilter.addAnySubstrings( anys.get( i ) );
             }
         }
 



Mime
View raw message