You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pdfbox.apache.org by le...@apache.org on 2018/03/19 19:15:44 UTC
svn commit: r1827231 - in
/pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/pdmodel:
PDDocument.java PDDocumentCatalog.java PDPage.java PDPageContentStream.java
PDPageTree.java PDResources.java PageLayout.java PageMode.java
ResourceCache.java
Author: lehmi
Date: Mon Mar 19 19:15:43 2018
New Revision: 1827231
URL: http://svn.apache.org/viewvc?rev=1827231&view=rev
Log:
PDFBOX-4071: fix javadoc
Modified:
pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/PDDocument.java
pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/PDDocumentCatalog.java
pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/PDPage.java
pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/PDPageContentStream.java
pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/PDPageTree.java
pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/PDResources.java
pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/PageLayout.java
pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/PageMode.java
pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/ResourceCache.java
Modified: pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/PDDocument.java
URL: http://svn.apache.org/viewvc/pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/PDDocument.java?rev=1827231&r1=1827230&r2=1827231&view=diff
==============================================================================
--- pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/PDDocument.java (original)
+++ pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/PDDocument.java Mon Mar 19 19:15:43 2018
@@ -1596,6 +1596,8 @@ public class PDDocument implements Close
/**
* Returns the resource cache associated with this document, or null if there is none.
+ *
+ * @return the resource cache or null.
*/
public ResourceCache getResourceCache()
{
Modified: pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/PDDocumentCatalog.java
URL: http://svn.apache.org/viewvc/pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/PDDocumentCatalog.java?rev=1827231&r1=1827230&r2=1827231&view=diff
==============================================================================
--- pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/PDDocumentCatalog.java (original)
+++ pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/PDDocumentCatalog.java Mon Mar 19 19:15:43 2018
@@ -124,6 +124,8 @@ public class PDDocumentCatalog implement
/**
* Returns all pages in the document, as a page tree.
+ *
+ * @return the page tree of all pages
*/
public PDPageTree getPages()
{
@@ -175,6 +177,8 @@ public class PDDocumentCatalog implement
/**
* Returns the document's article threads.
+ *
+ * @return a list containing all article threads.
*/
public List<PDThread> getThreads()
{
@@ -445,6 +449,8 @@ public class PDDocumentCatalog implement
/**
* Returns the page display mode.
+ *
+ * @return the page mode.
*/
public PageMode getPageMode()
{
@@ -478,6 +484,8 @@ public class PDDocumentCatalog implement
/**
* Returns the page layout.
+ *
+ * @return the page layout.
*/
public PageLayout getPageLayout()
{
@@ -504,6 +512,8 @@ public class PDDocumentCatalog implement
/**
* Returns the document-level URI.
+ *
+ * @return the document-level URI
*/
public PDURIDictionary getURI()
{
@@ -523,6 +533,8 @@ public class PDDocumentCatalog implement
/**
* Get the document's structure tree root, or null if none exists.
+ *
+ * @return the structure tree root.
*/
public PDStructureTreeRoot getStructureTreeRoot()
{
@@ -542,6 +554,8 @@ public class PDDocumentCatalog implement
/**
* Returns the language for the document, or null.
+ *
+ * @return the language or null.
*/
public String getLanguage()
{
Modified: pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/PDPage.java
URL: http://svn.apache.org/viewvc/pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/PDPage.java?rev=1827231&r1=1827230&r2=1827231&view=diff
==============================================================================
--- pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/PDPage.java (original)
+++ pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/PDPage.java Mon Mar 19 19:15:43 2018
@@ -178,6 +178,8 @@ public class PDPage implements COSObject
/**
* Returns true if this page has contents.
+ *
+ * @return true if the page has contents.
*/
public boolean hasContents()
{
@@ -264,8 +266,10 @@ public class PDPage implements COSObject
}
/**
- * A rectangle, expressed in default user space units, defining the boundaries of the physical
- * medium on which the page is intended to be displayed or printed.
+ * A rectangle, expressed in default user space units, defining the boundaries of the physical medium on which the
+ * page is intended to be displayed or printed.
+ *
+ * @return the media box.
*/
public PDRectangle getMediaBox()
{
@@ -304,9 +308,10 @@ public class PDPage implements COSObject
}
/**
- * A rectangle, expressed in default user space units, defining the visible region of default
- * user space. When the page is displayed or printed, its contents are to be clipped (cropped)
- * to this rectangle.
+ * A rectangle, expressed in default user space units, defining the visible region of default user space. When the
+ * page is displayed or printed, its contents are to be clipped (cropped) to this rectangle.
+ *
+ * @return the crop box.
*/
public PDRectangle getCropBox()
{
@@ -724,6 +729,8 @@ public class PDPage implements COSObject
/**
* Returns the resource cache associated with this page, or null if there is none.
+ *
+ * @return the resource cache associated to this page.
*/
public ResourceCache getResourceCache()
{
Modified: pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/PDPageContentStream.java
URL: http://svn.apache.org/viewvc/pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/PDPageContentStream.java?rev=1827231&r1=1827230&r2=1827231&view=diff
==============================================================================
--- pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/PDPageContentStream.java (original)
+++ pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/PDPageContentStream.java Mon Mar 19 19:15:43 2018
@@ -2374,10 +2374,11 @@ public final class PDPageContentStream i
/**
* Write a comment line.
*
- * @param comment
+ * @param comment the comment to be added to the content stream.
+ *
* @throws IOException If the content stream could not be written.
- * @throws IllegalArgumentException If the comment contains a newline. This is not allowed,
- * because the next line could be ordinary PDF content.
+ * @throws IllegalArgumentException If the comment contains a newline. This is not allowed, because the next line
+ * could be ordinary PDF content.
*/
public void addComment(String comment) throws IOException
{
@@ -2392,6 +2393,10 @@ public final class PDPageContentStream i
/**
* Writes a real number to the content stream.
+ *
+ * @param real the float value to be added to the content stream.
+ *
+ * @throws IOException if something went wrong
*/
protected void writeOperand(float real) throws IOException
{
Modified: pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/PDPageTree.java
URL: http://svn.apache.org/viewvc/pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/PDPageTree.java?rev=1827231&r1=1827230&r2=1827231&view=diff
==============================================================================
--- pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/PDPageTree.java (original)
+++ pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/PDPageTree.java Mon Mar 19 19:15:43 2018
@@ -203,6 +203,8 @@ public class PDPageTree implements COSOb
* Returns the page at the given index.
*
* @param index zero-based index
+ *
+ * @return the page at the given index.
*/
public PDPage get(int index)
{
@@ -363,8 +365,9 @@ public class PDPageTree implements COSOb
}
/**
- * Returns the number of leaf nodes (page objects) that are descendants of this root within the
- * page tree.
+ * Returns the number of leaf nodes (page objects) that are descendants of this root within the page tree.
+ *
+ * @return the number of leaf nodes.
*/
public int getCount()
{
Modified: pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/PDResources.java
URL: http://svn.apache.org/viewvc/pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/PDResources.java?rev=1827231&r1=1827230&r2=1827231&view=diff
==============================================================================
--- pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/PDResources.java (original)
+++ pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/PDResources.java Mon Mar 19 19:15:43 2018
@@ -110,6 +110,9 @@ public final class PDResources implement
* Returns the font resource with the given name, or null if none exists.
*
* @param name Name of the font resource.
+ *
+ * @return the font resource with the given name.
+ *
* @throws IOException if something went wrong.
*/
public PDFont getFont(COSName name) throws IOException
@@ -212,6 +215,8 @@ public final class PDResources implement
* Returns true if the given color space name exists in these resources.
*
* @param name Name of the color space resource.
+ *
+ * @return true if the color space with the given name exists.
*/
public boolean hasColorSpace(COSName name)
{
@@ -219,10 +224,11 @@ public final class PDResources implement
}
/**
- * Returns the extended graphics state resource with the given name, or null
- * if none exists.
+ * Returns the extended graphics state resource with the given name, or null if none exists.
*
* @param name Name of the graphics state resource.
+ *
+ * @return the extended graphics state resource with the given name.
*/
public PDExtendedGraphicsState getExtGState(COSName name)
{
@@ -255,6 +261,9 @@ public final class PDResources implement
* Returns the shading resource with the given name, or null if none exists.
*
* @param name Name of the shading resource.
+ *
+ * @return the shading resource of the given name.
+ *
* @throws IOException if something went wrong.
*/
public PDShading getShading(COSName name) throws IOException
@@ -288,6 +297,9 @@ public final class PDResources implement
* Returns the pattern resource with the given name, or null if none exists.
*
* @param name Name of the pattern resource.
+ *
+ * @return the pattern resource of the given name.
+ *
* @throws IOException if something went wrong.
*/
public PDAbstractPattern getPattern(COSName name) throws IOException
@@ -321,6 +333,8 @@ public final class PDResources implement
* Returns the property list resource with the given name, or null if none exists.
*
* @param name Name of the property list resource.
+ *
+ * @return the property list resource of the given name.
*/
public PDPropertyList getProperties(COSName name)
{
@@ -379,6 +393,9 @@ public final class PDResources implement
* Returns the XObject resource with the given name, or null if none exists.
*
* @param name Name of the XObject resource.
+ *
+ * @return the XObject resource of the given name.
+ *
* @throws IOException if something went wrong.
*/
public PDXObject getXObject(COSName name) throws IOException
@@ -478,6 +495,8 @@ public final class PDResources implement
/**
* Returns the names of the color space resources, if any.
+ *
+ * @return the names of all color space resources.
*/
public Iterable<COSName> getColorSpaceNames()
{
@@ -486,6 +505,8 @@ public final class PDResources implement
/**
* Returns the names of the XObject resources, if any.
+ *
+ * @return the names of all XObject resources.
*/
public Iterable<COSName> getXObjectNames()
{
@@ -494,6 +515,8 @@ public final class PDResources implement
/**
* Returns the names of the font resources, if any.
+ *
+ * @return the names of all font resources.
*/
public Iterable<COSName> getFontNames()
{
@@ -502,6 +525,8 @@ public final class PDResources implement
/**
* Returns the names of the property list resources, if any.
+ *
+ * @return the names of all property list resources.
*/
public Iterable<COSName> getPropertiesNames()
{
@@ -510,6 +535,8 @@ public final class PDResources implement
/**
* Returns the names of the shading resources, if any.
+ *
+ * @return the names of all shading resources.
*/
public Iterable<COSName> getShadingNames()
{
@@ -518,6 +545,8 @@ public final class PDResources implement
/**
* Returns the names of the pattern resources, if any.
+ *
+ * @return the names of all pattern resources.
*/
public Iterable<COSName> getPatternNames()
{
@@ -526,6 +555,8 @@ public final class PDResources implement
/**
* Returns the names of the extended graphics state resources, if any.
+ *
+ * @return the names of all extended graphics state resources.
*/
public Iterable<COSName> getExtGStateNames()
{
@@ -534,6 +565,8 @@ public final class PDResources implement
/**
* Returns the resource names of the given kind.
+ *
+ * @return the names of all resources of the given kind.
*/
private Iterable<COSName> getNames(COSName kind)
{
@@ -795,6 +828,8 @@ public final class PDResources implement
/**
* Returns the resource cache associated with the Resources, or null if there is none.
+ *
+ * @return the resource cache associated with the resources.
*/
public ResourceCache getResourceCache()
{
Modified: pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/PageLayout.java
URL: http://svn.apache.org/viewvc/pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/PageLayout.java?rev=1827231&r1=1827230&r2=1827231&view=diff
==============================================================================
--- pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/PageLayout.java (original)
+++ pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/PageLayout.java Mon Mar 19 19:15:43 2018
@@ -80,6 +80,8 @@ public enum PageLayout
/**
* Returns the string value, as used in a PDF file.
+ *
+ * @return the string value.
*/
public String stringValue()
{
Modified: pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/PageMode.java
URL: http://svn.apache.org/viewvc/pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/PageMode.java?rev=1827231&r1=1827230&r2=1827231&view=diff
==============================================================================
--- pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/PageMode.java (original)
+++ pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/PageMode.java Mon Mar 19 19:15:43 2018
@@ -80,6 +80,8 @@ public enum PageMode
/**
* Returns the string value, as used in a PDF file.
+ *
+ * @param the string value.
*/
public String stringValue()
{
Modified: pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/ResourceCache.java
URL: http://svn.apache.org/viewvc/pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/ResourceCache.java?rev=1827231&r1=1827230&r2=1827231&view=diff
==============================================================================
--- pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/ResourceCache.java (original)
+++ pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/ResourceCache.java Mon Mar 19 19:15:43 2018
@@ -36,72 +36,134 @@ public interface ResourceCache
{
/**
* Returns the font resource for the given indirect object, if it is in the cache.
+ *
+ * @param indirect the indirect object
+ *
+ * @return the font resource of the given indirect object.
*/
PDFont getFont(COSObject indirect) throws IOException;
/**
* Returns the color space resource for the given indirect object, if it is in the cache.
+ *
+ * @param indirect the indirect object
+ *
+ * @return the color space resource of the given indirect object.
*/
PDColorSpace getColorSpace(COSObject indirect) throws IOException;
/**
- * Returns the external graphics state resource for the given indirect object, if it is in the
- * cache.
+ * Returns the extended graphics state resource for the given indirect object, if it is in the cache.
+ *
+ * @param indirect the indirect object
+ *
+ * @return the extended graphics resource of the given indirect object.
*/
PDExtendedGraphicsState getExtGState(COSObject indirect);
/**
* Returns the shading resource for the given indirect object, if it is in the cache.
+ *
+ * @param indirect the indirect object
+ *
+ * @return the shading resource of the given indirect object.
*/
PDShading getShading(COSObject indirect) throws IOException;
/**
- *Returns the pattern resource for the given indirect object, if it is in the cache.
+ * Returns the pattern resource for the given indirect object, if it is in the cache.
+ *
+ * @param indirect the indirect object
+ *
+ * @return the pattern resource of the given indirect object.
*/
PDAbstractPattern getPattern(COSObject indirect) throws IOException;
/**
* Returns the property list resource for the given indirect object, if it is in the cache.
+ *
+ * @param indirect the indirect object
+ *
+ * @return the property list resource of the given indirect object.
*/
PDPropertyList getProperties(COSObject indirect);
/**
* Returns the XObject resource for the given indirect object, if it is in the cache.
+ *
+ * @param indirect the indirect object
+ *
+ * @return the XObject resource of the given indirect object.
*/
PDXObject getXObject(COSObject indirect) throws IOException;
/**
* Puts the given indirect font resource in the cache.
+ *
+ * @param indirect the indirect object of the resource.
+ * @param font the font resource.
+ *
+ * @throws IOException if something went wrong.
*/
void put(COSObject indirect, PDFont font) throws IOException;
/**
* Puts the given indirect color space resource in the cache.
+ *
+ * @param indirect the indirect object of the resource.
+ * @param font the color space resource.
+ *
+ * @throws IOException if something went wrong.
*/
void put(COSObject indirect, PDColorSpace colorSpace) throws IOException;
/**
* Puts the given indirect extended graphics state resource in the cache.
+ *
+ * @param indirect the indirect object of the resource.
+ * @param font the extended graphics state resource.
+ *
+ * @throws IOException if something went wrong.
*/
void put(COSObject indirect, PDExtendedGraphicsState extGState);
/**
* Puts the given indirect shading resource in the cache.
+ *
+ * @param indirect the indirect object of the resource.
+ * @param font the shading resource.
+ *
+ * @throws IOException if something went wrong.
*/
void put(COSObject indirect, PDShading shading) throws IOException;
/**
* Puts the given indirect pattern resource in the cache.
+ *
+ * @param indirect the indirect object of the resource.
+ * @param font the pattern resource.
+ *
+ * @throws IOException if something went wrong.
*/
void put(COSObject indirect, PDAbstractPattern pattern) throws IOException;
/**
* Puts the given indirect property list resource in the cache.
+ *
+ * @param indirect the indirect object of the resource.
+ * @param font the property list resource.
+ *
+ * @throws IOException if something went wrong.
*/
void put(COSObject indirect, PDPropertyList propertyList);
/**
* Puts the given indirect XObject resource in the cache.
+ *
+ * @param indirect the indirect object of the resource.
+ * @param font the XObject resource.
+ *
+ * @throws IOException if something went wrong.
*/
void put(COSObject indirect, PDXObject xobject) throws IOException;
}