input
stringlengths 10
828
| output
stringlengths 5
107
|
|---|---|
protected void set db name string db name this db name db name
|
set the db username
|
public void test create sub organization throws exception iorganization parent factory get organization org1 name iorganization organization factory create organization org2 name sql organization parent get id assert not null organization
|
test number 8
|
public string get options string key string subkey return templatized value return get options key subkey true
|
get the name of the next stage in the pipeline
|
protected string get db passwd if db passwd null db passwd get info get str value db passwd return db passwd
|
get the db password
|
protected void set db passwd string db passwd this db passwd db passwd
|
set the db password
|
public void test create user high level throws exception user user new sql user user2 name password user credential credential new password user credential password iuser context context factory create user user credential assert not null context factory delete user user
|
test number 4 creation of users using high level interface
|
private void release connection connection conn throws config exception try if cache connection conn close catch sqlexception e throw new config exception i18n get sql 109 e
|
release connection called to release the connection object
|
protected string get db url if db url null db url get info get str value db url return db url
|
get the db url
|
protected void set db url string db url this db url db url
|
set the db url
|
public void add resource user resource user resource throws user exception this add resource user resource iuser null
|
add resource add a resource
|
public void test create user low level throws exception iuser context context factory create user user1 name password assert not null context
|
test number 1 test low level user creation
|
protected string get db driver if db driver null db driver get info get str value db driver return db driver
|
get the db driver
|
public void test delete global preferences throws exception factory delete global preference preference1 factory delete global preference preference2
|
test number 13
|
public iconfig get config string name locale locale string country locale get country string language locale get language if country null name country if language null name language return get config name
|
get child a config bundle for the name and given locale
|
private connection get connection throws resource exception if resource null resource resource factory get resource this get options resource name if resource null throw new resource exception i18n get sql 103 return connection resource check out
|
get the named resource name from the resource factory
|
public void test delete org preferences throws exception iorganization org factory get organization org2 name factory delete organization preference org preference1 factory delete organization preference org preference2
|
test number 16
|
public void execute command line command line if command line has option d string dir command line get option value d directory new file dir if directory is directory this sql config service new sql config service process directory else system err println i18n get sql 004 dir else print usage
|
handle the command line from main
|
public iconfig info get info if info null info new simple jdbc config info return info
|
get the configuration iformation for this class
|
public void test delete user throws exception factory delete user new sql user user1 name
|
test number 3
|
public void setup command line options options super setup command line options options add option option builder is required with description com babeldoc core i18n get sql 002 with long opt directory has arg create d
|
setup the options on the command line
|
public void test delete user preferences throws exception iuser context ctx factory get user context user1 name factory delete user preference ctx get user preference1 factory delete user preference ctx get user preference2
|
test number 19
|
public string get pipeline name return this pipeline name
|
get the pipeline name
|
public string get description return simple non pooled jdbc connection resource check in and checkouts create and destroy connections
|
return description of this worker
|
public void test get global preferences throws exception string value1 factory get global preference preference1 string value2 factory get global preference preference2 assert equals value1 user2 name assert equals value2 user1 name
|
test number 12
|
public string get name return jdbc
|
return the name
|
public void test get org preferences throws exception iorganization org factory get organization org2 name string value1 factory get organization preference org preference1 string value2 factory get organization preference org preference2 assert equals value1 org2 name assert equals value2 org1 name
|
test number 15
|
public iconfig create config string name return new default config name this
|
create a new iconfig based class
|
public void test get organization throws exception iorganization organization factory get organization org1 name assert not null organization
|
test number 7 test getting an organization
|
public void test get user preferences throws exception iuser context ctx factory get user context user1 name string value1 factory get user preference ctx get user preference1 string value2 factory get user preference ctx get user preference2 assert equals value1 org2 name assert equals value2 org1 name
|
test number 18
|
protected string buffer get tickets process query string journal query j query string buffer query super get tickets process query string j query limit stuff if j query get start index 0 query append limit j query get start index offset j query get num results hack alert need to do this to stop the parent skipping on the result set the above comment was taken from the my sql implementation i don t know how it effects postgre sql j query set start index 0 return query
|
get tickets process query string concoct the query string from the bits and
|
public ijournal ticket new ticket throws journal exception try get log debug postgre sql journal new ticket called long next val get new log id ijournal ticket ticket new journal ticket next val log the operation log ticket journal operation new ticket null null null return ticket catch exception ex throw new journal exception generic sql journal new ticket ex
|
get a ticket for tracking a document
|
public void set resolver ipipeline stage resolver resolver this resolver resolver apply the values from the pipeline data to the info options get info apply config data this get resolver get config this get name
|
set the resolver
|
public void test getting organization users throws exception iorganization parent factory get organization org2 name iuser users parent get users assert equals users length 2
|
test number 10
|
public void test set global preferences throws exception factory create global preference preference1 user2 name factory create global preference preference2 user1 name
|
test number 11
|
public void test set org preferences throws exception iorganization org factory get organization org2 name factory create organization preference org preference1 org2 name factory create organization preference org preference2 org1 name
|
test number 14
|
public void test set user preferences throws exception iuser context ctx factory get user context user1 name factory create user preference ctx get user preference1 org2 name factory create user preference ctx get user preference2 org1 name
|
test number 17
|
public ipipeline stage resolver get resolver return this resolver
|
get the resolver
|
public string get next table id string resource name string table iresource resource resource factory get resource resource name connection connection null try connection connection resource check out return table key helper get next id connection table to string catch exception e log service get instance log error e finally try resource check in connection catch exception e return null
|
get the next key in the database
|
public void test user uniqueness throws exception try test create user low level catch exception e exception good return fail exception should have been thrown
|
test number 2 test creating two users of same name
|
private void delete user resource connection connection int res id prepared statement pstmt null try pstmt connection prepare statement sql query manager get sql query res delete pstmt set int 1 res id pstmt execute update catch exception e com babeldoc core log service get instance log error exception e finally try pstmt close catch exception e
|
delete the resource
|
public void execute sql update string resource name string sql iresource resource resource factory get resource resource name connection connection null statement stmt null try connection connection resource check out stmt connection create statement stmt execute update sql catch exception e log service get instance log error e finally try stmt close catch exception e try resource check in connection catch exception e
|
execute sql update
|
protected void set up throws exception com babeldoc core environment loader load environment factory new sql user factory
|
set up test
|
protected long get next step connection con long id throws sqlexception prepared statement pstmt null result set rset null string log max step stmt sql query manager get sql query log maxstep try pstmt con prepare statement log max step stmt pstmt set long 1 id rset pstmt execute query if rset next long step rset get long 1 return step 1 else return 0 catch sqlexception se throw se finally try if rset null rset close if pstmt null pstmt close catch exception e log log error generic sql journal get next step close e
|
find the next available step for the log identifier
|
private connection get connection throws resource exception if resource null resource resource factory get resource get options resource name if resource null throw new resource exception i18n get sql 103 return connection resource check out
|
get the conection from the resource factory
|
public void remove config change listener iconfig change listener listener all listeners remove listener iterator i change listener configs key set iterator while i has next string config string i next list config list list change listener configs get config config list remove listener
|
remove an existing listener
|
public boolean has option string key string name this get options key return name null
|
does the configuration datastore contain this name key
|
public set get depends on set set new hash set set add core set add web return set
|
soap module only depends on web and core
|
public void config changed string config list config list list change listener configs get config if config list null for int i 0 i config list size i iconfig change listener l iconfig change listener config list get i l config changed new config change event config
|
fire a config changed event
|
private pipeline document create pipeline document document document output format outformat new output format 2007 11 08 paspes write xml files with selected document encoding output format outformat output format create compact format outformat set encoding this get options encoding string writer string writer new string writer xmlwriter writer new xmlwriter string writer outformat try writer write document writer flush catch ioexception e pipeline document new doc new pipeline document this get document string writer to string get bytes new doc set mime type xml mime type return new doc
|
create a pipeline document from the dom4 j object
|
public boolean has option string key string subkey string name this get options key subkey return name null
|
does the configuration datastore contain this name key
|
public void set url string url this hostport url
|
sets the host and port part of the soap url
|
public string get url return hostport
|
gets the host and port part of the soap url
|
public void run string file try get soap body to include in the soap envelope input source xml source new input source com babeldoc core resource loader get resource stream file run xml source catch exception e e print stack trace
|
run the soap client
|
protected string buffer get tickets process query string journal query j query boolean where added string buffer query new string buffer sql query manager get sql query log query tickets where added get tickets process dates j query get start date j query get end date query where added get tickets process journal operations where added query j query get journal operations get tickets process query options j query get query options query return query
|
get tickets process query string concoct the query string from the bits and
|
public void initialize set additional info
|
initialize the pipeline stage
|
private string get soap url string buffer url new string buffer http hostport ctx pipeline dot feed if attributes size 0 url append for enumeration e attributes keys e has more elements string name string e next element string value string attributes get name url append name value url append dummy dummy return url to string
|
get the url to send the message
|
private void debug header http servlet request request if log is debug enabled log log debug n received request n traverse the http headers and show them on the screen for enumeration en request get header names en has more elements string header string en next element string value request get header header if log is debug enabled log log debug header value if log is debug enabled log log debug
|
debug the header
|
public string get next stage string pipeline string stage name try string next stage pipeline factory factory get pipeline stage factory pipeline get next pipeline stage stage name return next stage null next stage catch pipeline exception pipex com babeldoc core log service get instance log error pipex return null
|
get the name of the next stage from this stage
|
public int replay ticket step journal ticket ticket int step try journal replay ticket ticket step catch exception e com babeldoc core log service get instance log error e return step
|
replay the ticket at the step
|
public string get pipeline entry stage string pipeline try ipipeline stage factory pstage factory pipeline factory factory get pipeline stage factory pipeline log service get instance log debug object pstage factory return pipeline factory factory get pipeline stage factory pipeline get entry stage name catch pipeline exception pipex log service get instance log error pipex return null
|
get the entry stage for the pipeline
|
public int step from string string sstr return integer parse int sstr
|
convert a string to step number
|
public module listing context get module listing if module listing null module listing new module listing context return module listing
|
get the module listing context or create one if necessary
|
public boolean is stage tracked string pipeline string stage name try return pipeline factory factory get pipeline stage factory pipeline is stage tracked stage name catch pipeline exception pipex com babeldoc core log service get instance log error pipex return false
|
get the name of the next stage from this stage
|
public boolean is ignored if has option ignored return true equals ignore case this get options ignored else return false
|
should processing document in this pipeline stage be skipped
|
public journal ticket ticket from string string tstr return new journal ticket long parse long tstr
|
convert a string to a ticket
|
public pipeline listing context get pipeline listing if pipeline listing null pipeline listing new pipeline listing context return pipeline listing
|
get the pipeline context object or create one if necessary
|
public string image string image return request get context path images image
|
load an image
|
public string map url string url string context request get context path log service get instance log debug url url context context if context null context starts with if url starts with log service get instance log debug resultant url context url return context url return url
|
convert absolutes paths to contextually correct absolute paths
|
public boolean is tracked if has option tracked return true equals ignore case this get options tracked else return false
|
must this pipeline stage track its data object
|
private string get mimetype string transcode str this get options transcode if transcode str equals ignore case jpeg return image jpeg else if transcode str equals ignore case png return image png else if transcode str equals ignore case tiff return image tiff else return image
|
get the mimetype from the destination image format
|
private transcoder get transcoder throws pipeline exception transcoder transcoder string transcode str this get options transcode if transcode str equals ignore case jpeg transcoder new jpegtranscoder transcoder quality transcoder transcoder width transcoder trancoder heigth transcoder else if transcode str equals ignore case png transcoder new pngtranscoder else if transcode str equals ignore case tiff transcoder new tifftranscoder else throw new pipeline exception i18n get module pipeline stage svgtranscode 7 return transcoder
|
get the transcoder determined by the out image type
|
private void trancoder heigth transcoder transcoder throws pipeline exception try transcoder add transcoding hint jpegtranscoder key height new float this get options height catch exception e throw new pipeline exception i18n get module pipeline stage svgtranscode 6 e
|
get the height of the output document
|
public iconfig info get info if info null info new sql journal info return info
|
get the configuraiton information object for this class
|
public void set module search path string module search path this module search path module search path
|
this is a required property
|
private void transcoder quality transcoder transcoder int quality 80 if this has option quality quality integer parse int this get options quality transcoder add transcoding hint jpegtranscoder key quality new float float quality 100
|
set the transcoder quality
|
public void delete global preference string key throws user exception connection connection null prepared statement pstmt null result set results null try connection connection resource check out pstmt sql query manager prepare statement connection pref gbl delete pstmt set string 1 key pstmt execute update catch exception e com babeldoc core log service get instance log error sql user factory delete global preference exception e finally try results close catch exception e try pstmt close catch exception e try connection close catch exception e
|
delete the global preference string for the organization
|
private void transcoder width transcoder transcoder throws pipeline exception try transcoder add transcoding hint jpegtranscoder key width new float this get options width catch exception e throw new pipeline exception i18n get module pipeline stage svgtranscode 5 e
|
set the transcoder width
|
public void execute throws build exception path convert pc new path convert pc set project project pc set refid path in pc set property path trimmer internal 1 pc set targetos unix pc execute pc set refid trim prefix pc set property path trimmer internal 2 pc execute string str path in project get property path trimmer internal 1 string str trim prefix project get property path trimmer internal 2 string result str path in replace all str trim prefix replace all project set new property path out result
|
do the work
|
public void set modules property string modules property this modules property modules property
|
this is a required property
|
protected iresource get resource if resource null string resource name get info get str value resource name resource resource factory get resource resource name return resource
|
get the resource for this journal
|
public void set subdirectories string subdirectories this subdirectories subdirectories
|
this is not a required property
|
public collection get type specific options collection options new array list options add new config option generic sql journal resource name iconfig option type filename null true the journal log file each operation is logged to this file return options
|
this method returns type specific options
|
public string get description return the sql journal stores its configuration information in a rdbms
|
return description of this worker
|
public string get name return sql
|
return the name
|
public void delete user iuser user throws user exception connection connection null prepared statement pstmt null try connection connection resource check out com babeldoc core log service get instance log debug delete user deleting user name user get name pstmt sql query manager prepare statement connection user delete pstmt set string 1 user get name pstmt execute update catch exception e throw new user create exception e exception deleting user finally try pstmt close catch exception e try resource check in connection catch exception e
|
strong delete user strong delete a user
|
public void set progress indeterminate boolean a status progress set indeterminate a status progress set visible a status
|
set the status of the messenger progressbar
|
public void set progress message string a string progress set string a string
|
set the string to be displayed in the messenger progressbar
|
public jprogress bar get progress bar return progress
|
get the progressbar used by the messenger
|
public void set species vector swiss prot composition a compositions super remove all elements for int i 0 i a compositions size i super add element a compositions get i
|
set the swiss prot compositions inside the combobox
|
public boolean is feasable to proceed return i feasable to proceed
|
returns a message why the panel was not ready to proceed
|
private void message object a message i messenger send message a message
|
send a message to the progressbar
|
public void pack super pack set size new dimension 1000 640
|
this method packs the frame
|
public jpanel get content pane return jpan content
|
this method gives the jpanel with all the content of this wizard panel
|
public jpanel get content return jpan content
|
returns the content panel of the wizzard
|
public void back clicked neutralize that actions that have been undertaken main information feeder get instance clear experiment sequence set experiment type enum experiment main information feeder get instance clear experiment sequence set experiment type enum experiment two txt sequence set text txt sequences two set text spin anchor set value 1 if chk second set is selected chk second set do click set feasable to proceed true
|
this method will be performed when the back button is clicked
|
private void create uicomponents image icon l icon url l url l url class loader get system resource icons back png l icon new image icon l url btn back new jbutton l icon btn back set tool tip text go one step back l url class loader get system resource icons forward png l icon new image icon l url btn forward new jbutton l icon btn forward set tool tip text go one step forward
|
private method to customize gui components
|
public void next clicked set feasable to proceed true if txt sequence get text equals ignore case set feasable to proceed false set not feasable reason your experimental set is not defined if txt sequences two get text equals ignore case chk second set is selected set feasable to proceed false set not feasable reason your experimental set is not defined
|
this method will be performed when the next button is clicked
|
public string get title string l title define the experimental set if is regional sampling l title l title and set the regional anchor return l title
|
returns a title for the step
|
protected void finalize throws throwable i timer stop super finalize
|
finish the timer and perform main finalization
|
public void action performed final action event e if chk second set is selected set sequence two visible true else set sequence two visible false
|
invoked when an action occurs
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.