Package weka.core

Class WekaPackageUtils


  • public class WekaPackageUtils
    extends Object
    Utility functions for Weka packages.
    Author:
    fracpete (fracpete at waikato dot ac dot nz)
    • Constructor Detail

      • WekaPackageUtils

        public WekaPackageUtils()
    • Method Detail

      • isOfficial

        public static boolean isOfficial​(weka.core.packageManagement.Package pkg)
                                  throws Exception
        Checks whether the package is an official one.
        Parameters:
        pkg - the package to check
        Returns:
        true if official
        Throws:
        Exception - if querying package manager fails
      • isOfficial

        public static boolean isOfficial​(String name)
                                  throws Exception
        Checks whether the package is an official one.
        Parameters:
        name - the name of the package to check
        Returns:
        true if official
        Throws:
        Exception - if querying package manager fails
      • toMap

        public static Map<String,​Object> toMap​(weka.core.packageManagement.Package pkg)
                                              throws Exception
        Turns the package into a map.
        Parameters:
        pkg - the package to convert
        Returns:
        the generated map
        Throws:
        Exception - if conversion fails