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 java.awt.Rectangle;
25  
26  /**
27   * The <code>VideoText</code> element represents parts of the video with superimposed text. It is a subtype of a moving
28   * region (<code>mpeg7:MovingRegionType</code>).
29   *
30   * <pre>
31   * &lt;complexType name="VideoTextType"&gt;
32   *   &lt;complexContent&gt;
33   *     &lt;extension base="mpeg7:MovingRegionType"&gt;
34   *       &lt;sequence&gt;
35   *         &lt;element name="Text" type="mpeg7:TextualType" minOccurs="0"/&gt;
36   *       &lt;/sequence&gt;
37   *       &lt;attribute name="textType" use="optional"&gt;
38   *         &lt;simpleType&gt;
39   *           &lt;union&gt;
40   *             &lt;simpleType&gt;
41   *               &lt;restriction base="NMTOKEN"&gt;
42   *                 &lt;enumeration value="superimposed"/&gt;
43   *                 &lt;enumeration value="scene"/&gt;
44   *               &lt;/restriction&gt;
45   *             &lt;/simpleType&gt;
46   *             &lt;simpleType&gt;
47   *               &lt;restriction base="mpeg7:termAliasReferenceType"/&gt;
48   *             &lt;/simpleType&gt;
49   *             &lt;simpleType&gt;
50   *               &lt;restriction base="mpeg7:termURIReferenceType"/&gt;
51   *             &lt;/simpleType&gt;
52   *           &lt;/union&gt;
53   *         &lt;/simpleType&gt;
54   *       &lt;/attribute&gt;
55   *       &lt;attribute name="fontSize" type="positiveInteger" use="optional"/&gt;
56   *       &lt;attribute name="fontType" type="string" use="optional"/&gt;
57   *     &lt;/extension&gt;
58   *   &lt;/complexContent&gt;
59   * &lt;/complexType&gt;
60   * </pre>
61   */
62  public interface VideoText extends MovingRegion {
63  
64    /** Video text type */
65    enum Type {
66      superimposed, scene
67    };
68  
69    /**
70     * Sets the segment identifier.
71     *
72     * @param id
73     *          the identifier
74     */
75    void setIdentifier(String id);
76  
77    /**
78     * Returns the segment identifier.
79     *
80     * @return the identifier
81     */
82    String getIdentifier();
83  
84    /**
85     * Sets the text.
86     *
87     * @param text
88     *          the text
89     */
90    void setText(Textual text);
91  
92    /**
93     * Returns the text.
94     *
95     * @return the text
96     */
97    Textual getText();
98  
99    /**
100    * Sets the videotext type.
101    *
102    * @param type
103    *          the type
104    */
105   void setType(Type type);
106 
107   /**
108    * Rerturns the videotext type.
109    *
110    * @return the type
111    */
112   Type getType();
113 
114   /**
115    * Sets the optional font type.
116    *
117    * @param fontType
118    *          the font type
119    */
120   void setFontType(String fontType);
121 
122   /**
123    * Returns the font type.
124    *
125    * @return the font type
126    */
127   String getFontType();
128 
129   /**
130    * Sets the optional font size.
131    *
132    * @param size
133    *          the font size
134    */
135   void setFontSize(int size);
136 
137   /**
138    * Returns the font size.
139    *
140    * @return the font size
141    */
142   int getFontSize();
143 
144   /**
145    * Sets the text's bounding box.
146    *
147    * @param rectangle
148    *          the bounding box
149    */
150   void setBoundary(Rectangle rectangle);
151 
152   /**
153    * Returns the text's bounding box.
154    *
155    * @return the bounding box
156    */
157   Rectangle getBoundary();
158 
159 }