You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pdfbox.apache.org by ti...@apache.org on 2015/05/07 08:39:02 UTC

svn commit: r1678134 - in /pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox: multipdf/ pdmodel/interactive/annotation/ pdmodel/interactive/digitalsignature/visible/ pdmodel/interactive/form/

Author: tilman
Date: Thu May  7 06:39:01 2015
New Revision: 1678134

URL: http://svn.apache.org/r1678134
Log:
PDFBOX-2783: Use getCOSObject() instead of getDictionary()

Modified:
    pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/multipdf/PDFMergerUtility.java
    pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/annotation/PDAnnotation.java
    pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/annotation/PDAnnotationFileAttachment.java
    pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/annotation/PDAnnotationLine.java
    pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/annotation/PDAnnotationLink.java
    pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/annotation/PDAnnotationPopup.java
    pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/annotation/PDAnnotationRubberStamp.java
    pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/annotation/PDAnnotationSquareCircle.java
    pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/annotation/PDAnnotationText.java
    pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/annotation/PDAnnotationTextMarkup.java
    pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/annotation/PDAnnotationWidget.java
    pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/annotation/PDAppearanceCharacteristicsDictionary.java
    pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/annotation/PDBorderEffectDictionary.java
    pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/annotation/PDBorderStyleDictionary.java
    pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/annotation/PDExternalDataDictionary.java
    pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/digitalsignature/visible/PDVisibleSigBuilder.java
    pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/form/AppearanceGeneratorHelper.java

Modified: pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/multipdf/PDFMergerUtility.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/multipdf/PDFMergerUtility.java?rev=1678134&r1=1678133&r2=1678134&view=diff
==============================================================================
--- pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/multipdf/PDFMergerUtility.java (original)
+++ pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/multipdf/PDFMergerUtility.java Thu May  7 06:39:01 2015
@@ -461,7 +461,7 @@ public class PDFMergerUtility
                 List<PDAnnotation> newAnnots = newPage.getAnnotations();
                 for (int i = 0; i < oldAnnots.size(); i++)
                 {
-                    objMapping.put(oldAnnots.get(i).getDictionary(), newAnnots.get(i).getDictionary());
+                    objMapping.put(oldAnnots.get(i).getCOSObject(), newAnnots.get(i).getCOSObject());
                 }
                 // TODO update mapping for XObjects
             }

Modified: pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/annotation/PDAnnotation.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/annotation/PDAnnotation.java?rev=1678134&r1=1678133&r2=1678134&view=diff
==============================================================================
--- pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/annotation/PDAnnotation.java (original)
+++ pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/annotation/PDAnnotation.java Thu May  7 06:39:01 2015
@@ -188,16 +188,6 @@ public abstract class PDAnnotation imple
     }
 
     /**
-     * returns the dictionary.
-     * 
-     * @return the dictionary
-     */
-    public COSDictionary getDictionary()
-    {
-        return dictionary;
-    }
-
-    /**
      * The annotation rectangle, defining the location of the annotation on the page in default user space units. This
      * is usually required and should not return null on valid PDF documents. But where this is a parent form field with
      * children, such as radio button collections then the rectangle will be null.
@@ -243,7 +233,7 @@ public abstract class PDAnnotation imple
      */
     public int getAnnotationFlags()
     {
-        return getDictionary().getInt(COSName.F, 0);
+        return getCOSObject().getInt(COSName.F, 0);
     }
 
     /**
@@ -253,7 +243,7 @@ public abstract class PDAnnotation imple
      */
     public void setAnnotationFlags(int flags)
     {
-        getDictionary().setInt(COSName.F, flags);
+        getCOSObject().setInt(COSName.F, flags);
     }
 
     /**
@@ -262,9 +252,9 @@ public abstract class PDAnnotation imple
      * @return This object as a standard COS object.
      */
     @Override
-    public COSBase getCOSObject()
+    public COSDictionary getCOSObject()
     {
-        return getDictionary();
+        return dictionary;
     }
 
     /**
@@ -273,7 +263,7 @@ public abstract class PDAnnotation imple
      */
     public COSName getAppearanceState()
     {
-        COSName name = (COSName) getDictionary().getDictionaryObject(COSName.AS);
+        COSName name = (COSName) getCOSObject().getDictionaryObject(COSName.AS);
         if (name != null)
         {
             return name;
@@ -290,11 +280,11 @@ public abstract class PDAnnotation imple
     {
         if (as == null)
         {
-            getDictionary().removeItem(COSName.AS);
+            getCOSObject().removeItem(COSName.AS);
         }
         else
         {
-            getDictionary().setItem(COSName.AS, COSName.getPDFName(as));
+            getCOSObject().setItem(COSName.AS, COSName.getPDFName(as));
         }
     }
 
@@ -365,7 +355,7 @@ public abstract class PDAnnotation imple
      */
     public boolean isInvisible()
     {
-        return getDictionary().getFlag( COSName.F, FLAG_INVISIBLE);
+        return getCOSObject().getFlag( COSName.F, FLAG_INVISIBLE);
     }
 
     /**
@@ -375,7 +365,7 @@ public abstract class PDAnnotation imple
      */
     public void setInvisible(boolean invisible)
     {
-        getDictionary().setFlag( COSName.F, FLAG_INVISIBLE, invisible);
+        getCOSObject().setFlag( COSName.F, FLAG_INVISIBLE, invisible);
     }
 
     /**
@@ -385,7 +375,7 @@ public abstract class PDAnnotation imple
      */
     public boolean isHidden()
     {
-        return getDictionary().getFlag( COSName.F, FLAG_HIDDEN);
+        return getCOSObject().getFlag( COSName.F, FLAG_HIDDEN);
     }
 
     /**
@@ -395,7 +385,7 @@ public abstract class PDAnnotation imple
      */
     public void setHidden(boolean hidden)
     {
-        getDictionary().setFlag( COSName.F, FLAG_HIDDEN, hidden);
+        getCOSObject().setFlag( COSName.F, FLAG_HIDDEN, hidden);
     }
 
     /**
@@ -405,7 +395,7 @@ public abstract class PDAnnotation imple
      */
     public boolean isPrinted()
     {
-        return getDictionary().getFlag( COSName.F, FLAG_PRINTED);
+        return getCOSObject().getFlag( COSName.F, FLAG_PRINTED);
     }
 
     /**
@@ -415,7 +405,7 @@ public abstract class PDAnnotation imple
      */
     public void setPrinted(boolean printed)
     {
-        getDictionary().setFlag( COSName.F, FLAG_PRINTED, printed);
+        getCOSObject().setFlag( COSName.F, FLAG_PRINTED, printed);
     }
 
     /**
@@ -425,7 +415,7 @@ public abstract class PDAnnotation imple
      */
     public boolean isNoZoom()
     {
-        return getDictionary().getFlag( COSName.F, FLAG_NO_ZOOM);
+        return getCOSObject().getFlag( COSName.F, FLAG_NO_ZOOM);
     }
 
     /**
@@ -435,7 +425,7 @@ public abstract class PDAnnotation imple
      */
     public void setNoZoom(boolean noZoom)
     {
-        getDictionary().setFlag( COSName.F, FLAG_NO_ZOOM, noZoom);
+        getCOSObject().setFlag( COSName.F, FLAG_NO_ZOOM, noZoom);
     }
 
     /**
@@ -445,7 +435,7 @@ public abstract class PDAnnotation imple
      */
     public boolean isNoRotate()
     {
-        return getDictionary().getFlag( COSName.F, FLAG_NO_ROTATE);
+        return getCOSObject().getFlag( COSName.F, FLAG_NO_ROTATE);
     }
 
     /**
@@ -455,7 +445,7 @@ public abstract class PDAnnotation imple
      */
     public void setNoRotate(boolean noRotate)
     {
-        getDictionary().setFlag( COSName.F, FLAG_NO_ROTATE, noRotate);
+        getCOSObject().setFlag( COSName.F, FLAG_NO_ROTATE, noRotate);
     }
 
     /**
@@ -465,7 +455,7 @@ public abstract class PDAnnotation imple
      */
     public boolean isNoView()
     {
-        return getDictionary().getFlag( COSName.F, FLAG_NO_VIEW);
+        return getCOSObject().getFlag( COSName.F, FLAG_NO_VIEW);
     }
 
     /**
@@ -475,7 +465,7 @@ public abstract class PDAnnotation imple
      */
     public void setNoView(boolean noView)
     {
-        getDictionary().setFlag( COSName.F, FLAG_NO_VIEW, noView);
+        getCOSObject().setFlag( COSName.F, FLAG_NO_VIEW, noView);
     }
 
     /**
@@ -485,7 +475,7 @@ public abstract class PDAnnotation imple
      */
     public boolean isReadOnly()
     {
-        return getDictionary().getFlag( COSName.F, FLAG_READ_ONLY);
+        return getCOSObject().getFlag( COSName.F, FLAG_READ_ONLY);
     }
 
     /**
@@ -495,7 +485,7 @@ public abstract class PDAnnotation imple
      */
     public void setReadOnly(boolean readOnly)
     {
-        getDictionary().setFlag( COSName.F, FLAG_READ_ONLY, readOnly);
+        getCOSObject().setFlag( COSName.F, FLAG_READ_ONLY, readOnly);
     }
 
     /**
@@ -505,7 +495,7 @@ public abstract class PDAnnotation imple
      */
     public boolean isLocked()
     {
-        return getDictionary().getFlag( COSName.F, FLAG_LOCKED);
+        return getCOSObject().getFlag( COSName.F, FLAG_LOCKED);
     }
 
     /**
@@ -515,7 +505,7 @@ public abstract class PDAnnotation imple
      */
     public void setLocked(boolean locked)
     {
-        getDictionary().setFlag( COSName.F, FLAG_LOCKED, locked);
+        getCOSObject().setFlag( COSName.F, FLAG_LOCKED, locked);
     }
 
     /**
@@ -525,7 +515,7 @@ public abstract class PDAnnotation imple
      */
     public boolean isToggleNoView()
     {
-        return getDictionary().getFlag( COSName.F, FLAG_TOGGLE_NO_VIEW);
+        return getCOSObject().getFlag( COSName.F, FLAG_TOGGLE_NO_VIEW);
     }
 
     /**
@@ -535,7 +525,7 @@ public abstract class PDAnnotation imple
      */
     public void setToggleNoView(boolean toggleNoView)
     {
-        getDictionary().setFlag( COSName.F, FLAG_TOGGLE_NO_VIEW, toggleNoView);
+        getCOSObject().setFlag( COSName.F, FLAG_TOGGLE_NO_VIEW, toggleNoView);
     }
 
     /**
@@ -565,7 +555,7 @@ public abstract class PDAnnotation imple
      */
     public String getModifiedDate()
     {
-        return getDictionary().getString(COSName.M);
+        return getCOSObject().getString(COSName.M);
     }
 
     /**
@@ -575,7 +565,7 @@ public abstract class PDAnnotation imple
      */
     public void setModifiedDate(String m)
     {
-        getDictionary().setString(COSName.M, m);
+        getCOSObject().setString(COSName.M, m);
     }
 
     /**
@@ -586,7 +576,7 @@ public abstract class PDAnnotation imple
      */
     public String getAnnotationName()
     {
-        return getDictionary().getString(COSName.NM);
+        return getCOSObject().getString(COSName.NM);
     }
 
     /**
@@ -597,7 +587,7 @@ public abstract class PDAnnotation imple
      */
     public void setAnnotationName(String nm)
     {
-        getDictionary().setString(COSName.NM, nm);
+        getCOSObject().setString(COSName.NM, nm);
     }
 
     /**
@@ -607,7 +597,7 @@ public abstract class PDAnnotation imple
      */
     public int getStructParent()
     {
-        return getDictionary().getInt(COSName.STRUCT_PARENT, 0);
+        return getCOSObject().getInt(COSName.STRUCT_PARENT, 0);
     }
 
     /**
@@ -617,7 +607,7 @@ public abstract class PDAnnotation imple
      */
     public void setStructParent(int structParent)
     {
-        getDictionary().setInt(COSName.STRUCT_PARENT, structParent);
+        getCOSObject().setInt(COSName.STRUCT_PARENT, structParent);
     }
 
     /**
@@ -631,7 +621,7 @@ public abstract class PDAnnotation imple
      */
     public void setColor(PDColor c)
     {
-        getDictionary().setItem(COSName.C, c.toCOSArray());
+        getCOSObject().setItem(COSName.C, c.toCOSArray());
     }
 
     /**
@@ -652,7 +642,7 @@ public abstract class PDAnnotation imple
 
     protected PDColor getColor(COSName itemName)
     {
-        COSBase c = this.getDictionary().getItem(itemName);
+        COSBase c = this.getCOSObject().getItem(itemName);
         if (c instanceof COSArray)
         {
             PDColorSpace colorSpace = null;
@@ -682,7 +672,7 @@ public abstract class PDAnnotation imple
      */
     public String getSubtype()
     {
-        return this.getDictionary().getNameAsString(COSName.SUBTYPE);
+        return this.getCOSObject().getNameAsString(COSName.SUBTYPE);
     }
 
     /**
@@ -692,7 +682,7 @@ public abstract class PDAnnotation imple
      */
     public void setPage(PDPage page)
     {
-        this.getDictionary().setItem(COSName.P, page);
+        this.getCOSObject().setItem(COSName.P, page);
     }
 
     /**
@@ -702,7 +692,7 @@ public abstract class PDAnnotation imple
      */
     public PDPage getPage()
     {
-        COSDictionary p = (COSDictionary) this.getDictionary().getDictionaryObject(COSName.P);
+        COSDictionary p = (COSDictionary) this.getCOSObject().getDictionaryObject(COSName.P);
         if (p != null)
         {
             return new PDPage(p);

Modified: pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/annotation/PDAnnotationFileAttachment.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/annotation/PDAnnotationFileAttachment.java?rev=1678134&r1=1678133&r2=1678134&view=diff
==============================================================================
--- pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/annotation/PDAnnotationFileAttachment.java (original)
+++ pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/annotation/PDAnnotationFileAttachment.java Thu May  7 06:39:01 2015
@@ -57,7 +57,7 @@ public class PDAnnotationFileAttachment
     public PDAnnotationFileAttachment()
     {
         super();
-        getDictionary().setItem( COSName.SUBTYPE, COSName.getPDFName( SUB_TYPE ) );
+        getCOSObject().setItem( COSName.SUBTYPE, COSName.getPDFName( SUB_TYPE ) );
     }
 
     /**
@@ -80,7 +80,7 @@ public class PDAnnotationFileAttachment
      */
     public PDFileSpecification getFile() throws IOException
     {
-        return PDFileSpecification.createFS( getDictionary().getDictionaryObject( "FS" ) );
+        return PDFileSpecification.createFS( getCOSObject().getDictionaryObject( "FS" ) );
     }
 
     /**
@@ -90,7 +90,7 @@ public class PDAnnotationFileAttachment
      */
     public void setFile( PDFileSpecification file )
     {
-        getDictionary().setItem( "FS", file );
+        getCOSObject().setItem( "FS", file );
     }
 
     /**
@@ -101,7 +101,7 @@ public class PDAnnotationFileAttachment
      */
     public String getAttachmentName()
     {
-        return getDictionary().getNameAsString( "Name", ATTACHMENT_NAME_PUSH_PIN );
+        return getCOSObject().getNameAsString( "Name", ATTACHMENT_NAME_PUSH_PIN );
     }
 
     /**
@@ -112,6 +112,6 @@ public class PDAnnotationFileAttachment
      */
     public void setAttachementName( String name )
     {
-        getDictionary().setName( "Name", name );
+        getCOSObject().setName( "Name", name );
     }
 }

Modified: pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/annotation/PDAnnotationLine.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/annotation/PDAnnotationLine.java?rev=1678134&r1=1678133&r2=1678134&view=diff
==============================================================================
--- pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/annotation/PDAnnotationLine.java (original)
+++ pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/annotation/PDAnnotationLine.java Thu May  7 06:39:01 2015
@@ -113,7 +113,7 @@ public class PDAnnotationLine extends PD
     public PDAnnotationLine()
     {
         super();
-        getDictionary().setItem( COSName.SUBTYPE, COSName.getPDFName( SUB_TYPE ) );
+        getCOSObject().setItem( COSName.SUBTYPE, COSName.getPDFName( SUB_TYPE ) );
         // Dictionary value L is mandatory, fill in with arbitary value
         setLine( new float[] { 0, 0, 0, 0 } );
     }
@@ -142,7 +142,7 @@ public class PDAnnotationLine extends PD
     {
         COSArray newL = new COSArray();
         newL.setFloatArray( l );
-        getDictionary().setItem( "L", newL );
+        getCOSObject().setItem( "L", newL );
     }
 
     /**
@@ -154,7 +154,7 @@ public class PDAnnotationLine extends PD
      */
     public float[] getLine()
     {
-        COSArray l = (COSArray) getDictionary().getDictionaryObject( "L" );
+        COSArray l = (COSArray) getCOSObject().getDictionaryObject( "L" );
         return l.toFloatArray();
     }
 
@@ -170,13 +170,13 @@ public class PDAnnotationLine extends PD
         {
             style = LE_NONE;
         }
-        COSArray array = (COSArray)getDictionary().getDictionaryObject( "LE" );
+        COSArray array = (COSArray)getCOSObject().getDictionaryObject( "LE" );
         if( array == null )
         {
             array = new COSArray();
             array.add( COSName.getPDFName( style ) );
             array.add( COSName.getPDFName( LE_NONE ) );
-            getDictionary().setItem( "LE", array );
+            getCOSObject().setItem( "LE", array );
         }
         else
         {
@@ -193,7 +193,7 @@ public class PDAnnotationLine extends PD
     public String getStartPointEndingStyle()
     {
         String retval = LE_NONE;
-        COSArray array = (COSArray)getDictionary().getDictionaryObject( "LE" );
+        COSArray array = (COSArray)getCOSObject().getDictionaryObject( "LE" );
         if( array != null )
         {
             retval = array.getName( 0 );
@@ -214,13 +214,13 @@ public class PDAnnotationLine extends PD
         {
             style = LE_NONE;
         }
-        COSArray array = (COSArray)getDictionary().getDictionaryObject( "LE" );
+        COSArray array = (COSArray)getCOSObject().getDictionaryObject( "LE" );
         if( array == null )
         {
             array = new COSArray();
             array.add( COSName.getPDFName( LE_NONE ) );
             array.add( COSName.getPDFName( style ) );
-            getDictionary().setItem( "LE", array );
+            getCOSObject().setItem( "LE", array );
         }
         else
         {
@@ -237,7 +237,7 @@ public class PDAnnotationLine extends PD
     public String getEndPointEndingStyle()
     {
         String retval = LE_NONE;
-        COSArray array = (COSArray)getDictionary().getDictionaryObject( "LE" );
+        COSArray array = (COSArray)getCOSObject().getDictionaryObject( "LE" );
         if( array != null )
         {
             retval = array.getName( 1 );
@@ -254,7 +254,7 @@ public class PDAnnotationLine extends PD
      */
     public void setInteriorColor( PDColor ic )
     {
-        getDictionary().setItem(COSName.IC, ic.toCOSArray() );
+        getCOSObject().setItem(COSName.IC, ic.toCOSArray() );
     }
 
     /**
@@ -276,7 +276,7 @@ public class PDAnnotationLine extends PD
      */
     public void setCaption( boolean cap )
     {
-        getDictionary().setBoolean( "Cap", cap );
+        getCOSObject().setBoolean( "Cap", cap );
     }
 
     /**
@@ -286,7 +286,7 @@ public class PDAnnotationLine extends PD
      */
     public boolean getCaption()
     {
-        return getDictionary().getBoolean( "Cap", false );
+        return getCOSObject().getBoolean( "Cap", false );
     }
 
     /**
@@ -298,7 +298,7 @@ public class PDAnnotationLine extends PD
      */
     public void setBorderStyle( PDBorderStyleDictionary bs )
     {
-        this.getDictionary().setItem( "BS", bs);
+        this.getCOSObject().setItem( "BS", bs);
     }
 
     /**
@@ -309,7 +309,7 @@ public class PDAnnotationLine extends PD
      */
     public PDBorderStyleDictionary getBorderStyle()
     {
-        COSDictionary bs = (COSDictionary) this.getDictionary().getItem(COSName.BS);
+        COSDictionary bs = (COSDictionary) this.getCOSObject().getItem(COSName.BS);
         if (bs != null)
         {
             return new PDBorderStyleDictionary( bs );
@@ -327,7 +327,7 @@ public class PDAnnotationLine extends PD
      */
     public float getLeaderLineLength()
     {
-        return this.getDictionary().getFloat("LL");
+        return this.getCOSObject().getFloat("LL");
     }
 
     /**
@@ -337,7 +337,7 @@ public class PDAnnotationLine extends PD
      */
     public void setLeaderLineLength(float leaderLineLength)
     {
-        this.getDictionary().setFloat("LL", leaderLineLength);
+        this.getCOSObject().setFloat("LL", leaderLineLength);
     }
 
     /**
@@ -347,7 +347,7 @@ public class PDAnnotationLine extends PD
      */
     public float getLeaderLineExtensionLength()
     {
-        return this.getDictionary().getFloat("LLE");
+        return this.getCOSObject().getFloat("LLE");
     }
 
     /**
@@ -357,7 +357,7 @@ public class PDAnnotationLine extends PD
      */
     public void setLeaderLineExtensionLength(float leaderLineExtensionLength)
     {
-        this.getDictionary().setFloat("LLE", leaderLineExtensionLength);
+        this.getCOSObject().setFloat("LLE", leaderLineExtensionLength);
     }
 
     /**
@@ -367,7 +367,7 @@ public class PDAnnotationLine extends PD
      */
     public float getLeaderLineOffsetLength()
     {
-        return this.getDictionary().getFloat("LLO");
+        return this.getCOSObject().getFloat("LLO");
     }
 
     /**
@@ -377,7 +377,7 @@ public class PDAnnotationLine extends PD
      */
     public void setLeaderLineOffsetLength(float leaderLineOffsetLength)
     {
-        this.getDictionary().setFloat("LLO", leaderLineOffsetLength);
+        this.getCOSObject().setFloat("LLO", leaderLineOffsetLength);
     }
 
     /**
@@ -387,7 +387,7 @@ public class PDAnnotationLine extends PD
      */
     public String getCaptionPositioning()
     {
-        return this.getDictionary().getString("CP");
+        return this.getCOSObject().getString("CP");
     }
 
     /**
@@ -398,7 +398,7 @@ public class PDAnnotationLine extends PD
      */
     public void setCaptionPositioning(String captionPositioning)
     {
-        this.getDictionary().setString("CP", captionPositioning);
+        this.getCOSObject().setString("CP", captionPositioning);
     }
 
     /**
@@ -408,12 +408,12 @@ public class PDAnnotationLine extends PD
      */
     public void setCaptionHorizontalOffset( float offset )
     {
-        COSArray array = (COSArray)this.getDictionary().getDictionaryObject( "CO" );
+        COSArray array = (COSArray)this.getCOSObject().getDictionaryObject( "CO" );
         if( array == null )
         {
             array = new COSArray();
             array.setFloatArray(new float[] {offset, 0.f});
-            this.getDictionary().setItem( "CO", array );
+            this.getCOSObject().setItem( "CO", array );
         }
         else
         {
@@ -429,7 +429,7 @@ public class PDAnnotationLine extends PD
     public float getCaptionHorizontalOffset()
     {
         float retval = 0.f;
-        COSArray array = (COSArray)this.getDictionary().getDictionaryObject( "CO" );
+        COSArray array = (COSArray)this.getCOSObject().getDictionaryObject( "CO" );
         if( array != null )
         {
             retval = array.toFloatArray()[0];
@@ -445,12 +445,12 @@ public class PDAnnotationLine extends PD
      */
     public void setCaptionVerticalOffset( float offset )
     {
-        COSArray array = (COSArray)this.getDictionary().getDictionaryObject( "CO" );
+        COSArray array = (COSArray)this.getCOSObject().getDictionaryObject( "CO" );
         if( array == null )
         {
             array = new COSArray();
             array.setFloatArray(new float[] {0.f, offset});
-            this.getDictionary().setItem( "CO", array );
+            this.getCOSObject().setItem( "CO", array );
         }
         else
         {
@@ -466,7 +466,7 @@ public class PDAnnotationLine extends PD
     public float getCaptionVerticalOffset()
     {
         float retval = 0.f;
-        COSArray array = (COSArray)this.getDictionary().getDictionaryObject( "CO" );
+        COSArray array = (COSArray)this.getCOSObject().getDictionaryObject( "CO" );
         if( array != null )
         {
             retval = array.toFloatArray()[1];

Modified: pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/annotation/PDAnnotationLink.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/annotation/PDAnnotationLink.java?rev=1678134&r1=1678133&r2=1678134&view=diff
==============================================================================
--- pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/annotation/PDAnnotationLink.java (original)
+++ pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/annotation/PDAnnotationLink.java Thu May  7 06:39:01 2015
@@ -66,7 +66,7 @@ public class PDAnnotationLink extends PD
     public PDAnnotationLink()
     {
         super();
-        getDictionary().setItem( COSName.SUBTYPE, COSName.getPDFName( SUB_TYPE ) );
+        getCOSObject().setItem( COSName.SUBTYPE, COSName.getPDFName( SUB_TYPE ) );
     }
 
     /**
@@ -90,7 +90,7 @@ public class PDAnnotationLink extends PD
     public PDAction getAction()
     {
         COSDictionary action = (COSDictionary)
-            this.getDictionary().getDictionaryObject( COSName.A );
+            this.getCOSObject().getDictionaryObject( COSName.A );
         return PDActionFactory.createAction( action );
     }
 
@@ -102,7 +102,7 @@ public class PDAnnotationLink extends PD
      */
     public void setAction( PDAction action )
     {
-        this.getDictionary().setItem( COSName.A, action );
+        this.getCOSObject().setItem( COSName.A, action );
     }
 
     /**
@@ -115,7 +115,7 @@ public class PDAnnotationLink extends PD
      */
     public void setBorderStyle(PDBorderStyleDictionary bs)
     {
-        this.getDictionary().setItem(COSName.BS, bs);
+        this.getCOSObject().setItem(COSName.BS, bs);
     }
 
     /**
@@ -126,7 +126,7 @@ public class PDAnnotationLink extends PD
      */
     public PDBorderStyleDictionary getBorderStyle()
     {
-        COSBase bs = this.getDictionary().getDictionaryObject(COSName.BS);
+        COSBase bs = this.getCOSObject().getDictionaryObject(COSName.BS);
         if (bs instanceof COSDictionary)
         {
             return new PDBorderStyleDictionary((COSDictionary) bs);
@@ -147,7 +147,7 @@ public class PDAnnotationLink extends PD
      */
     public PDDestination getDestination() throws IOException
     {
-        COSBase base = getDictionary().getDictionaryObject( COSName.DEST );
+        COSBase base = getCOSObject().getDictionaryObject( COSName.DEST );
         PDDestination retval = PDDestination.create( base );
 
         return retval;
@@ -160,7 +160,7 @@ public class PDAnnotationLink extends PD
      */
     public void setDestination( PDDestination dest )
     {
-        getDictionary().setItem( COSName.DEST, dest );
+        getCOSObject().setItem( COSName.DEST, dest );
     }
 
     /**
@@ -171,7 +171,7 @@ public class PDAnnotationLink extends PD
      */
     public String getHighlightMode()
     {
-        return getDictionary().getNameAsString( COSName.H, HIGHLIGHT_MODE_INVERT );
+        return getCOSObject().getNameAsString( COSName.H, HIGHLIGHT_MODE_INVERT );
     }
 
     /**
@@ -181,7 +181,7 @@ public class PDAnnotationLink extends PD
      */
     public void setHighlightMode( String mode )
     {
-        getDictionary().setName( COSName.H, mode );
+        getCOSObject().setName( COSName.H, mode );
     }
 
     /**
@@ -192,7 +192,7 @@ public class PDAnnotationLink extends PD
      */
     public void setPreviousURI( PDActionURI pa )
     {
-        getDictionary().setItem( "PA", pa );
+        getCOSObject().setItem( "PA", pa );
     }
 
     /**
@@ -203,7 +203,7 @@ public class PDAnnotationLink extends PD
      */
     public PDActionURI getPreviousURI()
     {
-        COSDictionary pa = (COSDictionary) getDictionary().getDictionaryObject("PA");
+        COSDictionary pa = (COSDictionary) getCOSObject().getDictionaryObject("PA");
         if ( pa != null )
         {
             return new PDActionURI( pa );
@@ -225,7 +225,7 @@ public class PDAnnotationLink extends PD
     {
         COSArray newQuadPoints = new COSArray();
         newQuadPoints.setFloatArray( quadPoints );
-        getDictionary().setItem( "QuadPoints", newQuadPoints );
+        getCOSObject().setItem( "QuadPoints", newQuadPoints );
     }
 
     /**
@@ -236,7 +236,7 @@ public class PDAnnotationLink extends PD
      */
     public float[] getQuadPoints()
     {
-        COSArray quadPoints = (COSArray) getDictionary().getDictionaryObject( "QuadPoints" );
+        COSArray quadPoints = (COSArray) getCOSObject().getDictionaryObject( "QuadPoints" );
         if (quadPoints != null)
         {
             return quadPoints.toFloatArray();

Modified: pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/annotation/PDAnnotationPopup.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/annotation/PDAnnotationPopup.java?rev=1678134&r1=1678133&r2=1678134&view=diff
==============================================================================
--- pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/annotation/PDAnnotationPopup.java (original)
+++ pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/annotation/PDAnnotationPopup.java Thu May  7 06:39:01 2015
@@ -41,8 +41,7 @@ public class PDAnnotationPopup extends P
     public PDAnnotationPopup()
     {
         super();
-        getDictionary()
-                .setItem( COSName.SUBTYPE, COSName.getPDFName( SUB_TYPE ) );
+        getCOSObject().setItem( COSName.SUBTYPE, COSName.getPDFName( SUB_TYPE ) );
     }
 
     /**
@@ -65,7 +64,7 @@ public class PDAnnotationPopup extends P
      */
     public void setOpen( boolean open )
     {
-        getDictionary().setBoolean( "Open" , open );
+        getCOSObject().setBoolean( "Open" , open );
     }
 
     /**
@@ -76,7 +75,7 @@ public class PDAnnotationPopup extends P
      */
     public boolean getOpen()
     {
-        return getDictionary().getBoolean( "Open" , false );
+        return getCOSObject().getBoolean( "Open" , false );
     }
 
     /**
@@ -87,7 +86,7 @@ public class PDAnnotationPopup extends P
      */
     public void setParent( PDAnnotationMarkup annot )
     {
-        getDictionary().setItem( COSName.PARENT, annot.getDictionary() );
+        getCOSObject().setItem( COSName.PARENT, annot.getCOSObject());
     }
 
     /**
@@ -101,7 +100,7 @@ public class PDAnnotationPopup extends P
         try
         {
             am = (PDAnnotationMarkup) PDAnnotation.createAnnotation(
-                    getDictionary().getDictionaryObject(COSName.PARENT, COSName.P));
+                    getCOSObject().getDictionaryObject(COSName.PARENT, COSName.P));
         }
         catch (IOException ioe)
         {

Modified: pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/annotation/PDAnnotationRubberStamp.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/annotation/PDAnnotationRubberStamp.java?rev=1678134&r1=1678133&r2=1678134&view=diff
==============================================================================
--- pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/annotation/PDAnnotationRubberStamp.java (original)
+++ pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/annotation/PDAnnotationRubberStamp.java Thu May  7 06:39:01 2015
@@ -101,7 +101,7 @@ public class PDAnnotationRubberStamp ext
     public PDAnnotationRubberStamp()
     {
         super();
-        getDictionary().setItem( COSName.SUBTYPE, COSName.getPDFName( SUB_TYPE ) );
+        getCOSObject().setItem( COSName.SUBTYPE, COSName.getPDFName( SUB_TYPE ) );
     }
 
     /**
@@ -123,7 +123,7 @@ public class PDAnnotationRubberStamp ext
      */
     public void setName( String name )
     {
-        getDictionary().setName(COSName.NAME, name);
+        getCOSObject().setName(COSName.NAME, name);
     }
 
     /**
@@ -134,6 +134,6 @@ public class PDAnnotationRubberStamp ext
      */
     public String getName()
     {
-        return getDictionary().getNameAsString(COSName.NAME, NAME_DRAFT);
+        return getCOSObject().getNameAsString(COSName.NAME, NAME_DRAFT);
     }
 }

Modified: pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/annotation/PDAnnotationSquareCircle.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/annotation/PDAnnotationSquareCircle.java?rev=1678134&r1=1678133&r2=1678134&view=diff
==============================================================================
--- pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/annotation/PDAnnotationSquareCircle.java (original)
+++ pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/annotation/PDAnnotationSquareCircle.java Thu May  7 06:39:01 2015
@@ -73,7 +73,7 @@ public class PDAnnotationSquareCircle ex
      */
     public void setInteriorColor( PDColor ic )
     {
-        getDictionary().setItem(COSName.IC, ic.toCOSArray());
+        getCOSObject().setItem(COSName.IC, ic.toCOSArray());
     }
 
     /**
@@ -97,7 +97,7 @@ public class PDAnnotationSquareCircle ex
      */
     public void setBorderEffect( PDBorderEffectDictionary be )
     {
-        getDictionary().setItem( "BE", be );
+        getCOSObject().setItem( "BE", be );
     }
 
     /**
@@ -108,7 +108,7 @@ public class PDAnnotationSquareCircle ex
      */
     public PDBorderEffectDictionary getBorderEffect()
     {
-        COSDictionary be = (COSDictionary) getDictionary().getDictionaryObject( "BE" );
+        COSDictionary be = (COSDictionary) getCOSObject().getDictionaryObject( "BE" );
         if (be != null)
         {
             return new PDBorderEffectDictionary( be );
@@ -129,7 +129,7 @@ public class PDAnnotationSquareCircle ex
      */
     public void setRectDifference( PDRectangle rd )
     {
-        getDictionary().setItem( "RD", rd );
+        getCOSObject().setItem( "RD", rd );
     }
 
     /**
@@ -141,7 +141,7 @@ public class PDAnnotationSquareCircle ex
      */
     public PDRectangle getRectDifference()
     {
-        COSArray rd = (COSArray) getDictionary().getDictionaryObject( "RD" );
+        COSArray rd = (COSArray) getCOSObject().getDictionaryObject( "RD" );
         if (rd != null)
         {
             return new PDRectangle( rd );
@@ -160,7 +160,7 @@ public class PDAnnotationSquareCircle ex
      */
     public void setSubtype( String subType )
     {
-        getDictionary().setName( COSName.SUBTYPE, subType );
+        getCOSObject().setName( COSName.SUBTYPE, subType );
     }
 
     /**
@@ -172,7 +172,7 @@ public class PDAnnotationSquareCircle ex
     @Override
     public String getSubtype()
     {
-        return getDictionary().getNameAsString( COSName.SUBTYPE);
+        return getCOSObject().getNameAsString( COSName.SUBTYPE);
     }
 
     /**
@@ -185,7 +185,7 @@ public class PDAnnotationSquareCircle ex
      */
     public void setBorderStyle( PDBorderStyleDictionary bs )
     {
-        this.getDictionary().setItem( "BS", bs);
+        this.getCOSObject().setItem( "BS", bs);
     }
 
     /**
@@ -197,7 +197,7 @@ public class PDAnnotationSquareCircle ex
      */
     public PDBorderStyleDictionary getBorderStyle()
     {
-        COSDictionary bs = (COSDictionary) this.getDictionary().getItem(COSName.BS);
+        COSDictionary bs = (COSDictionary) this.getCOSObject().getItem(COSName.BS);
         if (bs != null)
         {
             return new PDBorderStyleDictionary( bs );

Modified: pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/annotation/PDAnnotationText.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/annotation/PDAnnotationText.java?rev=1678134&r1=1678133&r2=1678134&view=diff
==============================================================================
--- pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/annotation/PDAnnotationText.java (original)
+++ pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/annotation/PDAnnotationText.java Thu May  7 06:39:01 2015
@@ -78,7 +78,7 @@ public class PDAnnotationText extends PD
     public PDAnnotationText()
     {
         super();
-        getDictionary()
+        getCOSObject()
                 .setItem( COSName.SUBTYPE, COSName.getPDFName( SUB_TYPE ) );
     }
 
@@ -102,7 +102,7 @@ public class PDAnnotationText extends PD
      */
     public void setOpen( boolean open )
     {
-        getDictionary().setBoolean( COSName.getPDFName( "Open" ), open );
+        getCOSObject().setBoolean( COSName.getPDFName( "Open" ), open );
     }
 
     /**
@@ -113,7 +113,7 @@ public class PDAnnotationText extends PD
      */
     public boolean getOpen()
     {
-        return getDictionary().getBoolean( COSName.getPDFName( "Open" ), false );
+        return getCOSObject().getBoolean( COSName.getPDFName( "Open" ), false );
     }
 
     /**
@@ -125,7 +125,7 @@ public class PDAnnotationText extends PD
      */
     public void setName( String name )
     {
-        getDictionary().setName( COSName.NAME, name );
+        getCOSObject().setName( COSName.NAME, name );
     }
 
     /**
@@ -136,7 +136,7 @@ public class PDAnnotationText extends PD
      */
     public String getName()
     {
-        return getDictionary().getNameAsString( COSName.NAME, NAME_NOTE );
+        return getCOSObject().getNameAsString( COSName.NAME, NAME_NOTE );
     }
 
     /**
@@ -146,7 +146,7 @@ public class PDAnnotationText extends PD
      */
     public String getState()
     {
-        return this.getDictionary().getString("State");
+        return this.getCOSObject().getString("State");
     }
 
     /**
@@ -156,7 +156,7 @@ public class PDAnnotationText extends PD
      */
     public void setState(String state)
     {
-        this.getDictionary().setString("State", state);
+        this.getCOSObject().setString("State", state);
     }
 
     /**
@@ -166,7 +166,7 @@ public class PDAnnotationText extends PD
      */
     public String getStateModel()
     {
-        return this.getDictionary().getString("StateModel");
+        return this.getCOSObject().getString("StateModel");
     }
 
     /**
@@ -177,7 +177,7 @@ public class PDAnnotationText extends PD
      */
     public void setStateModel(String stateModel)
     {
-        this.getDictionary().setString("StateModel", stateModel);
+        this.getCOSObject().setString("StateModel", stateModel);
     }
 
 }

Modified: pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/annotation/PDAnnotationTextMarkup.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/annotation/PDAnnotationTextMarkup.java?rev=1678134&r1=1678133&r2=1678134&view=diff
==============================================================================
--- pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/annotation/PDAnnotationTextMarkup.java (original)
+++ pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/annotation/PDAnnotationTextMarkup.java Thu May  7 06:39:01 2015
@@ -88,7 +88,7 @@ public class PDAnnotationTextMarkup exte
     {
         COSArray newQuadPoints = new COSArray();
         newQuadPoints.setFloatArray( quadPoints );
-        getDictionary().setItem( "QuadPoints", newQuadPoints );
+        getCOSObject().setItem( "QuadPoints", newQuadPoints );
     }
 
     /**
@@ -99,7 +99,7 @@ public class PDAnnotationTextMarkup exte
      */
     public float[] getQuadPoints()
     {
-        COSArray quadPoints = (COSArray) getDictionary().getDictionaryObject( "QuadPoints" );
+        COSArray quadPoints = (COSArray) getCOSObject().getDictionaryObject( "QuadPoints" );
         if (quadPoints != null)
         {
             return quadPoints.toFloatArray();
@@ -118,7 +118,7 @@ public class PDAnnotationTextMarkup exte
      */
     public void setSubtype( String subType )
     {
-        getDictionary().setName( COSName.SUBTYPE, subType );
+        getCOSObject().setName( COSName.SUBTYPE, subType );
     }
 
     /**
@@ -129,7 +129,7 @@ public class PDAnnotationTextMarkup exte
      */
     public String getSubtype()
     {
-        return getDictionary().getNameAsString( COSName.SUBTYPE);
+        return getCOSObject().getNameAsString( COSName.SUBTYPE);
     }
 
 

Modified: pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/annotation/PDAnnotationWidget.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/annotation/PDAnnotationWidget.java?rev=1678134&r1=1678133&r2=1678134&view=diff
==============================================================================
--- pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/annotation/PDAnnotationWidget.java (original)
+++ pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/annotation/PDAnnotationWidget.java Thu May  7 06:39:01 2015
@@ -42,7 +42,7 @@ public class PDAnnotationWidget extends
     public PDAnnotationWidget()
     {
         super();
-        getDictionary().setName( COSName.SUBTYPE, SUB_TYPE);
+        getCOSObject().setName( COSName.SUBTYPE, SUB_TYPE);
     }
 
 
@@ -55,7 +55,7 @@ public class PDAnnotationWidget extends
     public PDAnnotationWidget(COSDictionary field)
     {
         super( field );
-        getDictionary().setName( COSName.SUBTYPE, SUB_TYPE);
+        getCOSObject().setName( COSName.SUBTYPE, SUB_TYPE);
     }
 
     /**
@@ -80,7 +80,7 @@ public class PDAnnotationWidget extends
      */
     public String getHighlightingMode()
     {
-        return this.getDictionary().getNameAsString(COSName.H, "I");
+        return this.getCOSObject().getNameAsString(COSName.H, "I");
     }
 
     /**
@@ -111,7 +111,7 @@ public class PDAnnotationWidget extends
             || "O".equals(highlightingMode) || "P".equals(highlightingMode)
             || "T".equals(highlightingMode))
         {
-            this.getDictionary().setName(COSName.H, highlightingMode);
+            this.getCOSObject().setName(COSName.H, highlightingMode);
         }
         else
         {
@@ -127,7 +127,7 @@ public class PDAnnotationWidget extends
      */
     public PDAppearanceCharacteristicsDictionary getAppearanceCharacteristics()
     {
-        COSBase mk = this.getDictionary().getDictionaryObject(COSName.MK);
+        COSBase mk = this.getCOSObject().getDictionaryObject(COSName.MK);
         if (mk instanceof COSDictionary)
         {
             return new PDAppearanceCharacteristicsDictionary((COSDictionary) mk);
@@ -142,7 +142,7 @@ public class PDAnnotationWidget extends
      */
     public void setAppearanceCharacteristics(PDAppearanceCharacteristicsDictionary appearanceCharacteristics)
     {
-        this.getDictionary().setItem(COSName.MK, appearanceCharacteristics);
+        this.getCOSObject().setItem(COSName.MK, appearanceCharacteristics);
     }
 
     /**
@@ -153,7 +153,7 @@ public class PDAnnotationWidget extends
     public PDAction getAction()
     {
         COSDictionary action = (COSDictionary)
-            this.getDictionary().getDictionaryObject( COSName.A );
+            this.getCOSObject().getDictionaryObject( COSName.A );
         return PDActionFactory.createAction( action );
     }
 
@@ -164,7 +164,7 @@ public class PDAnnotationWidget extends
      */
     public void setAction( PDAction action )
     {
-        this.getDictionary().setItem( COSName.A, action );
+        this.getCOSObject().setItem( COSName.A, action );
     }
 
     /**
@@ -176,7 +176,7 @@ public class PDAnnotationWidget extends
      */
     public PDAnnotationAdditionalActions getActions()
     {
-        COSDictionary aa = (COSDictionary)this.getDictionary().getDictionaryObject( "AA" );
+        COSDictionary aa = (COSDictionary)this.getCOSObject().getDictionaryObject( "AA" );
         PDAnnotationAdditionalActions retval = null;
         if( aa != null )
         {
@@ -192,7 +192,7 @@ public class PDAnnotationWidget extends
      */
     public void setActions( PDAnnotationAdditionalActions actions )
     {
-        this.getDictionary().setItem( "AA", actions );
+        this.getCOSObject().setItem( "AA", actions );
     }
 
     /**
@@ -204,7 +204,7 @@ public class PDAnnotationWidget extends
      */
     public void setBorderStyle( PDBorderStyleDictionary bs )
     {
-        this.getDictionary().setItem( "BS", bs);
+        this.getCOSObject().setItem( "BS", bs);
     }
 
     /**
@@ -215,7 +215,7 @@ public class PDAnnotationWidget extends
      */
     public PDBorderStyleDictionary getBorderStyle()
     {
-        COSDictionary bs = (COSDictionary) this.getDictionary().getItem(COSName.BS);
+        COSDictionary bs = (COSDictionary) this.getCOSObject().getItem(COSName.BS);
         if (bs != null)
         {
             return new PDBorderStyleDictionary( bs );

Modified: pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/annotation/PDAppearanceCharacteristicsDictionary.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/annotation/PDAppearanceCharacteristicsDictionary.java?rev=1678134&r1=1678133&r2=1678134&view=diff
==============================================================================
--- pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/annotation/PDAppearanceCharacteristicsDictionary.java (original)
+++ pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/annotation/PDAppearanceCharacteristicsDictionary.java Thu May  7 06:39:01 2015
@@ -49,21 +49,17 @@ public class PDAppearanceCharacteristics
         this.dictionary = dict;
     }
 
-
-    /**
-     * returns the dictionary.
-     * @return the dictionary
-     */
     public COSDictionary getDictionary()
     {
         return this.dictionary;
     }
 
     /**
-     * {@inheritDoc}
-     * 
+     * returns the dictionary.
+     * @return the dictionary
      */
-    public COSBase getCOSObject()
+    @Override
+    public COSDictionary getCOSObject()
     {
         return this.dictionary;
     }

Modified: pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/annotation/PDBorderEffectDictionary.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/annotation/PDBorderEffectDictionary.java?rev=1678134&r1=1678133&r2=1678134&view=diff
==============================================================================
--- pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/annotation/PDBorderEffectDictionary.java (original)
+++ pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/annotation/PDBorderEffectDictionary.java Thu May  7 06:39:01 2015
@@ -16,7 +16,6 @@
  */
 package org.apache.pdfbox.pdmodel.interactive.annotation;
 
-import org.apache.pdfbox.cos.COSBase;
 import org.apache.pdfbox.cos.COSDictionary;
 
 import org.apache.pdfbox.pdmodel.common.COSObjectable;
@@ -44,7 +43,7 @@ public class PDBorderEffectDictionary im
      */
     public static final String STYLE_CLOUDY = "C";
 
-    private COSDictionary dictionary;
+    private final COSDictionary dictionary;
 
     /**
      * Constructor.
@@ -70,17 +69,8 @@ public class PDBorderEffectDictionary im
      *
      * @return the dictionary
      */
-    public COSDictionary getDictionary()
-    {
-        return dictionary;
-    }
-
-    /**
-     * returns the dictionary.
-     *
-     * @return the dictionary
-     */
-    public COSBase getCOSObject()
+    @Override
+    public COSDictionary getCOSObject()
     {
         return dictionary;
     }
@@ -93,7 +83,7 @@ public class PDBorderEffectDictionary im
      */
     public void setIntensity( float i )
     {
-        getDictionary().setFloat( "I", i );
+        getCOSObject().setFloat( "I", i );
     }
 
     /**
@@ -103,7 +93,7 @@ public class PDBorderEffectDictionary im
      */
     public float getIntensity()
     {
-        return getDictionary().getFloat( "I", 0 );
+        return getCOSObject().getFloat( "I", 0 );
     }
 
     /**
@@ -114,7 +104,7 @@ public class PDBorderEffectDictionary im
      */
     public void setStyle( String s )
     {
-        getDictionary().setName( "S", s );
+        getCOSObject().setName( "S", s );
     }
 
     /**
@@ -125,7 +115,7 @@ public class PDBorderEffectDictionary im
      */
     public String getStyle()
     {
-        return getDictionary().getNameAsString( "S", STYLE_SOLID );
+        return getCOSObject().getNameAsString( "S", STYLE_SOLID );
     }
 
 }

Modified: pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/annotation/PDBorderStyleDictionary.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/annotation/PDBorderStyleDictionary.java?rev=1678134&r1=1678133&r2=1678134&view=diff
==============================================================================
--- pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/annotation/PDBorderStyleDictionary.java (original)
+++ pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/annotation/PDBorderStyleDictionary.java Thu May  7 06:39:01 2015
@@ -16,7 +16,6 @@
  */
 package org.apache.pdfbox.pdmodel.interactive.annotation;
 
-import org.apache.pdfbox.cos.COSBase;
 import org.apache.pdfbox.cos.COSDictionary;
 import org.apache.pdfbox.cos.COSArray;
 import org.apache.pdfbox.cos.COSInteger;
@@ -62,7 +61,7 @@ public class PDBorderStyleDictionary imp
      */
     public static final String STYLE_UNDERLINE = "U";
 
-    private COSDictionary dictionary;
+    private final COSDictionary dictionary;
 
     /**
      * Constructor.
@@ -88,17 +87,8 @@ public class PDBorderStyleDictionary imp
      *
      * @return the dictionary
      */
-    public COSDictionary getDictionary()
-    {
-        return dictionary;
-    }
-
-    /**
-     * returns the dictionary.
-     *
-     * @return the dictionary
-     */
-    public COSBase getCOSObject()
+    @Override
+    public COSDictionary getCOSObject()
     {
         return dictionary;
     }
@@ -111,7 +101,7 @@ public class PDBorderStyleDictionary imp
      */
     public void setWidth( float w )
     {
-        getDictionary().setFloat( "W", w );
+        getCOSObject().setFloat( "W", w );
     }
 
     /**
@@ -121,7 +111,7 @@ public class PDBorderStyleDictionary imp
      */
     public float getWidth()
     {
-        return getDictionary().getFloat( "W", 1 );
+        return getCOSObject().getFloat( "W", 1 );
     }
 
     /**
@@ -132,7 +122,7 @@ public class PDBorderStyleDictionary imp
      */
     public void setStyle( String s )
     {
-        getDictionary().setName( "S", s );
+        getCOSObject().setName( "S", s );
     }
 
     /**
@@ -143,7 +133,7 @@ public class PDBorderStyleDictionary imp
      */
     public String getStyle()
     {
-        return getDictionary().getNameAsString( "S", STYLE_SOLID );
+        return getCOSObject().getNameAsString( "S", STYLE_SOLID );
     }
 
     /**
@@ -159,7 +149,7 @@ public class PDBorderStyleDictionary imp
         {
             array = dashArray;
         }
-        getDictionary().setItem( "D", array );
+        getCOSObject().setItem( "D", array );
     }
 
     /**
@@ -169,12 +159,12 @@ public class PDBorderStyleDictionary imp
      */
     public PDLineDashPattern getDashStyle()
     {
-        COSArray d = (COSArray) getDictionary().getDictionaryObject( "D" );
+        COSArray d = (COSArray) getCOSObject().getDictionaryObject( "D" );
         if (d == null)
         {
             d = new COSArray();
             d.add( COSInteger.THREE );
-            getDictionary().setItem( "D", d );
+            getCOSObject().setItem( "D", d );
         }
         return new PDLineDashPattern( d, 0 );
     }

Modified: pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/annotation/PDExternalDataDictionary.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/annotation/PDExternalDataDictionary.java?rev=1678134&r1=1678133&r2=1678134&view=diff
==============================================================================
--- pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/annotation/PDExternalDataDictionary.java (original)
+++ pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/annotation/PDExternalDataDictionary.java Thu May  7 06:39:01 2015
@@ -16,7 +16,6 @@
  */
 package org.apache.pdfbox.pdmodel.interactive.annotation;
 
-import org.apache.pdfbox.cos.COSBase;
 import org.apache.pdfbox.cos.COSDictionary;
 import org.apache.pdfbox.cos.COSName;
 import org.apache.pdfbox.pdmodel.common.COSObjectable;
@@ -28,7 +27,7 @@ import org.apache.pdfbox.pdmodel.common.
 public class PDExternalDataDictionary implements COSObjectable
 {
 
-    private COSDictionary dataDictionary;
+    private final COSDictionary dataDictionary;
 
     /**
      * Constructor.
@@ -50,19 +49,12 @@ public class PDExternalDataDictionary im
     }
 
     /**
-     * {@inheritDoc}
-     */
-    public COSBase getCOSObject()
-    {
-        return this.dataDictionary;
-    }
-
-    /**
      * returns the dictionary.
      *
      * @return the dictionary
      */
-    public COSDictionary getDictionary()
+    @Override
+    public COSDictionary getCOSObject()
     {
         return this.dataDictionary;
     }
@@ -74,7 +66,7 @@ public class PDExternalDataDictionary im
      */
     public String getType()
     {
-        return this.getDictionary().getNameAsString(COSName.TYPE, "ExData");
+        return this.getCOSObject().getNameAsString(COSName.TYPE, "ExData");
     }
 
     /**
@@ -83,7 +75,7 @@ public class PDExternalDataDictionary im
      */
     public String getSubtype()
     {
-        return this.getDictionary().getNameAsString(COSName.SUBTYPE);
+        return this.getCOSObject().getNameAsString(COSName.SUBTYPE);
     }
 
     /**
@@ -92,7 +84,7 @@ public class PDExternalDataDictionary im
      */
     public void setSubtype(String subtype)
     {
-        this.getDictionary().setName(COSName.SUBTYPE, subtype);
+        this.getCOSObject().setName(COSName.SUBTYPE, subtype);
     }
 
 }

Modified: pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/digitalsignature/visible/PDVisibleSigBuilder.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/digitalsignature/visible/PDVisibleSigBuilder.java?rev=1678134&r1=1678133&r2=1678134&view=diff
==============================================================================
--- pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/digitalsignature/visible/PDVisibleSigBuilder.java (original)
+++ pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/digitalsignature/visible/PDVisibleSigBuilder.java Thu May  7 06:39:01 2015
@@ -363,7 +363,7 @@ public class PDVisibleSigBuilder impleme
     public void createWidgetDictionary(PDSignatureField signatureField,
                                        PDResources holderFormResources) throws IOException
     {
-        COSDictionary widgetDict = signatureField.getWidget().getDictionary();
+        COSDictionary widgetDict = signatureField.getWidget().getCOSObject();
         widgetDict.setNeedToBeUpdated(true);
         widgetDict.setItem(COSName.DR, holderFormResources.getCOSObject());
 

Modified: pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/form/AppearanceGeneratorHelper.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/form/AppearanceGeneratorHelper.java?rev=1678134&r1=1678133&r2=1678134&view=diff
==============================================================================
--- pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/form/AppearanceGeneratorHelper.java (original)
+++ pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/form/AppearanceGeneratorHelper.java Thu May  7 06:39:01 2015
@@ -171,7 +171,7 @@ class AppearanceGeneratorHelper
             // in case all tests fail the field will be formatted by acrobat
             // when it is opened. See FreedomExpressions.pdf for an example of this.  
             if (actions == null || actions.getF() == null || 
-                    widget.getDictionary().getDictionaryObject(COSName.AP) != null)
+                    widget.getCOSObject().getDictionaryObject(COSName.AP) != null)
             {
                 PDAppearanceDictionary appearance = widget.getAppearance();
                 if (appearance == null)