input
stringlengths
10
828
output
stringlengths
5
107
private int get column index string column string attribute int index out 1 for int index 0 index column length index if column index equals attribute index out index break return index out
returns the index of column
public void set sub category category sub category this sub category add sub category
method bean set sub catery
private int count element string data int column index string element int out number 0 for int line index 0 line index data length line index if data line index column index equals element out number return out number
counts the number of times that an element appears
private void clear phrases try db execute delete from demo catch database exception e window alert e to string
remove all phrases from the database
private void display recent phrases try result set rs db execute select from demo order by timestamp desc int i for i 0 rs is valid row i rs next if i labels length labels i set text rs get field as string 0 else db execute delete from demo where timestamp new string rs get field as string 1 if a phrase has been removed clear the label for i labels length i labels i set text rs close catch database exception e window alert e to string
fill the labels with the phrases from the database
private void insert phrase try string phrase input get text if phrase length 0 db execute insert into demo values new string phrase long to string system current time millis display recent phrases input set text catch database exception e window alert e to string
add a new phrase to the database
public int compare to tag tag return new compare to builder append value tag value append usage score tag usage score append post count tag post count append user count tag user count to comparison
comparability is based on value usage score post count then user count
public boolean is valid representation representation return representation null new dom representation representation get nodes rdf post null
determine if the provided
public long get post count return post count
returns the post count
public big decimal get usage score return usage score
returns the usage score
public long get user count return user count
returns the user count
public void set post count long post count this post count post count
sets the post count
public void set usage score big decimal usage score this usage score usage score
sets the usage score
public void set user count long user count this user count user count
sets the user count
public int compare to author author return new compare to builder append last name author last name append first name author first name to comparison
comparability is based on last name then first name
public int compare to message message return new compare to builder append code message code append success message success append this message message message append location message location append user message user append api version message api version append bibliotech version message bibliotech version to comparison
comparability is based on code success message location user
public string get api version return api version
returns the api version
public string get bibliotech version return bibliotech version
returns the bibliotech version
public reference get location return location
returns the location
public int compare to citation citation return new compare to builder append citation id citation citation id append doi citation doi append pmid citation pmid append title citation title append authors citation authors append date citation date append issn citation issn append journal id citation journal id append volume citation volume append number citation number append starting page citation starting page append ending page citation ending page append publication name citation publication name append doi resolver citation doi resolver append pmid resolver citation pmid resolver to comparison
comparability is based on the following fields in order citation id doi
public long get citation id return citation id
returns the citation id
public void set api version string api version this api version api version
sets the api version
public void set bibliotech version string bibliotech version this bibliotech version bibliotech version
sets the bibliotech version
public message add post post throws connotea exception string uri uri command add map string string parameters parameters post response response connector post uri parameters document document response get document return message parser parse document
add the provided
public void set location reference location this location location
sets the location
public reference get doi resolver return doi resolver
returns the doi resolver
public string get ending page return ending page
returns the ending page
public int compare to post post return new compare to builder append user bookmark id post user bookmark id to comparison
comparability is based on user bookmark id
public message add string uri list tag tags throws connotea exception return add new post new bookmark new reference uri tags
convenient shorthand version of
public long get journal id return journal id
returns the journal id
public date get created return new date created get time
returns the created date i
public int compare to bookmark bookmark return new compare to builder append hash bookmark hash to comparison
comparability is based on the connotea hash of this bookmark
public date get updated return new date updated get time
returns the updated date i
public long get user bookmark id return user bookmark id
returns the user bookmark id internal connotea id useful for debugging
public string get pmid return pmid
returns the pmid pub med id
public boolean is my work return my work
returns the my work
public boolean is private return privato
returns the private
public citation get citation return citation
returns the citation if available
public reference get pmid resolver return pmid resolver
returns the pmid resolver uri reference which can be used to resolve the
public void set comments list comment comments if is not empty comments this comments add all comments
sets the comments
public string get publication name return publication name
returns the publication name
public void set created date created this created new date created get time
sets the created
public string get first user return first user
returns the first user
public string get starting page return starting page
returns the starting page
public reference get link return link
returns the link
public void set my work boolean my work this my work my work
sets the my work
public void set private boolean privato this privato privato
sets the privato
public void set subjects list tag subjects if is not empty subjects this subjects add all subjects
sets the subjects
public message check credentials throws connotea exception string uri uri command noop response response connector get uri document document response get document return message parser parse document
useful initialisation operation that allows you to check the
public void set updated date updated this updated new date updated get time
sets the updated
public void set bookmark id long bookmark id this bookmark id bookmark id
sets the bookmark id
public void set citation citation citation this citation citation
sets the citation
public void set user bookmark id long user bookmark id this user bookmark id user bookmark id
sets the user bookmark id
public void set authors list author authors if is not empty authors this authors add all authors
sets the authors
public void set first user string first user this first user first user
sets the first user
public void set citation id long citation id this citation id citation id
sets the citation id
public int compare to comment comment return new compare to builder append entry comment entry append created comment created append updated comment updated to comparison
comparability is based on entry created date then updated date
public void set link reference link this link link
sets the link
public void set posted by list string posted by if is not empty posted by this posted by add all posted by
sets the posted by
public void set date date date this date new date date get time
sets the date
public date get updated return updated null new date updated get time null
returns the updated date i
public void set tags list tag tags if is not empty tags this tags add all tags
sets the tags
public message edit post post throws connotea exception string uri uri command edit map string string parameters parameters post response response connector post uri parameters document document response get document return message parser parse document
edit the provided
public message get api message return api message
returns the api message
public boolean is valid representation representation return representation null new dom representation representation get nodes rdf uri null
determine if the provided
public boolean is valid representation representation return representation null new dom representation representation get nodes rdf tag list item null
determine if the provided
public boolean is valid representation representation try dom representation dom new dom representation representation return dom get document null dom get node rdf response null catch exception e return false
determine if the provided
public void set doi resolver reference doi resolver this doi resolver doi resolver
sets the doi resolver
public void set ending page string ending page this ending page ending page
sets the ending page
public message edit string uri list tag tags throws connotea exception return edit new post new bookmark new reference uri tags
convenient shorthand version of
public void set issn string issn this issn issn
sets the issn
public void set journal id long journal id this journal id journal id
sets the journal id
public void set pmid resolver reference pmid resolver this pmid resolver pmid resolver
sets the pmid resolver
public void set publication name string publication name this publication name publication name
sets the publication name
public void set starting page string starting page this starting page starting page
sets the starting page
public tag get tag string tag value throws connotea exception string uri uri entity tag field tag tag value response response connector get uri list tag tags tags response if is not empty tags return tags get 0 return null
obtain a fully populated
public void set volume string volume this volume volume
sets the volume
public message remove post post throws connotea exception string uri uri command remove map string string parameters parameters post false false response response connector post uri parameters document document response get document return message parser parse document
remove the provided
public void set message parser parser document message message parser this message parser message parser
sets the message parser
public void set post parser parser document list post post parser this post parser post parser
sets the post parser
public void set tag parser parser document list tag tag parser this tag parser tag parser
sets the tag parser
protected void update object projected value if text field null string projected value equals text field get text return super update projected value
update while filtering out duplicates
private multiple gradient paint get flat gradient jxgradient chooser chooser double length multiple gradient paint gp chooser get gradient set up the data for the gradient float fractions gp get fractions color colors gp get colors fill in the gradient point2 d start new point2 d float 0 0 point2 d end new point2 d float float length 0 multiple gradient paint paint new linear gradient paint float start get x float start get y float end get x float end get y fractions colors return paint
creates a flat version of the current gradient
private void configure rendering jxtable table jxtree tree component provider provider new month view provider table set default renderer date class new default table renderer provider tree set cell renderer new default tree renderer new wrapping provider provider
configure the given collection components with the same
private void configure rendering jxtable table final icon yes icon get icon resources green orb png final icon no icon get icon resources exit png final icon undecided get icon resources silver star gif icon value iv new icon value public icon get icon object value if boolean true equals value return yes icon else if boolean false equals value return no icon return undecided table set default renderer boolean class new default table renderer new mapped value string values empty iv jlabel center
replace the default boolean rendering with a custom
private component create content create jxtable table new jxtable jxtree tree new jxtree configure base properties configure rendering table tree configure highlighting table tree table set model table model tree set model new default tree model root node configure meta data dependent properties configure components table tree jtabbed pane tabbed pane new jtabbed pane tabbed pane add tab jxtable new jscroll pane table tabbed pane add tab jxtree new jscroll pane tree return tabbed pane
creates and configures the content pane
private void configure rendering jxtable table jxlist list jxtree tree string value string value new string value public string get string object value if value instanceof contributor return string values to string get string value contributor contributor contributor value return contributor last name contributor first name table set default renderer contributor class new default table renderer string value list set cell renderer new default list renderer string value tree set cell renderer new default tree renderer string value
configure the given collection components with the same
private void configure components jxtable table jxlist list jxtree tree table set column control visible true table get column ext 1 set tool tip text randomly generated run again if you are disatisfied table pack column 1 10 table get column ext 1 set max width table get column ext 1 get preferred width
configures the components after the meta data are set
public void set value double thumb this relative thumb update relative
set the relative width of the icon
private void configure components jxtable table jxlist list jxtree tree table set column control visible true table set visible row count 30 table set show grid false true list set fixed cell height table get row height tree set row height table get row height
configures some defaults namely the same fixed rowheight on the
private void do in worker thread status dialog sd status dialog get instance conflict finder cf new conflict finder dirs to search sd cf do the stuff if sd was cancelled return if cf is completed return if cf conflicts detected joption pane show message dialog mw no conflicts detected success joption pane information message return if cf get log null cf get log length 0 text dialog show dialog mw conflicts detected cf get log
runs only in worker thread
private void initialize this set title classes found this set modal true this set content pane get jcontent pane this set icon images ru sitekeeper cpn gui utils get icons this set size prefs get int pref size x default width prefs get int pref size y default height setup actions this add window listener new window adapter override public void window closing final window event e do save window prefs override public void window closed final window event e do save window prefs
this method initializes this
private void initialize this set icon images ru sitekeeper cpn gui utils get icons this set size 600 400 this set modal true this set content pane get jcontent pane this set default close operation jdialog hide on close utils bind action to shortcut this new action close this key stroke get key stroke key event vk escape 0
this method initializes this
private void initialize setup actions this set icon images ru sitekeeper cpn gui utils get icons this set modal true this set default close operation javax swing window constants do nothing on close this set title progress this set content pane get jcontent pane setup shortcuts
this method initializes this
private jpanel get jcontent pane if j content pane null status label set text status label set font utils font status label set preferred size size main label set text label text j content pane new jpanel j content pane set layout new border layout j content pane add main label java awt border layout north j content pane add status label java awt border layout center j content pane add get cancel button java awt border layout south return j content pane
this method initializes j content pane
private jbutton get cancel button if cancel button null cancel button new jbutton close action cancel button set text cancel return cancel button
this method initializes cancel button
public void save background worker add task new runnable public void run prefs put prop current dir get current directory get absolute path save selected files prop selected files get selected files
saves chosen current directory and selected files to persistent storage
private void initialize this set icon images ru sitekeeper cpn gui utils get icons set content pane get jcontent pane set title app name list image ic get icon images log log icons ic for image im ic log log img im im get width this x im get height this add window listener new window adapter override public void window closed final window event e do save window prefs system exit 0 override public void window closing final window event e do save window prefs dispose setup actions
this method initializes this
private jbutton get library conflicts button if library conflicts button null action library conflicts new action find conflicts this f2 detect class conflicts library conflicts button new jbutton action library conflicts library conflicts button set horizontal alignment swing constants left return library conflicts button
this method initializes library conflicts button
private jbutton get find class button if find class button null action find class new action find class this f1 find class find class button new jbutton action find class find class button set horizontal alignment swing constants left return find class button
this method initializes find class button