Package weka.core

Examples of weka.core.Version


    TreeVisualizePlugin plugin = (TreeVisualizePlugin) Class.forName(className).newInstance();
    if (plugin == null)
      continue;
    availablePlugins = true;
    JMenuItem pluginMenuItem = plugin.getVisualizeMenuItem(grph, selectedName);
    Version version = new Version();
    if (pluginMenuItem != null) {
      if (version.compareTo(plugin.getMinVersion()) < 0)
        pluginMenuItem.setText(pluginMenuItem.getText() + " (weka outdated)");
      if (version.compareTo(plugin.getMaxVersion()) >= 0)
        pluginMenuItem.setText(pluginMenuItem.getText() + " (plugin outdated)");
      visPlugins.add(pluginMenuItem);
    }
  }
  catch (Exception e) {
View Full Code Here


        VisualizePlugin plugin = (VisualizePlugin) Class.forName(className).newInstance();
        if (plugin == null)
          continue;
        availablePlugins = true;
        JMenuItem pluginMenuItem = plugin.getVisualizeMenuItem(preds, classAtt);
        Version version = new Version();
        if (pluginMenuItem != null) {
          /*if (version.compareTo(plugin.getMinVersion()) < 0)
            pluginMenuItem.setText(pluginMenuItem.getText() + " (weka outdated)");
          if (version.compareTo(plugin.getMaxVersion()) >= 0)
            pluginMenuItem.setText(pluginMenuItem.getText() + " (plugin outdated)"); */
          visPlugins.add(pluginMenuItem);
        }
      }
      catch (Exception e) {
    //e.printStackTrace();
      }
    }
   
    // errros
    pluginsVector = GenericObjectEditor.getClassnames(ErrorVisualizePlugin.class.getName());
    for (int i = 0; i < pluginsVector.size(); i++) {
      String className = (String) (pluginsVector.elementAt(i));
      try {
        ErrorVisualizePlugin plugin = (ErrorVisualizePlugin) Class.forName(className).newInstance();
        if (plugin == null)
          continue;
        availablePlugins = true;
        JMenuItem pluginMenuItem = plugin.getVisualizeMenuItem(vp.getInstances());
        Version version = new Version();
        if (pluginMenuItem != null) {
          /*if (version.compareTo(plugin.getMinVersion()) < 0)
            pluginMenuItem.setText(pluginMenuItem.getText() + " (weka outdated)");
          if (version.compareTo(plugin.getMaxVersion()) >= 0)
            pluginMenuItem.setText(pluginMenuItem.getText() + " (plugin outdated)"); */
          visPlugins.add(pluginMenuItem);
        }
      }
      catch (Exception e) {
    //e.printStackTrace();
      }
    }
   
    // graphs+trees
    if (grph != null) {
      // trees
      if (((Drawable) temp_classifier).graphType() == Drawable.TREE) {
  pluginsVector = GenericObjectEditor.getClassnames(TreeVisualizePlugin.class.getName());
  for (int i = 0; i < pluginsVector.size(); i++) {
    String className = (String) (pluginsVector.elementAt(i));
    try {
      TreeVisualizePlugin plugin = (TreeVisualizePlugin) Class.forName(className).newInstance();
      if (plugin == null)
        continue;
      availablePlugins = true;
      JMenuItem pluginMenuItem = plugin.getVisualizeMenuItem(grph, selectedName);
      Version version = new Version();
      if (pluginMenuItem != null) {
        /*if (version.compareTo(plugin.getMinVersion()) < 0)
    pluginMenuItem.setText(pluginMenuItem.getText() + " (weka outdated)");
        if (version.compareTo(plugin.getMaxVersion()) >= 0)
    pluginMenuItem.setText(pluginMenuItem.getText() + " (plugin outdated)"); */
        visPlugins.add(pluginMenuItem);
      }
    }
    catch (Exception e) {
      //e.printStackTrace();
    }
  }
      }
      // graphs
      else {
  pluginsVector = GenericObjectEditor.getClassnames(GraphVisualizePlugin.class.getName());
  for (int i = 0; i < pluginsVector.size(); i++) {
    String className = (String) (pluginsVector.elementAt(i));
    try {
      GraphVisualizePlugin plugin = (GraphVisualizePlugin) Class.forName(className).newInstance();
      if (plugin == null)
        continue;
      availablePlugins = true;
      JMenuItem pluginMenuItem = plugin.getVisualizeMenuItem(grph, selectedName);
      Version version = new Version();
      if (pluginMenuItem != null) {
        /*if (version.compareTo(plugin.getMinVersion()) < 0)
    pluginMenuItem.setText(pluginMenuItem.getText() + " (weka outdated)");
        if (version.compareTo(plugin.getMaxVersion()) >= 0)
    pluginMenuItem.setText(pluginMenuItem.getText() + " (plugin outdated)"); */
 
View Full Code Here

   * @param title       the additional part of the title
   */
  protected void createTitle(String title) {
    String      newTitle;
   
    newTitle = Messages.getInstance().getString("GUIChooser_CreateTitle_Text_Front") + new Version();
    if (title.length() != 0)
      newTitle += Messages.getInstance().getString("GUIChooser_CreateTitle_Text_End") + title;
   
    setTitle(newTitle);
  }
View Full Code Here

        VisualizePlugin plugin = (VisualizePlugin) Class.forName(className).newInstance();
        if (plugin == null)
          continue;
        availablePlugins = true;
        JMenuItem pluginMenuItem = plugin.getVisualizeMenuItem(preds, classAtt);
        Version version = new Version();
        if (pluginMenuItem != null) {
          if (version.compareTo(plugin.getMinVersion()) < 0)
            pluginMenuItem.setText(pluginMenuItem.getText() + Messages.getInstance().getString("ClassifierPanel_Visualize_PluginMenuItemSetText_Text_First"));
          if (version.compareTo(plugin.getMaxVersion()) >= 0)
            pluginMenuItem.setText(pluginMenuItem.getText() + Messages.getInstance().getString("ClassifierPanel_Visualize_PluginMenuItemSetText_Text_Second"));
          visPlugins.add(pluginMenuItem);
        }
      }
      catch (ClassNotFoundException cnfe) {
View Full Code Here

   * @param title   the additional part of the title
   */
  protected void createTitle(String title) {
    String  newTitle;
   
    newTitle = Messages.getInstance().getString("Main_CreateTitle_NewTitle_Text") + new Version();
    if (title.length() != 0)
      newTitle += " - " + title;
   
    setTitle(newTitle);
  }
View Full Code Here

   * @param title   the additional part of the title
   */
  protected void createTitle(String title) {
    String  newTitle;
   
    newTitle = "Weka " + new Version();
    if (title.length() != 0)
      newTitle += " - " + title;
   
    setTitle(newTitle);
  }
View Full Code Here

        VisualizePlugin plugin = (VisualizePlugin) Class.forName(className).newInstance();
        if (plugin == null)
          continue;
        availablePlugins = true;
        JMenuItem pluginMenuItem = plugin.getVisualizeMenuItem(preds, classAtt);
        Version version = new Version();
        if (pluginMenuItem != null) {
          if (version.compareTo(plugin.getMinVersion()) < 0)
            pluginMenuItem.setText(pluginMenuItem.getText() + " (weka outdated)");
          if (version.compareTo(plugin.getMaxVersion()) >= 0)
            pluginMenuItem.setText(pluginMenuItem.getText() + " (plugin outdated)");
          visPlugins.add(pluginMenuItem);
        }
      }
      catch (ClassNotFoundException cnfe) {
View Full Code Here

    * Checks the version in the current Document with the one of the current
    * release. If the version differ, a warning is printed.
    */
   private void checkVersion() {
      String            versionStr;
      Version           version;
     
      version    = new Version();
      versionStr = getVersion();
      if (versionStr.equals(""))
         System.out.println("WARNING: has no version!");
      else if (version.isOlder(versionStr))
         System.out.println("WARNING: loading a newer version (" + versionStr + " > " + Version.VERSION + ")!");
      else if (version.isNewer(versionStr))
         System.out.println("NOTE: loading an older version (" + versionStr + " < " + Version.VERSION + ")!");
   }
View Full Code Here

    Instances  result;
    Element  root;
    Element  node;
    Vector  list;
    FastVector  atts;
    Version  version;
    int[]  classIndex;

    root = m_Document.getDocumentElement();
   
    // check version
    version = new Version();
    if (version.isOlder(root.getAttribute(ATT_VERSION)))
      System.out.println(
    "WARNING: loading data of version " + root.getAttribute(ATT_VERSION)
    + " with version " + Version.VERSION);
   
    // attributes
View Full Code Here

   * @param title       the additional part of the title
   */
  protected void createTitle(String title) {
    String      newTitle;
   
    newTitle = "Weka " + new Version();
    if (title.length() != 0)
      newTitle += " - " + title;
   
    setTitle(newTitle);
  }
View Full Code Here

TOP

Related Classes of weka.core.Version

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.