Class JWNL


  • public final class JWNL
    extends java.lang.Object
    Contains system info as well as JWNL properties.
    • Constructor Detail

      • JWNL

        private JWNL()
        Create a private JWNL to prevent construction.
    • Method Detail

      • initialize

        public static void initialize​(java.io.InputStream propertiesStream)
                               throws JWNLException
        Parses a properties file and sets the ready state at various points. Initializes the various PointerType, Adjective, and VerbFrame necessary preprocessing items.
        Parameters:
        propertiesStream - the properties file stream
        Throws:
        JWNLException - various JWNL exceptions, depending on where this fails
      • createResourceBundle

        private static void createResourceBundle()
      • getAttribute

        private static java.lang.String getAttribute​(org.w3c.dom.Node node,
                                                     java.lang.String attributeName)
      • getLocale

        private static java.util.Locale getLocale​(java.lang.String language,
                                                  java.lang.String country)
      • isInitialized

        public static boolean isInitialized()
      • getOS

        public static JWNL.OS getOS()
        Get the current OS.
      • getJavaVersion

        public static double getJavaVersion()
      • getVersion

        public static JWNL.Version getVersion()
        Get the current WordNet version
      • getResourceBundle

        public static java.util.ResourceBundle getResourceBundle()
      • resolveMessage

        public static java.lang.String resolveMessage​(java.lang.String msg)
        Resolve msg in one of the resource bundles used by the system
      • resolveMessage

        public static java.lang.String resolveMessage​(java.lang.String msg,
                                                      java.lang.Object obj)
        Resolve msg in one of the resource bundles used by the system.
        Parameters:
        obj - parameter to insert into the resolved message
      • resolveMessage

        public static java.lang.String resolveMessage​(java.lang.String msg,
                                                      java.lang.Object[] params)
        Resolve msg in one of the resource bundles used by the system
        Parameters:
        params - parameters to insert into the resolved message
      • insertParams

        private static java.lang.String insertParams​(java.lang.String str,
                                                     java.lang.Object[] params)
      • checkInitialized

        private static void checkInitialized​(int requiredStage)
      • shutdown

        public static void shutdown()