input stringlengths 10 828 | output stringlengths 5 107 |
|---|---|
public descriptor create desc single temp try temp new desc single get category get name catch bad data exception bdx throw new illegal state exception bdx get message int i 0 temp attributes new attribute attrs size for iterator iter attrs iterator iter has next temp attributes i attribute prototype iter next create temp id count temp span span null null frame span span clone return temp | creates a new empty descriptor from this type information |
public boolean check object o descriptor curr descriptor o return curr get frame span intersects span | checks to see if the descriptor |
public object get id return new integer 0 | returns the id number of the descriptor |
public int ending return end | returns the index of the end frame of this frame span |
public string get value to string if null value return null object o value if is dynamic o object value 0 return null o null o to string | gets the string representation of the value |
public int beginning return beg | returns the index of the first frame of this frame span |
public boolean check object o descriptor curr descriptor o return curr get id equals id | checks to see that the descriptor matches the |
public void set frame span frame span span throw new unsupported operation exception cannot set frame span of a prototype | prototypes are not instantiated so do not have frame spans this method |
public int get highest frame if size 0 return 1 int highest frame descriptor element at 0 get highest frame for int i 1 i size i int test descriptor element at i get highest frame if test highest frame highest frame test return highest frame | returns the greatest frame index of all descriptor objects |
public void set int frame number if frame number 0 throw new index out of bounds exception trying to access a negative frame frame number frame span f new frame span frame number frame number f f union this beg f beg end f end mask f mask contiguous f contiguous | sets the specified frame to active |
public int get lowest frame if size 0 return 1 int lowest frame integer max value for int i 0 i size i descriptor current desc descriptor element at i frame span current span current desc get frame span int test current span beginning if current span size 0 test lowest frame test 0 current desc get category equals file lowest frame test return lowest frame | returns the least frame index of all descriptor objects |
public boolean is contiguous return contiguous | determines if the span is contiguous |
public void print out print writer output output println begin data for int t 0 t size t output println element at t n output println end data | prints the data out to a file in the specified format |
public rational get false if falsed null falsed new rational 0 if beta f null rational minus beta f area get shared falsed if ignore f null rational minus falsed beta f get intersection ignore f area falsed if match null rational plus falsed match get intersection ignore f area falsed return falsed | gets the false area |
public map get extra config return new tree map | gets the extra config information |
public list split list temp new linked list if contiguous temp add clone else boolean outside true int start 0 for int i beg i end 2 i if outside contains frame i outside false start i else if outside contains frame i temp add new frame span start i 1 outside true return temp | returns a list of non adjacent individually contiguous frame span objects |
public string to string string buffer temp new string buffer temp append begin data n for int i 0 i size i temp append get i append n temp append end data n return temp to string | prints the data in |
public rational get missed if missed null missed new rational 0 if alpha f null rational minus alpha f area get shared missed if ignore f null rational minus missed alpha value get intersection ignore f area missed if match null rational plus missed match get intersection ignore f area missed return missed | gets the area of the missed region |
public void clear int start int stop if start 0 throw new index out of bounds exception trying to access a negative frame start else if stop start throw new illegal argument exception cannot erase negative frame span start stop else if start ending stop beginning start math max start beginning stop math min stop ending for int frame number start frame number stop frame number mask frame number 5 beg 5 1 frame number 32 if start beg stop end help crop | removes all frames in the range start to stop inclusive |
public map parse extra config string value throws bad data exception throw new bad data exception elements of type get type do not take any extra viper config information | reads in the extended information string |
public desc prototype get this prototype return desc prototype proto clone | gets a copy of this file descriptor which may have |
public string get information iterator fnodes get nodes by type file information if fnodes has next return no file information descriptor found n descriptor fnode descriptor fnodes next attribute temp fnode get attribute sourcedir string s temp null sourcedir temp get value to string n temp fnode get attribute sourcefiles s temp null sourcefiles temp get value to string n temp fnode get attribute sourcetype s temp null sourcetype temp get value to string n temp fnode get attribute numframes s temp null numframes temp get value to string n return s | gets the source media file information |
public rational get shared if shared null shared new rational 0 if get match null shared new rational get match area if blackout f null rational minus shared blackout f area shared rational plus shared ignoreblack shared return shared | gets the area of the intersection less the |
public void clear int frame number if frame number 0 throw new index out of bounds exception trying to access a negative frame frame number else if contains frame frame number mask frame number 5 beg 5 1 frame number 32 if frame number beg frame number end help crop | clears the specified frame |
public descriptor get descriptor return descriptor d clone | gets the instance of the file descriptor |
public element get xmlformat document root element el root create element sourcefile for iterator descs iterator descs has next el append child descriptor descs next get xmlformat root return el | returns a sourcefile tag with lots of children |
public poly list get match if alpha f null beta f null return null else if match null match alpha f get intersection beta f return match | gets the intersection region |
public void set id int id d set id id | sets the identification number of the underlying descriptor |
private void clear all for int i 0 i mask length i mask i 0 | clears all the frames but leaves the range untouched |
public int get num frames return help get dval d numframes | gets the number of frames in the video |
public rational get alpha area if alpha area null alpha area alpha f null new rational 0 alpha f area return alpha area | gets the targets area |
public void set num frames int number of frames in clip if number of frames in clip 0 help set dval d numframes number of frames in clip else help set null d numframes | sets the number of frames in the video |
public string get media type return help get sval d sourcetype | gets the media type of the video |
public rational get beta area if beta area null beta area beta f null new rational 0 beta f area return beta area | gets the candidates area |
public void set media type string media type help set sval d sourcetype media type | sets the media type of the video |
public object clone desc aggregate temp try temp new desc aggregate get category catch bad data exception bdx throw new illegal state exception bdx get message temp set name get name temp attributes new attribute attributes length for int i 0 i attributes length i temp attributes i attribute attributes i clone temp id list tree set id list clone temp span span null null frame span span clone return temp | generates a new descriptor object sharing none of the references of the |
public object get id return id list | returns the id number of the descriptor |
public string get source files return help get sval d sourcefiles | gets the list of source media files |
public int num ids return id list size | gets the number of descriptor ids associated |
public canonical file descriptor get file information reset canonical file descriptor return cfd | gets file information |
public rational get blackout area rational r new rational 0 if blackout f null rational minus blackout f area ignoreblack r return r | gets the area of the blackout shape s |
public void set source files string source files help set sval d sourcefiles source files | sets the list of source media files |
public element get xmlformat document root throw new unsupported operation exception cannot get xml for aggregate data yet | gets an xml representation of the descriptor |
public set get source directory set set dirs new hash set string sd get source directory if sd null string tokenizer st new string tokenizer sd file path separator char while st has more tokens dirs add st next token return dirs | gets the source directories |
public void set file information canonical file descriptor cfd this cfd cfd | will try to set the canonical file descriptor |
public void parse config vector all files vreader reader new vreader all files config add des config reader try reader close catch ioexception iox reader print warning error in closing files | reads in a set of desxcriptor configuration information to this |
public int get frag count if beta null alpha null return 0 return beta value get fragmentation count alpha value | gets the fragmentation count of the candidate |
public void set source directory set set dirs if dirs null dirs size 0 string buffer sb new string buffer for iterator iter dirs iterator iter has next sb append iter next append file path separator char set source directory sb substring 0 sb length 1 else set source directory null | sets the source directories |
public boolean add des config vreader reader boolean status reader advance to begin directive config if status reader print general error unable to find begin config directive return false try reader goto next real line catch ioexception iox reader print general error configuration parser unknown java io exception return false descriptor n el descriptor parse descriptor config reader while n el null add element n el n el descriptor parse descriptor config reader return true | reads in descriptor configuration information from the specified vreader |
public boolean add des config element config el node list configs config el get elements by tag name ns descriptor data namespace uri descriptor boolean some false for int i 0 i configs get length i try add element descriptor parse descriptor config element configs item i some true catch bad data exception bdx system err println bdx get message return some | adds the descriptor prototype described by |
public string get source directory return help get sval d sourcedir | gets the source directory attribute value |
public void set source directory string source dir help set sval d sourcedir source dir | sets the source directory attribute value |
public void print config print writer output system out println size for int i 0 i size i if descriptor element at i in scope output println element at i | prints out all descriptor objects in the list |
public void set category string s throws illegal argument exception if is category s throw new illegal argument exception not a valid descriptor category eg object s category s | sets the descriptor type e |
public void set dimensions int width int height help set dval d h frame size width help set dval d v frame size height | sets the dimensions |
public string to string string buffer temp new string buffer temp append begin config n for int i 0 i size i temp append get i append n temp append end config n return temp to string | prints the descriptors in |
public element get xmlformat document root element el root create element config for iterator descs iterator descs has next el append child descriptor descs next get xmlformat root return el | returns a config tag with lots of children |
public void clear d proto create | clears the cfd value |
public boolean is roc if attributes null int i 0 while i attributes length i return false | function resturns true if one of the attributes was roc |
public string set descriptor cfd return set cfd false | sets the canonical file descriptor to the given file information |
public string roc attribute name if attributes null int i 0 while i attributes length i return | function returns the name of the roc attribute or if not found |
public void write xml print writer pw boolean header throws ioexception document root create empty viper document domimplementation dom i root get implementation domimplementation ls ls dom domimplementation ls dom i get feature ls 3 0 assert ls dom null lsserializer s ls dom create lsserializer lsoutput out ls dom create lsoutput out set character stream pw s write data get xmlformat root out | writes the current data in the vi per xml format |
public int get attribute index string name if attributes null for int i 0 i attributes length i if attributes i named name return i return 1 | function returns the index of the named attribute or 1 if not found |
public object clone desc single temp try temp new desc single new string get category catch bad data exception bdx bdx print stack trace return null temp set name get name temp attributes new attribute attributes length for int i 0 i attributes length i temp attributes i attribute attributes i clone temp id id temp span span null null frame span span clone return temp | generates a new descriptor object sharing none of the references of the |
public boolean is valid rule string rule name return equals rule name equals rule name rule name equals smallerthan rule name equals biggerthan rule name equals size | tell if a name is a valid rule or not |
public int get attribute index string name equivalencies map if attributes null for int i 0 i attributes length i if attributes i named name map return i return 1 | gets the index of the attribute with the given name |
public void write gtf print writer out out println data | writes the current data in the vi per gtf format |
public object get id return new integer id | returns the id number of the descriptor |
public void action performed action event event thread t new opener save discard or cancel if changed new thread wrapper t | tries to open a file if the user saves the current changes |
public frame span get broken frame span frame span bs new frame span boolean has dynamic false for int i 0 i attributes length i if attributes i is dynamic has dynamic true for int f span beginning f span ending f if attributes i get value span f null bs set f if has dynamic return bs else return frame span span clone | breaks the combined frame span of the attributes |
public int compare to object o if o get class get name equals this get class get name throw new class cast exception return category name compare to descriptor o category descriptor o name | this compares the category and name fields |
public frame span get frame span if span null span new frame span return span | gets the descriptors frame span |
public void set dimensions int dims for iterator fnames data get file names fnames has next string curr file string fnames next data get for file curr file get file information set dimensions dims 0 dims 1 | modifies the dimension of all the input canonical |
public void set frame span frame span span if this span null for int i 0 i attributes length i attributes i set frame span span this span this span span | changes the framespan |
public boolean same category as descriptor other equivalencies map xxx what is going on here name to string other name to string map to string return category equals other category name equals other name map eq name other name map eq other name name | tests to see if the descriptors refer to the same type |
public element get xmlformat document root element el root create element get type to lower case el set attribute name get name el set attribute id get id to string if get frame span is empty el set attribute framespan get frame span to string for int i 0 i attributes length i element child attributes i get xmlformat root get frame span el append child child return el | gets an xml representation of the descriptor |
public boolean has attrib string attrib name for int i 0 i attributes length i if attributes i named attrib name return true return false | checks to see if this descriptor has an attribute with the specifified |
public void clip for iterator fnames data get file names fnames has next string fname string fnames next descriptor list dl data get for file fname for iterator desc objects dl iterator desc objects has next descriptor curr descriptor desc objects next frame span curr span curr get frame span curr set frame span new frame span curr span beginning curr span beginning | sets each descriptor to its first frame |
public attribute get attribute string attrib name for int i 0 i attributes length i if attributes i named attrib name return attributes i return null | returns the specified attribute |
public attempt to perform action get save discard or cancel dialog veto return new attempt to perform action public void attempt final runnable r save discard or cancel if changed new runnable public void run modify most recently used get file name r run | gets a save discard or cancel dialog up |
public attribute get attribute string attrib name equivalencies map for int i 0 i attributes length i if attributes i named attrib name map return attributes i return null | gets the attribute with the given name |
public void shift int n for iterator fnames data get file names fnames has next string fname string fnames next descriptor list dl data get for file fname for iterator desc objects dl iterator desc objects has next descriptor desc objects next move frame n | shifts each framespan by n |
public filterable get filterable string attrib name if attrib name equals framespan return span for int i 0 i attributes length i if attributes i named attrib name return attributes i return null | returns the specified attribute or frame span |
public void crop frames int n frame span cropper new frame span 0 n 1 for iterator fnames data get file names fnames has next string fname string fnames next descriptor list dl data get for file fname list fragments new linked list for iterator desc objects dl get all descriptors iterator desc objects has next descriptor curr descriptor desc objects next frame span curr span curr get frame span if curr span beginning n curr set frame span curr span intersect cropper fragments add curr dl clear dl add all fragments | crops all frames n |
public void deform for iterator fnames data get file names fnames has next string fname string fnames next descriptor list dl data get for file fname for iterator desc objects dl iterator desc objects has next descriptor curr descriptor desc objects next frame span curr span curr get frame span curr set frame span new frame span curr span beginning curr span beginning | deforms the data |
public string get full name return get type get name | gets the full name of the descriptor including category |
public element to xml document doc element el doc create element ns attributes default namespace uri attributes default namespace qualifier get type polygon v polygon value for iterator iter v get points iter has next pnt curr pnt iter next element child doc create element ns attributes default namespace uri attributes default namespace qualifier point child set attribute x string value of curr get x child set attribute y string value of curr get y el append child child return el | returns an xml element for this object |
protected void deform list descriptor list data list nl new linked list for iterator iter data iterator iter has next desc single curr desc desc single iter next if odds drop descriptor math random else nl add all deform descriptor desc single curr desc clone data clear data add all nl | deformer works by applying list level descriptor level |
public boolean named string s return s equals name | tests to see if the descriptor is named s |
private list deform attributes desc single data list deformed new linked list deformed add data return deformed | apply the deformations to the attributes |
public string get type return category | gets the type of the descriptor ie object or content |
public void print error string error m out println line m line number error while parsing for limits n t error m out flush | the function that prints an error to the output stream |
public void print self print writer output string padding output println padding category name get id get frame span for int i 0 i attributes length i output print padding attributes i | prints this descriptor in |
public boolean is short circuit return a is short circuit b is short circuit | tells the filter whether to apply short circuiting |
public void print self print writer output output println category get id name get frame span for int i 0 i attributes length i output print attributes i | prints this descriptor in |
public action listener get save action listener return save listener | gets the save current file action object |
public void print error totals | the function that will print the total number of errors that occured in |
public int get highest frame return get frame span ending | returns the number of the highest frame among this descriptor |
public void add descriptor string descriptor m d a map put descriptor new hashtable | adds a place for this descriptor |
public boolean validate attribute value v return v instanceof attribute polygon polygon value | checks to make sure that the value can be set |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.