Get folder tree

Hello, I need folder structure tree and I don't know how can I do it. I have created one java method using folder.list, creating one ArrayList, using split method... But it is very difficult(I get it, but...) and I can't use for all acounts. The method work with my company mail, but not with gmail because gmail have another structure to manage that.
Javamail have any method to create a xml that have a folder tree, or someone have any method, or someone could explain me which is the best form to do that?
I want to get that:
<Account id="account" label="account">
<node label="INBOX">
<node label="Name/>
<node label="Name"/>
</node>
<node label="Trash"/>
<node label="Sent"/>
</node>
<Account>
I hope someone could help me, I need that. I have something similar but I need more simple or something who work with different accounts(gmail, mypersonal, hotmail..)
Thanks!!

I tested that code some weeks ago and I use it to get the full name to get that
INBOX.Name
Inbox.Name.Folder1
Inbox.Name.Folder2
Inbox.Name2.Folder1
Inbox.Trash
Then I have to change that to create a XML, but i haven't get it. I can't get INBOX with this code,and neither the last folder </node>
public static String crearStringXML(Folder folder) throws MessagingException, IOException
          Folder[] FolderList = folder.list("*");
          ArrayList<String> lista = new ArrayList<String>();
          String[] tmp=null;
          for (int i=0;i<FolderList.length;i++)
               lista.add((FolderList.getFullName()));
               java.util.Collections.sort(lista);
          int lengthtmpant = 0;
          int lengthtmp = 0;
          int j=0;
          do
          lengthtmpant = lengthtmp;
          tmp = ((String)lista.get(j)).split("\\.");
          lengthtmp = tmp.length;
          if (lengthtmpant >= 0 && lengthtmp <= lengthtmpant)
               while (lengthtmp <= lengthtmpant) //si son distintos es que estamos en otro nodo. eltmpant.length>0 sirve para que no entre la primera vez que pasa por el bucle (j=0)
                    textOut += "</node>";
               lengthtmpant --;
          textOut += "<node label=\"";
          textOut += tmp[lengthtmp-1]+"\">";//write only the son
          j++;
          }while (j<lista.size());
          lengthtmpant++;
          return textOut;
I don't know what I have to change to get it the INBOX, like I get the other folders in this line "textOut += tmp[lengthtmp-1]+"\">";//write only the son".
Andif someone have a better solution say me please, I'm becoming crazy with that, haha.
And another problem is that I don't use this code with gmail...
Thanks!
PD:Sorry my english is not good                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

Similar Messages

  • Show the report on the same dashborad page with the folder tree?

    I add a folder in dashboard, and put it on the left.
    now i open the folder tree in dashboard, and click a report,
    but biee open the report on a new page.
    I want to show the report on the same page with the folder,
    maybe show the report on the right in the dashboard with the folder.
    how could it be done?
    thanks ,
    newkoa

    The only way it could work is using iframes. Now OBIEE 11g would not allow iframes inside it's dashboard. It offers a dashboard object called "Embedded content" which is a restricted iframe kinda thing but unless you get this object's id from generated HTML you can change it's content dynamically. Besides, such an implementation may break with next patch. So here is an idea.
    Create a HTML page with two iframes, left one will hold all the reports with links (you can always generate a list of reports through catalog manager, open it in excel and make HTML links from it) that open report urls (in the format of ./saw.dll?GO&Path=....) in right iframe (using javascript open.window method). Once that page is working, call this page from dashboard using an action link. This is slightly twisted approach but at least it would give you what you asked for.
    About making the report list dynamic, I am afraid there are no easy answers. OBIEE provides web service that will allow the users to query catalog to get a list of reports. You can try some basic JSP to access the web service and generate the list dynamically. But that is not something I can provide here.

  • Why don't folder trees stay collapsed in LR3?

    Why do I get expanded folder trees when starting LR3 that were collapsed when I previously exited the program?  Not all trees are expanded, just those I had worked with earlier, then closed.  I have to close (collapse) each tree before I can see the list of high level folders.

    Known bug. http://forums.adobe.com/thread/657489?tstart=0
    The workaround is to collapse all subfolders before collapsing the top-level folder. You can do it easily by alt-clicking on the top-level folder.

  • How can I fully see longer folder names in folder tree?

    Is there any way to get the "Folders" part of the left panel to fully display longer folder names? My folder structure and naming contains names such that even with the panel stretched as big as it will go, I still can't see the entire name. If I could do something like make the font considerably smaller (the size it is in Windows Explorer, for example) this would not be a problem, but since I don't seem to be able to do this, I'm looking for other options. (I already have it at the "small" setting.)
    What are others doing in this regard? My folder paths/names really aren't "that" long, so it seems like this shouldn't be an issue. With the panel at it's default size, I can hardly see ANY of the folder names -- not even the full date, which is how my folder names start. This is a rather big stumbling block for me since navigating the folder tree is a major part of my daily work, and this is way, WAY easier in other application compared to LR. I'm wondering if I'm simply missing something.
    Thanks,
    Larry

    >Possibly you are missing that if you position the cursor midway >between the panels just so, it'll turn into a vertical line and you >can hold and drag the panel to the right to expand.
    I didn't miss that -- as per my initial post, I already have the panel sized as wide as it will go, but there is a limit to how far you can move the divider, and the names still don't fit.
    Larry

  • Automating Creation of Folder-Tree

    Here is what I want to do: I want to automate the creation of a folder-tree for video projects from a template structure while adding the project name to the names of all the folders.
    Anything that accomplishes this will suffice. I got hung up when I couldn't use a variable as the input for the "Find/Replace Text" action.
    Anyone really nice and interested can go to the small website I've made and get the files to build this thing for me!
    http://www.mattwarren.tv/Site/Automator_Help.html
    I imagine this is very simple, I hope so. Please advise.
    Thanks

    What I had in mind was using the rename action on the copy of the template, although it won't go into subfolders. Since you haven't done anything yet, you might give my (tweaked) Copy Folder Structure action a try - it can be downloaded here. It can use variables, so an example workflow would be something like:
    1) Ask for Text [Question: Project Name?, Default Answer: Blank Project]
    2) Set Value of Variable [New Variable: Project Name]
    3) New Folder [Name: the Project Name variable, Where: wherever]
    4) Set Value of Variable [New Variable: Project Folder]
    5) Get Specified Finder Items [the folder containing the project template] - ignore input
    6) Copy Folder Structure [To: Project Folder, Add: the Project Name variable (and a separator, if desired) before each name]
    7) Reveal Finder Items
    Note that the editing field that accepts variables will trim leading and trailing whitespace characters - this is probably why a plain text field is used in the rename action. You can use other characters as a separator, though - the action UI gets ugly when trying to add various options for space separators, but there is a setting in the action package if you have to have them.

  • Folder Tree Collapsing

    I have been using Homesite for years and I've always kind of
    lived with this problem. But since i started working on my desktop
    it is starting to become very frustrating.
    Basically the folder tree in Homesite 5.2 AND Homesite 5.5
    collapses when i double click folders. The WHOLE TREE! The only way
    i can navigate is if i single click the pluses. This happens on
    both my laptop and my desktop.
    I'm running Windows XP SP2. Am i the only one experiencing
    this?
    Steve Nelson

    yeah, that's a recent bug, and fairly annoying.
    here's a technote on it.
    HomeSite TechNote: Double-clicking in the Files tab moves
    focus to root node
    http://www.adobe.com/cfusion/knowledgebase/index.cfm?id=tn_19228
    not much help, but I try to get into the habit of clicking
    the + on the folder to open it, instead of double-clicking. it
    still gets me every now and then though.
    jw

  • How to get a tree item when my mouse moves

    I want to get the tree item which my cursor points to when my
    cursor moves over a tree.
    I can get a row index in itemRollOver event, but it seems
    useless.
    And I don't know how to use getObjectsUnderPoint method.
    Is there anyone who can help me?

    Take a look this example:
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application xmlns:mx="
    http://www.adobe.com/2006/mxml"
    creationComplete="srv.send()">
    <mx:Script>
    <![CDATA[
    [Bindable]
    public var selectedNode:Object;
    [Bindable]
    public var XLC:XML;
    public function initList(event:Event) : void
    XLC = event.target.lastResult;
    public function treeChanged(event:Event) : void
    selectedNode=Tree(event.target).selectedItem;
    ]]>
    </mx:Script>
    <mx:HTTPService id="srv" url="../assets/tree.xml"
    resultFormat="e4x"
    result="initList(event)"/>
    <mx:HDividedBox width="100%" height="100%">
    <mx:Tree id="myTree" width="50%" height="100%"
    labelField="@label"
    showRoot="false" dataProvider="{XLC}"
    change="treeChanged(event)"/>
    <mx:TextArea height="100%" width="50%"
    text="Selected Item: {selectedNode.@label}"/>
    </mx:HDividedBox>
    </mx:Application>
    "hybak" <[email protected]> wrote in message
    news:fd5gao$229$[email protected]..
    >I want to get the tree item which my cursor points to
    when my cursor moves
    >over
    > a tree.
    > I can get a row index in itemRollOver event, but it
    seems useless.
    > And I don't know how to use getObjectsUnderPoint method.
    > Is there anyone who can help me?
    >

  • Is There A Way To Create A Simple File/Folder Tree...

    Hi,
    Please forgive me if this has already been covered but I have searched and found no answer...
    I am trying to create a web page to run on my local network, through iweb and apache, and have got everything I need working except this. I aim to be able to access my work files (masses of word documents and power-points) through the website but I can see no obvious way of doing this through iweb (short of adding individual hyperlinks to each file). Is there a tool or process I can use to create a simple folder tree in html that I can add to my site that lists all my files and allows my to "save target as" in windows (our college techie is still devoted to windows) ?
    Thanks in advance for any help...
    KP

    If you wanted to send a video as an mms from a mobile phone, the best option for exporting would be 3G in the quicktime export menu ( File > Export and it's in the drop down list).
    Keep it short and small and you shouldn't have any probs. There are some miserly operators out there who block MMSs bigger than 100K

  • How do I find where a bookmark is in my folder tree?

    I use the bookmarks menu a lot, and I have created many folders to organize them. But when I use the search function, all I see are the pages I have saved, NOT where they are in the folder tree.
    Sometimes I wan to reorganize the pages differently, but I don't know where they are!

    948165 wrote:
    Hello,
    When I go to System Administrator > Concurrent > Program > Define I can lookup programs that I should be able to run. Now I want to actually run the process but I cant find figure out what responsability it is under.
    How can I go about finding this?Please see (WHOCANRUN.SQL - List Responsibilities That Can Run a Given Concurrent Program [ID 134036.1]).
    Thanks,
    Hussein

  • How to get a Tree Node Value when a Tree is Expanded

    My reqiurement is when i Expand a Tree i need the Expanded tree Node Value. For Example Consider Parent as a Root Node of a Tree, and Consider its two Children Child1 and Child2.
    When + Parent Expanded
    I will Get the Output as --Parent
    - Child1
    - Child2
    so As when i expand the Tree i must Get the String Value Parent.

    duplicate
    How to get a Tree Node Value when a Tree is Expanded

  • How to get Folder Location by just providing folder name ?

    Hi,
    I want to get folder location by providing its name.
    I created one folder on "E:\" drive and when I used following code in netbeans it giving me the current loaction of java file.
    File directory = new File("SVN");
            boolean isDirectory = directory.isDirectory();
            if (isDirectory) {
                // It returns true if directory is a directory.
                System.out.println("the name you have entered is a directory  : "  +    directory); 
                //It returns the absolutepath of a directory.
                System.out.println("the path is "  + directory.getAbsolutePath());
            else {
                // It returns false if directory is a file.
                System.out.println("the name you have entered is a file  : " +   directory);
                //It returns the absolute path of a file.
                System.out.println("the path is "  +  directory.getAbsolutePath());
        }And i got following output
    the name you have entered is a file  : SVN
    the path is C:\Users\AjayS\Documents\NetBeansProjects\TestCodes\SVNBut my folder is located on "E:\" drive.
    Regards,
    Ajay

    You will have to search for them. But that indicates something seriously wrong with the requirement. In effect you're using the local filename as a secondary key but there is no index on it. You should consider a database.

  • How to create a Folder Tree in Exchange Server from a Java progarm.

    hi all,
    I am using Microsoft Exchange Server 2000. I have a requirement of creating the following things from a Java program.
    1) Creating a Folder Tree
    2) Creating a Mailbox Store
    3) Creating a Public Store
    4) Creating a Recipient Policy
    5) Creating a Storage Group
    6) Creating a Mail-Enabled Recipient
    7) Adding a new UPN suffixes
    If any of you have worked on such requirement can you please provide me with some information regarding the same.
    Thanks & Regards
    Anil

    Any luck with this Anil?
    I would like to query exchange for the list or recipients on a given mailing list.
    Please inform if there is any documentation that may be helpful.

  • How to get a tree-oriented view of a pdf document's sections in Acrobat 8 Professional?

    Hi, I have a PDF that has a document outline (with table of contents etc.). This may be a stupid question, but in earlier versions of Acrobat Reader -- I used to be able to get a navigation panel that showed the sections in a tree-form that made it easy to jump to a given section. I now have the Acrobat 8 pro.. and when I read PDF's with it, I do NOT get this tree-oriented view.. but just a thumbnail or page oriented view. How can I get the other view?
    Thanks,
    -Sundar

    Well.. the contents page seems ok, and when I click on the lines in the contents page, Adobe takes me to the right spot. Others (w/ earlier versions of Acrobat) also are able to see the outine. I have to conclude that perhaps pro8 is just broken. (I guess I have to talk to someone to figure out how I can get my reader back.. because right now even the reader launches Acrobat Pro..). Sigh.

  • Is there a way to have bookmark folders automatically collapsed in Safari when adding bookmarks?  This would be a huge convenience in navigating to the right folder w/o having to deal with an eye chart of a folder tree.

    Is there a way to have bookmark folders automatically collapsed in Safari when adding bookmarks?  This would be a huge convenience in navigating to the right folder w/o having to deal with an eye chart of a folder tree.

    Myself as well...
    I think it is a tremendous problem. Im my case it is extremelly important to manage, organize and sort favorites.
    I am new to Mac and safari... and I spent a lot of time researching a solution for that thinking it was me that couldnt find this option. I like to use safari because of the "gestures". This is great. But when it comes to favorites, safari is a nightmare!!!
    Also, I use to like the option in Firefox that we can have the leftside bar with the favorites and navigate to the links in the right. In safari the links are open in the full page. And then we need to come back to the favorite everytime.
    I would be glad if someone could come out with good solution or suggestions how to deal with it in fafari.
    Regards.
    Miro

  • Import Not Finding All Files in Folder Tree (which files were missed?)

    I'm a new LR4.1 user running on a 15" Macbook Pro (OS X 10.7.4).
    I exported my Aperture Library masters: mostly NEF files from Nikon D100, D200, D300, D800 cameras, and also JPG, TIF, and PSD files, etc.
    Aperture reported this export count: 
    51285 of 50582 (don't ask me why it exported more than it thought it had!).
    After export, I used "find" (case-insensitive) in the output directory tree to count all NEF, TIF[F], PSD, PNG, JPG, GIF, AVI, and MOV files spit out by Aperture: I found 51277 such files (pretty close to the Aperture export count, although not exactly the same).
    However when I point Lightroom to that folder tree with the exported Aperture masters, an IMPORT operation only reports 44279 photos for import (at lower left of expanded import dialog). About 7,000 less than Aperture exported! I have "Include Subfolders" checked and "Don't Import Suspected Duplicates" unchecked in the LR import dialog. Also, I am using the "ADD" option in the import dialog.
    How can I figure out which files Lightroom is missing? (I haven't actually imported anything yet due to the discrepancy.)
    I can't see how the discrepancy could be so large. I think LR should support most of my Aperture-supported files.
    I see LR doesn't support 32 bit files, but I don't see how I could have 7K files (maybe some, but I don't think 7k!) (I will check this later, am installing Xcode and ImageMagick to check the count of 32 bit deep files).
    If anyone can offer ideas on how I can find the missed files, it would be appreciated.
    (Maybe if I proceed with the import and there is some way to export a text file listing of library files, then I could process that file vs. the actual files in the directory tree to deduce the problem issues.)
    Regards,
    Colin

    randomenemy wrote:
    Also, interesting you say 32 bit files are supported:
    on the following Adobe page, it says they are not supported:
    http://help.adobe.com/en_US/lightroom/using/WS42D207D7-B290-4baa-A896- AB71965BF24B.html
    -Colin
    LR4.1 Update Readme 'Supported File Formats:
    Supported File Formats:
    • JPEG
    • TIFF (8 bit, 16 bit, 32 bit)
    • PSD (8 bit, 16 bit)
    • DNG
    • Raw (Please visit  for a full list of raw file support) /products/photoshop/cameraraw.html
    • Common DSLR video formats, including MOV, MPG, AVI, and AVCHD
    Important File Format Support Exceptions (Formats not supported):
    • PSD files saved without a composite image. (Saved without “Maximize Compatibility” setting)
    • Files with dimensions greater than 65,000 pixels per side (512 Megapixel Total)
    • AVCHD support is limited to MTS and M2TS video files.

Maybe you are looking for

  • MacBook Pro disk locked

    Trying to reinstall mavericks from CMD R start up and get message "disk locked" Problem has been trying to start and just getting grey screen with spinning wheel at bottom. Computer won't even reboot in recovery mode. Any ideas?

  • Anyconnect client and clientless connections hang for two users

    ASA 5525, v. 9.1(5)19 Anyconnect client 3.1.02026 I have two users who are unable to connect via the AC client or clientless through the web portal. Using the client, it will get stuck in a loop of "checking for updates". On the portal, the connectio

  • Mac Lion & Photoshop CS5 Crash problem.

    I installed Mac 10.7.3 and when I open a psd file, click on page setup, ps crashes. Suggestions welcome. [email protected]

  • R 12 on windows 2008 - RDBMS

    R 12 - production running on Windows 2008 - 32-bit, installed in Dec' 2011. There is huge files are generating in this RDBMS location and it occupied 146GB space sine 26th Jan 2012. What could be the reason and how to resolve this issue. Please help

  • Is it possible to have an External HD start and stop on a Mini schedule?

    My Mini is in a shelf where the buttons are inaccessible and I would rather not have to bother turning it on an off. thanks j