Class LdapSyntax
java.lang.Object
org.apache.directory.api.ldap.model.schema.AbstractSchemaObject
org.apache.directory.api.ldap.model.schema.LdapSyntax
- All Implemented Interfaces:
Serializable, SchemaObject
A syntax definition. Each attribute stored in a directory has a defined
syntax (i.e. data type) which constrains the structure and format of its
values. The description of each syntax specifies how attribute or assertion
values conforming to the syntax are normally represented when transferred in
LDAP operations. This representation is referred to as the LDAP-specific
encoding to distinguish it from other methods of encoding attribute values.
According to ldapbis [MODELS]:
4.1.5. LDAP Syntaxes
LDAP Syntaxes of (attribute and assertion) values are described in
terms of ASN.1 [X.680] and, optionally, have an octet string encoding
known as the LDAP-specific encoding. Commonly, the LDAP-specific
encoding is constrained to string of Universal Character Set (UCS)
[ISO10646] characters in UTF-8 [UTF-8] form.
Each LDAP syntax is identified by an object identifier (OID).
LDAP syntax definitions are written according to the ABNF:
SyntaxDescription = LPAREN WSP
numericoid ; object identifier
[ SP "DESC" SP qdstring ] ; description
extensions WSP RPAREN ; extensions
where:
[numericoid] is object identifier assigned to this LDAP syntax;
DESC [qdstring] is a short descriptive string; and
[extensions] describe extensions.
- Author:
- Apache Directory Project
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected booleanthe human readable flagstatic final longDeclares the Serial Version Uidprotected SyntaxCheckerThe associated SyntaxCheckerFields inherited from class AbstractSchemaObject
description, extensions, h, isEnabled, isObsolete, locked, names, objectType, oid, schemaName, specification -
Constructor Summary
ConstructorsConstructorDescriptionLdapSyntax(String oid) Creates a Syntax object using a unique OID.LdapSyntax(String oid, String description) Creates a Syntax object using a unique OID.LdapSyntax(String oid, String description, boolean isHumanReadable) Creates a Syntax object using a unique OID. -
Method Summary
Modifier and TypeMethodDescriptionvoidclear()Clear the current SchemaObject : remove all the references to other objects, and all the Maps.copy()Copy the current SchemaObject on placebooleanGets the SyntaxChecker used to validate values in accordance with this Syntax.booleanGets whether or not the Syntax is human readable.voidrehash()Compute the hashcode, and store it in the 'h' variablevoidsetHumanReadable(boolean humanReadable) Sets the human readable flag value.voidsetSyntaxChecker(SyntaxChecker syntaxChecker) Sets the associated SyntaxCheckertoString()voidupdateSyntaxChecker(SyntaxChecker newSyntaxChecker) Update the associated SyntaxChecker, even if the SchemaObject is readOnlyMethods inherited from class AbstractSchemaObject
addExtension, addExtension, addName, compareOid, copy, getDescription, getExtension, getExtensions, getName, getNames, getObjectType, getOid, getSchemaName, getSpecification, hasExtension, hashCode, isDisabled, isEnabled, isObsolete, lock, rehashBase, setDescription, setEnabled, setExtensions, setNames, setNames, setObsolete, setOid, setSchemaName, setSpecification, unlock
-
Field Details
-
serialVersionUID
public static final long serialVersionUIDDeclares the Serial Version Uid- See Also:
-
isHumanReadable
protected boolean isHumanReadablethe human readable flag -
syntaxChecker
The associated SyntaxChecker
-
-
Constructor Details
-
LdapSyntax
Creates a Syntax object using a unique OID.- Parameters:
oid- the OID for this Syntax
-
LdapSyntax
-
LdapSyntax
-
-
Method Details
-
isHumanReadable
public boolean isHumanReadable()Gets whether or not the Syntax is human readable.- Returns:
- true if the syntax can be interpreted by humans, false otherwise
-
setHumanReadable
public void setHumanReadable(boolean humanReadable) Sets the human readable flag value.- Parameters:
humanReadable- the human readable flag value to set
-
getSyntaxChecker
Gets the SyntaxChecker used to validate values in accordance with this Syntax.- Returns:
- the SyntaxChecker
-
setSyntaxChecker
Sets the associated SyntaxChecker- Parameters:
syntaxChecker- The associated SyntaxChecker
-
updateSyntaxChecker
Update the associated SyntaxChecker, even if the SchemaObject is readOnly- Parameters:
newSyntaxChecker- The associated SyntaxChecker
-
toString
-
copy
-
rehash
public void rehash()Description copied from class:AbstractSchemaObjectCompute the hashcode, and store it in the 'h' variable- Overrides:
rehashin classAbstractSchemaObject- See Also:
-
equals
- Specified by:
equalsin interfaceSchemaObject- Overrides:
equalsin classAbstractSchemaObject
-
clear
public void clear()Clear the current SchemaObject : remove all the references to other objects, and all the Maps.- Specified by:
clearin interfaceSchemaObject- Overrides:
clearin classAbstractSchemaObject
-