directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From fel...@apache.org
Subject svn commit: r720815 - in /directory/studio/trunk/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/model/io: OpenLdapSchemaFileImporter.java ProjectsImporter.java XMLSchemaFileImporter.java
Date Wed, 26 Nov 2008 11:35:14 GMT
Author: felixk
Date: Wed Nov 26 03:35:11 2008
New Revision: 720815

URL: http://svn.apache.org/viewvc?rev=720815&view=rev
Log:
Formatting

Modified:
    directory/studio/trunk/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/model/io/OpenLdapSchemaFileImporter.java
    directory/studio/trunk/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/model/io/ProjectsImporter.java
    directory/studio/trunk/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/model/io/XMLSchemaFileImporter.java

Modified: directory/studio/trunk/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/model/io/OpenLdapSchemaFileImporter.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/model/io/OpenLdapSchemaFileImporter.java?rev=720815&r1=720814&r2=720815&view=diff
==============================================================================
--- directory/studio/trunk/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/model/io/OpenLdapSchemaFileImporter.java
(original)
+++ directory/studio/trunk/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/model/io/OpenLdapSchemaFileImporter.java
Wed Nov 26 03:35:11 2008
@@ -68,7 +68,8 @@
         }
         catch ( IOException e )
         {
-            throw new OpenLdapSchemaFileImportException( NLS.bind( Messages.getString("OpenLdapSchemaFileImporter.NotReadCorrectly"),
new String[]{ path}) ); //$NON-NLS-1$
+            throw new OpenLdapSchemaFileImportException( NLS.bind( Messages
+                .getString( "OpenLdapSchemaFileImporter.NotReadCorrectly" ), new String[]
{ path } ) ); //$NON-NLS-1$
         }
 
         try
@@ -77,15 +78,18 @@
         }
         catch ( IOException e )
         {
-            throw new OpenLdapSchemaFileImportException( NLS.bind( Messages.getString("OpenLdapSchemaFileImporter.NotReadCorrectly"),
new String[]{ path}) ); //$NON-NLS-1$
+            throw new OpenLdapSchemaFileImportException( NLS.bind( Messages
+                .getString( "OpenLdapSchemaFileImporter.NotReadCorrectly" ), new String[]
{ path } ) ); //$NON-NLS-1$
         }
         catch ( ParseException e )
         {
             ExceptionMessage exceptionMessage = parseExceptionMessage( e.getMessage() );
-            throw new OpenLdapSchemaFileImportException( NLS.bind( Messages.getString("OpenLdapSchemaFileImporter.NotReadCorrectlyBegin"),
new String[]{
-                path}) //$NON-NLS-1$
-                + ( exceptionMessage == null ? "" : NLS.bind( Messages.getString("OpenLdapSchemaFileImporter.ErrorMessage"),
new String[]{exceptionMessage.lineNumber,
-                    exceptionMessage.columnNumber,  exceptionMessage.cause}) ) ); //$NON-NLS-1$
+            throw new OpenLdapSchemaFileImportException( NLS.bind( Messages
+                .getString( "OpenLdapSchemaFileImporter.NotReadCorrectlyBegin" ), new String[]
+                { path } ) //$NON-NLS-1$
+                + ( exceptionMessage == null ? "" : NLS.bind( Messages
+                    .getString( "OpenLdapSchemaFileImporter.ErrorMessage" ), new String[]
+                    { exceptionMessage.lineNumber, exceptionMessage.columnNumber, exceptionMessage.cause
} ) ) ); //$NON-NLS-1$
         }
 
         String schemaName = getNameFromPath( path );

Modified: directory/studio/trunk/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/model/io/ProjectsImporter.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/model/io/ProjectsImporter.java?rev=720815&r1=720814&r2=720815&view=diff
==============================================================================
--- directory/studio/trunk/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/model/io/ProjectsImporter.java
(original)
+++ directory/studio/trunk/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/model/io/ProjectsImporter.java
Wed Nov 26 03:35:11 2008
@@ -81,13 +81,17 @@
         }
         catch ( DocumentException e )
         {
-            throw new ProjectsImportException( NLS.bind( Messages.getString("ProjectsImporter.NotReadCorrectly"),
new String[]{path}) );
+            throw new ProjectsImportException( NLS.bind( Messages.getString( "ProjectsImporter.NotReadCorrectly"
),
+                new String[]
+                    { path } ) );
         }
 
         Element rootElement = document.getRootElement();
         if ( !rootElement.getName().equals( PROJECT_TAG ) )
         {
-            throw new ProjectsImportException( NLS.bind( Messages.getString("ProjectsImporter.NotValidProject"),
new String[]{ path }) );
+            throw new ProjectsImportException( NLS.bind( Messages.getString( "ProjectsImporter.NotValidProject"
),
+                new String[]
+                    { path } ) );
         }
 
         readProject( rootElement, project, path );
@@ -120,14 +124,19 @@
         }
         catch ( DocumentException e )
         {
-        	PluginUtils.logError(NLS.bind( Messages.getString("ProjectsImporter.NotReadCorrectly"),
new String[]{path}) , e);
-            throw new ProjectsImportException(NLS.bind( Messages.getString("ProjectsImporter.NotReadCorrectly"),
new String[]{path}) );
+            PluginUtils.logError( NLS.bind( Messages.getString( "ProjectsImporter.NotReadCorrectly"
), new String[]
+                { path } ), e );
+            throw new ProjectsImportException( NLS.bind( Messages.getString( "ProjectsImporter.NotReadCorrectly"
),
+                new String[]
+                    { path } ) );
         }
 
         Element rootElement = document.getRootElement();
         if ( !rootElement.getName().equals( PROJECTS_TAG ) )
         {
-            throw new ProjectsImportException( NLS.bind( Messages.getString("ProjectsImporter.NotValidProject"),
new String[]{ path }) );
+            throw new ProjectsImportException( NLS.bind( Messages.getString( "ProjectsImporter.NotValidProject"
),
+                new String[]
+                    { path } ) );
         }
 
         for ( Iterator<?> i = rootElement.elementIterator( PROJECT_TAG ); i.hasNext();
)
@@ -173,7 +182,7 @@
             }
             catch ( IllegalArgumentException e )
             {
-                throw new ProjectsImportException( Messages.getString("ProjectsImporter.NotConvertableValue")
);
+                throw new ProjectsImportException( Messages.getString( "ProjectsImporter.NotConvertableValue"
) );
             }
         }
 
@@ -205,8 +214,9 @@
 
                 if ( schemaConnector == null )
                 {
-                    throw new ProjectsImportException( NLS.bind( Messages.getString("ProjectsImporter.NoSchemaConnectorIDFound"),
-                        new String[]{ schemaConnectorId})); //$NON-NLS-1$
+                    throw new ProjectsImportException( NLS.bind( Messages
+                        .getString( "ProjectsImporter.NoSchemaConnectorIDFound" ), new String[]
+                        { schemaConnectorId } ) ); //$NON-NLS-1$
                 }
 
                 project.setSchemaConnector( schemaConnector );
@@ -226,8 +236,7 @@
                     }
                     catch ( XMLSchemaFileImportException e )
                     {
-                        throw new ProjectsImportException(
-                            Messages.getString("ProjectsImporter.NotConvertableSchema") );
+                        throw new ProjectsImportException( Messages.getString( "ProjectsImporter.NotConvertableSchema"
) );
                     }
 
                     project.setSchemaBackup( Arrays.asList( schemas ) );
@@ -246,7 +255,7 @@
             }
             catch ( XMLSchemaFileImportException e )
             {
-                throw new ProjectsImportException( Messages.getString("ProjectsImporter.NotConvertableSchema")
);
+                throw new ProjectsImportException( Messages.getString( "ProjectsImporter.NotConvertableSchema"
) );
             }
             for ( Schema schema : schemas )
             {
@@ -278,7 +287,8 @@
      *      the type of the file
      * @throws ProjectsImportException
      */
-    public static ProjectFileType getProjectFileType( InputStream inputStream, String path
) throws ProjectsImportException
+    public static ProjectFileType getProjectFileType( InputStream inputStream, String path
)
+        throws ProjectsImportException
     {
         SAXReader reader = new SAXReader();
         Document document = null;
@@ -288,7 +298,9 @@
         }
         catch ( DocumentException e )
         {
-            throw new ProjectsImportException( NLS.bind( Messages.getString("ProjectsImporter.NotReadCorrectly"),
new String[]{path}) );
+            throw new ProjectsImportException( NLS.bind( Messages.getString( "ProjectsImporter.NotReadCorrectly"
),
+                new String[]
+                    { path } ) );
         }
 
         Element rootElement = document.getRootElement();
@@ -302,7 +314,9 @@
         }
         else
         {
-            throw new ProjectsImportException( NLS.bind( Messages.getString("ProjectsImporter.NotValidProject"),
new String[]{ path }) );
+            throw new ProjectsImportException( NLS.bind( Messages.getString( "ProjectsImporter.NotValidProject"
),
+                new String[]
+                    { path } ) );
         }
     }
 }

Modified: directory/studio/trunk/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/model/io/XMLSchemaFileImporter.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/model/io/XMLSchemaFileImporter.java?rev=720815&r1=720814&r2=720815&view=diff
==============================================================================
--- directory/studio/trunk/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/model/io/XMLSchemaFileImporter.java
(original)
+++ directory/studio/trunk/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/model/io/XMLSchemaFileImporter.java
Wed Nov 26 03:35:11 2008
@@ -98,7 +98,7 @@
      * @throws XMLSchemaFileImportException
      *      if an error occurs when importing the schema
      */
-    public static Schema[] getSchemas(InputStream inputStream, String path ) throws XMLSchemaFileImportException
+    public static Schema[] getSchemas( InputStream inputStream, String path ) throws XMLSchemaFileImportException
     {
         SAXReader reader = new SAXReader();
         Document document = null;
@@ -108,13 +108,15 @@
         }
         catch ( DocumentException e )
         {
-            throw new XMLSchemaFileImportException( NLS.bind( Messages.getString("XMLSchemaFileImporter.NotReadCorrectly"),
new String[]{ path}) ); //$NON-NLS-1$
+            throw new XMLSchemaFileImportException( NLS.bind( Messages
+                .getString( "XMLSchemaFileImporter.NotReadCorrectly" ), new String[] { path
} ) ); //$NON-NLS-1$
         }
 
         Element rootElement = document.getRootElement();
         if ( !rootElement.getName().equals( SCHEMAS_TAG ) )
         {
-            throw new XMLSchemaFileImportException( NLS.bind( Messages.getString("XMLSchemaFileImporter.NotValidSchema"),
new String[]{ path}) ); //$NON-NLS-1$
+            throw new XMLSchemaFileImportException( NLS.bind( Messages
+                .getString( "XMLSchemaFileImporter.NotValidSchema" ), new String[] { path
} ) ); //$NON-NLS-1$
         }
 
         return readSchemas( rootElement, path );
@@ -133,7 +135,7 @@
      * @throws XMLSchemaFileImportException
      *      if an error occurs when importing the schema
      */
-    public static Schema getSchema(InputStream inputStream, String path ) throws XMLSchemaFileImportException
+    public static Schema getSchema( InputStream inputStream, String path ) throws XMLSchemaFileImportException
     {
         SAXReader reader = new SAXReader();
         Document document = null;
@@ -143,7 +145,8 @@
         }
         catch ( DocumentException e )
         {
-            throw new XMLSchemaFileImportException( NLS.bind( Messages.getString("XMLSchemaFileImporter.NotReadCorrectly"),
new String[]{ path}) ); //$NON-NLS-1$
+            throw new XMLSchemaFileImportException( NLS.bind( Messages
+                .getString( "XMLSchemaFileImporter.NotReadCorrectly" ), new String[] { path
} ) ); //$NON-NLS-1$
         }
 
         Element rootElement = document.getRootElement();
@@ -170,7 +173,8 @@
 
         if ( !element.getName().equals( SCHEMAS_TAG ) )
         {
-            throw new XMLSchemaFileImportException(NLS.bind( Messages.getString("XMLSchemaFileImporter.NotValidSchema"),
new String[]{ path}) ); //$NON-NLS-1$
+            throw new XMLSchemaFileImportException( NLS.bind( Messages
+                .getString( "XMLSchemaFileImporter.NotValidSchema" ), new String[] { path
} ) ); //$NON-NLS-1$
         }
 
         for ( Iterator<?> i = element.elementIterator( SCHEMA_TAG ); i.hasNext(); )
@@ -235,7 +239,8 @@
     {
         if ( !element.getName().equals( SCHEMA_TAG ) )
         {
-            throw new XMLSchemaFileImportException( NLS.bind( Messages.getString("XMLSchemaFileImporter.NotValidSchema"),
new String[]{ path}) ); //$NON-NLS-1$
+            throw new XMLSchemaFileImportException( NLS.bind( Messages
+                .getString( "XMLSchemaFileImporter.NotValidSchema" ), new String[] { path
} ) ); //$NON-NLS-1$
         }
 
         Attribute nameAttribute = element.attribute( NAME_TAG );
@@ -314,8 +319,7 @@
         }
         else
         {
-            throw new XMLSchemaFileImportException(
-                Messages.getString("XMLSchemaFileImporter.NoOIDInAttribute") );
+            throw new XMLSchemaFileImportException( Messages.getString( "XMLSchemaFileImporter.NoOIDInAttribute"
) );
         }
 
         // Schema
@@ -361,8 +365,8 @@
             }
             catch ( IllegalArgumentException e )
             {
-                throw new XMLSchemaFileImportException(
-                    Messages.getString("XMLSchemaFileImporter.UnceonvertableAttribute") );
+                throw new XMLSchemaFileImportException( Messages
+                    .getString( "XMLSchemaFileImporter.UnceonvertableAttribute" ) );
             }
         }
 
@@ -383,8 +387,8 @@
             }
             catch ( NumberFormatException e )
             {
-                throw new XMLSchemaFileImportException(
-                    Messages.getString("XMLSchemaFileImporter.UnconvertableInteger") );
+                throw new XMLSchemaFileImportException( Messages
+                    .getString( "XMLSchemaFileImporter.UnconvertableInteger" ) );
             }
         }
 
@@ -485,7 +489,7 @@
         }
         else
         {
-            throw new XMLSchemaFileImportException( Messages.getString("XMLSchemaFileImporter.NoOIDInClass")
);
+            throw new XMLSchemaFileImportException( Messages.getString( "XMLSchemaFileImporter.NoOIDInClass"
) );
         }
 
         // Schema
@@ -540,8 +544,7 @@
             }
             catch ( IllegalArgumentException e )
             {
-                throw new XMLSchemaFileImportException(
-                    Messages.getString("XMLSchemaFileImporter.UnconvertableValue") ); //$NON-NLS-1$
+                throw new XMLSchemaFileImportException( Messages.getString( "XMLSchemaFileImporter.UnconvertableValue"
) ); //$NON-NLS-1$
             }
         }
 
@@ -632,7 +635,7 @@
         }
         else
         {
-            throw new XMLSchemaFileImportException( Messages.getString("XMLSchemaFileImporter.NoMatchingRuleForOID")
);
+            throw new XMLSchemaFileImportException( Messages.getString( "XMLSchemaFileImporter.NoMatchingRuleForOID"
) );
         }
 
         // Schema
@@ -723,7 +726,7 @@
         }
         else
         {
-            throw new XMLSchemaFileImportException( Messages.getString("XMLSchemaFileImporter.InvalidSyntaxForOID")
);
+            throw new XMLSchemaFileImportException( Messages.getString( "XMLSchemaFileImporter.InvalidSyntaxForOID"
) );
         }
 
         // Schema
@@ -793,7 +796,7 @@
         }
         else
         {
-            throw new XMLSchemaFileImportException( Messages.getString("XMLSchemaFileImporter.76")
); //$NON-NLS-1$
+            throw new XMLSchemaFileImportException( Messages.getString( "XMLSchemaFileImporter.76"
) ); //$NON-NLS-1$
         }
     }
 
@@ -818,7 +821,8 @@
      *      the type of the file
      * @throws XMLSchemaFileImportException
      */
-    public static SchemaFileType getSchemaFileType( InputStream inputStream, String path
) throws XMLSchemaFileImportException
+    public static SchemaFileType getSchemaFileType( InputStream inputStream, String path
)
+        throws XMLSchemaFileImportException
     {
         SAXReader reader = new SAXReader();
         Document document = null;
@@ -828,7 +832,8 @@
         }
         catch ( DocumentException e )
         {
-            throw new XMLSchemaFileImportException( NLS.bind( Messages.getString("XMLSchemaFileImporter.NotReadCorrectly"),
new String[]{ path}) ); //$NON-NLS-1$
+            throw new XMLSchemaFileImportException( NLS.bind( Messages
+                .getString( "XMLSchemaFileImporter.NotReadCorrectly" ), new String[] { path
} ) ); //$NON-NLS-1$
         }
 
         Element rootElement = document.getRootElement();
@@ -842,7 +847,8 @@
         }
         else
         {
-            throw new XMLSchemaFileImportException( NLS.bind( Messages.getString("XMLSchemaFileImporter.NotValidSchema"),
new String[]{ path}) ); //$NON-NLS-1$
+            throw new XMLSchemaFileImportException( NLS.bind( Messages
+                .getString( "XMLSchemaFileImporter.NotValidSchema" ), new String[] { path
} ) ); //$NON-NLS-1$
         }
     }
 }



Mime
View raw message