Sure give it a try :).
Alex
On 4/3/07, Ole Ersoy <[EMAIL PROTECTED]> wrote:
private static final String PEN = "35453";
private static final String ESTRING_SYNTAX_LOCAL_OID = "1";
private static final String ESTRING_SYNTAX_GLOBAL_OID = PEN +"." +
ESTRING_LOCAL_OID;
private static final String ESTRING_SYNTAX_DESCRIPTION = "Ecore String
DataType";
...
Attributes ldapAttributes = new AttributesImpl();
Attribute objectClass = new AttributeImpl(
SystemSchemaConstants.OBJECT_CLASS_AT,
"top" );
objectClass.add( MetaSchemaConstants.META_TOP_OC );
objectClass.add( MetaSchemaConstants.META_SYNTAX_OC );
ldapAttributes.put( objectClass );
ldapAttributes.put( MetaSchemaConstants.M_OID_AT,
ESTRING_SYNTAX_GLOBAL_OID );
ldapAttributes.put( MetaSchemaConstants.M_DESCRIPTION_AT,
ESTRING_SYNTAX_DESCRIPTION );
String eStringSyntaxRDN = "MetaSchemaConstants.M_OID_AT + "=" +
ESTRING_SYNTAX_GLOBAL_OID;
//With the current context being "ou=syntaxes,ou=schema"
ctx.createSubcontext(eStringSyntaxRDN, ldapAttributes);