| | |
| | | |
| | | |
| | | /** |
| | | * Indicates whether or not this schema is strict. Attribute type queries in |
| | | * non-strict schema always succeed: if the requested attribute type is not |
| | | * found then a temporary attribute type is created automatically having the |
| | | * Octet String syntax and associated matching rules. Strict schema, on the |
| | | * other hand, throw an {@link UnknownSchemaElementException} whenever an |
| | | * attempt is made to retrieve a non-existent attribute type. |
| | | * Indicates whether or not this schema is strict. |
| | | * <p> |
| | | * Attribute type queries against non-strict schema always succeed: if the |
| | | * requested attribute type is not found then a temporary attribute type is |
| | | * created automatically having the Octet String syntax and associated |
| | | * matching rules. |
| | | * <p> |
| | | * Strict schema, on the other hand, throw an |
| | | * {@link UnknownSchemaElementException} whenever an attempt is made to |
| | | * retrieve a non-existent attribute type. |
| | | * |
| | | * @return {@code true} if this schema is strict. |
| | | */ |
| | |
| | | |
| | | |
| | | /** |
| | | * Returns a non-strict view of this schema. Attribute type queries in |
| | | * non-strict schema always succeed: if the requested attribute type is not |
| | | * found then a temporary attribute type is created automatically having the |
| | | * Octet String syntax and associated matching rules. Strict schema, on the |
| | | * other hand, throw an {@link UnknownSchemaElementException} whenever an |
| | | * attempt is made to retrieve a non-existent attribute type. |
| | | * Returns a non-strict view of this schema. |
| | | * <p> |
| | | * See the description of {@link #isStrict()} for more details. |
| | | * |
| | | * @return A non-strict view of this schema. |
| | | * @see Schema#isStrict() |
| | | */ |
| | | public Schema nonStrict() |
| | | public Schema asNonStrictSchema() |
| | | { |
| | | if (impl.isStrict()) |
| | | { |
| | |
| | | |
| | | |
| | | /** |
| | | * Returns a strict view of this schema. |
| | | * <p> |
| | | * See the description of {@link #isStrict()} for more details. |
| | | * |
| | | * @return A strict view of this schema. |
| | | * @see Schema#isStrict() |
| | | */ |
| | | public Schema asStrictSchema() |
| | | { |
| | | if (impl.isStrict()) |
| | | { |
| | | return this; |
| | | } |
| | | else |
| | | { |
| | | return new Schema(((NonStrictImpl) impl).strictImpl); |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Adds the definitions of all the schema elements contained in this schema to |
| | | * the provided subschema subentry. Any existing attributes (including schema |
| | | * definitions) contained in the provided entry will be preserved. |