input
stringlengths
10
828
output
stringlengths
5
107
public void print macro string name vector macroarray int i macroarray new vector macroarray vector macros get name if macroarray null system out println macro not found name else for i 0 i macroarray size i system out println string macroarray element at i
utility method for debugging
public vector get pre states return prestates
gets the pre states of the state
public void add signal signal s currentstate add signal s
adds a signal element to the knowledge base
public boolean get if default topic return defaulttopicflag
gets the if default topic attribute of the dmtlmemory state object
public void set if default topic boolean flag defaulttopicflag flag
sets the if default topic attribute of the dmtlmemory state object
public string get response reference return responsereference
gets the response reference attribute of the dmtlmemory state object
public vector get signals return signals
gets the signals of the state
public void print macro table enumeration keys string macroname vector macroarray int i keys macros keys while keys has more elements macroname string keys next element macroarray vector macros get macroname system out println macroname for i 0 i macroarray size i system out println string macroarray element at i
utility method for debugging
public void reset nextdefaultresponse 0
description of the method
public vector get evaluates return evaluates
gets the evaluate elements of the state
public response get default response int i state tmpstate get the next response try not to be predicable if nextdefaultresponse states size nextdefaultresponse 0 get the state tmpstate state states element at nextdefaultresponse increment next response nextdefaultresponse return tmpstate get response
gets a default response when there are no clear matches to a users
public void add evaluate evaluate e currentstate add evaluate e
adds an evaluate element to the knowledge base
public boolean execute by default do nothing designed to be overridden return true
this method is called when a state is processed while performing a match
public void build stimulus tmpstimulus vector tmpvec int i construct a word graph from any text stimuli tmpvec new vector for i 0 i stimuli size i tmpstimulus stimulus stimuli element at i if tmpstimulus get type interaction manager text tmpvec add tmpstimulus if tmpvec size 0 template new word graph tmpvec
any buiding instructions that must be completed after the constructor is
protected string get data type return datatype
gets the data type attribute of the signal element
protected string get data return data
gets the data attribute of the signal element
protected void set name string namestring name namestring
sets the name attribute of the signal element
protected void set data type string datatypestring data datatypestring
sets the data type attribute of the signal element
protected void set data string datastring data datastring
sets the data attribute of the signal element
public response get response int i visited true get a different response to last time lastresponse if lastresponse responses size lastresponse 0 if dmtldebugger debug system out println found state getting response number lastresponse execute all of the signals now that the response has been retrieved for i 0 i signals size i signal signals element at i execute return response responses element at lastresponse
gets a response from the state object
public int get viseme string ph int i simple table look up for viseme based on phoneme for i 0 i max phonemes i if phonemes i compare to ph 0 return visemes i return 0
returns a viseme based on the phoneme string
public void set init face int expression1 int expression2 int intensity1 int intensity2 int i int j for i 0 i num expressive parts i for j 0 j largest array size j coordinates num expressions 1 i j intensity1 63f coordinates expression1 i j coordinates init face i j intensity2 63f coordinates expression2 i j coordinates init face i j coordinates num expressions 1 i j coordinates init face i j coordinates num expressions 1 i j init face num expressions 1
sets the neutral position to the current expression and updates facial
public int get init face return init face
returns the array index of the current neutral position init face
public void set head roll parameters int interval int interval margin int duration int duration margin int amplitude int amplitude margin head roll interval interval head roll interval margin interval margin head roll duration duration head roll duration margin duration margin head roll amplitude amplitude head roll amplitude margin amplitude margin
sets the head roll parameters attribute of the idle behaviour object
public string silence phoneme string int milliseconds string for silence return milliseconds
description of the method
public void set text string text plaintext new string text if plaintext length 0 textpane set text plaintext this repaint
sets the text of the speech bubble object to be displayed
public void set coords int expression int part float values int num values int i for i 0 i num values i coordinates expression part i values i
sets the coordinates for a particular expression and facial feature
public void set viseme displacement int viseme float values int num values int i for i 0 i num values i viseme displacements viseme i values i
sets the coordinates for a particular viseme
public void set eye movement parameters int interval int interval margin int duration int duration margin int amplitude int amplitude margin eye movement interval interval eye movement interval margin interval margin eye movement duration duration eye movement duration margin duration margin eye movement amplitude amplitude eye movement amplitude margin amplitude margin
sets the eye movement parameters attribute of the idle behaviour object
public void append text string text plaintext plaintext concat text if plaintext length 0 textpane set text plaintext this repaint
appends to the text of the speech bubble object
public void set mpeg4 face mpeg4 face face character face
sets a new mpeg4 face of the drawing area object
public void paint component java awt graphics graphics super paint component graphics paint over component graphics
paints the speech bubble component
public void animate mpeg4 face fapdata frame character animate face frame
animates the mpeg 4 character face of this drawing area
public void paint over component java awt graphics graphics int width int height g2d graphics2 d graphics g2d set rendering hints rh width get width height get height character draw face g2d width height tk sync
paints over what has already been drawn in this panel
public float mw return mw
gets the mpeg 4 fapu value mw
public float mns return mns
gets the mpeg 4 fapu value mns
public float ens return ens
gets the mpeg 4 fapu value ens
public float es return es
gets the mpeg 4 fapu value es
public float iris d return irisd
gets the mpeg 4 fapu value iris d
public float au return au
gets the mpeg 4 fapu value au
public void set iris d float temp iris d irisd temp iris d
sets the mpeg 4 fapu value iris d
private vector apply facial expressions vector faps int fromframe int toframe int id int intensity int i for i 0 i faceexpressionlist size i id vhmlfaelement faceexpressionlist element at i get id fromframe vhmlfaelement faceexpressionlist element at i get from frame toframe vhmlfaelement faceexpressionlist element at i get to frame if toframe faps size 3 toframe faps size 1 intensity vhmlfaelement faceexpressionlist element at i get intensity if toframe fromframe intensity 0 faps semantics apply facial expression faps fromframe toframe id intensity return faps
applies the expression list to the current paragraph faps
public vector generate idle faps int frames int i vector output output new vector for i 0 i frames i fapdatabuffer i reset generate eye blinks generate head roll generate eye movement for i 0 i frames i output add fapdatabuffer i return output
generates mpeg 4 faps for idle behaviour
public void adjust fapdata fapdata f int i reset if f viseme mask set set viseme values f get viseme1 f get viseme2 f get viseme blend set viseme variables 1 if f expression mask set set expression values f get expression1 f get expression intensity1 f get expression2 f get expression intensity2 set expression variables 1 f get expression init face 0 for i 0 i numoffap 1 i if f low level mask set i set low level values i f get low level value i set low level variables i 1
adjusts the existing fap data structure according to the fap mask and value
private vector get fapexcess vector faps int from vector temp int i temp new vector for i from i faps size i temp add element faps element at i return temp
gets the excess mpeg 4 faps from the faps of teh current paragraph
public void reset int i nullvar false set viseme values 0 0 0 set viseme variables 0 set expression values 0 0 0 0 set expression variables 0 0 0 for i 0 i numoffap 1 i set low level values i 0 set low level variables i 0
resets the fap data structure to zero values
public boolean is null return nullvar
returns if the fap is null
private vector apply blinking vector faps int fromframe int toframe toframe faps size 1 fromframe 0 if toframe fromframe faps semantics apply blinking faps fromframe toframe return faps
applies the blinking list to the current paragraph faps
public void set null boolean flag nullvar flag
set the fap to null
private int speech expression vector sl int i vhmlspeech element se for i sl size 1 i 0 i se vhmlspeech element sl element at i if se get is expression se get duration 0 return se get id return default
get the next speech expression element to render
private vector remove expressions vector sl int i vhmlspeech element se for i sl size 1 i 0 i se vhmlspeech element sl element at i if se get is expression sl remove i return sl
remove speech expression elemnts from the current paragraph list
public boolean viseme mask set if viseme group mask 1 return true else return false
checks to see if the viseme mask is set
private float get frames string time int i int convert int convert2 int units float temp interpret xms xs etc according to framerate units 1 if time null convert time index of m if convert 0 convert time index of s if convert 0 units 0 else convert time length if convert 0 time time substring 0 convert else return 1 temp float parse float time if units 1 temp temp 1000f float fps else temp temp float fps return temp else return 1
gets the number of frames corresponding to a vhml document specified time
public boolean expression mask set if expression group mask 1 return true else return false
checks to see if the expression mask is set
public int get low level value int i return low level faps i value
gets a low level mpeg 4 feature point value
public int get viseme1 return viseme viseme1
gets the viseme1 mpeg 4 value
public int get viseme2 return viseme viseme2
gets the viseme2 mpeg 4 value
public int get viseme blend return viseme blend
gets the viseme blend mpeg 4 value
public int get expression init face return expression init bit
gets the expression init face mpeg 4 value
public int get expression1 return expression expression1
gets the expression1 mpeg 4 value
public int get expression2 return expression expression2
gets the expression2 mpeg 4 value
public int get expression intensity1 return expression intensity1
gets the expression intensity1 mpeg 4 value
public int get expression intensity2 return expression intensity2
gets the expression intensity2 mpeg 4 value
public void set viseme values int vis1 int vis2 int blend viseme viseme1 vis1 viseme viseme2 vis2 viseme blend blend
sets the viseme values
public void set viseme variables int gm viseme group mask gm
sets the viseme mask
public void set expression values int ex1 int in1 int ex2 int in2 expression expression1 ex1 expression expression2 ex2 expression intensity1 in1 expression intensity2 in2
sets the expression values
public void set expression variables int gm int initf int exdef expression group mask gm expression init bit initf expression def bit exdef
sets the expression mask
public void set low level values int index int value while value 2d math pi 100000d value value int 2d math pi 100000d while value 2d math pi 100000d value value int 2d math pi 100000d low level faps index value value
sets the low level feature point values
public void set low level variables int index int gm low level faps index group mask gm
sets the low level group mask
public string get string string key object s1 return message format format platform get resource bundle get bundle get string key new object s1
this gets the string resource and does one substitution
public resource bundle get resource bundle try if resource bundle null resource bundle resource bundle get bundle org eclipse wst xsd ui internal editor editor plugin resources resource bundle platform get resource bundle get bundle catch missing resource exception x resource bundle null return resource bundle
returns the plugins resource bundle
public string get xmlschema target namespace string target namespace get preference store get string const default target namespace if target namespace ends with non nls 1 target namespace target namespace non nls 1 return target namespace
get the xml schema default target namespace
public iplanning poker helper get helper return iplanning poker helper helper
returns the helper for this plug in
public boolean is voter string id return voters contains id
return b true b if the participant is present in the
public void dispose listeners clear
perform clean up operation
public void add card ipoker card card cards add card for iitem list listener l listeners l item added card
add one new card to deck
public void remove hidden card ipoker card card hidden cards remove card
remove one card from the list of hidden cards
public ipoker card get card from string value string card value for ipoker card card cards if card get string value equals ignore case card value return card return null
p get the visible card with that string value p
public ipoker card get card int item index return cards get item index
get the visible card at specific position in the deck
public void remove card int item index for iitem list listener l listeners l item removed cards get item index cards remove item index
p remove the visible card at specific position in the deck p
protected void contribute to action bars iaction bars bars bars get tool bar manager add reset deck action bars get tool bar manager add edit backlog action
add actions to the action and menu bars local to this view
public void set model factory imodel abstract factory factory this factory factory
set the model factory
private void remove selection listener if listener null view get view site get workbench window get selection service remove selection listener listener listener null
remove the selection listener
protected void contribute to action bars iaction bars bars bars get tool bar manager add export backlog action bars get tool bar manager add import backlog action bars get tool bar manager add import backlog from cdeaction
add actions to the action and menu bars local to this view
protected void tear down throws exception super tear down dispose of test fixture wait for jobs add additional teardown code here
perform post test cleanup
private void delay long wait time millis display display display get current if this is the ui thread then process input if display null long end time millis system current time millis wait time millis while system current time millis end time millis if display read and dispatch display sleep display update otherwise perform a simple sleep else try thread sleep wait time millis catch interrupted exception e ignored
process ui input but do not return for the
protected void tear down throws exception super tear down dispose of test fixture wait for jobs platform ui get workbench get active workbench window get active page hide view view part add additional teardown code here
perform post test cleanup
public void wait for jobs while job get job manager current job null delay 1000
wait until all background tasks are complete
private void assert equals object expected object actual if expected null if actual null return throw new assertion failed error expected is null but actual is not else if actual null throw new assertion failed error actual is null but expected is not assert equals expected length expected length but actual length actual length expected length actual length for int i 0 i actual length i assert equals expected i is not equal to actual i expected i actual i
assert that the two arrays are equal
public void wait for jobs while job get job manager current job null delay 8000
wait until all background tasks are complete
public boolean delete boolean success true try success this file delete catch exception e logger error deletion failed for this file get name e return success
delete a file resource
protected void set resource davresource domino res this res res
set resource needs to be called when constructor was used without parameter
protected davresource domino get resource return this res
get resource returns the resource stored in the stream
public void set resource davresource domino res super set resource res file temp file get tempfile try out new file output stream temp file catch file not found exception e logger error file stream creation failed e
set resource needs to be called when constructor was used without parameter
public object clone throws clone not supported exception throw new clone not supported exception that ll teach em
make sure our singleton cant be cloned
public void start cleaning try this timer new timer this timer schedule this 0 5000 catch exception e logger error start clean failed e
start the cleanup task
public void run do a cleanup this lockmanager clean
scheduled execution of the cleaner
private void figure out extension mode this use only allowed extensions this allowed extensions trim length 0
if allowed extensions are set activate use only allowed extensions
public void destroy shut down the lock manager this lock manager shutdown super destroy
cleanup code shut down the lock manager
private void load supported methods string ini methods string supported methods tmp intercepting missing parameter ini methods this get init parameter init key supportedmethods if ini methods equals minimal list of supported methods ini methods get propfind head options logger error parameter in web xml missing init key supportedmethods supported methods tmp ini methods split method seperator this supported methods new vector for int i 0 i supported methods tmp length i this supported methods add supported methods tmp i
loads the list of supported methods from web