| | |
| | | * |
| | | * |
| | | * 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; |
| | |
| | | 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 |
| | |
| | | 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 |
| | |
| | | super(); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | public void initializeSyntax(AttributeSyntaxCfg configuration) |
| | | throws ConfigException, InitializationException |
| | | { |
| | |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@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) |
| | | { |
| | |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * 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 |
| | |
| | | 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. |
| | |
| | | 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 |
| | |
| | | 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 |
| | |
| | | return startPos; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Reads an attributeType/objectclass description or numeric OID from the |
| | | * provided string, skipping over any leading or trailing spaces, and |
| | |
| | | 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 |
| | |
| | | return startPos; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | public boolean isBEREncodingRequired() |
| | | { |
| | | return false; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | public boolean isHumanReadable() |
| | | { |
| | | return true; |