public void register( String schema, MatchingRule dITContentRule ) throws NamingException { if ( byOid.containsKey( dITContentRule.getOid() ) || bootstrap.hasMatchingRule( dITContentRule.getOid() ) ) { NamingException e = new NamingException( "dITContentRule w/ OID " + dITContentRule.getOid() + " has already been registered!" ); monitor.registerFailed( dITContentRule, e ); throw e; } oidRegistry.register( dITContentRule.getName(), dITContentRule.getOid() ); byOid.put( dITContentRule.getOid(), dITContentRule ); oidToSchema.put( dITContentRule.getOid(), schema ); monitor.registered( dITContentRule ); }
/** * @see MatchingRuleRegistry#register(String, MatchingRule) */ public void register( String schema, MatchingRule matchingRule ) throws NamingException { if ( byOid.containsKey( matchingRule.getOid() ) ) { NamingException e = new NamingException( "matchingRule w/ OID " + matchingRule.getOid() + " has already been registered!" ); monitor.registerFailed( matchingRule, e ); throw e; } oidToSchema.put( matchingRule.getOid(), schema ); String[] names = matchingRule.getNames(); for ( int ii = 0; ii < names.length; ii++ ) { oidRegistry.register( names[ii], matchingRule.getOid() ); } byOid.put( matchingRule.getOid(), matchingRule ); monitor.registered( matchingRule ); }
/** * Update the associated Substring MatchingRule, even if the SchemaObject is readOnly * * @param substring The Substr MR for this AttributeType */ public void updateSubstring( MatchingRule substring ) { if ( locked ) { throw new UnsupportedOperationException( I18n.err( I18n.ERR_04441, getName() ) ); } this.substring = substring; this.substringOid = substring.getOid(); }
/** * Update the associated Ordering MatchingRule, even if the SchemaObject is readOnly * * @param ordering The Ordering MR for this AttributeType */ public void updateOrdering( MatchingRule ordering ) { if ( locked ) { throw new UnsupportedOperationException( I18n.err( I18n.ERR_04441, getName() ) ); } this.ordering = ordering; this.orderingOid = ordering.getOid(); }
/** * Update the associated Equality MatchingRule, even if the SchemaObject is readOnly * * @param equality The Equality MR for this AttributeType */ public void updateEquality( MatchingRule equality ) { if ( locked ) { throw new UnsupportedOperationException( I18n.err( I18n.ERR_04441, getName() ) ); } this.equality = equality; this.equalityOid = equality.getOid(); }
/** * Sets the Ordering MR for this AttributeType * * @param ordering The Ordering MR for this AttributeType */ public void setOrdering( MatchingRule ordering ) { if ( locked ) { throw new UnsupportedOperationException( I18n.err( I18n.ERR_04441, getName() ) ); } if ( !isReadOnly ) { this.ordering = ordering; this.orderingOid = ordering.getOid(); } }
/** * Sets the Substr MR for this AttributeType * * @param substring The Substr MR for this AttributeType */ public void setSubstring( MatchingRule substring ) { if ( locked ) { throw new UnsupportedOperationException( I18n.err( I18n.ERR_04441, getName() ) ); } if ( !isReadOnly ) { this.substring = substring; this.substringOid = substring.getOid(); } }
/** * Sets the Equality MR for this AttributeType * * @param equality The Equality MR for this AttributeType */ public void setEquality( MatchingRule equality ) { if ( locked ) { throw new UnsupportedOperationException( I18n.err( I18n.ERR_04441, getName() ) ); } if ( !isReadOnly ) { this.equality = equality; this.equalityOid = equality.getOid(); } }
String schema = matchingRuleRegistry.getSchemaName( mr.getOid() ); errors.add( new NullPointerException( "matchingRule " + mr.getName() + " in schema " + schema + " with OID " + mr.getOid() + " has a null comparator" ) ); isSuccess = false; String schema = matchingRuleRegistry.getSchemaName( mr.getOid() ); errors.add( new NullPointerException( "matchingRule " + mr.getName() + " in schema " + schema + " with OID " + mr.getOid() + " has a null normalizer" ) ); isSuccess = false; String schema = matchingRuleRegistry.getSchemaName( mr.getOid() ); errors.add( new NullPointerException( "matchingRule " + mr.getName() + " in schema " + schema + " with OID " + mr.getOid() + " has a null Syntax" ) ); isSuccess = false;
String schema = matchingRuleRegistry.getSchemaName( mr.getOid() ); errors.add( new NullPointerException( "matchingRule " + mr.getName() + " in schema " + schema + " with OID " + mr.getOid() + " has a null comparator" ) ); isSuccess = false; String schema = matchingRuleRegistry.getSchemaName( mr.getOid() ); errors.add( new NullPointerException( "matchingRule " + mr.getName() + " in schema " + schema + " with OID " + mr.getOid() + " has a null normalizer" ) ); isSuccess = false; String schema = matchingRuleRegistry.getSchemaName( mr.getOid() ); errors.add( new NullPointerException( "matchingRule " + mr.getName() + " in schema " + schema + " with OID " + mr.getOid() + " has a null Syntax" ) ); isSuccess = false;
/** * @see BootstrapProducer#produce(Registries, ProducerCallback) */ public void produce( Registries registries, ProducerCallback cb ) throws NamingException { MatchingRule matchingRule = null; matchingRule = new NameOrNumericIdMatch( registries.getOidRegistry(), MetaSchemaConstants.SCHEMA_NAME ); cb.schemaObjectProduced( this, matchingRule.getOid(), matchingRule ); matchingRule = new ObjectClassTypeMatch(); cb.schemaObjectProduced( this, matchingRule.getOid(), matchingRule ); matchingRule = new NumericOidMatch( registries.getSyntaxRegistry() ); cb.schemaObjectProduced( this, matchingRule.getOid(), matchingRule ); matchingRule = new SupDITStructureRuleMatch( registries.getSyntaxRegistry() ); cb.schemaObjectProduced( this, matchingRule.getOid(), matchingRule ); matchingRule = new RuleIdMatch( registries.getSyntaxRegistry() ); cb.schemaObjectProduced( this, matchingRule.getOid(), matchingRule ); }
buf.append( matchingRule.getOid() ); buf.append( '\n' );
buf.append( "( " ).append( mr.getOid() );
this.orderingOid = this.ordering.getOid();
this.equalityOid = this.equality.getOid();
this.substringOid = this.substring.getOid();
/** * Initializes the forward and reverse tables used by this Index. * * @throws NamingException if we cannot initialize the forward and reverse * tables */ private void initTables() throws NamingException { SerializableComparator comp; comp = new SerializableComparator( attribute.getEquality().getOid() ); /* * The forward key/value map stores attribute values to master table * primary keys. A value for an attribute can occur several times in * different entries so the forward map can have more than one value. */ forward = new JdbmTable( attribute.getName() + FORWARD_BTREE, true, numDupLimit, recMan, new IndexComparator( comp, true ) ); /* * Now the reverse map stores the primary key into the master table as * the key and the values of attributes as the value. If an attribute * is single valued according to its specification based on a schema * then duplicate keys should not be allowed within the reverse table. */ reverse = new JdbmTable( attribute.getName() + REVERSE_BTREE, !attribute.isSingleValue(), numDupLimit, recMan, new IndexComparator( comp, false ) ); }
matchingRule.setLdapComparator( new LdapComparator<String>( matchingRule.getOid() )