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 21:24:06 UTC
svn commit: r1678259 - in
/pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/documentinterchange/logicalstructure:
PDMarkedContentReference.java PDObjectReference.java
PDStructureElement.java PDStructureNode.java PDStructureTreeRoot.java
Author: tilman
Date: Thu May 7 19:24:06 2015
New Revision: 1678259
URL: http://svn.apache.org/r1678259
Log:
PDFBOX-2783: Use getCOSObject() instead of getDictionary()
Modified:
pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/documentinterchange/logicalstructure/PDMarkedContentReference.java
pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/documentinterchange/logicalstructure/PDObjectReference.java
pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/documentinterchange/logicalstructure/PDStructureElement.java
pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/documentinterchange/logicalstructure/PDStructureNode.java
pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/documentinterchange/logicalstructure/PDStructureTreeRoot.java
Modified: pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/documentinterchange/logicalstructure/PDMarkedContentReference.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/documentinterchange/logicalstructure/PDMarkedContentReference.java?rev=1678259&r1=1678258&r2=1678259&view=diff
==============================================================================
--- pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/documentinterchange/logicalstructure/PDMarkedContentReference.java (original)
+++ pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/documentinterchange/logicalstructure/PDMarkedContentReference.java Thu May 7 19:24:06 2015
@@ -16,7 +16,6 @@
*/
package org.apache.pdfbox.pdmodel.documentinterchange.logicalstructure;
-import org.apache.pdfbox.cos.COSBase;
import org.apache.pdfbox.cos.COSDictionary;
import org.apache.pdfbox.cos.COSName;
import org.apache.pdfbox.pdmodel.PDPage;
@@ -29,12 +28,15 @@ import org.apache.pdfbox.pdmodel.common.
*/
public class PDMarkedContentReference implements COSObjectable
{
-
public static final String TYPE = "MCR";
private final COSDictionary dictionary;
-
- public COSDictionary getCOSDictionary()
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public COSDictionary getCOSObject()
{
return this.dictionary;
}
@@ -59,23 +61,13 @@ public class PDMarkedContentReference im
}
/**
- * {@inheritDoc}
- */
- @Override
- public COSBase getCOSObject()
- {
- return this.dictionary;
- }
-
- /**
* Gets the page.
*
* @return the page
*/
public PDPage getPage()
{
- COSDictionary pg = (COSDictionary) this.getCOSDictionary()
- .getDictionaryObject(COSName.PG);
+ COSDictionary pg = (COSDictionary) this.getCOSObject().getDictionaryObject(COSName.PG);
if (pg != null)
{
return new PDPage(pg);
@@ -90,7 +82,7 @@ public class PDMarkedContentReference im
*/
public void setPage(PDPage page)
{
- this.getCOSDictionary().setItem(COSName.PG, page);
+ this.getCOSObject().setItem(COSName.PG, page);
}
/**
@@ -100,7 +92,7 @@ public class PDMarkedContentReference im
*/
public int getMCID()
{
- return this.getCOSDictionary().getInt(COSName.MCID);
+ return this.getCOSObject().getInt(COSName.MCID);
}
/**
@@ -110,15 +102,14 @@ public class PDMarkedContentReference im
*/
public void setMCID(int mcid)
{
- this.getCOSDictionary().setInt(COSName.MCID, mcid);
+ this.getCOSObject().setInt(COSName.MCID, mcid);
}
@Override
public String toString()
{
- return new StringBuilder()
- .append("mcid=").append(this.getMCID()).toString();
+ return new StringBuilder().append("mcid=").append(this.getMCID()).toString();
}
}
Modified: pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/documentinterchange/logicalstructure/PDObjectReference.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/documentinterchange/logicalstructure/PDObjectReference.java?rev=1678259&r1=1678258&r2=1678259&view=diff
==============================================================================
--- pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/documentinterchange/logicalstructure/PDObjectReference.java (original)
+++ pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/documentinterchange/logicalstructure/PDObjectReference.java Thu May 7 19:24:06 2015
@@ -46,7 +46,8 @@ public class PDObjectReference implement
*
* @return the dictionary
*/
- public COSDictionary getCOSDictionary()
+ @Override
+ public COSDictionary getCOSObject()
{
return this.dictionary;
}
@@ -72,15 +73,6 @@ public class PDObjectReference implement
}
/**
- * {@inheritDoc}
- */
- @Override
- public COSBase getCOSObject()
- {
- return this.dictionary;
- }
-
- /**
* Gets a higher-level object for the referenced object.
* Currently this method may return a {@link PDAnnotation},
* a {@link PDXObject} or <code>null</code>.
@@ -89,7 +81,7 @@ public class PDObjectReference implement
*/
public COSObjectable getReferencedObject()
{
- COSBase obj = this.getCOSDictionary().getDictionaryObject(COSName.OBJ);
+ COSBase obj = this.getCOSObject().getDictionaryObject(COSName.OBJ);
if (!(obj instanceof COSDictionary))
{
return null;
@@ -129,7 +121,7 @@ public class PDObjectReference implement
*/
public void setReferencedObject(PDAnnotation annotation)
{
- this.getCOSDictionary().setItem(COSName.OBJ, annotation);
+ this.getCOSObject().setItem(COSName.OBJ, annotation);
}
/**
@@ -139,7 +131,7 @@ public class PDObjectReference implement
*/
public void setReferencedObject(PDXObject xobject)
{
- this.getCOSDictionary().setItem(COSName.OBJ, xobject);
+ this.getCOSObject().setItem(COSName.OBJ, xobject);
}
}
Modified: pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/documentinterchange/logicalstructure/PDStructureElement.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/documentinterchange/logicalstructure/PDStructureElement.java?rev=1678259&r1=1678258&r2=1678259&view=diff
==============================================================================
--- pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/documentinterchange/logicalstructure/PDStructureElement.java (original)
+++ pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/documentinterchange/logicalstructure/PDStructureElement.java Thu May 7 19:24:06 2015
@@ -70,7 +70,7 @@ public class PDStructureElement extends
*/
public String getStructureType()
{
- return this.getCOSDictionary().getNameAsString(COSName.S);
+ return this.getCOSObject().getNameAsString(COSName.S);
}
/**
@@ -80,7 +80,7 @@ public class PDStructureElement extends
*/
public final void setStructureType(String structureType)
{
- this.getCOSDictionary().setName(COSName.S, structureType);
+ this.getCOSObject().setName(COSName.S, structureType);
}
/**
@@ -90,8 +90,7 @@ public class PDStructureElement extends
*/
public PDStructureNode getParent()
{
- COSDictionary p = (COSDictionary) this.getCOSDictionary()
- .getDictionaryObject(COSName.P);
+ COSDictionary p = (COSDictionary) this.getCOSObject().getDictionaryObject(COSName.P);
if (p == null)
{
return null;
@@ -106,7 +105,7 @@ public class PDStructureElement extends
*/
public final void setParent(PDStructureNode structureNode)
{
- this.getCOSDictionary().setItem(COSName.P, structureNode);
+ this.getCOSObject().setItem(COSName.P, structureNode);
}
/**
@@ -116,7 +115,7 @@ public class PDStructureElement extends
*/
public String getElementIdentifier()
{
- return this.getCOSDictionary().getString(COSName.ID);
+ return this.getCOSObject().getString(COSName.ID);
}
/**
@@ -126,7 +125,7 @@ public class PDStructureElement extends
*/
public void setElementIdentifier(String id)
{
- this.getCOSDictionary().setString(COSName.ID, id);
+ this.getCOSObject().setString(COSName.ID, id);
}
/**
@@ -138,8 +137,7 @@ public class PDStructureElement extends
*/
public PDPage getPage()
{
- COSDictionary pageDic = (COSDictionary) this.getCOSDictionary()
- .getDictionaryObject(COSName.PG);
+ COSDictionary pageDic = (COSDictionary) this.getCOSObject().getDictionaryObject(COSName.PG);
if (pageDic == null)
{
return null;
@@ -155,7 +153,7 @@ public class PDStructureElement extends
*/
public void setPage(PDPage page)
{
- this.getCOSDictionary().setItem(COSName.PG, page);
+ this.getCOSObject().setItem(COSName.PG, page);
}
/**
@@ -167,7 +165,7 @@ public class PDStructureElement extends
{
Revisions<PDAttributeObject> attributes =
new Revisions<PDAttributeObject>();
- COSBase a = this.getCOSDictionary().getDictionaryObject(COSName.A);
+ COSBase a = this.getCOSObject().getDictionaryObject(COSName.A);
if (a instanceof COSArray)
{
COSArray aa = (COSArray) a;
@@ -210,7 +208,7 @@ public class PDStructureElement extends
{
PDAttributeObject attributeObject = attributes.getObject(0);
attributeObject.setStructureElement(this);
- this.getCOSDictionary().setItem(key, attributeObject);
+ this.getCOSObject().setItem(key, attributeObject);
return;
}
COSArray array = new COSArray();
@@ -226,7 +224,7 @@ public class PDStructureElement extends
array.add(attributeObject);
array.add(COSInteger.get(revisionNumber));
}
- this.getCOSDictionary().setItem(key, array);
+ this.getCOSObject().setItem(key, array);
}
/**
@@ -238,7 +236,7 @@ public class PDStructureElement extends
{
COSName key = COSName.A;
attributeObject.setStructureElement(this);
- COSBase a = this.getCOSDictionary().getDictionaryObject(key);
+ COSBase a = this.getCOSObject().getDictionaryObject(key);
COSArray array;
if (a instanceof COSArray)
{
@@ -253,7 +251,7 @@ public class PDStructureElement extends
array.add(COSInteger.get(0));
}
}
- this.getCOSDictionary().setItem(key, array);
+ this.getCOSObject().setItem(key, array);
array.add(attributeObject);
array.add(COSInteger.get(this.getRevisionNumber()));
}
@@ -266,14 +264,14 @@ public class PDStructureElement extends
public void removeAttribute(PDAttributeObject attributeObject)
{
COSName key = COSName.A;
- COSBase a = this.getCOSDictionary().getDictionaryObject(key);
+ COSBase a = this.getCOSObject().getDictionaryObject(key);
if (a instanceof COSArray)
{
COSArray array = (COSArray) a;
array.remove(attributeObject.getCOSObject());
if ((array.size() == 2) && (array.getInt(1) == 0))
{
- this.getCOSDictionary().setItem(key, array.getObject(0));
+ this.getCOSObject().setItem(key, array.getObject(0));
}
}
else
@@ -285,7 +283,7 @@ public class PDStructureElement extends
}
if (attributeObject.getCOSObject().equals(directA))
{
- this.getCOSDictionary().setItem(key, null);
+ this.getCOSObject().setItem(key, null);
}
}
attributeObject.setStructureElement(null);
@@ -299,7 +297,7 @@ public class PDStructureElement extends
public void attributeChanged(PDAttributeObject attributeObject)
{
COSName key = COSName.A;
- COSBase a = this.getCOSDictionary().getDictionaryObject(key);
+ COSBase a = this.getCOSObject().getDictionaryObject(key);
if (a instanceof COSArray)
{
COSArray array = (COSArray) a;
@@ -321,7 +319,7 @@ public class PDStructureElement extends
COSArray array = new COSArray();
array.add(a);
array.add(COSInteger.get(this.getRevisionNumber()));
- this.getCOSDictionary().setItem(key, array);
+ this.getCOSObject().setItem(key, array);
}
}
@@ -334,7 +332,7 @@ public class PDStructureElement extends
{
COSName key = COSName.C;
Revisions<String> classNames = new Revisions<String>();
- COSBase c = this.getCOSDictionary().getDictionaryObject(key);
+ COSBase c = this.getCOSObject().getDictionaryObject(key);
if (c instanceof COSName)
{
classNames.addObject(((COSName) c).getName(), 0);
@@ -377,7 +375,7 @@ public class PDStructureElement extends
if ((classNames.size() == 1) && (classNames.getRevisionNumber(0) == 0))
{
String className = classNames.getObject(0);
- this.getCOSDictionary().setName(key, className);
+ this.getCOSObject().setName(key, className);
return;
}
COSArray array = new COSArray();
@@ -392,7 +390,7 @@ public class PDStructureElement extends
array.add(COSName.getPDFName(className));
array.add(COSInteger.get(revisionNumber));
}
- this.getCOSDictionary().setItem(key, array);
+ this.getCOSObject().setItem(key, array);
}
/**
@@ -407,7 +405,7 @@ public class PDStructureElement extends
return;
}
COSName key = COSName.C;
- COSBase c = this.getCOSDictionary().getDictionaryObject(key);
+ COSBase c = this.getCOSObject().getDictionaryObject(key);
COSArray array;
if (c instanceof COSArray)
{
@@ -422,7 +420,7 @@ public class PDStructureElement extends
array.add(COSInteger.get(0));
}
}
- this.getCOSDictionary().setItem(key, array);
+ this.getCOSObject().setItem(key, array);
array.add(COSName.getPDFName(className));
array.add(COSInteger.get(this.getRevisionNumber()));
}
@@ -439,7 +437,7 @@ public class PDStructureElement extends
return;
}
COSName key = COSName.C;
- COSBase c = this.getCOSDictionary().getDictionaryObject(key);
+ COSBase c = this.getCOSObject().getDictionaryObject(key);
COSName name = COSName.getPDFName(className);
if (c instanceof COSArray)
{
@@ -447,7 +445,7 @@ public class PDStructureElement extends
array.remove(name);
if ((array.size() == 2) && (array.getInt(1) == 0))
{
- this.getCOSDictionary().setItem(key, array.getObject(0));
+ this.getCOSObject().setItem(key, array.getObject(0));
}
}
else
@@ -459,7 +457,7 @@ public class PDStructureElement extends
}
if (name.equals(directC))
{
- this.getCOSDictionary().setItem(key, null);
+ this.getCOSObject().setItem(key, null);
}
}
}
@@ -471,7 +469,7 @@ public class PDStructureElement extends
*/
public int getRevisionNumber()
{
- return this.getCOSDictionary().getInt(COSName.R, 0);
+ return this.getCOSObject().getInt(COSName.R, 0);
}
/**
@@ -485,7 +483,7 @@ public class PDStructureElement extends
{
throw new IllegalArgumentException("The revision number shall be > -1");
}
- this.getCOSDictionary().setInt(COSName.R, revisionNumber);
+ this.getCOSObject().setInt(COSName.R, revisionNumber);
}
/**
@@ -503,7 +501,7 @@ public class PDStructureElement extends
*/
public String getTitle()
{
- return this.getCOSDictionary().getString(COSName.T);
+ return this.getCOSObject().getString(COSName.T);
}
/**
@@ -513,7 +511,7 @@ public class PDStructureElement extends
*/
public void setTitle(String title)
{
- this.getCOSDictionary().setString(COSName.T, title);
+ this.getCOSObject().setString(COSName.T, title);
}
/**
@@ -523,7 +521,7 @@ public class PDStructureElement extends
*/
public String getLanguage()
{
- return this.getCOSDictionary().getString(COSName.LANG);
+ return this.getCOSObject().getString(COSName.LANG);
}
/**
@@ -533,7 +531,7 @@ public class PDStructureElement extends
*/
public void setLanguage(String language)
{
- this.getCOSDictionary().setString(COSName.LANG, language);
+ this.getCOSObject().setString(COSName.LANG, language);
}
/**
@@ -543,7 +541,7 @@ public class PDStructureElement extends
*/
public String getAlternateDescription()
{
- return this.getCOSDictionary().getString(COSName.ALT);
+ return this.getCOSObject().getString(COSName.ALT);
}
/**
@@ -553,7 +551,7 @@ public class PDStructureElement extends
*/
public void setAlternateDescription(String alternateDescription)
{
- this.getCOSDictionary().setString(COSName.ALT, alternateDescription);
+ this.getCOSObject().setString(COSName.ALT, alternateDescription);
}
/**
@@ -563,7 +561,7 @@ public class PDStructureElement extends
*/
public String getExpandedForm()
{
- return this.getCOSDictionary().getString(COSName.E);
+ return this.getCOSObject().getString(COSName.E);
}
/**
@@ -573,7 +571,7 @@ public class PDStructureElement extends
*/
public void setExpandedForm(String expandedForm)
{
- this.getCOSDictionary().setString(COSName.E, expandedForm);
+ this.getCOSObject().setString(COSName.E, expandedForm);
}
/**
@@ -583,7 +581,7 @@ public class PDStructureElement extends
*/
public String getActualText()
{
- return this.getCOSDictionary().getString(COSName.ACTUAL_TEXT);
+ return this.getCOSObject().getString(COSName.ACTUAL_TEXT);
}
/**
@@ -593,7 +591,7 @@ public class PDStructureElement extends
*/
public void setActualText(String actualText)
{
- this.getCOSDictionary().setString(COSName.ACTUAL_TEXT, actualText);
+ this.getCOSObject().setString(COSName.ACTUAL_TEXT, actualText);
}
/**
Modified: pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/documentinterchange/logicalstructure/PDStructureNode.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/documentinterchange/logicalstructure/PDStructureNode.java?rev=1678259&r1=1678258&r2=1678259&view=diff
==============================================================================
--- pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/documentinterchange/logicalstructure/PDStructureNode.java (original)
+++ pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/documentinterchange/logicalstructure/PDStructureNode.java Thu May 7 19:24:06 2015
@@ -61,7 +61,10 @@ public abstract class PDStructureNode im
private final COSDictionary dictionary;
- public COSDictionary getCOSDictionary()
+ /**
+ * {@inheritDoc}
+ */
+ public COSDictionary getCOSObject()
{
return dictionary;
}
@@ -88,22 +91,13 @@ public abstract class PDStructureNode im
}
/**
- * {@inheritDoc}
- */
- @Override
- public COSBase getCOSObject()
- {
- return this.dictionary;
- }
-
- /**
* Returns the type.
*
* @return the type
*/
public String getType()
{
- return this.getCOSDictionary().getNameAsString(COSName.TYPE);
+ return this.getCOSObject().getNameAsString(COSName.TYPE);
}
/**
@@ -114,7 +108,7 @@ public abstract class PDStructureNode im
public List<Object> getKids()
{
List<Object> kidObjects = new ArrayList<Object>();
- COSBase k = this.getCOSDictionary().getDictionaryObject(COSName.K);
+ COSBase k = this.getCOSObject().getDictionaryObject(COSName.K);
if (k instanceof COSArray)
{
Iterator<COSBase> kids = ((COSArray) k).iterator();
@@ -146,7 +140,7 @@ public abstract class PDStructureNode im
*/
public void setKids(List<Object> kids)
{
- this.getCOSDictionary().setItem(COSName.K,
+ this.getCOSObject().setItem(COSName.K,
COSArrayList.converterToCOSArray(kids));
}
@@ -186,11 +180,11 @@ public abstract class PDStructureNode im
{
return;
}
- COSBase k = this.getCOSDictionary().getDictionaryObject(COSName.K);
+ COSBase k = this.getCOSObject().getDictionaryObject(COSName.K);
if (k == null)
{
// currently no kid: set new kid as kids
- this.getCOSDictionary().setItem(COSName.K, object);
+ this.getCOSObject().setItem(COSName.K, object);
}
else if (k instanceof COSArray)
{
@@ -204,7 +198,7 @@ public abstract class PDStructureNode im
COSArray array = new COSArray();
array.add(k);
array.add(object);
- this.getCOSDictionary().setItem(COSName.K, array);
+ this.getCOSObject().setItem(COSName.K, array);
}
}
@@ -246,7 +240,7 @@ public abstract class PDStructureNode im
{
return;
}
- COSBase k = this.getCOSDictionary().getDictionaryObject(COSName.K);
+ COSBase k = this.getCOSObject().getDictionaryObject(COSName.K);
if (k == null)
{
return;
@@ -279,7 +273,7 @@ public abstract class PDStructureNode im
COSArray array = new COSArray();
array.add(newKid);
array.add(refKidBase);
- this.getCOSDictionary().setItem(COSName.K, array);
+ this.getCOSObject().setItem(COSName.K, array);
}
}
}
@@ -327,7 +321,7 @@ public abstract class PDStructureNode im
{
return false;
}
- COSBase k = this.getCOSDictionary().getDictionaryObject(COSName.K);
+ COSBase k = this.getCOSObject().getDictionaryObject(COSName.K);
if (k == null)
{
// no kids: objectable is not a kid
@@ -341,7 +335,7 @@ public abstract class PDStructureNode im
// if now only one kid: set remaining kid as kids
if (array.size() == 1)
{
- this.getCOSDictionary().setItem(COSName.K, array.getObject(0));
+ this.getCOSObject().setItem(COSName.K, array.getObject(0));
}
return removed;
}
@@ -356,7 +350,7 @@ public abstract class PDStructureNode im
}
if (onlyKid)
{
- this.getCOSDictionary().setItem(COSName.K, null);
+ this.getCOSObject().setItem(COSName.K, null);
return true;
}
return false;
Modified: pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/documentinterchange/logicalstructure/PDStructureTreeRoot.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/documentinterchange/logicalstructure/PDStructureTreeRoot.java?rev=1678259&r1=1678258&r2=1678259&view=diff
==============================================================================
--- pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/documentinterchange/logicalstructure/PDStructureTreeRoot.java (original)
+++ pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/documentinterchange/logicalstructure/PDStructureTreeRoot.java Thu May 7 19:24:06 2015
@@ -73,7 +73,7 @@ public class PDStructureTreeRoot extends
*/
public COSArray getKArray()
{
- COSBase k = this.getCOSDictionary().getDictionaryObject(COSName.K);
+ COSBase k = this.getCOSObject().getDictionaryObject(COSName.K);
if (k != null)
{
if (k instanceof COSDictionary)
@@ -100,7 +100,7 @@ public class PDStructureTreeRoot extends
*/
public COSBase getK()
{
- return this.getCOSDictionary().getDictionaryObject(COSName.K);
+ return this.getCOSObject().getDictionaryObject(COSName.K);
}
/**
@@ -110,7 +110,7 @@ public class PDStructureTreeRoot extends
*/
public void setK(COSBase k)
{
- this.getCOSDictionary().setItem(COSName.K, k);
+ this.getCOSObject().setItem(COSName.K, k);
}
/**
@@ -120,7 +120,7 @@ public class PDStructureTreeRoot extends
*/
public PDNameTreeNode getIDTree()
{
- COSDictionary idTreeDic = (COSDictionary) this.getCOSDictionary().getDictionaryObject(COSName.ID_TREE);
+ COSDictionary idTreeDic = (COSDictionary) this.getCOSObject().getDictionaryObject(COSName.ID_TREE);
if (idTreeDic != null)
{
return new PDNameTreeNode(idTreeDic, PDStructureElement.class);
@@ -135,7 +135,7 @@ public class PDStructureTreeRoot extends
*/
public void setIDTree(PDNameTreeNode idTree)
{
- this.getCOSDictionary().setItem(COSName.ID_TREE, idTree);
+ this.getCOSObject().setItem(COSName.ID_TREE, idTree);
}
/**
@@ -145,7 +145,7 @@ public class PDStructureTreeRoot extends
*/
public PDNumberTreeNode getParentTree()
{
- COSDictionary parentTreeDic = (COSDictionary) this.getCOSDictionary().getDictionaryObject(COSName.PARENT_TREE);
+ COSDictionary parentTreeDic = (COSDictionary) this.getCOSObject().getDictionaryObject(COSName.PARENT_TREE);
if (parentTreeDic != null)
{
return new PDNumberTreeNode(parentTreeDic, COSBase.class);
@@ -160,7 +160,7 @@ public class PDStructureTreeRoot extends
*/
public void setParentTree(PDNumberTreeNode parentTree)
{
- this.getCOSDictionary().setItem(COSName.PARENT_TREE, parentTree);
+ this.getCOSObject().setItem(COSName.PARENT_TREE, parentTree);
}
/**
@@ -170,7 +170,7 @@ public class PDStructureTreeRoot extends
*/
public int getParentTreeNextKey()
{
- return this.getCOSDictionary().getInt(COSName.PARENT_TREE_NEXT_KEY);
+ return this.getCOSObject().getInt(COSName.PARENT_TREE_NEXT_KEY);
}
/**
@@ -180,7 +180,7 @@ public class PDStructureTreeRoot extends
*/
public void setParentTreeNextKey(int parentTreeNextkey)
{
- this.getCOSDictionary().setInt(COSName.PARENT_TREE_NEXT_KEY, parentTreeNextkey);
+ this.getCOSObject().setInt(COSName.PARENT_TREE_NEXT_KEY, parentTreeNextkey);
}
/**
@@ -190,7 +190,7 @@ public class PDStructureTreeRoot extends
*/
public Map<String, Object> getRoleMap()
{
- COSBase rm = this.getCOSDictionary().getDictionaryObject(COSName.ROLE_MAP);
+ COSBase rm = this.getCOSObject().getDictionaryObject(COSName.ROLE_MAP);
if (rm instanceof COSDictionary)
{
try
@@ -217,7 +217,7 @@ public class PDStructureTreeRoot extends
{
rmDic.setName(entry.getKey(), entry.getValue());
}
- this.getCOSDictionary().setItem(COSName.ROLE_MAP, rmDic);
+ this.getCOSObject().setItem(COSName.ROLE_MAP, rmDic);
}
}