class PageEntry
{
    private final COSDictionary dict;
    private final int pageNum;
    private final String pageLabel;    

    public PageEntry(COSDictionary page, int pageNum, String pageLabel)
    {
        dict = page;
        this.pageNum = pageNum;
        this.pageLabel = pageLabel;
    }
    
    public COSDictionary getDict()
    {
        return dict;
    }

    public int getPageNum()
    {
        return pageNum;
    }
    
    @Override
    public String toString()
    {
        return "Page: " + pageNum + (pageLabel == null ? "" : " - " + pageLabel);
    }
    
    public String getPath()
    {<FILL_FUNCTION_BODY>}
}

        StringBuilder sb = new StringBuilder();
        sb.append("Root/Pages");
        
        COSDictionary node = dict;
        while (node.containsKey(COSName.PARENT))
        {
            COSDictionary parent = node.getCOSDictionary(COSName.PARENT);
            if (parent == null)
            {
                return "";
            }
            COSArray kids = parent.getCOSArray(COSName.KIDS);
            if (kids == null)
            {
                return "";
            }
            int idx = kids.indexOfObject(node);
            sb.append("/Kids/[").append(idx).append("]");
            node = parent;
        }
        return sb.toString();
    
<no_super_class>