How to traverse repository

hi ,
how to traverse repository .i got one node and i have to traverse all node and child node(hierarchy node and content node), like binary search in tree .

Here's some utiltity code we used in GroupSpace:
INodeManager nodeManager = ContentManagerFactory.getNodeManager();
Set<Node> set = new TreeSet<Node>();
int limit = 1000; // stop after 1000 nodes, can be anything
ContentContext context = new ContentContext();
String path = "/" + repositoryName; // whatever that is for you
// Recurse -- see method below
recurseRepository(context, path, set, limit);
// Look at contents
for (Node node:set)
System.err.println(node.getPath()); // or whatever
* Recurse the repository but stop after N nodes
public static void recurseRepository(ContentContext cc, String path, Set set, int limit) throws Exception
if (set.size() <= limit)
Node inNode = nodeManager.getNode(cc, path);
Node [] nodes = inNode.getChildren();
for (int i=0; i<nodes.length;i++)
Node node = nodes;
set.add(node);
recurseRepository(cc,node.getPath(),set, limit);
Hope that helps.

Similar Messages

  • How to traverse repository nodes in weblogic 8.1

    hi ,
    like binary search tree , how to traverse all node in repository .(can have many hierarchy node or content node ) .
    i have to traverse all content and hierarchy node .

    hi raj ,
    actually i have to traverse a node in repository 8.1 ,(like binary search tree).
    like u got a node then u have to check that how many content node /or hierarchy node it have , then check each of its content node/hierarchy node , then again check its child status (content/or hierarchy )same like binary search tree traversal .
    i try to make recursive code for that but not working properly , its searching at 2/3 levels , not at all levels .
    so if u can make recursive method for that i 'll appreciate u .
    thanks
    attaching my code for little help :
    public static void searchNode(Node node){
    if(node.getType()==Node.HIERARCHY){
    try{
    System.out.println( " Hierarchy content +node.getName());
    n=node.getChildren();
    for(int i=0;i<n.length;i++){
    System.out.println("child "+n.getName());
    searchNode(n[i]);
    catch(Exception e)
    System.out.println("");
    else //node.getType()==Node.CONTENT
    try{
         Property p[]=node.getProperties();
         for(int i=0;i<p.length;i++)
    if(p[i].getValue() !=null && p[i].getType() == Property.BINARY )
    System.out.println(" got property file " + p[i].getValue());
                             fname=p[i].getValue().toString();
    System.out.println(" adding "+fname+" these file to array list " );
    al.add(fname);
    System.out.println(" file added ");
    catch(Exception e)

  • How to edit repository.properties

    How to edit repository.properties.
    I want to edit the file
    http://<host>:<httpPort>/dtr/ws/system/config/active/registry/repository.properties
    Kindly give me the step by step procedure. Precisely how can i  check out this file using NWDS.
    Appreciate your response.
    Thanks,
    Prasanna Krishnamurthy

    This is the Help topic for the Apply Usage Rights operation that the Reader Extensions service provides:
    http://livedocs.adobe.com/livecycle/es/wb_help/00000949.html
    If you are new to LiveCycle, you should work through this tutorial to learn the basics:
    http://livedocs.adobe.com/livecycle/es/wb_help/00000405.html
    Scott

  • How to create repository folders to various file systems

    Hi
    How to create repository folders for various filesystems,and allow the user to do access those files(checkin/checkout)
    Prasad

    Please explain further.
    You can create a file system repository for each of the file systems.
    The document approval workflow is a functionality which is already available withing the portal.
    However, be aware that the file system repository does not support custom properties and versioning.
    In that case you might want to use a CM respository in the FSDB mode which lets you store metadata on the portal and the actual files on the file server.
    Regards,
    Vibhu

  • How to use repository in boe xi r2 to use common formula's & commands

    How can the repository in boe xi r2 be used to store common formula's and commands (i.e. sql - 'add command') so that multiple developers can insert the formula's into new reports to ensure consistency in data selection etc...

    Hi,
    i guess you are talking here about Crystal Reports. In CR it is possible to store functions and formulas into the repository to re- use these in different Reports.
    In WebI you cant. In WebI you could create Objects in the Universe to re- use them in different Reports.
    Hope this clarifies a bit more.
    Regards
    -Seb.

  • How to create Repository DB?

    Hi
    I installed Oracle Developer 10 and I would like to work with Designer but Repository is missing. I have Oracle 9.2 DB on my PC. How to create repository?
    Thanks.

    There is a detailed installation guide which steps you through creating a Repository for Designer available on OTN. (http://otn.oracle.com/products/designer/index.html)Select the link for Designer Online Documentation and you'll find installation guides.
    Regards
    Sue

  • How to traverse folders

    hello everyone,
    can anybody help me how to traverse folders using scripting?
    I want to compress a folder to a zip file using scripting.
    thanks

    This will leg a list of all files in each folder and sub folders...
    var folders =[];
    var topLevel = Folder.selectDialog("Please select top level folder");
    //get a list of all sub folders
    folders = FindAllFolders(topLevel, folders);
    folders.unshift(topLevel);
    for(var a in folders){
        //get a list of all files in each folder in turn
        var folderList = folders[a].getFiles();
        //do whatever to each file list
    function FindAllFolders( srcFolderStr, destArray) {
    var fileFolderArray = Folder( srcFolderStr ).getFiles();
    for ( var i = 0; i < fileFolderArray.length; i++ ) {
      var fileFoldObj = fileFolderArray[i];
      if ( fileFoldObj instanceof File ) {  
      } else {
             destArray.push( Folder(fileFoldObj) );
      FindAllFolders( fileFoldObj.toString(), destArray );
    return destArray;
    To get all files in one folder it would be ...
    var topLevel = Folder.selectDialog("Please select top level folder");
    topLevel.getFiles();

  • How to Purchase group configer in dev system and how to traverse quality

    Hi All
    I need ur help regarding for how to configer the Purchaseing  group in dev system and how to traverse to Quality and production.
    Thanks
    Happy

    Hi,
    You can create the Purchasing Groups using the following settings.
    SPRO-MM-Purchasing-Create Purchasing Groups.
    Create a new entry for Purchasing group & save it in a Transport request & transport it to QAS & PRD.
    Note: We define the Purchasing Groups @ client level
    Thanks & Regards,

  • How to create repository using a view in OBIEE

    Hi,
    Can any one explain the procedure how to create a repository using a view. For example
    test_v
    select a.col1,a.col2,b.col1,b.col4,c.col5,c.col6 from table a,table b, table c where a.col1= b.col1 and b.col1 = c.col1
    1. Assuming that i have imported only one view.
    Thanks and Regards,
    Hanuman.

    Hi,
    You can create the vie in the physical layer of your repository, select "Select" from the dropdwan box when you create a new table. Next add the columns. They must have the same names as in your view.
    If you don't have any other tables in your repository, created an alias of your view and make a "dummy" join with the original view. Next create your BM and PL.
    regards
    John
    http://obiee101.blogspot.com/

  • How to upgrade repository database from 10.1.0.4 to 10.2.0.3?

    I installed EM10gR3 on Linux. I chose Install Grid Control using a New Database option. The database is 10.1.0.4. How can I upgrade repository database to 10.2.0.3? Shall I install Oracle 10.2.0.3 and then use dbua to upgrade?
    Thanks,
    Kevin

    Yes. But first of all check that the 10.2.0.3 Repository is compartible with 10.2.0.3 database. You will find this in the Installation Guide. Then use any upgrade type (DBUA, Upgrade Script etc) to upgrade the database.

  • How to query repository to determine Dynamic parameters used by a report

    Using BOXI 3.1 SP3
    Windows 2008
    .NET
    SQL 2008 Database
    I would like to query the repository to figure out which report is using which a dynamic parameter and then to figure out the name of that dynamic paremeter.
    The issue is the when I publish a report with Dynamic Paremeters from CR2008 to BOXI, BOXI will automatically create all the underlying connections and also rename the parameters if there is a duplicate.  I have a situation where there were over 100 +reports published and thru repository explorer in CR2008, it's impossible to tell which parameter belongs to which report.
    I would like to find in the repository the name of the dynamic parameters being used by the report.
    If I query CI_INFOOBJECTS, it does have the prompts and the original name (SI_NAME).  I don't know if it's possible thru Query Builder to query and find this result, or whether I need to write some .NET code.  The only hint in CI_INFOOBJECTS that a report has dynamic parameter is thru SI_GROUP_ID = eor://HOECRS02.NA.XOM.COM:6400/AVDGc3Df_G5Ej9HoJqO3V2g
    All dynamic parameters have SI_GROUP_ID populated.....but not sure how to use this unique value AVDGc3Df_G5Ej9HoJqO3V2g  which appears to be a SI_CUID but not sure what to query next to get more information.
    If anyone has a query built already or some code to point me in the right directiion, that would be greatly appreciated.

    The best way to determine what your wattage draw is is to purchase a killawatt meter. They are relatively inexpensive (20-30 bucks).
    http://www.amazon.com/P3-International-P4400-Electricity-Monitor/dp/B00009MDBU/r ef=pdbbs_sr1?ie=UTF8&s=hi&qid=1209640995&sr=8-1
    Glor

  • How to traverse an array with a for-loop in this certain way...

    so I need to traverse an array starting from the first element, then from the last element, then the second element, then the second last element, then third element and so on... in a for loop
    how would that look in code?
    Any help would be appreciated, thanks!
    Edited by: inspiredone on Apr 4, 2008 6:34 AM

    Wow, that's a really clever and elegant way to do it promethuzz. I actually came up with something already before I read your post so yeah don't worry about me copying or anything. Mine is not as elegant/efficient and I definitely like yours a lot more but I will just share it anyway...it looks pretty similar to the second algorithm The_Matrix has provided. I figured this out from thinking how quicksort compares its pivot with the two indexes...
        int front=0;
        int back = a.length - 1;
        int counter =0;
        boolean switchflag = true;
        while(front<=back)
          System.out.println(a[counter]);
          if(switchflag)
            counter = back;
            front++;
            switchflag = false;
          else
            counter = front;
            back--;
            switchflag = true;
        } Anyways, thanks a lot for you guys help, promethuzz, The_Matrix, and newark.
    Edited by: inspiredone on Apr 4, 2008 11:25 AM
    Edited by: inspiredone on Apr 4, 2008 11:27 AM

  • How to deploy repository in OBIEE 11g

    I installed Oracle BI on a 32 bit system. Used the upgrade assistant to upgrade the repository from 10g to 11g. Everything went well and I could see all my dashboard.
    Now my question is I need to do this installation on my clients computer so I installed BI on it. But now instead of going thru upgrade process can I just use the upgraded repository from my system? If so how should I do the deployment?
    Many thanks

    Thanks for the link. It did work.
    However I need to do this on few systems. Is there a way to do without using UI. I mean can i just copy few files or update existing once to do this? Or do in silent mode. Basically I don't want to connect client computer every time if they want to install BI on a seperate box. So looking for some automated way....
    Also when I tired to open this RPD in Admin tool I was keep getting invalid username/password. This is error in
    [2011-02-25T18:25:00.000+00:00] [OracleBIServerComponent] [ERROR:1] [] [] [ecid: 00hyvMvD9ezFw0zvBP0DRz1ldOy2jkIx60001S800000a] [tid: 157c] Error Message For Administrator: User not authenticated.
    [2011-02-25T18:25:00.000+00:00] [OracleBIServerComponent] [ERROR:1] [] [] [ecid: 00hyvMvD9ezFw0zvBP0DRz1ldOy2jkIx60001S800000a] [tid: 157c] [nQSError: 43126] Authentication failed: invalid user/password.

  • How To traverse files under subfolder using Traverse folder option

    My files are stored as Newborn.txt under each year's subfolder, How to implement this.
    Eg: C:\Ravi\N90\Newborn.txt
      C:\Ravi\N91\Newborn.txt
    C:\Ravi\N92\Newborn.txt
    C:\Ravi\N93\Newborn.txt
    Pl help me to read the files using the for each loop container"

    Set the folder location as C:\Ravi inside for each loop
    Select the traverse subfolders option and it will iterate through all subfolders in it
    set file type as *.txt and it will iterate through above listed files one by one
    also see
    http://www.sql-programmers.com/for-each-loop-container.aspx
    Please Mark This As Answer if it solved your issue
    Please Vote This As Helpful if it helps to solve your issue
    Visakh
    My Wiki User Page
    My MSDN Page
    My Personal Blog
    My Facebook Page

  • How to traverse xml

    Hi,
    <root>
    <record>
    <name>a</name>
    <age>20</age>
    </record>
    <record>
    <name>b</name>
    <age>40</age>
    </record>
    now i want traverse this xml so how i do in pl/sql
    With Regards,
    L.Rajesh

    Hi,
    You don't seem to be very curious.
    There are tons of examples on the Internet, on this very place (OTN XML DB and XML forums) and of course in Oracle documentation.
    Have you already give those a try?

Maybe you are looking for

  • You cannot supply payment terms for your credit memo

    Hi, My req is as per below, 1) I would like to apply payment terms on credit memo screen throgu auto invoice creation. When i tried to update ra_interface_lines_all.term_id then i got error message : You cannot supply payment terms for your credit me

  • QRMidlet reader do not function in E7.

    I have bought from Ovi-store 2 times this QR reader, but it do not funcion. Appears tekst Decoding failed ! Please try again. Some other E7 users have same problem.

  • CVD for trading excise

    Hi, My client is having imports and into trading.How to calculate CVD for this .Any addon needs to be developed. Regards, Praveen

  • Is there limits on maps size?

    Hello, I'm wondering if there's a maximum size of operators used to build maps, or if there's any limits on their number or their names? I've got this error on deployment : ORA-06550 and PLS-00172: string literal too long, but when I reduced the name

  • IPod 4 Software Update stuck. Please help!

    Hi everyone! I feel really stupid for not knowing this before I tried to install a software update on my iPod 4, but I guess you need to set it back to it's factory settings in oreder to do that? Now it's stuck on a screen that shows the white cord p