This week's giveaway is in the EJB and other Java EE Technologies forum.
We're giving away four copies of EJB 3 in Action and have Debu Panda, Reza Rahman, Ryan Cuprak, and Michael Remijan on-line!
See this thread for details.
The moose likes Swing / AWT / SWT and the fly likes Display LDIF contents in a Tree Hierarchy Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "Display LDIF contents in a Tree Hierarchy" Watch "Display LDIF contents in a Tree Hierarchy" New topic
Author

Display LDIF contents in a Tree Hierarchy

raga menon
Greenhorn

Joined: May 08, 2007
Posts: 8
Hi Nathan,

Thanks for your reply.

In my ldif file each and every dn ends with dc=foo, dc=bar. how could i parse this and make it as Root node and child nodes and properties of each dn is displayed by splitting the frame. in one frame all Root dn, child dn should be display in a tree hierarchy and in another frame if i click on root node the its porperties are displayed on another frame.(properties are createtimestamp, dc,modifiersname etc.. )

for example following is LDIF file :

dn: dc=foo,dc=bar
createTimestamp: 20060530115557.500Z
dc: foo
modifiersName: cn=Directory Manager
creatorsName: cn=Directory Manager
modifyTimestamp: 20060530115557.500Z
objectclass: top
objectclass: domain

dn: ou=services,dc=foo,dc=bar
createTimestamp: 20060530120040.274Z
modifiersName: cn=Directory Manager
modifyTimestamp: 20060530120040.274Z
creatorsName: cn=Directory Manager
ou: services
objectclass: top
objectclass: organizationalunit

dn: ou=aaa,ou=services,dc=foo,dc=bar
createTimestamp: 20060530120053.649Z
modifiersName: cn=Directory Manager
modifyTimestamp: 20060530121725.967Z
creatorsName: cn=Directory Manager
ou: aaa
description: Dialin Services
objectclass: organizationalUnit

dn: ou=clients,ou=aaa,ou=services,dc=foo,dc=bar
createTimestamp: 20060530120103.852Z
modifiersName: cn=Directory Manager
modifyTimestamp: 20060530120103.852Z
creatorsName: cn=Directory Manager
ou: clients
objectclass: organizationalUnit
objectclass: top

dn: ou=servers,ou=aaa,ou=services,dc=foo,dc=bar
createTimestamp: 20060530120103.868Z
modifiersName: cn=Directory Manager
modifyTimestamp: 20060530120103.868Z
creatorsName: cn=Directory Manager
ou: servers
objectclass: organizationalUnit
objectclass: top

dn: ou=users,ou=aaa,ou=services,dc=foo,dc=bar
createTimestamp: 20060530120103.852Z
modifiersName: cn=Directory Manager
modifyTimestamp: 20060530120103.852Z
creatorsName: cn=Directory Manager
ou: users
objectclass: organizationalUnit
objectclass: top

------------------------------------------------

and i need to display the following Tree

dc=foo,dc=bar
|
dn: ou=services,dc=foo,dc=bar
|
dn: ou=aaa,ou=services,dc=foo,dc=bar
|
dn: ou=clients,ou=aaa,ou=services,dc=foo,dc=bar
dn: ou=servers,ou=aaa,ou=services,dc=foo,dc=bar
dn: ou=users,ou=aaa,ou=services,dc=foo,dc=bar
----------------------------------------------

please let me know how to do this

Thanks,

Raga Menon
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Display LDIF contents in a Tree Hierarchy
 
Similar Threads
Read LDIF contents and Display in Tree
weblogic8.1 with open LDAP authentication
WLS6.1 - Configuring realm for openLdap
Display LDIF contents in a Tree Hierarchy
Display LDIF contents in Tree