mirror of https://github.com/OpenIdentityPlatform/OpenDJ.git

Matthew Swift
21.52.2011 975c043fb68244888e4f4b08583b4704dc3c9076
opendj3/opendj-ldap-sdk/src/main/java/org/forgerock/opendj/ldap/schema/Schema.java
@@ -2446,12 +2446,16 @@
  /**
   * 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.
   */
@@ -2463,16 +2467,14 @@
  /**
   * 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())
    {
@@ -2487,6 +2489,28 @@
  /**
   * 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.