input
stringlengths
10
828
output
stringlengths
5
107
private method get migrate table to mysql info create migrate maxdb table method method method new method null method set name migrate table to mysql method set module name migration maxdb method set caption max db default method set desc default method to migrate an max db table to my sql method set source struct name db maxdb table method set target package name db mysql method set rating 1 add migrate table to mysql info parameters method return method
generates information about the max db table to my sql migration method
protected string migrate identifier string name if name null return name else return
migrates the name of an identifier
private method get migrate schema to mysql info create method description method method new method null method set name migrate schema to mysql method set module name migration oracle method set caption oracle default method set desc default method to migrate an oracle schema to my sql method set source struct name db oracle schema method set target package name db mysql method set rating 1 add migrate schema to mysql info parameters method return method
generates information about the schema to my sql migration method
private method get migrate table to mysql info create migrate oracle table method method method new method null method set name migrate table to mysql method set module name migration oracle method set caption oracle default method set desc default method to migrate an oracle table to my sql method set source struct name db oracle table method set target package name db mysql method set rating 1 add migrate table to mysql info parameters method return method
generates information about the oracle table to my sql migration method
private method get migrate column to mysql info create method description method method new method null method set name migrate column to mysql method set module name migration oracle method set caption oracle default method set desc default method to migrate a oracle column to my sql method set source struct name db oracle column method set target package name db mysql method set rating 1 add migrate column to mysql info parameters method return method
generates information about the column to my sql migration method
private method get migrate column to mysql info create method description method method new method null method set name migrate column to mysql method set module name migration maxdb method set caption max db default method set desc default method to migrate a max db column to my sql method set source struct name db maxdb column method set target package name db mysql method set rating 1 add migrate column to mysql info parameters method return method
generates information about the column to my sql migration method
private method get migrate view to mysql info create migrate oracle table method method method new method null method set name migrate view to mysql method set module name migration oracle method set caption oracle default method set desc default method to migrate an oracle view to my sql method set source struct name db oracle view method set target package name db mysql method set rating 1 add migrate view to mysql info parameters method return method
generates information about the view to my sql migration method
private method get migrate routine to mysql info create migrate oracle table method method method new method null method set name migrate routine to mysql method set module name migration oracle method set caption oracle default method set desc default method to migrate an oracle routine to my sql method set source struct name db oracle routine method set target package name db mysql method set rating 1 add migrate routine to mysql info parameters method return method
generates information about the view to my sql migration method
public void test reverse engineering grt string list schema list new grt string list schema list add nordwind try reverse engineering access reverse engineer sun jdbc odbc jdbc odbc driver jdbc odbc driver microsoft access driver mdb dbq c dokumente und einstellungen mike eigene dateien nordwind mdb driver id 22 readonly true schema list catch exception e e print stack trace
test of the reverse engineering
private method get migrate foreign key to mysql info create method description method method new method null method set name migrate foreign key to mysql method set module name migration maxdb method set caption max db method set desc max db method to migrate a foreign key to my sql method set source struct name db maxdb foreign key method set target package name db mysql method set rating 1 add migrate foreign key to mysql info parameters method return method
generates information about the foreign key to my sql migration method
private method get migrate schema to mysql info create method description method method new method null method set name migrate schema to mysql method set module name migration sybase method set caption sybase default method set desc default method to migrate an sybase schema to my sql method set source struct name db sybase schema method set target package name db mysql method set rating 1 add migrate schema to mysql info parameters method return method
generates information about the schema to my sql migration method
private method get migrate table to mysql info create method description method method new method null method set name migrate table to mysql method set module name migration sybase method set caption sybase default method set desc default method to migrate a sybase table to my sql method set source struct name db sybase table method set target package name db mysql method set rating 1 add migrate table to mysql info parameters method return method
generates information about the table to my sql migration method
private method get migrate view to mysql info create migrate maxdb table method method method new method null method set name migrate view to mysql method set module name migration maxdb method set caption max db default method set desc default method to migrate an max db view to my sql method set source struct name db maxdb view method set target package name db mysql method set rating 1 add migrate view to mysql info parameters method return method
generates information about the view to my sql migration method
private method get migrate column to mysql info create method description method method new method null method set name migrate column to mysql method set module name migration sybase method set caption sybase default method set desc default method to migrate a sybase column to my sql method set source struct name db sybase column method set target package name db mysql method set rating 1 add migrate column to mysql info parameters method return method
generates information about the column to my sql migration method
private method get migrate view to mysql info create migrate oracle table method method method new method null method set name migrate view to mysql method set module name migration sybase method set caption sybase default method set desc default method to migrate an sybase view to my sql method set source struct name db sybase view method set target package name db mysql method set rating 1 add migrate view to mysql info parameters method return method
generates information about the view to my sql migration method
private method get migrate schema to mysql info create method description method method new method null method set name migrate schema to mysql method set module name migration generic method set caption generic method set desc generic method to migrate a schema to my sql method set source struct name db schema method set target package name db mysql method set rating 0 add migrate schema to mysql info parameters method return method
generates information about the schema to my sql migration method
private method get migrate routine to mysql info create migrate oracle table method method method new method null method set name migrate routine to mysql method set module name migration sybase method set caption sybase default method set desc default method to migrate an sybase routine to my sql method set source struct name db sybase routine method set target package name db mysql method set rating 1 add migrate routine to mysql info parameters method return method
generates information about the view to my sql migration method
private method get migrate routine to mysql info create migrate maxdb table method method method new method null method set name migrate routine to mysql method set module name migration maxdb method set caption max db default method set desc default method to migrate an max db routine to my sql method set source struct name db maxdb routine method set target package name db mysql method set rating 1 add migrate routine to mysql info parameters method return method
generates information about the view to my sql migration method
private method get migrate synonym to mysql create migrate maxdb table method method method new method null method set name migrate synonym to mysql method set module name migration maxdb method set caption max db default method set desc default method to migrate a max db synonym to my sql method set source struct name db maxdb synonym method set target package name db mysql method set rating 1 add migrate synonym to mysql info parameters method return method
generates information about the synonym to my sql migration method
private method get migrate table to mysql info create method description method method new method null method set name migrate table to mysql method set module name migration generic method set caption generic method set desc generic method to migrate a table to my sql method set source struct name db table method set target package name db mysql method set rating 0 add migrate table to mysql info parameters method return method
generates information about the table to my sql migration method
private void check class clz if clz get interfaces length 0 throw new object initialize exception class clz get name does not implement any interface
check the passed in class whether has implemented any interface
public connection aware get connection info return connection
get connection info mapping
public void add t value add to list value true
add one object to the list update phase it will generate change log
private method get migrate trigger to mysql create migrate maxdb table method method method new method null method set name migrate trigger to mysql method set module name migration maxdb method set caption max db default method set desc default method to migrate a max db trigger to my sql method set source struct name db maxdb trigger method set target package name db mysql method set rating 1 return method
generates information about the triger to my sql migration method
private void init log4j string log4j conf file url url this get class get class loader get resource log4j conf file domconfigurator configure url
initialize log4j from specified xml file
private method get migrate column to mysql info create method description method method new method null method set name migrate column to mysql method set module name migration generic method set caption generic method set desc generic method to migrate a column to my sql method set source struct name db column method set target package name db mysql method set rating 0 add migrate column to mysql info parameters method return method
generates information about the routine to my sql migration method
private method get migrate index to mysql info create method description method method new method null method set name migrate index to mysql method set module name migration generic method set caption generic method set desc generic method to migrate an index to my sql method set source struct name db index method set target package name db mysql method set rating 0 add migrate index to mysql info parameters method return method
generates information about the routine to my sql migration method
private method get migrate foreign key to mysql info create method description method method new method null method set name migrate foreign key to mysql method set module name migration generic method set caption generic method set desc generic method to migrate a foreign key to my sql method set source struct name db foreign key method set target package name db mysql method set rating 0 add migrate foreign key to mysql info parameters method return method
generates information about the routine to my sql migration method
private method get migrate view to mysql info create method description method method new method null method set name migrate view to mysql method set module name migration generic method set caption generic method set desc generic method to migrate a view to my sql method set source struct name db view method set target package name db mysql method set rating 0 add migrate view to mysql info parameters method return method
generates information about the table to my sql migration method
private method get migrate routine to mysql info create migrate table method method method new method null method set name migrate routine to mysql method set module name migration generic method set caption generic method set desc generic method to migrate a routine to my sql method set source struct name db routine method set target package name db mysql method set rating 0 add migrate routine to mysql info parameters method return method
generates information about the view to my sql migration method
public void accept if state initiated source null state alerting source accept
accept a call that has been offered
public cas channel cas resource a cas resource r2reg dsp new audio port pika mfr2 network a cas resource network associate r2reg network connect r2reg network set handler this handler null call handler null call runner null linestate reset set state oos
build a cas channel based on a cas resource
public resource get network return network
access my network resource for routing
protected object create object class type throws invocation target exception use deferred construction if a non zero arg constructor is available deferred construction deferred construction beans get deferred construction type config if deferred construction null return deferred construction return beans create object type config private constructors
returns a new object of the requested type
public void initialize system err println loading the index if use skos try build skos catch exception e e print stack trace system exit 1 else try build catch exception e e print stack trace system exit 1
starts initialization of the vocabulary
protected connection get connection throws sqlexception logger trace get connection return h2 index get connection
returns a connection from the pool
public void build use throws exception if use skos vocabulary use new hash map string string string readline string entry try input stream reader is new input stream reader new file input stream use buffered reader br new buffered reader is while readline br read line null entry readline split t if more than one descriptors for one non descriptors are used ignore it probably just related terms cf latest edition of agrovoc if entry 1 index of 1 vocabulary use put entry 0 entry 1 catch exception e e print stack trace
builds the vocabulary index with descriptors non descriptors relations
public void build rel throws exception if use skos system err println building the vocabulary index with related pairs vocabulary rel new hash map string readline string entry try input stream reader is new input stream reader new file input stream rel buffered reader br new buffered reader is while readline br read line null entry readline split t string temp entry 1 split vector string rt new vector string for int i 0 i temp length i rt add temp i vocabulary rel put entry 0 rt catch exception e e print stack trace
builds the vocabulary index with semantically related terms
public void initialize system out println loading the index if use skos try build skos catch exception e e print stack trace system exit 1 else try build catch exception e e print stack trace system exit 1
starts initialization of the vocabulary
public void build throws exception system out println building the vocabulary index vocabulary en new hash map vocabulary enrev new hash map string readline string term string avterm string id try input stream reader is new input stream reader new file input stream en buffered reader br new buffered reader is while readline br read line null int i readline index of term readline substring i 1 avterm pseudo phrase term if avterm length 2 id readline substring 0 i vocabulary en put avterm id vocabulary enrev put id term catch exception e e print stack trace
builds the vocabulary index from the text files
public void build use throws exception if use skos vocabulary use new hash map string readline string entry try input stream reader is new input stream reader new file input stream use buffered reader br new buffered reader is while readline br read line null entry split readline t if more than one descriptors for one non descriptors are used ignore it probably just related terms cf latest edition of agrovoc if entry 1 index of 1 vocabulary use put entry 0 entry 1 catch exception e e print stack trace
builds the vocabulary index with descriptors non descriptors relations
public void build rel throws exception if use skos system err println building the vocabulary index with related pairs vocabulary rel new hash map string readline string entry try input stream reader is new input stream reader new file input stream rel buffered reader br new buffered reader is while readline br read line null entry split readline t string temp split entry 1 vector rt new vector for int i 0 i temp length i rt add temp i vocabulary rel put entry 0 rt catch exception e e print stack trace
builds the vocabulary index with semantically related terms
public void load model throws exception buffered input stream in stream new buffered input stream new file input stream m model name system out println this is the model that has been loaded m model name object input stream in new object input stream in stream this m keafilter keafilter in read object if tfx idf values are to be computed from the test corpus if m build global true if m debug system err println the global dictionaries will be built from this test collection this m keafilter m dictionary null in close
loads the extraction model from the file
public string get text url url int max hops throws client protocol exception ioexception return get text url to string url to string max hops 0
returns a text representation of the website at the specified url by crawling
public string get plain text input stream is throws ioexception saxexception tika exception metadata metadata new metadata return parse is metadata
returns plain text representation of a file given an inputstream
public string get text url url string base url int max hops throws client protocol exception ioexception return get text url to string base url max hops 0
returns a text representation of the website at the specified url by crawling
private void create alphabetic index logger info creating alpha index this alpha index file file fichero new file this alpha index file object output stream oos try oos new object output stream new file output stream fichero oos write object this alpha index oos close catch file not found exception e logger error error writing alpha index e catch ioexception e logger error error writing alpha index e logger info alpha index created
serializes the alphabetic index tree map to disk
private void create top concept index logger info creating top concept index this top concept index file file fichero new file this top concept index file object output stream oos try oos new object output stream new file output stream fichero oos write object this top concept index oos close catch file not found exception e logger error error writing top concept index e catch ioexception e logger error error writing top concept index e logger info top concept index created
serializes the top concept index tree map to disk
private boolean valid string s if s matches javascript mailto return false return true
returns true if the specified url is a valid http url
public void close logger trace close try this writer close catch corrupt index exception e logger error e catch ioexception e logger error e
close the index
public concept relation get relation return concept relation
returns the parsed concept relation
public string get pref label return pref label
returns the preferred label for this concept
public void set pref label string pref label this pref label pref label
sets the preferred label for this concept
public void set alt labels list string alt labels this alt labels alt labels
sets the alternate labels for this concept
public void set broader concepts list string broader concepts this broader concepts broader concepts
sets the broader concept uris for this concept
public void set narrower concepts list string narrower concepts this narrower concepts narrower concepts
sets the narrower concept uris for this concept
public void set related concepts list string related concepts this related concepts related concepts
sets the related concept uris for this concept
public void set scope notes list string scope notes this scope notes scope notes
sets the scope notes for this concept
public void add narrower concept string uri this narrower concepts add uri
adds a narrower concept uri
public void add related concept string uri this related concepts add uri
adds a related concept uri
public boolean is top concept return is top concept
returns true if this is a top concept
public void set top concept boolean is top concept this is top concept is top concept
sets whether this is a top concept
public void set leaf boolean is leaf this is leaf is leaf
sets whether this is a leaf node
public connection get connection throws sqlexception logger trace get connection return driver manager get connection jdbc apache commons dbcp name
get a connection from the pool
public hive index get h2 index return this h2 index
returns a reference to the underlying h2 store
public hive index get lucene index return this lucene index
returns a reference to the underlying lucene index
public void set num feature if m stdevfeature m num features if m nodefeature m num features if m lengthfeature m num features
sets whether vocabulary relation attribute is used
public void context initialized servlet context event servlet context event servlet context servlet context servlet context event get servlet context string config dir servlet context get init parameter config dir string dir path servlet context get real path config dir initialize dir path
run initialization code when at web application start up
public void initialize string dir path initialize the properties file for log4j string log4j properties path dir path log4j properties property configurator configure and watch log4j properties path string vocabularies path dir path hive properties skos server new skosserver impl vocabularies path if skos server null skos searcher skos server get skossearcher logger info skos searcher initialized skos tagger skos server get skostagger logger info skos tagger initialized
initialize the logger the skos server and the skos searcher when
before public void set up this schemes resource new schemes resource if initialized configuration listener new configuration listener configuration listener initialize dir path initialized true
establish a fixture by initializing appropriate objects
test public void initialize assert true 1 1
run an initial test that always passes to check that the test harness
test public void test get alpha index final string expected substring1 concepts final string expected substring2 concept final string expected substring3 zooplankton string returned string schemes resource get alpha index lter scheme name if returned string null assert true missing expected substring expected substring1 returned string contains expected substring1 assert true missing expected substring expected substring2 returned string contains expected substring2 assert true missing expected substring expected substring3 returned string contains expected substring3 else assert not null returned string has null value returned string
test the get alpha index method
test public void test get last date final string similar date string wed jun 23 09 08 13 mdt 2010 string returned date string schemes resource get last date lter scheme name if returned date string null int similar date string length similar date string length int returned date string length returned date string length assert equals returned date string length does not equal expected date string length similar date string length returned date string length else assert not null returned date string has null value returned date string
test the get last date method
test public void test get name final string expected name lter string returned name schemes resource get name lter scheme name if returned name null assert equals returned name does not match expected name expected name returned name else assert not null returned name has null value returned name
test the get name method
test public void test get long name final string expected long name long term ecological research network controlled vocabulary string returned long name schemes resource get long name lter scheme name if returned long name null assert equals returned long name does not match expected long name expected long name returned long name else assert not null returned long name has null value returned long name
test the get long name method
test public void test get number of concepts string returned number of concepts schemes resource get number of concepts lter scheme name if returned number of concepts null try integer parse int returned number of concepts 10 catch number format exception e fail unexpected value for number of concepts returned number of concepts else assert not null returned number of concepts has null value returned number of concepts
test the get number of concepts method
test public void test get number of relations string returned number of relations schemes resource get number of relations lter scheme name if returned number of relations null try integer parse int returned number of relations 10 catch number format exception e fail unexpected value for number of relations returned number of relations else assert not null returned number of relations has null value returned number of relations
test the get number of relations method
test public void test get schema uri final string expected schema uri http www lternet edu vocabulary string returned schema uri schemes resource get schema uri lter scheme name if returned schema uri null assert equals returned schema uri does not match expected schema uri expected schema uri returned schema uri else assert not null returned schema uri has null value returned schema uri
test the get schema uri method
before public void set up this concepts resource new concepts resource if initialized configuration listener new configuration listener configuration listener initialize dir path skos searcher configuration listener get skossearcher skos server configuration listener get skosserver initialized true
establish a fixture by initializing appropriate objects
test public void test get scheme names string returned string schemes resource get scheme names if returned string null assert true missing expected substring lter scheme name returned string contains lter scheme name assert true missing expected substring nbii scheme name returned string contains nbii scheme name else assert not null returned string has null value returned string
test the get scheme names method
test public void test initialize assert true 1 1
run an initial test that always passes to check that the test harness
test public void test get sub alpha index final string expected substring1 concepts final string expected substring2 concept final string expected substring3 atmospheric deposition final string start letters a string returned string schemes resource get sub alpha index lter scheme name start letters if returned string null assert true missing expected substring expected substring1 returned string contains expected substring1 assert true missing expected substring expected substring2 returned string contains expected substring2 assert true missing expected substring expected substring3 returned string contains expected substring3 else assert not null returned string has null value returned string
test the get sub alpha index method
test public void test concept list to xml final string expected substring1 skosconcepts final string expected substring2 skosconcepts final string keyword activity list skosconcept scheme concepts new array list skosconcept scheme concepts skos searcher search concept by keyword keyword string xml string concepts resource concept list to xml scheme concepts if xml string null assert true missing expected substring expected substring1 xml string contains expected substring1 assert true missing expected substring expected substring2 xml string contains expected substring2 else assert not null xml string has null value xml string
test the xml output out the concepts resource
test public void test get sub top concept index final string expected substring1 concepts final string expected substring2 concept final string expected substring3 activity final string start letters a string returned string schemes resource get sub top concept index nbii scheme name start letters if returned string null assert true missing expected substring expected substring1 returned string contains expected substring1 assert true missing expected substring expected substring2 returned string contains expected substring2 assert true missing expected substring expected substring3 returned string contains expected substring3 else assert not null returned string has null value returned string
test the get sub top concept index method
test public void test get top concept index final string expected substring1 concepts final string expected substring2 concept final string expected substring3 activity string returned string schemes resource get top concept index nbii scheme name if returned string null assert true missing expected substring expected substring1 returned string contains expected substring1 assert true missing expected substring expected substring2 returned string contains expected substring2 assert true missing expected substring expected substring3 returned string contains expected substring3 else assert not null returned string has null value returned string
test the get top concept index method
after public void tear down this schemes resource null
release any objects after tests are complete
test public void test get broaders final string local part 285 final string expected broader local part 7860 local part string returned broader concepts resource get broaders nbii scheme name local part assert true missing expected substring expected broader returned broader contains expected broader
test get broaders method
test public void test get concept from pref label final string pref label protozoa final string expected concept skos pref label protozoa skos pref label string returned concept concepts resource get concept from pref label lter scheme name pref label assert true missing expected substring expected concept returned concept contains expected concept
test get concept from pref label method
test public void test get skosformat final string local part c 7 final string expected skosformat skos pref label acid neutralizing capacity skos pref label string returned skosformat concepts resource get skosformat lter scheme name local part assert true missing expected substring expected skosformat returned skosformat contains expected skosformat
test get get skosformat method
test public void test search concepts by keyword final string keyword activity final string expected concept skos pref label microbial activity skos pref label string returned concepts concepts resource search concepts by keyword lter scheme name keyword assert true missing expected substring expected concept returned concepts contains expected concept
test search concepts by keyword method
after public void tear down this concepts resource null
release any objects after tests are complete
private void reallocate platoons in battalions todo improve iterator platoon itera platoons platoons iterator platoon platoon aux null if util get army attack rate platoons attack battalion 0 9 constants attack rate while itera platoons has next platoon aux itera platoons next if platoon aux get battalion equals defense battalion platoon aux set battalion attack battalion break else if util get army attack rate platoons attack battalion 1 1 constants attack rate while itera platoons has next platoon aux itera platoons next if platoon aux get battalion equals attack battalion platoon aux set battalion defense battalion break
reallocates platoons between attack defense battalions to turn army
public void move position position move position get x position get y
must be called only by tank services
final private boolean is valid row throws exception return where null row source row inserted where get boolean
verify if the valid row of the underlying row source variable join
protected index node create index node boolean unique char digit return new index node unique digit
create a new node in the index
private void compile join join single join throws exception if single join condition null compile link expression params single join condition if single join left instanceof join compile join join single join left if single join right instanceof join compile join join single join right
set the link between the named expression and the table object
public int find column string column name throws sqlexception expressions columns column expressions fixme performance for int i 0 i columns size i if column name equals ignore case columns get i get alias return i throw small sqlexception create language col missing column name
the returning index start at 0
public boolean equals object expr if super equals expr return false if expr instanceof expression arithmetic return false if expression arithmetic expr operation operation return false return true
is used in group result
final private void patch expressions expressions exprs throws sqlexception if exprs null return for int i 0 i exprs size i exprs set i patch expression exprs get i
patch all external expression name in the list select clause
final private boolean move to valid row throws exception while file pos 0 if move to row return true set next file pos row 0 return false
move to the next valid row