Search in sources :

Example 1 with GateXMLExporter

use of gate.corpora.export.GateXMLExporter in project gate-core by GateNLP.

the class DocumentExportMenu method init.

private void init() {
    DocumentExporter gateXMLExporter = (DocumentExporter) Gate.getCreoleRegister().get(GateXMLExporter.class.getCanonicalName()).getInstantiations().iterator().next();
    addExporter(gateXMLExporter);
    Set<String> toolTypes = Gate.getCreoleRegister().getToolTypes();
    for (String type : toolTypes) {
        List<Resource> instances = Gate.getCreoleRegister().get(type).getInstantiations();
        for (Resource res : instances) {
            if (res instanceof DocumentExporter) {
                addExporter((DocumentExporter) res);
            }
        }
    }
    Gate.getCreoleRegister().addCreoleListener(this);
}
Also used : GateXMLExporter(gate.corpora.export.GateXMLExporter) Resource(gate.Resource) DocumentExporter(gate.DocumentExporter)

Aggregations

DocumentExporter (gate.DocumentExporter)1 Resource (gate.Resource)1 GateXMLExporter (gate.corpora.export.GateXMLExporter)1