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

java.lang.Object
  extended byorg.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. We have not yet added extension support to these functions or the schema interfaces in this package. Descriptions can be generated for the following objects:

Version:
$Rev: 379008 $
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(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(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(Syntax syntax)
          Generates the SyntaxDescription for a Syntax as defined by the syntax: 1.3.6.1.4.1.1466.115.121.1.54.
 
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)
                                       throws javax.naming.NamingException
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 openning 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
Throws:
javax.naming.NamingException

getDescription

public static java.lang.String getDescription(DITContentRule dITContentRule)
                                       throws javax.naming.NamingException
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 openning 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
Throws:
javax.naming.NamingException

getDescription

public static java.lang.String getDescription(MatchingRule matchingRule)
                                       throws javax.naming.NamingException
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 openning 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
Throws:
javax.naming.NamingException

getDescription

public static java.lang.String getDescription(MatchingRuleUse matchingRuleUse)
                                       throws javax.naming.NamingException
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 openning 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 -
Returns:
Throws:
javax.naming.NamingException

getDescription

public static java.lang.String getDescription(NameForm nameForm)
                                       throws javax.naming.NamingException
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 openning 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
Throws:
javax.naming.NamingException

getDescription

public static java.lang.String getDescription(ObjectClass objectClass)
                                       throws javax.naming.NamingException
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 openning 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
Throws:
javax.naming.NamingException

getDescription

public static java.lang.String getDescription(DITStructureRule dITStructureRule)
                                       throws javax.naming.NamingException
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 openning parenthesis is generated: that is 'DITStructureRuleDescription = ' is not generated.
  DITStructureRuleDescription = "(" whsp
      ruleidentifier whsp           ; DITStructureRule identifier
      [ "NAME" qdescrs ]
      [ "DESC" qdstring ]
      [ "OBSOLETE" whsp ]
      "FORM" woid whsp              ; NameForm
      [ "SUP" ruleidentifiers whsp ]; superior DITStructureRules
  ")"
 

Parameters:
dITStructureRule - the DITStructureRule to generate the description for
Returns:
the description in the DITStructureRuleDescription syntax
Throws:
javax.naming.NamingException

getDescription

public static java.lang.String getDescription(Syntax 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 openning parenthesis is generated: that is 'SyntaxDescription = ' is not generated.
  SyntaxDescription = "(" whsp
      numericoid whsp
      [ "DESC" qdstring ]
  whsp ")"
 

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


Copyright © 2003-2006 . All Rights Reserved.