Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

reading from nsf files

 
S.L.Narayanan
Ranch Hand
Posts: 431
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
ranchers

I am again in a problem. My java program needs to read from a nsf (Domino file) which is present in a remote machine. I dont know how to do this. Is there any APIs available to do this. I have the structure of the nsf file with me.

Please help me out.
 
Stan James
(instanceof Sidekick)
Ranch Hand
Posts: 8791
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What is the problem ... accessing a remote file or reading the nsf format?
 
marc weber
Sheriff
Posts: 11343
Java Mac Safari
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you import the lotus.domino package into your java file -- which (assuming you have Notes installed) you should be able to do by adding the location of Notes.jar to your CLASSPATH -- then you should be able to use these classes to represent nsf elements (views, documents, etc.) as Java objects.

In Lotus Domino Designer Help, see the topics "Running a Java Program" and "Accessing databases," both of which are under "Java/CORBA Classes / Java Classes Coding Guidelines."

EDIT: In browsing the above topics, I see that if you're compiling remote calls, then you also need the location of NCSO.jar or NCSO.cab in your CLASSPATH.
[ September 28, 2005: Message edited by: marc weber ]
 
Axel Janssen
Ranch Hand
Posts: 2166
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Especially with R6 version you may also store the documents you are interested in as xml files. For a 1 time import this might be an option.
Here is the 2nd part of a 2 parts series about accessing .nsf files with Java via Domino classes (not xml).
http://www-128.ibm.com/developerworks/lotus/library/ls-Java_access_2/index.html
Start with first article (there must be link).
The recycle stuff in the 2nd part is no joke. Take that serious or they might phone you 2 weeks later because of memory leak.

For xml: http://www-128.ibm.com/developerworks/lotus/library/app-dxl/index.html
If its not 1 time import but integration I would not choose xml, but domino java objects (article above). It might be helpfull to find someone who knows how Domino is structured as a Database. Its not relational.
[ September 28, 2005: Message edited by: Axel Janssen ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic