View Javadoc
1   /*
2    * Licensed to The Apereo Foundation under one or more contributor license
3    * agreements. See the NOTICE file distributed with this work for additional
4    * information regarding copyright ownership.
5    *
6    *
7    * The Apereo Foundation licenses this file to you under the Educational
8    * Community License, Version 2.0 (the "License"); you may not use this file
9    * except in compliance with the License. You may obtain a copy of the License
10   * at:
11   *
12   *   http://opensource.org/licenses/ecl2.txt
13   *
14   * Unless required by applicable law or agreed to in writing, software
15   * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
16   * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the
17   * License for the specific language governing permissions and limitations under
18   * the License.
19   *
20   */
21  
22  package org.opencastproject.metadata.mpeg7;
23  
24  import org.opencastproject.mediapackage.XmlElement;
25  
26  /**
27   * Textual is a generic text type:
28   *
29   * <pre>
30   * &lt;complexType name="TextualBaseType" abstract="true"&gt;
31   *   &lt;simpleContent&gt;
32   *     &lt;extension base="string"&gt;
33   *       &lt;attribute ref="xml:lang" use="optional"/&gt;
34   *       &lt;attribute name="phoneticTranscription" use="optional"&gt;
35   *         &lt;simpleType&gt;
36   *           &lt;list itemType="mpeg7:PhoneType"/&gt;
37   *         &lt;/simpleType&gt;
38   *       &lt;/attribute&gt;
39   *       &lt;attribute name="phoneticAlphabet" type="mpeg7:phoneticAlphabetType" use="optional" default="sampa"/&gt;
40   *     &lt;/extension&gt;
41   *   &lt;/simpleContent&gt;
42   * &lt;/complexType&gt;
43   * </pre>
44   */
45  public interface Textual extends XmlElement {
46  
47    /**
48     * Sets the text.
49     *
50     * @param text
51     *          the text
52     */
53    void setText(String text);
54  
55    /**
56     * Returns the actual text.
57     *
58     * @return the text
59     */
60    String getText();
61  
62    /**
63     * Sets the language, which must correspond to the defininition of <code>xml:lang</code>.
64     *
65     * @param language
66     *          the language
67     */
68    void setLanguage(String language);
69  
70    /**
71     * Returns the text's language.
72     *
73     * @return the language
74     */
75    String getLanguage();
76  
77    /**
78     * Sets the phonetic transcription and specifies which alphabet was used to produce it.
79     *
80     * @param transcription
81     *          the transcription
82     * @param alphabet
83     *          the alphabet
84     */
85    void setPhoneticTranscription(String transcription, String alphabet);
86  
87    /**
88     * Returns the optional phonetic transcription.
89     *
90     * @return the phonetic transcription
91     */
92    String getPhoneticTranscription();
93  
94    /**
95     * Returns the optional phonetic alphabet or the default value <code>sampa</code> if no alphabet has been specified.
96     *
97     * @return the phonetic alphabet
98     */
99    String getPhoneticAlphabet();
100 
101 }