Package com.unboundid.ldap.sdk.schema
Class DITStructureRuleDefinition
java.lang.Object
com.unboundid.ldap.sdk.schema.SchemaElement
com.unboundid.ldap.sdk.schema.DITStructureRuleDefinition
- All Implemented Interfaces:
Serializable
@NotMutable
@ThreadSafety(level=COMPLETELY_THREADSAFE)
public final class DITStructureRuleDefinition
extends SchemaElement
This class provides a data structure that describes an LDAP DIT structure
rule schema element.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionDITStructureRuleDefinition(int ruleID, String[] names, String description, boolean isObsolete, String nameFormID, int[] superiorRuleIDs, Map<String, String[]> extensions) Creates a new DIT structure rule with the provided information.DITStructureRuleDefinition(int ruleID, String name, String description, String nameFormID, Integer superiorRuleID, Map<String, String[]> extensions) Creates a new DIT structure rule with the provided information.Creates a new DIT structure rule from the provided string representation. -
Method Summary
Modifier and TypeMethodDescriptionbooleanIndicates whether the provided object is equal to this schema element.Retrieves the description for this DIT structure rule, if available.Retrieves the set of extensions for this DIT structure rule.Retrieves the name or OID of the name form with which this DIT structure rule is associated.Retrieves the primary name that can be used to reference this DIT structure rule.String[]getNames()Retrieves the set of names for this DIT structure rule.intRetrieves the rule ID for this DIT structure rule.Retrieves the type of schema element that this object represents.int[]Retrieves the rule IDs of the superior rules for this DIT structure rule.inthashCode()Retrieves a hash code for this schema element.booleanIndicates whether the provided string matches the rule ID or any of the names for this DIT structure rule.booleanIndicates whether this DIT structure rule is declared obsolete.toString()Retrieves a string representation of this DIT structure rule definition, in the format described in RFC 4512 section 4.1.7.1.Methods inherited from class com.unboundid.ldap.sdk.schema.SchemaElement
allowEmptyDescription, extensionsEqual, setAllowEmptyDescription
-
Constructor Details
-
DITStructureRuleDefinition
Creates a new DIT structure rule from the provided string representation.- Parameters:
s- The string representation of the DIT structure rule to create, using the syntax described in RFC 4512 section 4.1.7.1. It must not benull.- Throws:
LDAPException- If the provided string cannot be decoded as a DIT structure rule definition.
-
DITStructureRuleDefinition
public DITStructureRuleDefinition(int ruleID, @Nullable String name, @Nullable String description, @NotNull String nameFormID, @Nullable Integer superiorRuleID, @Nullable Map<String, String[]> extensions) Creates a new DIT structure rule with the provided information.- Parameters:
ruleID- The rule ID for this DIT structure rule.name- The name for this DIT structure rule. It may benullif the DIT structure rule should only be referenced by rule ID.description- The description for this DIT structure rule. It may benullif there is no description.nameFormID- The name or OID of the name form with which this DIT structure rule is associated. It must not benull.superiorRuleID- The superior rule ID for this DIT structure rule. It may benullif there are no superior rule IDs.extensions- The set of extensions for this DIT structure rule. It may benullor empty if there are no extensions.
-
DITStructureRuleDefinition
public DITStructureRuleDefinition(int ruleID, @Nullable String[] names, @Nullable String description, boolean isObsolete, @NotNull String nameFormID, @Nullable int[] superiorRuleIDs, @Nullable Map<String, String[]> extensions) Creates a new DIT structure rule with the provided information.- Parameters:
ruleID- The rule ID for this DIT structure rule.names- The set of names for this DIT structure rule. It may benullor empty if the DIT structure rule should only be referenced by rule ID.description- The description for this DIT structure rule. It may benullif there is no description.isObsolete- Indicates whether this DIT structure rule is declared obsolete.nameFormID- The name or OID of the name form with which this DIT structure rule is associated. It must not benull.superiorRuleIDs- The superior rule IDs for this DIT structure rule. It may benullor empty if there are no superior rule IDs.extensions- The set of extensions for this DIT structure rule. It may benullor empty if there are no extensions.
-
-
Method Details
-
getRuleID
Retrieves the rule ID for this DIT structure rule.- Returns:
- The rule ID for this DIT structure rule.
-
getNames
Retrieves the set of names for this DIT structure rule.- Returns:
- The set of names for this DIT structure rule, or an empty array if it does not have any names.
-
getNameOrRuleID
Retrieves the primary name that can be used to reference this DIT structure rule. If one or more names are defined, then the first name will be used. Otherwise, the string representation of the rule ID will be returned.- Returns:
- The primary name that can be used to reference this DIT structure rule.
-
hasNameOrRuleID
Indicates whether the provided string matches the rule ID or any of the names for this DIT structure rule.- Parameters:
s- The string for which to make the determination. It must not benull.- Returns:
trueif the provided string matches the rule ID or any of the names for this DIT structure rule, orfalseif not.
-
getDescription
Retrieves the description for this DIT structure rule, if available.- Returns:
- The description for this DIT structure rule, or
nullif there is no description defined.
-
isObsolete
Indicates whether this DIT structure rule is declared obsolete.- Returns:
trueif this DIT structure rule is declared obsolete, orfalseif it is not.
-
getNameFormID
Retrieves the name or OID of the name form with which this DIT structure rule is associated.- Returns:
- The name or OID of the name form with which this DIT structure rule is associated.
-
getSuperiorRuleIDs
Retrieves the rule IDs of the superior rules for this DIT structure rule.- Returns:
- The rule IDs of the superior rules for this DIT structure rule, or an empty array if there are no superior rule IDs.
-
getExtensions
Retrieves the set of extensions for this DIT structure rule. They will be mapped from the extension name (which should start with "X-") to the set of values for that extension.- Returns:
- The set of extensions for this DIT structure rule.
-
getSchemaElementType
Retrieves the type of schema element that this object represents.- Specified by:
getSchemaElementTypein classSchemaElement- Returns:
- The type of schema element that this object represents.
-
hashCode
Retrieves a hash code for this schema element.- Specified by:
hashCodein classSchemaElement- Returns:
- A hash code for this schema element.
-
equals
Indicates whether the provided object is equal to this schema element.- Specified by:
equalsin classSchemaElement- Parameters:
o- The object for which to make the determination.- Returns:
trueif the provided object may be considered equal to this schema element, orfalseif not.
-
toString
Retrieves a string representation of this DIT structure rule definition, in the format described in RFC 4512 section 4.1.7.1.- Specified by:
toStringin classSchemaElement- Returns:
- A string representation of this DIT structure rule definition.
-