有 Java 编程相关的问题?

你可以在下面搜索框中键入要查询的问题!

java从文档中获取Lotus Notes数据

我在我的Lotus notes(8.5.2)版本中使用了一个本地数据库,我试图获取两方面的数据:

  1. NotesUIView中突出显示的文档/项
  2. 在^{中选择的文档

然而,我得到的只是Notes URL,我不知道该怎么处理它们。谁能帮帮我吗

是的,我正在使用Eclipse的Java API

以下是我所做工作的代码示例:

NotesUIWorkspace workSpace = new NotesUIWorkspace();
NotesUIElement currentElement = workSpace.getCurrentElement();

if (currentElement instanceof NotesUIView) {
    NotesUIView currentView = (NotesUIView) currentElement;
    NotesUIViewEntryCollection collection = currentView
            .getActionableEntries();
    Iterator docIterator = collection.documentIterator();
    while (docIterator.hasNext()) {
        NotesUIDocumentEntry entry = (NotesUIDocumentEntry) docIterator.next();
        //I can't seem to get to the NoesUIDocument case like I can below... I want fields!
    }
}

if(currentElement instanceof NotesUIDocument){
    NotesUIDocument document = (NotesUIDocument) currentElement;
    //Seem to be able to get the correct data fields only in this case!
    document.getFields();
}

共 (1) 个答案

  1. # 1 楼答案

    你有一个URL作为例子吗?如果它包含相关文档的UUID,那么您应该能够使用getDocument()直接引用它。否则,URL应该包含一个视图引用和该视图的查找键