Package com.unboundid.ldap.sdk.schema
Class Schema
- java.lang.Object
-
- com.unboundid.ldap.sdk.schema.Schema
-
- All Implemented Interfaces:
java.io.Serializable
@NotMutable @ThreadSafety(level=COMPLETELY_THREADSAFE) public final class Schema extends java.lang.Object implements java.io.Serializable
This class provides a data structure for representing a directory server subschema subentry. This includes information about the attribute syntaxes, matching rules, attribute types, object classes, name forms, DIT content rules, DIT structure rules, and matching rule uses defined in the server schema.- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
ATTR_ATTRIBUTE_SYNTAX
The name of the attribute used to hold the attribute syntax definitions.static java.lang.String
ATTR_ATTRIBUTE_TYPE
The name of the attribute used to hold the attribute type definitions.static java.lang.String
ATTR_DIT_CONTENT_RULE
The name of the attribute used to hold the DIT content rule definitions.static java.lang.String
ATTR_DIT_STRUCTURE_RULE
The name of the attribute used to hold the DIT structure rule definitions.static java.lang.String
ATTR_MATCHING_RULE
The name of the attribute used to hold the matching rule definitions.static java.lang.String
ATTR_MATCHING_RULE_USE
The name of the attribute used to hold the matching rule use definitions.static java.lang.String
ATTR_NAME_FORM
The name of the attribute used to hold the name form definitions.static java.lang.String
ATTR_OBJECT_CLASS
The name of the attribute used to hold the object class definitions.static java.lang.String
ATTR_SUBSCHEMA_SUBENTRY
The name of the attribute used to hold the DN of the subschema subentry with the schema information that governs a specified entry.
-
Constructor Summary
Constructors Constructor Description Schema(Entry schemaEntry)
Creates a new schema object by decoding the information in the provided entry.Schema(Entry schemaEntry, java.util.Map<java.lang.String,LDAPException> unparsableAttributeSyntaxes, java.util.Map<java.lang.String,LDAPException> unparsableMatchingRules, java.util.Map<java.lang.String,LDAPException> unparsableAttributeTypes, java.util.Map<java.lang.String,LDAPException> unparsableObjectClasses, java.util.Map<java.lang.String,LDAPException> unparsableDITContentRules, java.util.Map<java.lang.String,LDAPException> unparsableDITStructureRules, java.util.Map<java.lang.String,LDAPException> unparsableNameForms, java.util.Map<java.lang.String,LDAPException> unparsableMatchingRuleUses)
Creates a new schema object by decoding the information in the provided entry, optionally capturing any information about unparsable values in the provided maps.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(java.lang.Object o)
Indicates whether the provided object is equal to this schema object.java.util.Set<ObjectClassDefinition>
getAbstractObjectClasses()
Retrieves the set of abstract object class definitions contained in the server schema.AttributeSyntaxDefinition
getAttributeSyntax(java.lang.String oid)
Retrieves the attribute syntax with the specified OID from the server schema.java.util.Set<AttributeSyntaxDefinition>
getAttributeSyntaxes()
Retrieves the set of attribute syntax definitions contained in the server schema.AttributeTypeDefinition
getAttributeType(java.lang.String name)
Retrieves the attribute type with the specified name or OID from the server schema.java.util.Set<AttributeTypeDefinition>
getAttributeTypes()
Retrieves the set of attribute type definitions contained in the server schema.java.util.Set<ObjectClassDefinition>
getAuxiliaryObjectClasses()
Retrieves the set of auxiliary object class definitions contained in the server schema.static Schema
getDefaultStandardSchema()
Retrieves a schema object that contains definitions for a number of standard attribute types and object classes from LDAP-related RFCs and Internet Drafts.DITContentRuleDefinition
getDITContentRule(java.lang.String name)
Retrieves the DIT content rule with the specified name or OID from the server schema.java.util.Set<DITContentRuleDefinition>
getDITContentRules()
Retrieves the set of DIT content rule definitions contained in the server schema.DITStructureRuleDefinition
getDITStructureRuleByID(int ruleID)
Retrieves the DIT content rule with the specified rule ID from the server schema.DITStructureRuleDefinition
getDITStructureRuleByName(java.lang.String ruleName)
Retrieves the DIT content rule with the specified name from the server schema.DITStructureRuleDefinition
getDITStructureRuleByNameForm(java.lang.String nameForm)
Retrieves the DIT content rule associated with the specified name form from the server schema.java.util.Set<DITStructureRuleDefinition>
getDITStructureRules()
Retrieves the set of DIT structure rule definitions contained in the server schema.MatchingRuleDefinition
getMatchingRule(java.lang.String name)
Retrieves the matching rule with the specified name or OID from the server schema.java.util.Set<MatchingRuleDefinition>
getMatchingRules()
Retrieves the set of matching rule definitions contained in the server schema.MatchingRuleUseDefinition
getMatchingRuleUse(java.lang.String name)
Retrieves the matching rule use with the specified name or OID from the server schema.java.util.Set<MatchingRuleUseDefinition>
getMatchingRuleUses()
Retrieves the set of matching rule use definitions contained in the server schema.NameFormDefinition
getNameFormByName(java.lang.String name)
Retrieves the name form with the specified name or OID from the server schema.NameFormDefinition
getNameFormByObjectClass(java.lang.String objectClass)
Retrieves the name form associated with the specified structural object class from the server schema.java.util.Set<NameFormDefinition>
getNameForms()
Retrieves the set of name form definitions contained in the server schema.ObjectClassDefinition
getObjectClass(java.lang.String name)
Retrieves the object class with the specified name or OID from the server schema.java.util.Set<ObjectClassDefinition>
getObjectClasses()
Retrieves the set of object class definitions contained in the server schema.java.util.Set<AttributeTypeDefinition>
getOperationalAttributeTypes()
Retrieves the set of operational attribute type definitions (i.e., those definitions with a usage of directoryOperation, distributedOperation, or dSAOperation) contained in the server schema.static Schema
getSchema(LDAPConnection connection)
Retrieves the directory server schema over the provided connection.static Schema
getSchema(LDAPConnection connection, java.lang.String entryDN)
Retrieves the directory server schema that governs the specified entry.static Schema
getSchema(LDAPConnection connection, java.lang.String entryDN, boolean throwOnUnparsableElement)
Retrieves the directory server schema that governs the specified entry.static Schema
getSchema(java.io.File... schemaFiles)
Reads schema information from one or more files containing the schema represented in LDIF form, with the definitions represented in the form described in section 4.1 of RFC 4512.static Schema
getSchema(java.io.InputStream inputStream)
Reads schema information from the provided input stream.static Schema
getSchema(java.lang.String... schemaFiles)
Reads schema information from one or more files containing the schema represented in LDIF form, with the definitions represented in the form described in section 4.1 of RFC 4512.static Schema
getSchema(java.util.List<java.io.File> schemaFiles)
Reads schema information from one or more files containing the schema represented in LDIF form, with the definitions represented in the form described in section 4.1 of RFC 4512.static Schema
getSchema(java.util.List<java.io.File> schemaFiles, boolean throwOnUnparsableElement)
Reads schema information from one or more files containing the schema represented in LDIF form, with the definitions represented in the form described in section 4.1 of RFC 4512.ReadOnlyEntry
getSchemaEntry()
Retrieves the entry used to create this schema object.java.util.Set<ObjectClassDefinition>
getStructuralObjectClasses()
Retrieves the set of structural object class definitions contained in the server schema.java.util.List<AttributeTypeDefinition>
getSubordinateAttributeTypes(AttributeTypeDefinition d)
Retrieves a list of all subordinate attribute type definitions for the provided attribute type definition.static java.lang.String
getSubschemaSubentryDN(LDAPConnection connection, java.lang.String entryDN)
Retrieves the value of the subschemaSubentry attribute from the specified entry using the provided connection.java.util.Set<AttributeTypeDefinition>
getUserAttributeTypes()
Retrieves the set of user attribute type definitions (i.e., those definitions with a usage of userApplications) contained in the server schema.int
hashCode()
Retrieves a hash code for this schema object.static Schema
mergeSchemas(Schema... schemas)
Retrieves a schema containing all of the elements of each of the provided schemas.static Schema
parseSchemaEntry(Entry schemaEntry)
Parses all schema elements contained in the provided entry.java.lang.String
toString()
Retrieves a string representation of the associated schema entry.
-
-
-
Field Detail
-
ATTR_ATTRIBUTE_SYNTAX
public static final java.lang.String ATTR_ATTRIBUTE_SYNTAX
The name of the attribute used to hold the attribute syntax definitions.- See Also:
- Constant Field Values
-
ATTR_ATTRIBUTE_TYPE
public static final java.lang.String ATTR_ATTRIBUTE_TYPE
The name of the attribute used to hold the attribute type definitions.- See Also:
- Constant Field Values
-
ATTR_DIT_CONTENT_RULE
public static final java.lang.String ATTR_DIT_CONTENT_RULE
The name of the attribute used to hold the DIT content rule definitions.- See Also:
- Constant Field Values
-
ATTR_DIT_STRUCTURE_RULE
public static final java.lang.String ATTR_DIT_STRUCTURE_RULE
The name of the attribute used to hold the DIT structure rule definitions.- See Also:
- Constant Field Values
-
ATTR_MATCHING_RULE
public static final java.lang.String ATTR_MATCHING_RULE
The name of the attribute used to hold the matching rule definitions.- See Also:
- Constant Field Values
-
ATTR_MATCHING_RULE_USE
public static final java.lang.String ATTR_MATCHING_RULE_USE
The name of the attribute used to hold the matching rule use definitions.- See Also:
- Constant Field Values
-
ATTR_NAME_FORM
public static final java.lang.String ATTR_NAME_FORM
The name of the attribute used to hold the name form definitions.- See Also:
- Constant Field Values
-
ATTR_OBJECT_CLASS
public static final java.lang.String ATTR_OBJECT_CLASS
The name of the attribute used to hold the object class definitions.- See Also:
- Constant Field Values
-
ATTR_SUBSCHEMA_SUBENTRY
public static final java.lang.String ATTR_SUBSCHEMA_SUBENTRY
The name of the attribute used to hold the DN of the subschema subentry with the schema information that governs a specified entry.- See Also:
- Constant Field Values
-
-
Constructor Detail
-
Schema
public Schema(Entry schemaEntry)
Creates a new schema object by decoding the information in the provided entry. Any schema elements that cannot be parsed will be silently ignored.- Parameters:
schemaEntry
- The schema entry to decode. It must not benull
.
-
Schema
public Schema(Entry schemaEntry, java.util.Map<java.lang.String,LDAPException> unparsableAttributeSyntaxes, java.util.Map<java.lang.String,LDAPException> unparsableMatchingRules, java.util.Map<java.lang.String,LDAPException> unparsableAttributeTypes, java.util.Map<java.lang.String,LDAPException> unparsableObjectClasses, java.util.Map<java.lang.String,LDAPException> unparsableDITContentRules, java.util.Map<java.lang.String,LDAPException> unparsableDITStructureRules, java.util.Map<java.lang.String,LDAPException> unparsableNameForms, java.util.Map<java.lang.String,LDAPException> unparsableMatchingRuleUses)
Creates a new schema object by decoding the information in the provided entry, optionally capturing any information about unparsable values in the provided maps.- Parameters:
schemaEntry
- The schema entry to decode. It must not benull
.unparsableAttributeSyntaxes
- A map that will be updated with with information about any attribute syntax definitions that cannot be parsed. It may benull
if unparsable attribute syntax definitions should be silently ignored.unparsableMatchingRules
- A map that will be updated with with information about any matching rule definitions that cannot be parsed. It may benull
if unparsable attribute syntax definitions should be silently ignored.unparsableAttributeTypes
- A map that will be updated with with information about any attribute type definitions that cannot be parsed. It may benull
if unparsable attribute syntax definitions should be silently ignored.unparsableObjectClasses
- A map that will be updated with with information about any object class definitions that cannot be parsed. It may benull
if unparsable attribute syntax definitions should be silently ignored.unparsableDITContentRules
- A map that will be updated with with information about any DIT content rule definitions that cannot be parsed. It may benull
if unparsable attribute syntax definitions should be silently ignored.unparsableDITStructureRules
- A map that will be updated with with information about any DIT structure rule definitions that cannot be parsed. It may benull
if unparsable attribute syntax definitions should be silently ignored.unparsableNameForms
- A map that will be updated with with information about any name form definitions that cannot be parsed. It may benull
if unparsable attribute syntax definitions should be silently ignored.unparsableMatchingRuleUses
- A map that will be updated with with information about any matching rule use definitions that cannot be parsed. It may benull
if unparsable attribute syntax definitions should be silently ignored.
-
-
Method Detail
-
parseSchemaEntry
public static Schema parseSchemaEntry(Entry schemaEntry) throws LDAPException
Parses all schema elements contained in the provided entry. This method differs from theSchema(Entry)
constructor in that this method will throw an exception if it encounters any unparsable schema elements, while the constructor will silently ignore them. Alternately, the 'constructor that takes a bunch of maps can be used to- Parameters:
schemaEntry
- The schema entry to parse. It must not benull
.- Returns:
- The schema entry that was parsed.
- Throws:
LDAPException
- If the provided entry contains any schema element definitions that cannot be parsed.
-
getSchema
public static Schema getSchema(LDAPConnection connection) throws LDAPException
Retrieves the directory server schema over the provided connection. The root DSE will first be retrieved in order to get its subschemaSubentry DN, and then that entry will be retrieved from the server and its contents decoded as schema elements. This should be sufficient for directories that only provide a single schema, but for directories with multiple schemas it may be necessary to specify the DN of an entry for which to retrieve the subschema subentry. Any unparsable schema elements will be silently ignored.- Parameters:
connection
- The connection to use in order to retrieve the server schema. It must not benull
.- Returns:
- A decoded representation of the server schema.
- Throws:
LDAPException
- If a problem occurs while obtaining the server schema.
-
getSchema
public static Schema getSchema(LDAPConnection connection, java.lang.String entryDN) throws LDAPException
Retrieves the directory server schema that governs the specified entry. In some servers, different portions of the DIT may be served by different schemas, and in such cases it will be necessary to provide the DN of the target entry in order to ensure that the appropriate schema which governs that entry is returned. For servers that support only a single schema, any entry DN (including that of the root DSE) should be sufficient. Any unparsable schema elements will be silently ignored.- Parameters:
connection
- The connection to use in order to retrieve the server schema. It must not benull
.entryDN
- The DN of the entry for which to retrieve the governing schema. It may benull
or an empty string in order to retrieve the schema that governs the server's root DSE.- Returns:
- A decoded representation of the server schema, or
null
if it is not available for some reason (e.g., the client does not have permission to read the server schema). - Throws:
LDAPException
- If a problem occurs while obtaining the server schema.
-
getSchema
public static Schema getSchema(LDAPConnection connection, java.lang.String entryDN, boolean throwOnUnparsableElement) throws LDAPException
Retrieves the directory server schema that governs the specified entry. In some servers, different portions of the DIT may be served by different schemas, and in such cases it will be necessary to provide the DN of the target entry in order to ensure that the appropriate schema which governs that entry is returned. For servers that support only a single schema, any entry DN (including that of the root DSE) should be sufficient. This method may optionally throw an exception if the retrieved schema contains one or more unparsable schema elements.- Parameters:
connection
- The connection to use in order to retrieve the server schema. It must not benull
.entryDN
- The DN of the entry for which to retrieve the governing schema. It may benull
or an empty string in order to retrieve the schema that governs the server's root DSE.throwOnUnparsableElement
- Indicates whether to throw an exception if the schema entry that is retrieved has one or more unparsable schema elements.- Returns:
- A decoded representation of the server schema, or
null
if it is not available for some reason (e.g., the client does not have permission to read the server schema). - Throws:
LDAPException
- If a problem occurs while obtaining the server schema, or if the schema contains one or more unparsable elements andthrowOnUnparsableElement
istrue
.
-
getSchema
public static Schema getSchema(java.lang.String... schemaFiles) throws java.io.IOException, LDIFException
Reads schema information from one or more files containing the schema represented in LDIF form, with the definitions represented in the form described in section 4.1 of RFC 4512. Each file should contain a single entry. Any unparsable schema elements will be silently ignored.- Parameters:
schemaFiles
- The paths to the LDIF files containing the schema information to be read. At least one file must be specified. If multiple files are specified, then they will be processed in the order in which they have been listed.- Returns:
- The schema read from the specified schema files, or
null
if none of the files contains any LDIF data to be read. - Throws:
java.io.IOException
- If a problem occurs while attempting to read from any of the specified files.LDIFException
- If a problem occurs while attempting to parse the contents of any of the schema files.
-
getSchema
public static Schema getSchema(java.io.File... schemaFiles) throws java.io.IOException, LDIFException
Reads schema information from one or more files containing the schema represented in LDIF form, with the definitions represented in the form described in section 4.1 of RFC 4512. Each file should contain a single entry. Any unparsable schema elements will be silently ignored.- Parameters:
schemaFiles
- The paths to the LDIF files containing the schema information to be read. At least one file must be specified. If multiple files are specified, then they will be processed in the order in which they have been listed.- Returns:
- The schema read from the specified schema files, or
null
if none of the files contains any LDIF data to be read. - Throws:
java.io.IOException
- If a problem occurs while attempting to read from any of the specified files.LDIFException
- If a problem occurs while attempting to parse the contents of any of the schema files.
-
getSchema
public static Schema getSchema(java.util.List<java.io.File> schemaFiles) throws java.io.IOException, LDIFException
Reads schema information from one or more files containing the schema represented in LDIF form, with the definitions represented in the form described in section 4.1 of RFC 4512. Each file should contain a single entry. Any unparsable schema elements will be silently ignored.- Parameters:
schemaFiles
- The paths to the LDIF files containing the schema information to be read. At least one file must be specified. If multiple files are specified, then they will be processed in the order in which they have been listed.- Returns:
- The schema read from the specified schema files, or
null
if none of the files contains any LDIF data to be read. - Throws:
java.io.IOException
- If a problem occurs while attempting to read from any of the specified files.LDIFException
- If a problem occurs while attempting to parse the contents of any of the schema files.
-
getSchema
public static Schema getSchema(java.util.List<java.io.File> schemaFiles, boolean throwOnUnparsableElement) throws java.io.IOException, LDIFException
Reads schema information from one or more files containing the schema represented in LDIF form, with the definitions represented in the form described in section 4.1 of RFC 4512. Each file should contain a single entry.- Parameters:
schemaFiles
- The paths to the LDIF files containing the schema information to be read. At least one file must be specified. If multiple files are specified, then they will be processed in the order in which they have been listed.throwOnUnparsableElement
- Indicates whether to throw an exception if the schema entry that is retrieved has one or more unparsable schema elements.- Returns:
- The schema read from the specified schema files, or
null
if none of the files contains any LDIF data to be read. - Throws:
java.io.IOException
- If a problem occurs while attempting to read from any of the specified files.LDIFException
- If a problem occurs while attempting to parse the contents of any of the schema files. IfthrowOnUnparsableElement
istrue
, then this may also be thrown if any of the schema files contains any unparsable schema elements.
-
getSchema
public static Schema getSchema(java.io.InputStream inputStream) throws java.io.IOException, LDIFException
Reads schema information from the provided input stream. The information should be in LDIF form, with the definitions represented in the form described in section 4.1 of RFC 4512. Only a single entry will be read from the input stream, and it will be closed at the end of this method.- Parameters:
inputStream
- The input stream from which the schema entry will be read. It must not benull
, and it will be closed when this method returns.- Returns:
- The schema read from the provided input stream, or
null
if the end of the input stream is reached without reading any data. - Throws:
java.io.IOException
- If a problem is encountered while attempting to read from the provided input stream.LDIFException
- If a problem occurs while attempting to parse the data read as LDIF.
-
getDefaultStandardSchema
public static Schema getDefaultStandardSchema() throws LDAPException
Retrieves a schema object that contains definitions for a number of standard attribute types and object classes from LDAP-related RFCs and Internet Drafts.- Returns:
- A schema object that contains definitions for a number of standard attribute types and object classes from LDAP-related RFCs and Internet Drafts.
- Throws:
LDAPException
- If a problem occurs while attempting to obtain or parse the default standard schema definitions.
-
mergeSchemas
public static Schema mergeSchemas(Schema... schemas)
Retrieves a schema containing all of the elements of each of the provided schemas.- Parameters:
schemas
- The schemas to be merged. It must not benull
or empty.- Returns:
- A merged representation of the provided schemas.
-
getSchemaEntry
public ReadOnlyEntry getSchemaEntry()
Retrieves the entry used to create this schema object.- Returns:
- The entry used to create this schema object.
-
getSubschemaSubentryDN
public static java.lang.String getSubschemaSubentryDN(LDAPConnection connection, java.lang.String entryDN) throws LDAPException
Retrieves the value of the subschemaSubentry attribute from the specified entry using the provided connection.- Parameters:
connection
- The connection to use in order to perform the search. It must not benull
.entryDN
- The DN of the entry from which to retrieve the subschemaSubentry attribute. It may benull
or an empty string in order to retrieve the value from the server's root DSE.- Returns:
- The value of the subschemaSubentry attribute from the specified
entry, or
null
if it is not available for some reason (e.g., the client does not have permission to read the target entry or the subschemaSubentry attribute). - Throws:
LDAPException
- If a problem occurs while attempting to retrieve the specified entry.
-
getAttributeSyntaxes
public java.util.Set<AttributeSyntaxDefinition> getAttributeSyntaxes()
Retrieves the set of attribute syntax definitions contained in the server schema.- Returns:
- The set of attribute syntax definitions contained in the server schema.
-
getAttributeSyntax
public AttributeSyntaxDefinition getAttributeSyntax(java.lang.String oid)
Retrieves the attribute syntax with the specified OID from the server schema.- Parameters:
oid
- The OID of the attribute syntax to retrieve. It must not benull
. It may optionally include a minimum upper bound (as may appear when the syntax OID is included in an attribute type definition), but if it does then that portion will be ignored when retrieving the attribute syntax.- Returns:
- The requested attribute syntax, or
null
if there is no such syntax defined in the server schema.
-
getAttributeTypes
public java.util.Set<AttributeTypeDefinition> getAttributeTypes()
Retrieves the set of attribute type definitions contained in the server schema.- Returns:
- The set of attribute type definitions contained in the server schema.
-
getOperationalAttributeTypes
public java.util.Set<AttributeTypeDefinition> getOperationalAttributeTypes()
Retrieves the set of operational attribute type definitions (i.e., those definitions with a usage of directoryOperation, distributedOperation, or dSAOperation) contained in the server schema.- Returns:
- The set of operational attribute type definitions contained in the server schema.
-
getUserAttributeTypes
public java.util.Set<AttributeTypeDefinition> getUserAttributeTypes()
Retrieves the set of user attribute type definitions (i.e., those definitions with a usage of userApplications) contained in the server schema.- Returns:
- The set of user attribute type definitions contained in the server schema.
-
getAttributeType
public AttributeTypeDefinition getAttributeType(java.lang.String name)
Retrieves the attribute type with the specified name or OID from the server schema.- Parameters:
name
- The name or OID of the attribute type to retrieve. It must not benull
.- Returns:
- The requested attribute type, or
null
if there is no such attribute type defined in the server schema.
-
getSubordinateAttributeTypes
public java.util.List<AttributeTypeDefinition> getSubordinateAttributeTypes(AttributeTypeDefinition d)
Retrieves a list of all subordinate attribute type definitions for the provided attribute type definition.- Parameters:
d
- The attribute type definition for which to retrieve all subordinate attribute types. It must not benull
.- Returns:
- A list of all subordinate attribute type definitions for the provided attribute type definition, or an empty list if it does not have any subordinate types or the provided attribute type is not defined in the schema.
-
getDITContentRules
public java.util.Set<DITContentRuleDefinition> getDITContentRules()
Retrieves the set of DIT content rule definitions contained in the server schema.- Returns:
- The set of DIT content rule definitions contained in the server schema.
-
getDITContentRule
public DITContentRuleDefinition getDITContentRule(java.lang.String name)
Retrieves the DIT content rule with the specified name or OID from the server schema.- Parameters:
name
- The name or OID of the DIT content rule to retrieve. It must not benull
.- Returns:
- The requested DIT content rule, or
null
if there is no such rule defined in the server schema.
-
getDITStructureRules
public java.util.Set<DITStructureRuleDefinition> getDITStructureRules()
Retrieves the set of DIT structure rule definitions contained in the server schema.- Returns:
- The set of DIT structure rule definitions contained in the server schema.
-
getDITStructureRuleByID
public DITStructureRuleDefinition getDITStructureRuleByID(int ruleID)
Retrieves the DIT content rule with the specified rule ID from the server schema.- Parameters:
ruleID
- The rule ID for the DIT structure rule to retrieve.- Returns:
- The requested DIT structure rule, or
null
if there is no such rule defined in the server schema.
-
getDITStructureRuleByName
public DITStructureRuleDefinition getDITStructureRuleByName(java.lang.String ruleName)
Retrieves the DIT content rule with the specified name from the server schema.- Parameters:
ruleName
- The name of the DIT structure rule to retrieve. It must not benull
.- Returns:
- The requested DIT structure rule, or
null
if there is no such rule defined in the server schema.
-
getDITStructureRuleByNameForm
public DITStructureRuleDefinition getDITStructureRuleByNameForm(java.lang.String nameForm)
Retrieves the DIT content rule associated with the specified name form from the server schema.- Parameters:
nameForm
- The name or OID of the name form for which to retrieve the associated DIT structure rule.- Returns:
- The requested DIT structure rule, or
null
if there is no such rule defined in the server schema.
-
getMatchingRules
public java.util.Set<MatchingRuleDefinition> getMatchingRules()
Retrieves the set of matching rule definitions contained in the server schema.- Returns:
- The set of matching rule definitions contained in the server schema.
-
getMatchingRule
public MatchingRuleDefinition getMatchingRule(java.lang.String name)
Retrieves the matching rule with the specified name or OID from the server schema.- Parameters:
name
- The name or OID of the matching rule to retrieve. It must not benull
.- Returns:
- The requested matching rule, or
null
if there is no such rule defined in the server schema.
-
getMatchingRuleUses
public java.util.Set<MatchingRuleUseDefinition> getMatchingRuleUses()
Retrieves the set of matching rule use definitions contained in the server schema.- Returns:
- The set of matching rule use definitions contained in the server schema.
-
getMatchingRuleUse
public MatchingRuleUseDefinition getMatchingRuleUse(java.lang.String name)
Retrieves the matching rule use with the specified name or OID from the server schema.- Parameters:
name
- The name or OID of the matching rule use to retrieve. It must not benull
.- Returns:
- The requested matching rule, or
null
if there is no such matching rule use defined in the server schema.
-
getNameForms
public java.util.Set<NameFormDefinition> getNameForms()
Retrieves the set of name form definitions contained in the server schema.- Returns:
- The set of name form definitions contained in the server schema.
-
getNameFormByName
public NameFormDefinition getNameFormByName(java.lang.String name)
Retrieves the name form with the specified name or OID from the server schema.- Parameters:
name
- The name or OID of the name form to retrieve. It must not benull
.- Returns:
- The requested name form, or
null
if there is no such rule defined in the server schema.
-
getNameFormByObjectClass
public NameFormDefinition getNameFormByObjectClass(java.lang.String objectClass)
Retrieves the name form associated with the specified structural object class from the server schema.- Parameters:
objectClass
- The name or OID of the structural object class for which to retrieve the associated name form. It must not benull
.- Returns:
- The requested name form, or
null
if there is no such rule defined in the server schema.
-
getObjectClasses
public java.util.Set<ObjectClassDefinition> getObjectClasses()
Retrieves the set of object class definitions contained in the server schema.- Returns:
- The set of object class definitions contained in the server schema.
-
getAbstractObjectClasses
public java.util.Set<ObjectClassDefinition> getAbstractObjectClasses()
Retrieves the set of abstract object class definitions contained in the server schema.- Returns:
- The set of abstract object class definitions contained in the server schema.
-
getAuxiliaryObjectClasses
public java.util.Set<ObjectClassDefinition> getAuxiliaryObjectClasses()
Retrieves the set of auxiliary object class definitions contained in the server schema.- Returns:
- The set of auxiliary object class definitions contained in the server schema.
-
getStructuralObjectClasses
public java.util.Set<ObjectClassDefinition> getStructuralObjectClasses()
Retrieves the set of structural object class definitions contained in the server schema.- Returns:
- The set of structural object class definitions contained in the server schema.
-
getObjectClass
public ObjectClassDefinition getObjectClass(java.lang.String name)
Retrieves the object class with the specified name or OID from the server schema.- Parameters:
name
- The name or OID of the object class to retrieve. It must not benull
.- Returns:
- The requested object class, or
null
if there is no such class defined in the server schema.
-
hashCode
public int hashCode()
Retrieves a hash code for this schema object.- Overrides:
hashCode
in classjava.lang.Object
- Returns:
- A hash code for this schema object.
-
equals
public boolean equals(java.lang.Object o)
Indicates whether the provided object is equal to this schema object.- Overrides:
equals
in classjava.lang.Object
- Parameters:
o
- The object for which to make the determination.- Returns:
true
if the provided object is equal to this schema object, orfalse
if not.
-
toString
public java.lang.String toString()
Retrieves a string representation of the associated schema entry.- Overrides:
toString
in classjava.lang.Object
- Returns:
- A string representation of the associated schema entry.
-
-