blob: f0e61a9b1a351fe79fcef17e007565f59c831807 [file] [log] [blame]
Title: 4.2.1.3 - Syntaxes
NavPrev: 4.2.1.2-object-classes.html
NavPrevText: 4.2.1.2 - ObjectClasses
NavUp: 4.2.1-schema-objects.html
NavUpText: 4.2.1 - Schema Objects
NavNext: 4.2.1.4-matching-rules.html
NavNextText: 4.2.1.4 - MatchingRules
Notice: Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
.
http://www.apache.org/licenses/LICENSE-2.0
.
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
# 4.2.1.3 - Syntaxes
The **LdapSyntax** class implements the LDAP **Syntax**s schema objects. A **Syntax** defines constraints applied to the **AttributeType** value. Here is the RFC description of a **Syntax** :
SyntaxDescription = LPAREN WSP
numericoid ; object identifier
[ SP "DESC" SP qdstring ] ; description
extensions WSP RPAREN ; extensions
The important part of the **Syntax** is its **OID** which is used in the **AttributeType** and **MatchingRule**.
In order to enforce a **Syntax**, the **LDAP API** is associated with a **SyntaxChecker**, which is a Java class (see the chapter about ApacheDS Schema Elements).
## Methods
The are the two most important methods that you might need:
* getSyntaxChecker() : retreive the associated class that is used to check a syntax
* isHumanReadable() : tells if the AttributeType is a String or a byte[]