Package org.ldaptive.schema
Class MatchingRule
- java.lang.Object
-
- org.ldaptive.schema.AbstractSchemaElement
-
- org.ldaptive.schema.AbstractNamedSchemaElement
-
- org.ldaptive.schema.MatchingRule
-
- All Implemented Interfaces:
SchemaElement
public class MatchingRule extends AbstractNamedSchemaElement
Bean for a 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
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
MatchingRule.DefaultDefinitionFunction
Parses a matching rule definition using a char buffer.static class
MatchingRule.RegexDefinitionFunction
Parses a matching rule definition using a regular expression.
-
Field Summary
Fields Modifier and Type Field Description private static int
HASH_CODE_SEED
hash code seed.private String
oid
OID.private String
syntaxOID
Syntax OID.
-
Constructor Summary
Constructors Constructor Description 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
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description 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
-
-
-
-
Field Detail
-
HASH_CODE_SEED
private static final int HASH_CODE_SEED
hash code seed.- See Also:
- Constant Field Values
-
oid
private final String oid
OID.
-
syntaxOID
private String syntaxOID
Syntax OID.
-
-
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
- oidnames
- namesdescription
- descriptionobsolete
- obsoletesyntaxOID
- syntax OIDextensions
- 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 SchemaParseException
Parses the supplied definition string and creates an initialized matching rule.- Parameters:
definition
- to parse- Returns:
- matching rule
- Throws:
SchemaParseException
- if the supplied definition is invalid
-
format
public String format()
Description copied from interface:SchemaElement
Returns this schema element as formatted string per RFC 4512.- Returns:
- formatted string
-
equals
public boolean equals(Object o)
- Overrides:
equals
in classAbstractSchemaElement
-
hashCode
public int hashCode()
- Specified by:
hashCode
in classAbstractSchemaElement
-
-