input
stringlengths
10
828
output
stringlengths
5
107
public boolean is empty return categories is empty
returns true iff the collection does not contain any items
public iterator iterator return categories iterator
returns a new code java
public void union categories other categories iterator other categories iterator other categories iterator while other categories iterator has next union category other categories iterator next
adds a bunch of categories but each category is only
public void union category category iterator my iterator iterator while my iterator has next if my iterator next equals category return already contained categories add category
adds a category if theres not yet an equal category
public boolean has been matched exactly return has been matched
returns code true code iff the code p3p element code object
public result appel ruleset evaluation result evaluation results expiry date expiry date this evaluation results evaluation results this expiry date expiry date
creates a new code result code instance
public expiry date get expiry date return expiry date
gets the expiry date of this code result code object
public boolean approves throws invalid ruleset exception for int i 0 i evaluation results length i appel behavior appel behavior evaluation results i get behavior if appel behavior appel behavior block return false return true
returns code true code iff this result approves of the http request
public string reason for disapproval throws invalid ruleset exception for int i 0 i evaluation results length i appel behavior appel behavior evaluation results i get behavior if appel behavior appel behavior block return evaluation results i get explanation return null this won t happen if you check with approves first
returns a verbose description of why this result does not approve
protected void initialize contained p3p elements throws invalid policy exception contained p3p elements new p3p elements and pcdatas this
does the late initialization for the member code contained p3p elements code
private element get data schema element throws invalid data schema exception if element null initialize element return element
returns the data schema jdom element of this data schema
private schema element type string string representation this string representation string representation
creates a new instance
public option specification string elementary options string this elementary options string elementary options string fixme value options
creates a new code possible options code instance where exactly the letters of
public string get name return string representation
returns the code string code representation
protected abstract iterator list item list iterator new iterator implementation item list
can be called by subclasses constructors
public iterator implementation list items this items items reset
constructing a new iterator adapter
private void add option char option string value throw new runtime exception options with values are currently not supported modify org util options and arguments accordingly
does not work at the moment
public boolean has next return recent position 1
returns code true code iff there is one more item which
public boolean contains one equal to one of these abstract iterator items to check for return iterator contains one equal to one of these items to check for iterator
returns code true code iff this abstract iterator contains
public object next throws no such element exception if has next throw new no such element exception no more contained item available object result items get recent position if recent position items size 1 recent position else recent position 1 return result
returns the next item contained
protected object next uncasted throws no such element exception return iterator next
returns the next item contained
public void remove throws unsupported operation exception throw new unsupported operation exception method remove not supported by iterator implementation
always throws an unsupported operation exception
public boolean is empty return iterator is empty
returns true iff the collection does not contain any items
public boolean is empty if items size 0 return true else return false
returns true iff the collection does not contain any items
private non and connective
creates a new code non and connective code instance
private or exact connective
creates a new code or exact connective code instance
private and connective
creates a new code and connective code instance
private or connective
creates a new code or connective code instance
private non or connective
creates a new code non or connective code instance
private and exact connective
creates a new code and exact connective code instance
public url as url return url
returns the corresponent url
public string to string return uri string
returns the code string code representation of the
public string un uri escape try return uri utils un uri escape to string catch invalid escape syntax exception e throw new runtime exception internal error in method matchable uri un uri escape an invalid escape syntax exception occured this should should have been prevented by checking the uri string in the constructor
returns the uri as a code string code
private void ensure is valid throws invalid or unsupported uri exception ensure that un uri excapation replacing all escape sequences by the corresponding character works fine try uri utils un uri escape to string catch invalid escape syntax exception e throw new invalid or unsupported uri exception to string is not a valid uri n syntax error found e get message
ensures the uri is valid
private void ensure is valid throws invalid or unsupported uri exception ensure that un uri excapation replacing all escape sequences by the corresponding character works fine try uri utils un uri escape keeping escaped asterisks escaped to string catch invalid escape syntax exception e throw new invalid or unsupported uri exception to string is not a valid uri n syntax error found e get message
describe code ensure is valid code method here
private string un uri escape keeping escaped asterisks escaped try return uri utils un uri escape keeping escaped asterisks escaped to string catch invalid escape syntax exception e throw new runtime exception internal error in method wildcard enabled uri un uri escape keeping escaped asterisks escaped an invalid escape syntax exception occured this should should have been prevented by checking the uri string in the constructor
returns the wildcard enabled uri as a code string code
public void stop lucene timer date stop time new date if lucene start time null lucene time lucene time get elapsed time lucene start time stop time lucene start time null else system err println stop lucene timer called before start lucene timer
stop lucene timer
public boolean perform finish final ifile file this page create new file versioning helper open editor get shell file return true
this method is called when finish button is pressed in
protected void refresh visuals point location new point get entity get x get entity get y dimension size get figure get size rectangle rectangle new rectangle location size graphical edit part get parent set layout constraint this get figure rectangle
updates the visual aspect of this
protected ifigure create figure figure figure new freeform layer figure set layout manager new freeform layout figure set border new margin border 5 figure set background color color constants list background figure set opaque true return figure
returns a figure to represent this
public template store get template store if f store null f store new contribution template store get context type registry quantum plugin get default get preference store custom templates key try f store load catch ioexception e quantum log get instance error e get message non nls 1 non nls 2 return f store
returns this plug ins template store
public context type registry get context type registry if f registry null create an configure the contexts available in the template editor f registry new contribution context type registry f registry add context type sql2 context type sql2 context type return f registry
returns this plug ins context type registry
public imetadata service get metadata service if metadata service null metadata service new metadata service return metadata service
this retrieves the metadataservice
private string get current statement string complete int offset int start 0 int end complete index of if end 1 statement offset offset start return complete while end offset start end 1 end complete index of start if end 1 end complete length break statement offset offset start return complete substring start end
gets the current statement
private boolean is alias string database thingy qstatement stmt model get statements get 1 if stmt null for qtable t stmt get qtables for qalias a t get qaliases if a get alias equals ignore case database thingy a is an alias for t get name table name t get name return true else now what return false
is it really an alias
private boolean is schema string database thingy try if get metadata service for bookmark model get bookmark get schemas as names contains database thingy schema name database thingy table name null return true else return false catch not connected exception e return false catch sqlexception e return false
is it really a schema
public int get widget offset point pt int offset 1 try offset widget get offset at location pt catch illegal argument exception e check if the cursor is past the end of the line point start pt new point 0 pt y return get line start start pt return offset
gets the character offset of the point in widget co ordinates
public int get line start point pt int offset 1 try offset widget get offset at location pt int line number widget get content get line at offset offset offset widget get content get line line number length catch illegal argument exception e assume we re past the end of the doc return widget get char count return offset
returns the character offset of the line
private void add schemas int offset list icompletion proposal proposals string replacement null for schema sch model get bookmark get selected schemas if sch get name starts with prefix replacement sch get name substring prefix length sch get name length proposals add new completion proposal replacement offset selection get length replacement length image store get image image store schema sch get name null null
we can offer schemas
public string get count query string table name return select count from table name
returns a query to get the number of registers from a table
public string get table query string table if logger null logger is debug enabled logger debug get table query string value of table return select from table non nls 1
returns the sql query to access all the columns of a table select
public string get next value string sequence string owner if logger null logger is debug enabled logger debug get next value string value of sequence string value of owner returns null return null
gets the sql query to get the next value of a sequence incrementing
public string get prev value string sequence string owner if logger null logger is debug enabled logger debug get prev value string value of sequence string value of owner returns null return null
gets the sql query to get the actual value previously used of a
public string get remarks query string table name string column name if logger null logger is debug enabled logger debug get remarks query string value of table name string value of column name returns null return null
returns a query to get the comments on the columns of a table
public string get count query string table name string result select count from table name if logger null logger is debug enabled logger debug get count query string value of table name returns result return result
returns a query to get the number of registers from a table
public properties get connection properties return null
this method returns any connection properties other than userid and
public boolean is explainable sql sql statement return true
oracle explains mostly everything
private int get query type connection con long id throws sqlexception statement stmt con create statement string query select flag from msys queries where object id string value of id and attribute 1 if stmt null query null stmt execute query result set set stmt get result set try if set next return set get int flag else return 0 selet query finally set close stmt close return 0
gets the type of the query if its a select insert update delete
private string get where clause connection con long id throws sqlexception return get expression list con id 8
gets the where clause from the msys queries rows
public string build prepared insert ientity entity string matrix columns return build generic insert entity columns true null
generates a prepared insert sql instruction using only the names in the
private string get having clause connection con long id throws sqlexception return get expression list con id 10
gets the having clause from the msys queries rows
private string get string result set set string string throws sqlexception string result set get string string return result null result
convenience function that returns the empty string instead of null when
private string get string from character steam result set set int column number reader reader try reader set get character stream column number if reader null string buffer buffer new string buffer int ret val reader read int count 0 while ret val 0 buffer append char ret val ret val reader read count if count max column width buffer append non nls 1 break reader close return buffer to string catch sqlexception e e print stack trace catch ioexception e e print stack trace return
utility function to read a string from a character stream representing a
public bookmark find string name if name null for bookmark bm bookmarks if name equals bm get name return bm return null
finds a bookmark with the specified name
public void export xml element root if logger null logger is debug enabled logger debug export xml bookmarks saving non nls 1 element bookmark root xmlutil create element text root bookmarks non nls 1 non nls 2 for jdbcdriver driver this drivers model to xmlconverter convert bookmark root driver for int i 0 i bookmarks size i bookmark b bookmark bookmarks get i model to xmlconverter convert bookmark root b
exports a bookmark data to an xmldocument element the complementary
public void import xml element root this changed true if logger null logger is debug enabled logger debug import xml bookmarks loading non nls 1 import drivers root array list bookmark new bookmarks import bookmarks root for bookmark bookmark new bookmarks if this bookmarks contains bookmark this bookmarks add bookmark this support fire property change bookmarks null null
imports a bookmark data from an xmldocument element the complementary
private boolean is quantum232 notation element driver return equals driver get attribute type
an earlier version of the quantum xml format omitted the type
private void backward compatibility bookmark bookmark element element node list children element get child nodes for int i 0 length children get length i length i node node children item i if node get node type node element node schema equals element node get tag name string schema xmlutil extract text element if schema null schema trim length 0 bookmark add schema schema
earlier versions of the xml file expected one schema element under the
private string get original from row string matrix from matrix string name1 for int i 0 i from matrix size i if from matrix get 1 i equals from matrix get 1 i equals name1 return from matrix get 0 i return
find the original name of the table if name1 is an alias
public string quote value ientity entity string column name string value if entity null get column entity column name null icolumn column get column entity column name return quote entity get bookmark value column get type column get type name else return value
quotes the value according with the type of the column and the database
public connection get connection throws not connected exception if this connection null throw new not connected exception return this connection
returns the connection object
public icolumn get column ientity entity string column name try return entity null null entity get column column name catch not connected exception e return null catch sqlexception e return null
wrapper function to avoid exception handling
public void start bundle context context throws exception super start context plugin this configure logging todo this should be moved to a lazy loading scheme as start can be called for many reasons and you should avoid possibly long running operations startup migration temp method
used during startup eclipse3
public string java to sql list data type types int java type string sql for data type type types if type get java type java type sql type get database type name in principle the first found match is the best break return sql
converts the given java sql type from java
public iview part get view string view iview part table view null try iworkbench page page quantum plugin get default get active page table view page find view view if table view null show view will give focus to the created view we don t want that so we save the active part iworkbench part part page get active part table view page show view view and return the focus to it page activate part catch part init exception e e print stack trace return table view
returns a view in the active page creating it if needed
private void stop services if service locator null service locator dispose
stops the services for quantum
private boolean is in working set bookmark node bookmark node if working set null return true iadaptable working set elements working set get elements for iadaptable element working set elements if element instanceof bookmark node bookmark node equals element return true return false
returns if the given resource equals a working set element
public iworking set get working set return working set
returns the active working set
public void set working set iworking set working set this working set working set
sets the active working set
private void toggle details area point window size get shell get size point old size get shell compute size swt default swt default if this details shown this details area dispose this details shown false details button set text idialog constants show details label else this details area create details area composite get contents details button set text idialog constants hide details label point new size get shell compute size swt default swt default get shell set size new point window size x window size y new size y old size y
toggles the unfolding of the details area
public void add header string header this header add header
adds a string to the end of the header keys
private void add vector header list string header this header add all header for int i 0 i this header size i string element string this header get i this header set i element
adds a whole vector to the header
public void add header array string header for int i 0 i header length i string element header i this header add element
adds a whole array to the header
public void add string value int row grow row list string row vector matrix get row row vector add value
adds a string to the end of the row indicated
public void copy string matrix source clear add header array source get header for int i 0 i source size i for int j 0 j source get num columns j add at j i source get j i
converts the string matrix into a copy of the given
public void clear header clear matrix clear
clears emtpies the string matrix
public void clear values matrix clear
clears emtpies the values in the string matrix leaving the headers
public void add at int column int row string value grow row list string row vector matrix get row int act size row vector size if column act size add blank elements till required size for int i act size i column i row vector add row vector add column value
adds a string in the location specified displacing the rest of values
public void set at int column int row string value grow row list string row vector matrix get row int act size row vector size if column act size add blank elements till required size for int i act size i column i row vector add row vector set column value
adds a string in the location specified replacing the existing value if any
private void add vector list string value int row grow row list string row list matrix get row row list add all value
adds a whole vector to the end of the row indicated
public void add query string query string if this queries contains query string this queries remove query string this queries add query string int size get query history size while this queries size size this queries remove 0 this property change support fire property change iquantum constants queries property null null this changed true
adds a query to the list of last executed queries
public boolean contains string key return find key key 0
tells if you have that particular key in your string matrix
private int find key string key for int i 0 i header size i string element string header get i if element equals ignore case key return i return 1
finds the key in the header
public void drop matching string key string value for int i 0 i size i if get key i equals value delete row i
deletes all the rows that matches the value for the key
private void grow int row if matrix size row for int i matrix size i row i matrix add new array list string header size
grows the string matrix till its able to hold row rows
protected void print string string s string buffer buffer int len s null s length 0 for int i 0 i len i char ch s char at i switch ch case buffer append lt break case buffer append gt break case buffer append amp break case buffer append quot break case r case n default buffer append ch
normalizes the given string
public string get int col int row if col 0 row 0 return null list string row vector matrix get row if row vector null return null if col row vector size return string row vector get col else return null
gets a string value from the row indicated from the column number
public void delete row int i if i matrix size matrix remove i
deletes the row number i
private string get column list one level converter one level string result list one level converter lower one level get lower if lower null for one level converter element lower result element get result return result
calculates the list of columns for an upper level converter
public void set strip newline boolean selection this strip newline selection
sets if the bookmark will strip newlines from input