Package org.ldaptive.schema
Class Syntax
- java.lang.Object
-
- org.ldaptive.schema.AbstractSchemaElement
-
- org.ldaptive.schema.Syntax
-
- All Implemented Interfaces:
SchemaElement
public class Syntax extends AbstractSchemaElement
Bean for an attribute syntax schema element.SyntaxDescription = LPAREN WSP numericoid ; object identifier [ SP "DESC" SP qdstring ] ; description extensions WSP RPAREN ; extensions
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
Syntax.DefaultDefinitionFunction
Parses a syntax definition using a char buffer.static class
Syntax.RegexDefinitionFunction
Parses a syntax 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.
-
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.int
hashCode()
static Syntax
parse(String definition)
Parses the supplied definition string and creates an initialized attribute syntax.String
toString()
-
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.
-
-
Constructor Detail
-
Syntax
public Syntax(String s)
Creates a new attribute syntax.- Parameters:
s
- oid
-
Syntax
public Syntax(String oid, String description, Extensions extensions)
Creates a new attribute syntax.- Parameters:
oid
- oiddescription
- descriptionextensions
- extensions
-
-
Method Detail
-
getOID
public String getOID()
Returns the oid.- Returns:
- oid
-
parse
public static Syntax parse(String definition) throws SchemaParseException
Parses the supplied definition string and creates an initialized attribute syntax.- Parameters:
definition
- to parse- Returns:
- attribute syntax
- 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
-
-