You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@directory.apache.org by ak...@apache.org on 2004/10/15 06:34:18 UTC
svn commit: rev 54821 - in incubator/directory/eve/trunk/backend/core/src/java/org/apache/eve: jndi schema schema/config
Author: akarasulu
Date: Thu Oct 14 21:34:16 2004
New Revision: 54821
Modified:
incubator/directory/eve/trunk/backend/core/src/java/org/apache/eve/jndi/EveContextFactory.java
incubator/directory/eve/trunk/backend/core/src/java/org/apache/eve/schema/AttributeTypeRegistry.java
incubator/directory/eve/trunk/backend/core/src/java/org/apache/eve/schema/DITContentRuleRegistry.java
incubator/directory/eve/trunk/backend/core/src/java/org/apache/eve/schema/DITStructureRuleRegistry.java
incubator/directory/eve/trunk/backend/core/src/java/org/apache/eve/schema/DefaultAttributeTypeRegistry.java
incubator/directory/eve/trunk/backend/core/src/java/org/apache/eve/schema/DefaultDITContentRuleRegistry.java
incubator/directory/eve/trunk/backend/core/src/java/org/apache/eve/schema/DefaultDITStructureRuleRegistry.java
incubator/directory/eve/trunk/backend/core/src/java/org/apache/eve/schema/DefaultMatchingRuleRegistry.java
incubator/directory/eve/trunk/backend/core/src/java/org/apache/eve/schema/DefaultNameFormRegistry.java
incubator/directory/eve/trunk/backend/core/src/java/org/apache/eve/schema/DefaultObjectClassRegistry.java
incubator/directory/eve/trunk/backend/core/src/java/org/apache/eve/schema/DefaultOidRegistry.java
incubator/directory/eve/trunk/backend/core/src/java/org/apache/eve/schema/DefaultSyntaxRegistry.java
incubator/directory/eve/trunk/backend/core/src/java/org/apache/eve/schema/MatchingRuleRegistry.java
incubator/directory/eve/trunk/backend/core/src/java/org/apache/eve/schema/MatchingRuleUseRegistry.java
incubator/directory/eve/trunk/backend/core/src/java/org/apache/eve/schema/NameFormRegistry.java
incubator/directory/eve/trunk/backend/core/src/java/org/apache/eve/schema/ObjectClassRegistry.java
incubator/directory/eve/trunk/backend/core/src/java/org/apache/eve/schema/OidRegistry.java
incubator/directory/eve/trunk/backend/core/src/java/org/apache/eve/schema/SyntaxRegistry.java
incubator/directory/eve/trunk/backend/core/src/java/org/apache/eve/schema/config/CoreSyntaxFactory.java
incubator/directory/eve/trunk/backend/core/src/java/org/apache/eve/schema/config/SchemaGrouping.java
incubator/directory/eve/trunk/backend/core/src/java/org/apache/eve/schema/config/SyntaxFactory.java
Log:
made all registries with names and oids to entries populate the OID to name registry
Modified: incubator/directory/eve/trunk/backend/core/src/java/org/apache/eve/jndi/EveContextFactory.java
==============================================================================
--- incubator/directory/eve/trunk/backend/core/src/java/org/apache/eve/jndi/EveContextFactory.java (original)
+++ incubator/directory/eve/trunk/backend/core/src/java/org/apache/eve/jndi/EveContextFactory.java Thu Oct 14 21:34:16 2004
@@ -80,11 +80,6 @@
CoreSyntaxFactory coreSyntaxes;
DefaultSyntaxRegistry syntaxRegistry;
- coreSyntaxes = new CoreSyntaxFactory();
- syntaxes = coreSyntaxes.getSyntaxes( null );
- oidRegistry = new DefaultOidRegistry();
- syntaxRegistry = new DefaultSyntaxRegistry( syntaxes, oidRegistry );
-
throw new NotImplementedException( "bootstrap code not yet written" );
// return provider;
Modified: incubator/directory/eve/trunk/backend/core/src/java/org/apache/eve/schema/AttributeTypeRegistry.java
==============================================================================
--- incubator/directory/eve/trunk/backend/core/src/java/org/apache/eve/schema/AttributeTypeRegistry.java (original)
+++ incubator/directory/eve/trunk/backend/core/src/java/org/apache/eve/schema/AttributeTypeRegistry.java Thu Oct 14 21:34:16 2004
@@ -23,7 +23,7 @@
/**
- * An AttributeType registry's service interface.
+ * An AttributeType registry service interface.
*
* @author <a href="mailto:directory-dev@incubator.apache.org">Apache Directory Project</a>
* @version $Rev$
@@ -31,29 +31,30 @@
public interface AttributeTypeRegistry
{
/**
- * Registers a Comparator with this registry.
+ * Registers a new AttributeType with this registry.
*
- * @param attributeType the attributeType to register
- * @throws javax.naming.NamingException if the AttributeType is already
- * registered or the registration operation is not supported
+ * @param attributeType the AttributeType to register
+ * @throws NamingException if the AttributeType is already registered or
+ * the registration operation is not supported
*/
void register( AttributeType attributeType ) throws NamingException;
/**
- * Looks up an attributeType by its unique Object Identifier.
+ * Looks up an AttributeType by its unique Object Identifier or by its
+ * unique name.
*
- * @param oid the object identifier
+ * @param id the object identifier or name of the AttributeType
* @return the AttributeType instance for the oid
- * @throws javax.naming.NamingException if the AttributeType does not exist
+ * @throws NamingException if the AttributeType does not exist
*/
- AttributeType lookup( String oid ) throws NamingException;
+ AttributeType lookup( String id ) throws NamingException;
/**
- * Checks to see if an attributeType exists.
+ * Checks to see if an AttributeType exists.
*
- * @param oid the object identifier
- * @return true if an attributeType definition exists for the oid, false
+ * @param id the object identifier or name of the AttributeType
+ * @return true if an AttributeType definition exists for the oid, false
* otherwise
*/
- boolean hasAttributeType( String oid );
+ boolean hasAttributeType( String id );
}
Modified: incubator/directory/eve/trunk/backend/core/src/java/org/apache/eve/schema/DITContentRuleRegistry.java
==============================================================================
--- incubator/directory/eve/trunk/backend/core/src/java/org/apache/eve/schema/DITContentRuleRegistry.java (original)
+++ incubator/directory/eve/trunk/backend/core/src/java/org/apache/eve/schema/DITContentRuleRegistry.java Thu Oct 14 21:34:16 2004
@@ -31,29 +31,29 @@
public interface DITContentRuleRegistry
{
/**
- * Registers a Comparator with this registry.
+ * Registers a DITContentRule with this registry.
*
- * @param dITContentRule the dITContentRule to register
- * @throws NamingException if the DITContentRule is already
- * registered or the registration operation is not supported
+ * @param dITContentRule the DITContentRule to register
+ * @throws NamingException if the DITContentRule is already registered or
+ * the registration operation is not supported
*/
void register( DITContentRule dITContentRule ) throws NamingException;
/**
- * Looks up an dITContentRule by its unique Object Identifier.
+ * Looks up a DITContentRule by its object identifier or by its name.
*
- * @param oid the object identifier
- * @return the DITContentRule instance for the oid
+ * @param id the object identifier or name of the DITContentRule
+ * @return the DITContentRule instance for the id
* @throws NamingException if the DITContentRule does not exist
*/
- DITContentRule lookup( String oid ) throws NamingException;
+ DITContentRule lookup( String id ) throws NamingException;
/**
- * Checks to see if an dITContentRule exists.
+ * Checks to see if a DITContentRule exists.
*
- * @param oid the object identifier
- * @return true if an dITContentRule definition exists for the oid, false
+ * @param id the object identifier or name of the DITContentRule
+ * @return true if a DITContentRule definition exists for the id, false
* otherwise
*/
- boolean hasDITContentRule( String oid );
+ boolean hasDITContentRule( String id );
}
Modified: incubator/directory/eve/trunk/backend/core/src/java/org/apache/eve/schema/DITStructureRuleRegistry.java
==============================================================================
--- incubator/directory/eve/trunk/backend/core/src/java/org/apache/eve/schema/DITStructureRuleRegistry.java (original)
+++ incubator/directory/eve/trunk/backend/core/src/java/org/apache/eve/schema/DITStructureRuleRegistry.java Thu Oct 14 21:34:16 2004
@@ -23,7 +23,7 @@
/**
- * An DITStructureRule registry's service interface.
+ * An DITStructureRule registry service interface.
*
* @author <a href="mailto:directory-dev@incubator.apache.org">Apache Directory Project</a>
* @version $Rev$
@@ -31,29 +31,30 @@
public interface DITStructureRuleRegistry
{
/**
- * Registers a Comparator with this registry.
+ * Registers a DITStructureRule with this registry.
*
* @param dITStructureRule the dITStructureRule to register
- * @throws NamingException if the DITStructureRule is already
- * registered or the registration operation is not supported
+ * @throws NamingException if the DITStructureRule is already registered
+ * or the registration operation is not supported
*/
void register( DITStructureRule dITStructureRule ) throws NamingException;
/**
- * Looks up an dITStructureRule by its unique Object Identifier.
+ * Looks up an dITStructureRule by its unique Object IDentifier or by its
+ * name.
*
- * @param oid the object identifier
- * @return the DITStructureRule instance for the oid
+ * @param id the object identifier, or the name
+ * @return the DITStructureRule instance for the id
* @throws NamingException if the DITStructureRule does not exist
*/
- DITStructureRule lookup( String oid ) throws NamingException;
+ DITStructureRule lookup( String id ) throws NamingException;
/**
* Checks to see if an dITStructureRule exists.
*
- * @param oid the object identifier
- * @return true if an dITStructureRule definition exists for the oid, false
+ * @param id the object identifier, or the name
+ * @return true if an dITStructureRule definition exists for the id, false
* otherwise
*/
- boolean hasDITStructureRule( String oid );
+ boolean hasDITStructureRule( String id );
}
Modified: incubator/directory/eve/trunk/backend/core/src/java/org/apache/eve/schema/DefaultAttributeTypeRegistry.java
==============================================================================
--- incubator/directory/eve/trunk/backend/core/src/java/org/apache/eve/schema/DefaultAttributeTypeRegistry.java (original)
+++ incubator/directory/eve/trunk/backend/core/src/java/org/apache/eve/schema/DefaultAttributeTypeRegistry.java Thu Oct 14 21:34:16 2004
@@ -34,6 +34,8 @@
{
/** maps an OID to an AttributeType */
private final Map byOid;
+ /** the registry used to resolve names to OIDs */
+ private final OidRegistry oidRegistry;
/** monitor notified via callback events */
private AttributeTypeRegistryMonitor monitor;
@@ -46,10 +48,11 @@
/**
* Creates an empty DefaultAttributeTypeRegistry.
*/
- public DefaultAttributeTypeRegistry()
+ public DefaultAttributeTypeRegistry( OidRegistry oidRegistry )
{
- byOid = new HashMap();
- monitor = new AttributeTypeRegistryMonitorAdapter();
+ this.byOid = new HashMap();
+ this.oidRegistry = oidRegistry;
+ this.monitor = new AttributeTypeRegistryMonitorAdapter();
}
@@ -79,29 +82,49 @@
throw e;
}
+ String[] names = attributeType.getAllNames();
+ for ( int ii = 0; ii < names.length; ii++ )
+ {
+ oidRegistry.register( names[0], attributeType.getName() );
+ }
+
byOid.put( attributeType.getOid(), attributeType );
monitor.registered( attributeType );
}
- public AttributeType lookup( String oid ) throws NamingException
+ public AttributeType lookup( String id ) throws NamingException
{
- if ( ! byOid.containsKey( oid ) )
+ id = oidRegistry.getOid( id );
+
+ if ( ! byOid.containsKey( id ) )
{
NamingException e = new NamingException( "attributeType w/ OID "
- + oid + " not registered!" );
- monitor.lookupFailed( oid, e );
+ + id + " not registered!" );
+ monitor.lookupFailed( id, e );
throw e;
}
- AttributeType attributeType = ( AttributeType ) byOid.get( oid );
+ AttributeType attributeType = ( AttributeType ) byOid.get( id );
monitor.lookedUp( attributeType );
return attributeType;
}
- public boolean hasAttributeType( String oid )
+ public boolean hasAttributeType( String id )
{
- return byOid.containsKey( oid );
+ if ( oidRegistry.hasOid( id ) )
+ {
+ try
+ {
+ return byOid.containsKey( oidRegistry.getOid( id ) );
+ }
+ catch ( NamingException e )
+ {
+ return false;
+ }
+ }
+
+ return false;
}
}
Modified: incubator/directory/eve/trunk/backend/core/src/java/org/apache/eve/schema/DefaultDITContentRuleRegistry.java
==============================================================================
--- incubator/directory/eve/trunk/backend/core/src/java/org/apache/eve/schema/DefaultDITContentRuleRegistry.java (original)
+++ incubator/directory/eve/trunk/backend/core/src/java/org/apache/eve/schema/DefaultDITContentRuleRegistry.java Thu Oct 14 21:34:16 2004
@@ -34,6 +34,8 @@
{
/** maps an OID to an DITContentRule */
private final Map byOid;
+ /** the registry used to resolve names to OIDs */
+ private final OidRegistry oidRegistry;
/** monitor notified via callback events */
private DITContentRuleRegistryMonitor monitor;
@@ -46,10 +48,11 @@
/**
* Creates an empty DefaultDITContentRuleRegistry.
*/
- public DefaultDITContentRuleRegistry()
+ public DefaultDITContentRuleRegistry( OidRegistry oidRegistry )
{
- byOid = new HashMap();
- monitor = new DITContentRuleRegistryMonitorAdapter();
+ this.byOid = new HashMap();
+ this.oidRegistry = oidRegistry;
+ this.monitor = new DITContentRuleRegistryMonitorAdapter();
}
@@ -79,29 +82,44 @@
throw e;
}
+ oidRegistry.register( dITContentRule.getName(), dITContentRule.getOid() ) ;
byOid.put( dITContentRule.getOid(), dITContentRule );
monitor.registered( dITContentRule );
}
- public DITContentRule lookup( String oid ) throws NamingException
+ public DITContentRule lookup( String id ) throws NamingException
{
- if ( ! byOid.containsKey( oid ) )
+ id = oidRegistry.getOid( id );
+
+ if ( ! byOid.containsKey( id ) )
{
NamingException e = new NamingException( "dITContentRule w/ OID "
- + oid + " not registered!" );
- monitor.lookupFailed( oid, e );
+ + id + " not registered!" );
+ monitor.lookupFailed( id, e );
throw e;
}
- DITContentRule dITContentRule = ( DITContentRule ) byOid.get( oid );
+ DITContentRule dITContentRule = ( DITContentRule ) byOid.get( id );
monitor.lookedUp( dITContentRule );
return dITContentRule;
}
- public boolean hasDITContentRule( String oid )
+ public boolean hasDITContentRule( String id )
{
- return byOid.containsKey( oid );
+ if ( oidRegistry.hasOid( id ) )
+ {
+ try
+ {
+ return byOid.containsKey( oidRegistry.getOid( id ) );
+ }
+ catch ( NamingException e )
+ {
+ return false;
+ }
+ }
+
+ return false;
}
}
Modified: incubator/directory/eve/trunk/backend/core/src/java/org/apache/eve/schema/DefaultDITStructureRuleRegistry.java
==============================================================================
--- incubator/directory/eve/trunk/backend/core/src/java/org/apache/eve/schema/DefaultDITStructureRuleRegistry.java (original)
+++ incubator/directory/eve/trunk/backend/core/src/java/org/apache/eve/schema/DefaultDITStructureRuleRegistry.java Thu Oct 14 21:34:16 2004
@@ -34,6 +34,8 @@
{
/** maps an OID to an DITStructureRule */
private final Map byOid;
+ /** the registry used to resolve names to OIDs */
+ private final OidRegistry oidRegistry;
/** monitor notified via callback events */
private DITStructureRuleRegistryMonitor monitor;
@@ -46,10 +48,11 @@
/**
* Creates an empty DefaultDITStructureRuleRegistry.
*/
- public DefaultDITStructureRuleRegistry()
+ public DefaultDITStructureRuleRegistry( OidRegistry oidRegistry )
{
- byOid = new HashMap();
- monitor = new DITStructureRuleRegistryMonitorAdapter();
+ this.byOid = new HashMap();
+ this.monitor = new DITStructureRuleRegistryMonitorAdapter();
+ this.oidRegistry = oidRegistry;
}
@@ -79,29 +82,44 @@
throw e;
}
+ oidRegistry.register( dITStructureRule.getName(), dITStructureRule.getOid() );
byOid.put( dITStructureRule.getOid(), dITStructureRule );
monitor.registered( dITStructureRule );
}
- public DITStructureRule lookup( String oid ) throws NamingException
+ public DITStructureRule lookup( String id ) throws NamingException
{
- if ( ! byOid.containsKey( oid ) )
+ id = oidRegistry.getOid( id );
+
+ if ( ! byOid.containsKey( id ) )
{
NamingException e = new NamingException( "dITStructureRule w/ OID "
- + oid + " not registered!" );
- monitor.lookupFailed( oid, e );
+ + id + " not registered!" );
+ monitor.lookupFailed( id, e );
throw e;
}
- DITStructureRule dITStructureRule = ( DITStructureRule ) byOid.get( oid );
+ DITStructureRule dITStructureRule = ( DITStructureRule ) byOid.get( id );
monitor.lookedUp( dITStructureRule );
return dITStructureRule;
}
- public boolean hasDITStructureRule( String oid )
+ public boolean hasDITStructureRule( String id )
{
- return byOid.containsKey( oid );
+ if ( oidRegistry.hasOid( id ) )
+ {
+ try
+ {
+ return byOid.containsKey( oidRegistry.getOid( id ) );
+ }
+ catch ( NamingException e )
+ {
+ return false;
+ }
+ }
+
+ return false;
}
}
Modified: incubator/directory/eve/trunk/backend/core/src/java/org/apache/eve/schema/DefaultMatchingRuleRegistry.java
==============================================================================
--- incubator/directory/eve/trunk/backend/core/src/java/org/apache/eve/schema/DefaultMatchingRuleRegistry.java (original)
+++ incubator/directory/eve/trunk/backend/core/src/java/org/apache/eve/schema/DefaultMatchingRuleRegistry.java Thu Oct 14 21:34:16 2004
@@ -23,7 +23,6 @@
import java.util.HashMap;
import javax.naming.NamingException;
-import javax.naming.OperationNotSupportedException;
/**
@@ -35,7 +34,9 @@
public class DefaultMatchingRuleRegistry implements MatchingRuleRegistry
{
/** a map using an OID for the key and a MatchingRule for the value */
- private final Map matchingRules;
+ private final Map byOid;
+ /** the registry used to resolve names to OIDs */
+ private final OidRegistry oidRegistry;
/** a monitor used to track noteable registry events */
private MatchingRuleRegistryMonitor monitor = null;
@@ -49,43 +50,12 @@
* Creates a DefaultMatchingRuleRegistry using existing MatchingRulees
* for lookups.
*
- * @param matchingRules a map of OIDs to their respective MatchingRule objs
*/
- public DefaultMatchingRuleRegistry( MatchingRule[] matchingRules,
- OidRegistry registry )
+ public DefaultMatchingRuleRegistry( OidRegistry oidRegistry )
{
- this ( matchingRules, registry, new MatchingRuleRegistryMonitorAdapter() );
- }
-
-
- /**
- * Creates a DefaultMatchingRuleRegistry using existing MatchingRulees
- * for lookups.
- *
- * @param matchingRules a map of OIDs to their respective MatchingRule objs
- */
- public DefaultMatchingRuleRegistry( MatchingRule[] matchingRules,
- OidRegistry registry,
- MatchingRuleRegistryMonitor monitor )
- {
- this.monitor = monitor;
- this.matchingRules = new HashMap();
-
- for ( int ii = 0; ii < matchingRules.length; ii++ )
- {
- this.matchingRules.put( matchingRules[ii].getOid(),
- matchingRules[ii] );
- registry.register( matchingRules[ii].getOid(),
- matchingRules[ii].getOid() );
-
- if ( matchingRules[ii].getName() != null )
- {
- registry.register( matchingRules[ii].getName(),
- matchingRules[ii].getOid() );
- }
-
- monitor.registered( matchingRules[ii] );
- }
+ this.oidRegistry = oidRegistry;
+ this.byOid = new HashMap();
+ this.monitor = new MatchingRuleRegistryMonitorAdapter();
}
@@ -97,41 +67,60 @@
/**
* @see org.apache.eve.schema.MatchingRuleRegistry#lookup(String)
*/
- public MatchingRule lookup( String oid ) throws NamingException
+ public MatchingRule lookup( String id ) throws NamingException
{
- if ( matchingRules.containsKey( oid ) )
+ id = oidRegistry.getOid( id );
+
+ if ( byOid.containsKey( id ) )
{
- MatchingRule MatchingRule = ( MatchingRule ) matchingRules.get( oid );
+ MatchingRule MatchingRule = ( MatchingRule ) byOid.get( id );
monitor.lookedUp( MatchingRule );
return MatchingRule;
}
- NamingException fault = new NamingException( "Unknown MatchingRule OID " + oid );
- monitor.lookupFailed( oid, fault );
+ NamingException fault = new NamingException( "Unknown MatchingRule OID " + id );
+ monitor.lookupFailed( id, fault );
throw fault;
}
/**
- * @see org.apache.eve.schema.MatchingRuleRegistry#register(
- * org.apache.ldap.common.schema.MatchingRule)
+ * @see MatchingRuleRegistry#register(MatchingRule)
*/
- public void register( MatchingRule MatchingRule ) throws NamingException
+ public void register( MatchingRule matchingRule ) throws NamingException
{
- NamingException fault = new OperationNotSupportedException(
- "MatchingRule registration on read-only bootstrap " +
- "MatchingRuleRegistry not supported." );
- monitor.registerFailed( MatchingRule, fault );
- throw fault;
+ if ( byOid.containsKey( matchingRule.getOid() ) )
+ {
+ NamingException e = new NamingException( "matchingRule w/ OID " +
+ matchingRule.getOid() + " has already been registered!" );
+ monitor.registerFailed( matchingRule, e );
+ throw e;
+ }
+
+ oidRegistry.register( matchingRule.getName(), matchingRule.getOid() );
+ byOid.put( matchingRule.getOid(), matchingRule );
+ monitor.registered( matchingRule );
}
/**
* @see org.apache.eve.schema.MatchingRuleRegistry#hasMatchingRule(String)
*/
- public boolean hasMatchingRule( String oid )
+ public boolean hasMatchingRule( String id )
{
- return matchingRules.containsKey( oid );
+ if ( oidRegistry.hasOid( id ) )
+ {
+ try
+ {
+ return byOid.containsKey( oidRegistry.getOid( id ) );
+ }
+ catch ( NamingException e )
+ {
+ return false;
+ }
+ }
+
+ return false;
}
Modified: incubator/directory/eve/trunk/backend/core/src/java/org/apache/eve/schema/DefaultNameFormRegistry.java
==============================================================================
--- incubator/directory/eve/trunk/backend/core/src/java/org/apache/eve/schema/DefaultNameFormRegistry.java (original)
+++ incubator/directory/eve/trunk/backend/core/src/java/org/apache/eve/schema/DefaultNameFormRegistry.java Thu Oct 14 21:34:16 2004
@@ -34,6 +34,8 @@
{
/** maps an OID to an NameForm */
private final Map byOid;
+ /** the registry used to resolve names to OIDs */
+ private final OidRegistry oidRegistry;
/** monitor notified via callback events */
private NameFormRegistryMonitor monitor;
@@ -46,10 +48,11 @@
/**
* Creates an empty DefaultNameFormRegistry.
*/
- public DefaultNameFormRegistry()
+ public DefaultNameFormRegistry( OidRegistry oidRegistry )
{
- byOid = new HashMap();
- monitor = new NameFormRegistryMonitorAdapter();
+ this.byOid = new HashMap();
+ this.oidRegistry = oidRegistry;
+ this.monitor = new NameFormRegistryMonitorAdapter();
}
@@ -79,29 +82,44 @@
throw e;
}
+ oidRegistry.register( nameForm.getName(), nameForm.getOid() );
byOid.put( nameForm.getOid(), nameForm );
monitor.registered( nameForm );
}
- public NameForm lookup( String oid ) throws NamingException
+ public NameForm lookup( String id ) throws NamingException
{
- if ( ! byOid.containsKey( oid ) )
+ id = oidRegistry.getOid( id );
+
+ if ( ! byOid.containsKey( id ) )
{
- NamingException e = new NamingException( "nameForm w/ OID "
- + oid + " not registered!" );
- monitor.lookupFailed( oid, e );
+ NamingException e = new NamingException( "nameForm w/ OID " + id
+ + " not registered!" );
+ monitor.lookupFailed( id, e );
throw e;
}
- NameForm nameForm = ( NameForm ) byOid.get( oid );
+ NameForm nameForm = ( NameForm ) byOid.get( id );
monitor.lookedUp( nameForm );
return nameForm;
}
- public boolean hasNameForm( String oid )
+ public boolean hasNameForm( String id )
{
- return byOid.containsKey( oid );
+ if ( oidRegistry.hasOid( id ) )
+ {
+ try
+ {
+ return byOid.containsKey( oidRegistry.getOid( id ) );
+ }
+ catch ( NamingException e )
+ {
+ return false;
+ }
+ }
+
+ return false;
}
}
Modified: incubator/directory/eve/trunk/backend/core/src/java/org/apache/eve/schema/DefaultObjectClassRegistry.java
==============================================================================
--- incubator/directory/eve/trunk/backend/core/src/java/org/apache/eve/schema/DefaultObjectClassRegistry.java (original)
+++ incubator/directory/eve/trunk/backend/core/src/java/org/apache/eve/schema/DefaultObjectClassRegistry.java Thu Oct 14 21:34:16 2004
@@ -34,6 +34,8 @@
{
/** maps an OID to an ObjectClass */
private final Map byOid;
+ /** the registry used to resolve names to OIDs */
+ private final OidRegistry oidRegistry;
/** monitor notified via callback events */
private ObjectClassRegistryMonitor monitor;
@@ -46,10 +48,11 @@
/**
* Creates an empty DefaultObjectClassRegistry.
*/
- public DefaultObjectClassRegistry()
+ public DefaultObjectClassRegistry( OidRegistry oidRegistry )
{
- byOid = new HashMap();
- monitor = new ObjectClassRegistryMonitorAdapter();
+ this.byOid = new HashMap();
+ this.oidRegistry = oidRegistry;
+ this.monitor = new ObjectClassRegistryMonitorAdapter();
}
@@ -79,29 +82,44 @@
throw e;
}
+ oidRegistry.register( objectClass.getName(), objectClass.getOid() );
byOid.put( objectClass.getOid(), objectClass );
monitor.registered( objectClass );
}
- public ObjectClass lookup( String oid ) throws NamingException
+ public ObjectClass lookup( String id ) throws NamingException
{
- if ( ! byOid.containsKey( oid ) )
+ id = oidRegistry.getOid( id );
+
+ if ( ! byOid.containsKey( id ) )
{
NamingException e = new NamingException( "objectClass w/ OID "
- + oid + " not registered!" );
- monitor.lookupFailed( oid, e );
+ + id + " not registered!" );
+ monitor.lookupFailed( id, e );
throw e;
}
- ObjectClass objectClass = ( ObjectClass ) byOid.get( oid );
+ ObjectClass objectClass = ( ObjectClass ) byOid.get( id );
monitor.lookedUp( objectClass );
return objectClass;
}
- public boolean hasObjectClass( String oid )
+ public boolean hasObjectClass( String id )
{
- return byOid.containsKey( oid );
+ if ( oidRegistry.hasOid( id ) )
+ {
+ try
+ {
+ return byOid.containsKey( oidRegistry.getOid( id ) );
+ }
+ catch ( NamingException e )
+ {
+ return false;
+ }
+ }
+
+ return false;
}
}
Modified: incubator/directory/eve/trunk/backend/core/src/java/org/apache/eve/schema/DefaultOidRegistry.java
==============================================================================
--- incubator/directory/eve/trunk/backend/core/src/java/org/apache/eve/schema/DefaultOidRegistry.java (original)
+++ incubator/directory/eve/trunk/backend/core/src/java/org/apache/eve/schema/DefaultOidRegistry.java Thu Oct 14 21:34:16 2004
@@ -52,8 +52,7 @@
* OID is another name for the object referred to by OID and the
* caller does not know that the argument is an OID String.
*/
- if ( Character.isDigit( name.charAt( 0 ) )
- && byOid.containsKey( name ) )
+ if ( Character.isDigit( name.charAt( 0 ) ) )
{
monitor.getOidWithOid( name );
return name;
@@ -66,12 +65,12 @@
monitor.oidResolved( name, oid );
return oid;
}
-
+
/*
* As a last resort we check if name is not normalized and if the
* normalized version used as a key returns an OID. If the normalized
- * name works add the normalized name as a key with its OID to the
- * byName lookup. BTW these normalized versions of the key are not
+ * name works add the normalized name as a key with its OID to the
+ * byName lookup. BTW these normalized versions of the key are not
* returned on a getNameSet.
*/
String lowerCase = name.trim().toLowerCase();
@@ -80,12 +79,12 @@
{
String oid = ( String ) byName.get( lowerCase );
monitor.oidResolved( name, lowerCase, oid );
-
- // We expect to see this version of the key again so we add it
+
+ // We expect to see this version of the key again so we add it
byName.put( name, oid );
return oid;
}
-
+
NamingException fault = new NamingException ( "OID for name '"
+ name + "' was not " + "found within the OID registry" );
monitor.oidResolutionFailed( name, fault );
@@ -94,6 +93,15 @@
/**
+ * @see org.apache.eve.schema.OidRegistry#hasOid(java.lang.String)
+ */
+ public boolean hasOid( String name )
+ {
+ return this.byName.contains( name ) || this.byOid.contains( name );
+ }
+
+
+ /**
* @see org.apache.eve.schema.OidRegistry#getPrimaryName(java.lang.String)
*/
public String getPrimaryName( String oid ) throws NamingException
@@ -161,6 +169,12 @@
*/
public void register( String name, String oid )
{
+ if ( ! Character.isDigit( oid.charAt( 0 ) ) )
+ {
+ throw new RuntimeException( "Swap the parameter order: the oid " +
+ "does not start with a digit!" );
+ }
+
/*
* Add the entry for the given name as is and its lowercased version if
* the lower cased name is different from the given name name.
Modified: incubator/directory/eve/trunk/backend/core/src/java/org/apache/eve/schema/DefaultSyntaxRegistry.java
==============================================================================
--- incubator/directory/eve/trunk/backend/core/src/java/org/apache/eve/schema/DefaultSyntaxRegistry.java (original)
+++ incubator/directory/eve/trunk/backend/core/src/java/org/apache/eve/schema/DefaultSyntaxRegistry.java Thu Oct 14 21:34:16 2004
@@ -23,7 +23,6 @@
import java.util.HashMap;
import javax.naming.NamingException;
-import javax.naming.OperationNotSupportedException;
/**
@@ -36,10 +35,10 @@
public class DefaultSyntaxRegistry implements SyntaxRegistry
{
/** a map of entries using an OID for the key and a Syntax for the value */
- private final Map syntaxes;
- /** the OID registry this registry uses to register new syntax OIDs */
- private final OidRegistry registry;
- /** a monitor used to track noteable registry events */
+ private final Map byOid;
+ /** the OID oidRegistry this oidRegistry uses to register new syntax OIDs */
+ private final OidRegistry oidRegistry;
+ /** a monitor used to track noteable oidRegistry events */
private SyntaxRegistryMonitor monitor = null;
@@ -49,43 +48,13 @@
/**
- * Creates a DefaultSyntaxRegistry using existing Syntaxes for lookups.
- *
- * @param syntaxes a map of OIDs to their respective Syntax objects
+ * Creates a DefaultSyntaxRegistry.
*/
- public DefaultSyntaxRegistry( Syntax[] syntaxes, OidRegistry registry )
+ public DefaultSyntaxRegistry( OidRegistry registry )
{
- this ( syntaxes, registry, new SyntaxRegistryMonitorAdapter() );
- }
-
-
- /**
- * Creates a DefaultSyntaxRegistry using existing Syntaxes for lookups.
- *
- * @param syntaxes a map of OIDs to their respective Syntax objects
- */
- public DefaultSyntaxRegistry( Syntax[] syntaxes,
- OidRegistry registry,
- SyntaxRegistryMonitor monitor )
- {
- this.monitor = monitor;
- this.registry = registry;
- this.syntaxes = new HashMap();
-
- for ( int ii = 0; ii < syntaxes.length; ii++ )
- {
- this.syntaxes.put( syntaxes[ii].getOid(), syntaxes[ii] );
-
- registry.register( syntaxes[ii].getOid(),
- syntaxes[ii].getOid() );
- if ( syntaxes[ii].getName() != null )
- {
- registry.register( syntaxes[ii].getName(),
- syntaxes[ii].getOid() );
- }
-
- monitor.registered( syntaxes[ii] );
- }
+ this.monitor = new SyntaxRegistryMonitorAdapter();
+ this.oidRegistry = registry;
+ this.byOid = new HashMap();
}
@@ -95,43 +64,62 @@
/**
- * @see org.apache.eve.schema.SyntaxRegistry#lookup(java.lang.String)
+ * @see SyntaxRegistry#lookup(java.lang.String)
*/
- public Syntax lookup( String oid ) throws NamingException
+ public Syntax lookup( String id ) throws NamingException
{
- if ( syntaxes.containsKey( oid ) )
+ id = oidRegistry.getOid( id );
+
+ if ( byOid.containsKey( id ) )
{
- Syntax syntax = ( Syntax ) syntaxes.get( oid );
+ Syntax syntax = ( Syntax ) byOid.get( id );
monitor.lookedUp( syntax );
return syntax;
}
- NamingException fault = new NamingException( "Unknown syntax OID "
- + oid );
- monitor.lookupFailed( oid, fault );
+ NamingException fault = new NamingException( "Unknown syntax OID " + id );
+ monitor.lookupFailed( id, fault );
throw fault;
}
/**
- * @see org.apache.eve.schema.SyntaxRegistry#register(Syntax)
+ * @see SyntaxRegistry#register(Syntax)
*/
public void register( Syntax syntax ) throws NamingException
{
- NamingException fault = new OperationNotSupportedException(
- "Syntax registration on read-only bootstrap SyntaxRegistry not "
- + "supported." );
- monitor.registerFailed( syntax, fault );
- throw fault;
+ if ( byOid.containsKey( syntax.getOid() ) )
+ {
+ NamingException e = new NamingException( "syntax w/ OID " +
+ syntax.getOid() + " has already been registered!" );
+ monitor.registerFailed( syntax, e );
+ throw e;
+ }
+
+ oidRegistry.register( syntax.getName(), syntax.getOid() );
+ byOid.put( syntax.getOid(), syntax );
+ monitor.registered( syntax );
}
/**
- * @see org.apache.eve.schema.SyntaxRegistry#hasSyntax(java.lang.String)
+ * @see SyntaxRegistry#hasSyntax(java.lang.String)
*/
- public boolean hasSyntax( String oid )
+ public boolean hasSyntax( String id )
{
- return syntaxes.containsKey( oid );
+ if ( oidRegistry.hasOid( id ) )
+ {
+ try
+ {
+ return byOid.containsKey( oidRegistry.getOid( id ) );
+ }
+ catch ( NamingException e )
+ {
+ return false;
+ }
+ }
+
+ return false;
}
@@ -141,7 +129,7 @@
/**
- * Gets the monitor for this registry.
+ * Gets the monitor for this oidRegistry.
*
* @return the monitor
*/
@@ -152,7 +140,7 @@
/**
- * Sets the monitor for this registry.
+ * Sets the monitor for this oidRegistry.
*
* @param monitor the monitor to set
*/
Modified: incubator/directory/eve/trunk/backend/core/src/java/org/apache/eve/schema/MatchingRuleRegistry.java
==============================================================================
--- incubator/directory/eve/trunk/backend/core/src/java/org/apache/eve/schema/MatchingRuleRegistry.java (original)
+++ incubator/directory/eve/trunk/backend/core/src/java/org/apache/eve/schema/MatchingRuleRegistry.java Thu Oct 14 21:34:16 2004
@@ -40,14 +40,14 @@
void register( MatchingRule matchingRule ) throws NamingException;
/**
- * Looks up a MatchingRule by its unique Object Identifier.
+ * Looks up a MatchingRule by its unique Object Identifier or by name.
*
- * @param oid the object identifier
- * @return the MatchingRule for the oid
+ * @param id the object identifier or the name identifier
+ * @return the MatchingRule for the id
* @throws NamingException if there is a backing store failure or the
* MatchingRule does not exist.
*/
- MatchingRule lookup( String oid ) throws NamingException;
+ MatchingRule lookup( String id ) throws NamingException;
/**
* Checks to see if a MatchingRule exists. Backing store failures simply
Modified: incubator/directory/eve/trunk/backend/core/src/java/org/apache/eve/schema/MatchingRuleUseRegistry.java
==============================================================================
--- incubator/directory/eve/trunk/backend/core/src/java/org/apache/eve/schema/MatchingRuleUseRegistry.java (original)
+++ incubator/directory/eve/trunk/backend/core/src/java/org/apache/eve/schema/MatchingRuleUseRegistry.java Thu Oct 14 21:34:16 2004
@@ -23,7 +23,7 @@
/**
- * An MatchingRuleUse registry's service interface.
+ * An MatchingRuleUse registry service interface.
*
* @author <a href="mailto:directory-dev@incubator.apache.org">Apache Directory Project</a>
* @version $Rev$
@@ -31,20 +31,20 @@
public interface MatchingRuleUseRegistry
{
/**
- * Registers a Comparator with this registry.
+ * Registers a MatchingRuleUse with this registry.
*
* @param name the name of the matchingRuleUse
* @param matchingRuleUse the matchingRuleUse to register
- * @throws NamingException if the MatchingRuleUse is already
- * registered or the registration operation is not supported
+ * @throws NamingException if the MatchingRuleUse is already registered or
+ * the registration operation is not supported
*/
void register( String name, MatchingRuleUse matchingRuleUse ) throws NamingException;
/**
- * Looks up an matchingRuleUse by its unique Object Identifier.
+ * Looks up an matchingRuleUse by its name.
*
* @param name the name of the matchingRuleUse
- * @return the MatchingRuleUse instance for the oid
+ * @return the MatchingRuleUse instance for the name
* @throws NamingException if the MatchingRuleUse does not exist
*/
MatchingRuleUse lookup( String name ) throws NamingException;
@@ -53,7 +53,7 @@
* Checks to see if an matchingRuleUse exists.
*
* @param name the name of the matchingRuleUse
- * @return true if an matchingRuleUse definition exists for the oid, false
+ * @return true if an matchingRuleUse definition exists for the name, false
* otherwise
*/
boolean hasMatchingRuleUse( String name );
Modified: incubator/directory/eve/trunk/backend/core/src/java/org/apache/eve/schema/NameFormRegistry.java
==============================================================================
--- incubator/directory/eve/trunk/backend/core/src/java/org/apache/eve/schema/NameFormRegistry.java (original)
+++ incubator/directory/eve/trunk/backend/core/src/java/org/apache/eve/schema/NameFormRegistry.java Thu Oct 14 21:34:16 2004
@@ -23,7 +23,7 @@
/**
- * An NameForm registry's service interface.
+ * An NameForm registry service interface.
*
* @author <a href="mailto:directory-dev@incubator.apache.org">Apache Directory Project</a>
* @version $Rev$
@@ -31,29 +31,29 @@
public interface NameFormRegistry
{
/**
- * Registers a Comparator with this registry.
+ * Registers a NameForm with this registry.
*
* @param nameForm the nameForm to register
- * @throws javax.naming.NamingException if the NameForm is already
- * registered or the registration operation is not supported
+ * @throws NamingException if the NameForm is already registered or the
+ * registration operation is not supported
*/
void register( NameForm nameForm ) throws NamingException;
/**
- * Looks up an nameForm by its unique Object Identifier.
+ * Looks up a nameForm by its unique Object Identifier or by name.
*
- * @param oid the object identifier
- * @return the NameForm instance for the oid
- * @throws javax.naming.NamingException if the NameForm does not exist
+ * @param id the object identifier or name
+ * @return the NameForm instance for the id
+ * @throws NamingException if the NameForm does not exist
*/
- NameForm lookup( String oid ) throws NamingException;
+ NameForm lookup( String id ) throws NamingException;
/**
* Checks to see if an nameForm exists.
*
- * @param oid the object identifier
+ * @param id the object identifier or name
* @return true if an nameForm definition exists for the oid, false
* otherwise
*/
- boolean hasNameForm( String oid );
+ boolean hasNameForm( String id );
}
Modified: incubator/directory/eve/trunk/backend/core/src/java/org/apache/eve/schema/ObjectClassRegistry.java
==============================================================================
--- incubator/directory/eve/trunk/backend/core/src/java/org/apache/eve/schema/ObjectClassRegistry.java (original)
+++ incubator/directory/eve/trunk/backend/core/src/java/org/apache/eve/schema/ObjectClassRegistry.java Thu Oct 14 21:34:16 2004
@@ -40,20 +40,20 @@
void register( ObjectClass objectClass ) throws NamingException;
/**
- * Looks up an objectClass by its unique Object Identifier.
+ * Looks up an objectClass by its unique Object Identifier or by name.
*
- * @param oid the object identifier
- * @return the ObjectClass instance for the oid
+ * @param id the object identifier or name
+ * @return the ObjectClass instance for the id
* @throws NamingException if the ObjectClass does not exist
*/
- ObjectClass lookup( String oid ) throws NamingException;
+ ObjectClass lookup( String id ) throws NamingException;
/**
* Checks to see if an objectClass exists.
*
- * @param oid the object identifier
- * @return true if an objectClass definition exists for the oid, false
+ * @param id the object identifier or name
+ * @return true if an objectClass definition exists for the id, false
* otherwise
*/
- boolean hasObjectClass( String oid );
+ boolean hasObjectClass( String id );
}
Modified: incubator/directory/eve/trunk/backend/core/src/java/org/apache/eve/schema/OidRegistry.java
==============================================================================
--- incubator/directory/eve/trunk/backend/core/src/java/org/apache/eve/schema/OidRegistry.java (original)
+++ incubator/directory/eve/trunk/backend/core/src/java/org/apache/eve/schema/OidRegistry.java Thu Oct 14 21:34:16 2004
@@ -32,14 +32,23 @@
public interface OidRegistry
{
/**
- * Gets the object identifier using a common name
+ * Gets the object identifier for a common name or returns the argument
+ * as-is if it is an object identifier.
*
* @param name the name to lookup an OID for
* @return the OID string associated with a name
* @throws NamingException if name does not map to an OID
*/
String getOid( String name ) throws NamingException;
-
+
+ /**
+ * Checks to see if an identifier, oid or name exists within this registry.
+ *
+ * @param id the oid or name to look for
+ * @return true if the id exists false otherwise
+ */
+ boolean hasOid( String id );
+
/**
* Gets the primary name associated with an OID. The primary name is the
* first name specified for the OID.
Modified: incubator/directory/eve/trunk/backend/core/src/java/org/apache/eve/schema/SyntaxRegistry.java
==============================================================================
--- incubator/directory/eve/trunk/backend/core/src/java/org/apache/eve/schema/SyntaxRegistry.java (original)
+++ incubator/directory/eve/trunk/backend/core/src/java/org/apache/eve/schema/SyntaxRegistry.java Thu Oct 14 21:34:16 2004
@@ -31,14 +31,14 @@
public interface SyntaxRegistry
{
/**
- * Looks up a Syntax by its unique Object Identifier.
+ * Looks up a Syntax by its unique Object Identifier or by name.
*
- * @param oid the object identifier
- * @return the Syntax for the oid
+ * @param id the object identifier or name
+ * @return the Syntax for the id
* @throws NamingException if there is a backing store failure or the Syntax
* does not exist.
*/
- Syntax lookup( String oid ) throws NamingException;
+ Syntax lookup( String id ) throws NamingException;
/**
* Registers a Syntax with this registry.
@@ -53,8 +53,8 @@
* Checks to see if a Syntax exists. Backing store failures simply return
* false.
*
- * @param oid the object identifier
- * @return true if a Syntax definition exists for the oid, false otherwise
+ * @param id the object identifier or name
+ * @return true if a Syntax definition exists for the id, false otherwise
*/
- boolean hasSyntax( String oid );
+ boolean hasSyntax( String id );
}
Modified: incubator/directory/eve/trunk/backend/core/src/java/org/apache/eve/schema/config/CoreSyntaxFactory.java
==============================================================================
--- incubator/directory/eve/trunk/backend/core/src/java/org/apache/eve/schema/config/CoreSyntaxFactory.java (original)
+++ incubator/directory/eve/trunk/backend/core/src/java/org/apache/eve/schema/config/CoreSyntaxFactory.java Thu Oct 14 21:34:16 2004
@@ -17,10 +17,12 @@
package org.apache.eve.schema.config;
-import org.apache.ldap.common.schema.Syntax;
import org.apache.ldap.common.schema.BaseSyntax;
import org.apache.eve.schema.SyntaxCheckerRegistry;
+import java.util.Map;
+import java.util.HashMap;
+
/**
* A simple Syntax factory for the core LDAP schema in Section 4.3.2 of
@@ -102,9 +104,10 @@
// ------------------------------------------------------------------------
- public Syntax[] getSyntaxes( SyntaxCheckerRegistry registry )
+ public Map getSyntaxes( SyntaxCheckerRegistry registry )
{
- MutableSyntax[] syntaxes = new MutableSyntax[54];
+ MutableSyntax syntax;
+ Map syntaxes = new HashMap( 54 );
/*
* From RFC 2252 Section 4.3.2. on Syntax Object Identifiers
@@ -124,45 +127,55 @@
* 8 Certificate List N 1.3.6.1.4.1.1466.115.121.1.9
* 9 Certificate Pair N 1.3.6.1.4.1.1466.115.121.1.10
*/
- syntaxes[0] = new MutableSyntax( "1.3.6.1.4.1.1466.115.121.1.1" );
- syntaxes[0].setName( "ACI Item" );
- syntaxes[0].setHumanReadible( false );
-
- syntaxes[1] = new MutableSyntax( "1.3.6.1.4.1.1466.115.121.1.2" );
- syntaxes[1].setName( "Access Point" );
- syntaxes[1].setHumanReadible( true );
-
- syntaxes[2] = new MutableSyntax( "1.3.6.1.4.1.1466.115.121.1.3" );
- syntaxes[2].setName( "Attribute Type Description" );
- syntaxes[2].setHumanReadible( true );
-
- syntaxes[3] = new MutableSyntax( "1.3.6.1.4.1.1466.115.121.1.4" );
- syntaxes[3].setName( "Audio" );
- syntaxes[3].setHumanReadible( false );
-
- syntaxes[4] = new MutableSyntax( "1.3.6.1.4.1.1466.115.121.1.5" );
- syntaxes[4].setName( "Binary" );
- syntaxes[4].setHumanReadible( false );
-
- syntaxes[5] = new MutableSyntax( "1.3.6.1.4.1.1466.115.121.1.6" );
- syntaxes[5].setName( "Bit String" );
- syntaxes[5].setHumanReadible( true );
-
- syntaxes[6] = new MutableSyntax( "1.3.6.1.4.1.1466.115.121.1.7" );
- syntaxes[6].setName( "Boolean" );
- syntaxes[6].setHumanReadible( true );
-
- syntaxes[7] = new MutableSyntax( "1.3.6.1.4.1.1466.115.121.1.8" );
- syntaxes[7].setName( "Certificate" );
- syntaxes[7].setHumanReadible( false );
-
- syntaxes[8] = new MutableSyntax( "1.3.6.1.4.1.1466.115.121.1.9" );
- syntaxes[8].setName( "Certificate List" );
- syntaxes[8].setHumanReadible( false );
-
- syntaxes[9] = new MutableSyntax( "1.3.6.1.4.1.1466.115.121.1.10" );
- syntaxes[9].setName( "Certificate Pair" );
- syntaxes[9].setHumanReadible( false );
+ syntax = new MutableSyntax( "1.3.6.1.4.1.1466.115.121.1.1" );
+ syntax.setName( "ACI Item" );
+ syntax.setHumanReadible( false );
+ syntaxes.put( syntax.getOid(), syntax );
+
+ syntax = new MutableSyntax( "1.3.6.1.4.1.1466.115.121.1.2" );
+ syntax.setName( "Access Point" );
+ syntax.setHumanReadible( true );
+ syntaxes.put( syntax.getOid(), syntax );
+
+ syntax = new MutableSyntax( "1.3.6.1.4.1.1466.115.121.1.3" );
+ syntax.setName( "Attribute Type Description" );
+ syntax.setHumanReadible( true );
+ syntaxes.put( syntax.getOid(), syntax );
+
+ syntax = new MutableSyntax( "1.3.6.1.4.1.1466.115.121.1.4" );
+ syntax.setName( "Audio" );
+ syntax.setHumanReadible( false );
+ syntaxes.put( syntax.getOid(), syntax );
+
+ syntax = new MutableSyntax( "1.3.6.1.4.1.1466.115.121.1.5" );
+ syntax.setName( "Binary" );
+ syntax.setHumanReadible( false );
+ syntaxes.put( syntax.getOid(), syntax );
+
+ syntax = new MutableSyntax( "1.3.6.1.4.1.1466.115.121.1.6" );
+ syntax.setName( "Bit String" );
+ syntax.setHumanReadible( true );
+ syntaxes.put( syntax.getOid(), syntax );
+
+ syntax = new MutableSyntax( "1.3.6.1.4.1.1466.115.121.1.7" );
+ syntax.setName( "Boolean" );
+ syntax.setHumanReadible( true );
+ syntaxes.put( syntax.getOid(), syntax );
+
+ syntax = new MutableSyntax( "1.3.6.1.4.1.1466.115.121.1.8" );
+ syntax.setName( "Certificate" );
+ syntax.setHumanReadible( false );
+ syntaxes.put( syntax.getOid(), syntax );
+
+ syntax = new MutableSyntax( "1.3.6.1.4.1.1466.115.121.1.9" );
+ syntax.setName( "Certificate List" );
+ syntax.setHumanReadible( false );
+ syntaxes.put( syntax.getOid(), syntax );
+
+ syntax = new MutableSyntax( "1.3.6.1.4.1.1466.115.121.1.10" );
+ syntax.setName( "Certificate Pair" );
+ syntax.setHumanReadible( false );
+ syntaxes.put( syntax.getOid(), syntax );
/*
* Value being represented H-R OBJECT IDENTIFIER
@@ -178,45 +191,55 @@
* 18 DSA Quality Syntax Y 1.3.6.1.4.1.1466.115.121.1.19
* 19 DSE Type Y 1.3.6.1.4.1.1466.115.121.1.20
*/
- syntaxes[10] = new MutableSyntax( "1.3.6.1.4.1.1466.115.121.1.11" );
- syntaxes[10].setName( "Country String" );
- syntaxes[10].setHumanReadible( true );
-
- syntaxes[11] = new MutableSyntax( "1.3.6.1.4.1.1466.115.121.1.12" );
- syntaxes[11].setName( "DN" );
- syntaxes[11].setHumanReadible( true );
-
- syntaxes[12] = new MutableSyntax( "1.3.6.1.4.1.1466.115.121.1.13" );
- syntaxes[12].setName( "Data Quality Syntax" );
- syntaxes[12].setHumanReadible( true );
-
- syntaxes[13] = new MutableSyntax( "1.3.6.1.4.1.1466.115.121.1.14" );
- syntaxes[13].setName( "Delivery Method" );
- syntaxes[13].setHumanReadible( true );
-
- syntaxes[14] = new MutableSyntax( "1.3.6.1.4.1.1466.115.121.1.15" );
- syntaxes[14].setName( "Directory String" );
- syntaxes[14].setHumanReadible( true );
-
- syntaxes[15] = new MutableSyntax( "1.3.6.1.4.1.1466.115.121.1.16" );
- syntaxes[15].setName( "DIT Content Rule Description" );
- syntaxes[15].setHumanReadible( true );
-
- syntaxes[16] = new MutableSyntax( "1.3.6.1.4.1.1466.115.121.1.17" );
- syntaxes[16].setName( "DIT Structure Rule Description" );
- syntaxes[16].setHumanReadible( true );
-
- syntaxes[17] = new MutableSyntax( "1.3.6.1.4.1.1466.115.121.1.18" );
- syntaxes[17].setName( "DL Submit Permission" );
- syntaxes[17].setHumanReadible( true );
-
- syntaxes[18] = new MutableSyntax( "1.3.6.1.4.1.1466.115.121.1.19" );
- syntaxes[18].setName( "DSA Quality Syntax" );
- syntaxes[18].setHumanReadible( true );
-
- syntaxes[19] = new MutableSyntax( "1.3.6.1.4.1.1466.115.121.1.20" );
- syntaxes[19].setName( "DSE Type" );
- syntaxes[19].setHumanReadible( true );
+ syntax = new MutableSyntax( "1.3.6.1.4.1.1466.115.121.1.11" );
+ syntax.setName( "Country String" );
+ syntax.setHumanReadible( true );
+ syntaxes.put( syntax.getOid(), syntax );
+
+ syntax = new MutableSyntax( "1.3.6.1.4.1.1466.115.121.1.12" );
+ syntax.setName( "DN" );
+ syntax.setHumanReadible( true );
+ syntaxes.put( syntax.getOid(), syntax );
+
+ syntax = new MutableSyntax( "1.3.6.1.4.1.1466.115.121.1.13" );
+ syntax.setName( "Data Quality Syntax" );
+ syntax.setHumanReadible( true );
+ syntaxes.put( syntax.getOid(), syntax );
+
+ syntax = new MutableSyntax( "1.3.6.1.4.1.1466.115.121.1.14" );
+ syntax.setName( "Delivery Method" );
+ syntax.setHumanReadible( true );
+ syntaxes.put( syntax.getOid(), syntax );
+
+ syntax = new MutableSyntax( "1.3.6.1.4.1.1466.115.121.1.15" );
+ syntax.setName( "Directory String" );
+ syntax.setHumanReadible( true );
+ syntaxes.put( syntax.getOid(), syntax );
+
+ syntax = new MutableSyntax( "1.3.6.1.4.1.1466.115.121.1.16" );
+ syntax.setName( "DIT Content Rule Description" );
+ syntax.setHumanReadible( true );
+ syntaxes.put( syntax.getOid(), syntax );
+
+ syntax = new MutableSyntax( "1.3.6.1.4.1.1466.115.121.1.17" );
+ syntax.setName( "DIT Structure Rule Description" );
+ syntax.setHumanReadible( true );
+ syntaxes.put( syntax.getOid(), syntax );
+
+ syntax = new MutableSyntax( "1.3.6.1.4.1.1466.115.121.1.18" );
+ syntax.setName( "DL Submit Permission" );
+ syntax.setHumanReadible( true );
+ syntaxes.put( syntax.getOid(), syntax );
+
+ syntax = new MutableSyntax( "1.3.6.1.4.1.1466.115.121.1.19" );
+ syntax.setName( "DSA Quality Syntax" );
+ syntax.setHumanReadible( true );
+ syntaxes.put( syntax.getOid(), syntax );
+
+ syntax = new MutableSyntax( "1.3.6.1.4.1.1466.115.121.1.20" );
+ syntax.setName( "DSE Type" );
+ syntax.setHumanReadible( true );
+ syntaxes.put( syntax.getOid(), syntax );
/*
* Value being represented H-R OBJECT IDENTIFIER
@@ -232,45 +255,55 @@
* 28 Master And Shadow Access Points Y 1.3.6.1.4.1.1466.115.121.1.29
* 29 Matching Rule Description Y 1.3.6.1.4.1.1466.115.121.1.30
*/
- syntaxes[20] = new MutableSyntax( "1.3.6.1.4.1.1466.115.121.1.21" );
- syntaxes[20].setName( "Enhanced Guide" );
- syntaxes[20].setHumanReadible( true );
-
- syntaxes[21] = new MutableSyntax( "1.3.6.1.4.1.1466.115.121.1.22" );
- syntaxes[21].setName( "Facsimile Telephone Number" );
- syntaxes[21].setHumanReadible( true );
-
- syntaxes[22] = new MutableSyntax( "1.3.6.1.4.1.1466.115.121.1.23" );
- syntaxes[22].setName( "Fax" );
- syntaxes[22].setHumanReadible( false );
-
- syntaxes[23] = new MutableSyntax( "1.3.6.1.4.1.1466.115.121.1.24" );
- syntaxes[23].setName( "Generalized Time" );
- syntaxes[23].setHumanReadible( true );
-
- syntaxes[24] = new MutableSyntax( "1.3.6.1.4.1.1466.115.121.1.25" );
- syntaxes[24].setName( "Guide" );
- syntaxes[24].setHumanReadible( true );
-
- syntaxes[25] = new MutableSyntax( "1.3.6.1.4.1.1466.115.121.1.26" );
- syntaxes[25].setName( "IA5 String" );
- syntaxes[25].setHumanReadible( true );
-
- syntaxes[26] = new MutableSyntax( "1.3.6.1.4.1.1466.115.121.1.27" );
- syntaxes[26].setName( "INTEGER" );
- syntaxes[26].setHumanReadible( true );
-
- syntaxes[27] = new MutableSyntax( "1.3.6.1.4.1.1466.115.121.1.28" );
- syntaxes[27].setName( "JPEG" );
- syntaxes[27].setHumanReadible( false );
-
- syntaxes[28] = new MutableSyntax( "1.3.6.1.4.1.1466.115.121.1.29" );
- syntaxes[28].setName( "Master And Shadow Access Points" );
- syntaxes[28].setHumanReadible( true );
-
- syntaxes[29] = new MutableSyntax( "1.3.6.1.4.1.1466.115.121.1.30" );
- syntaxes[29].setName( "Matching Rule Description" );
- syntaxes[29].setHumanReadible( true );
+ syntax = new MutableSyntax( "1.3.6.1.4.1.1466.115.121.1.21" );
+ syntax.setName( "Enhanced Guide" );
+ syntax.setHumanReadible( true );
+ syntaxes.put( syntax.getOid(), syntax );
+
+ syntax = new MutableSyntax( "1.3.6.1.4.1.1466.115.121.1.22" );
+ syntax.setName( "Facsimile Telephone Number" );
+ syntax.setHumanReadible( true );
+ syntaxes.put( syntax.getOid(), syntax );
+
+ syntax = new MutableSyntax( "1.3.6.1.4.1.1466.115.121.1.23" );
+ syntax.setName( "Fax" );
+ syntax.setHumanReadible( false );
+ syntaxes.put( syntax.getOid(), syntax );
+
+ syntax = new MutableSyntax( "1.3.6.1.4.1.1466.115.121.1.24" );
+ syntax.setName( "Generalized Time" );
+ syntax.setHumanReadible( true );
+ syntaxes.put( syntax.getOid(), syntax );
+
+ syntax = new MutableSyntax( "1.3.6.1.4.1.1466.115.121.1.25" );
+ syntax.setName( "Guide" );
+ syntax.setHumanReadible( true );
+ syntaxes.put( syntax.getOid(), syntax );
+
+ syntax = new MutableSyntax( "1.3.6.1.4.1.1466.115.121.1.26" );
+ syntax.setName( "IA5 String" );
+ syntax.setHumanReadible( true );
+ syntaxes.put( syntax.getOid(), syntax );
+
+ syntax = new MutableSyntax( "1.3.6.1.4.1.1466.115.121.1.27" );
+ syntax.setName( "INTEGER" );
+ syntax.setHumanReadible( true );
+ syntaxes.put( syntax.getOid(), syntax );
+
+ syntax = new MutableSyntax( "1.3.6.1.4.1.1466.115.121.1.28" );
+ syntax.setName( "JPEG" );
+ syntax.setHumanReadible( false );
+ syntaxes.put( syntax.getOid(), syntax );
+
+ syntax = new MutableSyntax( "1.3.6.1.4.1.1466.115.121.1.29" );
+ syntax.setName( "Master And Shadow Access Points" );
+ syntax.setHumanReadible( true );
+ syntaxes.put( syntax.getOid(), syntax );
+
+ syntax = new MutableSyntax( "1.3.6.1.4.1.1466.115.121.1.30" );
+ syntax.setName( "Matching Rule Description" );
+ syntax.setHumanReadible( true );
+ syntaxes.put( syntax.getOid(), syntax );
/*
* Value being represented H-R OBJECT IDENTIFIER
@@ -286,45 +319,55 @@
* 38 Other Mailbox Y 1.3.6.1.4.1.1466.115.121.1.39
* 39 Octet String Y 1.3.6.1.4.1.1466.115.121.1.40
*/
- syntaxes[30] = new MutableSyntax( "1.3.6.1.4.1.1466.115.121.1.31" );
- syntaxes[30].setName( "Matching Rule Use Description" );
- syntaxes[30].setHumanReadible( true );
-
- syntaxes[31] = new MutableSyntax( "1.3.6.1.4.1.1466.115.121.1.32" );
- syntaxes[31].setName( "Mail Preference" );
- syntaxes[31].setHumanReadible( true );
-
- syntaxes[32] = new MutableSyntax( "1.3.6.1.4.1.1466.115.121.1.33" );
- syntaxes[32].setName( "MHS OR Address" );
- syntaxes[32].setHumanReadible( true );
-
- syntaxes[33] = new MutableSyntax( "1.3.6.1.4.1.1466.115.121.1.34" );
- syntaxes[33].setName( "Name And Optional UID" );
- syntaxes[33].setHumanReadible( true );
-
- syntaxes[34] = new MutableSyntax( "1.3.6.1.4.1.1466.115.121.1.35" );
- syntaxes[34].setName( "Name Form Description" );
- syntaxes[34].setHumanReadible( true );
-
- syntaxes[35] = new MutableSyntax( "1.3.6.1.4.1.1466.115.121.1.36" );
- syntaxes[35].setName( "Numeric String" );
- syntaxes[35].setHumanReadible( true );
-
- syntaxes[36] = new MutableSyntax( "1.3.6.1.4.1.1466.115.121.1.37" );
- syntaxes[36].setName( "Object Class Description" );
- syntaxes[36].setHumanReadible( true );
-
- syntaxes[37] = new MutableSyntax( "1.3.6.1.4.1.1466.115.121.1.38" );
- syntaxes[37].setName( "OID" );
- syntaxes[37].setHumanReadible( true );
-
- syntaxes[38] = new MutableSyntax( "1.3.6.1.4.1.1466.115.121.1.39" );
- syntaxes[38].setName( "Other Mailbox" );
- syntaxes[38].setHumanReadible( true );
-
- syntaxes[39] = new MutableSyntax( "1.3.6.1.4.1.1466.115.121.1.40" );
- syntaxes[39].setName( "Octet String" );
- syntaxes[39].setHumanReadible( true );
+ syntax = new MutableSyntax( "1.3.6.1.4.1.1466.115.121.1.31" );
+ syntax.setName( "Matching Rule Use Description" );
+ syntax.setHumanReadible( true );
+ syntaxes.put( syntax.getOid(), syntax );
+
+ syntax = new MutableSyntax( "1.3.6.1.4.1.1466.115.121.1.32" );
+ syntax.setName( "Mail Preference" );
+ syntax.setHumanReadible( true );
+ syntaxes.put( syntax.getOid(), syntax );
+
+ syntax = new MutableSyntax( "1.3.6.1.4.1.1466.115.121.1.33" );
+ syntax.setName( "MHS OR Address" );
+ syntax.setHumanReadible( true );
+ syntaxes.put( syntax.getOid(), syntax );
+
+ syntax = new MutableSyntax( "1.3.6.1.4.1.1466.115.121.1.34" );
+ syntax.setName( "Name And Optional UID" );
+ syntax.setHumanReadible( true );
+ syntaxes.put( syntax.getOid(), syntax );
+
+ syntax = new MutableSyntax( "1.3.6.1.4.1.1466.115.121.1.35" );
+ syntax.setName( "Name Form Description" );
+ syntax.setHumanReadible( true );
+ syntaxes.put( syntax.getOid(), syntax );
+
+ syntax = new MutableSyntax( "1.3.6.1.4.1.1466.115.121.1.36" );
+ syntax.setName( "Numeric String" );
+ syntax.setHumanReadible( true );
+ syntaxes.put( syntax.getOid(), syntax );
+
+ syntax = new MutableSyntax( "1.3.6.1.4.1.1466.115.121.1.37" );
+ syntax.setName( "Object Class Description" );
+ syntax.setHumanReadible( true );
+ syntaxes.put( syntax.getOid(), syntax );
+
+ syntax = new MutableSyntax( "1.3.6.1.4.1.1466.115.121.1.38" );
+ syntax.setName( "OID" );
+ syntax.setHumanReadible( true );
+ syntaxes.put( syntax.getOid(), syntax );
+
+ syntax = new MutableSyntax( "1.3.6.1.4.1.1466.115.121.1.39" );
+ syntax.setName( "Other Mailbox" );
+ syntax.setHumanReadible( true );
+ syntaxes.put( syntax.getOid(), syntax );
+
+ syntax = new MutableSyntax( "1.3.6.1.4.1.1466.115.121.1.40" );
+ syntax.setName( "Octet String" );
+ syntax.setHumanReadible( true );
+ syntaxes.put( syntax.getOid(), syntax );
/*
* Value being represented H-R OBJECT IDENTIFIER
@@ -340,45 +383,55 @@
* 48 Supported Algorithm N 1.3.6.1.4.1.1466.115.121.1.49
* 49 Telephone Number Y 1.3.6.1.4.1.1466.115.121.1.50
*/
- syntaxes[40] = new MutableSyntax( "1.3.6.1.4.1.1466.115.121.1.41" );
- syntaxes[40].setName( "Postal Address" );
- syntaxes[40].setHumanReadible( true );
-
- syntaxes[41] = new MutableSyntax( "1.3.6.1.4.1.1466.115.121.1.42" );
- syntaxes[41].setName( "Protocol Information" );
- syntaxes[41].setHumanReadible( true );
-
- syntaxes[42] = new MutableSyntax( "1.3.6.1.4.1.1466.115.121.1.43" );
- syntaxes[42].setName( "Presentation Address" );
- syntaxes[42].setHumanReadible( true );
-
- syntaxes[43] = new MutableSyntax( "1.3.6.1.4.1.1466.115.121.1.44" );
- syntaxes[43].setName( "Printable String" );
- syntaxes[43].setHumanReadible( true );
-
- syntaxes[44] = new MutableSyntax( "1.3.6.1.4.1.1466.115.121.1.45" );
- syntaxes[44].setName( "Subtree Specification" );
- syntaxes[44].setHumanReadible( true );
-
- syntaxes[45] = new MutableSyntax( "1.3.6.1.4.1.1466.115.121.1.46" );
- syntaxes[45].setName( "Supplier Information" );
- syntaxes[45].setHumanReadible( true );
-
- syntaxes[46] = new MutableSyntax( "1.3.6.1.4.1.1466.115.121.1.47" );
- syntaxes[46].setName( "Supplier Or Consumer" );
- syntaxes[46].setHumanReadible( true );
-
- syntaxes[47] = new MutableSyntax( "1.3.6.1.4.1.1466.115.121.1.48" );
- syntaxes[47].setName( "Supplier And Consumer" );
- syntaxes[47].setHumanReadible( true );
-
- syntaxes[48] = new MutableSyntax( "1.3.6.1.4.1.1466.115.121.1.49" );
- syntaxes[48].setName( "Supported Algorithm" );
- syntaxes[48].setHumanReadible( false );
-
- syntaxes[49] = new MutableSyntax( "1.3.6.1.4.1.1466.115.121.1.50" );
- syntaxes[49].setName( "Telephone Number" );
- syntaxes[49].setHumanReadible( true );
+ syntax = new MutableSyntax( "1.3.6.1.4.1.1466.115.121.1.41" );
+ syntax.setName( "Postal Address" );
+ syntax.setHumanReadible( true );
+ syntaxes.put( syntax.getOid(), syntax );
+
+ syntax = new MutableSyntax( "1.3.6.1.4.1.1466.115.121.1.42" );
+ syntax.setName( "Protocol Information" );
+ syntax.setHumanReadible( true );
+ syntaxes.put( syntax.getOid(), syntax );
+
+ syntax = new MutableSyntax( "1.3.6.1.4.1.1466.115.121.1.43" );
+ syntax.setName( "Presentation Address" );
+ syntax.setHumanReadible( true );
+ syntaxes.put( syntax.getOid(), syntax );
+
+ syntax = new MutableSyntax( "1.3.6.1.4.1.1466.115.121.1.44" );
+ syntax.setName( "Printable String" );
+ syntax.setHumanReadible( true );
+ syntaxes.put( syntax.getOid(), syntax );
+
+ syntax = new MutableSyntax( "1.3.6.1.4.1.1466.115.121.1.45" );
+ syntax.setName( "Subtree Specification" );
+ syntax.setHumanReadible( true );
+ syntaxes.put( syntax.getOid(), syntax );
+
+ syntax = new MutableSyntax( "1.3.6.1.4.1.1466.115.121.1.46" );
+ syntax.setName( "Supplier Information" );
+ syntax.setHumanReadible( true );
+ syntaxes.put( syntax.getOid(), syntax );
+
+ syntax = new MutableSyntax( "1.3.6.1.4.1.1466.115.121.1.47" );
+ syntax.setName( "Supplier Or Consumer" );
+ syntax.setHumanReadible( true );
+ syntaxes.put( syntax.getOid(), syntax );
+
+ syntax = new MutableSyntax( "1.3.6.1.4.1.1466.115.121.1.48" );
+ syntax.setName( "Supplier And Consumer" );
+ syntax.setHumanReadible( true );
+ syntaxes.put( syntax.getOid(), syntax );
+
+ syntax = new MutableSyntax( "1.3.6.1.4.1.1466.115.121.1.49" );
+ syntax.setName( "Supported Algorithm" );
+ syntax.setHumanReadible( false );
+ syntaxes.put( syntax.getOid(), syntax );
+
+ syntax = new MutableSyntax( "1.3.6.1.4.1.1466.115.121.1.50" );
+ syntax.setName( "Telephone Number" );
+ syntax.setHumanReadible( true );
+ syntaxes.put( syntax.getOid(), syntax );
/*
* Value being represented H-R OBJECT IDENTIFIER
@@ -392,37 +445,45 @@
* 56 LDAP SchemaGrouping Description Y 1.3.6.1.4.1.1466.115.121.1.57
* 57 Substring Assertion Y 1.3.6.1.4.1.1466.115.121.1.58
*/
- syntaxes[50] = new MutableSyntax( "1.3.6.1.4.1.1466.115.121.1.51" );
- syntaxes[50].setName( "Teletex Terminal Identifier" );
- syntaxes[50].setHumanReadible( true );
-
- syntaxes[51] = new MutableSyntax( "1.3.6.1.4.1.1466.115.121.1.52" );
- syntaxes[51].setName( "Telex Number" );
- syntaxes[51].setHumanReadible( true );
-
- syntaxes[52] = new MutableSyntax( "1.3.6.1.4.1.1466.115.121.1.53" );
- syntaxes[52].setName( "UTC Time" );
- syntaxes[52].setHumanReadible( true );
-
- syntaxes[53] = new MutableSyntax( "1.3.6.1.4.1.1466.115.121.1.54" );
- syntaxes[53].setName( "LDAP Syntax Description" );
- syntaxes[53].setHumanReadible( true );
-
- syntaxes[54] = new MutableSyntax( "1.3.6.1.4.1.1466.115.121.1.55" );
- syntaxes[54].setName( "Modify Rights" );
- syntaxes[54].setHumanReadible( true );
-
- syntaxes[55] = new MutableSyntax( "1.3.6.1.4.1.1466.115.121.1.56" );
- syntaxes[55].setName( "LDAP SchemaGrouping Definition" );
- syntaxes[55].setHumanReadible( true );
-
- syntaxes[56] = new MutableSyntax( "1.3.6.1.4.1.1466.115.121.1.57" );
- syntaxes[56].setName( "LDAP SchemaGrouping Description" );
- syntaxes[56].setHumanReadible( true );
-
- syntaxes[57] = new MutableSyntax( "1.3.6.1.4.1.1466.115.121.1.58" );
- syntaxes[57].setName( "Substring Assertion" );
- syntaxes[57].setHumanReadible( true );
+ syntax = new MutableSyntax( "1.3.6.1.4.1.1466.115.121.1.51" );
+ syntax.setName( "Teletex Terminal Identifier" );
+ syntax.setHumanReadible( true );
+ syntaxes.put( syntax.getOid(), syntax );
+
+ syntax = new MutableSyntax( "1.3.6.1.4.1.1466.115.121.1.52" );
+ syntax.setName( "Telex Number" );
+ syntax.setHumanReadible( true );
+ syntaxes.put( syntax.getOid(), syntax );
+
+ syntax = new MutableSyntax( "1.3.6.1.4.1.1466.115.121.1.53" );
+ syntax.setName( "UTC Time" );
+ syntax.setHumanReadible( true );
+ syntaxes.put( syntax.getOid(), syntax );
+
+ syntax = new MutableSyntax( "1.3.6.1.4.1.1466.115.121.1.54" );
+ syntax.setName( "LDAP Syntax Description" );
+ syntax.setHumanReadible( true );
+ syntaxes.put( syntax.getOid(), syntax );
+
+ syntax = new MutableSyntax( "1.3.6.1.4.1.1466.115.121.1.55" );
+ syntax.setName( "Modify Rights" );
+ syntax.setHumanReadible( true );
+ syntaxes.put( syntax.getOid(), syntax );
+
+ syntax = new MutableSyntax( "1.3.6.1.4.1.1466.115.121.1.56" );
+ syntax.setName( "LDAP SchemaGrouping Definition" );
+ syntax.setHumanReadible( true );
+ syntaxes.put( syntax.getOid(), syntax );
+
+ syntax = new MutableSyntax( "1.3.6.1.4.1.1466.115.121.1.57" );
+ syntax.setName( "LDAP SchemaGrouping Description" );
+ syntax.setHumanReadible( true );
+ syntaxes.put( syntax.getOid(), syntax );
+
+ syntax = new MutableSyntax( "1.3.6.1.4.1.1466.115.121.1.58" );
+ syntax.setName( "Substring Assertion" );
+ syntax.setHumanReadible( true );
+ syntaxes.put( syntax.getOid(), syntax );
return syntaxes;
}
Modified: incubator/directory/eve/trunk/backend/core/src/java/org/apache/eve/schema/config/SchemaGrouping.java
==============================================================================
--- incubator/directory/eve/trunk/backend/core/src/java/org/apache/eve/schema/config/SchemaGrouping.java (original)
+++ incubator/directory/eve/trunk/backend/core/src/java/org/apache/eve/schema/config/SchemaGrouping.java Thu Oct 14 21:34:16 2004
@@ -17,6 +17,7 @@
package org.apache.eve.schema.config;
import org.apache.ldap.common.schema.*;
+import org.apache.eve.schema.*;
import java.util.Map;
@@ -56,7 +57,7 @@
String[] getDependencies();
/**
- * Gets the set of comparators
+ * Gets a map of comparators
*
* @return
*/
@@ -64,21 +65,21 @@
Map getNormalizers();
- SyntaxChecker[] getSyntaxCheckers();
+ Map getSyntaxCheckers();
- Syntax[] getSyntaxes();
+ Map getSyntaxes();
- MatchingRule[] getMatchingRules();
+ Map getMatchingRules();
- AttributeType[] getAttributeTypes();
+ Map getAttributeTypes();
- ObjectClass[] getObjectClasses();
+ Map getObjectClasses();
- DITContentRule[] getDITContentRules();
+ Map getDITContentRules();
- DITStructureRule[] getDITStructureRules();
+ Map getDITStructureRules();
- NameForm[] getNameForms();
+ Map getNameForms();
Map getMatchingRuleUses();
}
Modified: incubator/directory/eve/trunk/backend/core/src/java/org/apache/eve/schema/config/SyntaxFactory.java
==============================================================================
--- incubator/directory/eve/trunk/backend/core/src/java/org/apache/eve/schema/config/SyntaxFactory.java (original)
+++ incubator/directory/eve/trunk/backend/core/src/java/org/apache/eve/schema/config/SyntaxFactory.java Thu Oct 14 21:34:16 2004
@@ -20,14 +20,22 @@
import org.apache.ldap.common.schema.Syntax;
import org.apache.eve.schema.SyntaxCheckerRegistry;
+import java.util.Map;
+
/**
- * Document me.
+ * Factory that creates an OID String to Syntax map.
*
* @author <a href="mailto:directory-dev@incubator.apache.org">Apache Directory Project</a>
* @version $Rev$
*/
public interface SyntaxFactory
{
- Syntax[] getSyntaxes( SyntaxCheckerRegistry registry );
+ /**
+ * Creates a Syntax OID String to Syntax object map.
+ *
+ * @param registry a registry of SyntaxChecker objects
+ * @return a Map of Syntax OID Strings to Syntax objects
+ */
+ Map getSyntaxes( SyntaxCheckerRegistry registry );
}