Class DITStructureRule

  • All Implemented Interfaces:
    SchemaElement

    public final class DITStructureRule
    extends AbstractNamedSchemaElement
    Bean for a DIT content rule schema element.
       DITStructureRuleDescription = LPAREN WSP
         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 RPAREN      ; extensions
     
    • Field Detail

      • HASH_CODE_SEED

        private static final int HASH_CODE_SEED
        hash code seed.
        See Also:
        Constant Field Values
      • id

        private final int id
        ID.
      • nameForm

        private String nameForm
        Name form.
      • superiorRules

        private int[] superiorRules
        Superior rules.
    • Constructor Detail

      • DITStructureRule

        public DITStructureRule​(int i)
        Creates a new DIT structure rule.
        Parameters:
        i - id
      • DITStructureRule

        public DITStructureRule​(int id,
                                String[] names,
                                String description,
                                boolean obsolete,
                                String nameForm,
                                int[] superiorRules,
                                Extensions extensions)
        Creates a new DIT structure rule.
        Parameters:
        id - id
        names - names
        description - description
        obsolete - obsolete
        nameForm - name form
        superiorRules - superior rules
        extensions - extensions
    • Method Detail

      • getID

        public int getID()
        Returns the id.
        Returns:
        id
      • getNameForm

        public String getNameForm()
        Returns the name form.
        Returns:
        name form
      • setNameForm

        public void setNameForm​(String s)
        Sets the name form.
        Parameters:
        s - name form
      • getSuperiorRules

        public int[] getSuperiorRules()
        Returns the superior rules.
        Returns:
        superior rules
      • setSuperiorRules

        public void setSuperiorRules​(int[] i)
        Sets the superior rules.
        Parameters:
        i - superior rules
      • parse

        public static DITStructureRule parse​(String definition)
                                      throws SchemaParseException
        Parses the supplied definition string and creates an initialized DIT structure rule.
        Parameters:
        definition - to parse
        Returns:
        DIT structure rule
        Throws:
        SchemaParseException - if the supplied definition is invalid
      • format

        public String format()
        Description copied from interface: SchemaElement
        Returns this schema element as formatted string per RFC 4512.
        Returns:
        formatted string