Return-Path: Delivered-To: apmail-directory-commits-archive@www.apache.org Received: (qmail 51900 invoked from network); 20 Mar 2011 18:10:55 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 20 Mar 2011 18:10:55 -0000 Received: (qmail 50699 invoked by uid 500); 20 Mar 2011 18:10:55 -0000 Delivered-To: apmail-directory-commits-archive@directory.apache.org Received: (qmail 50655 invoked by uid 500); 20 Mar 2011 18:10:55 -0000 Mailing-List: contact commits-help@directory.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@directory.apache.org Delivered-To: mailing list commits@directory.apache.org Received: (qmail 50648 invoked by uid 99); 20 Mar 2011 18:10:55 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 20 Mar 2011 18:10:55 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 20 Mar 2011 18:10:50 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 3DE8323889DA; Sun, 20 Mar 2011 18:10:26 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1083529 - in /directory/studio/branches/akarasulu/plugins: ldapbrowser.common/src/main/java/org/apache/directory/studio/ldapbrowser/common/dialogs/preferences/ ldapbrowser.common/src/main/java/org/apache/directory/studio/ldapbrowser/common... Date: Sun, 20 Mar 2011 18:10:26 -0000 To: commits@directory.apache.org From: akarasulu@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20110320181026.3DE8323889DA@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: akarasulu Date: Sun Mar 20 18:10:25 2011 New Revision: 1083529 URL: http://svn.apache.org/viewvc?rev=1083529&view=rev Log: fixing compilation errors Modified: directory/studio/branches/akarasulu/plugins/ldapbrowser.common/src/main/java/org/apache/directory/studio/ldapbrowser/common/dialogs/preferences/BinaryAttributesAndSyntaxesPreferencePage.java directory/studio/branches/akarasulu/plugins/ldapbrowser.common/src/main/java/org/apache/directory/studio/ldapbrowser/common/dialogs/preferences/ValueEditorsPreferencePage.java directory/studio/branches/akarasulu/plugins/ldapbrowser.common/src/main/java/org/apache/directory/studio/ldapbrowser/common/filtereditor/FilterContentAssistProcessor.java directory/studio/branches/akarasulu/plugins/ldapbrowser.common/src/main/java/org/apache/directory/studio/ldapbrowser/common/filtereditor/FilterTextHover.java directory/studio/branches/akarasulu/plugins/ldapbrowser.common/src/main/java/org/apache/directory/studio/valueeditors/ValueEditorManager.java directory/studio/branches/akarasulu/plugins/ldapbrowser.core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/schema/Schema.java directory/studio/branches/akarasulu/plugins/ldapbrowser.core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/schema/SchemaUtils.java Modified: directory/studio/branches/akarasulu/plugins/ldapbrowser.common/src/main/java/org/apache/directory/studio/ldapbrowser/common/dialogs/preferences/BinaryAttributesAndSyntaxesPreferencePage.java URL: http://svn.apache.org/viewvc/directory/studio/branches/akarasulu/plugins/ldapbrowser.common/src/main/java/org/apache/directory/studio/ldapbrowser/common/dialogs/preferences/BinaryAttributesAndSyntaxesPreferencePage.java?rev=1083529&r1=1083528&r2=1083529&view=diff ============================================================================== --- directory/studio/branches/akarasulu/plugins/ldapbrowser.common/src/main/java/org/apache/directory/studio/ldapbrowser/common/dialogs/preferences/BinaryAttributesAndSyntaxesPreferencePage.java (original) +++ directory/studio/branches/akarasulu/plugins/ldapbrowser.common/src/main/java/org/apache/directory/studio/ldapbrowser/common/dialogs/preferences/BinaryAttributesAndSyntaxesPreferencePage.java Sun Mar 20 18:10:25 2011 @@ -29,7 +29,7 @@ import java.util.SortedMap; import java.util.TreeMap; import org.apache.directory.shared.ldap.model.schema.AttributeType; -import org.apache.directory.shared.ldap.model.schema.MutableLdapSyntaxImpl; +import org.apache.directory.shared.ldap.model.schema.MutableLdapSyntax; import org.apache.directory.studio.common.ui.widgets.BaseWidgetUtils; import org.apache.directory.studio.connection.core.Utils; import org.apache.directory.studio.ldapbrowser.core.BrowserConnectionManager; @@ -80,10 +80,10 @@ public class BinaryAttributesAndSyntaxes private String[] attributeNamesAndOids; /** Map with syntax OID => syntax description */ - private SortedMap syntaxOid2LsdMap; + private SortedMap syntaxOid2LsdMap; /** Map with syntax DESC => syntax description */ - private SortedMap syntaxDesc2LsdMap; + private SortedMap syntaxDesc2LsdMap; /** The syntax OIDs. */ private String[] syntaxOids; @@ -164,8 +164,8 @@ public class BinaryAttributesAndSyntaxes .size(), attributeOid2AtdMap.size() ); // init available syntaxes - syntaxOid2LsdMap = new TreeMap(); - syntaxDesc2LsdMap = new TreeMap(); + syntaxOid2LsdMap = new TreeMap(); + syntaxDesc2LsdMap = new TreeMap(); for ( IBrowserConnection browserConnection : connections ) { Schema schema = browserConnection.getSchema(); @@ -214,8 +214,8 @@ public class BinaryAttributesAndSyntaxes private void createSyntaxMaps( Schema schema ) { - Collection lsds = schema.getLdapSyntaxDescriptions(); - for ( MutableLdapSyntaxImpl lsd : lsds ) + Collection lsds = schema.getLdapSyntaxDescriptions(); + for ( MutableLdapSyntax lsd : lsds ) { syntaxOid2LsdMap.put( lsd.getOid(), lsd ); @@ -543,8 +543,7 @@ public class BinaryAttributesAndSyntaxes { if ( syntaxOid2LsdMap.containsKey( syntax.getSyntaxNumericOid() ) ) { - MutableLdapSyntaxImpl lsd = ( MutableLdapSyntaxImpl ) syntaxOid2LsdMap.get( syntax - .getSyntaxNumericOid() ); + MutableLdapSyntax lsd = syntaxOid2LsdMap.get( syntax.getSyntaxNumericOid() ); return SchemaUtils.toString( lsd ); } else if ( Utils.getOidDescription( syntax.getSyntaxNumericOid() ) != null ) Modified: directory/studio/branches/akarasulu/plugins/ldapbrowser.common/src/main/java/org/apache/directory/studio/ldapbrowser/common/dialogs/preferences/ValueEditorsPreferencePage.java URL: http://svn.apache.org/viewvc/directory/studio/branches/akarasulu/plugins/ldapbrowser.common/src/main/java/org/apache/directory/studio/ldapbrowser/common/dialogs/preferences/ValueEditorsPreferencePage.java?rev=1083529&r1=1083528&r2=1083529&view=diff ============================================================================== --- directory/studio/branches/akarasulu/plugins/ldapbrowser.common/src/main/java/org/apache/directory/studio/ldapbrowser/common/dialogs/preferences/ValueEditorsPreferencePage.java (original) +++ directory/studio/branches/akarasulu/plugins/ldapbrowser.common/src/main/java/org/apache/directory/studio/ldapbrowser/common/dialogs/preferences/ValueEditorsPreferencePage.java Sun Mar 20 18:10:25 2011 @@ -31,7 +31,7 @@ import java.util.SortedMap; import java.util.TreeMap; import org.apache.directory.shared.ldap.model.schema.AttributeType; -import org.apache.directory.shared.ldap.model.schema.MutableLdapSyntaxImpl; +import org.apache.directory.shared.ldap.model.schema.MutableLdapSyntax; import org.apache.directory.studio.common.ui.widgets.BaseWidgetUtils; import org.apache.directory.studio.ldapbrowser.common.BrowserCommonActivator; import org.apache.directory.studio.ldapbrowser.core.BrowserConnectionManager; @@ -87,10 +87,10 @@ public class ValueEditorsPreferencePage private String[] attributeTypesAndOids; /** Map with syntax OID => syntax description */ - private SortedMap syntaxOid2LsdMap; + private SortedMap syntaxOid2LsdMap; /** Map with syntax DESC => syntax description */ - private SortedMap syntaxDesc2LsdMap; + private SortedMap syntaxDesc2LsdMap; /** The syntax DESCs and OIDs. */ private String[] syntaxDescsAndOids; @@ -204,8 +204,8 @@ public class ValueEditorsPreferencePage .size(), attributeOid2AtdMap.size() ); // init available syntaxes - syntaxOid2LsdMap = new TreeMap(); - syntaxDesc2LsdMap = new TreeMap(); + syntaxOid2LsdMap = new TreeMap(); + syntaxDesc2LsdMap = new TreeMap(); for ( IBrowserConnection browserConnection : connections ) { Schema schema = browserConnection.getSchema(); @@ -258,8 +258,8 @@ public class ValueEditorsPreferencePage private void createSyntaxMaps( Schema schema ) { - Collection lsds = schema.getLdapSyntaxDescriptions(); - for ( MutableLdapSyntaxImpl lsd : lsds ) + Collection lsds = schema.getLdapSyntaxDescriptions(); + for ( MutableLdapSyntax lsd : lsds ) { syntaxOid2LsdMap.put( lsd.getOid(), lsd ); @@ -621,8 +621,7 @@ public class ValueEditorsPreferencePage { if ( syntaxOid2LsdMap.containsKey( relation.getSyntaxOID() ) ) { - MutableLdapSyntaxImpl lsd = ( MutableLdapSyntaxImpl ) syntaxOid2LsdMap.get( relation - .getSyntaxOID() ); + MutableLdapSyntax lsd = syntaxOid2LsdMap.get( relation.getSyntaxOID() ); return SchemaUtils.toString( lsd ); } } Modified: directory/studio/branches/akarasulu/plugins/ldapbrowser.common/src/main/java/org/apache/directory/studio/ldapbrowser/common/filtereditor/FilterContentAssistProcessor.java URL: http://svn.apache.org/viewvc/directory/studio/branches/akarasulu/plugins/ldapbrowser.common/src/main/java/org/apache/directory/studio/ldapbrowser/common/filtereditor/FilterContentAssistProcessor.java?rev=1083529&r1=1083528&r2=1083529&view=diff ============================================================================== --- directory/studio/branches/akarasulu/plugins/ldapbrowser.common/src/main/java/org/apache/directory/studio/ldapbrowser/common/filtereditor/FilterContentAssistProcessor.java (original) +++ directory/studio/branches/akarasulu/plugins/ldapbrowser.common/src/main/java/org/apache/directory/studio/ldapbrowser/common/filtereditor/FilterContentAssistProcessor.java Sun Mar 20 18:10:25 2011 @@ -32,7 +32,7 @@ import java.util.TreeMap; import org.apache.directory.shared.ldap.model.constants.SchemaConstants; import org.apache.directory.shared.ldap.model.schema.AttributeType; -import org.apache.directory.shared.ldap.model.schema.MutableMatchingRuleImpl; +import org.apache.directory.shared.ldap.model.schema.MutableMatchingRule; import org.apache.directory.shared.ldap.model.schema.ObjectClass; import org.apache.directory.studio.ldapbrowser.common.BrowserCommonActivator; import org.apache.directory.studio.ldapbrowser.common.BrowserCommonConstants; @@ -110,7 +110,7 @@ public class FilterContentAssistProcesso private Map possibleObjectClasses; /** The possible matching rules. */ - private Map possibleMatchingRules; + private Map possibleMatchingRules; /** @@ -171,7 +171,7 @@ public class FilterContentAssistProcesso possibleAttributeTypes = new TreeMap( nameAndOidComparator ); possibleFilterTypes = new LinkedHashMap(); possibleObjectClasses = new TreeMap( nameAndOidComparator ); - possibleMatchingRules = new TreeMap( nameAndOidComparator ); + possibleMatchingRules = new TreeMap( nameAndOidComparator ); if ( schema != null ) { @@ -201,8 +201,8 @@ public class FilterContentAssistProcesso } } - Collection matchingRuleDescriptions = schema.getMatchingRuleDescriptions(); - for ( MutableMatchingRuleImpl description : matchingRuleDescriptions ) + Collection matchingRuleDescriptions = schema.getMatchingRuleDescriptions(); + for ( MutableMatchingRule description : matchingRuleDescriptions ) { possibleMatchingRules.put( description.getOid(), description ); for ( String name : description.getNames() ) @@ -545,7 +545,7 @@ public class FilterContentAssistProcesso { if ( possibleMatchingRule.toUpperCase().startsWith( matchingRule.toUpperCase() ) ) { - MutableMatchingRuleImpl description = schema.getMatchingRuleDescription( possibleMatchingRule ); + MutableMatchingRule description = schema.getMatchingRuleDescription( possibleMatchingRule ); String replacementString = possibleMatchingRule; if ( equalsColonToken == null ) { Modified: directory/studio/branches/akarasulu/plugins/ldapbrowser.common/src/main/java/org/apache/directory/studio/ldapbrowser/common/filtereditor/FilterTextHover.java URL: http://svn.apache.org/viewvc/directory/studio/branches/akarasulu/plugins/ldapbrowser.common/src/main/java/org/apache/directory/studio/ldapbrowser/common/filtereditor/FilterTextHover.java?rev=1083529&r1=1083528&r2=1083529&view=diff ============================================================================== --- directory/studio/branches/akarasulu/plugins/ldapbrowser.common/src/main/java/org/apache/directory/studio/ldapbrowser/common/filtereditor/FilterTextHover.java (original) +++ directory/studio/branches/akarasulu/plugins/ldapbrowser.common/src/main/java/org/apache/directory/studio/ldapbrowser/common/filtereditor/FilterTextHover.java Sun Mar 20 18:10:25 2011 @@ -23,7 +23,7 @@ package org.apache.directory.studio.ldap import org.apache.directory.shared.ldap.model.constants.SchemaConstants; import org.apache.directory.shared.ldap.model.schema.AttributeType; -import org.apache.directory.shared.ldap.model.schema.MutableMatchingRuleImpl; +import org.apache.directory.shared.ldap.model.schema.MutableMatchingRule; import org.apache.directory.shared.ldap.model.schema.ObjectClass; import org.apache.directory.studio.ldapbrowser.core.model.filter.LdapFilter; import org.apache.directory.studio.ldapbrowser.core.model.filter.LdapFilterExtensibleComponent; @@ -130,7 +130,7 @@ public class FilterTextHover implements + fc.getMatchingRuleToken().getLength() ) { String matchingRule = fc.getMatchingRuleToken().getValue(); - MutableMatchingRuleImpl matchingRuleDescription = schema.getMatchingRuleDescription( matchingRule ); + MutableMatchingRule matchingRuleDescription = schema.getMatchingRuleDescription( matchingRule ); String info = SchemaUtils.getLdifLine( matchingRuleDescription ); return info; } Modified: directory/studio/branches/akarasulu/plugins/ldapbrowser.common/src/main/java/org/apache/directory/studio/valueeditors/ValueEditorManager.java URL: http://svn.apache.org/viewvc/directory/studio/branches/akarasulu/plugins/ldapbrowser.common/src/main/java/org/apache/directory/studio/valueeditors/ValueEditorManager.java?rev=1083529&r1=1083528&r2=1083529&view=diff ============================================================================== --- directory/studio/branches/akarasulu/plugins/ldapbrowser.common/src/main/java/org/apache/directory/studio/valueeditors/ValueEditorManager.java (original) +++ directory/studio/branches/akarasulu/plugins/ldapbrowser.common/src/main/java/org/apache/directory/studio/valueeditors/ValueEditorManager.java Sun Mar 20 18:10:25 2011 @@ -17,7 +17,6 @@ * under the License. * */ - package org.apache.directory.studio.valueeditors; @@ -30,7 +29,7 @@ import java.util.Map; import java.util.Set; import org.apache.directory.shared.ldap.model.schema.AttributeType; -import org.apache.directory.shared.ldap.model.schema.MutableLdapSyntaxImpl; +import org.apache.directory.shared.ldap.model.schema.MutableLdapSyntax; import org.apache.directory.studio.ldapbrowser.common.BrowserCommonActivator; import org.apache.directory.studio.ldapbrowser.common.BrowserCommonConstants; import org.apache.directory.studio.ldapbrowser.core.model.AttributeHierarchy; @@ -269,7 +268,7 @@ public class ValueEditorManager } // return default - MutableLdapSyntaxImpl lsd = schema.getLdapSyntaxDescription( syntaxNumericOid ); + MutableLdapSyntax lsd = schema.getLdapSyntaxDescription( syntaxNumericOid ); if ( SchemaUtils.isBinary( lsd ) ) { return defaultBinaryValueEditor; Modified: directory/studio/branches/akarasulu/plugins/ldapbrowser.core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/schema/Schema.java URL: http://svn.apache.org/viewvc/directory/studio/branches/akarasulu/plugins/ldapbrowser.core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/schema/Schema.java?rev=1083529&r1=1083528&r2=1083529&view=diff ============================================================================== --- directory/studio/branches/akarasulu/plugins/ldapbrowser.core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/schema/Schema.java (original) +++ directory/studio/branches/akarasulu/plugins/ldapbrowser.core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/schema/Schema.java Sun Mar 20 18:10:25 2011 @@ -38,16 +38,14 @@ import org.apache.commons.lang.StringUti import org.apache.directory.shared.ldap.model.constants.SchemaConstants; import org.apache.directory.shared.ldap.model.name.Dn; import org.apache.directory.shared.ldap.model.schema.AttributeType; +import org.apache.directory.shared.ldap.model.schema.MutableLdapSyntax; import org.apache.directory.shared.ldap.model.schema.MutableLdapSyntaxImpl; +import org.apache.directory.shared.ldap.model.schema.MutableMatchingRule; import org.apache.directory.shared.ldap.model.schema.MutableMatchingRuleImpl; import org.apache.directory.shared.ldap.model.schema.MatchingRuleUse; import org.apache.directory.shared.ldap.model.schema.ObjectClass; import org.apache.directory.shared.ldap.model.schema.UsageEnum; import org.apache.directory.shared.ldap.model.schema.parsers.*; -import org.apache.directory.shared.ldap.model.schema.parsers.LdapSyntaxDescriptionSchemaParser; -import org.apache.directory.shared.ldap.model.schema.parsers.MatchingRuleDescriptionSchemaParser; -import org.apache.directory.shared.ldap.model.schema.parsers.MatchingRuleUseDescriptionSchemaParser; -import org.apache.directory.shared.ldap.model.schema.parsers.ObjectClassDescriptionSchemaParser; import org.apache.directory.studio.connection.core.Utils; import org.apache.directory.studio.ldapbrowser.core.model.AttributeDescription; import org.apache.directory.studio.ldifparser.LdifFormatParameters; @@ -130,9 +128,9 @@ public class Schema private Map atdMapByNameOrNumericOid; - private Map lsdMapByNumericOid; + private Map lsdMapByNumericOid; - private Map mrdMapByNameOrNumericOid; + private Map mrdMapByNameOrNumericOid; private Map mrudMapByNameOrNumericOid; @@ -148,8 +146,8 @@ public class Schema this.modifyTimestamp = null; this.ocdMapByNameOrNumericOid = new HashMap(); this.atdMapByNameOrNumericOid = new HashMap(); - this.lsdMapByNumericOid = new HashMap(); - this.mrdMapByNameOrNumericOid = new HashMap(); + this.lsdMapByNumericOid = new HashMap(); + this.mrdMapByNameOrNumericOid = new HashMap(); this.mrudMapByNameOrNumericOid = new HashMap(); } @@ -270,7 +268,7 @@ public class Schema } else if ( attributeName.equalsIgnoreCase( SchemaConstants.LDAP_SYNTAXES_AT ) ) { - MutableLdapSyntaxImpl lsd = lsdParser.parseLdapSyntaxDescription( value ); + MutableLdapSyntax lsd = lsdParser.parseLdapSyntaxDescription( value ); if ( StringUtils.isEmpty( lsd.getDescription() ) && Utils.getOidDescription( lsd.getOid() ) != null ) { @@ -281,7 +279,7 @@ public class Schema } else if ( attributeName.equalsIgnoreCase( SchemaConstants.MATCHING_RULES_AT ) ) { - MutableMatchingRuleImpl mrd = mrdParser.parseMatchingRuleDescription( value ); + MutableMatchingRule mrd = mrdParser.parseMatchingRuleDescription( value ); mrd.addExtension( RAW_SCHEMA_DEFINITION_LDIF_VALUE, ldifValues ); addMatchingRule( mrd ); } @@ -623,7 +621,7 @@ public class Schema * * @param lsd the LDAP syntax description */ - private void addLdapSyntax( MutableLdapSyntaxImpl lsd ) + private void addLdapSyntax( MutableLdapSyntax lsd ) { if ( lsd.getOid() != null ) { @@ -637,9 +635,9 @@ public class Schema * * @return the LDAP syntax descriptions */ - public Collection getLdapSyntaxDescriptions() + public Collection getLdapSyntaxDescriptions() { - Set set = new HashSet( lsdMapByNumericOid.values() ); + Set set = new HashSet( lsdMapByNumericOid.values() ); return set; } @@ -670,7 +668,7 @@ public class Schema * * @return the attribute type description or the default or a dummy */ - public MutableLdapSyntaxImpl getLdapSyntaxDescription( String numericOid ) + public MutableLdapSyntax getLdapSyntaxDescription( String numericOid ) { if ( numericOid == null ) { @@ -701,7 +699,7 @@ public class Schema * * @param mrud the matching rule description */ - private void addMatchingRule( MutableMatchingRuleImpl mrd ) + private void addMatchingRule( MutableMatchingRule mrd ) { if ( mrd.getOid() != null ) { @@ -722,9 +720,9 @@ public class Schema * * @return the matching rule descriptions */ - public Collection getMatchingRuleDescriptions() + public Collection getMatchingRuleDescriptions() { - Set set = new HashSet( mrdMapByNameOrNumericOid.values() ); + Set set = new HashSet( mrdMapByNameOrNumericOid.values() ); return set; } @@ -757,7 +755,7 @@ public class Schema * * @return the matching rule description or the default or a dummy */ - public MutableMatchingRuleImpl getMatchingRuleDescription( String nameOrOid ) + public MutableMatchingRule getMatchingRuleDescription( String nameOrOid ) { if ( mrdMapByNameOrNumericOid.containsKey( nameOrOid.toLowerCase() ) ) { Modified: directory/studio/branches/akarasulu/plugins/ldapbrowser.core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/schema/SchemaUtils.java URL: http://svn.apache.org/viewvc/directory/studio/branches/akarasulu/plugins/ldapbrowser.core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/schema/SchemaUtils.java?rev=1083529&r1=1083528&r2=1083529&view=diff ============================================================================== --- directory/studio/branches/akarasulu/plugins/ldapbrowser.core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/schema/SchemaUtils.java (original) +++ directory/studio/branches/akarasulu/plugins/ldapbrowser.core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/schema/SchemaUtils.java Sun Mar 20 18:10:25 2011 @@ -31,15 +31,13 @@ import java.util.TreeSet; import org.apache.commons.collections.CollectionUtils; import org.apache.directory.shared.ldap.model.constants.SchemaConstants; -import org.apache.directory.shared.ldap.model.schema.AbstractMutableSchemaObject; -import org.apache.directory.shared.ldap.model.schema.AbstractSchemaObject; import org.apache.directory.shared.ldap.model.schema.AttributeType; import org.apache.directory.shared.ldap.model.schema.LdapSyntax; -import org.apache.directory.shared.ldap.model.schema.MutableLdapSyntaxImpl; -import org.apache.directory.shared.ldap.model.schema.MutableMatchingRuleImpl; +import org.apache.directory.shared.ldap.model.schema.MatchingRule; import org.apache.directory.shared.ldap.model.schema.MatchingRuleUse; import org.apache.directory.shared.ldap.model.schema.ObjectClass; import org.apache.directory.shared.ldap.model.schema.ObjectClassTypeEnum; +import org.apache.directory.shared.ldap.model.schema.SchemaObject; import org.apache.directory.shared.ldap.model.schema.UsageEnum; import org.apache.directory.studio.ldapbrowser.core.BrowserCorePlugin; import org.apache.directory.studio.ldapbrowser.core.model.AttributeHierarchy; @@ -167,9 +165,9 @@ public class SchemaUtils } }; - private static final Comparator schemaElementNameComparator = new Comparator() + private static final Comparator schemaElementNameComparator = new Comparator() { - public int compare( AbstractMutableSchemaObject s1, AbstractMutableSchemaObject s2 ) + public int compare( SchemaObject s1, SchemaObject s2 ) { return SchemaUtils.toString( s1 ).compareToIgnoreCase( SchemaUtils.toString( s2 ) ); } @@ -183,10 +181,10 @@ public class SchemaUtils * * @return the names */ - public static Collection getNames( Collection asds ) + public static Collection getNames( Collection asds ) { Set nameSet = new TreeSet( nameAndOidComparator ); - for ( AbstractSchemaObject asd : asds ) + for ( SchemaObject asd : asds ) { nameSet.addAll( asd.getNames() ); } @@ -201,7 +199,7 @@ public class SchemaUtils * * @return the names */ - public static String[] getNamesAsArray( Collection asds ) + public static String[] getNamesAsArray( Collection asds ) { return getNames( asds ).toArray( new String[0] ); } @@ -212,10 +210,10 @@ public class SchemaUtils * * @return the numeric OIDs of the given schema descriptions */ - public static Collection getNumericOids( Collection descriptions ) + public static Collection getNumericOids( Collection descriptions ) { Set oids = new HashSet(); - for ( AbstractSchemaObject asd : descriptions ) + for ( SchemaObject asd : descriptions ) { oids.add( asd.getOid() ); @@ -231,7 +229,7 @@ public class SchemaUtils * * @return the identifiers */ - public static Collection getLowerCaseIdentifiers( AbstractSchemaObject asd ) + public static Collection getLowerCaseIdentifiers( SchemaObject asd ) { Set identiers = new HashSet(); if ( asd.getOid() != null ) @@ -260,7 +258,7 @@ public class SchemaUtils * * @return the friendly identifier */ - public static String getFriendlyIdentifier( AbstractSchemaObject asd ) + public static String getFriendlyIdentifier( SchemaObject asd ) { if ( asd.getNames() != null && !asd.getNames().isEmpty() ) { @@ -429,7 +427,7 @@ public class SchemaUtils * * @return false if the syntax is defined as binary */ - public static boolean isString( MutableLdapSyntaxImpl lsd ) + public static boolean isString( LdapSyntax lsd ) { return !isBinary( lsd ); } @@ -443,7 +441,7 @@ public class SchemaUtils * * @return true if the syntax is defined as binary */ - public static boolean isBinary( MutableLdapSyntaxImpl lsd ) + public static boolean isBinary( LdapSyntax lsd ) { // check user-defined binary syntaxes Set binarySyntaxOids = BrowserCorePlugin.getDefault().getCorePreferences() @@ -497,7 +495,7 @@ public class SchemaUtils String syntax = getSyntaxNumericOidTransitive( atd, schema ); if ( syntax != null && schema.hasLdapSyntaxDescription( syntax ) ) { - MutableLdapSyntaxImpl lsd = schema.getLdapSyntaxDescription( syntax ); + LdapSyntax lsd = schema.getLdapSyntaxDescription( syntax ); return isBinary( lsd ); } @@ -513,8 +511,7 @@ public class SchemaUtils * * @return all attribute type description using this syntax description */ - public static Collection getUsedFromAttributeTypeDescriptions( MutableLdapSyntaxImpl lsd, - Schema schema ) + public static Collection getUsedFromAttributeTypeDescriptions( LdapSyntax lsd, Schema schema ) { Set usedFroms = new TreeSet( schemaElementNameComparator ); for ( AttributeType atd : schema.getAttributeTypeDescriptions() ) @@ -539,8 +536,7 @@ public class SchemaUtils * @return all attribute type descriptions using this matching rule for * equality, substring or ordering matching */ - public static Collection getUsedFromAttributeTypeDescriptions( - MutableMatchingRuleImpl mrd, Schema schema ) + public static Collection getUsedFromAttributeTypeDescriptions( MatchingRule mrd, Schema schema ) { Set usedFromSet = new TreeSet( schemaElementNameComparator ); for ( AttributeType atd : schema.getAttributeTypeDescriptions() ) @@ -918,7 +914,7 @@ public class SchemaUtils * @param asd the schema element * @return the LDIF line of the given schema element, may be null */ - public static String getLdifLine( AbstractSchemaObject asd ) + public static String getLdifLine( SchemaObject asd ) { List ldifLines = asd.getExtensions().get( Schema.RAW_SCHEMA_DEFINITION_LDIF_VALUE ); String ldifLine = ldifLines != null && !ldifLines.isEmpty() ? ldifLines.get( 0 ) : null; @@ -947,7 +943,7 @@ public class SchemaUtils * * @return the string representation of the given schema element */ - public static String toString( AbstractSchemaObject asd ) + public static String toString( SchemaObject asd ) { StringBuffer sb = new StringBuffer(); if ( asd instanceof LdapSyntax )