Package net.didion.jwnl
Class JWNL
- java.lang.Object
-
- net.didion.jwnl.JWNL
-
public final class JWNL extends Object
Contains system info as well as JWNL properties.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
JWNL.OS
Used to create constants that represent the major categories of operating systems.static class
JWNL.Version
Represents a version of WordNet.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static double
getJavaVersion()
static JWNL.OS
getOS()
Get the current OS.static ResourceBundle
getResourceBundle()
static JWNL.Version
getVersion()
Get the current WordNet versionstatic void
initialize(InputStream propertiesStream)
Parses a properties file and sets the ready state at various points.static boolean
isInitialized()
static String
resolveMessage(String msg)
Resolve msg in one of the resource bundles used by the systemstatic 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 systemstatic void
shutdown()
-
-
-
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(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
-
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
-
shutdown
public static void shutdown()
-
-