Package org.ldaptive.schema
Class Schema
- java.lang.Object
-
- org.ldaptive.schema.Schema
-
public class Schema extends java.lang.ObjectBean that contains the schema definitions in RFC 4512.- Author:
- Middleware Services
-
-
Constructor Summary
Constructors Constructor Description Schema()Default constructor.Schema(java.util.Collection<AttributeType> attributeTypes, java.util.Collection<DITContentRule> ditContentRules, java.util.Collection<DITStructureRule> ditStructureRules, java.util.Collection<Syntax> syntaxes, java.util.Collection<MatchingRule> matchingRules, java.util.Collection<MatchingRuleUse> matchingRuleUses, java.util.Collection<NameForm> nameForms, java.util.Collection<ObjectClass> objectClasses)Creates a new schema.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(java.lang.Object o)AttributeTypegetAttributeType(java.lang.String name)Returns the attribute type with the supplied OID or name.java.util.Collection<AttributeType>getAttributeTypes()Returns the attribute types.java.lang.String[]getBinaryAttributeNames()Returns the attribute names in this schema that represent binary data.DITContentRulegetDITContentRule(java.lang.String name)Returns the DIT content rule with the supplied OID or name.java.util.Collection<DITContentRule>getDitContentRules()Returns the DIT content rules.DITStructureRulegetDITStructureRule(int id)Returns the DIT structure rule with the supplied ID.DITStructureRulegetDITStructureRule(java.lang.String name)Returns the DIT structure rule with the supplied name.java.util.Collection<DITStructureRule>getDitStructureRules()Returns the DIT structure rules.MatchingRulegetMatchingRule(java.lang.String name)Returns the matching rule with the supplied OID or name.java.util.Collection<MatchingRule>getMatchingRules()Returns the matching rules.MatchingRuleUsegetMatchingRuleUse(java.lang.String name)Returns the matching rule use with the supplied OID or name.java.util.Collection<MatchingRuleUse>getMatchingRuleUses()Returns the matching rule uses.NameFormgetNameForm(java.lang.String name)Returns the name form with the supplied OID or name.java.util.Collection<NameForm>getNameForms()Returns the name forms.ObjectClassgetObjectClass(java.lang.String name)Returns the object class with the supplied OID or name.java.util.Collection<ObjectClass>getObjectClasses()Returns the object classes.SyntaxgetSyntax(java.lang.String oid)Returns the syntax with the supplied OID.java.util.Collection<Syntax>getSyntaxes()Returns the syntaxes.inthashCode()voidsetAttributeTypes(java.util.Collection<AttributeType> c)Sets the attribute types.voidsetDitContentRules(java.util.Collection<DITContentRule> c)Sets the DIT content rules.voidsetDitStructureRules(java.util.Collection<DITStructureRule> c)Sets the DIT structure rules.voidsetMatchingRules(java.util.Collection<MatchingRule> c)Sets the matching rules.voidsetMatchingRuleUses(java.util.Collection<MatchingRuleUse> c)Sets the matching rule uses.voidsetNameForms(java.util.Collection<NameForm> c)Sets the name forms.voidsetObjectClasses(java.util.Collection<ObjectClass> c)Sets the object classes.voidsetSyntaxes(java.util.Collection<Syntax> c)Sets the syntaxes.java.lang.StringtoString()
-
-
-
Constructor Detail
-
Schema
public Schema()
Default constructor.
-
Schema
public Schema(java.util.Collection<AttributeType> attributeTypes, java.util.Collection<DITContentRule> ditContentRules, java.util.Collection<DITStructureRule> ditStructureRules, java.util.Collection<Syntax> syntaxes, java.util.Collection<MatchingRule> matchingRules, java.util.Collection<MatchingRuleUse> matchingRuleUses, java.util.Collection<NameForm> nameForms, java.util.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 Detail
-
getAttributeTypes
public java.util.Collection<AttributeType> getAttributeTypes()
Returns the attribute types.- Returns:
- attribute types
-
getAttributeType
public AttributeType getAttributeType(java.lang.String name)
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
public void setAttributeTypes(java.util.Collection<AttributeType> c)
Sets the attribute types.- Parameters:
c- attribute types
-
getBinaryAttributeNames
public java.lang.String[] 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
public java.util.Collection<DITContentRule> getDitContentRules()
Returns the DIT content rules.- Returns:
- DIT content rules
-
getDITContentRule
public DITContentRule getDITContentRule(java.lang.String name)
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
public void setDitContentRules(java.util.Collection<DITContentRule> c)
Sets the DIT content rules.- Parameters:
c- DIT content rules
-
getDitStructureRules
public java.util.Collection<DITStructureRule> getDitStructureRules()
Returns the DIT structure rules.- Returns:
- DIT structure rules
-
getDITStructureRule
public DITStructureRule getDITStructureRule(int id)
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
public DITStructureRule getDITStructureRule(java.lang.String name)
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
public void setDitStructureRules(java.util.Collection<DITStructureRule> c)
Sets the DIT structure rules.- Parameters:
c- DIT structure rules
-
getSyntaxes
public java.util.Collection<Syntax> getSyntaxes()
Returns the syntaxes.- Returns:
- syntaxes
-
getSyntax
public Syntax getSyntax(java.lang.String oid)
Returns the syntax with the supplied OID.- Parameters:
oid- OID- Returns:
- syntax or null if OID does not exist
-
setSyntaxes
public void setSyntaxes(java.util.Collection<Syntax> c)
Sets the syntaxes.- Parameters:
c- syntaxes
-
getMatchingRules
public java.util.Collection<MatchingRule> getMatchingRules()
Returns the matching rules.- Returns:
- matching rules
-
getMatchingRule
public MatchingRule getMatchingRule(java.lang.String name)
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
public void setMatchingRules(java.util.Collection<MatchingRule> c)
Sets the matching rules.- Parameters:
c- matching rules
-
getMatchingRuleUses
public java.util.Collection<MatchingRuleUse> getMatchingRuleUses()
Returns the matching rule uses.- Returns:
- matching rule uses
-
getMatchingRuleUse
public MatchingRuleUse getMatchingRuleUse(java.lang.String name)
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
public void setMatchingRuleUses(java.util.Collection<MatchingRuleUse> c)
Sets the matching rule uses.- Parameters:
c- matching rule uses
-
getNameForms
public java.util.Collection<NameForm> getNameForms()
Returns the name forms.- Returns:
- name forms
-
getNameForm
public NameForm getNameForm(java.lang.String name)
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
public void setNameForms(java.util.Collection<NameForm> c)
Sets the name forms.- Parameters:
c- name forms
-
getObjectClasses
public java.util.Collection<ObjectClass> getObjectClasses()
Returns the object classes.- Returns:
- object classes
-
getObjectClass
public ObjectClass getObjectClass(java.lang.String name)
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
public void setObjectClasses(java.util.Collection<ObjectClass> c)
Sets the object classes.- Parameters:
c- object classes
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-