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 2011/01/23 20:11:13 UTC
svn commit: r1062500 - in /directory: shared/trunk/
shared/trunk/ldap-schema-converter/ shared/trunk/ldap-schema-converter/src/
shared/trunk/ldap-schema-converter/src/main/
shared/trunk/ldap-schema-converter/src/main/antlr/
shared/trunk/ldap-schema-con...
Author: akarasulu
Date: Sun Jan 23 19:11:12 2011
New Revision: 1062500
URL: http://svn.apache.org/viewvc?rev=1062500&view=rev
Log:
Shared refactoring continued ...
o removed materials from shared ldap for new shared schema converter bundle
o updated studio build to use this new bundle
o still need Pierre to take a look here and see if I did this correctly wrt
the studio build's way of doing things
Added:
directory/shared/trunk/ldap-schema-converter/
directory/shared/trunk/ldap-schema-converter/pom.xml
directory/shared/trunk/ldap-schema-converter/shared-ldap-schema-converter.iml
directory/shared/trunk/ldap-schema-converter/src/
directory/shared/trunk/ldap-schema-converter/src/main/
directory/shared/trunk/ldap-schema-converter/src/main/antlr/
directory/shared/trunk/ldap-schema-converter/src/main/antlr/schemaConverter.g (props changed)
- copied unchanged from r1062292, directory/shared/trunk/ldap/src/main/antlr/schemaConverter.g
directory/shared/trunk/ldap-schema-converter/src/main/java/
directory/shared/trunk/ldap-schema-converter/src/main/java/org/
directory/shared/trunk/ldap-schema-converter/src/main/java/org/apache/
directory/shared/trunk/ldap-schema-converter/src/main/java/org/apache/directory/
directory/shared/trunk/ldap-schema-converter/src/main/java/org/apache/directory/shared/
directory/shared/trunk/ldap-schema-converter/src/main/java/org/apache/directory/shared/converter/
directory/shared/trunk/ldap-schema-converter/src/main/java/org/apache/directory/shared/converter/schema/
directory/shared/trunk/ldap-schema-converter/src/main/java/org/apache/directory/shared/converter/schema/AttributeTypeHolder.java
- copied, changed from r1062306, directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/converter/schema/AttributeTypeHolder.java
directory/shared/trunk/ldap-schema-converter/src/main/java/org/apache/directory/shared/converter/schema/ObjectClassHolder.java
- copied, changed from r1062306, directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/converter/schema/ObjectClassHolder.java
directory/shared/trunk/ldap-schema-converter/src/main/java/org/apache/directory/shared/converter/schema/ParserException.java
- copied unchanged from r1062292, directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/converter/schema/ParserException.java
directory/shared/trunk/ldap-schema-converter/src/main/java/org/apache/directory/shared/converter/schema/Schema.java
- copied unchanged from r1062292, directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/converter/schema/Schema.java
directory/shared/trunk/ldap-schema-converter/src/main/java/org/apache/directory/shared/converter/schema/SchemaElement.java
- copied, changed from r1062292, directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/converter/schema/SchemaElement.java
directory/shared/trunk/ldap-schema-converter/src/main/java/org/apache/directory/shared/converter/schema/SchemaElementImpl.java
- copied, changed from r1062306, directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/converter/schema/SchemaElementImpl.java
directory/shared/trunk/ldap-schema-converter/src/main/java/org/apache/directory/shared/converter/schema/SchemaParser.java
- copied, changed from r1062292, directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/converter/schema/SchemaParser.java
directory/shared/trunk/ldap-schema-converter/src/main/java/org/apache/directory/shared/converter/schema/SchemaToLdif.java
- copied, changed from r1062292, directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/converter/schema/SchemaToLdif.java
directory/shared/trunk/ldap-schema-converter/src/main/resources/
directory/shared/trunk/ldap-schema-converter/src/test/
directory/shared/trunk/ldap-schema-converter/src/test/java/
directory/shared/trunk/ldap-schema-converter/src/test/java/org/
directory/shared/trunk/ldap-schema-converter/src/test/java/org/apache/
directory/shared/trunk/ldap-schema-converter/src/test/java/org/apache/directory/
directory/shared/trunk/ldap-schema-converter/src/test/java/org/apache/directory/shared/
directory/shared/trunk/ldap-schema-converter/src/test/java/org/apache/directory/shared/converter/
directory/shared/trunk/ldap-schema-converter/src/test/java/org/apache/directory/shared/converter/schema/
directory/shared/trunk/ldap-schema-converter/src/test/java/org/apache/directory/shared/converter/schema/TestSchemaToLdif.java (props changed)
- copied unchanged from r1062292, directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/converter/schema/TestSchemaToLdif.java
directory/shared/trunk/ldap-schema-converter/src/test/resources/
directory/shared/trunk/ldap-schema-converter/src/test/resources/log4j.properties
- copied unchanged from r1062292, directory/shared/trunk/ldap/src/test/resources/log4j.properties
directory/shared/trunk/ldap-schema-converter/src/test/resources/org/
- copied from r1062292, directory/shared/trunk/ldap/src/test/resources/org/
Removed:
directory/shared/trunk/ldap/src/main/antlr/schemaConverter.g
directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/converter/
directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/converter/
directory/shared/trunk/ldap/src/test/resources/org/
Modified:
directory/shared/trunk/pom.xml
directory/studio/trunk/plugins/schemaeditor/pom.xml
directory/studio/trunk/pom.xml
Added: directory/shared/trunk/ldap-schema-converter/pom.xml
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap-schema-converter/pom.xml?rev=1062500&view=auto
==============================================================================
--- directory/shared/trunk/ldap-schema-converter/pom.xml (added)
+++ directory/shared/trunk/ldap-schema-converter/pom.xml Sun Jan 23 19:11:12 2011
@@ -0,0 +1,102 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ 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.
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <groupId>org.apache.directory.shared</groupId>
+ <artifactId>shared-parent</artifactId>
+ <version>0.9.20-SNAPSHOT</version>
+ </parent>
+
+ <artifactId>shared-ldap-schema-converter</artifactId>
+ <name>Apache Directory Shared LDAP Schema Converter</name>
+ <packaging>bundle</packaging>
+ <description>LDAP Schema Converter</description>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.directory.junit</groupId>
+ <artifactId>junit-addons</artifactId>
+ <scope>test</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>${project.groupId}</groupId>
+ <artifactId>shared-ldap</artifactId>
+ </dependency>
+ </dependencies>
+
+ <build>
+ <plugins>
+ <plugin>
+ <artifactId>maven-antrun-plugin</artifactId>
+ <executions>
+ <execution>
+ <phase>generate-sources</phase>
+ <configuration />
+ <goals>
+ <goal>run</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>antlr-maven-plugin</artifactId>
+ <version>2.1</version>
+ <configuration>
+ <grammars>*.g</grammars>
+ </configuration>
+ <executions>
+ <execution>
+ <goals>
+ <goal>generate</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+
+ <plugin>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <configuration>
+ <excludes>
+ <exclude>**/Abstract*</exclude>
+ <exclude>**/*RegressionTest*</exclude>
+ </excludes>
+ </configuration>
+ </plugin>
+
+ <plugin>
+ <groupId>org.apache.felix</groupId>
+ <artifactId>maven-bundle-plugin</artifactId>
+ <inherited>true</inherited>
+ <extensions>true</extensions>
+ <configuration>
+ <manifestLocation>META-INF</manifestLocation>
+ <instructions>
+ <Bundle-SymbolicName>${project.groupId}.ldap.schema.converter</Bundle-SymbolicName>
+ <Export-Package>org.apache.directory.shared.converter.schema</Export-Package>
+ </instructions>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+</project>
Added: directory/shared/trunk/ldap-schema-converter/shared-ldap-schema-converter.iml
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap-schema-converter/shared-ldap-schema-converter.iml?rev=1062500&view=auto
==============================================================================
--- directory/shared/trunk/ldap-schema-converter/shared-ldap-schema-converter.iml (added)
+++ directory/shared/trunk/ldap-schema-converter/shared-ldap-schema-converter.iml Sun Jan 23 19:11:12 2011
@@ -0,0 +1,46 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<module org.jetbrains.idea.maven.project.MavenProjectsManager.isMavenModule="true" type="JAVA_MODULE" version="4">
+ <component name="FacetManager">
+ <facet type="Osmorc" name="OSGi">
+ <configuration osmorcControlsManifest="true" manifestLocation="" jarfileLocation="$APPLICATION_HOME_DIR$/bin/shared-ldap-schema-converter.jar" outputPathType="CompilerOutputPath" useBndFile="false" bndFileLocation="" useBundlorFile="false" bundlorFileLocation="" bundleActivator="" bundleSymbolicName="org.apache.directory.shared.ldap.schema.converter" bundleVersion="0.9.20-SNAPSHOT" ignoreFilePattern="" useProjectDefaultManifestFileLocation="true" alwaysRebuildBundleJAR="false">
+ <additionalProperties>
+ <property key="Export-Package" value="org.apache.directory.shared.converter.schema" />
+ </additionalProperties>
+ <additionalJARContents />
+ </configuration>
+ </facet>
+ </component>
+ <component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_5" inherit-compiler-output="false">
+ <output url="file://$MODULE_DIR$/target/classes" />
+ <output-test url="file://$MODULE_DIR$/target/test-classes" />
+ <content url="file://$MODULE_DIR$">
+ <sourceFolder url="file://$MODULE_DIR$/target/generated-sources/antlr" isTestSource="false" />
+ <sourceFolder url="file://$MODULE_DIR$/src/main/java" isTestSource="false" />
+ <sourceFolder url="file://$MODULE_DIR$/src/main/resources" isTestSource="false" />
+ <sourceFolder url="file://$MODULE_DIR$/src/test/java" isTestSource="true" />
+ <sourceFolder url="file://$MODULE_DIR$/src/test/resources" isTestSource="true" />
+ <excludeFolder url="file://$MODULE_DIR$/target/classes" />
+ <excludeFolder url="file://$MODULE_DIR$/target/maven-shared-archive-resources" />
+ <excludeFolder url="file://$MODULE_DIR$/target/surefire-reports" />
+ <excludeFolder url="file://$MODULE_DIR$/target/test-classes" />
+ </content>
+ <orderEntry type="inheritedJdk" />
+ <orderEntry type="sourceFolder" forTests="false" />
+ <orderEntry type="module" module-name="junit-addons" scope="TEST" />
+ <orderEntry type="library" scope="TEST" name="Maven: junit:junit:4.8.2" level="project" />
+ <orderEntry type="module" module-name="shared-ldap" />
+ <orderEntry type="module" module-name="shared-util" />
+ <orderEntry type="module" module-name="shared-i18n" />
+ <orderEntry type="library" name="Maven: org.slf4j:slf4j-api:1.6.1" level="project" />
+ <orderEntry type="module" module-name="shared-asn1-api" />
+ <orderEntry type="module" module-name="shared-asn1-ber" />
+ <orderEntry type="library" name="Maven: org.apache.mina:mina-core:2.0.2" level="project" />
+ <orderEntry type="library" name="Maven: antlr:antlr:2.7.7" level="project" />
+ <orderEntry type="library" name="Maven: commons-lang:commons-lang:2.6" level="project" />
+ <orderEntry type="library" name="Maven: commons-collections:commons-collections:3.2.1" level="project" />
+ <orderEntry type="library" scope="PROVIDED" name="Maven: findbugs:annotations:1.0.0" level="project" />
+ <orderEntry type="library" scope="TEST" name="Maven: org.slf4j:slf4j-log4j12:1.6.1" level="project" />
+ <orderEntry type="library" scope="TEST" name="Maven: log4j:log4j:1.2.16" level="project" />
+ </component>
+</module>
+
Propchange: directory/shared/trunk/ldap-schema-converter/src/main/antlr/schemaConverter.g
------------------------------------------------------------------------------
svn:eol-style = native
Copied: directory/shared/trunk/ldap-schema-converter/src/main/java/org/apache/directory/shared/converter/schema/AttributeTypeHolder.java (from r1062306, directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/converter/schema/AttributeTypeHolder.java)
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap-schema-converter/src/main/java/org/apache/directory/shared/converter/schema/AttributeTypeHolder.java?p2=directory/shared/trunk/ldap-schema-converter/src/main/java/org/apache/directory/shared/converter/schema/AttributeTypeHolder.java&p1=directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/converter/schema/AttributeTypeHolder.java&r1=1062306&r2=1062500&rev=1062500&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/converter/schema/AttributeTypeHolder.java (original)
+++ directory/shared/trunk/ldap-schema-converter/src/main/java/org/apache/directory/shared/converter/schema/AttributeTypeHolder.java Sun Jan 23 19:11:12 2011
@@ -305,7 +305,7 @@ public class AttributeTypeHolder extends
*
* @param schemaName The name of the schema file containing this attributeType
* @return A ldif formatted string
- * @throws LdapException If something went wrong
+ * @throws org.apache.directory.shared.ldap.exception.LdapException If something went wrong
*/
public String toLdif( String schemaName ) throws LdapException
{
Copied: directory/shared/trunk/ldap-schema-converter/src/main/java/org/apache/directory/shared/converter/schema/ObjectClassHolder.java (from r1062306, directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/converter/schema/ObjectClassHolder.java)
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap-schema-converter/src/main/java/org/apache/directory/shared/converter/schema/ObjectClassHolder.java?p2=directory/shared/trunk/ldap-schema-converter/src/main/java/org/apache/directory/shared/converter/schema/ObjectClassHolder.java&p1=directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/converter/schema/ObjectClassHolder.java&r1=1062306&r2=1062500&rev=1062500&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/converter/schema/ObjectClassHolder.java (original)
+++ directory/shared/trunk/ldap-schema-converter/src/main/java/org/apache/directory/shared/converter/schema/ObjectClassHolder.java Sun Jan 23 19:11:12 2011
@@ -20,9 +20,6 @@
package org.apache.directory.shared.converter.schema;
-import java.util.ArrayList;
-import java.util.List;
-
import org.apache.directory.shared.ldap.constants.SchemaConstants;
import org.apache.directory.shared.ldap.entry.DefaultEntry;
import org.apache.directory.shared.ldap.entry.Entry;
@@ -32,6 +29,9 @@ import org.apache.directory.shared.ldap.
import org.apache.directory.shared.ldap.name.Rdn;
import org.apache.directory.shared.ldap.schema.ObjectClassTypeEnum;
+import java.util.ArrayList;
+import java.util.List;
+
/**
* A bean used to encapsulate the literal String values of an ObjectClass
@@ -147,7 +147,7 @@ public class ObjectClassHolder extends S
*
* @param schemaName The name of the schema file containing this objectClass
* @return A ldif formatted string
- * @throws LdapException If something went wrong
+ * @throws org.apache.directory.shared.ldap.exception.LdapException If something went wrong
*/
public String toLdif( String schemaName ) throws LdapException
{
Copied: directory/shared/trunk/ldap-schema-converter/src/main/java/org/apache/directory/shared/converter/schema/SchemaElement.java (from r1062292, directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/converter/schema/SchemaElement.java)
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap-schema-converter/src/main/java/org/apache/directory/shared/converter/schema/SchemaElement.java?p2=directory/shared/trunk/ldap-schema-converter/src/main/java/org/apache/directory/shared/converter/schema/SchemaElement.java&p1=directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/converter/schema/SchemaElement.java&r1=1062292&r2=1062500&rev=1062500&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/converter/schema/SchemaElement.java (original)
+++ directory/shared/trunk/ldap-schema-converter/src/main/java/org/apache/directory/shared/converter/schema/SchemaElement.java Sun Jan 23 19:11:12 2011
@@ -20,11 +20,11 @@
package org.apache.directory.shared.converter.schema;
+import org.apache.directory.shared.ldap.exception.LdapException;
+
import java.util.List;
import java.util.Map;
-import org.apache.directory.shared.ldap.exception.LdapException;
-
/**
* An interface defining the methods to be implemented by the SchemaElement
@@ -47,7 +47,7 @@ public interface SchemaElement
*
* @param isObsolete The value to be set
*/
- void setObsolete( boolean isObsolete );
+ void setObsolete(boolean isObsolete);
/**
@@ -66,7 +66,7 @@ public interface SchemaElement
* Set the schema element's description
* @param description The schema element's description
*/
- void setDescription( String description );
+ void setDescription(String description);
/**
@@ -79,7 +79,7 @@ public interface SchemaElement
* Set a list of names for a schemaElement
* @param names The list of names of this schemaElement
*/
- void setNames( List<String> names );
+ void setNames(List<String> names);
/**
@@ -92,14 +92,14 @@ public interface SchemaElement
* @param key the Extension key
* @return The list of a values for a given extension
*/
- List<String> getExtension( String key );
+ List<String> getExtension(String key);
/**
* Set a list of extensions for a schemaElement
* @param extensions The list of extensions of this schemaElement
*/
- void setExtensions( Map<String, List<String>> extensions );
+ void setExtensions(Map<String, List<String>> extensions);
/**
@@ -107,7 +107,7 @@ public interface SchemaElement
* as a ldif string
* @param schemaName The schema from which is extracted this schemaElement
* @return A string representing the schemaElement as a Ldif formated String
- * @throws LdapException If any error occurs.
+ * @throws org.apache.directory.shared.ldap.exception.LdapException If any error occurs.
*/
- String toLdif( String schemaName ) throws LdapException;
+ String toLdif(String schemaName) throws LdapException;
}
Copied: directory/shared/trunk/ldap-schema-converter/src/main/java/org/apache/directory/shared/converter/schema/SchemaElementImpl.java (from r1062306, directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/converter/schema/SchemaElementImpl.java)
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap-schema-converter/src/main/java/org/apache/directory/shared/converter/schema/SchemaElementImpl.java?p2=directory/shared/trunk/ldap-schema-converter/src/main/java/org/apache/directory/shared/converter/schema/SchemaElementImpl.java&p1=directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/converter/schema/SchemaElementImpl.java&r1=1062306&r2=1062500&rev=1062500&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/converter/schema/SchemaElementImpl.java (original)
+++ directory/shared/trunk/ldap-schema-converter/src/main/java/org/apache/directory/shared/converter/schema/SchemaElementImpl.java Sun Jan 23 19:11:12 2011
@@ -20,11 +20,6 @@
package org.apache.directory.shared.converter.schema;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
import org.apache.directory.shared.ldap.entry.DefaultEntry;
import org.apache.directory.shared.ldap.entry.DefaultEntryAttribute;
import org.apache.directory.shared.ldap.entry.Entry;
@@ -33,6 +28,11 @@ import org.apache.directory.shared.ldap.
import org.apache.directory.shared.ldap.ldif.LdifUtils;
import org.apache.directory.shared.util.Strings;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
/**
* An abstract SchemaElement implementation. It contains shared
@@ -150,7 +150,7 @@ public abstract class SchemaElementImpl
/**
- * @return The OID as a Ldif line
+ * @return The OID as a Ldif line
*/
private String oidToLdif()
{
@@ -160,7 +160,7 @@ public abstract class SchemaElementImpl
/**
* @return the Names as Ldif lines
- * @throws LdapException If the conversion goes wrong
+ * @throws org.apache.directory.shared.ldap.exception.LdapException If the conversion goes wrong
*/
private String nameToLdif() throws LdapException
{
@@ -187,7 +187,7 @@ public abstract class SchemaElementImpl
/**
* @return The description as a ldif line
- * @throws LdapException If the conversion goes wrong
+ * @throws org.apache.directory.shared.ldap.exception.LdapException If the conversion goes wrong
*/
private String descToLdif() throws LdapException
{
@@ -209,21 +209,21 @@ public abstract class SchemaElementImpl
/**
* Transform a Schema Element to a LDIF String
- *
+ *
* @param schemaName The schema element to transform
* @return The Schema Element as a ldif String
- * @throws LdapException If the conversion goes wrong
+ * @throws org.apache.directory.shared.ldap.exception.LdapException If the conversion goes wrong
*/
public abstract String dnToLdif( String schemaName ) throws LdapException;
/**
* Return the extensions formated as Ldif lines
- *
+ *
* @param id The attributeId : can be m-objectClassExtension or
* m-attributeTypeExtension
* @return The extensions formated as ldif lines
- * @throws LdapException If the conversion goes wrong
+ * @throws org.apache.directory.shared.ldap.exception.LdapException If the conversion goes wrong
*/
protected String extensionsToLdif( String id ) throws LdapException
{
@@ -249,7 +249,7 @@ public abstract class SchemaElementImpl
* @param schemaName The schema to transform
* @param type The ObjectClass type
* @return A LDIF String representing the schema
- * @throws LdapException If the transformation can't be done
+ * @throws org.apache.directory.shared.ldap.exception.LdapException If the transformation can't be done
*/
protected String schemaToLdif( String schemaName, String type ) throws LdapException
{
Copied: directory/shared/trunk/ldap-schema-converter/src/main/java/org/apache/directory/shared/converter/schema/SchemaParser.java (from r1062292, directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/converter/schema/SchemaParser.java)
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap-schema-converter/src/main/java/org/apache/directory/shared/converter/schema/SchemaParser.java?p2=directory/shared/trunk/ldap-schema-converter/src/main/java/org/apache/directory/shared/converter/schema/SchemaParser.java&p1=directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/converter/schema/SchemaParser.java&r1=1062292&r2=1062500&rev=1062500&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/converter/schema/SchemaParser.java (original)
+++ directory/shared/trunk/ldap-schema-converter/src/main/java/org/apache/directory/shared/converter/schema/SchemaParser.java Sun Jan 23 19:11:12 2011
@@ -20,21 +20,14 @@
package org.apache.directory.shared.converter.schema;
-import java.io.ByteArrayInputStream;
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.PipedInputStream;
-import java.io.PipedOutputStream;
-import java.text.ParseException;
-import java.util.List;
-
+import antlr.RecognitionException;
+import antlr.TokenStreamException;
import org.apache.commons.lang.exception.ExceptionUtils;
import org.apache.directory.shared.i18n.I18n;
-import antlr.RecognitionException;
-import antlr.TokenStreamException;
+import java.io.*;
+import java.text.ParseException;
+import java.util.List;
/**
@@ -63,7 +56,7 @@ public class SchemaParser
/**
* Creates a reusable instance of an SchemaParser.
*
- * @throws IOException if the pipe cannot be formed
+ * @throws java.io.IOException if the pipe cannot be formed
*/
public SchemaParser() throws IOException
{
@@ -74,7 +67,7 @@ public class SchemaParser
/**
* Initializes a parser and its plumbing.
*
- * @throws IOException if a pipe cannot be formed.
+ * @throws java.io.IOException if a pipe cannot be formed.
*/
public synchronized void init() throws IOException
{
@@ -100,8 +93,8 @@ public class SchemaParser
*
* @param schemaObject the String image of a complete schema object
* @return The list of parsed schema elements
- * @throws IOException If the schema file can't be processed
- * @throws ParseException If we weren't able to parse the schema
+ * @throws java.io.IOException If the schema file can't be processed
+ * @throws java.text.ParseException If we weren't able to parse the schema
*/
public synchronized List<SchemaElement> parse( String schemaObject ) throws IOException, ParseException
{
@@ -125,10 +118,10 @@ public class SchemaParser
/**
* Invoke the parser
* @param schemaName The schema to be parsed
- * @return A list of schema elements
- *
- * @throws IOException If the schema file can't be processed
- * @throws ParseException If we weren't able to parse the schema
+ * @return A list of schema elements
+ *
+ * @throws java.io.IOException If the schema file can't be processed
+ * @throws java.text.ParseException If we weren't able to parse the schema
*/
private List<SchemaElement> invokeParser( String schemaName ) throws IOException, ParseException
{
@@ -158,8 +151,8 @@ public class SchemaParser
*
* @param schemaIn a stream of schema objects
* @return A list of schema elements
- * @throws IOException If the schema file can't be processed
- * @throws ParseException If we weren't able to parse the schema
+ * @throws java.io.IOException If the schema file can't be processed
+ * @throws java.text.ParseException If we weren't able to parse the schema
*/
public synchronized List<SchemaElement> parse( InputStream schemaIn ) throws IOException, ParseException
{
@@ -180,8 +173,8 @@ public class SchemaParser
* Thread safe method parses a file of OpenLDAP schemaObject elements/objects.
*
* @param schemaFile a file of schema objects
- * @throws IOException If the schema file can't be processed
- * @throws ParseException If we weren't able to parse the schema
+ * @throws java.io.IOException If the schema file can't be processed
+ * @throws java.text.ParseException If we weren't able to parse the schema
*/
public synchronized void parse( File schemaFile ) throws IOException, ParseException
{
Copied: directory/shared/trunk/ldap-schema-converter/src/main/java/org/apache/directory/shared/converter/schema/SchemaToLdif.java (from r1062292, directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/converter/schema/SchemaToLdif.java)
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap-schema-converter/src/main/java/org/apache/directory/shared/converter/schema/SchemaToLdif.java?p2=directory/shared/trunk/ldap-schema-converter/src/main/java/org/apache/directory/shared/converter/schema/SchemaToLdif.java&p1=directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/converter/schema/SchemaToLdif.java&r1=1062292&r2=1062500&rev=1062500&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/converter/schema/SchemaToLdif.java (original)
+++ directory/shared/trunk/ldap-schema-converter/src/main/java/org/apache/directory/shared/converter/schema/SchemaToLdif.java Sun Jan 23 19:11:12 2011
@@ -20,14 +20,14 @@
package org.apache.directory.shared.converter.schema;
-import java.io.InputStream;
-import java.io.Writer;
-import java.util.List;
-
import org.apache.directory.shared.i18n.I18n;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
+import java.io.InputStream;
+import java.io.Writer;
+import java.util.List;
+
/**
* A class used to translate a OpenLdap schema file to a Ldif file compatible
Propchange: directory/shared/trunk/ldap-schema-converter/src/test/java/org/apache/directory/shared/converter/schema/TestSchemaToLdif.java
------------------------------------------------------------------------------
svn:eol-style = native
Modified: directory/shared/trunk/pom.xml
URL: http://svn.apache.org/viewvc/directory/shared/trunk/pom.xml?rev=1062500&r1=1062499&r2=1062500&view=diff
==============================================================================
--- directory/shared/trunk/pom.xml (original)
+++ directory/shared/trunk/pom.xml Sun Jan 23 19:11:12 2011
@@ -16,7 +16,8 @@
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
---><project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.apache.directory.project</groupId>
@@ -78,6 +79,7 @@
<module>all</module>
<module>ldap</module>
<module>ldap-schema</module>
+ <module>ldap-schema-converter</module>
<module>ldap-client-api</module>
<module>dsml-parser</module>
<module>dsml-engine</module>
@@ -156,6 +158,12 @@
<version>${project.version}</version>
</dependency>
+ <dependency>
+ <groupId>${project.groupId}</groupId>
+ <artifactId>shared-ldap-schema-converter</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+
<!-- Mina dependencies -->
<dependency>
Modified: directory/studio/trunk/plugins/schemaeditor/pom.xml
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/schemaeditor/pom.xml?rev=1062500&r1=1062499&r2=1062500&view=diff
==============================================================================
--- directory/studio/trunk/plugins/schemaeditor/pom.xml (original)
+++ directory/studio/trunk/plugins/schemaeditor/pom.xml Sun Jan 23 19:11:12 2011
@@ -114,20 +114,22 @@
<Eclipse-LazyStart>true</Eclipse-LazyStart>
<Bundle-Activator>org.apache.directory.studio.schemaeditor.Activator</Bundle-Activator>
<Require-Bundle>org.apache.commons.collections;bundle-version="${org.apache.commons.collections.version}",
- org.apache.commons.io;bundle-version="${org.apache.commons.io.version}",
- org.apache.directory.shared.ldap;bundle-version="${org.apache.directory.shared.validversion}",
- org.apache.directory.studio.common.core,
- org.apache.directory.studio.common.ui,
- org.apache.directory.studio.connection.core,
- org.apache.directory.studio.connection.ui,
- org.apache.logging.log4j;bundle-version="${org.apache.logging.log4j.version}",
- org.dom4j.dom4j;bundle-version="${org.dom4j.version}",
- org.eclipse.core.runtime,
- org.eclipse.core.expressions,
- org.eclipse.jface.text,
- org.eclipse.search,
- org.eclipse.ui,
- org.eclipse.ui.forms</Require-Bundle>
+ org.apache.commons.io;bundle-version="${org.apache.commons.io.version}",
+ org.apache.directory.shared.ldap;bundle-version="${org.apache.directory.shared.validversion}",
+ org.apache.directory.shared.ldap.schema.converter;bundle-version="${org.apache.directory.shared.validversion}",
+ org.apache.directory.studio.common.core,
+ org.apache.directory.studio.common.ui,
+ org.apache.directory.studio.connection.core,
+ org.apache.directory.studio.connection.ui,
+ org.apache.logging.log4j;bundle-version="${org.apache.logging.log4j.version}",
+ org.dom4j.dom4j;bundle-version="${org.dom4j.version}",
+ org.eclipse.core.runtime,
+ org.eclipse.core.expressions,
+ org.eclipse.jface.text,
+ org.eclipse.search,
+ org.eclipse.ui,
+ org.eclipse.ui.forms
+ </Require-Bundle>
<Embed-Dependency>*;scope=compile|runtime</Embed-Dependency>
<Embed-Directory>lib</Embed-Directory>
<Embed-StripGroup>true</Embed-StripGroup>
@@ -157,6 +159,11 @@
<scope>provided</scope>
</dependency>
<dependency>
+ <groupId>org.apache.directory.shared</groupId>
+ <artifactId>shared-ldap-schema-converter</artifactId>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
<groupId>org.apache.directory.studio</groupId>
<artifactId>org.apache.commons.io</artifactId>
<scope>provided</scope>
Modified: directory/studio/trunk/pom.xml
URL: http://svn.apache.org/viewvc/directory/studio/trunk/pom.xml?rev=1062500&r1=1062499&r2=1062500&view=diff
==============================================================================
--- directory/studio/trunk/pom.xml (original)
+++ directory/studio/trunk/pom.xml Sun Jan 23 19:11:12 2011
@@ -1392,12 +1392,17 @@
<artifactId>shared-ldap</artifactId>
<version>${org.apache.directory.shared.version}</version>
</dependency>
- <dependency>
- <groupId>org.apache.directory.shared</groupId>
- <artifactId>shared-ldap-schema</artifactId>
- <version>${org.apache.directory.shared.version}</version>
- </dependency>
-
+ <dependency>
+ <groupId>org.apache.directory.shared</groupId>
+ <artifactId>shared-ldap-schema</artifactId>
+ <version>${org.apache.directory.shared.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.directory.shared</groupId>
+ <artifactId>shared-ldap-schema-converter</artifactId>
+ <version>${org.apache.directory.shared.version}</version>
+ </dependency>
+
<!-- ApacheDS -->
<dependency>
<groupId>org.apache.directory.server</groupId>