Package org.ldaptive.schema
Class Schema
java.lang.Object
org.ldaptive.schema.Schema
Bean that contains the schema definitions in RFC 4512.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate Collection<AttributeType>
Attribute types.private Collection<DITContentRule>
DIT content rules.private Collection<DITStructureRule>
DIT structure rules.private static final int
hash code seed.private Collection<MatchingRule>
Matching rules.private Collection<MatchingRuleUse>
Matching rule uses.private Collection<NameForm>
Name forms.private Collection<ObjectClass>
Object classes.private Collection<Syntax>
Syntaxes. -
Constructor Summary
ConstructorsConstructorDescriptionSchema()
Default constructor.Schema
(Collection<AttributeType> attributeTypes, Collection<DITContentRule> ditContentRules, Collection<DITStructureRule> ditStructureRules, Collection<Syntax> syntaxes, Collection<MatchingRule> matchingRules, Collection<MatchingRuleUse> matchingRuleUses, Collection<NameForm> nameForms, Collection<ObjectClass> objectClasses) Creates a new schema. -
Method Summary
Modifier and TypeMethodDescriptionboolean
getAttributeType
(String name) Returns the attribute type with the supplied OID or name.Returns the attribute types.String[]
Returns the attribute names in this schema that represent binary data.getDITContentRule
(String name) Returns the DIT content rule with the supplied OID or name.Returns the DIT content rules.getDITStructureRule
(int id) Returns the DIT structure rule with the supplied ID.getDITStructureRule
(String name) Returns the DIT structure rule with the supplied name.Returns the DIT structure rules.getMatchingRule
(String name) Returns the matching rule with the supplied OID or name.Returns the matching rules.getMatchingRuleUse
(String name) Returns the matching rule use with the supplied OID or name.Returns the matching rule uses.getNameForm
(String name) Returns the name form with the supplied OID or name.Returns the name forms.getObjectClass
(String name) Returns the object class with the supplied OID or name.Returns the object classes.Returns the syntax with the supplied OID.Returns the syntaxes.int
hashCode()
void
Sets the attribute types.void
Sets the DIT content rules.void
Sets the DIT structure rules.void
Sets the matching rules.void
Sets the matching rule uses.void
Sets the name forms.void
Sets the object classes.void
Sets the syntaxes.toString()
-
Field Details
-
HASH_CODE_SEED
private static final int HASH_CODE_SEEDhash code seed.- See Also:
-
attributeTypes
Attribute types. -
ditContentRules
DIT content rules. -
ditStructureRules
DIT structure rules. -
syntaxes
Syntaxes. -
matchingRules
Matching rules. -
matchingRuleUses
Matching rule uses. -
nameForms
Name forms. -
objectClasses
Object classes.
-
-
Constructor Details
-
Schema
public Schema()Default constructor. -
Schema
public Schema(Collection<AttributeType> attributeTypes, Collection<DITContentRule> ditContentRules, Collection<DITStructureRule> ditStructureRules, Collection<Syntax> syntaxes, Collection<MatchingRule> matchingRules, Collection<MatchingRuleUse> matchingRuleUses, Collection<NameForm> nameForms, Collection<ObjectClass> objectClasses) Creates a new schema.- Parameters:
attributeTypes
- attribute typesditContentRules
- DIT content rulesditStructureRules
- DIT structure rulessyntaxes
- syntaxesmatchingRules
- matching rulesmatchingRuleUses
- matching rule usesnameForms
- name formsobjectClasses
- object classses
-
-
Method Details
-
getAttributeTypes
Returns the attribute types.- Returns:
- attribute types
-
getAttributeType
Returns the attribute type with the supplied OID or name.- Parameters:
name
- OID or name- Returns:
- attribute type or null if name does not exist
-
setAttributeTypes
Sets the attribute types.- Parameters:
c
- attribute types
-
getBinaryAttributeNames
Returns the attribute names in this schema that represent binary data. This includes attributes with a syntax OID of '1.3.6.1.4.1.1466.115.121.1.5' and any syntax with the 'X-NOT-HUMAN-READABLE' extension.- Returns:
- binary attribute names
-
getDitContentRules
Returns the DIT content rules.- Returns:
- DIT content rules
-
getDITContentRule
Returns the DIT content rule with the supplied OID or name.- Parameters:
name
- OID or name- Returns:
- DIT content rule or null if name does not exist
-
setDitContentRules
Sets the DIT content rules.- Parameters:
c
- DIT content rules
-
getDitStructureRules
Returns the DIT structure rules.- Returns:
- DIT structure rules
-
getDITStructureRule
Returns the DIT structure rule with the supplied ID.- Parameters:
id
- rule ID- Returns:
- DIT structure rule or null if id does not exist
-
getDITStructureRule
Returns the DIT structure rule with the supplied name.- Parameters:
name
- rule name- Returns:
- DIT structure rule or null if name does not exist
-
setDitStructureRules
Sets the DIT structure rules.- Parameters:
c
- DIT structure rules
-
getSyntaxes
Returns the syntaxes.- Returns:
- syntaxes
-
getSyntax
Returns the syntax with the supplied OID.- Parameters:
oid
- OID- Returns:
- syntax or null if OID does not exist
-
setSyntaxes
Sets the syntaxes.- Parameters:
c
- syntaxes
-
getMatchingRules
Returns the matching rules.- Returns:
- matching rules
-
getMatchingRule
Returns the matching rule with the supplied OID or name.- Parameters:
name
- OID or name- Returns:
- matching rule or null if name does not exist
-
setMatchingRules
Sets the matching rules.- Parameters:
c
- matching rules
-
getMatchingRuleUses
Returns the matching rule uses.- Returns:
- matching rule uses
-
getMatchingRuleUse
Returns the matching rule use with the supplied OID or name.- Parameters:
name
- OID or name- Returns:
- matching rule use or null if name does not exist
-
setMatchingRuleUses
Sets the matching rule uses.- Parameters:
c
- matching rule uses
-
getNameForms
Returns the name forms.- Returns:
- name forms
-
getNameForm
Returns the name form with the supplied OID or name.- Parameters:
name
- OID or name- Returns:
- name form or null if name does not exist
-
setNameForms
Sets the name forms.- Parameters:
c
- name forms
-
getObjectClasses
Returns the object classes.- Returns:
- object classes
-
getObjectClass
Returns the object class with the supplied OID or name.- Parameters:
name
- OID or name- Returns:
- object class or null if name does not exist
-
setObjectClasses
Sets the object classes.- Parameters:
c
- object classes
-
equals
-
hashCode
public int hashCode() -
toString
-