0

我有一个处理由 Protege (3.5, Frames) 项目生成的 .pins 文件的应用程序。

我希望能够从 Protege 中处理该文件。我遇到的麻烦是从 API 中获取项目(甚至是实例)的引脚表示。

API 中有什么东西可以让我获得 .pins 表示,还是我必须滚动我自己的项目/实例解析器才能手动生成它?

4

1 回答 1

0

ClipsFilesExportProjectPlugin通过在我自己的插件中实例化一个对象,我已经能够实现我想要的。有了这个,您可以指定引脚和 pont 文件的名称并执行导出,以便您在磁盘上拥有文件的副本并使用它做您需要的事情。非常丑陋,但达到了我所需要的。

            ClipsFilesExportProjectPlugin p = new ClipsFilesExportProjectPlugin();
            p.setFiles("temp.pont", "temp.pins");
            p.exportProject(getKnowledgeBase().getProject());

            File pontFile = new File("temp.pont");
            File pinsFile = new File("temp.pins");

            // do what you require with the pins (and / or pont) file

            pontFile.delete();
            pinsFile.delete();
于 2013-11-21T10:24:07.367 回答