pdfbox-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gbaill...@apache.org
Subject svn commit: r1453416 [1/16] - in /pdfbox/trunk/preflight: ./ src/main/java/org/apache/pdfbox/preflight/ src/main/java/org/apache/pdfbox/preflight/action/ src/main/java/org/apache/pdfbox/preflight/annotation/ src/main/java/org/apache/pdfbox/preflight/an...
Date Wed, 06 Mar 2013 16:46:37 GMT
Author: gbailleul
Date: Wed Mar  6 16:46:35 2013
New Revision: 1453416

URL: http://svn.apache.org/r1453416
Log:
PDFBOX-1530: Reformat preflight sources with the new formater

Modified:
    pdfbox/trunk/preflight/pom.xml
    pdfbox/trunk/preflight/src/main/java/org/apache/pdfbox/preflight/Format.java
    pdfbox/trunk/preflight/src/main/java/org/apache/pdfbox/preflight/PreflightConfiguration.java
    pdfbox/trunk/preflight/src/main/java/org/apache/pdfbox/preflight/PreflightConstants.java
    pdfbox/trunk/preflight/src/main/java/org/apache/pdfbox/preflight/PreflightContext.java
    pdfbox/trunk/preflight/src/main/java/org/apache/pdfbox/preflight/PreflightDocument.java
    pdfbox/trunk/preflight/src/main/java/org/apache/pdfbox/preflight/PreflightPath.java
    pdfbox/trunk/preflight/src/main/java/org/apache/pdfbox/preflight/ValidationResult.java
    pdfbox/trunk/preflight/src/main/java/org/apache/pdfbox/preflight/Validator_A1b.java
    pdfbox/trunk/preflight/src/main/java/org/apache/pdfbox/preflight/action/AbstractActionManager.java
    pdfbox/trunk/preflight/src/main/java/org/apache/pdfbox/preflight/action/ActionManagerFactory.java
    pdfbox/trunk/preflight/src/main/java/org/apache/pdfbox/preflight/action/GoToAction.java
    pdfbox/trunk/preflight/src/main/java/org/apache/pdfbox/preflight/action/GoToRemoteAction.java
    pdfbox/trunk/preflight/src/main/java/org/apache/pdfbox/preflight/action/HideAction.java
    pdfbox/trunk/preflight/src/main/java/org/apache/pdfbox/preflight/action/InvalidAction.java
    pdfbox/trunk/preflight/src/main/java/org/apache/pdfbox/preflight/action/NamedAction.java
    pdfbox/trunk/preflight/src/main/java/org/apache/pdfbox/preflight/action/SubmitAction.java
    pdfbox/trunk/preflight/src/main/java/org/apache/pdfbox/preflight/action/ThreadAction.java
    pdfbox/trunk/preflight/src/main/java/org/apache/pdfbox/preflight/action/UndefAction.java
    pdfbox/trunk/preflight/src/main/java/org/apache/pdfbox/preflight/action/UriAction.java
    pdfbox/trunk/preflight/src/main/java/org/apache/pdfbox/preflight/annotation/AnnotationValidator.java
    pdfbox/trunk/preflight/src/main/java/org/apache/pdfbox/preflight/annotation/AnnotationValidatorFactory.java
    pdfbox/trunk/preflight/src/main/java/org/apache/pdfbox/preflight/annotation/FreeTextAnnotationValidator.java
    pdfbox/trunk/preflight/src/main/java/org/apache/pdfbox/preflight/annotation/InkAnnotationValdiator.java
    pdfbox/trunk/preflight/src/main/java/org/apache/pdfbox/preflight/annotation/LineAnnotationValidator.java
    pdfbox/trunk/preflight/src/main/java/org/apache/pdfbox/preflight/annotation/LinkAnnotationValidator.java
    pdfbox/trunk/preflight/src/main/java/org/apache/pdfbox/preflight/annotation/MarkupAnnotationValidator.java
    pdfbox/trunk/preflight/src/main/java/org/apache/pdfbox/preflight/annotation/PopupAnnotationValidator.java
    pdfbox/trunk/preflight/src/main/java/org/apache/pdfbox/preflight/annotation/PrintMarkAnnotationValidator.java
    pdfbox/trunk/preflight/src/main/java/org/apache/pdfbox/preflight/annotation/RubberStampAnnotationValidator.java
    pdfbox/trunk/preflight/src/main/java/org/apache/pdfbox/preflight/annotation/SquareCircleAnnotationValidator.java
    pdfbox/trunk/preflight/src/main/java/org/apache/pdfbox/preflight/annotation/TextAnnotationValidator.java
    pdfbox/trunk/preflight/src/main/java/org/apache/pdfbox/preflight/annotation/TrapNetAnnotationValidator.java
    pdfbox/trunk/preflight/src/main/java/org/apache/pdfbox/preflight/annotation/WidgetAnnotationValidator.java
    pdfbox/trunk/preflight/src/main/java/org/apache/pdfbox/preflight/annotation/pdfa/PDFAbAnnotationFactory.java
    pdfbox/trunk/preflight/src/main/java/org/apache/pdfbox/preflight/content/ContentStreamEngine.java
    pdfbox/trunk/preflight/src/main/java/org/apache/pdfbox/preflight/content/ContentStreamException.java
    pdfbox/trunk/preflight/src/main/java/org/apache/pdfbox/preflight/content/ContentStreamWrapper.java
    pdfbox/trunk/preflight/src/main/java/org/apache/pdfbox/preflight/content/StubOperator.java
    pdfbox/trunk/preflight/src/main/java/org/apache/pdfbox/preflight/exception/BodyParseException.java
    pdfbox/trunk/preflight/src/main/java/org/apache/pdfbox/preflight/exception/CrossRefParseException.java
    pdfbox/trunk/preflight/src/main/java/org/apache/pdfbox/preflight/exception/HeaderParseException.java
    pdfbox/trunk/preflight/src/main/java/org/apache/pdfbox/preflight/exception/MissingValidationProcessException.java
    pdfbox/trunk/preflight/src/main/java/org/apache/pdfbox/preflight/exception/PdfParseException.java
    pdfbox/trunk/preflight/src/main/java/org/apache/pdfbox/preflight/exception/SyntaxValidationException.java
    pdfbox/trunk/preflight/src/main/java/org/apache/pdfbox/preflight/exception/TrailerParseException.java
    pdfbox/trunk/preflight/src/main/java/org/apache/pdfbox/preflight/exception/ValidationException.java
    pdfbox/trunk/preflight/src/main/java/org/apache/pdfbox/preflight/font/CIDType0FontValidator.java
    pdfbox/trunk/preflight/src/main/java/org/apache/pdfbox/preflight/font/CIDType2FontValidator.java
    pdfbox/trunk/preflight/src/main/java/org/apache/pdfbox/preflight/font/DescendantFontValidator.java
    pdfbox/trunk/preflight/src/main/java/org/apache/pdfbox/preflight/font/FontValidator.java
    pdfbox/trunk/preflight/src/main/java/org/apache/pdfbox/preflight/font/SimpleFontValidator.java
    pdfbox/trunk/preflight/src/main/java/org/apache/pdfbox/preflight/font/TrueTypeFontValidator.java
    pdfbox/trunk/preflight/src/main/java/org/apache/pdfbox/preflight/font/Type0FontValidator.java
    pdfbox/trunk/preflight/src/main/java/org/apache/pdfbox/preflight/font/Type1FontValidator.java
    pdfbox/trunk/preflight/src/main/java/org/apache/pdfbox/preflight/font/Type3FontValidator.java
    pdfbox/trunk/preflight/src/main/java/org/apache/pdfbox/preflight/font/container/CIDType0Container.java
    pdfbox/trunk/preflight/src/main/java/org/apache/pdfbox/preflight/font/container/CIDType2Container.java
    pdfbox/trunk/preflight/src/main/java/org/apache/pdfbox/preflight/font/container/FontContainer.java
    pdfbox/trunk/preflight/src/main/java/org/apache/pdfbox/preflight/font/container/TrueTypeContainer.java
    pdfbox/trunk/preflight/src/main/java/org/apache/pdfbox/preflight/font/container/Type0Container.java
    pdfbox/trunk/preflight/src/main/java/org/apache/pdfbox/preflight/font/container/Type1Container.java
    pdfbox/trunk/preflight/src/main/java/org/apache/pdfbox/preflight/font/container/Type3Container.java
    pdfbox/trunk/preflight/src/main/java/org/apache/pdfbox/preflight/font/descriptor/CIDType0DescriptorHelper.java
    pdfbox/trunk/preflight/src/main/java/org/apache/pdfbox/preflight/font/descriptor/CIDType2DescriptorHelper.java
    pdfbox/trunk/preflight/src/main/java/org/apache/pdfbox/preflight/font/descriptor/FontDescriptorHelper.java
    pdfbox/trunk/preflight/src/main/java/org/apache/pdfbox/preflight/font/descriptor/TrueTypeDescriptorHelper.java
    pdfbox/trunk/preflight/src/main/java/org/apache/pdfbox/preflight/font/descriptor/Type1DescriptorHelper.java
    pdfbox/trunk/preflight/src/main/java/org/apache/pdfbox/preflight/font/util/CIDToGIDMap.java
    pdfbox/trunk/preflight/src/main/java/org/apache/pdfbox/preflight/font/util/FontMetaDataValidation.java
    pdfbox/trunk/preflight/src/main/java/org/apache/pdfbox/preflight/font/util/GlyphDescription.java
    pdfbox/trunk/preflight/src/main/java/org/apache/pdfbox/preflight/font/util/GlyphDetail.java
    pdfbox/trunk/preflight/src/main/java/org/apache/pdfbox/preflight/font/util/GlyphException.java
    pdfbox/trunk/preflight/src/main/java/org/apache/pdfbox/preflight/font/util/PDFAType3StreamParser.java
    pdfbox/trunk/preflight/src/main/java/org/apache/pdfbox/preflight/font/util/PeekInputStream.java
    pdfbox/trunk/preflight/src/main/java/org/apache/pdfbox/preflight/font/util/Type1.java
    pdfbox/trunk/preflight/src/main/java/org/apache/pdfbox/preflight/font/util/Type1Parser.java
    pdfbox/trunk/preflight/src/main/java/org/apache/pdfbox/preflight/graphic/ColorSpaceHelper.java
    pdfbox/trunk/preflight/src/main/java/org/apache/pdfbox/preflight/graphic/ColorSpaceHelperFactory.java
    pdfbox/trunk/preflight/src/main/java/org/apache/pdfbox/preflight/graphic/ColorSpaces.java
    pdfbox/trunk/preflight/src/main/java/org/apache/pdfbox/preflight/graphic/DeviceColorSpaceHelper.java
    pdfbox/trunk/preflight/src/main/java/org/apache/pdfbox/preflight/graphic/ICCProfileWrapper.java
    pdfbox/trunk/preflight/src/main/java/org/apache/pdfbox/preflight/graphic/NoPatternColorSpaceHelper.java
    pdfbox/trunk/preflight/src/main/java/org/apache/pdfbox/preflight/graphic/StandardColorSpaceHelper.java
    pdfbox/trunk/preflight/src/main/java/org/apache/pdfbox/preflight/metadata/PDFAIdentificationValidation.java
    pdfbox/trunk/preflight/src/main/java/org/apache/pdfbox/preflight/metadata/RDFAboutAttributeConcordanceValidation.java
    pdfbox/trunk/preflight/src/main/java/org/apache/pdfbox/preflight/metadata/SynchronizedMetaDataValidation.java
    pdfbox/trunk/preflight/src/main/java/org/apache/pdfbox/preflight/metadata/XpacketParsingException.java
    pdfbox/trunk/preflight/src/main/java/org/apache/pdfbox/preflight/parser/PreflightParser.java
    pdfbox/trunk/preflight/src/main/java/org/apache/pdfbox/preflight/process/AbstractProcess.java
    pdfbox/trunk/preflight/src/main/java/org/apache/pdfbox/preflight/process/AcroFormValidationProcess.java
    pdfbox/trunk/preflight/src/main/java/org/apache/pdfbox/preflight/process/BookmarkValidationProcess.java
    pdfbox/trunk/preflight/src/main/java/org/apache/pdfbox/preflight/process/CatalogValidationProcess.java
    pdfbox/trunk/preflight/src/main/java/org/apache/pdfbox/preflight/process/EmptyValidationProcess.java
    pdfbox/trunk/preflight/src/main/java/org/apache/pdfbox/preflight/process/FileSpecificationValidationProcess.java
    pdfbox/trunk/preflight/src/main/java/org/apache/pdfbox/preflight/process/MetadataValidationProcess.java
    pdfbox/trunk/preflight/src/main/java/org/apache/pdfbox/preflight/process/PageTreeValidationProcess.java
    pdfbox/trunk/preflight/src/main/java/org/apache/pdfbox/preflight/process/StreamValidationProcess.java
    pdfbox/trunk/preflight/src/main/java/org/apache/pdfbox/preflight/process/TrailerValidationProcess.java
    pdfbox/trunk/preflight/src/main/java/org/apache/pdfbox/preflight/process/ValidationProcess.java
    pdfbox/trunk/preflight/src/main/java/org/apache/pdfbox/preflight/process/XRefValidationProcess.java
    pdfbox/trunk/preflight/src/main/java/org/apache/pdfbox/preflight/process/reflect/ActionsValidationProcess.java
    pdfbox/trunk/preflight/src/main/java/org/apache/pdfbox/preflight/process/reflect/AnnotationValidationProcess.java
    pdfbox/trunk/preflight/src/main/java/org/apache/pdfbox/preflight/process/reflect/ExtGStateValidationProcess.java
    pdfbox/trunk/preflight/src/main/java/org/apache/pdfbox/preflight/process/reflect/FontValidationProcess.java
    pdfbox/trunk/preflight/src/main/java/org/apache/pdfbox/preflight/process/reflect/GraphicObjectPageValidationProcess.java
    pdfbox/trunk/preflight/src/main/java/org/apache/pdfbox/preflight/process/reflect/ResourcesValidationProcess.java
    pdfbox/trunk/preflight/src/main/java/org/apache/pdfbox/preflight/process/reflect/ShaddingPatternValidationProcess.java
    pdfbox/trunk/preflight/src/main/java/org/apache/pdfbox/preflight/process/reflect/SinglePageValidationProcess.java
    pdfbox/trunk/preflight/src/main/java/org/apache/pdfbox/preflight/process/reflect/TilingPatternValidationProcess.java
    pdfbox/trunk/preflight/src/main/java/org/apache/pdfbox/preflight/utils/ByteArrayDataSource.java
    pdfbox/trunk/preflight/src/main/java/org/apache/pdfbox/preflight/utils/COSUtils.java
    pdfbox/trunk/preflight/src/main/java/org/apache/pdfbox/preflight/utils/ContextHelper.java
    pdfbox/trunk/preflight/src/main/java/org/apache/pdfbox/preflight/utils/FilterHelper.java
    pdfbox/trunk/preflight/src/main/java/org/apache/pdfbox/preflight/utils/PdfElementParser.java
    pdfbox/trunk/preflight/src/main/java/org/apache/pdfbox/preflight/utils/RenderingIntents.java
    pdfbox/trunk/preflight/src/main/java/org/apache/pdfbox/preflight/xobject/AbstractXObjValidator.java
    pdfbox/trunk/preflight/src/main/java/org/apache/pdfbox/preflight/xobject/XObjFormValidator.java
    pdfbox/trunk/preflight/src/main/java/org/apache/pdfbox/preflight/xobject/XObjImageValidator.java
    pdfbox/trunk/preflight/src/main/java/org/apache/pdfbox/preflight/xobject/XObjPostscriptValidator.java
    pdfbox/trunk/preflight/src/main/java/org/apache/pdfbox/preflight/xobject/XObjectValidator.java
    pdfbox/trunk/preflight/src/test/java/org/apache/pdfbox/preflight/Benchmark.java
    pdfbox/trunk/preflight/src/test/java/org/apache/pdfbox/preflight/TestInvalidDirectory.java
    pdfbox/trunk/preflight/src/test/java/org/apache/pdfbox/preflight/TestIsartorValidationFromClasspath.java
    pdfbox/trunk/preflight/src/test/java/org/apache/pdfbox/preflight/TestPreflightPath.java
    pdfbox/trunk/preflight/src/test/java/org/apache/pdfbox/preflight/TestValidDirectory.java
    pdfbox/trunk/preflight/src/test/java/org/apache/pdfbox/preflight/action/pdfa1b/AbstractTestAction.java
    pdfbox/trunk/preflight/src/test/java/org/apache/pdfbox/preflight/action/pdfa1b/TestForbiddenAction.java
    pdfbox/trunk/preflight/src/test/java/org/apache/pdfbox/preflight/action/pdfa1b/TestGotoAction.java
    pdfbox/trunk/preflight/src/test/java/org/apache/pdfbox/preflight/action/pdfa1b/TestGotoRemoteAction.java
    pdfbox/trunk/preflight/src/test/java/org/apache/pdfbox/preflight/action/pdfa1b/TestHideAction.java
    pdfbox/trunk/preflight/src/test/java/org/apache/pdfbox/preflight/action/pdfa1b/TestNamedAction.java
    pdfbox/trunk/preflight/src/test/java/org/apache/pdfbox/preflight/action/pdfa1b/TestSubmitAction.java
    pdfbox/trunk/preflight/src/test/java/org/apache/pdfbox/preflight/action/pdfa1b/TestThreadAction.java
    pdfbox/trunk/preflight/src/test/java/org/apache/pdfbox/preflight/action/pdfa1b/TestUriAction.java
    pdfbox/trunk/preflight/src/test/java/org/apache/pdfbox/preflight/integration/AbstractInvalidFileTester.java
    pdfbox/trunk/preflight/src/test/java/org/apache/pdfbox/preflight/integration/TestInvalidFiles.java
    pdfbox/trunk/preflight/src/test/java/org/apache/pdfbox/preflight/integration/TestIsartorValidation.java
    pdfbox/trunk/preflight/src/test/java/org/apache/pdfbox/preflight/integration/TestValidFiles.java
    pdfbox/trunk/preflight/src/test/java/org/apache/pdfbox/preflight/metadata/TestSynchronizedMetadataValidation.java
    pdfbox/trunk/preflight/src/test/java/org/apache/pdfbox/preflight/parser/TestPreflightConfiguration.java
    pdfbox/trunk/preflight/src/test/java/org/apache/pdfbox/preflight/util/ByteArrayDataSource.java
    pdfbox/trunk/preflight/src/test/java/org/apache/pdfbox/preflight/util/IsartorPdfProvider.java
    pdfbox/trunk/preflight/src/test/java/org/apache/pdfbox/preflight/util/NOCatalogDocument.java
    pdfbox/trunk/preflight/src/test/java/org/apache/pdfbox/preflight/utils/TestCOSUtils.java

Modified: pdfbox/trunk/preflight/pom.xml
URL: http://svn.apache.org/viewvc/pdfbox/trunk/preflight/pom.xml?rev=1453416&r1=1453415&r2=1453416&view=diff
==============================================================================
--- pdfbox/trunk/preflight/pom.xml (original)
+++ pdfbox/trunk/preflight/pom.xml Wed Mar  6 16:46:35 2013
@@ -1,331 +1,326 @@
 <?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">
+<!-- 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>
-  <artifactId>preflight</artifactId>
+	<modelVersion>4.0.0</modelVersion>
+	<artifactId>preflight</artifactId>
 
-  <name>Apache Preflight</name>
-  <description>
+	<name>Apache Preflight</name>
+	<description>
       The Apache Preflight library is an open source Java tool that implements 
       a parser compliant with the ISO-19005 (PDF/A) specification. Preflight is a 
       subproject of Apache PDFBox.
   </description>
 
-  <packaging>bundle</packaging>
- 
-  <parent>
-    <groupId>org.apache.pdfbox</groupId>
-    <artifactId>pdfbox-parent</artifactId>
-    <version>1.8.0-SNAPSHOT</version>
-    <relativePath>../parent/pom.xml</relativePath>
-  </parent>
-
-  <properties>
-    <compileSource>1.5</compileSource>
-  </properties>
-
-  <build>
-    <plugins>
-      <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-surefire-plugin</artifactId>
-        <version>2.9</version>
-        <configuration>
-          <skip>true</skip>
-        </configuration>
-        <executions>
-          <execution>
-            <id>surefire-test</id>
-            <phase>test</phase>
-            <goals>
-              <goal>test</goal>
-            </goals>
-            <configuration>
-              <skip>false</skip>
-              <excludes>
-                <exclude>**/integration/**</exclude>
-              </excludes>
-            </configuration>
-          </execution>
-          <execution>
-            <id>surefire-itest</id>
-            <phase>integration-test</phase>
-            <goals>
-              <goal>test</goal>
-            </goals>
-            <configuration>
-              <skip>${skipITs}</skip>
-              <includes>
-                <include>**/integration/*</include>
-              </includes>
-              <systemPropertyVariables>
-                <isartor.files>${isartor.files}</isartor.files>
-                <isartor.errors>${isartor.errors}</isartor.errors>
-                <invalid.files>${invalid.files}</invalid.files>
-                <invalid.errors>${invalid.errors}</invalid.errors>
-                <valid.files>${valid.files}</valid.files>
-              </systemPropertyVariables>
-            </configuration>
-          </execution>
-        </executions>
-      </plugin>
-      <plugin>
-        <groupId>org.apache.felix</groupId>
-        <artifactId>maven-bundle-plugin</artifactId>
-        <extensions>true</extensions>
-        <configuration>
-          <instructions>
-            <!--
-            <Export-Package>org.apache.padaf.preflight.javacc|org.apache.padaf.preflight.javacc.*</Export-Package>
-            TODO The above seems wrong, but the default should probably be refined.
-            -->
-          </instructions>
-        </configuration>
-      </plugin>
-      <plugin>
-        <artifactId>maven-assembly-plugin</artifactId>
-        <version>2.2-beta-5</version>
-        <configuration>
-          <descriptorRefs>
-            <descriptorRef>jar-with-dependencies</descriptorRef>
-          </descriptorRefs>
-          <archive>
-          <manifest>
-            <mainClass>org.apache.pdfbox.preflight.Validator_A1b</mainClass>
-          </manifest>
-          </archive>
-        </configuration>
-        <executions>
-          <execution>
-            <phase>package</phase>
-            <goals>
-              <goal>single</goal>
-            </goals>
-          </execution>
-        </executions>
-      </plugin>
-      <plugin>
-        <groupId>org.codehaus.mojo</groupId>
-        <artifactId>javacc-maven-plugin</artifactId>
-        <version>2.6</version>
-        <executions>
-          <execution>
-            <id>javacc</id>
-            <goals>
-              <goal>javacc</goal>
-            </goals>
-            <configuration />
-          </execution>
-        </executions>
-      </plugin>
-      <plugin>
-        <groupId>org.codehaus.mojo</groupId>
-        <artifactId>cobertura-maven-plugin</artifactId>
-        <version>2.3</version>
-        <configuration>
-          <instrumentation>
-            <ignores>
-              <ignore>org.apache.pdfbox.preflight.javacc.*</ignore>
-              <ignore>org.apache.pdfbox.preflight.javacc.extractor.*</ignore>
-            </ignores>
-            <excludes>
-              <exclude>org/apache/pdfbox/preflight/javacc/**/*.class</exclude>
-            </excludes>
-          </instrumentation>
-        </configuration>
-        <executions>
-          <execution>
-            <goals>
-              <goal>clean</goal>
-            </goals>
-          </execution>
-        </executions>
-      </plugin>
-      <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-checkstyle-plugin</artifactId>
-        <version>2.2</version>
-        <configuration>
-          <configLocation>edoc-checkstyle.xml</configLocation>
-        </configuration>
-      </plugin>
-      <plugin>
-        <artifactId>maven-source-plugin</artifactId>
-        <version>2.1.1</version>
-        <configuration>
-          <attach>true</attach>
-        </configuration>
-        <executions>
-          <execution>
-            <id>attach-sources</id>
-            <phase>verify</phase>
-            <goals>
-              <goal>jar-no-fork</goal>
-            </goals>
-          </execution>
-        </executions>
-      </plugin>
-      <plugin>
-        <groupId>org.apache.rat</groupId>
-        <artifactId>apache-rat-plugin</artifactId>
-        <configuration>
-          <excludes>
-            <exclude>src/test/resources/org/apache/padaf/preflight/font/*.font</exclude>
-            <exclude>src/main/resources/project.version</exclude>
-            <exclude>release.properties</exclude>
-          </excludes>
-        </configuration>
-      </plugin>
-    </plugins>
-  </build>
-
-  <dependencies>
-    <dependency>
-      <groupId>commons-io</groupId>
-      <artifactId>commons-io</artifactId>
-      <version>1.4</version>
-      <scope>compile</scope>
-    </dependency>
-    <dependency>
-      <groupId>${project.groupId}</groupId>
-      <artifactId>pdfbox</artifactId>
-      <version>${project.version}</version>
-    </dependency>
-    <dependency>
-      <groupId>${project.groupId}</groupId>
-      <artifactId>xmpbox</artifactId>
-      <version>${project.version}</version>
-    </dependency>
-    <!-- TODO add or automatic ? -->
-    <dependency>
-      <groupId>junit</groupId>
-      <artifactId>junit</artifactId>
-      <version>4.8.1</version>
-      <scope>test</scope>
-    </dependency>
-    <dependency>
-      <groupId>log4j</groupId>
-      <artifactId>log4j</artifactId>
-      <version>1.2.12</version>
-      <scope>compile</scope>
-    </dependency>
-  <!-- TODO find a suitable place to store the isator test pdfs
-    <dependency>
-      <groupId>org.pdfa</groupId>
-      <artifactId>isartor</artifactId>
-      <version>1.0-20080813</version>
-        <scope>test</scope>
-    </dependency>
-  -->
-      <dependency>
-      <groupId>org.bouncycastle</groupId>
-      <artifactId>bcmail-jdk15</artifactId>
-      <version>1.44</version>
-      <optional>true</optional>
-    </dependency>
-    <dependency>
-      <groupId>org.bouncycastle</groupId>
-      <artifactId>bcprov-jdk15</artifactId>
-      <version>1.44</version>
-      <optional>true</optional>
-    </dependency>
-    <dependency>
-      <groupId>javax.activation</groupId>
-      <artifactId>activation</artifactId>
-      <version>1.1.1</version>
-      <type>jar</type>
-      <scope>compile</scope>
-    </dependency>
-    
-  </dependencies>
-
-  <reporting>
-    <plugins>
-      <plugin>
-        <groupId>org.codehaus.mojo</groupId>
-        <artifactId>taglist-maven-plugin</artifactId>
-        <version>2.4</version>
-        <configuration>
-          <encoding>UTF-8</encoding>
-          <sourceFileLocale>en</sourceFileLocale>
-          <emptyComments>false</emptyComments>
-          <tagListOptions>
-            <tagClasses>
-              <tagClass>
-                <displayName>TODO List</displayName>
-                <tags>
-                  <tag>
-                    <matchString>TODO</matchString>
-                    <matchType>exact</matchType>
-                  </tag>
-                  <tag>
-                    <matchString>FIXME</matchString>
-                    <matchType>exact</matchType>
-                  </tag>
-                </tags>
-              </tagClass>
-            </tagClasses>
-          </tagListOptions>
-        </configuration>
-      </plugin>
-
-      <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-checkstyle-plugin</artifactId>
-        <version>2.2</version>
-        <configuration>
-          <configLocation>edoc-checkstyle.xml</configLocation>
-        </configuration>
-      </plugin>
-
-      <plugin>
-        <groupId>org.codehaus.mojo</groupId>
-        <artifactId>cobertura-maven-plugin</artifactId>
-        <version>2.3</version>
-      </plugin>
-
-      <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-surefire-report-plugin</artifactId>
-        <version>2.6</version>
-        <configuration>
-          <showSuccess>true</showSuccess>
-          <aggregate>true</aggregate>
-          <outputDirectory>${project.reporting.outputDirectory}/surefire-report</outputDirectory>
-        </configuration>
-        <reportSets>
-          <reportSet>
-            <id />
-          </reportSet>
-        </reportSets>
-      </plugin>
-
-      <plugin>
-        <groupId>org.codehaus.mojo</groupId>
-        <artifactId>findbugs-maven-plugin</artifactId>
-        <version>2.0.1</version>
-        <configuration>
-          <excludeFilterFile>findbugs-exclude.xml</excludeFilterFile>
-        </configuration>
-      </plugin>
-    </plugins>
-  </reporting>
+	<packaging>bundle</packaging>
+
+	<parent>
+		<groupId>org.apache.pdfbox</groupId>
+		<artifactId>pdfbox-parent</artifactId>
+		<version>1.8.0-SNAPSHOT</version>
+		<relativePath>../parent/pom.xml</relativePath>
+	</parent>
+
+	<properties>
+		<compileSource>1.5</compileSource>
+	</properties>
+
+	<build>
+		<plugins>
+			<plugin>
+				<groupId>org.apache.maven.plugins</groupId>
+				<artifactId>maven-surefire-plugin</artifactId>
+				<version>2.9</version>
+				<configuration>
+					<skip>true</skip>
+				</configuration>
+				<executions>
+					<execution>
+						<id>surefire-test</id>
+						<phase>test</phase>
+						<goals>
+							<goal>test</goal>
+						</goals>
+						<configuration>
+							<skip>false</skip>
+							<excludes>
+								<exclude>**/integration/**</exclude>
+							</excludes>
+						</configuration>
+					</execution>
+					<execution>
+						<id>surefire-itest</id>
+						<phase>integration-test</phase>
+						<goals>
+							<goal>test</goal>
+						</goals>
+						<configuration>
+							<skip>${skipITs}</skip>
+							<includes>
+								<include>**/integration/*</include>
+							</includes>
+							<systemPropertyVariables>
+								<isartor.files>${isartor.files}</isartor.files>
+								<isartor.errors>${isartor.errors}</isartor.errors>
+								<invalid.files>${invalid.files}</invalid.files>
+								<invalid.errors>${invalid.errors}</invalid.errors>
+								<valid.files>${valid.files}</valid.files>
+							</systemPropertyVariables>
+						</configuration>
+					</execution>
+				</executions>
+			</plugin>
+			<plugin>
+				<groupId>org.apache.felix</groupId>
+				<artifactId>maven-bundle-plugin</artifactId>
+				<extensions>true</extensions>
+				<configuration>
+					<instructions>
+						<!-- <Export-Package>org.apache.padaf.preflight.javacc|org.apache.padaf.preflight.javacc.*</Export-Package> 
+							TODO The above seems wrong, but the default should probably be refined. -->
+					</instructions>
+				</configuration>
+			</plugin>
+			<plugin>
+				<artifactId>maven-assembly-plugin</artifactId>
+				<version>2.2-beta-5</version>
+				<configuration>
+					<descriptorRefs>
+						<descriptorRef>jar-with-dependencies</descriptorRef>
+					</descriptorRefs>
+					<archive>
+						<manifest>
+							<mainClass>org.apache.pdfbox.preflight.Validator_A1b</mainClass>
+						</manifest>
+					</archive>
+				</configuration>
+				<executions>
+					<execution>
+						<phase>package</phase>
+						<goals>
+							<goal>single</goal>
+						</goals>
+					</execution>
+				</executions>
+			</plugin>
+			<plugin>
+				<groupId>org.codehaus.mojo</groupId>
+				<artifactId>javacc-maven-plugin</artifactId>
+				<version>2.6</version>
+				<executions>
+					<execution>
+						<id>javacc</id>
+						<goals>
+							<goal>javacc</goal>
+						</goals>
+						<configuration />
+					</execution>
+				</executions>
+			</plugin>
+			<plugin>
+				<groupId>org.codehaus.mojo</groupId>
+				<artifactId>cobertura-maven-plugin</artifactId>
+				<version>2.3</version>
+				<configuration>
+					<instrumentation>
+						<ignores>
+							<ignore>org.apache.pdfbox.preflight.javacc.*</ignore>
+							<ignore>org.apache.pdfbox.preflight.javacc.extractor.*</ignore>
+						</ignores>
+						<excludes>
+							<exclude>org/apache/pdfbox/preflight/javacc/**/*.class</exclude>
+						</excludes>
+					</instrumentation>
+				</configuration>
+				<executions>
+					<execution>
+						<goals>
+							<goal>clean</goal>
+						</goals>
+					</execution>
+				</executions>
+			</plugin>
+			<plugin>
+				<groupId>org.apache.maven.plugins</groupId>
+				<artifactId>maven-checkstyle-plugin</artifactId>
+				<version>2.2</version>
+				<configuration>
+					<configLocation>edoc-checkstyle.xml</configLocation>
+				</configuration>
+			</plugin>
+			<plugin>
+				<artifactId>maven-source-plugin</artifactId>
+				<version>2.1.1</version>
+				<configuration>
+					<attach>true</attach>
+				</configuration>
+				<executions>
+					<execution>
+						<id>attach-sources</id>
+						<phase>verify</phase>
+						<goals>
+							<goal>jar-no-fork</goal>
+						</goals>
+					</execution>
+				</executions>
+			</plugin>
+			<plugin>
+				<groupId>org.apache.rat</groupId>
+				<artifactId>apache-rat-plugin</artifactId>
+				<configuration>
+					<excludes>
+						<exclude>src/test/resources/org/apache/padaf/preflight/font/*.font</exclude>
+						<exclude>src/main/resources/project.version</exclude>
+						<exclude>release.properties</exclude>
+					</excludes>
+				</configuration>
+			</plugin>
+			<plugin>
+				<groupId>org.apache.maven.plugins</groupId>
+				<artifactId>maven-checkstyle-plugin</artifactId>
+				<version>2.10</version>
+				<configuration>
+					<configLocation>../pdfbox-checkstyle-5.xml</configLocation>
+				</configuration>
+			</plugin>
+
+		</plugins>
+	</build>
+
+	<dependencies>
+		<dependency>
+			<groupId>commons-io</groupId>
+			<artifactId>commons-io</artifactId>
+			<version>1.4</version>
+			<scope>compile</scope>
+		</dependency>
+		<dependency>
+			<groupId>${project.groupId}</groupId>
+			<artifactId>pdfbox</artifactId>
+			<version>${project.version}</version>
+		</dependency>
+		<dependency>
+			<groupId>${project.groupId}</groupId>
+			<artifactId>xmpbox</artifactId>
+			<version>${project.version}</version>
+		</dependency>
+		<!-- TODO add or automatic ? -->
+		<dependency>
+			<groupId>junit</groupId>
+			<artifactId>junit</artifactId>
+			<version>4.8.1</version>
+			<scope>test</scope>
+		</dependency>
+		<dependency>
+			<groupId>log4j</groupId>
+			<artifactId>log4j</artifactId>
+			<version>1.2.12</version>
+			<scope>compile</scope>
+		</dependency>
+		<!-- TODO find a suitable place to store the isator test pdfs <dependency> 
+			<groupId>org.pdfa</groupId> <artifactId>isartor</artifactId> <version>1.0-20080813</version> 
+			<scope>test</scope> </dependency> -->
+		<dependency>
+			<groupId>org.bouncycastle</groupId>
+			<artifactId>bcmail-jdk15</artifactId>
+			<version>1.44</version>
+			<optional>true</optional>
+		</dependency>
+		<dependency>
+			<groupId>org.bouncycastle</groupId>
+			<artifactId>bcprov-jdk15</artifactId>
+			<version>1.44</version>
+			<optional>true</optional>
+		</dependency>
+		<dependency>
+			<groupId>javax.activation</groupId>
+			<artifactId>activation</artifactId>
+			<version>1.1.1</version>
+			<type>jar</type>
+			<scope>compile</scope>
+		</dependency>
+
+	</dependencies>
+
+	<reporting>
+		<plugins>
+			<plugin>
+				<groupId>org.codehaus.mojo</groupId>
+				<artifactId>taglist-maven-plugin</artifactId>
+				<version>2.4</version>
+				<configuration>
+					<encoding>UTF-8</encoding>
+					<sourceFileLocale>en</sourceFileLocale>
+					<emptyComments>false</emptyComments>
+					<tagListOptions>
+						<tagClasses>
+							<tagClass>
+								<displayName>TODO List</displayName>
+								<tags>
+									<tag>
+										<matchString>TODO</matchString>
+										<matchType>exact</matchType>
+									</tag>
+									<tag>
+										<matchString>FIXME</matchString>
+										<matchType>exact</matchType>
+									</tag>
+								</tags>
+							</tagClass>
+						</tagClasses>
+					</tagListOptions>
+				</configuration>
+			</plugin>
+
+			<plugin>
+				<groupId>org.apache.maven.plugins</groupId>
+				<artifactId>maven-checkstyle-plugin</artifactId>
+				<version>2.2</version>
+				<configuration>
+					<configLocation>edoc-checkstyle.xml</configLocation>
+				</configuration>
+			</plugin>
+
+			<plugin>
+				<groupId>org.codehaus.mojo</groupId>
+				<artifactId>cobertura-maven-plugin</artifactId>
+				<version>2.3</version>
+			</plugin>
+
+			<plugin>
+				<groupId>org.apache.maven.plugins</groupId>
+				<artifactId>maven-surefire-report-plugin</artifactId>
+				<version>2.6</version>
+				<configuration>
+					<showSuccess>true</showSuccess>
+					<aggregate>true</aggregate>
+					<outputDirectory>${project.reporting.outputDirectory}/surefire-report</outputDirectory>
+				</configuration>
+				<reportSets>
+					<reportSet>
+						<id />
+					</reportSet>
+				</reportSets>
+			</plugin>
+
+			<plugin>
+				<groupId>org.codehaus.mojo</groupId>
+				<artifactId>findbugs-maven-plugin</artifactId>
+				<version>2.0.1</version>
+				<configuration>
+					<excludeFilterFile>findbugs-exclude.xml</excludeFilterFile>
+				</configuration>
+			</plugin>
+		</plugins>
+	</reporting>
 </project>

Modified: pdfbox/trunk/preflight/src/main/java/org/apache/pdfbox/preflight/Format.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/preflight/src/main/java/org/apache/pdfbox/preflight/Format.java?rev=1453416&r1=1453415&r2=1453416&view=diff
==============================================================================
--- pdfbox/trunk/preflight/src/main/java/org/apache/pdfbox/preflight/Format.java (original)
+++ pdfbox/trunk/preflight/src/main/java/org/apache/pdfbox/preflight/Format.java Wed Mar  6 16:46:35 2013
@@ -21,18 +21,20 @@
 
 package org.apache.pdfbox.preflight;
 
-public enum Format {
-	PDF_A1B("PDF/A1-b"),
-	PDF_A1A("PDF/A1-a");
-	
-	private final String fname;
-	
-	private Format(String name) {
-		this.fname = name;
-	}
-
-	public String getFname() {
-		return fname;
-	}
-	
+public enum Format
+{
+    PDF_A1B("PDF/A1-b"), PDF_A1A("PDF/A1-a");
+
+    private final String fname;
+
+    private Format(String name)
+    {
+        this.fname = name;
+    }
+
+    public String getFname()
+    {
+        return fname;
+    }
+
 }

Modified: pdfbox/trunk/preflight/src/main/java/org/apache/pdfbox/preflight/PreflightConfiguration.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/preflight/src/main/java/org/apache/pdfbox/preflight/PreflightConfiguration.java?rev=1453416&r1=1453415&r2=1453416&view=diff
==============================================================================
--- pdfbox/trunk/preflight/src/main/java/org/apache/pdfbox/preflight/PreflightConfiguration.java (original)
+++ pdfbox/trunk/preflight/src/main/java/org/apache/pdfbox/preflight/PreflightConfiguration.java Wed Mar  6 16:46:35 2013
@@ -52,178 +52,208 @@ import org.apache.pdfbox.preflight.proce
 import org.apache.pdfbox.preflight.process.reflect.SinglePageValidationProcess;
 import org.apache.pdfbox.preflight.process.reflect.TilingPatternValidationProcess;
 
-public class PreflightConfiguration {
+public class PreflightConfiguration
+{
 
-	// TODO documentation
-	public static final String CATALOG_PROCESS = "catalog-process";
-	public static final String STREAM_PROCESS = "stream-process";
-	public static final String TRAILER_PROCESS = "trailer-process";
-	public static final String XREF_PROCESS = "xref-process";
-	public static final String BOOKMARK_PROCESS = "bookmark-process";
-	public static final String ACRO_FORM_PROCESS = "acro-form-process"; // MayBe rename in Interactive Object validation
-	public static final String FILE_SPECIF_PROCESS = "file-specification-process";
-	public static final String PAGES_TREE_PROCESS = "pages-tree-process";
-
-	public static final String META_DATA_PROCESS = "metadata-process";
-
-	public static final String PAGE_PROCESS = "page-process";
-	public static final String RESOURCES_PROCESS = "resources-process";
-	public static final String ACTIONS_PROCESS = "actions-process";
-	public static final String ANNOTATIONS_PROCESS = "annotations-process";
-	public static final String GRAPHIC_PROCESS = "graphic-process";
-	public static final String FONT_PROCESS = "font-process";
-	public static final String EXTGSTATE_PROCESS = "extgstate-process";
-	public static final String SHADDING_PATTERN_PROCESS = "shadding-pattern-process";
-	public static final String TILING_PATTERN_PROCESS = "tiling-pattern-process";
-
-	/* TODO other configuration option should be possible :
-	 * - skip some validation process ?
-	 * - ???
-	 */
-
-	/**
-	 * Boolean to know if an exception must be thrown if a ValidationProcess is missing.
-	 */
-	private boolean errorOnMissingProcess = true;
-
-	/**
-	 * Boolean to know mark some error as a Warning, if the validation result contains only warning
-	 * the validation is successful 
-	 */
-	private boolean lazyValidation = false;
-
-	private Map<String, Class<? extends ValidationProcess>> processes = new HashMap<String, Class<? extends ValidationProcess>>();
-	// TODO use annotation to mark these validation processes as inner page validation and factorize the access method
-	private Map<String, Class<? extends ValidationProcess>> innerProcesses = new HashMap<String, Class<? extends ValidationProcess>>();
-
-	/**
-	 * Define the AnnotationFactory used by ValidationProcess
-	 */
-	private AnnotationValidatorFactory annotFact;
-
-	/**
-	 * Define the ActionManagerFactory used by ValidationProcess
-	 */
-	private ActionManagerFactory actionFact;
-
-	/**
-	 * Define the ColorSpaceHelperFactory used by the validationProcess.
-	 */
-	private ColorSpaceHelperFactory colorSpaceHelperFact;
-
-	public static PreflightConfiguration createPdfA1BConfiguration() {
-		PreflightConfiguration configuration = new PreflightConfiguration();
-
-		configuration.replaceProcess(CATALOG_PROCESS, CatalogValidationProcess.class);
-		configuration.replaceProcess(FILE_SPECIF_PROCESS, FileSpecificationValidationProcess.class);
-		configuration.replaceProcess(TRAILER_PROCESS, TrailerValidationProcess.class);
-		configuration.replaceProcess(XREF_PROCESS, XRefValidationProcess.class);
-		configuration.replaceProcess(ACRO_FORM_PROCESS, AcroFormValidationProcess.class);
-		configuration.replaceProcess(BOOKMARK_PROCESS, BookmarkValidationProcess.class);
-		configuration.replaceProcess(PAGES_TREE_PROCESS, PageTreeValidationProcess.class);
-		configuration.replaceProcess(META_DATA_PROCESS, MetadataValidationProcess.class);
-
-		configuration.replaceProcess(STREAM_PROCESS, StreamValidationProcess.class);
-
-		configuration.replacePageProcess(PAGE_PROCESS, SinglePageValidationProcess.class);
-		configuration.replacePageProcess(EXTGSTATE_PROCESS, ExtGStateValidationProcess.class);
-		configuration.replacePageProcess(SHADDING_PATTERN_PROCESS, ShaddingPatternValidationProcess.class);
-		configuration.replacePageProcess(GRAPHIC_PROCESS, GraphicObjectPageValidationProcess.class);
-		configuration.replacePageProcess(TILING_PATTERN_PROCESS, TilingPatternValidationProcess.class);
-		configuration.replacePageProcess(RESOURCES_PROCESS, ResourcesValidationProcess.class);
-		configuration.replacePageProcess(FONT_PROCESS, FontValidationProcess.class);
-		configuration.replacePageProcess(ACTIONS_PROCESS, ActionsValidationProcess.class);
-		configuration.replacePageProcess(ANNOTATIONS_PROCESS, AnnotationValidationProcess.class);
-
-		configuration.actionFact = new ActionManagerFactory();
-		configuration.annotFact = new PDFAbAnnotationFactory();
-		configuration.colorSpaceHelperFact = new ColorSpaceHelperFactory();
-		return configuration;
-	}
-
-	public Collection<String> getProcessNames() {
-		return this.processes.keySet();
-	}
-
-	/**
-	 * Return the validation process linked with the given name
-	 * @param processName 
-	 * @return an instance of validationProcess, null if it doesn't exist and if the errorOnMissingProcess is false
-	 * @throws MissingValidationProcessException if the Process doesn't exist (errorOnMissingProcess is true)
-	 */
-	public ValidationProcess getInstanceOfProcess(String processName) 
-	throws MissingValidationProcessException, ValidationException {
-		Class<? extends ValidationProcess> clazz = null;
-		if (processes.containsKey(processName)) {
-			clazz = processes.get(processName);
-		} else if (innerProcesses.containsKey(processName)) {
-			clazz = innerProcesses.get(processName);
-		} else if (errorOnMissingProcess) {
-			throw new MissingValidationProcessException(processName);
-		} else {
-			return new EmptyValidationProcess();
-		}
-
-		try {
-			return clazz.newInstance();	
-		} catch (InstantiationException e) {
-			throw new ValidationException(processName + " can't be created", e);
-		} catch (IllegalAccessException e) {
-			throw new ValidationException(processName + " can't be created", e);
-		}	
-
-	}
-
-	public void replaceProcess(String processName, Class<? extends ValidationProcess> process) {
-		this.processes.put(processName, process);
-	}
-
-	public Collection<String> getPageValidationProcessNames() {
-		return this.innerProcesses.keySet();
-	}
-
-	public void replacePageProcess(String processName, Class<? extends ValidationProcess> process) {
-		this.innerProcesses.put(processName, process);
-	}
-
-	public boolean isErrorOnMissingProcess() {
-		return errorOnMissingProcess;
-	}
-
-	public void setErrorOnMissingProcess(boolean errorOnMissingProcess) {
-		this.errorOnMissingProcess = errorOnMissingProcess;
-	}
-
-	public boolean isLazyValidation() {
-		return lazyValidation;
-	}
-
-	public void setLazyValidation(boolean lazyValidation) {
-		this.lazyValidation = lazyValidation;
-	}
-
-	public AnnotationValidatorFactory getAnnotFact() {
-		return annotFact;
-	}
-
-	public void setAnnotFact(AnnotationValidatorFactory annotFact) {
-		this.annotFact = annotFact;
-	}
-
-	public ActionManagerFactory getActionFact() {
-		return actionFact;
-	}
-
-	public void setActionFact(ActionManagerFactory actionFact) {
-		this.actionFact = actionFact;
-	}
-
-	public ColorSpaceHelperFactory getColorSpaceHelperFact() {
-		return colorSpaceHelperFact;
-	}
-
-	public void setColorSpaceHelperFact(ColorSpaceHelperFactory colorSpaceHelperFact) {
-		this.colorSpaceHelperFact = colorSpaceHelperFact;
-	}
+    // TODO documentation
+    public static final String CATALOG_PROCESS = "catalog-process";
+    public static final String STREAM_PROCESS = "stream-process";
+    public static final String TRAILER_PROCESS = "trailer-process";
+    public static final String XREF_PROCESS = "xref-process";
+    public static final String BOOKMARK_PROCESS = "bookmark-process";
+    public static final String ACRO_FORM_PROCESS = "acro-form-process"; // MayBe rename in Interactive Object validation
+    public static final String FILE_SPECIF_PROCESS = "file-specification-process";
+    public static final String PAGES_TREE_PROCESS = "pages-tree-process";
+
+    public static final String META_DATA_PROCESS = "metadata-process";
+
+    public static final String PAGE_PROCESS = "page-process";
+    public static final String RESOURCES_PROCESS = "resources-process";
+    public static final String ACTIONS_PROCESS = "actions-process";
+    public static final String ANNOTATIONS_PROCESS = "annotations-process";
+    public static final String GRAPHIC_PROCESS = "graphic-process";
+    public static final String FONT_PROCESS = "font-process";
+    public static final String EXTGSTATE_PROCESS = "extgstate-process";
+    public static final String SHADDING_PATTERN_PROCESS = "shadding-pattern-process";
+    public static final String TILING_PATTERN_PROCESS = "tiling-pattern-process";
+
+    /*
+     * TODO other configuration option should be possible : - skip some validation process ? - ???
+     */
+
+    /**
+     * Boolean to know if an exception must be thrown if a ValidationProcess is missing.
+     */
+    private boolean errorOnMissingProcess = true;
+
+    /**
+     * Boolean to know mark some error as a Warning, if the validation result contains only warning the validation is
+     * successful
+     */
+    private boolean lazyValidation = false;
+
+    private Map<String, Class<? extends ValidationProcess>> processes = new HashMap<String, Class<? extends ValidationProcess>>();
+    // TODO use annotation to mark these validation processes as inner page validation and factorize the access method
+    private Map<String, Class<? extends ValidationProcess>> innerProcesses = new HashMap<String, Class<? extends ValidationProcess>>();
+
+    /**
+     * Define the AnnotationFactory used by ValidationProcess
+     */
+    private AnnotationValidatorFactory annotFact;
+
+    /**
+     * Define the ActionManagerFactory used by ValidationProcess
+     */
+    private ActionManagerFactory actionFact;
+
+    /**
+     * Define the ColorSpaceHelperFactory used by the validationProcess.
+     */
+    private ColorSpaceHelperFactory colorSpaceHelperFact;
+
+    public static PreflightConfiguration createPdfA1BConfiguration()
+    {
+        PreflightConfiguration configuration = new PreflightConfiguration();
+
+        configuration.replaceProcess(CATALOG_PROCESS, CatalogValidationProcess.class);
+        configuration.replaceProcess(FILE_SPECIF_PROCESS, FileSpecificationValidationProcess.class);
+        configuration.replaceProcess(TRAILER_PROCESS, TrailerValidationProcess.class);
+        configuration.replaceProcess(XREF_PROCESS, XRefValidationProcess.class);
+        configuration.replaceProcess(ACRO_FORM_PROCESS, AcroFormValidationProcess.class);
+        configuration.replaceProcess(BOOKMARK_PROCESS, BookmarkValidationProcess.class);
+        configuration.replaceProcess(PAGES_TREE_PROCESS, PageTreeValidationProcess.class);
+        configuration.replaceProcess(META_DATA_PROCESS, MetadataValidationProcess.class);
+
+        configuration.replaceProcess(STREAM_PROCESS, StreamValidationProcess.class);
+
+        configuration.replacePageProcess(PAGE_PROCESS, SinglePageValidationProcess.class);
+        configuration.replacePageProcess(EXTGSTATE_PROCESS, ExtGStateValidationProcess.class);
+        configuration.replacePageProcess(SHADDING_PATTERN_PROCESS, ShaddingPatternValidationProcess.class);
+        configuration.replacePageProcess(GRAPHIC_PROCESS, GraphicObjectPageValidationProcess.class);
+        configuration.replacePageProcess(TILING_PATTERN_PROCESS, TilingPatternValidationProcess.class);
+        configuration.replacePageProcess(RESOURCES_PROCESS, ResourcesValidationProcess.class);
+        configuration.replacePageProcess(FONT_PROCESS, FontValidationProcess.class);
+        configuration.replacePageProcess(ACTIONS_PROCESS, ActionsValidationProcess.class);
+        configuration.replacePageProcess(ANNOTATIONS_PROCESS, AnnotationValidationProcess.class);
+
+        configuration.actionFact = new ActionManagerFactory();
+        configuration.annotFact = new PDFAbAnnotationFactory();
+        configuration.colorSpaceHelperFact = new ColorSpaceHelperFactory();
+        return configuration;
+    }
+
+    public Collection<String> getProcessNames()
+    {
+        return this.processes.keySet();
+    }
+
+    /**
+     * Return the validation process linked with the given name
+     * 
+     * @param processName
+     * @return an instance of validationProcess, null if it doesn't exist and if the errorOnMissingProcess is false
+     * @throws MissingValidationProcessException
+     *             if the Process doesn't exist (errorOnMissingProcess is true)
+     */
+    public ValidationProcess getInstanceOfProcess(String processName) throws MissingValidationProcessException,
+            ValidationException
+    {
+        Class<? extends ValidationProcess> clazz = null;
+        if (processes.containsKey(processName))
+        {
+            clazz = processes.get(processName);
+        }
+        else if (innerProcesses.containsKey(processName))
+        {
+            clazz = innerProcesses.get(processName);
+        }
+        else if (errorOnMissingProcess)
+        {
+            throw new MissingValidationProcessException(processName);
+        }
+        else
+        {
+            return new EmptyValidationProcess();
+        }
+
+        try
+        {
+            return clazz.newInstance();
+        }
+        catch (InstantiationException e)
+        {
+            throw new ValidationException(processName + " can't be created", e);
+        }
+        catch (IllegalAccessException e)
+        {
+            throw new ValidationException(processName + " can't be created", e);
+        }
+
+    }
+
+    public void replaceProcess(String processName, Class<? extends ValidationProcess> process)
+    {
+        this.processes.put(processName, process);
+    }
+
+    public Collection<String> getPageValidationProcessNames()
+    {
+        return this.innerProcesses.keySet();
+    }
+
+    public void replacePageProcess(String processName, Class<? extends ValidationProcess> process)
+    {
+        this.innerProcesses.put(processName, process);
+    }
+
+    public boolean isErrorOnMissingProcess()
+    {
+        return errorOnMissingProcess;
+    }
+
+    public void setErrorOnMissingProcess(boolean errorOnMissingProcess)
+    {
+        this.errorOnMissingProcess = errorOnMissingProcess;
+    }
+
+    public boolean isLazyValidation()
+    {
+        return lazyValidation;
+    }
+
+    public void setLazyValidation(boolean lazyValidation)
+    {
+        this.lazyValidation = lazyValidation;
+    }
+
+    public AnnotationValidatorFactory getAnnotFact()
+    {
+        return annotFact;
+    }
+
+    public void setAnnotFact(AnnotationValidatorFactory annotFact)
+    {
+        this.annotFact = annotFact;
+    }
+
+    public ActionManagerFactory getActionFact()
+    {
+        return actionFact;
+    }
+
+    public void setActionFact(ActionManagerFactory actionFact)
+    {
+        this.actionFact = actionFact;
+    }
+
+    public ColorSpaceHelperFactory getColorSpaceHelperFact()
+    {
+        return colorSpaceHelperFact;
+    }
+
+    public void setColorSpaceHelperFact(ColorSpaceHelperFactory colorSpaceHelperFact)
+    {
+        this.colorSpaceHelperFact = colorSpaceHelperFact;
+    }
 
-}
\ No newline at end of file
+}



Mime
View raw message