Class ObjectEvaluation
public class ObjectEvaluation extends PDDocumentUtils
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
ObjectEvaluation.Change
static class
ObjectEvaluation.DocMDP
P number (Optional) The access permissions granted for this document.static class
ObjectEvaluation.FieldMDP
static interface
ObjectEvaluation.SelectiveComputation
static class
ObjectEvaluation.Selectiveness
Nested classes/interfaces inherited from class br.ufsc.labsec.signature.conformanceVerifier.pdf.PDDocumentUtils
PDDocumentUtils.OurPDSignature
-
Field Summary
Fields Modifier and Type Field Description protected List<org.apache.pdfbox.cos.COSObjectKey>
objects
Lista de objetos a serem avaliadosprotected int
p
Valor do parâmetro de transformaçãoFields inherited from class br.ufsc.labsec.signature.conformanceVerifier.pdf.PDDocumentUtils
ACTION, ETSI_RFC3161
-
Constructor Summary
Constructors Constructor Description ObjectEvaluation()
ObjectEvaluation(org.apache.pdfbox.pdmodel.PDDocument document, Set<org.apache.pdfbox.cos.COSObjectKey> previousExistingFields)
Construtor para avaliação pela funçãocomputeDocument(br.ufsc.labsec.signature.conformanceVerifier.pdf.ObjectEvaluation.SelectiveComputation)
. -
Method Summary
Modifier and Type Method Description boolean
allValidEntries(org.apache.pdfbox.cos.COSBase base, Set<org.apache.pdfbox.cos.COSName> validEntries)
protected void
appendIdentifier(org.apache.pdfbox.cos.COSBase base, OutputStream outputStream)
protected List<Action>
compare(org.apache.pdfbox.cos.COSBase a, org.apache.pdfbox.cos.COSBase b, br.ufsc.labsec.signature.conformanceVerifier.pdf.Action.Path path, org.apache.pdfbox.cos.COSObjectKey origin, Map<org.apache.pdfbox.cos.COSObjectKey,List<Action>> visited)
protected boolean
compute(org.apache.pdfbox.cos.COSBase a, OutputStream outputStream, Set<org.apache.pdfbox.cos.COSObjectKey> visited, ObjectEvaluation.SelectiveComputation selectiveComputation)
Escreve em um outputStream os dados de uma estrutura interna do PDF.boolean
computeAction(org.apache.pdfbox.cos.COSBase base, OutputStream outputStream, Set<org.apache.pdfbox.cos.COSObjectKey> visited, ObjectEvaluation.SelectiveComputation selectiveComputation)
Computa uma ação.boolean
computeAdditionalActions(org.apache.pdfbox.cos.COSBase base, OutputStream outputStream, Set<org.apache.pdfbox.cos.COSObjectKey> visited, ObjectEvaluation.SelectiveComputation selectiveComputation)
Computa ações adicionais de um dicionário de ações.protected boolean
computeAnnotation(org.apache.pdfbox.cos.COSBase base, OutputStream outputStream, Set<org.apache.pdfbox.cos.COSObjectKey> visited, ObjectEvaluation.SelectiveComputation selectiveComputation)
Computa os objetos de anotação.protected boolean
computeAnnotations(org.apache.pdfbox.cos.COSBase base, OutputStream outputStream, Set<org.apache.pdfbox.cos.COSObjectKey> visited, Set<org.apache.pdfbox.cos.COSObjectKey> existingSignatureFields, ObjectEvaluation.SelectiveComputation selectiveComputation, org.apache.pdfbox.pdmodel.PDDocument document)
Computa as anotações de um array de objetos.protected void
computeArray(org.apache.pdfbox.cos.COSArray array, OutputStream outputStream, Set<org.apache.pdfbox.cos.COSObjectKey> visited, ObjectEvaluation.SelectiveComputation selectiveComputation)
protected void
computeBoolean(org.apache.pdfbox.cos.COSBoolean cosboolean, OutputStream outputStream)
protected void
computeDictionary(org.apache.pdfbox.cos.COSDictionary cosDictionary, OutputStream outputStream, Set<org.apache.pdfbox.cos.COSObjectKey> visited, ObjectEvaluation.SelectiveComputation selectiveComputation)
protected byte[]
computeDocument(ObjectEvaluation.SelectiveComputation selectiveComputation)
Computa o documento PDF, retornando os bytes do documento com as informaçõesprotected boolean
computeEmbeddedFiles(org.apache.pdfbox.cos.COSString filename, org.apache.pdfbox.cos.COSBase base, OutputStream outputStream, Set<org.apache.pdfbox.cos.COSObjectKey> visited, ObjectEvaluation.SelectiveComputation selectiveComputation)
Computa os arquivos incorporados.byte[]
computeFields(org.apache.pdfbox.pdmodel.PDDocument document, ObjectEvaluation.FieldMDP fieldMDP)
protected void
computeFloat(org.apache.pdfbox.cos.COSFloat cosfloat, OutputStream outputStream)
boolean
computeFormField(org.apache.pdfbox.cos.COSBase base, OutputStream outputStream, Set<org.apache.pdfbox.cos.COSObjectKey> visited, ObjectEvaluation.SelectiveComputation selectiveComputation)
Computa os campos de formulário.protected void
computeInteger(org.apache.pdfbox.cos.COSInteger cosinteger, OutputStream outputStream)
protected void
computeName(org.apache.pdfbox.cos.COSName cosname, OutputStream outputStream)
protected boolean
computeNamedPage(org.apache.pdfbox.cos.COSBase base, OutputStream outputStream, Set<org.apache.pdfbox.cos.COSObjectKey> visited, Set<org.apache.pdfbox.cos.COSObjectKey> previousExistingFields, ObjectEvaluation.SelectiveComputation selectiveComputation, org.apache.pdfbox.pdmodel.PDDocument document)
Computa uma página nomeada.protected void
computeNull(org.apache.pdfbox.cos.COSNull cosnull, OutputStream outputStream)
protected void
computeObject(org.apache.pdfbox.cos.COSObject object, OutputStream outputStream, Set<org.apache.pdfbox.cos.COSObjectKey> visited, ObjectEvaluation.SelectiveComputation selectiveComputation)
protected boolean
computePageObject(org.apache.pdfbox.cos.COSBase base, OutputStream outputStream, Set<org.apache.pdfbox.cos.COSObjectKey> visited, Set<org.apache.pdfbox.cos.COSObjectKey> previousExistingFields, ObjectEvaluation.SelectiveComputation selectiveComputation, org.apache.pdfbox.pdmodel.PDDocument document)
Computa os objetos de página.protected boolean
computeStream(org.apache.pdfbox.cos.COSBase base, OutputStream outputStream, Set<org.apache.pdfbox.cos.COSObjectKey> visited, ObjectEvaluation.SelectiveComputation selectiveComputation)
protected void
computeString(org.apache.pdfbox.cos.COSString cosstring, OutputStream outputStream)
protected int
findInCOSArray(org.apache.pdfbox.cos.COSArray array, org.apache.pdfbox.cos.COSBase base, br.ufsc.labsec.signature.conformanceVerifier.pdf.Action.Path path, Map<org.apache.pdfbox.cos.COSObjectKey,List<Action>> visited)
Busca a posição do elemento no arrayprotected void
ifPresent(org.apache.pdfbox.cos.COSDictionary dictionary, org.apache.pdfbox.cos.COSName entry, OutputStream outputStream, Set<org.apache.pdfbox.cos.COSObjectKey> visited, ObjectEvaluation.SelectiveComputation selectiveComputation)
protected void
ifPresent(org.apache.pdfbox.cos.COSDictionary dictionary, org.apache.pdfbox.cos.COSName entry, OutputStream outputStream, Set<org.apache.pdfbox.cos.COSObjectKey> visited, ObjectEvaluation.SelectiveComputation selectiveComputation, boolean inheritable)
protected void
ifPresent(org.apache.pdfbox.cos.COSDictionary dictionary, org.apache.pdfbox.cos.COSName entry, OutputStream outputStream, Set<org.apache.pdfbox.cos.COSObjectKey> visited, ObjectEvaluation.SelectiveComputation selectiveComputation, boolean inheritable, Callable<?> callable)
protected void
ifPresentKeyValuePair(org.apache.pdfbox.cos.COSDictionary dictionary, org.apache.pdfbox.cos.COSName key, OutputStream outputStream, Set<org.apache.pdfbox.cos.COSObjectKey> visited, ObjectEvaluation.SelectiveComputation selectiveComputation)
boolean
isAAAnnotationValid(org.apache.pdfbox.cos.COSBase base)
boolean
isAACatalogValid(org.apache.pdfbox.cos.COSBase base)
boolean
isAAFormFieldValid(org.apache.pdfbox.cos.COSBase base)
boolean
isAAPageValid(org.apache.pdfbox.cos.COSBase base)
protected boolean
isEqual(org.apache.pdfbox.cos.COSBase base1, org.apache.pdfbox.cos.COSBase base2, br.ufsc.labsec.signature.conformanceVerifier.pdf.Action.Path path, Map<org.apache.pdfbox.cos.COSObjectKey,List<Action>> visited)
Método de comparação entre dois objetosprotected List<Action>
parseArray(org.apache.pdfbox.cos.COSArray array1, org.apache.pdfbox.cos.COSArray array2, br.ufsc.labsec.signature.conformanceVerifier.pdf.Action.Path path, org.apache.pdfbox.cos.COSObjectKey origin, Map<org.apache.pdfbox.cos.COSObjectKey,List<Action>> visited)
protected List<Action>
parseDictionary(org.apache.pdfbox.cos.COSDictionary dictionary1, org.apache.pdfbox.cos.COSDictionary dictionary2, br.ufsc.labsec.signature.conformanceVerifier.pdf.Action.Path path, org.apache.pdfbox.cos.COSObjectKey origin, Map<org.apache.pdfbox.cos.COSObjectKey,List<Action>> visited)
protected void
tryComputeObjectOr(org.apache.pdfbox.cos.COSBase base, OutputStream outputStream, Set<org.apache.pdfbox.cos.COSObjectKey> visited, Callable<?> runnable)
protected void
write4bytesInteger(int integer, OutputStream outputStream)
protected void
writeKeyValuePair(org.apache.pdfbox.cos.COSName key, org.apache.pdfbox.cos.COSBase value, OutputStream outputStream, Set<org.apache.pdfbox.cos.COSObjectKey> visited, ObjectEvaluation.SelectiveComputation selectiveComputation)
protected void
writeName(org.apache.pdfbox.cos.COSName cosname, OutputStream outputStream)
Methods inherited from class br.ufsc.labsec.signature.conformanceVerifier.pdf.PDDocumentUtils
as, asCOSObject, asOptional, closePDDocument, compare, comparePosition, containsTransformMethod, copyVisualSignature, digest, digest, DIGEST, DIGEST, DIGEST, equalLock, fieldTypeFromHierarchy, formatXpath, GET_SIGNED_DOCUMENT, getAcroForm, getAnnotations, getApprovalSignatures, getBaseAcroForm, getBaseIdentification, getByteRangeForRemovingLastSignature, getCatalog, getCertificationSignature, getDocMDP, getDocMDPValue, getDocMDPValueOrElse, getDocTimestampsOfSignature, getDocTimestampsOfSignature, getEmbeddedFiles, getEmbeddedFiles, getEntry, getFieldMDP, getFieldMDP, getFieldMDPSignature, getFieldsFromHierarchy, getFieldsFromHierarchy, getFieldsFromHierarchy, getFieldsFromHierarchy, getFirstSignature, getFirstSignatureByteRange, getFullyQualifiedName, getLastSignature, getNamedObjects, getNamedObjects, getNamedPages, getNamesDictionary, getObjectIdentification, getPageObjects, getReference, getReference, getReferenceFromSignature, getReferences, getReferences, getReferencesAsList, getReferencesAsList, getRootFields, getSignatures, getSignedDocument, getValuesFromNameTree, getWidgetParent, hasDocMDP, hasDocMDP, hasEntry, hasFieldMDP, hasFieldMDP, hasFieldMDP, hasJavaScript, isAcroForm, isAnnotation, isCatalog, isField, isFieldEntry, isNonTerminalField, isPage, isPageNode, isPageObject, isSignatureDictionary, isSignatureField, isSignatureField, isSignatureWidget, isSignedSignatureField, isTerminalField, isTimestampWidget, isUnsignedSignatureField, isWidget, openPDDocument, openPDDocument, openPDDocument, retrieveAddress, signs, signs, signs, signs, signs, toCOSObjectKey
-
Field Details
-
objects
Lista de objetos a serem avaliados -
p
protected int pValor do parâmetro de transformação
-
-
Constructor Details
-
ObjectEvaluation
public ObjectEvaluation(org.apache.pdfbox.pdmodel.PDDocument document, Set<org.apache.pdfbox.cos.COSObjectKey> previousExistingFields)Construtor para avaliação pela funçãocomputeDocument(br.ufsc.labsec.signature.conformanceVerifier.pdf.ObjectEvaluation.SelectiveComputation)
. -
ObjectEvaluation
public ObjectEvaluation()
-
-
Method Details
-
parseDictionary
protected List<Action> parseDictionary(org.apache.pdfbox.cos.COSDictionary dictionary1, org.apache.pdfbox.cos.COSDictionary dictionary2, br.ufsc.labsec.signature.conformanceVerifier.pdf.Action.Path path, org.apache.pdfbox.cos.COSObjectKey origin, Map<org.apache.pdfbox.cos.COSObjectKey,List<Action>> visited) -
computeDocument
protected byte[] computeDocument(ObjectEvaluation.SelectiveComputation selectiveComputation) throws IOExceptionComputa o documento PDF, retornando os bytes do documento com as informaçõesAppendix 1: Computation of Object Digests
Section 1.2.1: Document
When calculating a digest for the document, the following items are included, in order:
* A) The values of the following entries in the document catalog (see Table 3.25), if present: AA, Legal; and Perms * B) The values of the following entries in the document information dictionary (see Table 10.2), if present: Title, Author, Keywords, and Subject * C) All page objects in the document, in page order, as described in Section I.2.2, "Page Objects" * D) All named pages specified in the Pages name tree, sorted by name, as described in Section I.2.3, "Named Pages" * E) All embedded files specified in the EmbeddedFiles name tree, sorted by name, as described in Section I.2.4, "Embedded Files" * Exception 1: we include the AcroForm signature fields in the computation.
- Parameters:
selectiveComputation
- computação seletiva que define quais objetos devem ser considerados exceções- Returns:
- os bytes do documento com as informações computadas
- Throws:
IOException
- se ocorrer algum erro de I/O durante a computação do documento
-
ifPresent
protected void ifPresent(org.apache.pdfbox.cos.COSDictionary dictionary, org.apache.pdfbox.cos.COSName entry, OutputStream outputStream, Set<org.apache.pdfbox.cos.COSObjectKey> visited, ObjectEvaluation.SelectiveComputation selectiveComputation) throws IOException- Throws:
IOException
-
ifPresent
protected void ifPresent(org.apache.pdfbox.cos.COSDictionary dictionary, org.apache.pdfbox.cos.COSName entry, OutputStream outputStream, Set<org.apache.pdfbox.cos.COSObjectKey> visited, ObjectEvaluation.SelectiveComputation selectiveComputation, boolean inheritable) throws IOException- Throws:
IOException
-
ifPresent
protected void ifPresent(org.apache.pdfbox.cos.COSDictionary dictionary, org.apache.pdfbox.cos.COSName entry, OutputStream outputStream, Set<org.apache.pdfbox.cos.COSObjectKey> visited, ObjectEvaluation.SelectiveComputation selectiveComputation, boolean inheritable, Callable<?> callable) throws IOException- Throws:
IOException
-
computePageObject
protected boolean computePageObject(org.apache.pdfbox.cos.COSBase base, OutputStream outputStream, Set<org.apache.pdfbox.cos.COSObjectKey> visited, Set<org.apache.pdfbox.cos.COSObjectKey> previousExistingFields, ObjectEvaluation.SelectiveComputation selectiveComputation, org.apache.pdfbox.pdmodel.PDDocument document) throws IOExceptionComputa os objetos de página.Appendix 1: Computation of Object Digests
Section 1.2.2: Page Objects
For page objects (see Table 3.27), the digest includes the values of the following entries, in order, if present. For entries listed as inheritable, their values may be inherited from ancestor nodes in the page tree if not specified explicitly.
* A) MediaBox (inheritable), CropBox (inheritable), Resources (inheritable), Contents, Rotate (inheritable), AA, ANNOTS
- Parameters:
base
- o objeto base a ser computadooutputStream
- o fluxo de saída onde os bytes computados serão escritosvisited
- um conjunto de chaves de objetos visitados para evitar computação duplicadapreviousExistingFields
- um conjunto de chaves de objetos de campos existentes anteriormenteselectiveComputation
- a computação seletiva que define quais objetos devem ser considerados exceçõesdocument
- o documento PDF atual, usado para verificar se o objeto é uma página válida- Returns:
- verdadeiro se o objeto foi computado com sucesso, falso caso contrário
- Throws:
IOException
- se ocorrer algum erro de I/O durante a computação do objeto de página
-
computeNamedPage
protected boolean computeNamedPage(org.apache.pdfbox.cos.COSBase base, OutputStream outputStream, Set<org.apache.pdfbox.cos.COSObjectKey> visited, Set<org.apache.pdfbox.cos.COSObjectKey> previousExistingFields, ObjectEvaluation.SelectiveComputation selectiveComputation, org.apache.pdfbox.pdmodel.PDDocument document) throws IOExceptionComputa uma página nomeada.Appendix 1: Computation of Object Digests
Section 1.2.3: Named Pages
For named pages (see Section 8.6.5, “Named Pages”), only the Contents and Annots entries are digested, as shown in Section I.2.2, “Page Objects,” above.
- Parameters:
base
- o objeto base a ser computadooutputStream
- o fluxo de saída onde os bytes computados serão escritosvisited
- um conjunto de chaves de objetos visitados para evitar computação duplicadapreviousExistingFields
- um conjunto de chaves de objetos de campos existentes anteriormenteselectiveComputation
- a computação seletiva que define quais objetos devem ser considerados exceçõesdocument
- o documento PDF atual, usado para verificar se o objeto é uma página válida- Returns:
- verdadeiro se o objeto foi computado com sucesso, falso caso contrário
- Throws:
IOException
- se ocorrer algum erro de I/O durante a computação do objeto de página nomeada
-
computeEmbeddedFiles
protected boolean computeEmbeddedFiles(org.apache.pdfbox.cos.COSString filename, org.apache.pdfbox.cos.COSBase base, OutputStream outputStream, Set<org.apache.pdfbox.cos.COSObjectKey> visited, ObjectEvaluation.SelectiveComputation selectiveComputation) throws IOExceptionComputa os arquivos incorporados.Appendix 1: Computation of Object Digests
Section 1.2.4: Embedded Files
The document’s embedded files (as specified in the EmbeddedFiles name tree) are sorted by name. For each embedded file, the following values are digested, in order:
* A) The name of the embedded file * B) The stream corresponding to the file
- Parameters:
filename
- o nome do arquivo incorporadobase
- o objeto base que representa o arquivo incorporadooutputStream
- o fluxo de saída onde os bytes computados serão escritosvisited
- um conjunto de chaves de objetos visitados para evitar computação duplicadaselectiveComputation
- a computação seletiva que define quais objetos devem ser considerados exceções- Returns:
- verdadeiro se o arquivo incorporado foi computado com sucesso, falso caso contrário
- Throws:
IOException
- se ocorrer algum erro de I/O durante a computação do arquivo incorporado
-
computeAnnotations
protected boolean computeAnnotations(org.apache.pdfbox.cos.COSBase base, OutputStream outputStream, Set<org.apache.pdfbox.cos.COSObjectKey> visited, Set<org.apache.pdfbox.cos.COSObjectKey> existingSignatureFields, ObjectEvaluation.SelectiveComputation selectiveComputation, org.apache.pdfbox.pdmodel.PDDocument document) throws IOExceptionComputa as anotações de um array de objetos.- Parameters:
base
- o objeto base que contém o array de anotaçõesoutputStream
- o fluxo de saída onde os bytes computados serão escritosvisited
- um conjunto de chaves de objetos visitados para evitar computação duplicadaexistingSignatureFields
- um conjunto de chaves de objetos de campos de assinatura existentes anteriormenteselectiveComputation
- a computação seletiva que define quais objetos devem ser considerados exceçõesdocument
- o documento PDF atual, usado para verificar se o objeto é uma anotação válida- Returns:
- verdadeiro se as anotações foram computadas com sucesso, falso caso contrário
- Throws:
IOException
- se ocorrer algum erro de I/O durante a computação das anotações
-
computeAnnotation
protected boolean computeAnnotation(org.apache.pdfbox.cos.COSBase base, OutputStream outputStream, Set<org.apache.pdfbox.cos.COSObjectKey> visited, ObjectEvaluation.SelectiveComputation selectiveComputation) throws IOExceptionComputa os objetos de anotação.Appendix 1: Computation of Object Digests
Section 1.2.5: Annotation Dictionaries
For annotation dictionaries (see Table 8.44), the values of the following entries are digested, in order, if present
* A) Contents, T, F, A, AA, Dest, QuadPoints, InkList, Name, FS, Sound. ** FS (If FS refers to the contents of a remote file, the contents of that file are not digested) * B) If Movie is present, the values of its F and Poster are also digested. * C) For stamp annotations, the value of AP is also digested. * Exception 1: The Rect entry is not included in the computation. However, we compute it to preserve the position of the annotation.
- Parameters:
base
- o objeto base que representa a anotaçãooutputStream
- o fluxo de saída onde os bytes computados serão escritosvisited
- um conjunto de chaves de objetos visitados para evitar computação duplicadaselectiveComputation
- a computação seletiva que define quais objetos devem ser considerados exceções- Returns:
- verdadeiro se a anotação foi computada com sucesso, falso caso contrário
- Throws:
IOException
- se ocorrer algum erro de I/O durante a computação da anotação
-
computeFormField
public boolean computeFormField(org.apache.pdfbox.cos.COSBase base, OutputStream outputStream, Set<org.apache.pdfbox.cos.COSObjectKey> visited, ObjectEvaluation.SelectiveComputation selectiveComputation) throws IOExceptionComputa os campos de formulário.Appendix 1: Computation of Object Digests
Section 1.2.6: Form Fields
For form fields (see Table 8.69), the values of the following entries are digested, in order, if present:
* T, FT (inheritable), DV (inheritable), V, A (inheritable), AA (inheritable), F, Lock, SV * Exception 1: The F entry is not included in the computation for signature fields. Since the insertion of a signature field may change the flags to lock the field, we compute it.
- Parameters:
base
- o objeto base que representa o campo de formuláriooutputStream
- o fluxo de saída onde os bytes computados serão escritosvisited
- um conjunto de chaves de objetos visitados para evitar computação duplicadaselectiveComputation
- a computação seletiva que define quais objetos devem ser considerados exceções- Returns:
- verdadeiro se o campo de formulário foi computado com sucesso, falso caso contrário
- Throws:
IOException
- se ocorrer algum erro de I/O durante a computação do campo de formulário
-
computeAction
public boolean computeAction(org.apache.pdfbox.cos.COSBase base, OutputStream outputStream, Set<org.apache.pdfbox.cos.COSObjectKey> visited, ObjectEvaluation.SelectiveComputation selectiveComputation) throws IOExceptionComputa uma ação.Appendix 1: Computation of Object Digests
Section 1.2.7: Action Dictionaries
For most actions (see Section 8.5, “Actions”), the values of the following entries in the action dictionary are digested, in order, if present:
* A) S, D, F, NewWindow, O, P, B, Base, Sound, Vol, Annot, T, H, N, JS and URI. * B) Rendition actions (see “Rendition Actions” on page 668) are treated differently than the other types.
- Parameters:
base
-outputStream
-visited
-selectiveComputation
-- Returns:
- Throws:
IOException
-
computeAdditionalActions
public boolean computeAdditionalActions(org.apache.pdfbox.cos.COSBase base, OutputStream outputStream, Set<org.apache.pdfbox.cos.COSObjectKey> visited, ObjectEvaluation.SelectiveComputation selectiveComputation) throws IOExceptionComputa ações adicionais de um dicionário de ações.Appendix 1: Computation of Object Digests
Section 1.2.8: Additional-Actions
Additional-actions dictionaries (see Section 8.5.2, “Trigger Events”) can be the value of the AA entry of a catalog, page, annotation or field dictionary. If the additional action is valid, the values of the following entries in the additional-actions dictionary are digested, in order, if present:
* E, X, D, U, Fo, Bl, O, C, K, F, V, C, WC, WS, DS, WP, and DP
- Parameters:
base
- o objeto base que representa o dicionário de ações adicionaisoutputStream
- o fluxo de saída onde os bytes computados serão escritosvisited
- um conjunto de chaves de objetos visitados para evitar computação duplicadaselectiveComputation
- a computação seletiva que define quais objetos devem ser considerados exceções- Returns:
- verdadeiro se as ações adicionais foram computadas com sucesso, falso caso contrário
- Throws:
IOException
- se ocorrer algum erro de I/O durante a computação das ações adicionais
-
isAACatalogValid
public boolean isAACatalogValid(org.apache.pdfbox.cos.COSBase base) -
isAAPageValid
public boolean isAAPageValid(org.apache.pdfbox.cos.COSBase base) -
isAAAnnotationValid
public boolean isAAAnnotationValid(org.apache.pdfbox.cos.COSBase base) -
isAAFormFieldValid
public boolean isAAFormFieldValid(org.apache.pdfbox.cos.COSBase base) -
allValidEntries
public boolean allValidEntries(org.apache.pdfbox.cos.COSBase base, Set<org.apache.pdfbox.cos.COSName> validEntries) -
computeFields
public byte[] computeFields(org.apache.pdfbox.pdmodel.PDDocument document, ObjectEvaluation.FieldMDP fieldMDP) throws IOException- Throws:
IOException
-
compute
protected boolean compute(org.apache.pdfbox.cos.COSBase a, OutputStream outputStream, Set<org.apache.pdfbox.cos.COSObjectKey> visited, ObjectEvaluation.SelectiveComputation selectiveComputation) throws IOExceptionEscreve em um outputStream os dados de uma estrutura interna do PDF.- Parameters:
a
- Estrutura de PDF contendo conteúdooutputStream
- Escrita do conteúdo de estrutura PDFvisited
- Mapa de objetos visitados para evitar recursãoselectiveComputation
- Parâmetros de verificação para computações seletivas.- Throws:
IOException
-
appendIdentifier
protected void appendIdentifier(org.apache.pdfbox.cos.COSBase base, OutputStream outputStream) throws IOException- Throws:
IOException
-
tryComputeObjectOr
protected void tryComputeObjectOr(org.apache.pdfbox.cos.COSBase base, OutputStream outputStream, Set<org.apache.pdfbox.cos.COSObjectKey> visited, Callable<?> runnable) throws IOException- Throws:
IOException
-
computeObject
protected void computeObject(org.apache.pdfbox.cos.COSObject object, OutputStream outputStream, Set<org.apache.pdfbox.cos.COSObjectKey> visited, ObjectEvaluation.SelectiveComputation selectiveComputation) throws IOException- Throws:
IOException
-
computeNull
protected void computeNull(org.apache.pdfbox.cos.COSNull cosnull, OutputStream outputStream) throws IOException- Throws:
IOException
-
computeInteger
protected void computeInteger(org.apache.pdfbox.cos.COSInteger cosinteger, OutputStream outputStream) throws IOException- Throws:
IOException
-
computeFloat
protected void computeFloat(org.apache.pdfbox.cos.COSFloat cosfloat, OutputStream outputStream) throws IOException- Throws:
IOException
-
computeBoolean
protected void computeBoolean(org.apache.pdfbox.cos.COSBoolean cosboolean, OutputStream outputStream) throws IOException- Throws:
IOException
-
computeName
protected void computeName(org.apache.pdfbox.cos.COSName cosname, OutputStream outputStream) throws IOException- Throws:
IOException
-
computeString
protected void computeString(org.apache.pdfbox.cos.COSString cosstring, OutputStream outputStream) throws IOException- Throws:
IOException
-
computeDictionary
protected void computeDictionary(org.apache.pdfbox.cos.COSDictionary cosDictionary, OutputStream outputStream, Set<org.apache.pdfbox.cos.COSObjectKey> visited, ObjectEvaluation.SelectiveComputation selectiveComputation) throws IOException- Throws:
IOException
-
computeArray
protected void computeArray(org.apache.pdfbox.cos.COSArray array, OutputStream outputStream, Set<org.apache.pdfbox.cos.COSObjectKey> visited, ObjectEvaluation.SelectiveComputation selectiveComputation) throws IOException- Throws:
IOException
-
computeStream
protected boolean computeStream(org.apache.pdfbox.cos.COSBase base, OutputStream outputStream, Set<org.apache.pdfbox.cos.COSObjectKey> visited, ObjectEvaluation.SelectiveComputation selectiveComputation) throws IOException- Throws:
IOException
-
ifPresentKeyValuePair
protected void ifPresentKeyValuePair(org.apache.pdfbox.cos.COSDictionary dictionary, org.apache.pdfbox.cos.COSName key, OutputStream outputStream, Set<org.apache.pdfbox.cos.COSObjectKey> visited, ObjectEvaluation.SelectiveComputation selectiveComputation) throws IOException- Throws:
IOException
-
writeKeyValuePair
protected void writeKeyValuePair(org.apache.pdfbox.cos.COSName key, org.apache.pdfbox.cos.COSBase value, OutputStream outputStream, Set<org.apache.pdfbox.cos.COSObjectKey> visited, ObjectEvaluation.SelectiveComputation selectiveComputation) throws IOException- Throws:
IOException
-
writeName
protected void writeName(org.apache.pdfbox.cos.COSName cosname, OutputStream outputStream) throws IOException- Throws:
IOException
-
write4bytesInteger
- Throws:
IOException
-
compare
-
parseArray
-
findInCOSArray
protected int findInCOSArray(org.apache.pdfbox.cos.COSArray array, org.apache.pdfbox.cos.COSBase base, br.ufsc.labsec.signature.conformanceVerifier.pdf.Action.Path path, Map<org.apache.pdfbox.cos.COSObjectKey,List<Action>> visited)Busca a posição do elemento no array- Parameters:
array
- O array de objetosbase
- O objeto base- Returns:
- O índice do objeto no array
-
isEqual
protected boolean isEqual(org.apache.pdfbox.cos.COSBase base1, org.apache.pdfbox.cos.COSBase base2, br.ufsc.labsec.signature.conformanceVerifier.pdf.Action.Path path, Map<org.apache.pdfbox.cos.COSObjectKey,List<Action>> visited)Método de comparação entre dois objetos- Parameters:
base1
- Um objeto a ser comparadobase2
- Outro objeto a ser comparado- Returns:
- Indica se os objetos são iguais
-