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  
23  package org.opencastproject.metadata.mpeg7;
24  
25  import org.opencastproject.mediapackage.XmlElement;
26  
27  import java.awt.Rectangle;
28  
29  /**
30   * Decomposition type for space and time.
31   */
32  public interface SpatioTemporalDecomposition extends XmlElement {
33  
34    /**
35     * Set the <code>hasGap</code> property indicating that there may be gaps in between the segments.
36     *
37     * @param hasGap
38     *          <code>true</code> if there are gaps
39     */
40    void setGap(boolean hasGap);
41  
42    /**
43     * Returns <code>true</code> if the segment has a gap.
44     *
45     * @return <code>true</code> if the segment has a gap
46     */
47    boolean hasGap();
48  
49    /**
50     * Set the <code>isOverlapping</code> property indicating that some segments may be overlapping.
51     *
52     * @param isOverlapping
53     *          <code>true</code> if elements are overlapping
54     */
55    void setOverlapping(boolean isOverlapping);
56  
57    /**
58     * Returns <code>true</code> if the segment overlaps with another one.
59     *
60     * @return <code>true</code> if the segment overlaps
61     */
62    boolean isOverlapping();
63  
64    /**
65     * Adds the specified text as a <code>VideoText</code> element to the decomposition.
66     *
67     * @param text
68     *          the text
69     * @param boundary
70     *          the text's bounding box
71     * @param time
72     *          the time and duration
73     *
74     * @return the new video text element
75     */
76    VideoText addVideoText(Textual text, Rectangle boundary, MediaTime time);
77  
78    /**
79     * Adds the <code>VideoText</code> element to the decomposition.
80     *
81     * @param videoText
82     *          the video text
83     */
84    void addVideoText(VideoText videoText);
85  
86    /**
87     * Returns all the video text elements from this decomposition.
88     *
89     * @return the video text elements
90     */
91    VideoText[] getVideoText();
92  
93    /**
94     * Returns the <code>VideoText</code> element with the given identifier or <code>null</code> if there is no such
95     * element.
96     *
97     * @param id
98     *          the video text id
99     * @return the video text element
100    */
101   VideoText getVideoText(String id);
102 
103 }