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 classUsed to create constants that represent the major categories of operating systems.static final classRepresents a version of WordNet. -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static ResourceBundleSetprivate static JWNL.OSprivate static intprivate static JWNL.Versionprivate static final Stringprivate static final Stringprivate static final Stringstatic final JWNL.OS[]private static final intprivate static final Stringprivate static final intprivate static final Stringprivate static final Stringstatic final JWNL.OSprivate static final Stringprivate static final Stringstatic final Stringprivate static final Stringprivate static final Stringprivate static final Stringprivate static final intstatic final JWNL.OSprivate static final intstatic final JWNL.OSprivate static final Stringprivate static final intprivate static final Stringstatic final JWNL.OS -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate static voidcheckInitialized(int requiredStage) private static ElementcreateElementFromNode(Node node) private static voidprivate static StringgetAttribute(Node node, String attributeName) static doubleprivate static Localestatic JWNL.OSgetOS()Get the current OS.private static Param[]static ResourceBundlestatic JWNL.VersionGet the current WordNet versionstatic voidinitialize(InputStream propertiesStream) Parses a properties file and sets the ready state at various points.private static StringinsertParams(String str, Object[] params) static booleanstatic StringresolveMessage(String msg) Resolve msg in one of the resource bundles used by the systemstatic StringresolveMessage(String msg, Object obj) Resolve msg in one of the resource bundles used by the system.static StringresolveMessage(String msg, Object[] params) Resolve msg in one of the resource bundles used by the systemstatic voidshutdown()
-
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
-
resolveMessage
-
resolveMessage
-
insertParams
-
checkInitialized
private static void checkInitialized(int requiredStage) -
shutdown
public static void shutdown()
-