net.sf.extjwnl
Class JWNL

java.lang.Object
  extended by net.sf.extjwnl.JWNL

public class JWNL
extends Object

Contains system info as well as JWNL properties.

Author:
John Didion , Aliaksandr Autayeu

Nested Class Summary
static class JWNL.OS
          Used to create constants that represent the major categories of operating systems.
 
Field Summary
static JWNL.OS[] DEFINED_OS_ARRAY
           
static JWNL.OS MAC
           
static String OS_PROPERTY_NAME
           
static JWNL.OS UNDEFINED
           
static JWNL.OS UNIX
           
static JWNL.OS WINDOWS
           
 
Method Summary
static JWNL.OS getOS()
          Returns the current OS.
static ResourceBundle getResourceBundle()
           
static ResourceBundleSet getResourceBundleSet()
           
static void initialize()
           
static void initialize(InputStream propertiesStream)
          Parses a properties file and sets the ready state at various points.
static String resolveMessage(String msg)
          Resolves msg in one of the resource bundles used by the system
static String resolveMessage(String msg, Object obj)
          Resolve msg in one of the resource bundles used by the system.
static String resolveMessage(String msg, Object[] params)
          Resolve msg in one of the resource bundles used by the system
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

WINDOWS

public static final JWNL.OS WINDOWS

UNIX

public static final JWNL.OS UNIX

MAC

public static final JWNL.OS MAC

UNDEFINED

public static final JWNL.OS UNDEFINED

DEFINED_OS_ARRAY

public static final JWNL.OS[] DEFINED_OS_ARRAY

OS_PROPERTY_NAME

public static final String OS_PROPERTY_NAME
See Also:
Constant Field Values
Method Detail

initialize

public static void initialize()

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

getOS

public static JWNL.OS getOS()
Returns the current OS.

Returns:
the current OS

getResourceBundle

public static ResourceBundle getResourceBundle()

getResourceBundleSet

public static ResourceBundleSet getResourceBundleSet()

resolveMessage

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

Parameters:
msg - message to resolve
Returns:
resolved message

resolveMessage

public static String resolveMessage(String msg,
                                    Object obj)
Resolve msg in one of the resource bundles used by the system.

Parameters:
msg - message to resolve
obj - parameter to insert into the resolved message
Returns:
resolved message

resolveMessage

public static String resolveMessage(String msg,
                                    Object[] params)
Resolve msg in one of the resource bundles used by the system

Parameters:
msg - message to resolve
params - parameters to insert into the resolved message
Returns:
resolved message


Copyright © 2011. All Rights Reserved.