public final class TaggingPresetReader extends java.lang.Object
| Modifier and Type | Class and Description |
|---|---|
static class |
TaggingPresetReader.Chunk
Holds a reference to a chunk of items/objects.
|
(package private) static class |
TaggingPresetReader.HashSetWithLast<E> |
static class |
TaggingPresetReader.Reference
Holds a reference to an earlier item/object.
|
| Modifier and Type | Field and Description |
|---|---|
private static boolean |
loadIcons |
static java.lang.String |
PRESET_MIME_TYPES
The accepted MIME types sent in the HTTP Accept header.
|
private static java.io.File |
zipIcons |
| Modifier | Constructor and Description |
|---|---|
private |
TaggingPresetReader() |
| Modifier and Type | Method and Description |
|---|---|
private static XmlObjectParser |
buildParser() |
static java.util.Set<java.lang.String> |
getPresetSources()
Returns the set of preset source URLs.
|
static java.io.File |
getZipIcons() |
static boolean |
isLoadIcons()
Determines if icon images should be loaded.
|
static java.util.Collection<TaggingPreset> |
readAll(java.util.Collection<java.lang.String> sources,
boolean validate)
Reads all tagging presets from the given sources.
|
static java.util.Collection<TaggingPreset> |
readAll(java.util.Collection<java.lang.String> sources,
boolean validate,
boolean displayErrMsg)
Reads all tagging presets from the given sources.
|
static java.util.Collection<TaggingPreset> |
readAll(java.io.Reader in,
boolean validate)
Reads all tagging presets from the input reader.
|
(package private) static java.util.Collection<TaggingPreset> |
readAll(java.io.Reader in,
boolean validate,
TaggingPresetReader.HashSetWithLast<TaggingPreset> all)
Reads all tagging presets from the input reader.
|
static java.util.Collection<TaggingPreset> |
readAll(java.lang.String source,
boolean validate)
Reads all tagging presets from the given source.
|
(package private) static java.util.Collection<TaggingPreset> |
readAll(java.lang.String source,
boolean validate,
TaggingPresetReader.HashSetWithLast<TaggingPreset> all)
Reads all tagging presets from the given source.
|
static java.util.Collection<TaggingPreset> |
readFromPreferences(boolean validate,
boolean displayErrMsg)
Reads all tagging presets from sources stored in preferences.
|
static void |
setLoadIcons(boolean loadIcons)
Sets whether icon images should be loaded.
|
public static final java.lang.String PRESET_MIME_TYPES
private static volatile java.io.File zipIcons
private static volatile boolean loadIcons
private TaggingPresetReader()
public static java.util.Set<java.lang.String> getPresetSources()
private static XmlObjectParser buildParser()
public static java.util.Collection<TaggingPreset> readAll(java.io.Reader in, boolean validate) throws org.xml.sax.SAXException
in - The input readervalidate - if true, XML validation will be performedorg.xml.sax.SAXException - if any XML error occursstatic java.util.Collection<TaggingPreset> readAll(java.io.Reader in, boolean validate, TaggingPresetReader.HashSetWithLast<TaggingPreset> all) throws org.xml.sax.SAXException
in - The input readervalidate - if true, XML validation will be performedall - the accumulator for parsed tagging presetsorg.xml.sax.SAXException - if any XML error occurspublic static java.util.Collection<TaggingPreset> readAll(java.lang.String source, boolean validate) throws org.xml.sax.SAXException, java.io.IOException
source - a given filename, URL or internal resourcevalidate - if true, XML validation will be performedorg.xml.sax.SAXException - if any XML error occursjava.io.IOException - if any I/O error occursstatic java.util.Collection<TaggingPreset> readAll(java.lang.String source, boolean validate, TaggingPresetReader.HashSetWithLast<TaggingPreset> all) throws org.xml.sax.SAXException, java.io.IOException
source - a given filename, URL or internal resourcevalidate - if true, XML validation will be performedall - the accumulator for parsed tagging presetsorg.xml.sax.SAXException - if any XML error occursjava.io.IOException - if any I/O error occurspublic static java.util.Collection<TaggingPreset> readAll(java.util.Collection<java.lang.String> sources, boolean validate)
sources - Collection of tagging presets sources.validate - if true, presets will be validated against XML schemapublic static java.util.Collection<TaggingPreset> readAll(java.util.Collection<java.lang.String> sources, boolean validate, boolean displayErrMsg)
sources - Collection of tagging presets sources.validate - if true, presets will be validated against XML schemadisplayErrMsg - if true, a blocking error message is displayed in case of I/O exception.public static java.util.Collection<TaggingPreset> readFromPreferences(boolean validate, boolean displayErrMsg)
validate - if true, presets will be validated against XML schemadisplayErrMsg - if true, a blocking error message is displayed in case of I/O exception.public static java.io.File getZipIcons()
public static boolean isLoadIcons()
true if icon images should be loadedpublic static void setLoadIcons(boolean loadIcons)
loadIcons - true if icon images should be loaded