我想通过编程方式将domino数据库项目(nsf)导入到eclipse中。
有什么办法可以实现这个目标吗?
谢谢
最佳答案
根据您的问题,您需要将 NSF 导出到 DXL。这将为您提供整个数据库的 XML 表示形式。之后就可以在eclipse中访问它了。
以下示例 LotusScript 代码将导出数据库(仅作为示例)
Sub Initialize
Dim nsn As New NotesSession
Dim ndb As NotesDatabase
Dim ndc As NotesDocumentCollection
Dim ndo As NotesDocument
Dim ndxle As NotesDXLExporter
Dim nst As NotesStream
On Error Resume Next
Set ndb = nsn.CurrentDatabase
Set ndc = ndb.UnprocessedDocuments
Set ndo = ndc.GetFirstDocument
Set nst = nsn.createStream
If (Not(nst.Open( "c:\DATA.xml" ))) Then
Print "Open File DATA.xml Failed"
End If
nst.truncate
Set ndxle = nsn.CreateDXLExporter (ndo, nst)
Call ndxle.Process()
Msgbox ndxle.Log
Call nst.Close()
End Sub
尽管我建议您阅读信息中心的 DXL,因为执行此操作时需要考虑大量选项。
请注意,Domino Designer 实际上是基于 Eclipse 构建的。因此,您可以右键单击任何设计元素并“查看源代码”来查看 DXL 格式。
此外,如果您使用团队功能,它会将 NSF 转换为 DXL,以便可以轻松集成到源代码控制系统。
更多详细信息:
http://www-10.lotus.com/ldd/ddwiki.nsf/dx/3.7_Source_control
关于java - 如何在 Eclipse 中编写 Java 代码来访问存储在 Domino 数据库中的数据?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12470590/