@Override protected void buildFromCpl() { // 1. get a composition edit rate (it's used if no specific edit rate is specified for a segment). this.compositionEditRate = ConversionHelper.parseEditRate(cpl2013.getEditRate()); // 2. go through all segments and all sequences and build segment, sequence and resource contexts. for (SegmentType segment : cpl2013.getSegmentList().getSegment()) { this.currentSegmentUuid = SegmentUUID.create(segment.getId()); contextProvider.getSegmentContext().initSegment(currentSegmentUuid); for (Object anySeqJaxb : segment.getSequenceList().getAny()) { if (!(anySeqJaxb instanceof JAXBElement)) { throw new ConversionException(String.format("Could not understand a sequence '%s'", anySeqJaxb.toString())); } JAXBElement jaxbElement = (JAXBElement) (anySeqJaxb); Object anySeq = jaxbElement.getValue(); SequenceTypeCpl currentSequenceTypeCpl = SequenceTypeCpl.fromName(jaxbElement.getName().getLocalPart()); if ((currentSequenceTypeCpl != null) && (anySeq instanceof SequenceType)) { this.currentSequence = (SequenceType) anySeq; this.currentSequenceType = currentSequenceTypeCpl.toSequenceType(); this.currentSequenceUuid = SequenceUUID.create(currentSequence.getTrackId()); processSequence(); } } } }
/** * Create an instance of {@link CompositionPlaylistType.SegmentList } * */ public CompositionPlaylistType.SegmentList createCompositionPlaylistTypeSegmentList() { return new CompositionPlaylistType.SegmentList(); }
/** * Create an instance of {@link CompositionPlaylistType.SegmentList } * */ public CompositionPlaylistType.SegmentList createCompositionPlaylistTypeSegmentList() { return new CompositionPlaylistType.SegmentList(); }