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

Jean-Noel Rouvignac
24.11.2015 8d21db36015f8560d9cd2bcee9817f2c0a07a386
opendj-server-legacy/src/main/java/org/opends/server/schema/DITStructureRuleSyntax.java
@@ -22,13 +22,11 @@
 *
 *
 *      Copyright 2006-2009 Sun Microsystems, Inc.
 *      Portions Copyright 2011-2014 ForgeRock AS
 *      Portions Copyright 2011-2015 ForgeRock AS
 */
package org.opends.server.schema;
import org.forgerock.i18n.LocalizableMessage;
import java.util.LinkedHashMap;
import java.util.LinkedHashSet;
import java.util.LinkedList;
@@ -49,8 +47,6 @@
import static org.opends.server.schema.SchemaConstants.*;
import static org.opends.server.util.StaticUtils.*;
/**
 * This class implements the DIT structure rule description syntax, which is
 * used to hold DIT structure rule definitions in the server schema.  The format
@@ -62,19 +58,15 @@
  private static final LocalizedLogger logger = LocalizedLogger.getLoggerForThisClass();
  // The default equality matching rule for this syntax.
  /** The default equality matching rule for this syntax. */
  private MatchingRule defaultEqualityMatchingRule;
  // The default ordering matching rule for this syntax.
  /** The default ordering matching rule for this syntax. */
  private MatchingRule defaultOrderingMatchingRule;
  // The default substring matching rule for this syntax.
  /** The default substring matching rule for this syntax. */
  private MatchingRule defaultSubstringMatchingRule;
  /**
   * Creates a new instance of this syntax.  Note that the only thing that
   * should be done here is to invoke the default constructor for the
@@ -86,11 +78,7 @@
    super();
  }
  /**
   * {@inheritDoc}
   */
  /** {@inheritDoc} */
  public void initializeSyntax(AttributeSyntaxCfg configuration)
         throws ConfigException, InitializationException
  {
@@ -122,82 +110,50 @@
    }
  }
  /**
   * {@inheritDoc}
   */
  /** {@inheritDoc} */
  public String getName()
  {
    return SYNTAX_DIT_STRUCTURE_RULE_NAME;
  }
  /**
   * {@inheritDoc}
   */
  /** {@inheritDoc} */
  public String getOID()
  {
    return SYNTAX_DIT_STRUCTURE_RULE_OID;
  }
  /**
   * {@inheritDoc}
   */
  /** {@inheritDoc} */
  public String getDescription()
  {
    return SYNTAX_DIT_STRUCTURE_RULE_DESCRIPTION;
  }
  /**
   * {@inheritDoc}
   */
  /** {@inheritDoc} */
  public MatchingRule getEqualityMatchingRule()
  {
    return defaultEqualityMatchingRule;
  }
  /**
   * {@inheritDoc}
   */
  /** {@inheritDoc} */
  public MatchingRule getOrderingMatchingRule()
  {
    return defaultOrderingMatchingRule;
  }
  /**
   * {@inheritDoc}
   */
  /** {@inheritDoc} */
  public MatchingRule getSubstringMatchingRule()
  {
    return defaultSubstringMatchingRule;
  }
  /**
   * {@inheritDoc}
   */
  /** {@inheritDoc} */
  public MatchingRule getApproximateMatchingRule()
  {
    // There is no approximate matching rule by default.
    return null;
  }
  /**
   * {@inheritDoc}
   */
  /** {@inheritDoc} */
  public boolean valueIsAcceptable(ByteSequence value,
                                   LocalizableMessageBuilder invalidReason)
  {
@@ -217,8 +173,6 @@
    }
  }
  /**
   * Decodes the contents of the provided ASN.1 octet string as a DIT structure
   * rule definition according to the rules of this syntax.  Note that the
@@ -674,8 +628,6 @@
                                extraProperties);
  }
  /**
   * Reads the next token name from the DIT content rule definition, skipping
   * over any leading or trailing spaces, and appends it to the provided buffer.
@@ -730,8 +682,6 @@
    return startPos;
  }
  /**
   * Reads the value of a string enclosed in single quotes, skipping over the
   * quotes and any leading or trailing spaces, and appending the string to the
@@ -810,8 +760,6 @@
    return startPos;
  }
  /**
   * Reads the value of a string enclosed in single quotes, skipping over the
   * quotes and any leading or trailing spaces, and appending the string to the
@@ -896,8 +844,6 @@
    return startPos;
  }
  /**
   * Reads an attributeType/objectclass description or numeric OID from the
   * provided string, skipping over any leading or trailing spaces, and
@@ -1040,8 +986,6 @@
    return startPos;
  }
  /**
   * Reads the value for an "extra" parameter.  It will handle a single unquoted
   * word (which is technically illegal, but we'll allow it), a single quoted
@@ -1196,21 +1140,13 @@
    return startPos;
  }
  /**
   * {@inheritDoc}
   */
  /** {@inheritDoc} */
  public boolean isBEREncodingRequired()
  {
    return false;
  }
  /**
   * {@inheritDoc}
   */
  /** {@inheritDoc} */
  public boolean isHumanReadable()
  {
    return true;