directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From seelm...@apache.org
Subject svn commit: r545632 - /directory/studio/trunk/ldapstudio-browser-core/src/main/java/org/apache/directory/ldapstudio/browser/core/model/schema/Schema.java
Date Fri, 08 Jun 2007 21:36:20 GMT
Author: seelmann
Date: Fri Jun  8 14:36:20 2007
New Revision: 545632

URL: http://svn.apache.org/viewvc?view=rev&rev=545632
Log:
Added method.

Modified:
    directory/studio/trunk/ldapstudio-browser-core/src/main/java/org/apache/directory/ldapstudio/browser/core/model/schema/Schema.java

Modified: directory/studio/trunk/ldapstudio-browser-core/src/main/java/org/apache/directory/ldapstudio/browser/core/model/schema/Schema.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/ldapstudio-browser-core/src/main/java/org/apache/directory/ldapstudio/browser/core/model/schema/Schema.java?view=diff&rev=545632&r1=545631&r2=545632
==============================================================================
--- directory/studio/trunk/ldapstudio-browser-core/src/main/java/org/apache/directory/ldapstudio/browser/core/model/schema/Schema.java
(original)
+++ directory/studio/trunk/ldapstudio-browser-core/src/main/java/org/apache/directory/ldapstudio/browser/core/model/schema/Schema.java
Fri Jun  8 14:36:20 2007
@@ -491,6 +491,36 @@
         this.mrdMapByName = mrdMapByName;
     }
 
+    
+    /**
+     * 
+     * @return an array of all matching rule description names
+     */
+    public String[] getMatchingRuleDescriptionNames()
+    {
+        Set set = new HashSet();
+        for ( Iterator it = this.mrdMapByName.values().iterator(); it.hasNext(); )
+        {
+            MatchingRuleDescription mrd = ( MatchingRuleDescription ) it.next();
+            for ( int i = 0; i < mrd.getNames().length; i++ )
+            {
+                set.add( mrd.getNames()[i] );
+            }
+        }
+        return ( String[] ) set.toArray( new String[set.size()] );
+    }
+
+
+    public MatchingRuleDescription[] getMatchingRuleDescriptions()
+    {
+        Set set = new HashSet();
+        for ( Iterator it = this.mrdMapByName.values().iterator(); it.hasNext(); )
+        {
+            MatchingRuleDescription mrd = ( MatchingRuleDescription ) it.next();
+            set.add( mrd );
+        }
+        return ( MatchingRuleDescription[] ) set.toArray( new MatchingRuleDescription[set.size()]
);
+    }
 
     public void addMatchingRuleDescription( MatchingRuleDescription mrd )
     {



Mime
View raw message