SegmentImpl (Media Authoring with Java API)
Date: 2016-02-05

tv.amwa.maj.model.impl

## Class SegmentImpl

- java.lang.Object
- - tv.amwa.maj.model.impl.InterchangeObjectImpl
  - - tv.amwa.maj.model.impl.ComponentImpl
    - - tv.amwa.maj.model.impl.SegmentImpl

- All Implemented Interfaces:
    Serializable, Cloneable, QComponent, QSegment, MediaEntity, MetadataObject, Component, InterchangeObject, Segment
  Direct Known Subclasses:
    EdgeCodeSegmentImpl, EssenceGroupImpl, EventImpl, FillerImpl, NestedScopeImpl, OperationGroupImpl, PulldownImpl, ScopeReferenceImpl, SelectorImpl, SequenceImpl, SourceReferenceSegmentImpl, TimecodeSegmentImpl, TimecodeStreamImpl

      @MediaClass(uuid1=218169601,
                  uuid2=257,
                  uuid3=768,
                  uuid4={6,14,43,52,2,6,1,1},
                  definedName="Segment",
                  description="The Segment class represents a Component that is independent of any surrounding object.",
                  symbol="Segment",
                  isConcrete=false)
      public class SegmentImpl
      extends ComponentImpl
      implements Segment, QSegment, Serializable, Cloneable

  Implements a component that is independent of any surrounding object. Contrast this to a transition which is a component that depends on other components to establish its value.

  See Also:
    `TypeDefinitions.SegmentStrongReference`, `TypeDefinitions.SegmentStrongReferenceVector`, Serialized Form

- - ### Field Summary

    - ### Fields inherited from class tv.amwa.maj.model.impl.InterchangeObjectImpl

      `ObjectClassPropertyID`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `SegmentImpl()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `Segment` | `clone()` Create a cloned copy of this interchange object.
    `Sequence` | `generateSequence()` Create a sequence containing just this segment.
    `int` | `getCutPoint()`
    `long` | `getKeyOffset()`
    `int` | `getPackLayerKeyIndicator()`
    `Stream` | `getSegmentBlob()`
    `Stream` | `getTrackBlob()`
    `Segment` | `getTrackKeyRenderSequence()`
    `String` | `getTrackName()`
    `Segment` | `getTrackRenderSequence()`
    `TimecodeValue` | `segmentOffsetToTC(long offset)` Converts the given segment offset to a timecode value.
    `long` | `segmentTCToOffset(TimecodeValue timecode, Rational editRate)` Converts the given timecode and edit rate to a segment offset value.
    `void` | `setCutPoint(Integer cutPoint)`
    `void` | `setKeyOffset(Long keyOffset)`
    `void` | `setPackLayerKeyIndicator(Integer packLayerKeyIndicator)`
    `void` | `setSegmentBlob(Stream segmentBlob)`
    `void` | `setTrackBlob(Stream trackBlob)`
    `void` | `setTrackKeyRenderSequence(Segment trackKeyRenderSequence)`
    `void` | `setTrackName(String trackName)`
    `void` | `setTrackRenderSequence(Segment trackRenderSequence)`

    - ### Methods inherited from class tv.amwa.maj.model.impl.ComponentImpl

      `appendComponentAttribute, appendComponentAttribute, appendComponentKLVData, appendComponentUserComment, appendComponentUserComment, clearComponentAttributes, clearComponentKLVData, clearComponentUserComments, countComponentAttributes, countComponentKLVData, countComponentUserComments, getComment, getComponentAttributes, getComponentDataDefinition, getComponentKLVData, getComponentLength, getComponentUserComments, getEditName, getJupiterClipOffset, getJupiterID, getLengthPresent, initializeComponentDataDefinition, prependComponentAttribute, prependComponentKLVData, prependComponentUserComment, removeComponentAttribute, removeComponentKLVData, removeComponentUserComment, setComponentDataDefinition, setComponentLength, setComponentLengthFromStream, setEditName, setJupiterClipOffset, setJupiterID, setLengthPresent`

    - ### Methods inherited from class tv.amwa.maj.model.impl.InterchangeObjectImpl

      `addApplicationPlugin, appendXMLChildren, clearApplicationPlugins, containsApplicationPlugin, containsApplicationPlugin, countApplicationPlugins, deepEquals, disableGenerationTracking, enableGenerationTracking, equals, getApplicationPlugins, getGeneration, getLinkedGenerationID, getLinkedGenerationIDString, getObjectClass, getPersistentID, getPersistentIndex, hashCode, isGenerationTracked, removeApplicationPlugin, removeApplicationPlugin, setLinkedGenerationID, setLinkedGenerationIDString, setObjectClass, setPersistentID, setPersistentIndex, toString`

    - ### Methods inherited from class java.lang.Object

      `getClass, notify, notifyAll, wait, wait, wait`

    - ### Methods inherited from interface tv.amwa.maj.model.Component

      `appendComponentAttribute, appendComponentAttribute, appendComponentKLVData, appendComponentUserComment, appendComponentUserComment, clearComponentAttributes, clearComponentKLVData, clearComponentUserComments, countComponentAttributes, countComponentKLVData, countComponentUserComments, getComponentAttributes, getComponentDataDefinition, getComponentKLVData, getComponentLength, getComponentUserComments, getLengthPresent, removeComponentAttribute, removeComponentKLVData, removeComponentUserComment, setComponentDataDefinition, setComponentLength, setLengthPresent`

    - ### Methods inherited from interface tv.amwa.maj.model.InterchangeObject

      `addApplicationPlugin, clearApplicationPlugins, containsApplicationPlugin, containsApplicationPlugin, countApplicationPlugins, deepEquals, disableGenerationTracking, enableGenerationTracking, equals, getApplicationPlugins, getGeneration, getLinkedGenerationID, getObjectClass, isGenerationTracked, removeApplicationPlugin, removeApplicationPlugin, setLinkedGenerationID, setObjectClass, toString`

    - ### Methods inherited from interface tv.amwa.maj.industry.MediaEntity

      `getPersistentID, setPersistentIndex`

- - ### Constructor Detail

    - #### SegmentImpl

          public SegmentImpl()

  - ### Method Detail

    - #### getSegmentBlob

          @MediaProperty(uuid1=268864273,
                         uuid2=28834,
                         uuid3=19796,
                         uuid4={-81,-47,64,-100,-77,-111,-102,-26},
                         definedName="Segment blob",
                         symbol="Segment_blob",
                         aliases="Segment_blob",
                         typeName="Stream",
                         optional=true,
                         uniqueIdentifier=false,
                         pid=0,
                         prefix="q",
                         namespace="http://www.quantel.com/genQ/extensions")
          public Stream getSegmentBlob()
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     throws PropertyNotPresentException

      Specified by:
        `getSegmentBlob` in interface `QSegment`
      Throws:
        `PropertyNotPresentException`

    - #### setSegmentBlob

          @MediaPropertySetter(value="Segment blob")
          public void setSegmentBlob(Stream segmentBlob)

      Specified by:
        `setSegmentBlob` in interface `QSegment`

    - #### getCutPoint

          @MediaProperty(uuid1=654032966,
                         uuid2=17044,
                         uuid3=18848,
                         uuid4={-111,-65,49,-16,45,-27,99,53},
                         definedName="CutPoint",
                         symbol="CutPoint",
                         aliases="CutPoint",
                         typeName="Int32",
                         optional=true,
                         uniqueIdentifier=false,
                         pid=0,
                         prefix="q",
                         namespace="http://www.quantel.com/genQ/extensions")
           @Int32
          public int getCutPoint()
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     throws PropertyNotPresentException

      Specified by:
        `getCutPoint` in interface `QSegment`
      Throws:
        `PropertyNotPresentException`

    - #### setCutPoint

          @MediaPropertySetter(value="CutPoint")
          public void setCutPoint(@Int32
                                                                         Integer cutPoint)

      Specified by:
        `setCutPoint` in interface `QSegment`

    - #### getTrackRenderSequence

          @MediaProperty(uuid1=-559922832,
                         uuid2=-24250,
                         uuid3=18996,
                         uuid4={-128,-127,116,-23,-74,43,-107,60},
                         definedName="Track render sequence",
                         symbol="Track_render_sequence",
                         aliases="Track_render_sequence",
                         typeName="SegmentStrongReference",
                         optional=true,
                         uniqueIdentifier=false,
                         pid=0,
                         prefix="q",
                         namespace="http://www.quantel.com/genQ/extensions")
          public Segment getTrackRenderSequence()
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          throws PropertyNotPresentException

      Specified by:
        `getTrackRenderSequence` in interface `QSegment`
      Throws:
        `PropertyNotPresentException`

    - #### setTrackRenderSequence

          @MediaPropertySetter(value="Track render sequence")
          public void setTrackRenderSequence(Segment trackRenderSequence)

      Specified by:
        `setTrackRenderSequence` in interface `QSegment`

    - #### getPackLayerKeyIndicator

          @MediaProperty(uuid1=2112948090,
                         uuid2=20357,
                         uuid3=19644,
                         uuid4={-104,-114,-101,-68,-63,14,20,110},
                         definedName="Pack layer key indicator",
                         symbol="Pack_layer_key_indicator",
                         aliases="Pack_layer_key_indicator",
                         typeName="Int32",
                         optional=true,
                         uniqueIdentifier=false,
                         pid=0,
                         prefix="q",
                         namespace="http://www.quantel.com/genQ/extensions")
           @Int32
          public int getPackLayerKeyIndicator()
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       throws PropertyNotPresentException

      Specified by:
        `getPackLayerKeyIndicator` in interface `QSegment`
      Throws:
        `PropertyNotPresentException`

    - #### setPackLayerKeyIndicator

          @MediaPropertySetter(value="Pack layer key indicator")
          public void setPackLayerKeyIndicator(@Int32
                                                                                                      Integer packLayerKeyIndicator)

      Specified by:
        `setPackLayerKeyIndicator` in interface `QSegment`

    - #### getTrackKeyRenderSequence

          @MediaProperty(uuid1=-286713187,
                         uuid2=5294,
                         uuid3=17408,
                         uuid4={-98,31,72,-123,25,101,81,-40},
                         definedName="Track key render sequence",
                         symbol="Track_key_render_sequence",
                         aliases="Track_key_render_sequence",
                         typeName="SegmentStrongReference",
                         optional=true,
                         uniqueIdentifier=false,
                         pid=0,
                         prefix="q",
                         namespace="http://www.quantel.com/genQ/extensions")
          public Segment getTrackKeyRenderSequence()
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   throws PropertyNotPresentException

      Specified by:
        `getTrackKeyRenderSequence` in interface `QSegment`
      Throws:
        `PropertyNotPresentException`

    - #### setTrackKeyRenderSequence

          @MediaPropertySetter(value="Track key render sequence")
          public void setTrackKeyRenderSequence(Segment trackKeyRenderSequence)

      Specified by:
        `setTrackKeyRenderSequence` in interface `QSegment`

    - #### getTrackBlob

          @MediaProperty(uuid1=1061222067,
                         uuid2=15670,
                         uuid3=18894,
                         uuid4={-89,-117,-95,-102,-120,-16,77,-53},
                         definedName="Track blob",
                         symbol="Track_blob",
                         aliases="Track_blob",
                         typeName="Stream",
                         optional=true,
                         uniqueIdentifier=false,
                         pid=0,
                         prefix="q",
                         namespace="http://www.quantel.com/genQ/extensions")
          public Stream getTrackBlob()
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              throws PropertyNotPresentException

      Specified by:
        `getTrackBlob` in interface `QSegment`
      Throws:
        `PropertyNotPresentException`

    - #### setTrackBlob

          @MediaPropertySetter(value="Track blob")
          public void setTrackBlob(Stream trackBlob)

      Specified by:
        `setTrackBlob` in interface `QSegment`

    - #### getKeyOffset

          @MediaProperty(uuid1=1285663196,
                         uuid2=-25282,
                         uuid3=18666,
                         uuid4={-91,57,109,-51,-5,100,-16,-19},
                         definedName="Key offset",
                         symbol="Key_offset",
                         aliases="Key_offset",
                         typeName="Int64",
                         optional=true,
                         uniqueIdentifier=false,
                         pid=0,
                         prefix="q",
                         namespace="http://www.quantel.com/genQ/extensions")
           @Int64
          public long getKeyOffset()
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                throws PropertyNotPresentException

      Specified by:
        `getKeyOffset` in interface `QSegment`
      Throws:
        `PropertyNotPresentException`

    - #### setKeyOffset

          @MediaPropertySetter(value="Key offset")
          public void setKeyOffset(@Int64
                                                                            Long keyOffset)

      Specified by:
        `setKeyOffset` in interface `QSegment`

    - #### getTrackName

          @MediaProperty(uuid1=-773215508,
                         uuid2=18897,
                         uuid3=17711,
                         uuid4={-123,-23,89,-125,-79,-69,71,45},
                         definedName="TrackName",
                         symbol="TrackName",
                         aliases="TrackName",
                         typeName="UTF16String",
                         optional=true,
                         uniqueIdentifier=false,
                         pid=0,
                         prefix="q",
                         namespace="http://www.quantel.com/genQ/extensions")
          public String getTrackName()
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             throws PropertyNotPresentException

      Specified by:
        `getTrackName` in interface `QSegment`
      Throws:
        `PropertyNotPresentException`

    - #### setTrackName

          @MediaPropertySetter(value="TrackName")
          public void setTrackName(String trackName)

      Specified by:
        `setTrackName` in interface `QSegment`

    - #### segmentOffsetToTC

          public TimecodeValue segmentOffsetToTC(long offset)
                                          throws TimecodeNotFoundException

      Description copied from interface: `Segment`

      Converts the given segment offset to a timecode value.

      Specified by:
        `segmentOffsetToTC` in interface `Segment`
      Parameters:
        `offset` - Segment offset to be converted to a timecode.
      Returns:
        Converted timecode value.
      Throws:
        `TimecodeNotFoundException` - The given offset is not available as a timecode value in this segment.
      See Also:
        `Segment.segmentTCToOffset(TimecodeValue, Rational)`

    - #### segmentTCToOffset

          public long segmentTCToOffset(TimecodeValue timecode,
                                        Rational editRate)
                                 throws NullPointerException,
                                        TimecodeNotFoundException,
                                        BadSampleOffsetException

      Description copied from interface: `Segment`

      Converts the given timecode and edit rate to a segment offset value.

      Specified by:
        `segmentTCToOffset` in interface `Segment`
      Parameters:
        `timecode` - Timecode to be converted to an offset.
        `editRate` - Edit rate of the given timecode.
      Returns:
        Frame offset into the segment.
      Throws:
        `NullPointerException` - One or both of the given timecode and/or edit rate is/are `null`.
        `TimecodeNotFoundException` - The given timecode is not available in this segment.
        `BadSampleOffsetException` - The given timecode is outside the bounds of the timecode values represented by this segment.
      See Also:
        `Segment.segmentOffsetToTC(long)`

    - #### clone

          public Segment clone()

      Description copied from interface: `InterchangeObject`

      Create a cloned copy of this interchange object.

      Specified by:
        `clone` in interface `MediaEntity`
      Specified by:
        `clone` in interface `Component`
      Specified by:
        `clone` in interface `InterchangeObject`
      Specified by:
        `clone` in interface `Segment`
      Overrides:
        `clone` in class `ComponentImpl`
      Returns:
        Cloned copy of this interchange object.

    - #### generateSequence

          public Sequence generateSequence()

      Description copied from interface: `Segment`

      Create a sequence containing just this segment.

      Specified by:
        `generateSequence` in interface `Segment`
      Returns:
        Sequence containing just this segment.

(c)2007-2016 Richard Cartwright, all rights reserved. Licensed under Apache 2 license and subject to the AMWA IPR policy.