Class TaggingPresetReader

    • Method Detail

      • getPresetSources

        public static Set<StringgetPresetSources()
        Returns the set of preset source URLs.
        Returns:
        The set of preset source URLs.
      • readAll

        public static Collection<TaggingPresetreadAll​(Reader in,
                                                        boolean validate)
                                                 throws SAXException
        Reads all tagging presets from the input reader.
        Parameters:
        in - The input reader
        validate - if true, XML validation will be performed
        Returns:
        collection of tagging presets
        Throws:
        SAXException - if any XML error occurs
      • readAll

        public static Collection<TaggingPresetreadAll​(String source,
                                                        boolean validate)
                                                 throws SAXException,
                                                        IOException
        Reads all tagging presets from the given source.
        Parameters:
        source - a given filename, URL or internal resource
        validate - if true, XML validation will be performed
        Returns:
        collection of tagging presets
        Throws:
        SAXException - if any XML error occurs
        IOException - if any I/O error occurs
      • readAll

        public static Collection<TaggingPresetreadAll​(Collection<String> sources,
                                                        boolean validate)
        Reads all tagging presets from the given sources.
        Parameters:
        sources - Collection of tagging presets sources.
        validate - if true, presets will be validated against XML schema
        Returns:
        Collection of all presets successfully read
      • readAll

        public static Collection<TaggingPresetreadAll​(Collection<String> sources,
                                                        boolean validate,
                                                        boolean displayErrMsg)
        Reads all tagging presets from the given sources.
        Parameters:
        sources - Collection of tagging presets sources.
        validate - if true, presets will be validated against XML schema
        displayErrMsg - if true, a blocking error message is displayed in case of I/O exception.
        Returns:
        Collection of all presets successfully read
      • readFromPreferences

        public static Collection<TaggingPresetreadFromPreferences​(boolean validate,
                                                                    boolean displayErrMsg)
        Reads all tagging presets from sources stored in preferences.
        Parameters:
        validate - if true, presets will be validated against XML schema
        displayErrMsg - if true, a blocking error message is displayed in case of I/O exception.
        Returns:
        Collection of all presets successfully read
      • getZipIcons

        public static File getZipIcons()
        Returns the zip file where the icons are located
        Returns:
        the zip file where the icons are located
      • isLoadIcons

        public static boolean isLoadIcons()
        Determines if icon images should be loaded.
        Returns:
        true if icon images should be loaded
      • setLoadIcons

        public static void setLoadIcons​(boolean loadIcons)
        Sets whether icon images should be loaded.
        Parameters:
        loadIcons - true if icon images should be loaded