org.ldaptive.schema
Class Schema

java.lang.Object
  extended by org.ldaptive.schema.Schema

public class Schema
extends Object

Bean that contains the schema definitions in RFC 4512.

Version:
$Revision: 3060 $ $Date: 2014-09-11 14:53:57 -0400 (Thu, 11 Sep 2014) $
Author:
Middleware Services

Constructor Summary
Schema()
          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
 boolean equals(Object o)
          
 AttributeType getAttributeType(String name)
          Returns the attribute type with the supplied OID or name.
 Collection<AttributeType> getAttributeTypes()
          Returns the attribute types.
 String[] getBinaryAttributeNames()
          Returns the attribute names in this schema that represent binary data.
 DITContentRule getDITContentRule(String name)
          Returns the DIT content rule with the supplied OID or name.
 Collection<DITContentRule> getDitContentRules()
          Returns the DIT content rules.
 DITStructureRule getDITStructureRule(int id)
          Returns the DIT structure rule with the supplied ID.
 DITStructureRule getDITStructureRule(String name)
          Returns the DIT structure rule with the supplied name.
 Collection<DITStructureRule> getDitStructureRules()
          Returns the DIT structure rules.
 MatchingRule getMatchingRule(String name)
          Returns the matching rule with the supplied OID or name.
 Collection<MatchingRule> getMatchingRules()
          Returns the matching rules.
 MatchingRuleUse getMatchingRuleUse(String name)
          Returns the matching rule use with the supplied OID or name.
 Collection<MatchingRuleUse> getMatchingRuleUses()
          Returns the matching rule uses.
 NameForm getNameForm(String name)
          Returns the name form with the supplied OID or name.
 Collection<NameForm> getNameForms()
          Returns the name forms.
 ObjectClass getObjectClass(String name)
          Returns the object class with the supplied OID or name.
 Collection<ObjectClass> getObjectClasses()
          Returns the object classes.
 Syntax getSyntax(String oid)
          Returns the syntax with the supplied OID.
 Collection<Syntax> getSyntaxes()
          Returns the syntaxes.
 int hashCode()
          
 void setAttributeTypes(Collection<AttributeType> c)
          Sets the attribute types.
 void setDitContentRules(Collection<DITContentRule> c)
          Sets the DIT content rules.
 void setDitStructureRules(Collection<DITStructureRule> c)
          Sets the DIT structure rules.
 void setMatchingRules(Collection<MatchingRule> c)
          Sets the matching rules.
 void setMatchingRuleUses(Collection<MatchingRuleUse> c)
          Sets the matching rule uses.
 void setNameForms(Collection<NameForm> c)
          Sets the name forms.
 void setObjectClasses(Collection<ObjectClass> c)
          Sets the object classes.
 void setSyntaxes(Collection<Syntax> c)
          Sets the syntaxes.
 String toString()
          
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

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 types
ditContentRules - DIT content rules
ditStructureRules - DIT structure rules
syntaxes - syntaxes
matchingRules - matching rules
matchingRuleUses - matching rule uses
nameForms - name forms
objectClasses - object classses
Method Detail

getAttributeTypes

public Collection<AttributeType> getAttributeTypes()
Returns the attribute types.

Returns:
attribute types

getAttributeType

public AttributeType getAttributeType(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(Collection<AttributeType> c)
Sets the attribute types.

Parameters:
c - attribute types

getBinaryAttributeNames

public 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 Collection<DITContentRule> getDitContentRules()
Returns the DIT content rules.

Returns:
DIT content rules

getDITContentRule

public DITContentRule getDITContentRule(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(Collection<DITContentRule> c)
Sets the DIT content rules.

Parameters:
c - DIT content rules

getDitStructureRules

public 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(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(Collection<DITStructureRule> c)
Sets the DIT structure rules.

Parameters:
c - DIT structure rules

getSyntaxes

public Collection<Syntax> getSyntaxes()
Returns the syntaxes.

Returns:
syntaxes

getSyntax

public Syntax getSyntax(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(Collection<Syntax> c)
Sets the syntaxes.

Parameters:
c - syntaxes

getMatchingRules

public Collection<MatchingRule> getMatchingRules()
Returns the matching rules.

Returns:
matching rules

getMatchingRule

public MatchingRule getMatchingRule(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(Collection<MatchingRule> c)
Sets the matching rules.

Parameters:
c - matching rules

getMatchingRuleUses

public Collection<MatchingRuleUse> getMatchingRuleUses()
Returns the matching rule uses.

Returns:
matching rule ueses

getMatchingRuleUse

public MatchingRuleUse getMatchingRuleUse(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(Collection<MatchingRuleUse> c)
Sets the matching rule uses.

Parameters:
c - matching rule uses

getNameForms

public Collection<NameForm> getNameForms()
Returns the name forms.

Returns:
name forms

getNameForm

public NameForm getNameForm(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(Collection<NameForm> c)
Sets the name forms.

Parameters:
c - name forms

getObjectClasses

public Collection<ObjectClass> getObjectClasses()
Returns the object classes.

Returns:
object classes

getObjectClass

public ObjectClass getObjectClass(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(Collection<ObjectClass> c)
Sets the object classes.

Parameters:
c - object classes

hashCode

public int hashCode()

Overrides:
hashCode in class Object

equals

public boolean equals(Object o)

Overrides:
equals in class Object

toString

public String toString()

Overrides:
toString in class Object


Copyright © 2003-2015 Virginia Tech. All Rights Reserved.