Class TemporalDecompositionImpl<T extends Segment>
java.lang.Object
org.opencastproject.metadata.mpeg7.TemporalDecompositionImpl<T>
- All Implemented Interfaces:
org.opencastproject.mediapackage.XmlElement,TemporalDecomposition<T>
public class TemporalDecompositionImpl<T extends Segment>
extends Object
implements TemporalDecomposition<T>
Default implementation of the temporal decomposition.
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.opencastproject.metadata.mpeg7.TemporalDecomposition
TemporalDecomposition.DecompositionCriteria -
Field Summary
FieldsModifier and TypeFieldDescriptionThe decomposition criteriaprotected booleanTrueif there is a gapprotected booleanIndicator for the presence of gaps in between segmentsprotected booleanIndicator for the presence of overlapping segmentsprotected booleanTrueif the segment overlapsThe list of segments in this temporal decomposition -
Constructor Summary
ConstructorsConstructorDescriptionTemporalDecompositionImpl(Segment.Type segmentType) Creates a new temporal decomposition container. -
Method Summary
Modifier and TypeMethodDescriptioncreateSegment(String id) Creates a new segment and returns it.Returns the decomposition criteria.getSegmentById(String segmentId) Returns the segment with the given identifier ornullif the segment does not exist.booleanhasGap()Returnstrueif the segment has a gap.booleanReturnstrueif the composition actually contains segments.booleanReturnstrueif the segment overlaps with another one.segments()Returns an iteration of the video's segments.voidSets the decomposition criteria.voidsetGap(boolean hasGap) Set thehasGapproperty indicating that there may be gaps in between the segments.voidsetOverlapping(boolean isOverlapping) Set theisOverlappingproperty indicating that some segments may be overlapping.
-
Field Details
-
gap
protected boolean gapTrueif there is a gap -
overlap
protected boolean overlapTrueif the segment overlaps -
criteria
The decomposition criteria -
segments
The list of segments in this temporal decomposition -
hasGap
protected boolean hasGapIndicator for the presence of gaps in between segments -
isOverlapping
protected boolean isOverlappingIndicator for the presence of overlapping segments
-
-
Constructor Details
-
TemporalDecompositionImpl
Creates a new temporal decomposition container.- Parameters:
segmentType- the segment type
-
-
Method Details
-
setGap
public void setGap(boolean hasGap) Description copied from interface:TemporalDecompositionSet thehasGapproperty indicating that there may be gaps in between the segments.- Specified by:
setGapin interfaceTemporalDecomposition<T extends Segment>- Parameters:
hasGap-trueif there are gaps- See Also:
-
hasGap
public boolean hasGap()Description copied from interface:TemporalDecompositionReturnstrueif the segment has a gap.- Specified by:
hasGapin interfaceTemporalDecomposition<T extends Segment>- Returns:
trueif the segment has a gap- See Also:
-
createSegment
Description copied from interface:TemporalDecompositionCreates a new segment and returns it.- Specified by:
createSegmentin interfaceTemporalDecomposition<T extends Segment>- Parameters:
id- the segment identifier- Returns:
- the new segment
-
hasSegments
public boolean hasSegments()Description copied from interface:TemporalDecompositionReturnstrueif the composition actually contains segments.- Specified by:
hasSegmentsin interfaceTemporalDecomposition<T extends Segment>- Returns:
trueif there are segments- See Also:
-
setOverlapping
public void setOverlapping(boolean isOverlapping) Description copied from interface:TemporalDecompositionSet theisOverlappingproperty indicating that some segments may be overlapping.- Specified by:
setOverlappingin interfaceTemporalDecomposition<T extends Segment>- Parameters:
isOverlapping-trueif elements are overlapping- See Also:
-
setCriteria
Description copied from interface:TemporalDecompositionSets the decomposition criteria.- Specified by:
setCriteriain interfaceTemporalDecomposition<T extends Segment>- Parameters:
criteria- the criteria- See Also:
-
isOverlapping
public boolean isOverlapping()Description copied from interface:TemporalDecompositionReturnstrueif the segment overlaps with another one.- Specified by:
isOverlappingin interfaceTemporalDecomposition<T extends Segment>- Returns:
trueif the segment overlaps- See Also:
-
getCriteria
Description copied from interface:TemporalDecompositionReturns the decomposition criteria.- Specified by:
getCriteriain interfaceTemporalDecomposition<T extends Segment>- Returns:
- the criteria
- See Also:
-
getSegmentById
Description copied from interface:TemporalDecompositionReturns the segment with the given identifier ornullif the segment does not exist.- Specified by:
getSegmentByIdin interfaceTemporalDecomposition<T extends Segment>- Parameters:
segmentId- the segment identifier- Returns:
- the segment
- See Also:
-
segments
Description copied from interface:TemporalDecompositionReturns an iteration of the video's segments.- Specified by:
segmentsin interfaceTemporalDecomposition<T extends Segment>- Returns:
- the video segments
- See Also:
-
toXml
- Specified by:
toXmlin interfaceorg.opencastproject.mediapackage.XmlElement- See Also:
-