00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023 package com.meapsoft;
00024
00025 import java.util.Iterator;
00026 import java.util.Vector;
00027
00040 public class EDLChunk extends FeatChunk
00041 {
00042
00043
00044
00045 public double dstTime;
00046
00047
00048 public Vector commands;
00049
00053 public EDLChunk(String sf, double st, double l, double dt)
00054 {
00055 super(sf,st,l);
00056 dstTime = dt;
00057
00058 commands = new Vector();
00059 }
00060
00061 public EDLChunk(Chunk c, double dt)
00062 {
00063 this(c.srcFile, c.startTime, c.length, dt);
00064 }
00065
00066 public EDLChunk(FeatChunk c, double dt)
00067 {
00068 this(c.srcFile, c.startTime, c.length, dt);
00069 features = c.features;
00070 }
00071
00076 public int compareTo(Object o) throws ClassCastException
00077 {
00078 try
00079 {
00080 EDLChunk c = (EDLChunk)o;
00081 return Double.compare(dstTime, c.dstTime);
00082 }
00083 catch(ClassCastException e)
00084 {
00085 return super.compareTo(o);
00086 }
00087 }
00088
00093 public String toString()
00094 {
00095 StringBuffer s = new StringBuffer(200);
00096 s.append(dstTime).append(" ").append(srcFile.replaceAll(" ", "%20")).append(" ");
00097 s.append(startTime).append(" ").append(length).append(" ");
00098
00099 if(commands != null)
00100 {
00101 Iterator x = commands.iterator();
00102 while(x.hasNext())
00103 s.append(x.next()).append(" ");
00104 }
00105
00106 s.append(comment).append("\n");
00107
00108 return s.toString();
00109 }
00110 }
00111