Example usage for weka.gui GenericPropertiesCreator getOutputProperties

List of usage examples for weka.gui GenericPropertiesCreator getOutputProperties

Introduction

In this page you can find the example usage for weka.gui GenericPropertiesCreator getOutputProperties.

Prototype

public Properties getOutputProperties() 

Source Link

Document

returns the output properties object (structure like the template, but filled with classes instead of packages)

Usage

From source file:meka.gui.goe.GenericObjectEditor.java

License:Open Source License

public static void determineAllClasses() {
    weka.gui.GenericObjectEditor.determineClasses();
    try {//from  w  w w  . j a  va2 s  .c  o  m
        GenericPropertiesCreator creator = new GenericPropertiesCreator();
        try {
            creator.execute(false);
            MEKA_EDITOR_PROPERTIES = creator.getOutputProperties();
        } catch (Exception e) {
            JOptionPane.showMessageDialog(null,
                    "Could not determine the properties for the generic object\n"
                            + "editor. This exception was produced:\n" + e.toString(),
                    "MEKA GenericObjectEditor", JOptionPane.ERROR_MESSAGE);
        }

        if (MEKA_EDITOR_PROPERTIES == null) {
            JOptionPane.showMessageDialog(null, "Could not initialize the MEKA GenericPropertiesCreator. ",
                    "MEKA GenericObjectEditor", JOptionPane.ERROR_MESSAGE);
        } else {
            PluginManager.addFromProperties(MEKA_EDITOR_PROPERTIES);
            Enumeration<String> keys = (Enumeration<String>) MEKA_EDITOR_PROPERTIES.propertyNames();
            while (keys.hasMoreElements()) {
                String key = keys.nextElement();
                // merged property?
                if (EDITOR_PROPERTIES.containsKey(key))
                    EDITOR_PROPERTIES.setProperty(key,
                            EDITOR_PROPERTIES.getProperty(key) + "," + MEKA_EDITOR_PROPERTIES.getProperty(key));
                else
                    EDITOR_PROPERTIES.setProperty(key, MEKA_EDITOR_PROPERTIES.getProperty(key));
            }
        }
    } catch (Exception e) {
        JOptionPane.showMessageDialog(
                null, "Could not initialize the MEKA GenericPropertiesCreator. "
                        + "This exception was produced:\n" + e.toString(),
                "MEKA GenericObjectEditor", JOptionPane.ERROR_MESSAGE);
    }
    if (DEBUG)
        System.out.println("start<GenericObjectEditor.determineAllClasses()>\n"
                + PropsUtils.toString(EDITOR_PROPERTIES, null)
                + "end<GenericObjectEditor.determineAllClasses()>\n");
}