You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@directory.apache.org by oe...@apache.org on 2007/05/31 21:58:38 UTC
svn commit: r543239 [7/37] - in
/directory/sandbox/oersoy/das.testing/das.ldap.parent: ./
das.ldap.configuration.model.ecore.v100/
das.ldap.configuration.model.ecore.v100/.settings/
das.ldap.configuration.model.ecore.v100/model/ das.ldap.configuration....
Added: directory/sandbox/oersoy/das.testing/das.ldap.parent/das.ldap/backup/model.ecore
URL: http://svn.apache.org/viewvc/directory/sandbox/oersoy/das.testing/das.ldap.parent/das.ldap/backup/model.ecore?view=auto&rev=543239
==============================================================================
--- directory/sandbox/oersoy/das.testing/das.ldap.parent/das.ldap/backup/model.ecore (added)
+++ directory/sandbox/oersoy/das.testing/das.ldap.parent/das.ldap/backup/model.ecore Thu May 31 12:58:13 2007
@@ -0,0 +1,131 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ecore:EPackage xmi:version="2.0"
+ xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" name="v100"
+ nsURI="http://org.apache.tuscany/das.ldap.configuration.model.ecore.v100" nsPrefix="das.ldap.v100">
+ <eClassifiers xsi:type="ecore:EClass" name="ConnectionManager" eSuperTypes="#//AttributeTypeConstants #//ObjectClassConstants">
+ <eOperations name="createNamespacedContext" unique="false" eType="#//DirContext"
+ eExceptions="#//NamingException">
+ <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
+ <details key="body" value="Hashtable<Object, Object> env = createAuthenticationEnvironment();

env.put(Context.INITIAL_CONTEXT_FACTORY, this.javaNamingFactoryInitial );
env.put(Context.PROVIDER_URL, getDasURL());

DirContext dasPartitionContext = new InitialDirContext(env);
String xsdNamespace = getDasConfiguration().getXsdNsURI();

return
<%org.apache.tuscany.das.ldap.util.InitialContextCreator%>.createInstanceContext( 
	xsdNamespace, dasPartitionContext );"/>
+ </eAnnotations>
+ </eOperations>
+ <eOperations name="createSchemaAttributeTypesContext" eType="#//DirContext" eExceptions="#//NamingException">
+ <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
+ <details key="body" value="Hashtable<Object, Object> env = createAuthenticationEnvironment();

env.put(Context.INITIAL_CONTEXT_FACTORY, this.javaNamingFactoryInitial );
env.put(Context.PROVIDER_URL, getSchemaURL());

DirContext schemaContext = new InitialDirContext(env);
schemaContext = <%org.apache.tuscany.das.ldap.util.InitialContextCreator%>.createSchemaRootContext(schemaContext, getDasPartitionName()); 
 
return
InitialContextCreator.createSchemaAttributeTypesContext( 
 schemaContext);
"/>
+ </eAnnotations>
+ </eOperations>
+ <eOperations name="createSchemaObjectClassesContext" eType="#//DirContext" eExceptions="#//NamingException">
+ <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
+ <details key="body" value="Hashtable<Object, Object> env = createAuthenticationEnvironment();

env.put(Context.INITIAL_CONTEXT_FACTORY, this.javaNamingFactoryInitial );
env.put(Context.PROVIDER_URL, getSchemaURL());

DirContext schemaContext = new InitialDirContext(env);
schemaContext = <%org.apache.tuscany.das.ldap.util.InitialContextCreator%>.createSchemaRootContext(schemaContext, getDasPartitionName()); 

return
InitialContextCreator.createSchemaObjectClassesContext( 
 schemaContext);
"/>
+ </eAnnotations>
+ </eOperations>
+ <eOperations name="createSchemaSyntaxesContext" eType="#//DirContext" eExceptions="#//NamingException">
+ <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
+ <details key="body" value="Hashtable<Object, Object> env = createAuthenticationEnvironment();

env.put(Context.INITIAL_CONTEXT_FACTORY, this.javaNamingFactoryInitial );
env.put(Context.PROVIDER_URL, getSchemaURL());

DirContext schemaContext = new InitialDirContext(env);
schemaContext = <%org.apache.tuscany.das.ldap.util.InitialContextCreator%>.createSchemaRootContext(schemaContext, getDasPartitionName()); 
 
return
InitialContextCreator.createSchemaSyntaxesContext( 
 schemaContext);
"/>
+ </eAnnotations>
+ </eOperations>
+ <eOperations name="createSchemaSyntaxCheckersContext" eType="#//DirContext" eExceptions="#//NamingException #//NamingException #//NamingException">
+ <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
+ <details key="body" value="Hashtable<Object, Object> env = createAuthenticationEnvironment();

env.put(Context.INITIAL_CONTEXT_FACTORY, this.javaNamingFactoryInitial );
env.put(Context.PROVIDER_URL, getSchemaURL());

DirContext schemaContext = new InitialDirContext(env);
schemaContext = <%org.apache.tuscany.das.ldap.util.InitialContextCreator%>.createSchemaRootContext(schemaContext, getDasPartitionName()); 
 
return
InitialContextCreator.createSchemaSyntaxCheckersContext( 
 schemaContext);
"/>
+ </eAnnotations>
+ </eOperations>
+ <eOperations name="disconnect" eExceptions="#//NamingException">
+ <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
+ <details key="body" value="dirContext.close();"/>
+ </eAnnotations>
+ <eParameters name="dirContext" eType="#//DirContext"/>
+ </eOperations>
+ <eOperations name="createAuthenticationEnvironment" eType="#//Hashtable">
+ <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
+ <details key="body" value="<%Hashtable<Object, Object>%> env = new Hashtable<Object, Object>();
env.put( 
<%javax.naming.Context%>.SECURITY_PRINCIPAL, 
this.javaNamingSecurityPrincipal );
env.put(Context.SECURITY_CREDENTIALS, 
this.javaNamingSecurityCredentials );
env.put(Context.SECURITY_AUTHENTICATION, 
this.javaNamingSecurityAuthentication );

 return env;
"/>
+ </eAnnotations>
+ </eOperations>
+ <eOperations name="createSchemaEnvironment" eType="#//Hashtable">
+ <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
+ <details key="body" value="<%Hashtable<Object, Object>%> env = new Hashtable<Object, Object>();
env.put( 
<%javax.naming.Context%>.SECURITY_PRINCIPAL, 
this.javaNamingSecurityPrincipal );
env.put(Context.SECURITY_CREDENTIALS, 
this.javaNamingSecurityCredentials );
env.put(Context.SECURITY_AUTHENTICATION, 
this.javaNamingSecurityAuthentication );

 return env;
"/>
+ </eAnnotations>
+ </eOperations>
+ <eOperations name="createDasPartitionEnvironment" eType="#//Hashtable">
+ <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
+ <details key="body" value="<%Hashtable<Object, Object>%> env = new Hashtable<Object, Object>();
env.put( 
<%javax.naming.Context%>.SECURITY_PRINCIPAL, 
this.javaNamingSecurityPrincipal );
env.put(Context.SECURITY_CREDENTIALS, 
this.javaNamingSecurityCredentials );
env.put(Context.SECURITY_AUTHENTICATION, 
this.javaNamingSecurityAuthentication );

 return env;
"/>
+ </eAnnotations>
+ </eOperations>
+ <eOperations name="createDASPartition" eType="#//DirContext" eExceptions="#//NamingException">
+ <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
+ <details key="body" value="<%org.apache.directory.server.core.configuration.MutableStartupConfiguration%> configuration = 
new MutableStartupConfiguration();
 
<%org.apache.directory.server.core.configuration.MutablePartitionConfiguration%> dasPartition = 
 new MutablePartitionConfiguration();
 
dasPartition.setName( getDasPartitionName() );
dasPartition.setSuffix( getDASPartitionDN() );

<%java.util.Set%><MutablePartitionConfiguration> partitions = 
new <%java.util.HashSet%><MutablePartitionConfiguration> ();
partitions.add( dasPartition );
configuration.setContextPartitionConfigurations( partitions );
 
<%javax.naming.directory.Attributes%> suffixAttributes = new <%javax.naming.directory.BasicAttributes%>();
suffixAttributes.put( "objectClass", "top");
suffixAttributes.get( "objectClass" ).add( "organizationalUnit" );

suffixAttributes.put( "ou", "das" );

dasPartition.setContextEntry( suffixAttributes );
 
<%java.util.Hashtable%><Object, Object> env = createAuthenticationEnvironment();
 
env.put(Context.INITIAL_CONTEXT_FACTORY, 
hotPartitionContextFactory);
 
env.put( Context.PROVIDER_URL, getDASPartitionDN() );

env.put( <%org.apache.directory.server.core.configuration.Configuration%>.JNDI_KEY, configuration );
 
return new <%javax.naming.directory.InitialDirContext%>( env );"/>
+ </eAnnotations>
+ </eOperations>
+ <eOperations name="getSchemaURL" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString">
+ <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
+ <details key="body" value="return "ldap://" + getHost() + ":" + getPort() + "/" + getSchemaPartitionDN();"/>
+ </eAnnotations>
+ </eOperations>
+ <eOperations name="getDasURL" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString">
+ <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
+ <details key="body" value="return "ldap://" + getHost() + ":" + getPort() + "/" + getDASPartitionDN();"/>
+ </eAnnotations>
+ </eOperations>
+ <eOperations name="getDASPartitionDN" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString">
+ <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
+ <details key="body" value="return "ou=" + getDasPartitionName();"/>
+ </eAnnotations>
+ </eOperations>
+ <eOperations name="getDASSchemaRDN" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString">
+ <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
+ <details key="body" value="return "cn=" + getDasPartitionName();"/>
+ </eAnnotations>
+ </eOperations>
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="javaNamingFactoryInitial"
+ eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString" defaultValueLiteral="com.sun.jndi.ldap.LdapCtxFactory"/>
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="javaNamingSecurityAuthentication"
+ eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString" defaultValueLiteral="simple"/>
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="javaNamingSecurityPrincipal"
+ eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString" defaultValueLiteral="uid=admin,ou=system"/>
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="javaNamingSecurityCredentials"
+ eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString" defaultValueLiteral="secret"/>
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="schemaPartitionDN" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"
+ defaultValueLiteral="ou=schema"/>
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="hotPartitionContextFactory"
+ eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString" defaultValueLiteral="org.apache.directory.server.core.jndi.CoreContextFactory"/>
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="port" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"
+ defaultValueLiteral="10389"/>
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="host" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"
+ defaultValueLiteral="localhost"/>
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="dasPartitionName" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"
+ defaultValueLiteral="das"/>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="dasConfiguration" eType="#//DASConfiguration"/>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="DASConfiguration">
+ <eOperations name="loadGeneratorModel" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EResource"/>
+ <eOperations name="hasValidNamespaceURI" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean">
+ <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
+ <details key="body" value=" <%org.eclipse.emf.common.util.URI%> xsdNamespaceURI = URI.createURI(xsdNsURI);
 String authority = xsdNamespaceURI.authority();

 if ( authority.contains( ":" ) )
 {
 return false;
 }
 
 if (!authority.contains( "." ))
 {
 return false;
 }
 return true;"/>
+ </eAnnotations>
+ </eOperations>
+ <eOperations name="isEPackageMetaDataWritten" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean"/>
+ <eOperations name="createModelSchemaContext" eType="#//DirContext"/>
+ <eOperations name="createModelEntryContext" eType="#//DirContext"/>
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="genModelName" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"
+ defaultValueLiteral="model.genmodel"/>
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="repositoryBase" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"
+ defaultValueLiteral="/usr/share/java"/>
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="jarName" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="xsdNsURI" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"
+ defaultValueLiteral="ou=example, ou=com"/>
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="xsdNsPrefix" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"
+ defaultValueLiteral="ou=example, ou=com"/>
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="oidPrefix" lowerBound="1"
+ eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString" changeable="false"
+ transient="true" defaultValueLiteral="1.3.6.1.4.1.18060.4"/>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EDataType" name="Hashtable" instanceTypeName="java.util.Hashtable<Object, Object>"
+ serializable="false"/>
+ <eClassifiers xsi:type="ecore:EDataType" name="NamingException" instanceClassName="javax.naming.NamingException"
+ serializable="false"/>
+ <eClassifiers xsi:type="ecore:EDataType" name="DirContext" instanceClassName="javax.naming.directory.DirContext"/>
+ <eClassifiers xsi:type="ecore:EClass" name="AttributeTypeConstants" instanceClassName="org.apache.tuscany.das.ldap.schema.constants.AttributeTypeConstants"
+ abstract="true" interface="true"/>
+ <eClassifiers xsi:type="ecore:EClass" name="ObjectClassConstants" instanceClassName="org.apache.tuscany.das.ldap.schema.constants.ObjectClassConstants"
+ abstract="true" interface="true"/>
+</ecore:EPackage>
Added: directory/sandbox/oersoy/das.testing/das.ldap.parent/das.ldap/backup/model.genmodel
URL: http://svn.apache.org/viewvc/directory/sandbox/oersoy/das.testing/das.ldap.parent/das.ldap/backup/model.genmodel?view=auto&rev=543239
==============================================================================
--- directory/sandbox/oersoy/das.testing/das.ldap.parent/das.ldap/backup/model.genmodel (added)
+++ directory/sandbox/oersoy/das.testing/das.ldap.parent/das.ldap/backup/model.genmodel Thu May 31 12:58:13 2007
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<genmodel:GenModel xmi:version="2.0"
+ xmlns:xmi="http://www.omg.org/XMI" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore"
+ xmlns:genmodel="http://www.eclipse.org/emf/2002/GenModel" modelDirectory="/das.ldap.configuration.model.v100/src/main/java"
+ editDirectory="/das.ldap.configuration.model.ecore.v100.edit/src" editorDirectory="/das.ldap.configuration.model.ecore.v100.editor/src"
+ modelPluginID="das.ldap.configuration.model.ecore.v100" modelName="Model" importerID="org.eclipse.emf.importer.ecore"
+ complianceLevel="5.0">
+ <foreignModel>model.ecore</foreignModel>
+ <genPackages prefix="DASLdapModelV100" basePackage="org.apache.tuscany.das.ldap.configuration.model"
+ disposableProviderFactory="true" ecorePackage="model.ecore#/">
+ <genEnums typeSafeEnumCompatible="false" ecoreEnum="model.ecore#//JNDIEnvironmentKeys">
+ <genEnumLiterals ecoreEnumLiteral="model.ecore#//JNDIEnvironmentKeys/JAVA_NAMING_FACTORY_INITIAL_KEY"/>
+ <genEnumLiterals ecoreEnumLiteral="model.ecore#//JNDIEnvironmentKeys/JAVA_NAMING_PROVIDER_URL_KEY"/>
+ <genEnumLiterals ecoreEnumLiteral="model.ecore#//JNDIEnvironmentKeys/JAVA_NAMING_SECURITY_AUTHENTICATION_KEY"/>
+ <genEnumLiterals ecoreEnumLiteral="model.ecore#//JNDIEnvironmentKeys/JAVA_NAMING_SECURITY_PRINCIPAL_KEY"/>
+ <genEnumLiterals ecoreEnumLiteral="model.ecore#//JNDIEnvironmentKeys/JAVA_NAMING_SECURITY_CREDENTIALS_KEY"/>
+ </genEnums>
+ <genDataTypes ecoreDataType="model.ecore#//NamingException"/>
+ <genDataTypes ecoreDataType="model.ecore#//DirContext"/>
+ <genClasses ecoreClass="model.ecore#//JNDIProperites">
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute model.ecore#//JNDIProperites/javaNamingFactoryInitial"/>
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute model.ecore#//JNDIProperites/javaNamingProviderUrl"/>
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute model.ecore#//JNDIProperites/javaNamingSecurityAuthentication"/>
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute model.ecore#//JNDIProperites/javaNamingSecurityPrincipal"/>
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute model.ecore#//JNDIProperites/javaNamingSecurityCredentials"/>
+ <genOperations ecoreOperation="model.ecore#//JNDIProperites/connect"/>
+ <genOperations ecoreOperation="model.ecore#//JNDIProperites/disconnect">
+ <genParameters ecoreParameter="model.ecore#//JNDIProperites/disconnect/dirContext"/>
+ </genOperations>
+ </genClasses>
+ </genPackages>
+</genmodel:GenModel>
Added: directory/sandbox/oersoy/das.testing/das.ldap.parent/das.ldap/pom.xml
URL: http://svn.apache.org/viewvc/directory/sandbox/oersoy/das.testing/das.ldap.parent/das.ldap/pom.xml?view=auto&rev=543239
==============================================================================
--- directory/sandbox/oersoy/das.testing/das.ldap.parent/das.ldap/pom.xml (added)
+++ directory/sandbox/oersoy/das.testing/das.ldap.parent/das.ldap/pom.xml Thu May 31 12:58:13 2007
@@ -0,0 +1,207 @@
+<?xml version="1.0"?>
+<project>
+ <parent>
+ <artifactId>das.ldap.parent</artifactId>
+ <groupId>org.apache.tuscany</groupId>
+ <version>1.0-SNAPSHOT</version>
+ </parent>
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>org.apache.tuscany</groupId>
+ <artifactId>das.ldap</artifactId>
+ <name>Tuscany LDAP DAS</name>
+ <version>1.0-SNAPSHOT</version>
+ <build>
+ <plugins>
+ <plugin>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <configuration>
+ <source>1.6</source>
+ <target>1.6</target>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+ <dependencies>
+
+ <dependency>
+ <groupId>org.apache.directory.server</groupId>
+ <artifactId>apacheds-core</artifactId>
+ <version>1.0.0</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.slf4j</groupId>
+ <artifactId>nlog4j</artifactId>
+ <version>1.2.25</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.tuscany</groupId>
+ <artifactId>das.ldap.constants</artifactId>
+ <version>1.0-SNAPSHOT</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.tuscany</groupId>
+ <artifactId>das.ldap.configuration.model.v100</artifactId>
+ <version>1.0-SNAPSHOT</version>
+ </dependency>
+
+ <dependency>
+ <groupId>commons-lang</groupId>
+ <artifactId>commons-lang</artifactId>
+ <version>2.3</version>
+ </dependency>
+
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ </dependency>
+
+ <dependency>
+ <groupId>org.eclipse.emf</groupId>
+ <artifactId>ant</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.eclipse.emf</groupId>
+ <artifactId>codegen</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.eclipse.emf</groupId>
+ <artifactId>codegen-ecore</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.eclipse.emf</groupId>
+ <artifactId>codegen-ecore-ui</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.eclipse.emf</groupId>
+ <artifactId>codegen-ui</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.eclipse.emf</groupId>
+ <artifactId>common</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.eclipse.emf</groupId>
+ <artifactId>commonj-sdo</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.eclipse.emf</groupId>
+ <artifactId>common-ui</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.eclipse.emf</groupId>
+ <artifactId>converter</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.eclipse.emf</groupId>
+ <artifactId>ecore</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.eclipse.emf</groupId>
+ <artifactId>ecore-change</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.eclipse.emf</groupId>
+ <artifactId>ecore-change-edit</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.eclipse.emf</groupId>
+ <artifactId>ecore-edit</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.eclipse.emf</groupId>
+ <artifactId>ecore-sdo</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.eclipse.emf</groupId>
+ <artifactId>ecore-sdo-edit</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.eclipse.emf</groupId>
+ <artifactId>ecore-xmi</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.eclipse.emf</groupId>
+ <artifactId>edit</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.eclipse.emf</groupId>
+ <artifactId>edit-ui</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.eclipse.emf</groupId>
+ <artifactId>emf</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.eclipse.emf</groupId>
+ <artifactId>exporter</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.eclipse.emf</groupId>
+ <artifactId>importer</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.eclipse.emf</groupId>
+ <artifactId>importer-ecore</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.eclipse.emf</groupId>
+ <artifactId>importer-java</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.eclipse.emf</groupId>
+ <artifactId>importer-rose</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.eclipse.emf</groupId>
+ <artifactId>mapping</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.eclipse.emf</groupId>
+ <artifactId>mapping-ecore2ecore</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.eclipse.emf</groupId>
+ <artifactId>mapping-ecore2ecore-editor</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.eclipse.emf</groupId>
+ <artifactId>mapping-ecore2xml</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.eclipse.emf</groupId>
+ <artifactId>mapping-ecore2xml-ui</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.eclipse.emf</groupId>
+ <artifactId>mapping-ui</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.eclipse.emf</groupId>
+ <artifactId>mapping-xsd2ecore</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.eclipse.emf</groupId>
+ <artifactId>mapping-xsd2ecore-editor</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.eclipse.xsd</groupId>
+ <artifactId>ecore-exporter</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.eclipse.xsd</groupId>
+ <artifactId>ecore-importer</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.eclipse.xsd</groupId>
+ <artifactId>edit</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.eclipse.xsd</groupId>
+ <artifactId>xsd</artifactId>
+ </dependency>
+
+ </dependencies>
+</project>
\ No newline at end of file
Added: directory/sandbox/oersoy/das.testing/das.ldap.parent/das.ldap/server-work/das/apacheAlias.db
URL: http://svn.apache.org/viewvc/directory/sandbox/oersoy/das.testing/das.ldap.parent/das.ldap/server-work/das/apacheAlias.db?view=auto&rev=543239
==============================================================================
Binary file - no diff available.
Propchange: directory/sandbox/oersoy/das.testing/das.ldap.parent/das.ldap/server-work/das/apacheAlias.db
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Added: directory/sandbox/oersoy/das.testing/das.ldap.parent/das.ldap/server-work/das/apacheAlias.lg
URL: http://svn.apache.org/viewvc/directory/sandbox/oersoy/das.testing/das.ldap.parent/das.ldap/server-work/das/apacheAlias.lg?view=auto&rev=543239
==============================================================================
Binary file - no diff available.
Propchange: directory/sandbox/oersoy/das.testing/das.ldap.parent/das.ldap/server-work/das/apacheAlias.lg
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Added: directory/sandbox/oersoy/das.testing/das.ldap.parent/das.ldap/server-work/das/apacheExistance.db
URL: http://svn.apache.org/viewvc/directory/sandbox/oersoy/das.testing/das.ldap.parent/das.ldap/server-work/das/apacheExistance.db?view=auto&rev=543239
==============================================================================
Binary file - no diff available.
Propchange: directory/sandbox/oersoy/das.testing/das.ldap.parent/das.ldap/server-work/das/apacheExistance.db
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Added: directory/sandbox/oersoy/das.testing/das.ldap.parent/das.ldap/server-work/das/apacheExistance.lg
URL: http://svn.apache.org/viewvc/directory/sandbox/oersoy/das.testing/das.ldap.parent/das.ldap/server-work/das/apacheExistance.lg?view=auto&rev=543239
==============================================================================
Binary file - no diff available.
Propchange: directory/sandbox/oersoy/das.testing/das.ldap.parent/das.ldap/server-work/das/apacheExistance.lg
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Added: directory/sandbox/oersoy/das.testing/das.ldap.parent/das.ldap/server-work/das/apacheHierarchy.db
URL: http://svn.apache.org/viewvc/directory/sandbox/oersoy/das.testing/das.ldap.parent/das.ldap/server-work/das/apacheHierarchy.db?view=auto&rev=543239
==============================================================================
Binary file - no diff available.
Propchange: directory/sandbox/oersoy/das.testing/das.ldap.parent/das.ldap/server-work/das/apacheHierarchy.db
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Added: directory/sandbox/oersoy/das.testing/das.ldap.parent/das.ldap/server-work/das/apacheHierarchy.lg
URL: http://svn.apache.org/viewvc/directory/sandbox/oersoy/das.testing/das.ldap.parent/das.ldap/server-work/das/apacheHierarchy.lg?view=auto&rev=543239
==============================================================================
Binary file - no diff available.
Propchange: directory/sandbox/oersoy/das.testing/das.ldap.parent/das.ldap/server-work/das/apacheHierarchy.lg
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Added: directory/sandbox/oersoy/das.testing/das.ldap.parent/das.ldap/server-work/das/apacheNdn.db
URL: http://svn.apache.org/viewvc/directory/sandbox/oersoy/das.testing/das.ldap.parent/das.ldap/server-work/das/apacheNdn.db?view=auto&rev=543239
==============================================================================
Binary file - no diff available.
Propchange: directory/sandbox/oersoy/das.testing/das.ldap.parent/das.ldap/server-work/das/apacheNdn.db
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Added: directory/sandbox/oersoy/das.testing/das.ldap.parent/das.ldap/server-work/das/apacheNdn.lg
URL: http://svn.apache.org/viewvc/directory/sandbox/oersoy/das.testing/das.ldap.parent/das.ldap/server-work/das/apacheNdn.lg?view=auto&rev=543239
==============================================================================
Binary file - no diff available.
Propchange: directory/sandbox/oersoy/das.testing/das.ldap.parent/das.ldap/server-work/das/apacheNdn.lg
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Added: directory/sandbox/oersoy/das.testing/das.ldap.parent/das.ldap/server-work/das/apacheOnealias.db
URL: http://svn.apache.org/viewvc/directory/sandbox/oersoy/das.testing/das.ldap.parent/das.ldap/server-work/das/apacheOnealias.db?view=auto&rev=543239
==============================================================================
Binary file - no diff available.
Propchange: directory/sandbox/oersoy/das.testing/das.ldap.parent/das.ldap/server-work/das/apacheOnealias.db
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Added: directory/sandbox/oersoy/das.testing/das.ldap.parent/das.ldap/server-work/das/apacheOnealias.lg
URL: http://svn.apache.org/viewvc/directory/sandbox/oersoy/das.testing/das.ldap.parent/das.ldap/server-work/das/apacheOnealias.lg?view=auto&rev=543239
==============================================================================
Binary file - no diff available.
Propchange: directory/sandbox/oersoy/das.testing/das.ldap.parent/das.ldap/server-work/das/apacheOnealias.lg
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Added: directory/sandbox/oersoy/das.testing/das.ldap.parent/das.ldap/server-work/das/apacheSubalias.db
URL: http://svn.apache.org/viewvc/directory/sandbox/oersoy/das.testing/das.ldap.parent/das.ldap/server-work/das/apacheSubalias.db?view=auto&rev=543239
==============================================================================
Binary file - no diff available.
Propchange: directory/sandbox/oersoy/das.testing/das.ldap.parent/das.ldap/server-work/das/apacheSubalias.db
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Added: directory/sandbox/oersoy/das.testing/das.ldap.parent/das.ldap/server-work/das/apacheSubalias.lg
URL: http://svn.apache.org/viewvc/directory/sandbox/oersoy/das.testing/das.ldap.parent/das.ldap/server-work/das/apacheSubalias.lg?view=auto&rev=543239
==============================================================================
Binary file - no diff available.
Propchange: directory/sandbox/oersoy/das.testing/das.ldap.parent/das.ldap/server-work/das/apacheSubalias.lg
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Added: directory/sandbox/oersoy/das.testing/das.ldap.parent/das.ldap/server-work/das/apacheUpdn.db
URL: http://svn.apache.org/viewvc/directory/sandbox/oersoy/das.testing/das.ldap.parent/das.ldap/server-work/das/apacheUpdn.db?view=auto&rev=543239
==============================================================================
Binary file - no diff available.
Propchange: directory/sandbox/oersoy/das.testing/das.ldap.parent/das.ldap/server-work/das/apacheUpdn.db
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Added: directory/sandbox/oersoy/das.testing/das.ldap.parent/das.ldap/server-work/das/apacheUpdn.lg
URL: http://svn.apache.org/viewvc/directory/sandbox/oersoy/das.testing/das.ldap.parent/das.ldap/server-work/das/apacheUpdn.lg?view=auto&rev=543239
==============================================================================
Binary file - no diff available.
Propchange: directory/sandbox/oersoy/das.testing/das.ldap.parent/das.ldap/server-work/das/apacheUpdn.lg
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Added: directory/sandbox/oersoy/das.testing/das.ldap.parent/das.ldap/server-work/das/master.db
URL: http://svn.apache.org/viewvc/directory/sandbox/oersoy/das.testing/das.ldap.parent/das.ldap/server-work/das/master.db?view=auto&rev=543239
==============================================================================
Binary file - no diff available.
Propchange: directory/sandbox/oersoy/das.testing/das.ldap.parent/das.ldap/server-work/das/master.db
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Added: directory/sandbox/oersoy/das.testing/das.ldap.parent/das.ldap/server-work/das/master.lg
URL: http://svn.apache.org/viewvc/directory/sandbox/oersoy/das.testing/das.ldap.parent/das.ldap/server-work/das/master.lg?view=auto&rev=543239
==============================================================================
Binary file - no diff available.
Propchange: directory/sandbox/oersoy/das.testing/das.ldap.parent/das.ldap/server-work/das/master.lg
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Added: directory/sandbox/oersoy/das.testing/das.ldap.parent/das.ldap/server-work/system/apacheAlias.db
URL: http://svn.apache.org/viewvc/directory/sandbox/oersoy/das.testing/das.ldap.parent/das.ldap/server-work/system/apacheAlias.db?view=auto&rev=543239
==============================================================================
Binary file - no diff available.
Propchange: directory/sandbox/oersoy/das.testing/das.ldap.parent/das.ldap/server-work/system/apacheAlias.db
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Added: directory/sandbox/oersoy/das.testing/das.ldap.parent/das.ldap/server-work/system/apacheAlias.lg
URL: http://svn.apache.org/viewvc/directory/sandbox/oersoy/das.testing/das.ldap.parent/das.ldap/server-work/system/apacheAlias.lg?view=auto&rev=543239
==============================================================================
Binary file - no diff available.
Propchange: directory/sandbox/oersoy/das.testing/das.ldap.parent/das.ldap/server-work/system/apacheAlias.lg
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Added: directory/sandbox/oersoy/das.testing/das.ldap.parent/das.ldap/server-work/system/apacheExistance.db
URL: http://svn.apache.org/viewvc/directory/sandbox/oersoy/das.testing/das.ldap.parent/das.ldap/server-work/system/apacheExistance.db?view=auto&rev=543239
==============================================================================
Binary file - no diff available.
Propchange: directory/sandbox/oersoy/das.testing/das.ldap.parent/das.ldap/server-work/system/apacheExistance.db
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Added: directory/sandbox/oersoy/das.testing/das.ldap.parent/das.ldap/server-work/system/apacheExistance.lg
URL: http://svn.apache.org/viewvc/directory/sandbox/oersoy/das.testing/das.ldap.parent/das.ldap/server-work/system/apacheExistance.lg?view=auto&rev=543239
==============================================================================
Binary file - no diff available.
Propchange: directory/sandbox/oersoy/das.testing/das.ldap.parent/das.ldap/server-work/system/apacheExistance.lg
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Added: directory/sandbox/oersoy/das.testing/das.ldap.parent/das.ldap/server-work/system/apacheHierarchy.db
URL: http://svn.apache.org/viewvc/directory/sandbox/oersoy/das.testing/das.ldap.parent/das.ldap/server-work/system/apacheHierarchy.db?view=auto&rev=543239
==============================================================================
Binary file - no diff available.
Propchange: directory/sandbox/oersoy/das.testing/das.ldap.parent/das.ldap/server-work/system/apacheHierarchy.db
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Added: directory/sandbox/oersoy/das.testing/das.ldap.parent/das.ldap/server-work/system/apacheHierarchy.lg
URL: http://svn.apache.org/viewvc/directory/sandbox/oersoy/das.testing/das.ldap.parent/das.ldap/server-work/system/apacheHierarchy.lg?view=auto&rev=543239
==============================================================================
Binary file - no diff available.
Propchange: directory/sandbox/oersoy/das.testing/das.ldap.parent/das.ldap/server-work/system/apacheHierarchy.lg
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Added: directory/sandbox/oersoy/das.testing/das.ldap.parent/das.ldap/server-work/system/apacheNdn.db
URL: http://svn.apache.org/viewvc/directory/sandbox/oersoy/das.testing/das.ldap.parent/das.ldap/server-work/system/apacheNdn.db?view=auto&rev=543239
==============================================================================
Binary file - no diff available.
Propchange: directory/sandbox/oersoy/das.testing/das.ldap.parent/das.ldap/server-work/system/apacheNdn.db
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Added: directory/sandbox/oersoy/das.testing/das.ldap.parent/das.ldap/server-work/system/apacheNdn.lg
URL: http://svn.apache.org/viewvc/directory/sandbox/oersoy/das.testing/das.ldap.parent/das.ldap/server-work/system/apacheNdn.lg?view=auto&rev=543239
==============================================================================
Binary file - no diff available.
Propchange: directory/sandbox/oersoy/das.testing/das.ldap.parent/das.ldap/server-work/system/apacheNdn.lg
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Added: directory/sandbox/oersoy/das.testing/das.ldap.parent/das.ldap/server-work/system/apacheOnealias.db
URL: http://svn.apache.org/viewvc/directory/sandbox/oersoy/das.testing/das.ldap.parent/das.ldap/server-work/system/apacheOnealias.db?view=auto&rev=543239
==============================================================================
Binary file - no diff available.
Propchange: directory/sandbox/oersoy/das.testing/das.ldap.parent/das.ldap/server-work/system/apacheOnealias.db
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Added: directory/sandbox/oersoy/das.testing/das.ldap.parent/das.ldap/server-work/system/apacheOnealias.lg
URL: http://svn.apache.org/viewvc/directory/sandbox/oersoy/das.testing/das.ldap.parent/das.ldap/server-work/system/apacheOnealias.lg?view=auto&rev=543239
==============================================================================
Binary file - no diff available.
Propchange: directory/sandbox/oersoy/das.testing/das.ldap.parent/das.ldap/server-work/system/apacheOnealias.lg
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Added: directory/sandbox/oersoy/das.testing/das.ldap.parent/das.ldap/server-work/system/apacheSubalias.db
URL: http://svn.apache.org/viewvc/directory/sandbox/oersoy/das.testing/das.ldap.parent/das.ldap/server-work/system/apacheSubalias.db?view=auto&rev=543239
==============================================================================
Binary file - no diff available.
Propchange: directory/sandbox/oersoy/das.testing/das.ldap.parent/das.ldap/server-work/system/apacheSubalias.db
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Added: directory/sandbox/oersoy/das.testing/das.ldap.parent/das.ldap/server-work/system/apacheSubalias.lg
URL: http://svn.apache.org/viewvc/directory/sandbox/oersoy/das.testing/das.ldap.parent/das.ldap/server-work/system/apacheSubalias.lg?view=auto&rev=543239
==============================================================================
Binary file - no diff available.
Propchange: directory/sandbox/oersoy/das.testing/das.ldap.parent/das.ldap/server-work/system/apacheSubalias.lg
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Added: directory/sandbox/oersoy/das.testing/das.ldap.parent/das.ldap/server-work/system/apacheUpdn.db
URL: http://svn.apache.org/viewvc/directory/sandbox/oersoy/das.testing/das.ldap.parent/das.ldap/server-work/system/apacheUpdn.db?view=auto&rev=543239
==============================================================================
Binary file - no diff available.
Propchange: directory/sandbox/oersoy/das.testing/das.ldap.parent/das.ldap/server-work/system/apacheUpdn.db
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Added: directory/sandbox/oersoy/das.testing/das.ldap.parent/das.ldap/server-work/system/apacheUpdn.lg
URL: http://svn.apache.org/viewvc/directory/sandbox/oersoy/das.testing/das.ldap.parent/das.ldap/server-work/system/apacheUpdn.lg?view=auto&rev=543239
==============================================================================
Binary file - no diff available.
Propchange: directory/sandbox/oersoy/das.testing/das.ldap.parent/das.ldap/server-work/system/apacheUpdn.lg
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Added: directory/sandbox/oersoy/das.testing/das.ldap.parent/das.ldap/server-work/system/master.db
URL: http://svn.apache.org/viewvc/directory/sandbox/oersoy/das.testing/das.ldap.parent/das.ldap/server-work/system/master.db?view=auto&rev=543239
==============================================================================
Binary file - no diff available.
Propchange: directory/sandbox/oersoy/das.testing/das.ldap.parent/das.ldap/server-work/system/master.db
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Added: directory/sandbox/oersoy/das.testing/das.ldap.parent/das.ldap/server-work/system/master.lg
URL: http://svn.apache.org/viewvc/directory/sandbox/oersoy/das.testing/das.ldap.parent/das.ldap/server-work/system/master.lg?view=auto&rev=543239
==============================================================================
Binary file - no diff available.
Propchange: directory/sandbox/oersoy/das.testing/das.ldap.parent/das.ldap/server-work/system/master.lg
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Added: directory/sandbox/oersoy/das.testing/das.ldap.parent/das.ldap/server-work/system/objectClass.db
URL: http://svn.apache.org/viewvc/directory/sandbox/oersoy/das.testing/das.ldap.parent/das.ldap/server-work/system/objectClass.db?view=auto&rev=543239
==============================================================================
Binary file - no diff available.
Propchange: directory/sandbox/oersoy/das.testing/das.ldap.parent/das.ldap/server-work/system/objectClass.db
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Added: directory/sandbox/oersoy/das.testing/das.ldap.parent/das.ldap/server-work/system/objectClass.lg
URL: http://svn.apache.org/viewvc/directory/sandbox/oersoy/das.testing/das.ldap.parent/das.ldap/server-work/system/objectClass.lg?view=auto&rev=543239
==============================================================================
Binary file - no diff available.
Propchange: directory/sandbox/oersoy/das.testing/das.ldap.parent/das.ldap/server-work/system/objectClass.lg
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Added: directory/sandbox/oersoy/das.testing/das.ldap.parent/das.ldap/src/main/java/org/apache/tuscany/das/ldap/DAS.java
URL: http://svn.apache.org/viewvc/directory/sandbox/oersoy/das.testing/das.ldap.parent/das.ldap/src/main/java/org/apache/tuscany/das/ldap/DAS.java?view=auto&rev=543239
==============================================================================
--- directory/sandbox/oersoy/das.testing/das.ldap.parent/das.ldap/src/main/java/org/apache/tuscany/das/ldap/DAS.java (added)
+++ directory/sandbox/oersoy/das.testing/das.ldap.parent/das.ldap/src/main/java/org/apache/tuscany/das/ldap/DAS.java Thu May 31 12:58:13 2007
@@ -0,0 +1,14 @@
+package org.apache.tuscany.das.ldap;
+
+import org.eclipse.emf.ecore.sdo.EDataGraph;
+
+public interface DAS {
+
+ public void write(EDataGraph EDataGraph, Object connection);
+
+ public EDataGraph read(String[] queryParameters, Object connection);
+
+ public void update(EDataGraph EDataGraph, Object connection);
+
+ public void delete( EDataGraph EDataGraph, Object connection );
+}
Added: directory/sandbox/oersoy/das.testing/das.ldap.parent/das.ldap/src/main/java/org/apache/tuscany/das/ldap/constants/DASConstants.java
URL: http://svn.apache.org/viewvc/directory/sandbox/oersoy/das.testing/das.ldap.parent/das.ldap/src/main/java/org/apache/tuscany/das/ldap/constants/DASConstants.java?view=auto&rev=543239
==============================================================================
--- directory/sandbox/oersoy/das.testing/das.ldap.parent/das.ldap/src/main/java/org/apache/tuscany/das/ldap/constants/DASConstants.java (added)
+++ directory/sandbox/oersoy/das.testing/das.ldap.parent/das.ldap/src/main/java/org/apache/tuscany/das/ldap/constants/DASConstants.java Thu May 31 12:58:13 2007
@@ -0,0 +1,54 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+package org.apache.tuscany.das.ldap.constants;
+
+public interface DASConstants {
+
+ String DAS_XSD_NAMESPACE =
+ "http://org.apache.tuscany/das/ldap";
+
+ String M_META_TOP_SDO_OBJECT_CLASS =
+ "metaTopSDO";
+
+ String M_COMPLEX_MAY =
+ "m-complexMay";
+
+ String M_COMPLEX_MAY_DESCRIPTION =
+ "SDO Type member that is a reference";
+
+ String M_COMPLEX_MUST =
+ "m-complexMust";
+
+ String M_COMPLEX_MUST_DESCRIPTION =
+ "Required SDO Type member reference.";
+
+ //TODO More natural home?
+ String LDAP_USER_APPLICATIONS =
+ "USER_APPLICATIONS";
+
+ String LDAP_FALSE =
+ "FALSE";
+
+ String OID_SYNTAX_OID_VALUE =
+ "1.3.6.1.4.1.1466.115.121.1.38";
+
+ String DISTINGUISHED_NAME_SYNTAX_OID_VALUE =
+ "1.3.6.1.4.1.1466.115.121.1.12";
+}
Added: directory/sandbox/oersoy/das.testing/das.ldap.parent/das.ldap/src/main/java/org/apache/tuscany/das/ldap/create/InitialContextCreator.java
URL: http://svn.apache.org/viewvc/directory/sandbox/oersoy/das.testing/das.ldap.parent/das.ldap/src/main/java/org/apache/tuscany/das/ldap/create/InitialContextCreator.java?view=auto&rev=543239
==============================================================================
--- directory/sandbox/oersoy/das.testing/das.ldap.parent/das.ldap/src/main/java/org/apache/tuscany/das/ldap/create/InitialContextCreator.java (added)
+++ directory/sandbox/oersoy/das.testing/das.ldap.parent/das.ldap/src/main/java/org/apache/tuscany/das/ldap/create/InitialContextCreator.java Thu May 31 12:58:13 2007
@@ -0,0 +1,59 @@
+
+package org.apache.tuscany.das.ldap.create;
+
+import javax.naming.NamingException;
+import javax.naming.directory.DirContext;
+
+import org.apache.tuscany.das.ldap.util.XSDNamespaceURITokenizer;
+import org.eclipse.emf.common.util.URI;
+
+/**
+ * The InitialContextCreator for a model's directory namespace
+ */
+public class InitialContextCreator
+{
+ /**
+ * Create the initial naming to which the
+ * ldap attributes belonging to the root DataObject
+ * will be bound.
+ *
+ * @param directoryContext the dir context
+ * @param xsdNamespace the xml namespace of the DataObjects
+ *
+ * @return the directory context
+ *
+ * @throws NamingException the naming exception
+ */
+ public static DirContext create(
+ String xsdNamespace,
+ DirContext directoryContext) throws NamingException
+ {
+ URI xsdNamespaceURI =
+ URI.createURI(
+ xsdNamespace );
+
+ String[] pathTokens =
+ XSDNamespaceURITokenizer.
+ createPathTokens(
+ xsdNamespaceURI );
+
+ String[] authorityTokens =
+ XSDNamespaceURITokenizer.
+ createAuthorityTokens(
+ xsdNamespaceURI );
+
+ directoryContext =
+ InitialContextCreatorHelper.
+ createAuthorityContext(
+ directoryContext,
+ authorityTokens );
+
+ directoryContext =
+ InitialContextCreatorHelper.
+ createPathContext(
+ directoryContext,
+ pathTokens );
+
+ return directoryContext;
+ }
+}
Added: directory/sandbox/oersoy/das.testing/das.ldap.parent/das.ldap/src/main/java/org/apache/tuscany/das/ldap/create/InitialContextCreatorHelper.java
URL: http://svn.apache.org/viewvc/directory/sandbox/oersoy/das.testing/das.ldap.parent/das.ldap/src/main/java/org/apache/tuscany/das/ldap/create/InitialContextCreatorHelper.java?view=auto&rev=543239
==============================================================================
--- directory/sandbox/oersoy/das.testing/das.ldap.parent/das.ldap/src/main/java/org/apache/tuscany/das/ldap/create/InitialContextCreatorHelper.java (added)
+++ directory/sandbox/oersoy/das.testing/das.ldap.parent/das.ldap/src/main/java/org/apache/tuscany/das/ldap/create/InitialContextCreatorHelper.java Thu May 31 12:58:13 2007
@@ -0,0 +1,119 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+package org.apache.tuscany.das.ldap.create;
+
+import javax.naming.NamingException;
+import javax.naming.directory.Attributes;
+import javax.naming.directory.DirContext;
+
+import org.apache.tuscany.das.ldap.schema.constants.AttributeTypeConstants;
+import org.apache.tuscany.das.ldap.schema.constants.ObjectClassConstants;
+import org.apache.tuscany.das.ldap.schema.constants.SchemaObjectClassConstants;
+
+/**
+ * The Class InitialContextCreatorHelper.
+ */
+public class InitialContextCreatorHelper
+implements
+ObjectClassConstants,
+SchemaObjectClassConstants,
+AttributeTypeConstants
+{
+ /**
+ * Lookup the subcontext and if it does not exist,
+ * create it.
+ *
+ * @param dirContext the dir context
+ * @param subContext the sub context
+ *
+ * @return the dir context
+ *
+ * @throws NamingException the naming exception
+ */
+ public static DirContext createSubContext(
+ DirContext dirContext,
+ String subContext,
+ Attributes attributes)
+ throws NamingException
+ {
+ try
+ {
+ dirContext = ( DirContext ) dirContext.lookup( subContext );
+ }
+ catch ( NamingException e )
+ {
+ if (attributes == null)
+ {
+ dirContext = ( DirContext ) dirContext.createSubcontext( subContext );
+ }
+ else
+ {
+ dirContext = ( DirContext ) dirContext.createSubcontext( subContext, attributes );
+ }
+ }
+ return dirContext;
+ }
+
+ /**
+ * Creates the authority context.
+ *
+ * @param authorityTokens the authority tokens
+ * @param directoryContext the directory context
+ *
+ * @return the dir context
+ *
+ * @throws NamingException the naming exception
+ */
+ public static DirContext createAuthorityContext(
+ DirContext directoryContext,
+ String[] authorityTokens)
+ throws NamingException
+ {
+ for (int i = authorityTokens.length-1; i >= (0); i--)
+ {
+ String subContext = "cn=" + authorityTokens[i];
+ directoryContext = createSubContext( directoryContext, subContext, null );
+ }
+ return directoryContext;
+ }
+
+ /**
+ * Creates the path context.
+ *
+ * @param dirContext the dir context
+ * @param pathTokens the path tokens
+ *
+ * @return the dir context
+ *
+ * @throws NamingException the naming exception
+ */
+ public static DirContext createPathContext(
+ DirContext dirContext,
+ String[] pathTokens)
+ throws NamingException
+ {
+ for (int i = 1; i < (pathTokens.length); i++)
+ {
+ String subContext = "cn=" + pathTokens[i];
+ dirContext = createSubContext( dirContext, subContext, null );
+ }
+ return dirContext;
+ }
+}
\ No newline at end of file
Added: directory/sandbox/oersoy/das.testing/das.ldap.parent/das.ldap/src/main/java/org/apache/tuscany/das/ldap/destroy/InitialContextDestroyer.java
URL: http://svn.apache.org/viewvc/directory/sandbox/oersoy/das.testing/das.ldap.parent/das.ldap/src/main/java/org/apache/tuscany/das/ldap/destroy/InitialContextDestroyer.java?view=auto&rev=543239
==============================================================================
--- directory/sandbox/oersoy/das.testing/das.ldap.parent/das.ldap/src/main/java/org/apache/tuscany/das/ldap/destroy/InitialContextDestroyer.java (added)
+++ directory/sandbox/oersoy/das.testing/das.ldap.parent/das.ldap/src/main/java/org/apache/tuscany/das/ldap/destroy/InitialContextDestroyer.java Thu May 31 12:58:13 2007
@@ -0,0 +1,53 @@
+
+package org.apache.tuscany.das.ldap.destroy;
+
+
+import javax.naming.NamingException;
+import javax.naming.directory.DirContext;
+
+import org.apache.tuscany.das.ldap.util.JNDIUtil;
+
+/**
+ * The Class InitialContextDestroyer
+ */
+public class InitialContextDestroyer
+{
+ /**
+ * Destroys the initial naming context
+ * when the parent entries do not contain
+ * other child entries. If the initial
+ * naming context also supports other
+ * entries, then a NamingException will
+ * be thrown.
+ *
+ * @param directoryContext the dir context
+ * @param xsdNamespace the xml namespace of the DataObjects
+ *
+ * @throws NamingException the naming exception
+ */
+ public static void destroy(
+ DirContext initialContext,
+ DirContext partitionContext) throws NamingException
+ {
+ String[] initialContextComponents =
+ JNDIUtil.calculateDNComponents( initialContext );
+
+ String[] partitionContextComponents =
+ JNDIUtil.calculateDNComponents( partitionContext );
+
+ int numberOfPossibleSubcontexts =
+ initialContextComponents.length
+ - partitionContextComponents.length;
+
+ for (int i = 0; i < numberOfPossibleSubcontexts; i++)
+ {
+ String rdn = initialContextComponents[i];
+
+ initialContext = JNDIUtil.getParentContext(
+ initialContext,
+ partitionContext );
+
+ initialContext.destroySubcontext( rdn );
+ }
+ }
+}
Added: directory/sandbox/oersoy/das.testing/das.ldap.parent/das.ldap/src/main/java/org/apache/tuscany/das/ldap/encryption/constants/EncryptionConstants.java
URL: http://svn.apache.org/viewvc/directory/sandbox/oersoy/das.testing/das.ldap.parent/das.ldap/src/main/java/org/apache/tuscany/das/ldap/encryption/constants/EncryptionConstants.java?view=auto&rev=543239
==============================================================================
--- directory/sandbox/oersoy/das.testing/das.ldap.parent/das.ldap/src/main/java/org/apache/tuscany/das/ldap/encryption/constants/EncryptionConstants.java (added)
+++ directory/sandbox/oersoy/das.testing/das.ldap.parent/das.ldap/src/main/java/org/apache/tuscany/das/ldap/encryption/constants/EncryptionConstants.java Thu May 31 12:58:13 2007
@@ -0,0 +1,26 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+package org.apache.tuscany.das.ldap.encryption.constants;
+
+public interface EncryptionConstants
+{
+ String MD5 = "MD5";
+ String SHA1 = "SHA-1";//Produces longer hashes than MD5
+}
Added: directory/sandbox/oersoy/das.testing/das.ldap.parent/das.ldap/src/main/java/org/apache/tuscany/das/ldap/encryption/util/ChecksumUtils.java
URL: http://svn.apache.org/viewvc/directory/sandbox/oersoy/das.testing/das.ldap.parent/das.ldap/src/main/java/org/apache/tuscany/das/ldap/encryption/util/ChecksumUtils.java?view=auto&rev=543239
==============================================================================
--- directory/sandbox/oersoy/das.testing/das.ldap.parent/das.ldap/src/main/java/org/apache/tuscany/das/ldap/encryption/util/ChecksumUtils.java (added)
+++ directory/sandbox/oersoy/das.testing/das.ldap.parent/das.ldap/src/main/java/org/apache/tuscany/das/ldap/encryption/util/ChecksumUtils.java Thu May 31 12:58:13 2007
@@ -0,0 +1,38 @@
+
+package org.apache.tuscany.das.ldap.encryption.util;
+
+import java.security.MessageDigest;
+import java.security.NoSuchAlgorithmException;
+
+import org.apache.tuscany.das.ldap.encryption.constants.EncryptionConstants;
+
+public class ChecksumUtils
+implements EncryptionConstants
+{
+ public static String computeMD5Hash(String string)
+ throws NoSuchAlgorithmException
+ {
+ MessageDigest messageDigest = MessageDigest.getInstance(MD5);
+
+ byte[] digest =
+ messageDigest.digest(string.getBytes());
+
+ StringBuffer hexString = new StringBuffer();
+ for (int i=0;i<digest.length;i++) {
+ hexString.append (
+ Integer.toHexString(0xFF & digest[i]));
+ }
+
+ char[] hexStringCharacters = hexString.toString().toCharArray();
+ String checksum = "";
+
+ for( char i : hexStringCharacters)
+ {
+ int ascii = (int) i;
+ checksum = checksum + Integer.toString(ascii);
+ }
+
+ return checksum;
+ }
+
+}
Added: directory/sandbox/oersoy/das.testing/das.ldap.parent/das.ldap/src/main/java/org/apache/tuscany/das/ldap/impl/DASImpl.java
URL: http://svn.apache.org/viewvc/directory/sandbox/oersoy/das.testing/das.ldap.parent/das.ldap/src/main/java/org/apache/tuscany/das/ldap/impl/DASImpl.java?view=auto&rev=543239
==============================================================================
--- directory/sandbox/oersoy/das.testing/das.ldap.parent/das.ldap/src/main/java/org/apache/tuscany/das/ldap/impl/DASImpl.java (added)
+++ directory/sandbox/oersoy/das.testing/das.ldap.parent/das.ldap/src/main/java/org/apache/tuscany/das/ldap/impl/DASImpl.java Thu May 31 12:58:13 2007
@@ -0,0 +1,80 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+package org.apache.tuscany.das.ldap.impl;
+
+
+import java.util.Iterator;
+import java.util.List;
+
+import javax.naming.NamingException;
+import javax.naming.directory.Attribute;
+import javax.naming.directory.Attributes;
+import javax.naming.directory.BasicAttribute;
+import javax.naming.directory.BasicAttributes;
+import javax.naming.directory.DirContext;
+
+import org.apache.tuscany.das.ldap.DAS;
+import org.apache.tuscany.das.ldap.configuration.model.v100.DASConfiguration;
+import org.apache.tuscany.das.ldap.schema.constants.AttributeTypeConstants;
+import org.apache.tuscany.das.ldap.util.LDAPNormalizer;
+import org.eclipse.emf.ecore.EAttribute;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EPackage;
+import org.eclipse.emf.ecore.EReference;
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.emf.ecore.sdo.EDataGraph;
+
+/**
+ * The Class DASImpl.
+ */
+public class DASImpl
+implements DAS, AttributeTypeConstants
+{
+
+ @Override
+ public void delete( EDataGraph EDataGraph, Object connection )
+ {
+ // TODO Auto-generated method stub
+
+ }
+
+ @Override
+ public EDataGraph read( String[] queryParameters, Object connection )
+ {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ @Override
+ public void update( EDataGraph EDataGraph, Object connection )
+ {
+ // TODO Auto-generated method stub
+
+ }
+
+ @Override
+ public void write( EDataGraph EDataGraph, Object connection )
+ {
+ // TODO Auto-generated method stub
+
+ }
+
+}
Added: directory/sandbox/oersoy/das.testing/das.ldap.parent/das.ldap/src/main/java/org/apache/tuscany/das/ldap/impl/DASImplHelper.java
URL: http://svn.apache.org/viewvc/directory/sandbox/oersoy/das.testing/das.ldap.parent/das.ldap/src/main/java/org/apache/tuscany/das/ldap/impl/DASImplHelper.java?view=auto&rev=543239
==============================================================================
--- directory/sandbox/oersoy/das.testing/das.ldap.parent/das.ldap/src/main/java/org/apache/tuscany/das/ldap/impl/DASImplHelper.java (added)
+++ directory/sandbox/oersoy/das.testing/das.ldap.parent/das.ldap/src/main/java/org/apache/tuscany/das/ldap/impl/DASImplHelper.java Thu May 31 12:58:13 2007
@@ -0,0 +1,135 @@
+package org.apache.tuscany.das.ldap.impl;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.Hashtable;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+
+import javax.naming.Context;
+import javax.naming.NamingException;
+import javax.naming.directory.Attribute;
+import javax.naming.directory.Attributes;
+import javax.naming.directory.BasicAttribute;
+import javax.naming.directory.BasicAttributes;
+import javax.naming.directory.DirContext;
+import javax.naming.directory.InitialDirContext;
+
+import org.apache.directory.server.core.configuration.Configuration;
+import org.apache.directory.server.core.configuration.MutablePartitionConfiguration;
+import org.apache.directory.server.core.configuration.MutableStartupConfiguration;
+import org.apache.directory.shared.ldap.name.LdapDN;
+import org.apache.tuscany.das.ldap.create.InitialContextCreator;
+import org.apache.tuscany.das.ldap.schema.constants.AttributeTypeConstants;
+import org.apache.tuscany.das.ldap.schema.constants.SchemaObjectClassConstants;
+import org.apache.tuscany.das.ldap.util.LDAPNormalizer;
+import org.eclipse.emf.ecore.EAttribute;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EClassifier;
+import org.eclipse.emf.ecore.EDataType;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EPackage;
+import org.eclipse.emf.ecore.EReference;
+import org.eclipse.emf.ecore.EcorePackage;
+
+/**
+ * The Class DASHelper.
+ */
+public class DASImplHelper
+implements AttributeTypeConstants, SchemaObjectClassConstants
+{
+
+ private static Map<String, EDataType> dataTypeMap = null;
+ /*
+ private static void createDummySyntaxChecker(
+ String oid,
+ String schema )
+ throws NamingException
+ {
+ List<String> descriptions = new ArrayList<String>();
+ descriptions.add(
+ "( "
+ + oid
+ + " DESC 'bogus desc' FQCN " + AcceptAllSyntaxChecker.class.getName()
+ + " X-SCHEMA '"
+ + schema
+ + "' )" );
+ modify(
+ DirContext.ADD_ATTRIBUTE,
+ descriptions,
+ "syntaxCheckers" );
+ }
+
+
+ private void modify(
+ int op,
+ List<String> descriptions,
+ String opAttr )
+ throws NamingException
+ {
+ LdapDN dn = new LdapDN( getSubschemaSubentryDN() );
+ Attribute attr = new AttributeImpl( opAttr );
+ for ( String description : descriptions )
+ {
+ attr.add( description );
+ }
+
+ Attributes mods = new AttributesImpl();
+ mods.put( attr );
+
+ rootDSE.modifyAttributes( dn, op, mods );
+ }
+
+*/
+
+ public static void writeSyntax(EDataType eDataType)
+ {
+ }
+
+ public static void createModelTypeSystem(EPackage ePackage)
+ {
+ }
+
+ public static void createWriteSequence(EPackage ePackage)
+ {
+ }
+
+ public static void writeXSDSyntaxEntries()
+ {
+ }
+
+ public static void writeXSDAttributeTypes()
+ {
+
+ }
+
+ public static void writeSDOObjectClass()
+ {
+
+ }
+
+ public static void writeEPackageEntry(
+ EPackage ePackage,
+ DirContext namespacedSchemaContext)
+ throws NamingException
+ {
+ Attribute ePackageObjectClassAttribute =
+ new BasicAttribute(OBJECT_CLASS, "ePackageObjectClass");
+ Attribute nsPrefixAttribute =
+ new BasicAttribute("nsPrefix", ePackage.getNsPrefix());
+ Attribute nsNamespaceAttribute =
+ new BasicAttribute("nsNamespace", ePackage.getNsPrefix());
+
+ Attributes attributes = new BasicAttributes();
+ attributes.put(ePackageObjectClassAttribute);
+ attributes.put(nsPrefixAttribute);
+ attributes.put(nsNamespaceAttribute);
+
+ namespacedSchemaContext.createSubcontext(
+ "cn=ePackage", attributes);
+ }
+
+}
Added: directory/sandbox/oersoy/das.testing/das.ldap.parent/das.ldap/src/main/java/org/apache/tuscany/das/ldap/oid/create/ComplexTypeOIDCreator.java
URL: http://svn.apache.org/viewvc/directory/sandbox/oersoy/das.testing/das.ldap.parent/das.ldap/src/main/java/org/apache/tuscany/das/ldap/oid/create/ComplexTypeOIDCreator.java?view=auto&rev=543239
==============================================================================
--- directory/sandbox/oersoy/das.testing/das.ldap.parent/das.ldap/src/main/java/org/apache/tuscany/das/ldap/oid/create/ComplexTypeOIDCreator.java (added)
+++ directory/sandbox/oersoy/das.testing/das.ldap.parent/das.ldap/src/main/java/org/apache/tuscany/das/ldap/oid/create/ComplexTypeOIDCreator.java Thu May 31 12:58:13 2007
@@ -0,0 +1,69 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+package org.apache.tuscany.das.ldap.oid.create;
+
+import org.apache.tuscany.das.ldap.encryption.constants.EncryptionConstants;
+import org.apache.tuscany.das.ldap.encryption.util.ChecksumUtils;
+import org.apache.tuscany.das.ldap.util.ComplexTypeNamespaceQualifier;
+
+/**
+ * The Class UniqueOIDCreator.
+ * Creates unique OIDs for namespaced
+ * metadata such as the XSD DataType
+ * with (Class specific term) qualifiedNameURI
+ * http://www.w3.org/2001/XMLSchema/string
+ *
+ */
+public class ComplexTypeOIDCreator implements EncryptionConstants
+{
+ /**
+ * Creates a unique OID.
+ *
+ * @param instanceClassName the instance class name
+ * @param oidPrefix the OID Branch
+ * @param simpleTypeName the name
+ * @param namespaceURI the metadata namespace URI
+ *
+ * @return the string
+ *
+ * @throws Exception the exception
+ */
+ public static String create(
+ String oidPrefix,
+ String namespaceURI,
+ String complexTypeName)
+ throws Exception
+ {
+ String qualifiedNameURI =
+ ComplexTypeNamespaceQualifier.qualify(
+ namespaceURI,
+ complexTypeName);
+
+ String postfixOID =
+ ChecksumUtils.computeMD5Hash(
+ qualifiedNameURI);
+
+ postfixOID =
+ OIDCreatorHelper.
+ calculateSegmentedOID(postfixOID);
+
+ return oidPrefix + "." + postfixOID;
+ }
+}
\ No newline at end of file
Added: directory/sandbox/oersoy/das.testing/das.ldap.parent/das.ldap/src/main/java/org/apache/tuscany/das/ldap/oid/create/OIDCreatorHelper.java
URL: http://svn.apache.org/viewvc/directory/sandbox/oersoy/das.testing/das.ldap.parent/das.ldap/src/main/java/org/apache/tuscany/das/ldap/oid/create/OIDCreatorHelper.java?view=auto&rev=543239
==============================================================================
--- directory/sandbox/oersoy/das.testing/das.ldap.parent/das.ldap/src/main/java/org/apache/tuscany/das/ldap/oid/create/OIDCreatorHelper.java (added)
+++ directory/sandbox/oersoy/das.testing/das.ldap.parent/das.ldap/src/main/java/org/apache/tuscany/das/ldap/oid/create/OIDCreatorHelper.java Thu May 31 12:58:13 2007
@@ -0,0 +1,73 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+package org.apache.tuscany.das.ldap.oid.create;
+
+public class OIDCreatorHelper
+{
+ private static int MAX_OID_SEGMENT_LENGTH = 8;
+ /**
+ * Calculate segmented OID.
+ *
+ * @param oid the oid
+ *
+ * @return the string
+ *
+ * @throws Exception the exception
+ *
+ * Note that the OID must be divided
+ * into segments less than 9 characters
+ * long. This is an ApacheDS restriction
+ * on OID segment length.
+ */
+ public static String calculateSegmentedOID(String oid) throws Exception
+ {
+ if (oid.length() < 10)
+ {
+ throw new Exception("The length of the oid must be greater than 9 in order to ensure uniqueness.");
+ }
+ int oidLength = oid.length();
+ int numberOfPeriods = oidLength / MAX_OID_SEGMENT_LENGTH;
+
+ int beginIndex = 0;
+ int endIndex = MAX_OID_SEGMENT_LENGTH;
+
+ String segmentedOID =
+ oid.substring(beginIndex, endIndex ) + ".";
+
+ for (int i = 2; i < numberOfPeriods; i++)
+ {
+ beginIndex = (i-1) * MAX_OID_SEGMENT_LENGTH + 1;
+ endIndex = i * MAX_OID_SEGMENT_LENGTH;
+ segmentedOID += oid.substring( beginIndex, endIndex ) + ".";
+ }
+ int finalSegmentLength = oid.length() - (endIndex + 2);
+
+ if ( finalSegmentLength > MAX_OID_SEGMENT_LENGTH )
+ {
+ segmentedOID += oid.substring( endIndex + 1,endIndex + 9 ) + ".";
+ segmentedOID += oid.substring( endIndex + 10, oid.length() );
+ }
+ else
+ {
+ segmentedOID += oid.substring( endIndex + 1, oid.length() );
+ }
+ return segmentedOID;
+ }
+}
Added: directory/sandbox/oersoy/das.testing/das.ldap.parent/das.ldap/src/main/java/org/apache/tuscany/das/ldap/oid/create/SimpleTypeOIDCreator.java
URL: http://svn.apache.org/viewvc/directory/sandbox/oersoy/das.testing/das.ldap.parent/das.ldap/src/main/java/org/apache/tuscany/das/ldap/oid/create/SimpleTypeOIDCreator.java?view=auto&rev=543239
==============================================================================
--- directory/sandbox/oersoy/das.testing/das.ldap.parent/das.ldap/src/main/java/org/apache/tuscany/das/ldap/oid/create/SimpleTypeOIDCreator.java (added)
+++ directory/sandbox/oersoy/das.testing/das.ldap.parent/das.ldap/src/main/java/org/apache/tuscany/das/ldap/oid/create/SimpleTypeOIDCreator.java Thu May 31 12:58:13 2007
@@ -0,0 +1,66 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+package org.apache.tuscany.das.ldap.oid.create;
+
+import org.apache.tuscany.das.ldap.encryption.constants.EncryptionConstants;
+import org.apache.tuscany.das.ldap.encryption.util.ChecksumUtils;
+import org.apache.tuscany.das.ldap.util.SimpleTypeNamespaceQualifier;
+
+/**
+ * The Class SimpleTypeOIDCreator.
+ * Creates unique OIDs for namespaced
+ * metadata such as the XSD DataType
+ * with (Class specific term) qualifiedNameURI
+ * http://www.w3.org/2001/XMLSchema/string
+ *
+ */
+public class SimpleTypeOIDCreator implements EncryptionConstants
+{
+ /**
+ * Creates a unique OID.
+ *
+ * @param instanceClassName the instance class name
+ * @param oidPrefix the OID Branch
+ * @param complexTypeName the name
+ * @param namespaceURI the metadata namespace URI
+ *
+ * @return the string
+ *
+ * @throws Exception the exception
+ */
+ public static String create(
+ String oidPrefix,
+ String namespaceURI,
+ String complexTypeName,
+ String simpleTypeName)
+ throws Exception
+ {
+ String qualifiedNameURI =
+ SimpleTypeNamespaceQualifier.qualify(
+ namespaceURI,
+ complexTypeName,
+ simpleTypeName);
+
+ String postfixOID = ChecksumUtils.computeMD5Hash(qualifiedNameURI);
+
+ postfixOID = OIDCreatorHelper.calculateSegmentedOID(postfixOID);
+ return oidPrefix + "." + postfixOID;
+ }
+}
\ No newline at end of file
Added: directory/sandbox/oersoy/das.testing/das.ldap.parent/das.ldap/src/main/java/org/apache/tuscany/das/ldap/schema/create/AbstractAttributeTypeCreator.java
URL: http://svn.apache.org/viewvc/directory/sandbox/oersoy/das.testing/das.ldap.parent/das.ldap/src/main/java/org/apache/tuscany/das/ldap/schema/create/AbstractAttributeTypeCreator.java?view=auto&rev=543239
==============================================================================
--- directory/sandbox/oersoy/das.testing/das.ldap.parent/das.ldap/src/main/java/org/apache/tuscany/das/ldap/schema/create/AbstractAttributeTypeCreator.java (added)
+++ directory/sandbox/oersoy/das.testing/das.ldap.parent/das.ldap/src/main/java/org/apache/tuscany/das/ldap/schema/create/AbstractAttributeTypeCreator.java Thu May 31 12:58:13 2007
@@ -0,0 +1,40 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+package org.apache.tuscany.das.ldap.schema.create;
+
+/**
+ * The Class AbstractAttributeTypeCreator.
+ */
+public abstract class AbstractAttributeTypeCreator
+extends AbstractTypeCreator
+{
+
+ public AbstractAttributeTypeCreator()
+ {
+ super();
+
+ objectClassAttribute.add( META_ATTRIBUTE_TYPE );
+ basicAttributes.put( M_COLLECTIVE, LDAP_FALSE );
+ basicAttributes.put( M_EQUALITY, M_EQUALITY__NAME_OR_NUMERIC_ID_MATCH );
+ basicAttributes.put( M_NO_USER_MODIFICATION, LDAP_FALSE);
+ basicAttributes.put( M_SINGLE_VALUE, LDAP_FALSE );
+ basicAttributes.put( M_USAGE, LDAP_USER_APPLICATIONS);
+ }
+}
\ No newline at end of file
Added: directory/sandbox/oersoy/das.testing/das.ldap.parent/das.ldap/src/main/java/org/apache/tuscany/das/ldap/schema/create/AbstractTypeCreator.java
URL: http://svn.apache.org/viewvc/directory/sandbox/oersoy/das.testing/das.ldap.parent/das.ldap/src/main/java/org/apache/tuscany/das/ldap/schema/create/AbstractTypeCreator.java?view=auto&rev=543239
==============================================================================
--- directory/sandbox/oersoy/das.testing/das.ldap.parent/das.ldap/src/main/java/org/apache/tuscany/das/ldap/schema/create/AbstractTypeCreator.java (added)
+++ directory/sandbox/oersoy/das.testing/das.ldap.parent/das.ldap/src/main/java/org/apache/tuscany/das/ldap/schema/create/AbstractTypeCreator.java Thu May 31 12:58:13 2007
@@ -0,0 +1,59 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+package org.apache.tuscany.das.ldap.schema.create;
+
+import javax.naming.directory.Attribute;
+import javax.naming.directory.Attributes;
+import javax.naming.directory.BasicAttribute;
+import javax.naming.directory.BasicAttributes;
+
+import org.apache.tuscany.das.ldap.constants.DASConstants;
+import org.apache.tuscany.das.ldap.schema.constants.AttributeTypeConstants;
+import org.apache.tuscany.das.ldap.schema.constants.EnumeratedSchemaAttributeTypeValues;
+import org.apache.tuscany.das.ldap.schema.constants.ObjectClassConstants;
+import org.apache.tuscany.das.ldap.schema.constants.SchemaAttributeTypeConstants;
+import org.apache.tuscany.das.ldap.schema.constants.SchemaObjectClassConstants;
+
+public abstract class AbstractTypeCreator
+implements
+EnumeratedSchemaAttributeTypeValues,
+SchemaAttributeTypeConstants,
+AttributeTypeConstants,
+SchemaObjectClassConstants,
+ObjectClassConstants,
+DASConstants
+{
+ protected Attribute objectClassAttribute;
+ protected Attributes basicAttributes;
+
+ public AbstractTypeCreator()
+ {
+ objectClassAttribute =
+ new BasicAttribute(
+ OBJECT_CLASS, TOP );
+
+ objectClassAttribute.add(
+ META_TOP );
+
+ basicAttributes = new BasicAttributes();
+ basicAttributes.put(objectClassAttribute);
+ basicAttributes.put( M_OBSOLETE, LDAP_FALSE );
+ }
+}
\ No newline at end of file
Added: directory/sandbox/oersoy/das.testing/das.ldap.parent/das.ldap/src/main/java/org/apache/tuscany/das/ldap/schema/create/ComplexTypeRDNCreator.java
URL: http://svn.apache.org/viewvc/directory/sandbox/oersoy/das.testing/das.ldap.parent/das.ldap/src/main/java/org/apache/tuscany/das/ldap/schema/create/ComplexTypeRDNCreator.java?view=auto&rev=543239
==============================================================================
--- directory/sandbox/oersoy/das.testing/das.ldap.parent/das.ldap/src/main/java/org/apache/tuscany/das/ldap/schema/create/ComplexTypeRDNCreator.java (added)
+++ directory/sandbox/oersoy/das.testing/das.ldap.parent/das.ldap/src/main/java/org/apache/tuscany/das/ldap/schema/create/ComplexTypeRDNCreator.java Thu May 31 12:58:13 2007
@@ -0,0 +1,60 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+package org.apache.tuscany.das.ldap.schema.create;
+
+import org.apache.tuscany.das.ldap.oid.create.ComplexTypeOIDCreator;
+import org.apache.tuscany.das.ldap.schema.constants.SchemaAttributeTypeConstants;
+
+/**
+ * The Class DataTypeRDNCreator.
+ */
+public class ComplexTypeRDNCreator
+implements SchemaAttributeTypeConstants
+{
+ /**
+ * Create.
+ *
+ * @param oidPrefix the oid prefix
+ * @param namespaceURI the namespace URI
+ * @param complexTypeName the complex type name
+ *
+ * @return the string that is the rdn
+ *
+ * @throws Exception the exception
+ */
+ public static String create(
+ String oidPrefix,
+ String namespaceURI,
+ String complexTypeName
+ )
+ throws Exception
+ {
+ String oid =
+ ComplexTypeOIDCreator.create(
+ oidPrefix,
+ namespaceURI,
+ complexTypeName );
+
+ String rdn =
+ M_OID + "=" + oid;
+
+ return rdn;
+ }
+}
\ No newline at end of file