You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pdfbox.apache.org by "Harry Lee (JIRA)" <ji...@apache.org> on 2010/05/29 13:59:37 UTC

[jira] Created: (PDFBOX-734) how to access a PDoutlineNode object's parent without using its protected menthod getParent() ?

how to access a PDoutlineNode object's parent without using its protected menthod getParent() ?
-----------------------------------------------------------------------------------------------

                 Key: PDFBOX-734
                 URL: https://issues.apache.org/jira/browse/PDFBOX-734
             Project: PDFBox
          Issue Type: Bug
    Affects Versions: 1.1.0
         Environment: Window's platform, java
            Reporter: Harry Lee
            Priority: Blocker


I have some java codes that depend on the getParent() method to traverse the PDOutlineNode structure. They works fine with old version of PDFBox since this method is declared as a public method. Now it is changed to protected in the new version 1.1.0. How should I make my code work without extending or subclassing PDOutlineNode? 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (PDFBOX-734) how to access a PDoutlineNode object's parent without using its protected menthod getParent() ?

Posted by "Harry Lee (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/PDFBOX-734?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12874051#action_12874051 ] 

Harry Lee commented on PDFBOX-734:
----------------------------------

So basiclly, outline nodes   only contain PDOutlineItem  nodes except the top node which is a PDDocumentOutline  object (since PDDocumentOutline does not have parent).   Am I right? 

Harry


> how to access a PDoutlineNode object's parent without using its protected menthod getParent() ?
> -----------------------------------------------------------------------------------------------
>
>                 Key: PDFBOX-734
>                 URL: https://issues.apache.org/jira/browse/PDFBOX-734
>             Project: PDFBox
>          Issue Type: Bug
>    Affects Versions: 1.1.0
>         Environment: Window's platform, java
>            Reporter: Harry Lee
>            Priority: Blocker
>
> I have some java codes that depend on the getParent() method to traverse the PDOutlineNode structure. They works fine with old version of PDFBox since this method is declared as a public method. Now it is changed to protected in the new version 1.1.0. How should I make my code work without extending or subclassing PDOutlineNode? 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (PDFBOX-734) how to access a PDoutlineNode object's parent without using its protected menthod getParent() ?

Posted by "Johannes Koch (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/PDFBOX-734?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12873297#action_12873297 ] 

Johannes Koch commented on PDFBOX-734:
--------------------------------------

PDOutlineNode is the super-class for PDDocumentOutline and PDOutlineItem. PDDocumentOutline does not have a parent, so a public getParent() method doesn't make sense. PDOutlineItem has a parent, and so has a public getParent() method.

> how to access a PDoutlineNode object's parent without using its protected menthod getParent() ?
> -----------------------------------------------------------------------------------------------
>
>                 Key: PDFBOX-734
>                 URL: https://issues.apache.org/jira/browse/PDFBOX-734
>             Project: PDFBox
>          Issue Type: Bug
>    Affects Versions: 1.1.0
>         Environment: Window's platform, java
>            Reporter: Harry Lee
>            Priority: Blocker
>
> I have some java codes that depend on the getParent() method to traverse the PDOutlineNode structure. They works fine with old version of PDFBox since this method is declared as a public method. Now it is changed to protected in the new version 1.1.0. How should I make my code work without extending or subclassing PDOutlineNode? 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (PDFBOX-734) how to access a PDoutlineNode object's parent without using its protected menthod getParent() ?

Posted by "Harry Lee (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/PDFBOX-734?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12873997#action_12873997 ] 

Harry Lee commented on PDFBOX-734:
----------------------------------

Hi, Johannes. Thanks for your comments. I am OK with the change from public to protected for PDOutlineNode's getParent(). But, PDOutlineNode is not a abstract class. I may have a mixed tree structure of objects of both PDOutlineNode and PDOutlineItem. How do I access the parent node of a PDOutlineNode object in my data structure?

Harry
 

> how to access a PDoutlineNode object's parent without using its protected menthod getParent() ?
> -----------------------------------------------------------------------------------------------
>
>                 Key: PDFBOX-734
>                 URL: https://issues.apache.org/jira/browse/PDFBOX-734
>             Project: PDFBox
>          Issue Type: Bug
>    Affects Versions: 1.1.0
>         Environment: Window's platform, java
>            Reporter: Harry Lee
>            Priority: Blocker
>
> I have some java codes that depend on the getParent() method to traverse the PDOutlineNode structure. They works fine with old version of PDFBox since this method is declared as a public method. Now it is changed to protected in the new version 1.1.0. How should I make my code work without extending or subclassing PDOutlineNode? 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (PDFBOX-734) how to access a PDoutlineNode object's parent without using its protected menthod getParent() ?

Posted by "Johannes Koch (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/PDFBOX-734?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12874009#action_12874009 ] 

Johannes Koch commented on PDFBOX-734:
--------------------------------------

Well, PDOutlineNode should rather be abstract, because there is no such concrete thing in PDF. Your outline nodes should either be PDDocumentOutline or PDOutlineItem objects.

> how to access a PDoutlineNode object's parent without using its protected menthod getParent() ?
> -----------------------------------------------------------------------------------------------
>
>                 Key: PDFBOX-734
>                 URL: https://issues.apache.org/jira/browse/PDFBOX-734
>             Project: PDFBox
>          Issue Type: Bug
>    Affects Versions: 1.1.0
>         Environment: Window's platform, java
>            Reporter: Harry Lee
>            Priority: Blocker
>
> I have some java codes that depend on the getParent() method to traverse the PDOutlineNode structure. They works fine with old version of PDFBox since this method is declared as a public method. Now it is changed to protected in the new version 1.1.0. How should I make my code work without extending or subclassing PDOutlineNode? 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (PDFBOX-734) how to access a PDoutlineNode object's parent without using its protected menthod getParent() ?

Posted by "Johannes Koch (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/PDFBOX-734?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12874052#action_12874052 ] 

Johannes Koch commented on PDFBOX-734:
--------------------------------------

Yes. For more information see the PDF 1.7 spec, section 12.3.3 Document Outline.

> how to access a PDoutlineNode object's parent without using its protected menthod getParent() ?
> -----------------------------------------------------------------------------------------------
>
>                 Key: PDFBOX-734
>                 URL: https://issues.apache.org/jira/browse/PDFBOX-734
>             Project: PDFBox
>          Issue Type: Bug
>    Affects Versions: 1.1.0
>         Environment: Window's platform, java
>            Reporter: Harry Lee
>            Priority: Blocker
>
> I have some java codes that depend on the getParent() method to traverse the PDOutlineNode structure. They works fine with old version of PDFBox since this method is declared as a public method. Now it is changed to protected in the new version 1.1.0. How should I make my code work without extending or subclassing PDOutlineNode? 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.