LDAP Classes
Implements Java LDAP

com.novell.ldap
Class LDAPMatchingRuleSchema

java.lang.Object
  extended bycom.novell.ldap.LDAPAttribute
      extended bycom.novell.ldap.LDAPSchemaElement
          extended bycom.novell.ldap.LDAPMatchingRuleSchema
All Implemented Interfaces:
java.lang.Cloneable, java.lang.Comparable, java.io.Externalizable, java.io.Serializable

public class LDAPMatchingRuleSchema
extends LDAPSchemaElement

The schematic definition of a particular matching rule in a particular Directory Server.

The LDAPMatchingRuleSchema class represents the definition of a mathcing rule. It is used to query matching rule syntax, and to add or delete a matching rule definition in a directory.

Novell eDirectory does not currently allow matching rules to be added or deleted from the schema.

See Also:
LDAPAttributeSchema, LDAPSchemaElement, LDAPSchema, Serialized Form

Field Summary
 
Fields inherited from class com.novell.ldap.LDAPSchemaElement
description, hashQualifier, names, obsolete, oid, qualifier
 
Constructor Summary
LDAPMatchingRuleSchema()
          This constructor was added to support default Serialization
LDAPMatchingRuleSchema(java.lang.String[] names, java.lang.String oid, java.lang.String description, java.lang.String[] attributes, boolean obsolete, java.lang.String syntaxString)
          Constructs a matching rule definition for adding to or deleting from a directory.
LDAPMatchingRuleSchema(java.lang.String rawMatchingRule, java.lang.String rawMatchingRuleUse)
          Constructs a matching rule definition from the raw string values returned from a schema query for "matchingRule" and for "matchingRuleUse" for the same rule.
 
Method Summary
protected  java.lang.String formatString()
          Returns a string in a format suitable for directly adding to a directory, as a value of the particular schema element attribute.
 java.lang.String[] getAttributes()
          Returns the OIDs of the attributes to which this rule applies.
 java.lang.String getSyntaxString()
          Returns the OID of the syntax that this matching rule is valid for.
static java.lang.Object readDSML(java.io.InputStream input)
          This method is used to deserialize the DSML encoded representation of this class.
protected  void setDeserializedValues(java.io.BufferedInputStream istream)
           
protected  void writeValue(java.lang.StringBuffer buff)
           
protected  void writeValue(java.io.Writer out)
           
 
Methods inherited from class com.novell.ldap.LDAPSchemaElement
addValue, addValue, getDescription, getID, getNames, getQualifier, getQualifierNames, isObsolete, removeValue, removeValue, setQualifier, toString
 
Methods inherited from class com.novell.ldap.LDAPAttribute
addBase64Value, addBase64Value, addBase64Value, addURLValue, addURLValue, addValue, clone, compareTo, getBaseName, getBaseName, getByteValue, getByteValueArray, getByteValues, getLangSubtype, getName, getStringValue, getStringValueArray, getStringValues, getSubtypes, getSubtypes, hasSubtype, hasSubtypes, readExternal, removeValue, setValue, size, writeDSML, writeExternal
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

LDAPMatchingRuleSchema

public LDAPMatchingRuleSchema()
This constructor was added to support default Serialization


LDAPMatchingRuleSchema

public LDAPMatchingRuleSchema(java.lang.String[] names,
                              java.lang.String oid,
                              java.lang.String description,
                              java.lang.String[] attributes,
                              boolean obsolete,
                              java.lang.String syntaxString)
Constructs a matching rule definition for adding to or deleting from a directory.

Parameters:
names - The names of the attribute.

oid - Object Identifier of the attribute - in dotted-decimal format.

description - Optional description of the attribute.

attributes - The OIDs of attributes to which the rule applies. This parameter may be null. All attributes added to this array must use the same syntax.

obsolete - true if this matching rule is obsolete.

syntaxString - The unique object identifer of the syntax of the attribute, in dotted numerical format.


LDAPMatchingRuleSchema

public LDAPMatchingRuleSchema(java.lang.String rawMatchingRule,
                              java.lang.String rawMatchingRuleUse)
Constructs a matching rule definition from the raw string values returned from a schema query for "matchingRule" and for "matchingRuleUse" for the same rule.

Parameters:
rawMatchingRule - The raw string value returned on a directory query for "matchingRule".

rawMatchingRuleUse - The raw string value returned on a directory query for "matchingRuleUse".
Method Detail

getAttributes

public java.lang.String[] getAttributes()
Returns the OIDs of the attributes to which this rule applies.

Returns:
The OIDs of the attributes to which this matching rule applies.

getSyntaxString

public java.lang.String getSyntaxString()
Returns the OID of the syntax that this matching rule is valid for.

Returns:
The OID of the syntax that this matching rule is valid for.

formatString

protected java.lang.String formatString()
Returns a string in a format suitable for directly adding to a directory, as a value of the particular schema element attribute.

Specified by:
formatString in class LDAPSchemaElement
Returns:
A string representation of the attribute's definition.

setDeserializedValues

protected void setDeserializedValues(java.io.BufferedInputStream istream)
                              throws java.io.IOException
Overrides:
setDeserializedValues in class LDAPAttribute
Throws:
java.io.IOException

writeValue

protected void writeValue(java.io.Writer out)
                   throws java.io.IOException
Overrides:
writeValue in class LDAPAttribute
Throws:
java.io.IOException

writeValue

protected void writeValue(java.lang.StringBuffer buff)
Overrides:
writeValue in class LDAPAttribute

readDSML

public static java.lang.Object readDSML(java.io.InputStream input)
                                 throws java.io.IOException
This method is used to deserialize the DSML encoded representation of this class.

Parameters:
input - InputStream for the DSML formatted data.
Returns:
Deserialized form of this class.
Throws:
java.io.IOException - when serialization fails.

LDAP Classes
Implements Java LDAP

Copyright © 2002 Novell, Inc. All Rights Reserved.
Novell, Inc.
1800 South Novell Place
Provo, Ut 84606
Phone: (801) 861-5000