public class XMLPreferenceLoader extends BasePreferenceLoader implements PreferenceLoader
log, prefs
Constructor and Description |
---|
XMLPreferenceLoader(java.net.URI XMLPreferences)
Constructor for creating an XMLPreferenceLoader.
|
XMLPreferenceLoader(java.net.URI XMLPreferences,
boolean validate)
Constructor for creating an XMLPreferenceLoader.
|
Modifier and Type | Method and Description |
---|---|
LoaderPreferences |
load()
Returns a generic Preferences object.
|
boolean |
validate()
Validates an XML preferences file against its corresponding XSD.
|
getPreferencesURI, setPreferencesURI, unmarshal, validate
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getPreferencesURI, setPreferencesURI
public XMLPreferenceLoader(java.net.URI XMLPreferences, boolean validate) throws LgConvertException
XMLPreferences
- The location of the XML preferences file.validate
- Whether or not to validate the preferences XML against the
associated XML schema. This will look for invalid, extra, or
missing values. Note that even if this is 'false', the XML
will be structurally validated. This means that even if it is
not validated against the schema, it will still be validated
to ensure it is a well-structured XML file.LgConvertException
- Thrown if the XML is not a valid XML file, or if 'validate'
is true this exception will be thrown if the XML does not
validate against the schema.public XMLPreferenceLoader(java.net.URI XMLPreferences) throws LgConvertException
XMLPreferences
- The location of the XML preferences file.LgConvertException
- Thrown if the XML is not a valid XML file, or if the XML does
not validate against the schema.public boolean validate()
validate
in interface PreferenceLoader
public LoaderPreferences load() throws LgConvertException
PreferenceLoader
load
in interface PreferenceLoader
LgConvertException