Question

I have an application that processes the .pins file generated by a Protege (3.5, Frames) project.

I'd like to be able to process the file from within Protege. The trouble I'm having is getting a pins representation of the project (or even an instance) from within the API.

Is there something within the API that will allow me to get the .pins representation or will I have to roll my own parser of the project / instances to generate it manually?

No correct solution

OTHER TIPS

I've been able to achieve what I wanted by instantiating a ClipsFilesExportProjectPlugin object within my own plugin. With this you can specify the name of the pins and pont files and execute the export so you have a copy of the file on disk and do what you need with it. Pretty ugly but achieves what I needed it for.

            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();
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top