Package net.didion.jwnl
Class JWNL
java.lang.Object
net.didion.jwnl.JWNL
Contains system info as well as JWNL properties.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final class
Used to create constants that represent the major categories of operating systems.static final class
Represents a version of WordNet. -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static ResourceBundleSet
private static JWNL.OS
private static int
private static JWNL.Version
private static final String
private static final String
private static final String
static final JWNL.OS[]
private static final int
private static final String
private static final int
private static final String
private static final String
static final JWNL.OS
private static final String
private static final String
static final String
private static final String
private static final String
private static final String
private static final int
static final JWNL.OS
private static final int
static final JWNL.OS
private static final String
private static final int
private static final String
static final JWNL.OS
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate static void
checkInitialized
(int requiredStage) private static Element
createElementFromNode
(Node node) private static void
private static String
getAttribute
(Node node, String attributeName) static double
private static Locale
static JWNL.OS
getOS()
Get the current OS.private static Param[]
static ResourceBundle
static JWNL.Version
Get the current WordNet versionstatic void
initialize
(InputStream propertiesStream) Parses a properties file and sets the ready state at various points.private static String
insertParams
(String str, Object[] params) static boolean
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 Details
-
WINDOWS
-
UNIX
-
MAC
-
UNDEFINED
-
DEFINED_OS_ARRAY
-
OS_PROPERTY_NAME
- See Also:
-
JAVA_VERSION_PROPERTY
- See Also:
-
CORE_RESOURCE
- See Also:
-
UNINITIALIZED
private static final int UNINITIALIZED- See Also:
-
START
private static final int START- See Also:
-
DICTIONARY_PATH_SET
private static final int DICTIONARY_PATH_SET- See Also:
-
VERSION_SET
private static final int VERSION_SET- See Also:
-
INITIALIZED
private static final int INITIALIZED- See Also:
-
_version
-
_bundle
-
_currentOS
-
_initStage
private static int _initStage -
VERSION_TAG
- See Also:
-
DICTIONARY_TAG
- See Also:
-
PARAM_TAG
- See Also:
-
RESOURCE_TAG
- See Also:
-
LANGUAGE_ATTRIBUTE
- See Also:
-
COUNTRY_ATTRIBUTE
- See Also:
-
CLASS_ATTRIBUTE
- See Also:
-
NAME_ATTRIBUTE
- See Also:
-
VALUE_ATTRIBUTE
- See Also:
-
PUBLISHER_ATTRIBUTE
- See Also:
-
NUMBER_ATTRIBUTE
- See Also:
-
-
Constructor Details
-
JWNL
private JWNL()Create a private JWNL to prevent construction.
-
-
Method Details
-
initialize
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
- Throws:
JWNLException
-
getParams
- Throws:
JWNLException
-
getAttribute
-
getLocale
-
isInitialized
public static boolean isInitialized() -
getOS
Get the current OS. -
getJavaVersion
public static double getJavaVersion() -
getVersion
Get the current WordNet version -
getResourceBundle
-
resolveMessage
Resolve msg in one of the resource bundles used by the system -
resolveMessage
Resolve msg in one of the resource bundles used by the system.- Parameters:
obj
- parameter to insert into the resolved message
-
resolveMessage
Resolve msg in one of the resource bundles used by the system- Parameters:
params
- parameters to insert into the resolved message
-
insertParams
-
checkInitialized
private static void checkInitialized(int requiredStage) -
shutdown
public static void shutdown()
-