public final class TaggingPresetReader extends 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 String |
PRESET_MIME_TYPES
The accepted MIME types sent in the HTTP Accept header.
|
private static File |
zipIcons |
Modifier | Constructor and Description |
---|---|
private |
TaggingPresetReader() |
Modifier and Type | Method and Description |
---|---|
private static XmlObjectParser |
buildParser() |
static Set<String> |
getPresetSources()
Returns the set of preset source URLs.
|
static File |
getZipIcons() |
static boolean |
isLoadIcons()
Determines if icon images should be loaded.
|
static Collection<TaggingPreset> |
readAll(Collection<String> sources,
boolean validate)
Reads all tagging presets from the given sources.
|
static Collection<TaggingPreset> |
readAll(Collection<String> sources,
boolean validate,
boolean displayErrMsg)
Reads all tagging presets from the given sources.
|
static Collection<TaggingPreset> |
readAll(Reader in,
boolean validate)
Reads all tagging presets from the input reader.
|
(package private) static Collection<TaggingPreset> |
readAll(Reader in,
boolean validate,
TaggingPresetReader.HashSetWithLast<TaggingPreset> all)
Reads all tagging presets from the input reader.
|
static Collection<TaggingPreset> |
readAll(String source,
boolean validate)
Reads all tagging presets from the given source.
|
(package private) static Collection<TaggingPreset> |
readAll(String source,
boolean validate,
TaggingPresetReader.HashSetWithLast<TaggingPreset> all)
Reads all tagging presets from the given source.
|
static 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 String PRESET_MIME_TYPES
private static volatile boolean loadIcons
private TaggingPresetReader()
public static Set<String> getPresetSources()
private static XmlObjectParser buildParser()
public static Collection<TaggingPreset> readAll(Reader in, boolean validate) throws SAXException
in
- The input readervalidate
- if true
, XML validation will be performedSAXException
- if any XML error occursstatic Collection<TaggingPreset> readAll(Reader in, boolean validate, TaggingPresetReader.HashSetWithLast<TaggingPreset> all) throws SAXException
in
- The input readervalidate
- if true
, XML validation will be performedall
- the accumulator for parsed tagging presetsSAXException
- if any XML error occurspublic static Collection<TaggingPreset> readAll(String source, boolean validate) throws SAXException, IOException
source
- a given filename, URL or internal resourcevalidate
- if true
, XML validation will be performedSAXException
- if any XML error occursIOException
- if any I/O error occursstatic Collection<TaggingPreset> readAll(String source, boolean validate, TaggingPresetReader.HashSetWithLast<TaggingPreset> all) throws SAXException, IOException
source
- a given filename, URL or internal resourcevalidate
- if true
, XML validation will be performedall
- the accumulator for parsed tagging presetsSAXException
- if any XML error occursIOException
- if any I/O error occurspublic static Collection<TaggingPreset> readAll(Collection<String> sources, boolean validate)
sources
- Collection of tagging presets sources.validate
- if true
, presets will be validated against XML schemapublic static Collection<TaggingPreset> readAll(Collection<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 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 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