java - 如何在 Eclipse 中编写 Java 代码来访问存储在 Domino 数据库中的数据?

标签 java eclipse import eclipse-plugin lotus-domino

我想通过编程方式将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,因为执行此操作时需要考虑大量选项。

http://publib.boulder.ibm.com/infocenter/domhelp/v8r0/topic/com.ibm.designer.domino.main.doc/H_EXPORTING_AND_IMPORTING_DXL_JAVA.html

请注意,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/

相关文章:

eclipse - 如何使用 Eclipse EGit 从我的服务器 git 存储库下载/克隆一个新分支到我的 PC 中已经创建的本地 git 存储库

php - 将产品导入 magento 后,它们不显示目录

javascript - React Typescript - 导入@types/react 和导入react 之间有什么区别

java - 使用 bigquery java api 获得较小的查询结果

java - JSF2 : Submit AJAX form

java - 套接字关闭不抛出 IOException

eclipse - 基于 Eclipse RCP 的产品中的 Logback 或 Eclipse 记录器

java - 如何从 Jar 中读取工作区中的 Java 文件?

sql - 如何将 Excel 电子表格导入 SQL Server 2008R2 数据库?

java - 来自 Java 的 Reporting Services WS - 获取 (401)Unauthorized