| Title: 4.2.1.9 - ApacheDS Schema Element |
| NavPrev: 4.2.1.8-name-forms.html |
| NavPrevText: 4.2.1.8 - Name Forms |
| NavUp: 4.2.1-schema-objects.html |
| NavUpText: 4.2.1 - Schema Objects |
| NavNext: 4.2.2-registries.html |
| NavNextText: 4.2.2 - Registries |
| 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.9 - ApacheDS Schema Element |
| |
| We have defined 3 more schema elements that are needed to use the **SchemaManager**: |
| * SyntaxChecker : used to check a value's syntax |
| * Normalizer : used to normalize a value before a comparison |
| * LdapComparator : used to compare two values for a given syntax |
| |
| ## SyntaxChecker |
| |
| This class exposes this method: |
| |
| * isValidSyntax(Object): tells if the value is correct |
| |
| ## Normalizer |
| |
| This class is used to normalize values into a canonical form. This is a process exposed in [RFC4518|https://tools.ietf.org/html/rfc4518]. Basically, each String is passed trhough a 6-step process: |
| |
| * Transcode |
| * Map |
| * Normalize |
| * Prohibit |
| * Check Bidi (Bidirectional) |
| * Insignificant Character Handling |
| |
| This can be done using one of these two methods: |
| |
| * normalize(String) : normalize a String |
| * normalize(Value<?>) : normalize a Value, which can be a String or a byte[] |
| |
| This class is used internally when comparing two values, but you should not need it. |
| |
| ## LdapComparator |
| |
| This class is used to compare two values whenever their syntax are the same. Here is the method that does it: |
| |
| * equals(Object) : says if a value is equal to another one. |
| |
| Note because the **LdapComparator** class implements the **Comparator** interface, one can compare two values using the following method: |
| |
| * compare( v1, v2 ): compares two values |