com.unboundid.directory.sdk.common.schema
Interface Schema


@NotExtensible
@ThreadSafety(level=INTERFACE_THREADSAFE)
public interface Schema

This interface provides a number of methods that may be used to interact with the server schema.


Method Summary
 AttributeSyntax getAttributeSyntax(java.lang.String oid)
          Retrieves the attribute syntax with the specified OID, if available.
 java.util.Map<java.lang.String,AttributeSyntax> getAttributeSyntaxesByOID()
          Retrieves the set of attribute syntaxes defined in the schema, mapped from OID to the corresponding attribute syntax.
 AttributeType getAttributeType(java.lang.String name, boolean returnDefault)
          Retrieves the specified attribute type from the server schema, optionally creating a new attribute type with the specified name if none is defined.
 java.util.Map<java.lang.String,AttributeType> getAttributeTypesByName()
          Retrieves the set of attribute types defined in the server schema, mapped from lowercase name or OID to the attribute type definition.
 DITContentRule getDITContentRule(ObjectClass structuralClass)
          Retrieves the specified DIT content rule from the server schema.
 java.util.Map<ObjectClass,DITContentRule> getDITContentRulesByStructuralClass()
          Retrieves the set of DIT content rules defined in the server schema, mapped from structural object class to the corresponding DIT structure rule definition.
 DITStructureRule getDITStructureRule(int ruleID)
          Retrieves the specified DIT structure rule from the server schema.
 DITStructureRule getDITStructureRule(NameForm nameForm)
          Retrieves the specified DIT structure rule from the server schema.
 java.util.Map<java.lang.Integer,DITStructureRule> getDITStructureRulesByRuleID()
          Retrieves the set of DIT structure rules defined in the server schema, mapped from rule ID to the corresponding DIT structure rule definition.
 MatchingRule getMatchingRule(java.lang.String name)
          Retrieves the specified matching rule from the server schema.
 java.util.Map<java.lang.String,MatchingRule> getMatchingRulesByName()
          Retrieves the set of matching rules defined in the server schema, mapped from lowercase name or OID to the matching rule definition.
 MatchingRuleUse getMatchingRuleUse(MatchingRule matchingRule)
          Retrieves the specified matching rule use from the server schema.
 java.util.Map<MatchingRule,MatchingRuleUse> getMatchingRuleUsesByMatchingRule()
          Retrieves the set of matching rule uses defined in the server schema, mapped from matching rule to its corresponding matching rule use.
 NameForm getNameForm(ObjectClass structuralClass)
          Retrieves the specified name form from the server schema.
 NameForm getNameForm(java.lang.String name)
          Retrieves the specified name form from the server schema.
 java.util.Map<ObjectClass,NameForm> getNameFormsByStructuralClass()
          Retrieves the set of name forms defined in the server schema, mapped from structural object class to the corresponding name form definition.
 ObjectClass getObjectClass(java.lang.String name, boolean returnDefault)
          Retrieves the specified object class from the server schema, optionally creating a new class with the specified name if none is defined.
 java.util.Map<java.lang.String,ObjectClass> getObjectClassesByName()
          Retrieves the set of object classes defined in the server schema, mapped from lowercase name or OID to the object class definition.
 

Method Detail

getAttributeTypesByName

java.util.Map<java.lang.String,AttributeType> getAttributeTypesByName()
Retrieves the set of attribute types defined in the server schema, mapped from lowercase name or OID to the attribute type definition. Each attribute type definition may be included in the map multiple times with each of its names as well as its OID.

Returns:
The set of attribute types defined in the server schema, mapped from lowercase name or OID to the attribute type definition.

getAttributeType

AttributeType getAttributeType(java.lang.String name,
                               boolean returnDefault)
Retrieves the specified attribute type from the server schema, optionally creating a new attribute type with the specified name if none is defined.

Parameters:
name - The name or OID of the attribute type to retrieve.
returnDefault - Indicates whether to create a new attribute type with the given name and a default settings if no such attribute is defined in the server schema.
Returns:
The requested attribute type, or null if no such attribute is defined in the schema and a default type should not be returned.

getObjectClassesByName

java.util.Map<java.lang.String,ObjectClass> getObjectClassesByName()
Retrieves the set of object classes defined in the server schema, mapped from lowercase name or OID to the object class definition. Each object class definition may be included in the map multiple times with each of its names as well as its OID.

Returns:
The set of object classes defined in the server schema, mapped from lowercase name or OID to the object class definition.

getObjectClass

ObjectClass getObjectClass(java.lang.String name,
                           boolean returnDefault)
Retrieves the specified object class from the server schema, optionally creating a new class with the specified name if none is defined.

Parameters:
name - The name or OID of the object class to retrieve.
returnDefault - Indicates whether to create a new object class with the given name and a default settings if no such object class is defined in the server schema.
Returns:
The requested object class, or null if no such object class is defined in the schema and a default class should not be returned.

getAttributeSyntaxesByOID

java.util.Map<java.lang.String,AttributeSyntax> getAttributeSyntaxesByOID()
Retrieves the set of attribute syntaxes defined in the schema, mapped from OID to the corresponding attribute syntax.

Returns:
The set of attribute syntaxes defined in the server schema, mapped from OID to the attribute syntax definition.

getAttributeSyntax

AttributeSyntax getAttributeSyntax(java.lang.String oid)
Retrieves the attribute syntax with the specified OID, if available.

Parameters:
oid - The OID of the attribute syntax to retrieve.
Returns:
The requested attribute syntax, or null if there is no such syntax defined in the server.

getMatchingRulesByName

java.util.Map<java.lang.String,MatchingRule> getMatchingRulesByName()
Retrieves the set of matching rules defined in the server schema, mapped from lowercase name or OID to the matching rule definition. Each matching rule definition may be included in the map multiple times with each of its names as well as its OID.

Returns:
The set of matching rules defined in the server schema, mapped from lowercase name or OID to the matching rule definition.

getMatchingRule

MatchingRule getMatchingRule(java.lang.String name)
Retrieves the specified matching rule from the server schema.

Parameters:
name - The name or OID of the matching rule to retrieve.
Returns:
The requested matching rule, or null if no such matching rule is defined in the schema.

getNameFormsByStructuralClass

java.util.Map<ObjectClass,NameForm> getNameFormsByStructuralClass()
Retrieves the set of name forms defined in the server schema, mapped from structural object class to the corresponding name form definition.

Returns:
The set of name forms defined in the server schema, mapped from structural object class to the corresponding name form definition.

getNameForm

NameForm getNameForm(java.lang.String name)
Retrieves the specified name form from the server schema.

Parameters:
name - The name or OID of the name form to retrieve.
Returns:
The requested name form, or null if there is no name form with the specified name or OID.

getNameForm

NameForm getNameForm(ObjectClass structuralClass)
Retrieves the specified name form from the server schema.

Parameters:
structuralClass - The structural object class for which to retrieve the corresponding name form.
Returns:
The requested name form, or null if there is no name form associated with the specified structural object class.

getDITContentRulesByStructuralClass

java.util.Map<ObjectClass,DITContentRule> getDITContentRulesByStructuralClass()
Retrieves the set of DIT content rules defined in the server schema, mapped from structural object class to the corresponding DIT structure rule definition.

Returns:
The set of DIT content rules defined in the server schema, mapped from structural object class to the corresponding DIT content rule definition.

getDITContentRule

DITContentRule getDITContentRule(ObjectClass structuralClass)
Retrieves the specified DIT content rule from the server schema.

Parameters:
structuralClass - The structural object class for which to retrieve the corresponding DIT content rule.
Returns:
The requested DIT content rule, or null if no such DIT content rule is defined in the server schema.

getDITStructureRulesByRuleID

java.util.Map<java.lang.Integer,DITStructureRule> getDITStructureRulesByRuleID()
Retrieves the set of DIT structure rules defined in the server schema, mapped from rule ID to the corresponding DIT structure rule definition.

Returns:
The set of DIT structure rules defined in the server schema, mapped from rule ID to the corresponding DIT structure rule definition.

getDITStructureRule

DITStructureRule getDITStructureRule(int ruleID)
Retrieves the specified DIT structure rule 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 no such DIT structure rule is defined in the server schema.

getDITStructureRule

DITStructureRule getDITStructureRule(NameForm nameForm)
Retrieves the specified DIT structure rule from the server schema.

Parameters:
nameForm - The name form for which to retrieve the corresponding DIT structure rule.
Returns:
The requested DIT structure rule, or null if no such DIT structure rule is defined in the server schema.

getMatchingRuleUsesByMatchingRule

java.util.Map<MatchingRule,MatchingRuleUse> getMatchingRuleUsesByMatchingRule()
Retrieves the set of matching rule uses defined in the server schema, mapped from matching rule to its corresponding matching rule use.

Returns:
The set of matching rule uses defined in the server schema, mapped from matching rule to its corresponding matching rule use.

getMatchingRuleUse

MatchingRuleUse getMatchingRuleUse(MatchingRule matchingRule)
Retrieves the specified matching rule use from the server schema.

Parameters:
matchingRule - The matching rule for which to retrieve the corresponding matching rule use.
Returns:
The requested matching rule use, or null if there is no matching rule use associated with the provided matching rule.