input
stringlengths 10
828
| output
stringlengths 5
107
|
|---|---|
public void set relation method relative type method rel type method
|
set the relation method to be used when interpreting inexact dates
|
public boolean can explore part of speech pos return pos null pos equals part of speech noun pos equals part of speech verb pos equals part of speech adjective pos equals part of speech adverb
|
return whether this word net explorer can handle a particular part of
|
private boolean check compare string word string base boolean matches false if base ends with y matches word equals base substring 0 base length 1 ier word equals base substring 0 base length 1 iest else matches word equals base er word equals base est return matches
|
check whether the word provided could be a comparator stemming from the
|
public string get map action url return map action url
|
get the map action url
|
private boolean check plural string word string base boolean matches false if base ends with y matches word equals ignore case base substring 0 base length 1 ies else matches word equals ignore case base s word equals ignore case base es return matches
|
check whether the word provided could be a plural or a 3rd person
|
public void set height int image height height image height
|
set the height of the image
|
public void set width int image width width image width
|
set the width of the image
|
private boolean check tense string word string base boolean matches false if base ends with y matches word equals ignore case base substring 0 base length 1 ied word equals ignore case base ing else matches word equals ignore case base ed word equals ignore case base d word equals ignore case base ing return matches
|
check whether the word provided could be a verb tense stemming from the
|
private jfree chart update chart chart type type chart type type combo get selected item jfree chart chart maker create chart type category combo get selected item to string domain combo get selected item to string data combo get selected item to string chart data type data val combo get selected item return chart
|
update the chart displayed
|
private part of speech determine pos string base part of speech pos null word net index rec cache get base if rec null rec read index base index noun false if rec null rec read index base index verb false if rec null pos part of speech verb else rec read index base index adj false if rec null pos part of speech adjective else rec read index base index adv false if rec null pos part of speech adverb else pos part of speech noun else pos rec get part of speech return pos
|
determine the part of speech for the base word
|
private void update combo object obj data val combo get selected item boolean data vis obj equals chart data type count obj equals chart data type fraction of count data combo set enabled data vis
|
update the state of the jcombo boxes
|
public file get directory return repository
|
get the current repository directory
|
public string get config file return config
|
return the configuration file
|
protected url get config url url cfg url null if context null try cfg url context get resource config catch malformed urlexception exc throw new illegal argument exception cannot get config file config from context exc else try cfg url new url config catch malformed urlexception exc file file new file config try cfg url file to uri to url catch malformed urlexception exc1 throw new illegal argument exception invalid config file config exc return cfg url
|
get the url location of the configuration file
|
public void set config file string config file config config file
|
set the configuration file
|
public void set context servlet context servlet context context servlet context
|
set the servlet context
|
public void set query string query string query query string
|
set the endeca query string
|
public file get directory return data dir
|
get the directory location of the word net files
|
private string extract args string nav query if nav query null string arr nav query split string buffer new query new string buffer for string element arr int eq inx element index of char first element char at 0 if eq inx 4 eq inx element length first d first a first r first n if new query length 0 new query append new query append element if is debug system err println endeca query string new query return new query to string return null
|
extract the specific endeca arguments for the query string
|
public int get max level int max lvl 0 file rep files repository list files for file file rep files string file name file get name int lvl integer parse int file name substring 0 2 if lvl max lvl max lvl lvl return max lvl
|
return the maximum level the repository contains
|
protected endeca accessor get endeca accessor return endeca accessor get accessor
|
get the endeca accessor
|
public string get navigation page return nav page
|
get the page used to generate navigation links
|
public string get record page return rec page
|
get the page used to generate record detail links
|
public void set data name string name data name name
|
set the name of the default data structure object to be accessed
|
public void set navigation page string navigation page nav page navigation page
|
set the page used to create references to endeca navigation requests
|
public void set record page string record page rec page record page
|
set the page used to create references to endeca record detail requests
|
private void update page refs string buffer req url try url base url new url req url to string endeca accessor accessor endeca accessor get accessor if nav page null nav page starts with http url nav url new url base url nav page nav page nav url to string accessor set navigation page nav page if rec page null rec page starts with http url rec url new url base url rec page rec page rec url to string accessor set record page rec page catch malformed urlexception exc if is debug exc print stack trace
|
update the page references with the servlet request url
|
public boolean can read return doc file null
|
return whether this reader is initialized and can read data
|
public void close doc file null
|
close the reader
|
public string get source return doc file get path
|
get the source for this reader
|
public boolean has more data boolean changed doc file null if last read null changed date last change new date doc file last modified if last read after last change changed false return changed
|
determine whether the reader has more data
|
private doc data parse file file file doc data data null try pddocument doc pddocument load file pdftext stripper stripper new pdftext stripper string body stripper get text doc doc close string name file get name data new doc data name substring 0 name length 4 data set body body data set time stamp new date file last modified catch file not found exception ex system err println ex get message ex print stack trace return null catch ioexception e system err println e get message e print stack trace return data
|
parse the pdf file into a doc data object
|
private void load overlay list file file new file repository overlays txt if file exists try buffered reader reader new buffered reader new file reader file string line while line reader read line null string ov data line split t if ov data length 2 overlays put ov data 0 char at 0 ov data 1 else system out println overlay line line malformed catch ioexception e e print stack trace
|
load the list of overlays from the repository
|
public void set source string source try doc file new file source catch exception exc throw new illegal argument exception cannot open source exc
|
set the source for this reader
|
public boolean can read return pst file null
|
return whether this reader is initialized and can read data
|
public void close pst file null
|
close the reader
|
private string clean text string text string str text if str is empty replace ms word s quotation marks with ascii compliant one str str replace all u0093 u0094 u201c u201d str str replace all u0091 u0092 u2019 str str replace all u0086 str str replace all u00a0 non breaking space replaces ms word s dash with ascii compliant one str str replace all u2013 u2014 remove special unicode characters str str replace all u0013 u0014 u0015 remove non xml characters str str replace all ud800 udfff return str trim
|
clean msword text
|
private string convert html string body html string buffer buf new string buffer int span inx body html index of span while span inx 1 int end body html index of span inx 5 int nxt tag body html index of end string data body html substring end 1 nxt tag data data replace nbsp trim span inx body html index of span end int para tag body html index of p end if para tag 0 para tag span inx buf append data n else buf append data return buf to string
|
extract the text content from the html mail message
|
public boolean has more data boolean changed file name null if last read null file name null file my file new file file name date last change new date my file last modified if last read after last change changed false return changed
|
determine whether the reader has more data
|
private buffered image scale image image image int size buffered image buf image new buffered image size size buffered image type int argb graphics2 d graphics2 d buf image create graphics graphics2 d set rendering hint rendering hints key interpolation rendering hints value interpolation bilinear graphics2 d draw image image 0 0 size size null return buf image
|
scale an image to the specified size
|
public void set filters string filters string filter arr filters split for string element filter arr string filter element trim if filter starts with folder folder set new hash set string string folder list filter substring 7 split for string folder folder list folder set add folder else if filter starts with type type set new hash set string string type list filter substring 5 split for string type type list type set add type
|
set the filters for this reader
|
public void set source string source try pst file new pstfile source file name source catch exception exc throw new illegal argument exception cannot open source exc
|
set the source for this reader
|
public void set host string endeca host host endeca host
|
set the endeca host used to query
|
public void set key field string field key field field
|
set the key field used to extract keys from the documents
|
public void store scaled image buffered image image throws ioexception store scaled image image 1 0 0 false
|
store an image into the repository
|
public void set name field string field name field field
|
set the field used to identify the documents
|
public void set port string endeca port port endeca port
|
get the endeca port used to query
|
public void clear doc doc build new document root doc create element records doc append child root
|
clear any stored settings and data
|
public void store scaled image file image file throws ioexception if image file exists buffered image image image io read image file store scaled image image 1 0 0 false else throw new ioexception file does not exist image file
|
store an image file into the repository
|
public void close try if root get child nodes get length 0 transformer transform new domsource doc new stream result out writer if out writer null out writer close catch exception exc exc print stack trace
|
close this writer
|
private element create prop elem string prop name string prop val element prop elem null if prop name null prop val null prop elem doc create element prop element p val elem doc create element pval prop elem set attribute name prop name trim text p val text doc create text node prop val trim p val elem append child p val text prop elem append child p val elem return prop elem
|
create a property element
|
private void dump file if output dir null date date new date file out file new file output dir long to string date get time xml try out writer new file writer out file close clear out writer null catch ioexception exc todo auto generated catch block exc print stack trace
|
dump the current xml content into a file in the output directory
|
public int get max category count return max category count
|
gets the max category count
|
public long get dimension id string field name long dim id dim id map get field name return dim id null 1 dim id
|
get the dimension id for a particular field
|
public string get output directory return output dir to string
|
return the output directory for this writer
|
public string to image name int level int x coord int y coord char suffix int max coord 1 level 1 if max coord x coord max coord y coord x coord 0 y coord 0 throw new illegal argument exception coordinates too big for level level x coord y coord return level 9 integer to string level 0 level x coord 9 integer to string x coord 0 x coord y coord 9 integer to string y coord 0 y coord character is whitespace suffix character to upper case suffix
|
get the image name based on the level coordinates and suffix
|
public date get earliest date string field long early long field min get field if early null string prop get field type field if prop null prop equals datetime throw new illegal argument exception field field is not a datetime field early long find field min field return new date early
|
return the earliest date value for a particular date field
|
public boolean is category field string field name data type data field types get field name return data data type enum data data type location data data type text value count get field name max category count
|
checks if is category field
|
public void set output directory string directory output dir new file directory
|
set the output directory where the endeca files should be written
|
public string get field type string field string type null key properties prop key properties key props get field if prop null property map prop vals prop get properties type string prop vals get endeca type return type
|
get the field type for a given field
|
private boolean is instants string field name boolean instants true if field name null for iterator data record iter records iterator iter has next instants data record rec iter next set time span time set rec get time values field name for time span span time set if span is instantaneous instants false return instants
|
checks if is instants
|
public void write data collection data record data for data record rec data append record rec if data is empty out writer null dump file
|
write a dataset
|
public date get latest date string field long late long field max get field if late null string prop get field type field if prop null prop equals datetime throw new illegal argument exception field field is not a datetime field late long find field max field return new date late
|
return the latest date value for a particular date field
|
public boolean is numeric field string field name data type data field types get field name return data data type int data data type measure
|
checks if is numeric field
|
public void write grid grid data record grid for data record rec grid append record rec if out writer null dump file
|
write grid data
|
public void write tree tree data record tree for iterator data record tree iter tree depth first iterator tree iter has next data record rec tree iter next append record rec if out writer null dump file
|
write tree data
|
private void add field to record data record rec string name string value data template template get template if template null if rec get name null template get name key list contains name rec set name value hash map string field desc descs template get field descriptions for field desc desc descs values set string src fields desc get source fields if src fields contains name transform the element into the record try desc parse value into record rec value catch parse exception exc exc print stack trace
|
parse a field value and add it to the data record
|
public boolean is use3d effects return use3d
|
checks if is use3d effects
|
public void crawl data crawl dir data dir fire record received null
|
crawl the data to retrieve records
|
private void crawl dir file dir file if dir file is directory file subs dir file list files for file sub subs if sub is directory crawl dir sub else if dir file get path contains output sub get name ends with xml parse file sub else parse file dir file
|
recursively crawl through a directory searching for endeca files
|
public void set data directory string directory data dir new file directory
|
set the working directory explicitly
|
public void set data filter data filter data filter filter data filter
|
sets the data filter
|
public void set host and port string host int port hash map string string map new hash map string string map put host host map put port integer to string port get accessor set init parameters map
|
set the host and port of the endeca engine that this translator accesses
|
public void set host and port string host string port hash map string string map new hash map string string map put host host map put port port get accessor set init parameters map
|
set the host and port of the endeca engine that this translator accesses
|
public void set record filter string filter hash map string string map new hash map string string map put filter filter get accessor set init parameters map
|
set the record filter used by this translator
|
public void set search field string field search field field
|
set the field for the text search
|
public string transform query doc filter query string xform transform term query if search field null xform dx mode matchboolean d xform dimension search throw new illegal state exception must set the search field return ntx mode matchboolean ntk search field ntt xform
|
transform the query into an endeca formatted query string that can be
|
private entity type determine type string name entity type type entity type unknown string lower name to lower case if lower contains person type entity type person else if lower contains place lower contains location type entity type location else if lower starts with org type entity type organization else if lower contains date lower contains time type entity type date time else if type equals money type equals percentage type entity type quantity return type
|
determine the entity type from the name passed in
|
public void set dimension entity type string dim name entity type type dim type put dim name type
|
set the entity type for a particular dimension
|
private void setup dim vals set string dims profile get fields dimension for string dim dims entity type type determine type dim dim type put dim type set string dim vals profile get all dim values dim all dim vals put dim dim vals
|
set up the dimension value maps
|
public void set tree prajna util tree n new tree tree new tree pre tree get converter convert tree tree display graph pre tree
|
set the tree displayed by this display
|
public void update tree
|
update the tree currently displayed showing new or expanded nodes or
|
public void set data records set data record data records if data records null throw new illegal argument exception set of data records cannot be null records data records field types clear value count clear for data record rec records set string field names rec get all field names field names remove all field types key set for string field field names determine field type field
|
sets the data records
|
public object get data visual item item object obj converter get node loader get data item if obj null obj converter get edge loader get data item return obj
|
get the original data item associated with the prefuse visual item
|
public void set depth int depth cmap new color map color lib get interpolated palette depth 1 color lib gray 200 200 color lib gray 50 50 0 depth
|
set the depth of the color palette display
|
public void set max category count int count max category count count
|
sets the max category count
|
public void add hover listener hover listener listener if hovers is empty add control listener new my hover hovers add listener
|
adds a listener which will receive any item selected events
|
public void add item listener item listener listener if picker added picker added true get visualization add focus group my picker add control listener new focus control my picker 1 listeners add listener
|
adds a listener which will receive any item selected events
|
public void set depth int depth cmap new color map color lib get interpolated palette depth 1 color lib rgb 85 85 85 color lib rgb 0 0 0 0 depth
|
set the depth of the color palette display
|
protected void display graph prefuse data graph prefuse graph visualization vis get visualization vis remove group graph vis add graph prefuse graph vis run draw if has interactive edges vis set interactive graph edges null false
|
display the prefuse graph
|
public void set time increment string time field int interval time inc map put time field interval
|
set the time interval for a time field explicitly
|
public void set use3d effects boolean use3d flag use3d use3d flag
|
sets the use3d effects
|
public e get selected edge e edge null tuple set pick grp get visualization get group my picker if pick grp null pick grp get tuple count 0 for iterator iter pick grp tuples iter has next tuple tuple tuple iter next if tuple instanceof edge edge converter get edge loader get data tuple return edge
|
get the currently selected edge
|
protected void set edge loader tuple loader e loader edge loader loader
|
sets the edge loader used for converting graph edges
|
public n get selected node n node null tuple set pick grp get visualization get group my picker if pick grp null pick grp get tuple count 0 for iterator iter pick grp tuples iter has next tuple tuple tuple iter next if tuple instanceof node node converter get node loader get data tuple return node
|
get the currently selected node
|
private erec query record string spec erec new rec recs get spec if new rec null try string coded urlencoder encode spec utf 8 url enequery ene query new url enequery r coded utf 8 enequery results results ene conn query ene query if results contains erec new rec results get erec recs put spec new rec catch enequery exception exc throw new runtime exception cannot access endeca engine at host port exc catch unsupported encoding exception exc throw new runtime exception cannot enscode spec in utf 8 exc return new rec
|
retrieve the full endeca record from the endeca engine
|
protected void set node loader tuple loader n loader node loader loader
|
sets the node loader used for converting graph nodes tree nodes and
|
public tuple add data s data int row num tuple table add row tuple tuple tuple table get tuple row num load data data tuple return tuple
|
add the data element as a tuple to the table
|
public tuple find tuple s data tuple converted null for iterator iter tuple table tuples iter has next tuple tuple tuple iter next if data matches data tuple converted tuple return converted
|
find the converted tuple for the specified data element or null if it
|
protected boolean has interactive edges return false
|
return whether the graph display has interactive edges or not
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.