/**
 * 
 */
package org.corpus_tools.atomic.tagset;

import java.util.List;

import org.corpus_tools.salt.SALT_TYPE;
import org.corpus_tools.salt.core.SAnnotation;
import org.corpus_tools.salt.core.SLayer;

/**
 * A tagset defining valid annotation values for combinations of layers, Salt
 * element types, annotation namespaces, and annotation names, where
 * 
 * - layers are lists of {@link SLayer}s defined as per
 * {@link SLayer#getName()}, or regular expression {@link String}s filtering
 * layer names. Layers can be `null` if the defined valid values should be
 * available for annotatables across all layers; 
 * - Salt elements types are lists of model element types as defined
 * per {@link SALT_TYPE}. Salt element types can be `null` if the defined 
 * valid values should be available for all element types; 
 * - namespaces are lists of {@link SAnnotation}
 * namespaces defined as per {@link SAnnotation#getNamespace()}, or regular
 * expression {@link String}s filtering namespace names. Namespaces can be 
 * `null` if the defined valid values should be available for all namespaces, 
 * including `null` namespaces; 
 * - names are lists of {@link SAnnotation} names defined as per
 * {@link SAnnotation#getName()}, or regular expression {@link String}s 
 * filtering annotation names. Names can be `null` if the defined 
 * valid values should be available
 * for all annotation names; 
 * - values are lists of valid {@link SAnnotation}
 * values for the defined combination of layers, Salt element types, namespaces
 * and names. Values are defined as pairs of an
 * {@link SAnnotation#getValue_STEXT()} and a {@link String} providing a
 * description of the value (can be `null`), or pairs of regular expression 
 * {@link String}s filtering valid annotation values against 
 * {@link SAnnotation#getValue()} and a {@link String} providing a 
 * description of the regular expression.
 * 
 * @author Stephan Druskat <[mail@sdruskat.net](mailto:mail@sdruskat.net)>
 * 
 */
interface Tagset {

	boolean add(TagsetEntry entry);
	
	boolean remove(TagsetEntry entry);
	
	List<String> getValidValues(TagsetEntry entry);

}

@@ -42,24 +42,74 @@
 ic.tagset;%0A%0A
+import java.io.Serializable;%0Aimport java.net.URI;%0A
 import java.
@@ -2060,10 +2060,208 @@
 set 
-%7B%0A
+extends Serializable %7B%0A%0A%09/**%0A%09 * Adds a tagset entry to the tagset.%0A%09 * %0A%09 * @param entry The %7B@link TagsetEntry%7D to be added%0A%09 * @return %60true%60 if the tagset has changed as a result of this call%0A%09 */
 %0A%09bo
@@ -2269,16 +2269,21 @@
 lean add
+Entry
 (TagsetE
@@ -2297,16 +2297,204 @@
 try);%0A%09%0A
+%09/**%0A%09 * Removes a tagset entry from the tagset.%0A%09 * %0A%09 * @param entry The %7B@link TagsetEntry%7D to be removed%0A%09 * @return %60true%60 if the entry has been removed as a result of this call%0A%09 */%0A
 %09boolean
@@ -2500,16 +2500,21 @@
 n remove
+Entry
 (TagsetE
@@ -2533,55 +2533,822 @@
 %0A%09%0A%09
-List%3CString%3E getValidValues(TagsetEntry entry);%0A
+/**%0A%09 * Provides a list of all entries in the tagset.%0A%09 * %0A%09 * @return a %7B@link List%7D of all %7B@link TagsetEntry%7Ds currently in the tagset%0A%09 */%0A%09List%3CTagsetEntry%3E getEntries();%0A%09%0A%09/**%0A%09 * Loads a tagset from the provided URI.%0A%09 * %0A%09 * @param uri The %7B@link URI%7D from which to load the tagset%0A%09 * @return The tagset which has been serialized at the given URI, or %60null%60 if no tagset could be loaded%0A%09 */%0A%09Tagset load(URI uri);%0A%09%0A%09/**%0A%09 * Saves the tagset at the given URI%0A%09 * %0A%09 * @param uri The URI where the tagset should be saved%0A%09 * @return %60true%60 if the tagset has been successfully save at the given URI%0A%09 */%0A%09boolean save(URI uri);%0A%09%0A%09/**%0A%09 * @return the name of the tagset%0A%09 */%0A%09String getName();%0A%09%0A%09/**%0A%09 * Sets the name of the tagset%0A%09 * %0A%09 * @param name The tagset's name%0A%09 */%0A%09void setName(String name);%0A%09
 %0A%7D%0A

Add methods to Tagset interface