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.
|
static class |
TaggingPresetReader.Reference
Holds a reference to an earlier item/object.
|
| Modifier and Type | Field and Description |
|---|---|
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 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.
|
static java.util.Collection<TaggingPreset> |
readAll(java.lang.String source,
boolean validate)
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.
|
public static final java.lang.String PRESET_MIME_TYPES
private static java.io.File zipIcons
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 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 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()