org.apache.directory.shared.ldap.schema.parsers
Class ParserDescriptionUtils

java.lang.Object
  extended by org.apache.directory.shared.ldap.schema.parsers.ParserDescriptionUtils

public class ParserDescriptionUtils
extends java.lang.Object

Utilities for dealing with various schema descriptions.

Version:
$Rev$, $Date$
Author:
Apache Directory Project

Constructor Summary
ParserDescriptionUtils()
           
 
Method Summary
static boolean aliasNamesMatch(SchemaObject so0, SchemaObject so1)
          Checks to see if the alias names of a schema description match another description.
static boolean attributeTypesMatch(AttributeType at0, AttributeType at1)
          Checks two schema attributeTypes for an exact match.
static boolean descriptionsMatch(SchemaObject so0, SchemaObject so1)
          Checks if two base schema descriptions match for the common components in every schema description.
static boolean extensionsMatch(SchemaObject lsd0, SchemaObject lsd1)
          Checks to see if the extensions of a schema description match another description.
static boolean matchingRulesMatch(MatchingRule matchingRule0, MatchingRule matchingRule1)
          Checks to see if two matchingRule match exactly.
static boolean objectClassesMatch(ObjectClass oc0, ObjectClass oc1)
          Checks two schema objectClasses for an exact match.
static boolean syntaxesMatch(LdapSyntax ldapSyntax0, LdapSyntax ldapSyntax1)
          Checks to see if two syntax match exactly.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ParserDescriptionUtils

public ParserDescriptionUtils()
Method Detail

objectClassesMatch

public static boolean objectClassesMatch(ObjectClass oc0,
                                         ObjectClass oc1)
                                  throws javax.naming.NamingException
Checks two schema objectClasses for an exact match.

Parameters:
ocd0 - the first objectClass to compare
ocd1 - the second objectClass to compare
Returns:
true if both objectClasses match exactly, false otherwise
Throws:
javax.naming.NamingException

attributeTypesMatch

public static boolean attributeTypesMatch(AttributeType at0,
                                          AttributeType at1)
Checks two schema attributeTypes for an exact match.

Parameters:
atd0 - the first attributeType to compare
atd1 - the second attributeType to compare
Returns:
true if both attributeTypes match exactly, false otherwise

matchingRulesMatch

public static boolean matchingRulesMatch(MatchingRule matchingRule0,
                                         MatchingRule matchingRule1)
Checks to see if two matchingRule match exactly.

Parameters:
mrd0 - the first matchingRule to compare
mrd1 - the second matchingRule to compare
Returns:
true if the matchingRules match exactly, false otherwise

syntaxesMatch

public static boolean syntaxesMatch(LdapSyntax ldapSyntax0,
                                    LdapSyntax ldapSyntax1)
Checks to see if two syntax match exactly.

Parameters:
ldapSyntax0 - the first ldapSyntax to compare
ldapSyntax1 - the second ldapSyntax to compare
Returns:
true if the syntaxes match exactly, false otherwise

descriptionsMatch

public static boolean descriptionsMatch(SchemaObject so0,
                                        SchemaObject so1)
Checks if two base schema descriptions match for the common components in every schema description. NOTE: for syntaxes the obsolete flag is not compared because doing so would raise an exception since syntax descriptions do not support the OBSOLETE flag.

Parameters:
lsd0 - the first schema description to compare
lsd1 - the second schema description to compare
Returns:
true if the descriptions match exactly, false otherwise

extensionsMatch

public static boolean extensionsMatch(SchemaObject lsd0,
                                      SchemaObject lsd1)
Checks to see if the extensions of a schema description match another description. The order of the extension values must match for a true return.

Parameters:
lsd0 - the first schema description to compare the extensions of
lsd1 - the second schema description to compare the extensions of
Returns:
true if the extensions match exactly, false otherwise

aliasNamesMatch

public static boolean aliasNamesMatch(SchemaObject so0,
                                      SchemaObject so1)
Checks to see if the alias names of a schema description match another description. The order of the alias names do matter.

Parameters:
asd0 - the schema description to compare
asd1 - the schema description to compare
Returns:
true if alias names match exactly, false otherwise


Copyright © 2003-2011 Apache Software Foundation. All Rights Reserved.