org.apache.directory.shared.ldap.schema
Class DescriptionUtils

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

public class DescriptionUtils
extends java.lang.Object

Utility class used to generate schema object specifications. Some of the latest work coming out of the LDAPBIS working body adds optional extensions to these syntaxes. Descriptions can be generated for the following objects:

Version:
$Rev: 896579 $
Author:
Apache Directory Project

Constructor Summary
DescriptionUtils()
           
 
Method Summary
static java.lang.String getDescription(AttributeType attributeType)
          Generates the description using the AttributeTypeDescription as defined by the syntax: 1.3.6.1.4.1.1466.115.121.1.3.
static java.lang.String getDescription(DITContentRule dITContentRule)
          Generates the DITContentRuleDescription for a DITContentRule as defined by the syntax: 1.3.6.1.4.1.1466.115.121.1.16.
static java.lang.String getDescription(DITStructureRule dITStructureRule)
          Generates the DITStructureRuleDescription for a DITStructureRule as defined by the syntax: 1.3.6.1.4.1.1466.115.121.1.17.
static java.lang.String getDescription(LdapComparator<?> comparator)
          Generates the ComparatorDescription for a LdapComparator.
static java.lang.String getDescription(LdapSyntax syntax)
          Generates the SyntaxDescription for a Syntax as defined by the syntax: 1.3.6.1.4.1.1466.115.121.1.54.
static java.lang.String getDescription(MatchingRule matchingRule)
          Generates the MatchingRuleDescription for a MatchingRule as defined by the syntax: 1.3.6.1.4.1.1466.115.121.1.30.
static java.lang.String getDescription(MatchingRuleUse matchingRuleUse)
          Generates the MatchingRuleUseDescription for a MatchingRuleUse as defined by the syntax: 1.3.6.1.4.1.1466.115.121.1.31.
static java.lang.String getDescription(NameForm nameForm)
          Generates the NameFormDescription for a NameForm as defined by the syntax: 1.3.6.1.4.1.1466.115.121.1.35.
static java.lang.String getDescription(Normalizer normalizer)
          Generates the NormalizerDescription for a Normalizer.
static java.lang.String getDescription(ObjectClass objectClass)
          Generates the ObjectClassDescription for an ObjectClass as defined by the syntax: 1.3.6.1.4.1.1466.115.121.1.37.
static java.lang.String getDescription(SyntaxChecker syntaxChecker)
          Generates the SyntaxCheckerDescription for a SyntaxChecker.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DescriptionUtils

public DescriptionUtils()
Method Detail

getDescription

public static java.lang.String getDescription(AttributeType attributeType)
Generates the description using the AttributeTypeDescription as defined by the syntax: 1.3.6.1.4.1.1466.115.121.1.3. Only the right hand side of the description starting at the opening parenthesis is generated: that is 'AttributeTypeDescription = ' is not generated.
  AttributeTypeDescription = "(" whsp
     numericoid whsp                ; AttributeType identifier
     [ "NAME" qdescrs ]             ; name used in AttributeType
     [ "DESC" qdstring ]            ; description
     [ "OBSOLETE" whsp ]
     [ "SUP" woid ]                 ; derived from parent AttributeType
     [ "EQUALITY" woid              ; Matching Rule name
     [ "ORDERING" woid              ; Matching Rule name
     [ "SUBSTR" woid ]              ; Matching Rule name
     [ "SYNTAX" whsp noidlen whsp ] ; see section 4.3 RFC 2252
     [ "SINGLE-VALUE" whsp ]        ; default multi-valued
     [ "COLLECTIVE" whsp ]          ; default not collective
     [ "NO-USER-MODIFICATION" whsp ]; default user modifiable
     [ "USAGE" whsp AttributeUsage ]; default userApplications
     whsp ")"
 

Parameters:
attributeType - the attributeType to generate a description for
Returns:
the AttributeTypeDescription Syntax for the attributeType in a pretty formated string

getDescription

public static java.lang.String getDescription(LdapComparator<?> comparator)
Generates the ComparatorDescription for a LdapComparator. Only the right hand side of the description starting at the opening parenthesis is generated: that is 'ComparatorDescription = ' is not generated.
 ComparatorDescription = "("
     numericoid                          
     ["DESC" qdstring ]
     "FQCN" whsp fqcn
     ["BYTECODE" whsp base64  ]
     extensions 
     ")"
 

Parameters:
comparator - the Comparator to generate the description for
Returns:
the ComparatorDescription string

getDescription

public static java.lang.String getDescription(DITContentRule dITContentRule)
Generates the DITContentRuleDescription for a DITContentRule as defined by the syntax: 1.3.6.1.4.1.1466.115.121.1.16. Only the right hand side of the description starting at the opening parenthesis is generated: that is 'DITContentRuleDescription = ' is not generated.
   DITContentRuleDescription = "("
       numericoid         ; Structural ObjectClass identifier
       [ "NAME" qdescrs ]
       [ "DESC" qdstring ]
       [ "OBSOLETE" ]
       [ "AUX" oids ]     ; Auxiliary ObjectClasses
       [ "MUST" oids ]    ; AttributeType identifiers
       [ "MAY" oids ]     ; AttributeType identifiers
       [ "NOT" oids ]     ; AttributeType identifiers
      ")"
 

Parameters:
dITContentRule - the DIT content rule specification
Returns:
the specification according to the DITContentRuleDescription syntax

getDescription

public static java.lang.String getDescription(DITStructureRule dITStructureRule)
Generates the DITStructureRuleDescription for a DITStructureRule as defined by the syntax: 1.3.6.1.4.1.1466.115.121.1.17. Only the right hand side of the description starting at the opening parenthesis is generated: that is 'DITStructureRuleDescription = ' is not generated.
   DITStructureRuleDescription = "(" whsp
       ruleid                     ; rule identifier
       [ SP "NAME" SP qdescrs ]   ; short names (descriptors)
       [ SP "DESC" SP qdstring ]  ; description
       [ SP "OBSOLETE" ]          ; not active
       SP "FORM" SP oid           ; NameForm
       [ SP "SUP" ruleids ]       ; superior rules
       extensions WSP             ; extensions
       ")"
 

Parameters:
dITStructureRule - the DITStructureRule to generate the description for
Returns:
the description in the DITStructureRuleDescription syntax

getDescription

public static java.lang.String getDescription(MatchingRule matchingRule)
Generates the MatchingRuleDescription for a MatchingRule as defined by the syntax: 1.3.6.1.4.1.1466.115.121.1.30. Only the right hand side of the description starting at the opening parenthesis is generated: that is 'MatchingRuleDescription = ' is not generated.
  MatchingRuleDescription = "(" whsp
     numericoid whsp      ; MatchingRule object identifier
     [ "NAME" qdescrs ]
     [ "DESC" qdstring ]
     [ "OBSOLETE" whsp ]
     "SYNTAX" numericoid
  whsp ")"
 

Parameters:
matchingRule - the MatchingRule to generate the description for
Returns:
the MatchingRuleDescription string

getDescription

public static java.lang.String getDescription(MatchingRuleUse matchingRuleUse)
Generates the MatchingRuleUseDescription for a MatchingRuleUse as defined by the syntax: 1.3.6.1.4.1.1466.115.121.1.31. Only the right hand side of the description starting at the opening parenthesis is generated: that is 'MatchingRuleUseDescription = ' is not generated.
      MatchingRuleUseDescription = LPAREN WSP
          numericoid                ; object identifier
          [ SP "NAME" SP qdescrs ]  ; short names (descriptors)
          [ SP "DESC" SP qdstring ] ; description
          [ SP "OBSOLETE" ]         ; not active
          SP "APPLIES" SP oids      ; attribute types
          extensions WSP RPAREN     ; extensions
  
    where:
      [numericoid] is the object identifier of the matching rule
          associated with this matching rule use description;
      NAME [qdescrs] are short names (descriptors) identifying this
          matching rule use;
      DESC [qdstring] is a short descriptive string;
      OBSOLETE indicates this matching rule use is not active;
      APPLIES provides a list of attribute types the matching rule applies
          to; and
      [extensions] describe extensions.
 

Parameters:
matchingRuleUse - The matching rule from which we want to generate a MatchingRuleUseDescription.
Returns:
The generated MatchingRuleUseDescription

getDescription

public static java.lang.String getDescription(NameForm nameForm)
Generates the NameFormDescription for a NameForm as defined by the syntax: 1.3.6.1.4.1.1466.115.121.1.35. Only the right hand side of the description starting at the opening parenthesis is generated: that is 'NameFormDescription = ' is not generated.
  NameFormDescription = "(" whsp
      numericoid whsp               ; NameForm identifier
      [ "NAME" qdescrs ]
      [ "DESC" qdstring ]
      [ "OBSOLETE" whsp ]
      "OC" woid                     ; Structural ObjectClass
      "MUST" oids                   ; AttributeTypes
      [ "MAY" oids ]                ; AttributeTypes
  whsp ")"
 

Parameters:
nameForm - the NameForm to generate the description for
Returns:
the NameFormDescription string

getDescription

public static java.lang.String getDescription(Normalizer normalizer)
Generates the NormalizerDescription for a Normalizer. Only the right hand side of the description starting at the opening parenthesis is generated: that is 'NormalizerDescription = ' is not generated.
 NormalizerDescription = "("
     numericoid                          
     ["DESC" qdstring ]
     "FQCN" whsp fqcn
     ["BYTECODE" whsp base64  ]
     extensions 
     ")"
 

Parameters:
normalizer - the Normalizer to generate the description for
Returns:
the NormalizerDescription string

getDescription

public static java.lang.String getDescription(ObjectClass objectClass)
Generates the ObjectClassDescription for an ObjectClass as defined by the syntax: 1.3.6.1.4.1.1466.115.121.1.37. Only the right hand side of the description starting at the opening parenthesis is generated: that is 'ObjectClassDescription = ' is not generated.
  ObjectClassDescription = "(" whsp
      numericoid whsp     ; ObjectClass identifier
      [ "NAME" qdescrs ]
      [ "DESC" qdstring ]
      [ "OBSOLETE" whsp ]
      [ "SUP" oids ]      ; Superior ObjectClasses
      [ ( "ABSTRACT" / "STRUCTURAL" / "AUXILIARY" ) whsp ]
                          ; default structural
      [ "MUST" oids ]     ; AttributeTypes
      [ "MAY" oids ]      ; AttributeTypes
  whsp ")"
 

Parameters:
objectClass - the ObjectClass to generate a description for
Returns:
the description in the ObjectClassDescription syntax

getDescription

public static java.lang.String getDescription(LdapSyntax syntax)
Generates the SyntaxDescription for a Syntax as defined by the syntax: 1.3.6.1.4.1.1466.115.121.1.54. Only the right hand side of the description starting at the opening parenthesis is generated: that is 'SyntaxDescription = ' is not generated.
  SyntaxDescription = "(" whsp
      numericoid whsp
      [ "DESC" qdstring ]
      [ extensions ]
      whsp ")"
 

Parameters:
syntax - the Syntax to generate a description for
Returns:
the description in the SyntaxDescription syntax

getDescription

public static java.lang.String getDescription(SyntaxChecker syntaxChecker)
Generates the SyntaxCheckerDescription for a SyntaxChecker. Only the right hand side of the description starting at the opening parenthesis is generated: that is 'SyntaxCheckerDescription = ' is not generated.
 SyntaxCheckerDescription = "("
     numericoid                          
     ["DESC" qdstring ]
     "FQCN" whsp fqcn
     ["BYTECODE" whsp base64  ]
     extensions 
     ")"
 

Parameters:
syntaxChecker - the SyntaxChecker to generate the description for
Returns:
the SyntaxCheckerDescription string


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