Class TaggingPresets


  • public final class TaggingPresets
    extends java.lang.Object
    Class holding Tagging Presets and allowing to manage them.
    Since:
    7100
    • Method Detail

      • readFromPreferences

        public static void readFromPreferences()
        Initializes tagging presets from preferences.
      • initialize

        public static void initialize()
        Initialize the tagging presets (load and may display error)
      • destroy

        public static void destroy()
        Call to deconstruct the TaggingPresets menus and other information so that it can be rebuilt later.
        Since:
        15582
      • cachePresets

        public static void cachePresets​(java.util.Collection<TaggingPreset> presets)
        Initialize the cache for presets. This is done only once.
        Parameters:
        presets - Tagging presets to cache
      • getTaggingPresets

        public static java.util.Collection<TaggingPresetgetTaggingPresets()
        Replies a new collection containing all tagging presets.
        Returns:
        a new collection containing all tagging presets. Empty if presets are not initialized (never null)
      • getPresetRoles

        public static java.util.Set<java.lang.String> getPresetRoles()
        Replies a set of all roles in the tagging presets.
        Returns:
        a set of all roles in the tagging presets.
      • getPresetKeys

        public static java.util.Set<java.lang.String> getPresetKeys()
        Replies a set of all keys in the tagging presets.
        Returns:
        a set of all keys in the tagging presets.
      • getPresetValues

        public static java.util.Set<java.lang.String> getPresetValues​(java.lang.String key)
        Return set of values for a key in the tagging presets
        Parameters:
        key - the key
        Returns:
        set of values for a key in the tagging presets
      • isKeyInPresets

        public static boolean isKeyInPresets​(java.lang.String key)
        Determines if the given key is in the loaded presets.
        Parameters:
        key - key
        Returns:
        true if the given key in the loaded presets
        Since:
        18281
      • getMatchingPresets

        public static java.util.Collection<TaggingPresetgetMatchingPresets​(IPrimitive primitive)
        Replies a new collection of all presets matching the given preset.
        Parameters:
        primitive - the primitive
        Returns:
        a new collection of all presets matching the given preset.
        Since:
        13623 (signature)
        See Also:
        TaggingPreset.test(IPrimitive)
      • addTaggingPresets

        public static void addTaggingPresets​(java.util.Collection<TaggingPreset> presets)
        Adds a list of tagging presets to the current list.
        Parameters:
        presets - The tagging presets to add