001/*
002 *  Copyright 2010 Anyware Services
003 *
004 *  Licensed under the Apache License, Version 2.0 (the "License");
005 *  you may not use this file except in compliance with the License.
006 *  You may obtain a copy of the License at
007 *
008 *      http://www.apache.org/licenses/LICENSE-2.0
009 *
010 *  Unless required by applicable law or agreed to in writing, software
011 *  distributed under the License is distributed on an "AS IS" BASIS,
012 *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
013 *  See the License for the specific language governing permissions and
014 *  limitations under the License.
015 */
016
017package org.ametys.plugins.repository.metadata;
018
019import org.ametys.plugins.repository.AmetysRepositoryException;
020
021/**
022 * Rich text that is modifiable
023 */
024public interface ModifiableRichText extends RichText, ModifiableResource
025{
026    /**
027     * Returns the Folder holding additional data.<br>
028     * Its internal organization is application dependant.
029     * @return the Folder holding additional data
030     */
031    public ModifiableFolder getAdditionalDataFolder();
032    
033    /**
034     * Add a value to a semantic annotation
035     * @param name The name of the annotation
036     * @param value The value to append
037     * @throws AmetysRepositoryException if an error occurs.
038     */
039    public void addAnnotation(String name, String value) throws AmetysRepositoryException;
040    
041    /**
042     * Add values to a semantic annotation
043     * @param name The name of the annotation
044     * @param values The values to append
045     * @throws AmetysRepositoryException if an error occurs.
046     */
047    public void addAnnotation(String name, String[] values) throws AmetysRepositoryException;
048    
049    /**
050     * Return all semantic annotations 
051     * @throws AmetysRepositoryException if an error occurs.
052     */
053    public void removeAnnotations() throws AmetysRepositoryException;
054    
055    /**
056     * Remove a given semantic annotation
057     * @param name The name of the semantic association to remove 
058     * @throws AmetysRepositoryException if an error occurs.
059     */
060    public void removeAnnotation(String name) throws AmetysRepositoryException;
061    
062}