input
stringlengths
10
828
output
stringlengths
5
107
public string to string string buffer sb new string buffer content id sb append id sb append n synchronized parts iterator i parts iterator while i has next content part d content part i next sb append d to string sb append content n return sb to string
p return a string representation of this content in xml format
public document create document status status metadata metadata basic document document new basic document this get unique id status metadata synchronized documents documents put document get id document return document
create and return a new
public string get nextid int current synchronized this current idcounter string next integer to string current if you manage to get more than 100 million of ids you ll start getting ids longer than 10 characters if current 1000000000 next 000000000 next substring next length return get id next
return the unique global identifier of this document domain
public void open throws exception synchronized basic storage class open count
initialize access to this storage
public string to string string buffer sb new string buffer document id sb append id sb append description sb append string escape utils escape xml description sb append n sb append status to string sb append metadata to string sb append content to string sb append document n return sb to string
p return a string representation of this document in xml format
public string to string string buffer sb new string buffer storage id sb append id sb append description sb append string escape utils escape xml description sb append return sb to string
p return a string representation of this storage in xml format
public iterator get documents synchronized documents return documents iterator
return the set of
public void add document document document synchronized documents if documents contains document documents add document
add a new
public string to string string buffer sb new string buffer contentpart id sb append id sb append type sb append content kind get mime type sb append sb append string escape utils escape xml string get contentpart sb append contentpart n return sb to string
p return a string representation of this part in xml format
public void remove document document document synchronized documents if documents contains document documents remove document
remove the specified
public string to string string buffer sb new string buffer contentpart id sb append id sb append type sb append content kind get mime type sb append xxx short article only id sb append article get contentpart get id sb append article get contentpart to string sb append contentpart n return sb to string
p return a string representation of this part in xml format
public string to string string buffer sb new string buffer article id sb append id sb append description sb append string escape utils escape xml description sb append n synchronized documents iterator i documents iterator while i has next document d document i next sb append document id sb append d get id sb append n sb append article n return sb to string
p return a string representation of this article in xml format
public string to string string buffer sb new string buffer contentpart id sb append id sb append type sb append content kind get mime type sb append byte enc base64 encode base64 chunked byte get contentpart use base64 encoding string b new string enc sb append b sb append contentpart n return sb to string
p return a string representation of this part in xml format
public iterator get articles synchronized articles return articles iterator
return the set of top level
public iterator get metatags synchronized metatags return metatags iterator
return the set of meta tags which this metadata contains
public void add article article article synchronized articles if articles contains article articles add article
add a new
public void add metatag metatag metatag synchronized metatags if metatags contains metatags metatags add metatag
add a new
public void remove article article article synchronized articles if articles contains article articles remove article
remove the specified
public string to string string buffer sb new string buffer metadata created date format df date format get date time instance date format medium date format medium sb append df format created sb append modified sb append df format modified iterator mtags get metatags if mtags has next sb append n while mtags has next metatag tag metatag mtags next sb append tag to string sb append metadata n else sb append n return sb to string
p return a string representation of this metadata in xml format
public void remove articles synchronized articles articles clear
remove the all
public string to string string buffer sb new string buffer barrel id sb append id sb append description sb append string escape utils escape xml description sb append n synchronized articles iterator i articles iterator while i has next article a article i next sb append article id sb append a get id sb append n sb append barrel n return sb to string
p return a string representation of this barrel in xml format
public string to string string buffer sb new string buffer status description sb append string escape utils escape xml description sb append n return sb to string
p return a string representation of this metadata in xml format
public void set metadata metadata metadata this metadata metadata
set the metadata of this document
public string to string string buffer sb new string buffer contentpart id sb append id sb append type sb append content kind get mime type sb append sb append document get contentpart get id sb append contentpart n return sb to string
p return a string representation of this part in xml format
public permission create permission string permission name string description memory permission perm new memory permission this permission name description synchronized permissions permissions put perm get permission name perm return perm
create and return a new
public void visit content content for int i 0 i destinations length i destinations i visit content
it will iterate trough array of code destinations code
public string to string string buffer result new string buffer 256 result append document append content helper create guid ref this append content helper create parent guid ref this append append this get value for iterator it content list iterator it has next result append n content ref append content helper create guid ref content it next append result append n document return result to string
it will show references only to direct child components
public document add document doc child list add doc doc set parent this return doc
adds a document as a child of this document
private void set parent document document todo do we need more than one parent list of parents this parent document
sets the parent of this document
public void remove permission permission perm synchronized permissions iterator roles get roles while roles has next role role role roles next role remove permission perm permissions remove perm get permission name
remove the specified
public string to string string buffer sb new string buffer memory user database id sb append this id sb append pathname sb append pathname sb append group count sb append this groups size sb append permission count sb append this permissions size sb append role count sb append this roles size sb append user count sb append this users size sb append return sb to string
return a string representation of this user database
public int compare to icon text other if this m text null return this m text compare to other get text else throw new illegal argument exception
make iconified text comparable by its name
synchronized protected void client disconnected connection to client client
hook method called each time this server disconnects a client
synchronized protected void client exception connection to client client throwable exception
hook method called each time an exception is thrown in a
public string get java doc itype type string ret value null if project null try type get openable open null reader doc content javadoc content access get content reader type true if doc content null ret value read into string doc content catch exception e eclipse shell plugin get default log status warning e get localized message e return ret value
looks up the
public void create part control composite parent parent parent canv parent set layout new fill layout swt horizontal label l new label parent swt default swt left l set text hellooooo text text new text parent swt default swt border text set text hello c add paint listener new paint listener public void paint control paint event e rectangle client area e ge get client area e gc set background display get default get system color swt color cyan e gc fill oval 0 0 100 100 c get tex make actions hook context menu
this is a callback that will allow us
public void create field editors todo find some preferences add field new directory field editor preference constants p path directory preference get field editor parent add field new boolean field editor preference constants p boolean an example of a boolean preference get field editor parent add field new radio group field editor preference constants p choice an example of a multiple choice preference 1 new string choice 1 choice1 c hoice 2 choice2 get field editor parent add field new string field editor preference constants p string a text preference get field editor parent
creates the field editors
public void run iaction action message dialog open information window get shell interpreter editor plugin hello eclipse world ide open editor uiplugin get default get workbench get active workbench window get active page todo important get some kind of default value here set it in the get menu method todo hack find some better way to create a real temporary or hidden file launch editor
the action has been activated
public void selection changed iaction action iselection selection if selection instanceof istructured selection istructured selection struc selection istructured selection selection if struc selection is empty object first element struc selection get first element if first element instanceof iresource current resource iresource first element todo probably use an adapter to get the iresource or iproject if first element instanceof ijava project current resource ijava project first element get project
selection in the workbench has been changed
public void dispose if pulldown menu null pulldown menu dispose
we can use this method to dispose of any system
public void init iworkbench window window iexecution provider handle provs execution provider manager get all providers set the default extension if provs length 0 string extensions provs 0 get file extensions if extensions length 0 curr extension extensions 0
we will cache window object in order to
public void connect to iexecution environment env todo check if there s anything else to update here interpreter env
connects this editor to the given
private void initialize this set modal true this set title messenger port this set size 320 84 this set content pane get jcontent pane
this method initializes this
private void initialize this set default close operation javax swing jframe exit on close this set jmenu bar get jjmenu bar this set title pddpd remote administration this set size 600 400 this set content pane get main pane
this method initializes this
private jtext field get port field if port field null port field new jtext field port field set text 21345 port field set horizontal alignment javax swing jtext field center return port field
this method initializes j text field
private jlist get daemon list if daemon list null daemon list new jlist daemon list set selection mode javax swing list selection model single selection daemon list set preferred size new java awt dimension 400 350 return daemon list
this method initializes j list
private jbutton get proceed button if proceed button null proceed button new jbutton proceed button set text proceed proceed button add action listener this return proceed button
this method initializes j button
private void initialize this set title daemon control this set size 663 363 this set content pane get jcontent pane
this method initializes this
private jbutton get quit button if quit button null quit button new jbutton quit button set text quit quit button add action listener this return quit button
this method initializes j button1
private jtabbed pane get jtabbed pane if j tabbed pane null j tabbed pane new jtabbed pane j tabbed pane set name j tabbed pane add tab daemon null get jpanel null j tabbed pane add tab producer null get jpanel1 null j tabbed pane add tab processor null get jpanel2 null j tabbed pane add tab consumer null get jpanel3 null return j tabbed pane
this method initializes j tabbed pane
private jpanel get log panel if log panel null java awt flow layout flow layout5 new flow layout log panel new jpanel log panel set layout flow layout5 flow layout5 set alignment java awt flow layout left log panel set preferred size new java awt dimension 200 200 log panel add get log pane null return log panel
this method initializes j panel1
private jtext pane get log pane if log pane null log pane new jtext pane log pane set editable false log pane set preferred size new java awt dimension 365 120 log pane set text return log pane
this method initializes j text pane
private jbutton get jbutton if j button null j button new jbutton j button set text restart return j button
this method initializes j button
private jmenu bar get jjmenu bar if j jmenu bar null j jmenu bar new jmenu bar j jmenu bar add get jmenu return j jmenu bar
this method initializes j jmenu bar
private jbutton get jbutton1 if j button1 null j button1 new jbutton j button1 set text shutdown return j button1
this method initializes j button1
private jmenu get jmenu if j menu null j menu new jmenu j menu set text file j menu add get jmenu item return j menu
this method initializes j menu
private jtext field get jtext field if j text field null j text field new jtext field j text field set preferred size new java awt dimension 4 19 return j text field
this method initializes j text field
private jmenu item get jmenu item if j menu item null j menu item new jmenu item j menu item set text quit j menu item set vertical alignment javax swing swing constants top return j menu item
this method initializes j menu item
private jpanel get jpanel2 if j panel2 null j panel2 new jpanel return j panel2
this method initializes j panel2
private jbutton get jbutton3 if j button3 null j button3 new jbutton j button3 set text done return j button3
this method initializes j button3
private jpanel get jpanel3 if j panel3 null j panel3 new jpanel return j panel3
this method initializes j panel3
public void display url string url throws ioexception com apple mrj mrjfile utils open url url below should also work at least for mac os 8 9 with netscape string cmd netscape url runtime get runtime exec cmd
display a file in the system browser
public void set gene tree gene tree panel panel gene tree panel make this share the same cloned gene nodes gene nodes gene tree get nodes
registers the gene tree panel so that gene node selection can be coordinated
public void set array tree array tree panel panel array tree panel make this share the same cloned array nodes array nodes array tree get nodes
registers the array tree panel so that gene node selection can be coordinated
public void proccess key right if arrays clustered if selected array node is root arrays clustered save last node in array list so can travers back down so that can undo last array nodes add selected array node change selected node to parent node hopach node node hopach node selected array node frame set selected array node node get hparent repaint
expand selected array node to the nodes parent
public node get selected node return selected node
returns the last selected gene node
public node get selected array node return selected array node
returns the last selected array node
public void proccess key right if arrays clustered if selected array node is root arrays clustered selected array node set selected false save last node in array list so can travers back down so that can undo last array nodes add selected array node hopach node node hopach node selected array node change selected node to parent node set selected array node node get hparent repaint repaint corr panel nframe get corr panel repaint
expand selected array node to the nodes parent
public void proccess key right if arrays clustered if selected array node is root arrays clustered save last node in array list so can travers back down so that can undo last array nodes add selected array node change selected node to parent node frame set selected array node selected array node get parent repaint
expand selected array node to the nodes parent
public boolean is array selected if selected array node null selected array node is selected return true else return false
returns true if there is an array node selected false if not
public void set gene tree gene tree panel panel gene tree panel
registers the gene tree panel so that gene node selection can be coordinated
public void set genes hierarchy gene hgenes genes hgenes
set the array of gene objects to draw image of values
public rectangle get node rectangle node node int x1 0 int x2 column number settings get thumb x int y1 int node get min index settings get thumb y dont add this to get to upper edge settings get thumb y 2 0 int y2 int node get max index settings get thumb y settings get thumb y add i more box to get to lower edge int w x2 x1 int h y2 y1 return new rectangle x1 y1 w h
helper method to find rectangle bounding each node
public rectangle get array node rectangle node node int y1 0 int y2 genes length settings get thumb y int x1 int node get min index settings get thumb x dont add this to get to upper edge settings get thumb y 2 0 int x2 int node get max index settings get thumb x settings get thumb x add i more box to get to lower edge int w x2 x1 int h y2 y1 return new rectangle x1 y1 w h
helper method to find rectangle bounding each node
public void proccess key right if arrays clustered if selected array node is root arrays clustered selected array node set selected false save last node in array list so can travers back down so that can undo last array nodes add selected array node change selected node to parent node set selected array node selected array node get parent repaint repaint corr panel frame get corr panel repaint
expand selected array node to the nodes parent
public void set nodes hash map map nodes map
set the hash map of node objects to draw image of values
public void set selected genes node n selected genes n selection rect get node rectangle n system out println selecting
sets the selected gene node sets this node to selected true
public node get selected genes return selected genes
returns the last selected gene node
public node get selected arrays return selected arrays
returns the last selected array node
public boolean is array selected if selected arrays null selected arrays is selected return true else return false
returns true if there is an array node selected false if not
public void set genes gene ggenes genes ggenes
set the array of gene objects to draw image of values
public void proccess key up just add one more index up to ab node which is the selected node double min selected genes get min index if min 0 min 1 else min 0 selected genes set min index min set selected genes selected genes
expand selected to include next row at top
public void proccess key right if selected array node is root arrays clustered selected array node set selected false save last node in array list so can travers back down so that can undo last array nodes add selected array node change selected node to parent node set selected array node selected array node get parent repaint repaint corr panel frame get corr panel repaint
expand selected array node to the nodes parent
public void proccess key right if selected array node is root arrays clustered last array nodes add selected array node change selected node to parent node if parent frame null system out println process key right through parent hopach node node hopach node selected array node parent frame set selected array node node get hparent else selected array node get parent set selected true hopach node node hopach node selected array node set selected array node node get hparent repaint
expand selected array node to the nodes parent
public void proccess key right if selected array node is root arrays clustered last array nodes add selected array node change selected node to parent node if parent frame null system out println process key right through parent parent frame set selected array node selected array node get parent else selected array node get parent set selected true set selected array node selected array node get parent repaint
expand selected array node to the nodes parent
public void set comparator comparator anime comparator this comparator comparator
sets comparator of the anime
public void key typed key event e display info e
handle the key typed event from the text field
public void key pressed key event e display info e
handle the key pressed event from the text field
public void key released key event e display info e
handle the key released event from the text field
public pmsearch for get pm sf return pm sf
gets the pmsearch for enum
public void set pm sf pmsearch for pm sf this pm sf pm sf
sets the pmsearch for enum
public chosen list get ch list return ch list
gets the chosen list enum
public void set ch list chosen list ch list this ch list ch list
sets the chosen list enum
public mbenum get mbe return mbe
gets the pmsearch for enum
public void set mbe mbenum mbe this mbe mbe
sets the pmsearch for enum
protected string get info text return info get tool tip text
gets the text from the info tool tip text field
public string create id int id case string id no id switch id case case 1 id wi get next id nr get wish anime list break case 2 id ha get next id nr get have anime list break case 3 id wa get next id nr get watched anime list break return id
create an id string for an anime
private int get next id nr collection anime anime list integer nr new array list integer put every number from the anime id to the nr integer list for anime a anime int id n integer parse int a get id substring 3 a get id length nr add id n search for the biggest one int max 0 for int i 0 i nr size i if the max number is smaller than the number on index i than replace that number to max if max nr get i max nr get i return max 1
getting the biggest id number from a collection anime and increasing by
public long get piece of anime list list anime anime return anime size
gets the piece of parameter anime list
public long get size of list anime anime long size 0 for anime ol anime size size ol get size return size
gets the size of parameter anime list