Class JWNL

java.lang.Object
net.didion.jwnl.JWNL

public final class JWNL extends Object
Contains system info as well as JWNL properties.
  • Field Details

  • Constructor Details

    • JWNL

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

    • initialize

      public static void initialize(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()
    • createElementFromNode

      private static Element createElementFromNode(Node node) throws JWNLException
      Throws:
      JWNLException
    • getParams

      private static Param[] getParams(NodeList list) throws JWNLException
      Throws:
      JWNLException
    • getAttribute

      private static String getAttribute(Node node, String attributeName)
    • getLocale

      private static Locale getLocale(String language, 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 ResourceBundle getResourceBundle()
    • resolveMessage

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

      public static String resolveMessage(String msg, 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 String resolveMessage(String msg, 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 String insertParams(String str, Object[] params)
    • checkInitialized

      private static void checkInitialized(int requiredStage)
    • shutdown

      public static void shutdown()