input
stringlengths
10
828
output
stringlengths
5
107
public string get location return value
gets the value of the value property
public void set location string value this value value
sets the value of the value property
public void set name string value this value value
sets the value of the value property
public string get version if version null return 0 0 0 else return version
gets the value of the version property
public string get finalname return finalname
gets the value of the finalname property
public void set finalname string value this finalname value
sets the value of the finalname property
public boolean is override return override null false override
gets the value of the override property
public config file create config file return new config file
create an instance of
public void set override boolean value this override value
sets the value of the override property
public bundle create bundle return new bundle
create an instance of
public features create features root return new features
create an instance of
public config create config return new config
create an instance of
public feature create feature return new feature
create an instance of
public int get start level return start level null 0 start level
gets the value of the start level property
public void set start level integer value this start level value
sets the value of the start level property
public boolean is start return start null true start
gets the value of the start property
public boolean is dependency return dependency null false dependency
gets the value of the dependency property
public void set dependency boolean value this dependency value
sets the value of the dependency property
public void set resolver string value this resolver value
sets the value of the resolver property
private void change configuration file configuration file string property name string property value throws exception properties props new properties input stream is new file input stream configuration file try props load is finally is close props put property name property value output stream os new file output stream configuration file try props save os finally os close
change a configuration property in a given configuration file
private string get configuration file configuration file string property name throws exception input stream is null try is new file input stream configuration file properties props new properties props load is return string props get property name catch exception e throw e finally if is null try is close catch ioexception e ignore
read a given configuration file to get the value of a given property
public void run synchronized this started true finished false finish false final byte buf new byte buffer size int length try do while in available 0 length in read buf if length 1 break out write buf 0 length if autoflush out flush out flush thread sleep 200 pause to avoid tight loop if external proc is slow while finish catch throwable t synchronized this exception t finally if close when exhausted try out close catch ioexception e finished true synchronized this notify all
copies data from the input stream to the output stream
public void set authenticator type string value this authenticator type authenticator type value of value to upper case
authenticator type to use
public void set algorithm string algorithm if default equals ignore case algorithm this algorithm key manager factory get default algorithm else this algorithm algorithm
algorithm to use
public string get module class return jdbclogin module class get name
returns the login module class that this factory can build
public backing engine build map options properties backing engine engine null string users file string options get user file file f new file users file properties users try users new properties f encryption support encryption support new encryption support options engine new properties backing engine users encryption support catch ioexception ioe logger warn cannot open users file users file finally return engine
builds the backing engine
public string get module class return properties login module class get name
returns the login module class that this factory can build
public void add role string username string role string user infos string users get username if user infos null string new user infos user infos role users put username new user infos try users save catch exception ex logger error cannot update users file ex
add a role to a user
protected object do execute throws exception jaas realm realm jaas realm session get jaas realm app configuration entry entry app configuration entry session get jaas entry queue command queue queue session get jaas cmds if realm null entry null if command queue null command queue add this else system err println no jaas realm module has been selected return null
add the command to the command queue
public jaas realm find realm by name string realm name jaas realm realm null if realms null for jaas realm jaas realm realms if jaas realm get name equals realm name return jaas realm return realm
returns the jaas realm named as realm name
public app configuration entry find entry by realm and name jaas realm realm string module name app configuration entry app configuration entry null if realm null app configuration entry entries realm get entries if no module name provided and a there is a single module in the realm if entries null entries length 1 module name null return entries 0 for app configuration entry entry entries if module name equals entry get login module name return entry return app configuration entry
returns the jaas module entry of the specified realm named as module name
private jframe get jframe if j frame null j frame new jframe j frame set default close operation jframe exit on close j frame set jmenu bar get jjmenu bar j frame set size 663 576 j frame set content pane get jcontent pane j frame set title application return j frame
this method initializes j frame
public int size return item map size
the number of items in the counter not the total count use
public boolean contains key i item return item map contains key item
returns whether the map contains the given item
private jmenu item get exit menu item if exit menu item null exit menu item new jmenu item exit menu item set text exit exit menu item add action listener new action listener public void action performed action event evt if jdbc result set null try jdbc result set close catch exception e if jdbc stmt null try jdbc stmt close catch exception e if jdbc con null try jdbc con close catch exception e system exit 0 return exit menu item
this method initializes j menu item
public void set count i item double count f cache stale true item map put item count
set the count for the given item clobbering any previous count
public void increment count i item double increment set count item get count item increment
increment a items count by the given amount
public void add counts counter i counter for i item counter item map key set set count item get count item counter get count item
add in counts from another counter
public double total count if f cache stale double total 0 0 for map entry i double item item map entry set total item get value cache total count total f cache stale false return cache total count
finds the total of all counts in the counter
public void normalize double total count total count for i item item set set count item get count item total count
destructively normalize this counter in place
public i get top item double max count double negative infinity i max key null for map entry i double item item map entry set if item get value max count max key null max key item get key max count item get value return max key
finds the item with maximum count
private jdialog get about dialog if about dialog null about dialog new jdialog get jframe true about dialog set title about about dialog set size new dimension 407 84 about dialog set content pane get about content pane return about dialog
this method initializes about dialog
public string to string boolean f with newlines return to string 0 f with newlines
returns a string representation with the items ordered by decreasing
private jpanel get about content pane if about content pane null border layout border layout new border layout border layout set hgap 5 border layout set vgap 5 about content pane new jpanel about content pane set layout border layout about content pane add get about version label border layout center return about content pane
this method initializes about content pane
public string to string int min count to print boolean f with newlines return as priority queue to string min count to print f with newlines
returns a string representation which includes items with at least
private jlabel get about version label if about version label null about version label new jlabel about version label set text this is a simple tool to experiment with sqlserver connectivity about version label set horizontal alignment swing constants center return about version label
this method initializes about version label
public i next i first peek remove first return first
returns the item in the queue with highest priority and pops it from
public i peek if size 0 return items get 0 throw new no such element exception
returns the highest priority item in the queue but does not pop it
private jtext field get server ip tf if server ip tf null server ip tf new jtext field jdbc sqlserver 169 229 141 204 database name tms user pschmitz password delphi s dad server ip tf set bounds new rectangle 128 10 511 26 return server ip tf
this method initializes server ip tf
public boolean add i key double priority if size capacity grow 2 capacity 1 items add key priorities size priority resort up size size return true
adds a key to the queue with the given priority
private jtext area get query text area if query text area null query text area new jtext area call dbo sp help query text area set line wrap true query text area set wrap style word true query text area set bounds new rectangle 15 97 622 118 return query text area
this method initializes query text area
public string to string int min prio to print boolean f with newlines priority queue i pq clone string builder sb new string builder int num items printed 0 while pq has next double priority pq get priority if priority min prio to print break i item pq next sb append item to string sb append sb append priority if num items printed size 1 sb append f with newlines n num items printed if num items printed size sb append sb append return sb to string
returns a representation of the queue in decreasing priority order
private jscroll pane get jscroll pane if j scroll pane null j scroll pane new jscroll pane j scroll pane set bounds new rectangle 15 280 622 230 j scroll pane set viewport view get jtext area return j scroll pane
this method initializes j scroll pane
public boolean compute aspect r string base path if aspect r unknown orientation try we need to load one of the image variants mid thumb and then compute and set the orientation image icon image new image icon base path filepath set dims image get icon width image get icon height catch runtime exception e debug 1 error encountered computing aspect ratios for image filepath n e to string debug trace 2 e return aspect r unknown orientation
force the computation of the aspect ratio if it is not already
protected image paths reader get dbimage info if db image paths reader null check protocol attributes of db source info node element to choose the subclass this should ideally be configured but we ll hard code it for now if db image info node null db image paths reader new image paths reader db image info node return db image paths reader
gets a dbmeta data reader instance from the configuration information
public boolean overlaps ngram ngram return begin ngram begin begin ngram end end ngram begin end ngram end
performs an endpoint inclusive comparison of word ranges
public void filter match ngram match for int i size 1 i 0 i if match overlaps get i remove i
removes all ngrams that overlap with the passed ngram as defined by
private jmenu get file menu if file menu null file menu new jmenu file menu set text file file menu set mnemonic f file menu add get save menu item file menu add get exit menu item return file menu
this method initializes j menu
private jmenu get edit menu if edit menu null edit menu new jmenu edit menu set text edit edit menu set mnemonic e edit menu add get cut menu item edit menu add get copy menu item edit menu add get paste menu item return edit menu
this method initializes j menu
private jmenu get help menu if help menu null help menu new jmenu help menu set text help help menu set mnemonic h help menu add get about menu item return help menu
this method initializes j menu
private jmenu item get exit menu item if exit menu item null exit menu item new jmenu item exit menu item set text exit exit menu item set mnemonic x exit menu item add action listener new action listener public void action performed action event evt if jdbc result set null try jdbc result set close catch exception e if jdbc stmt null try jdbc stmt close catch exception e if jdbc con null try jdbc con close catch exception e system exit 0 return exit menu item
this method initializes j menu item
private jmenu item get about menu item if about menu item null about menu item new jmenu item about menu item set text about about menu item set mnemonic a about menu item add action listener new action listener public void action performed action event e jdialog about dialog get about dialog about dialog pack point loc get jframe get location loc translate 20 20 about dialog set location loc about dialog set visible true return about menu item
this method initializes j menu item
private jmenu item get cut menu item if cut menu item null cut menu item new jmenu item new default editor kit cut action cut menu item set text cut cut menu item set mnemonic t cut menu item set accelerator key stroke get key stroke key event vk x event ctrl mask true return cut menu item
this method initializes j menu item
private jmenu item get copy menu item if copy menu item null copy menu item new jmenu item new default editor kit copy action copy menu item set text copy copy menu item set mnemonic c copy menu item set accelerator key stroke get key stroke key event vk c event ctrl mask true return copy menu item
this method initializes j menu item
private jmenu item get paste menu item if paste menu item null paste menu item new jmenu item new default editor kit paste action paste menu item set text paste paste menu item set mnemonic p paste menu item set accelerator key stroke get key stroke key event vk v event ctrl mask true return paste menu item
this method initializes j menu item
private jmenu item get save menu item if save menu item null save menu item new jmenu item save menu item set text save save menu item set mnemonic s save menu item set accelerator key stroke get key stroke key event vk s event ctrl mask true return save menu item
this method initializes j menu item
private jtext field get server ip tf if server ip tf null server ip tf new jtext field server iptext default server ip tf set bounds new rectangle 128 10 511 26 return server ip tf
this method initializes server ip tf
private jbutton get connect btn if connect btn null connect btn new jbutton connect btn set text connect connect btn set bounds new rectangle 527 40 111 27 connect btn add action listener new java awt event action listener public void action performed java awt event action event evt string connection url server ip tf get text j text area set text connecting to connection url n if open dbconn server ip tf get text j text area append established connection to the my sql db return connect btn
this method initializes connect btn
private jtext area get query text area if query text area null query text area new jtext area query text default query text area set line wrap true query text area set wrap style word true query text area set bounds new rectangle 15 97 622 118 return query text area
this method initializes query text area
private jbutton get run qbtn if run qbtn null run qbtn new jbutton run qbtn set bounds new rectangle 527 221 111 27 run qbtn set text run query run qbtn add action listener new java awt event action listener public void action performed java awt event action event evt run dbstmt query text area get text return run qbtn
this method initializes run qbtn
private jtext field get jstatus bar text field if j status bar text field null j status bar text field new jtext field j status bar text field set editable false j status bar text field set bounds new rectangle 0 375 690 25 j status bar text field set border border factory create lowered bevel border j status bar text field set background java awt color white return j status bar text field
this method initializes j status bar text field
private jtext field get jtext field col config file if j text field col config file null j text field col config file new jtext field j text field col config file set bounds new rectangle 215 40 350 21 j text field col config file add focus listener new java awt event focus adapter public void focus lost java awt event focus event e string text j text field col config file get text if text null text is empty set mdconfig file text return j text field col config file
this method initializes j text field col config file
private jtext field get jtext field obj info file if j text field obj info file null j text field obj info file new jtext field j text field obj info file set bounds new rectangle 215 70 350 21 j text field obj info file add focus listener new java awt event focus adapter public void focus lost java awt event focus event e string text j text field obj info file get text if text null text is empty set mdfile text return j text field obj info file
this method initializes j text field obj info file
private jbutton get jbutton col config browse if j button col config browse null j button col config browse new jbutton j button col config browse set bounds new rectangle 570 40 80 20 j button col config browse set text browse enter presses when focused j button col config browse j button col config browse set background bkgd tan j button col config browse add action listener new java awt event action listener public void action performed java awt event action event e browse to mdconfig file return j button col config browse
this method initializes j button col config browse
private jbutton get jbutton obj info browse if j button obj info browse null j button obj info browse new jbutton j button obj info browse set bounds new rectangle 570 70 80 20 j button obj info browse set text browse enter presses when focused j button obj info browse j button obj info browse add action listener new java awt event action listener public void action performed java awt event action event e browse to mdfile return j button obj info browse
this method initializes j button obj info browse
private jtext field get jtext field ontology file if j text field ontology file null j text field ontology file new jtext field j text field ontology file set bounds new rectangle 215 40 350 21 j text field ontology file add focus listener new java awt event focus adapter public void focus lost java awt event focus event e string text j text field ontology file get text if text null text is empty set ontology file text return j text field ontology file
this method initializes j text field ontology file
private jtext field get jtext field vocab file if j text field vocab file null j text field vocab file new jtext field j text field vocab file set bounds new rectangle 215 70 350 21 j text field vocab file add focus listener new java awt event focus adapter public void focus lost java awt event focus event e string text j text field vocab file get text if text null text is empty set vocab file text return j text field vocab file
this method initializes j text field vocab file
private jbutton get jbutton ontology browse if j button ontology browse null j button ontology browse new jbutton j button ontology browse set bounds new rectangle 570 40 80 20 j button ontology browse set text browse enter presses when focused j button ontology browse j button ontology browse add action listener new java awt event action listener public void action performed java awt event action event e browse to ontology file return j button ontology browse
this method initializes j button ontology browse
private jbutton get jbutton vocab browse if j button vocab browse null j button vocab browse new jbutton j button vocab browse set bounds new rectangle 570 70 80 20 j button vocab browse set text browse enter presses when focused j button vocab browse j button vocab browse add action listener new java awt event action listener public void action performed java awt event action event e browse to vocab file return j button vocab browse
this method initializes j button vocab browse
private jtext field get jtext field img paths file if j text field img paths file null j text field img paths file new jtext field j text field img paths file set bounds new rectangle 215 40 350 21 j text field img paths file add focus listener new java awt event focus adapter public void focus lost java awt event focus event e set image paths file j text field img paths file get text return j text field img paths file
this method initializes j text field img paths file
private jbutton get jbutton img paths browse if j button img paths browse null j button img paths browse new jbutton j button img paths browse set bounds new rectangle 570 40 80 20 j button img paths browse set text browse enter presses when focused j button img paths browse j button img paths browse add action listener new java awt event action listener public void action performed java awt event action event e browse to image paths file return j button img paths browse
this method initializes j button img paths browse
private jmenu get import menu if import menu null import menu new jmenu import menu set text import import menu set mnemonic i import menu add get from dbmenu item return import menu
this method initializes import menu
private jmenu item get from dbmenu item if from dbmenu item null from dbmenu item new jmenu item from dbmenu item set text from database from dbmenu item set mnemonic d from dbmenu item add action listener new action listener public void action performed action event e import metadata from db from dbmenu item set enabled false return from dbmenu item
this method initializes the images compute orientations j menu item
private jmenu get upload menu if upload menu null upload menu new jmenu upload menu set name upload upload menu set text upload upload menu set mnemonic key event vk u upload menu add get setup web app dbinfo menu item upload menu add get enable web app lockout menu item upload menu add get release web app lockout menu item upload menu add get upload obj mdmenu item upload menu add get upload ontology mdmenu upload menu add get upload image mdmenu upload menu add get upload term stats menu item return upload menu
this method initializes upload menu
private jmenu item get upload obj mdmenu item if upload obj mdmenu item null upload obj mdmenu item new jmenu item upload obj mdmenu item set text objects metadata upload obj mdmenu item set mnemonic key event vk o upload obj mdmenu item add action listener new java awt event action listener public void action performed java awt event action event e upload object metadata return upload obj mdmenu item
this method initializes upload obj mdmenu item
private jmenu get upload ontology mdmenu if upload ontology mdmenu null upload ontology mdmenu new jmenu upload ontology mdmenu set text ontology upload ontology mdmenu set mnemonic key event vk n upload ontology mdmenu add get upload onto concepts mdmenu item upload ontology mdmenu add get upload object concept assoc mdmenu item upload ontology mdmenu add get update category counts menu item return upload ontology mdmenu
this method initializes upload ontology mdmenu
private jmenu get upload image mdmenu if upload image mdmenu null upload image mdmenu new jmenu upload image mdmenu set text images upload image mdmenu set mnemonic key event vk i upload image mdmenu add get upload image mdmenu item upload image mdmenu add get update cached image mdmenu item upload image mdmenu add get upload cat card image mdmenu item return upload image mdmenu
this method initializes upload image mdmenu
private jmenu item get upload onto concepts mdmenu item if upload onto concepts mdmenu item null upload onto concepts mdmenu item new jmenu item upload onto concepts mdmenu item set text concepts metadata upload onto concepts mdmenu item set mnemonic key event vk c upload onto concepts mdmenu item add action listener new java awt event action listener public void action performed java awt event action event e upload onto concepts metadata return upload onto concepts mdmenu item
this method initializes upload onto concepts mdmenu item
private jmenu item get upload object concept assoc mdmenu item if upload object concept assoc mdmenu item null upload object concept assoc mdmenu item new jmenu item upload object concept assoc mdmenu item set text object to concept associations upload object concept assoc mdmenu item set mnemonic key event vk a upload object concept assoc mdmenu item add action listener new java awt event action listener public void action performed java awt event action event e upload object concept associations return upload object concept assoc mdmenu item
this method initializes upload object concept assoc mdmenu item
private jmenu item get upload image mdmenu item if upload image mdmenu item null upload image mdmenu item new jmenu item upload image mdmenu item set text upload image metadata upload image mdmenu item set mnemonic key event vk i upload image mdmenu item add action listener new java awt event action listener public void action performed java awt event action event e upload image metadata return upload image mdmenu item
this method initializes upload image mdmenu item
private jmenu item get update cached image mdmenu item if update cached image mdmenu item null update cached image mdmenu item new jmenu item update cached image mdmenu item set text update cached image paths update cached image mdmenu item set mnemonic key event vk h update cached image mdmenu item add action listener new java awt event action listener public void action performed java awt event action event e update object image cache return update cached image mdmenu item
this method initializes update cached image mdmenu item
private jmenu item get upload cat card image mdmenu item if upload cat card image mdmenu item null upload cat card image mdmenu item new jmenu item upload cat card image mdmenu item set text upload catalog card image metadata upload cat card image mdmenu item set mnemonic key event vk c upload cat card image mdmenu item add action listener new java awt event action listener public void action performed java awt event action event e upload catalog card metadata return upload cat card image mdmenu item
this method initializes upload cat card image mdmenu item
private jmenu item get update category counts menu item if update category counts menu item null update category counts menu item new jmenu item update category counts menu item set text update category counts update category counts menu item set mnemonic key event vk n update category counts menu item add action listener new java awt event action listener public void action performed java awt event action event e update category counts return update category counts menu item
this method initializes update category counts menu item
private jmenu item get setup web app dbinfo menu item if setup web app dbinfo menu item null setup web app dbinfo menu item new jmenu item setup web app dbinfo menu item set text setup web app db info setup web app dbinfo menu item set mnemonic key event vk s setup web app dbinfo menu item add action listener new java awt event action listener public void action performed java awt event action event e setup web app dbinfo return setup web app dbinfo menu item
this method initializes setup web app dbinfo menu item
private jmenu item get enable web app lockout menu item if enable web app lockout menu item null enable web app lockout menu item new jmenu item enable web app lockout menu item set text enable web app lockout enable web app lockout menu item set mnemonic key event vk e enable web app lockout menu item add action listener new java awt event action listener public void action performed java awt event action event e set web app lockout true return enable web app lockout menu item
this method initializes enable web app lockout menu item
private jmenu item get release web app lockout menu item if release web app lockout menu item null release web app lockout menu item new jmenu item release web app lockout menu item set text release web app lockout release web app lockout menu item set mnemonic key event vk e release web app lockout menu item add action listener new java awt event action listener public void action performed java awt event action event e set web app lockout false return release web app lockout menu item
this method initializes release web app lockout menu item
private jdialog get web app dbinfo dialog if web app dbinfo dialog null web app dbinfo dialog new jdialog get jframe setup web app db info true web app dbinfo dialog set bounds new rectangle 2 0 400 276 web app dbinfo dialog set minimum size new dimension 400 276 web app dbinfo dialog set resizable false web app dbinfo dialog set content pane get web app dbinfo content pane return web app dbinfo dialog
this method initializes web app dbinfo dialog
private jtext field get web app db host name text field if web app db host name text field null web app db host name text field new jtext field web app db host name text field set bounds new rectangle 120 77 250 21 return web app db host name text field
this method initializes web app db host name text field
private jtext field get web app db dbname text field if web app db dbname text field null web app db dbname text field new jtext field web app db dbname text field set bounds new rectangle 120 107 250 21 return web app db dbname text field
this method initializes web app db dbname text field
private jtext field get web app db user text field if web app db user text field null web app db user text field new jtext field web app db user text field set bounds new rectangle 120 137 250 21 return web app db user text field
this method initializes web app db user text field