org.ldaptive.schema
Class MatchingRule

java.lang.Object
  extended by org.ldaptive.schema.AbstractSchemaElement
      extended by org.ldaptive.schema.AbstractNamedSchemaElement
          extended by org.ldaptive.schema.MatchingRule
All Implemented Interfaces:
SchemaElement

public class MatchingRule
extends AbstractNamedSchemaElement

Bean for an matching rule schema element.

   MatchingRuleDescription = LPAREN WSP
     numericoid                 ; object identifier
     [ SP "NAME" SP qdescrs ]   ; short names (descriptors)
     [ SP "DESC" SP qdstring ]  ; description
     [ SP "OBSOLETE" ]          ; not active
     SP "SYNTAX" SP numericoid  ; assertion syntax
     extensions WSP RPAREN      ; extensions
 

Version:
$Revision: 3189 $ $Date: 2016-11-01 17:21:43 -0400 (Tue, 01 Nov 2016) $
Author:
Middleware Services

Field Summary
 
Fields inherited from class org.ldaptive.schema.AbstractSchemaElement
NO_WSP_REGEX, WSP_REGEX
 
Constructor Summary
MatchingRule(String s)
          Creates a new matching rule.
MatchingRule(String oid, String[] names, String description, boolean obsolete, String syntaxOID, Extensions extensions)
          Creates a new matching rule.
 
Method Summary
 boolean equals(Object o)
          
 String format()
          Returns this schema element as formatted string per RFC 4512.
 String getOID()
          Returns the oid.
 String getSyntaxOID()
          Returns the syntax oid.
 int hashCode()
          
static MatchingRule parse(String definition)
          Parses the supplied definition string and creates an initialized matching rule.
 void setSyntaxOID(String s)
          Sets the syntax oid.
 String toString()
          
 
Methods inherited from class org.ldaptive.schema.AbstractNamedSchemaElement
getName, getNames, hasName, isObsolete, setNames, setObsolete
 
Methods inherited from class org.ldaptive.schema.AbstractSchemaElement
containsBooleanExtension, getDescription, getExtensions, setDescription, setExtensions
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

MatchingRule

public MatchingRule(String s)
Creates a new matching rule.

Parameters:
s - oid

MatchingRule

public MatchingRule(String oid,
                    String[] names,
                    String description,
                    boolean obsolete,
                    String syntaxOID,
                    Extensions extensions)
Creates a new matching rule.

Parameters:
oid - oid
names - names
description - description
obsolete - obsolete
syntaxOID - syntax OID
extensions - extensions
Method Detail

getOID

public String getOID()
Returns the oid.

Returns:
oid

getSyntaxOID

public String getSyntaxOID()
Returns the syntax oid.

Returns:
syntax oid

setSyntaxOID

public void setSyntaxOID(String s)
Sets the syntax oid.

Parameters:
s - syntax oid

parse

public static MatchingRule parse(String definition)
                          throws ParseException
Parses the supplied definition string and creates an initialized matching rule.

Parameters:
definition - to parse
Returns:
matching rule
Throws:
ParseException - if the supplied definition is invalid

format

public String format()
Returns this schema element as formatted string per RFC 4512.

Returns:
formatted string

equals

public boolean equals(Object o)

Overrides:
equals in class AbstractSchemaElement

hashCode

public int hashCode()
Description copied from class: AbstractSchemaElement

Specified by:
hashCode in class AbstractSchemaElement

toString

public String toString()

Overrides:
toString in class Object


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