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(AbstractSchemaDescription asd0, AbstractSchemaDescription asd1)
          Checks to see if the alias names of a schema description match another description.
static boolean attributeTypesMatch(AttributeTypeDescription atd0, AttributeTypeDescription atd1)
          Checks two schema attributeType descriptions for an exact match.
static boolean descriptionsMatch(AbstractSchemaDescription asd0, AbstractSchemaDescription asd1)
          Checks if two base schema descriptions match for the common components in every schema description.
static boolean extensionsMatch(AbstractSchemaDescription asd0, AbstractSchemaDescription asd1)
          Checks to see if the extensions of a schema description match another description.
static boolean matchingRulesMatch(MatchingRuleDescription mrd0, MatchingRuleDescription mrd1)
          Checks to see if two matchingRule descriptions match exactly.
static boolean objectClassesMatch(ObjectClassDescription ocd0, ObjectClassDescription ocd1)
          Checks two schema objectClass descriptions for an exact match.
static boolean syntaxesMatch(LdapSyntaxDescription lsd0, LdapSyntaxDescription lsd1)
          Checks to see if two syntax descriptions 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(ObjectClassDescription ocd0,
                                         ObjectClassDescription ocd1)
Checks two schema objectClass descriptions for an exact match.

Parameters:
ocd0 - the first objectClass description to compare
ocd1 - the second objectClass description to compare
Returns:
true if both objectClasss descriptions match exactly, false otherwise

attributeTypesMatch

public static boolean attributeTypesMatch(AttributeTypeDescription atd0,
                                          AttributeTypeDescription atd1)
Checks two schema attributeType descriptions for an exact match.

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

matchingRulesMatch

public static boolean matchingRulesMatch(MatchingRuleDescription mrd0,
                                         MatchingRuleDescription mrd1)
Checks to see if two matchingRule descriptions match exactly.

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

syntaxesMatch

public static boolean syntaxesMatch(LdapSyntaxDescription lsd0,
                                    LdapSyntaxDescription lsd1)
Checks to see if two syntax descriptions match exactly.

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

descriptionsMatch

public static boolean descriptionsMatch(AbstractSchemaDescription asd0,
                                        AbstractSchemaDescription asd1)
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:
asd0 - the first schema description to compare
asd1 - the second schema description to compare
Returns:
true if the descriptions match exactly, false otherwise

extensionsMatch

public static boolean extensionsMatch(AbstractSchemaDescription asd0,
                                      AbstractSchemaDescription asd1)
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:
asd0 - the first schema description to compare the extensions of
asd1 - the second schema description to compare the extensions of
Returns:
true if the extensions match exactly, false otherwise

aliasNamesMatch

public static boolean aliasNamesMatch(AbstractSchemaDescription asd0,
                                      AbstractSchemaDescription asd1)
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 © 2004-2009 The Apache Software Foundation. All Rights Reserved.