diff options
author | tknall <tknall@7b5415b0-85f9-ee4d-85bd-d5d0c3b42d1c> | 2009-12-02 18:11:11 +0000 |
---|---|---|
committer | tknall <tknall@7b5415b0-85f9-ee4d-85bd-d5d0c3b42d1c> | 2009-12-02 18:11:11 +0000 |
commit | edd5756535f4a3cf9897837510dc12168715bdd5 (patch) | |
tree | f63ba583d76e351370385f688c936c1372616761 /src/main/java/at/gv/egiz/pdfas/impl/api/analyze | |
parent | 840d6a4b71e5c8c0273be231a85306be26356933 (diff) | |
download | pdf-as-3-edd5756535f4a3cf9897837510dc12168715bdd5.tar.gz pdf-as-3-edd5756535f4a3cf9897837510dc12168715bdd5.tar.bz2 pdf-as-3-edd5756535f4a3cf9897837510dc12168715bdd5.zip |
Non-textual objects may be extracted during the analysis phase of the signature verification process
git-svn-id: https://joinup.ec.europa.eu/svn/pdf-as/trunk@485 7b5415b0-85f9-ee4d-85bd-d5d0c3b42d1c
Diffstat (limited to 'src/main/java/at/gv/egiz/pdfas/impl/api/analyze')
-rw-r--r-- | src/main/java/at/gv/egiz/pdfas/impl/api/analyze/AnalyzeResultImpl.java | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/src/main/java/at/gv/egiz/pdfas/impl/api/analyze/AnalyzeResultImpl.java b/src/main/java/at/gv/egiz/pdfas/impl/api/analyze/AnalyzeResultImpl.java index 7b1dffa..a50b7a1 100644 --- a/src/main/java/at/gv/egiz/pdfas/impl/api/analyze/AnalyzeResultImpl.java +++ b/src/main/java/at/gv/egiz/pdfas/impl/api/analyze/AnalyzeResultImpl.java @@ -5,7 +5,9 @@ package at.gv.egiz.pdfas.impl.api.analyze; import java.util.List;
+import at.gv.egiz.pdfas.api.analyze.AnalyzeParameters;
import at.gv.egiz.pdfas.api.analyze.AnalyzeResult;
+import at.gv.egiz.pdfas.api.analyze.NonTextObjectInfo;
import at.gv.egiz.pdfas.api.exceptions.PdfAsException;
/**
@@ -25,6 +27,8 @@ public class AnalyzeResultImpl implements AnalyzeResult */
protected List noSignatures = null;
+ protected List nonTextualObjects = null;
+
/**
* Constructor.
@@ -36,6 +40,20 @@ public class AnalyzeResultImpl implements AnalyzeResult */
public AnalyzeResultImpl(List signatures, List noSignatures)
{
+ this(signatures, noSignatures, null);
+ }
+
+ /**
+ * Constructor.
+ *
+ * @param signatures
+ * The found signatures.
+ * @param noSignatures
+ * The found non-signature update blocks.
+ * @param nonTextInfos Non textual data from pdf provided that {@link AnalyzeParameters#setReturnNonTextualObjects(boolean)} was set.
+ */
+ public AnalyzeResultImpl(List signatures, List noSignatures, List nonTextInfos)
+ {
if (signatures == null)
{
throw new IllegalArgumentException("The list of found signatures must not be null.");
@@ -43,6 +61,7 @@ public class AnalyzeResultImpl implements AnalyzeResult this.signatures = signatures;
this.noSignatures = noSignatures;
+ this.nonTextualObjects = nonTextInfos;
}
@@ -74,5 +93,23 @@ public class AnalyzeResultImpl implements AnalyzeResult return this.noSignatures;
}
+
+
+ /**
+ * Returns non textual data from pdf provided that {@link AnalyzeParameters#setReturnNonTextualObjects(boolean)}
+ * has been set {@code true}.
+ * @return List of {@link NonTextObjectInfo}
+ */
+ public List getNonTextualObjects() {
+ return this.nonTextualObjects;
+ }
+
+ /**
+ * Returns <code>true</code> if non textual objects have been found, <code>false</code> if not.
+ * @return <code>true</code> if non textual objects have been found, <code>false</code> if not.
+ */
+ public boolean hasNonTextualObjects() {
+ return this.nonTextualObjects != null && !this.nonTextualObjects.isEmpty();
+ }
}
|