/** * Checks to see if two matchingRule match exactly. * * @param mrd0 the first matchingRule to compare * @param mrd1 the second matchingRule to compare * @return true if the matchingRules match exactly, false otherwise */ public static boolean matchingRulesMatch( MatchingRule matchingRule0, MatchingRule matchingRule1 ) { // compare all common description parameters if ( ! descriptionsMatch( matchingRule0, matchingRule1 ) ) { return false; } // check that the syntaxes of the matchingRules match if ( ! matchingRule0.getSyntaxOid().equals( matchingRule1.getSyntaxOid() ) ) { return false; } return true; }
buf.append( matchingRule.getSyntaxOid() ); buf.append( '\n' );
String syntaxOid = matchingRule.getSyntaxOid();
/** * * @param matchingRule * @return Attributes * @throws LdapException */ public ServerEntry getAttributes( MatchingRule matchingRule, Schema schema, SchemaManager schemaManager ) throws LdapException { ServerEntry entry = new DefaultServerEntry( schemaManager ); entry.put( SchemaConstants.OBJECT_CLASS_AT, SchemaConstants.TOP_OC, MetaSchemaConstants.META_MATCHING_RULE_OC ); entry.put( MetaSchemaConstants.M_SYNTAX_AT, matchingRule.getSyntaxOid() ); entry.put( SchemaConstants.CREATORS_NAME_AT, schema.getOwner() ); entry.put( SchemaConstants.CREATE_TIMESTAMP_AT, DateUtils.getGeneralizedTime() ); injectCommon( matchingRule, entry, schemaManager ); return entry; }