Interface Segment
- All Superinterfaces:
XmlElement
- All Known Subinterfaces:
AudioSegment,AudioVisualSegment,VideoSegment
- All Known Implementing Classes:
SegmentImpl
A video segment represents a temporal decomposition of the video stream that may have properties like text
annotations attached to it.
<complexType name="SegmentType" abstract="true">
<complexContent>
<extension base="mpeg7:DSType">
<sequence>
<choice minOccurs="0">
<element name="MediaInformation" type="mpeg7:MediaInformationType"/>
<element name="MediaInformationRef" type="mpeg7:ReferenceType"/>
<element name="MediaLocator" type="mpeg7:MediaLocatorType"/>
</choice>
<element name="StructuralUnit" type="mpeg7:ControlledTermUseType" minOccurs="0"/>
<choice minOccurs="0">
<element name="CreationInformation" type="mpeg7:CreationInformationType"/>
<element name="CreationInformationRef" type="mpeg7:ReferenceType"/>
</choice>
<choice minOccurs="0">
<element name="UsageInformation" type="mpeg7:UsageInformationType"/>
<element name="UsageInformationRef" type="mpeg7:ReferenceType"/>
</choice>
<element name="TextAnnotation" minOccurs="0" maxOccurs="unbounded">
<complexType>
<complexContent>
<extension base="mpeg7:TextAnnotationType">
<attribute name="type" use="optional">
<simpleType>
<union memberTypes="mpeg7:termReferenceType string"/>
</simpleType>
</attribute>
</extension>
</complexContent>
</complexType>
</element>
<choice minOccurs="0" maxOccurs="unbounded">
<element name="Semantic" type="mpeg7:SemanticType"/>
<element name="SemanticRef" type="mpeg7:ReferenceType"/>
</choice>
<element name="MatchingHint" type="mpeg7:MatchingHintType" minOccurs="0" maxOccurs="unbounded"/>
<element name="PointOfView" type="mpeg7:PointOfViewType" minOccurs="0" maxOccurs="unbounded"/>
<element name="Relation" type="mpeg7:RelationType" minOccurs="0" maxOccurs="unbounded"/>
</sequence>
</extension>
</complexContent>
</complexType>
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptioncreateTextAnnotation(float relevance, float confidence, String language) Creates a new text annotation that will hold keywords and free text comments.Returns the segment identifier.Returns the segment's time constraints.intReturns the number of text annotations.booleanReturnstrueif the segment contains any text annotations.booleanhasTextAnnotations(float relevance, float confidence) Returnstrueif the segment contains text annotations that satisfy the given relevance and confidence values.booleanhasTextAnnotations(float relevance, float confidence, String language) Returnstrueif the segment contains text annotations that satisfy the given relevance, confidence and language constraints.booleanhasTextAnnotations(String language) Returnstrueif the segment contains text annotations in the specified language.voidsetMediaTime(MediaTime mediaTime) Sets the segment's media time constraints.Returns this segment's text annotations.Returns this segment's text annotations, sorted by relevance.Returns this segment's text annotations, sorted by relevance.Methods inherited from interface org.opencastproject.mediapackage.XmlElement
toXml
-
Method Details
-
getIdentifier
String getIdentifier()Returns the segment identifier.- Returns:
- the identifier
-
setMediaTime
Sets the segment's media time constraints.- Parameters:
mediaTime- the media time
-
getMediaTime
MediaTime getMediaTime()Returns the segment's time constraints.- Returns:
- the media time
-
hasTextAnnotations
boolean hasTextAnnotations()Returnstrueif the segment contains any text annotations.- Returns:
trueif there are text annotations
-
getTextAnnotationCount
int getTextAnnotationCount()Returns the number of text annotations. Note that text annotations are containers themselves, containing a number of keywords and free text entries.- Returns:
- the number of text annotations
-
hasTextAnnotations
Returnstrueif the segment contains text annotations in the specified language.- Returns:
trueif there are text annotations
-
hasTextAnnotations
boolean hasTextAnnotations(float relevance, float confidence) Returnstrueif the segment contains text annotations that satisfy the given relevance and confidence values.- Returns:
trueif there are text annotations
-
hasTextAnnotations
Returnstrueif the segment contains text annotations that satisfy the given relevance, confidence and language constraints.- Returns:
trueif there are text annotations
-
createTextAnnotation
Creates a new text annotation that will hold keywords and free text comments.- Parameters:
relevance- the relevance valueconfidence- the confidencelanguage- the language identifier- Returns:
- the new text annotation
-
textAnnotations
Iterator<TextAnnotation> textAnnotations()Returns this segment's text annotations.- Returns:
- the text annotations
-
textAnnotationsByRelevance
Iterator<TextAnnotation> textAnnotationsByRelevance()Returns this segment's text annotations, sorted by relevance.- Returns:
- the text annotations
-
textAnnotationsByConfidence
Iterator<TextAnnotation> textAnnotationsByConfidence()Returns this segment's text annotations, sorted by relevance.- Returns:
- the text annotations
-