input
stringlengths 10
828
| output
stringlengths 5
107
|
|---|---|
protected void initialize if get model get config name null name set text get model get config name name request focus
|
override this method
|
protected string get pipeline name return this get info get str value scanner worker info scanner pipeline
|
get the pipeline name that this scanner is feeding
|
public wizard panel next wizard panel current return super next current
|
validate some of the panels
|
public wizard panel start return panels 0
|
start at the beginning of the wizard
|
protected void close dialog if dialog null system out println disposing dialog set visible false dialog dispose
|
close the dialog
|
protected void initialize int selected 0 string types get model get config option types for int i 0 i types length i listmodel add element types i if types i equals get model get config type selected i list set selected index selected list request focus
|
override this method
|
public void focus lost focus event e if name get text null get model set config name name get text
|
invoked when a component loses the keyboard focus
|
public void set model add pipeline stage model model this model model
|
set the model
|
protected boolean enqueue byte data map attr if attr null attr new hash map attr put scanner key this get name provide date key if not provided if attr contains key scan date key attr put scan date key new long system current time millis feed document feed new feed document this get pipeline name data attr is binary get info get boolean value scanner worker info journal try log log info document attr get file name key enqueued for pipeline this get pipeline name get feeder process feed catch general exception e return false return true
|
after some data has been scanned use the configured feeder see scanner to
|
public add pipeline stage model get model return model
|
get the model
|
public void set finished boolean finished super set finished finished if finished try pipeline builder model create pipeline stage pipeline stage stage type catch config exception ce log service get instance log error ce
|
we write the pipeline stage information to the configuration files
|
public void execute command line command line add pipeline stage wizard run null system exit 0
|
execute the commandline
|
public void set pipeline string pipeline this pipeline pipeline
|
this sets the name of the pipeline
|
protected void initialize try config panel remove all config panel initialize get model get pipeline stage config info config panel display values catch exception e e print stack trace
|
initialize the components
|
public boolean can do finish wizard panel current int number standard wizard panel current get number return number get stage config wizard panel number
|
can only finish on final panel
|
private void setup right panel try config panel new config option panel this add get config panel catch exception e e print stack trace
|
setup up the right hand panel with the components necessary
|
protected void initialize stage set text get model get stage if get model get stage type null stagetype set selected item get model get stage type else stagetype set selected item null
|
initialize the components
|
public void finish wizard panel current if get stage config wizard panel current get config panel is valid this get model set finished true close dialog
|
finish the wizard
|
protected boolean enqueue byte data string path map attr new hash map attr put scan path key path attr put file name key path return enqueue data attr
|
after some data has been scanned use the configured feeder see scanner to
|
public wizard panel next wizard panel current switch standard wizard panel current get number case get stage details wizard panel number string stage this get model get stage if stage null stage length 0 equals stage ipipeline stage resolver entry stage equals stage current set error message stage name stage is invalid return current return super next current
|
validate some of the panels
|
public boolean is valid for iterator iterator get config components iterator iterator has next config option component configcomp config option component iterator next if configcomp is valid return false return true
|
walk the list of configuration components looking for a component which
|
public string to string if get option get suboption names null get option get suboption names size 0 return get option get name get option get value else return get option get name
|
get the string
|
protected boolean enqueue byte data string path long time map attr new hash map attr put scan path key path attr put file name key path attr put scan date key new long time return enqueue data attr
|
after some data has been scanned use the configured feeder see scanner to
|
public map get configuration data return get map string combo get selected item
|
get the configuration data for the option
|
public config option get action option return action option
|
get the action option
|
public void display defaults for iterator iterator get config components iterator iterator has next config option component cfg comp config option component iterator next cfg comp display default
|
display the defaults
|
public void set focus combo request focus
|
set the focus on this component
|
public void display values system out println displaying values for iterator iterator get config components iterator iterator has next config option component cfgcomp config option component iterator next system out println handling cfgcomp cfgcomp display config value
|
display the defaults
|
public void set stage type string stage type this stage type stage type
|
get child the type of the selected stage
|
public array list get queue return queue operation get null
|
get file object queue
|
public boolean is valid return is valid text string combo get selected item
|
check to see if the configuration data is valid for the configuation
|
public string get stage type return stage type
|
get child the type of the selected stage
|
protected boolean enqueue byte data name value pair pairs return enqueue data name value pair get map pairs
|
another quick and easy way to enqueue some data
|
public void display config value combo set selected item get option get value
|
display the configured options
|
public void display default combo set selected item get option get default value
|
display the default
|
public void action performed action event e config option option add config wizard run get model get config option if option null get model add config get frame get tree table option
|
invoked when an action occurs
|
protected map get map string value map props new hash map props put get option get name value return props
|
helper method get the properties and fill with the name of the
|
public void action performed action event e config option suboption add config wizard run get model get config option if option null get model add config get frame get tree table option suboption
|
invoked when an action occurs
|
protected map get map pair pairs map props new hash map if pairs null pairs length 0 for int i 0 i pairs length i props put pairs i get first pairs i get second return props
|
helper method get child the properties and fill with the array of pairs
|
protected boolean is valid text string text if get option is mandatory return text null text length 0 get option get type is valid text else return true
|
is this text valid
|
public map get configuration data return get map box is selected boolean config option type true boolean config option type false
|
get the configuration data for the option
|
public ifeeder get feeder return feeder
|
get the currently defined feeder object
|
public void set focus box request focus
|
set the focus on this component
|
public map get configuration data return get map field get text
|
get the configuration data for the option
|
public void add queue file object file queue operation add file
|
add file object to queue
|
public void action performed action event e boolean selected jcheck box get component is selected try system out println action performed option get option get name selection boolean to string selected get option set value boolean to string selected catch mutable config value exception e1 log service get instance log error e1
|
invoked when an action occurs
|
public void set focus field request focus
|
set the focus on this component
|
private void maybe show popup mouse event e tree path sel path if e is popup trigger config option model config option model node node config option model config option model node sel path get last path component jpopup menu popup new jpopup menu if node is config option popup add new jmenu item new add config option action get model this popup add new jmenu item new add config suboption action get model this node get config option popup show e get component e get x e get y
|
show the popup menu only if the mouse was right clicked and the
|
public void display config value system out println displaying boolean value get option get value box set selected boolean config option type true equals get option get value
|
display the configuration value
|
public void display default box set selected boolean config option type true equals get option get default value
|
display the default value
|
public object get value at object node int column config option model node conode config option model node node if conode is config option config option co config option model node node get config option try switch column case 0 return co get name case 1 return conode catch security exception se return null
|
get the value as the node in the column
|
public void show centralize int x this get parent get x this get parent get width 2 int y this get parent get y this get parent get height 2 x x this get width 2 y y this get height 2 this set location x y super show
|
todo document me
|
public log service get log return log
|
get the log for this class
|
public boolean is valid return is valid text field get text
|
check to see if the configuration data is valid for the configuation
|
public config option get meta info return this option meta
|
todo document me
|
public void display config value field set text string get option get value
|
display the configured value
|
public void display default field set text get option get default value
|
display the default
|
public void file created final file change event event if log is debug enabled log log debug file created into vsfscanner event get file get name queue add queue event get file assert true unexpected create event events size 0 assert same expecting a create event create events remove 0 assert same file event get file try assert true file exists catch file system exception e fail
|
called when a file is created
|
public void add config jtree table table config option option config info config info config info get config info config info add option option this fire tree nodes inserted this new object get root new int config info get options size 1 new object get model node option table get tree set model this
|
add the configuration option to the config info object
|
public void set config options iconfig data new config options config options new config options
|
todo document me
|
public iconfig data get config options return config options
|
todo document me
|
public ijournal get journal return journal factory get journal
|
returns the journal for this journal browser model
|
public string get name return worker name
|
todo document me
|
protected void set log log service log this log log
|
set the log for this object
|
public boolean is cell editable event object e if e instanceof mouse event mouse event me mouse event e if the modifiers are not 0 or the left mouse button tree may try and toggle the selection and table will then try and toggle resulting in the selection remaining the same to avoid this we only dispatch when the modifiers are 0 or the left mouse button if me get modifiers 0 me get modifiers input event button1 mask if me get click count 2 return true return false if e null return true return false
|
this is overridden to forward the event to the tree
|
public boolean is scanning throws remote exception scanner exception scanner worker vo worker scanner get worker worker name if worker get status equals scanner worker status stopped return false return true
|
todo document me
|
public void execute command line command line journal browser run
|
execute the commandline
|
public void pause scanner throws scanner exception remote exception scanner stop worker worker name
|
todo document me
|
public string to string try scanner worker vo worker scanner get worker worker name last description worker get status to string catch exception re return last description
|
todo document me
|
public object get cell editor value return option node get config option get value
|
get the value from the configuration object for this cell
|
public void start all scanners throws scanner exception try tree node root tree node scanner tree get model get root enumeration scanners root children while scanners has more elements scanner worker node scanner scanner worker node default mutable tree node scanners next element get user object if scanner is scanning scanner resume scanner catch exception ex system err println ex
|
todo document me
|
protected void set value object scanner worker vo value object this value object value object
|
set the scanner value object
|
public void file deleted final file change event event if log is debug enabled log log debug file deleted into vsfscanner event get file get name assert true unexpected delete event events size 0 assert same expecting a delete event delete events remove 0 assert same file event get file try assert true file exists catch file system exception e fail
|
called when a file is deleted
|
public config option model node get model node object o if model nodes contains key o model nodes put o new config option model node o config option model node node config option model node model nodes get o return node
|
get the configuration model node that is defined in this
|
private void populate tree populate tree journal start journal count
|
populate the tree with the default journal record set
|
public long get last status change time return last status change time
|
get the last status change time
|
public void stop all scanners throws scanner exception try tree node root tree node scanner tree get model get root enumeration scanners root children while scanners has more elements scanner worker node scanner scanner worker node default mutable tree node scanners next element get user object if scanner is scanning scanner pause scanner catch exception ex system err println ex
|
todo document me
|
public void file changed file change event event throws exception if log is debug enabled log log debug file changed into vsfscanner event get file get name queue add queue event get file assert true unexpected changed event events size 0 assert same expecting a changed event changed events remove 0 assert same file event get file try assert true file exists catch file system exception e fail
|
called when a file is changed
|
protected void set last status change time long last status change time this last status change time last status change time
|
set the last status change time
|
public long get time started return time started
|
get the time started
|
private void set change allowed boolean allow if allow this option combo set visible false this option editor set text this txt description set text this btn file open set visible false this btn change set enabled allow this lbl option editor set enabled allow this option combo set enabled allow this option editor set enabled allow
|
todo document me
|
public object get child int i if object instanceof iconfig info collection options iconfig info object get options if options null return null else config option option config option options to array new config option 0 i return get model node option else config option config option config option object for iterator iterator config option get suboption names iterator iterator has next string name string iterator next if i 0 return get model node config option get suboption name return null
|
returns the child of code node code at index code i code
|
private void init components panel new swing feeder panel add window listener new java awt event window adapter public void window closing java awt event window event evt exit form evt get content pane add panel java awt border layout center pack
|
initialize the components
|
private void button ellipsis action performed java awt event action event evt jfile chooser fc new jfile chooser int return val fc show open dialog this if return val jfile chooser approve option file fc get selected file try field filename set text file get canonical path catch ioexception e e print stack trace to change body of catch statement use options file templates
|
handle button clicks on the ellipsis button
|
protected void set time started long time started this time started time started
|
set the time this scanner was started
|
public boolean is leaf if object instanceof iconfig info return iconfig info object get options size 0 else return config option object get number suboptions 0
|
returns true if the passed in object represents a leaf false
|
public pipeline builder panel get frame return frame
|
get the pipeline panel misnamed as get frame
|
private void setup document panel panel document set name null label filename set text document file panel document add label filename field filename set editable false field filename set preferred size new dimension 140 21 panel document add field filename button ellipsys set text button ellipsys add action listener new java awt event action listener public void action performed java awt event action event evt button ellipsis action performed evt panel document add button ellipsys layout constraint gridwidth grid bag constraints remainder gridbag set constraints panel document layout constraint add panel document
|
setup the document panel
|
public void action performed action event e dialog dispose try pipeline builder model update pipeline stage config pipeline stage info catch pipeline exception e1 log service get instance log error e1 catch config exception e2 log service get instance log error e2
|
invoked when an action occurs
|
public void action performed action event e string s null do s joption pane show input dialog get frame enter the name of the new pipeline new pipeline joption pane question message while s null s length 0 try pipeline builder model create new pipeline s simple get frame get tree add pipeline s get frame render tree catch exception x joption pane show message dialog get frame x to string exception joption pane warning message
|
handle the add pipeline action
|
public config option component get config component if config component null config component config option component factory get component this get config option null return config component
|
get the config component
|
public void action performed action event e int response joption pane show confirm dialog get frame are you sure you wish to remove this pipeline remove pipeline joption pane yes no option if response joption pane yes option try pipeline builder model delete pipeline treenode to string get frame get tree remove pipeline treenode to string catch exception x joption pane show message dialog get frame x to string exception joption pane warning message
|
remove the pipeline from the configurations
|
private void setup results panel panel results set layout new border layout panel results set border new titled border results panel results set preferred size new dimension 400 200 pane results set preferred size new dimension 400 200 j scroll pane1 set viewport view pane results panel results add j scroll pane1 border layout center layout constraint gridwidth grid bag constraints remainder layout constraint gridheight 2 layout constraint gridwidth 2 gridbag set constraints panel results layout constraint add panel results
|
set up the results pane
|
public void action performed action event e set entry stage wizard run pipeline
|
set the entry stage wizard
|
public void execute command line command line pipeline builder run as frame system out println application has finished
|
execute the commandline
|
public void set frame pipeline builder panel frame this frame frame
|
set the frame this is set from within the frame
|
public pipeline builder model get model return model
|
get the model
|
public void action performed action event e dialog dispose
|
invoked when an action occurs
|
public image icon get stage icon if stage icon null byte bytes null try bytes resource loader get resource bytes orange ball catch ioexception e log service get instance log error e stage icon new image icon bytes return stage icon
|
get non entry stage icons
|
public image icon get entry icon if entry icon null byte bytes null try bytes resource loader get resource bytes green ball catch ioexception e log service get instance log error e entry icon new image icon bytes return entry icon
|
get the entry stage icon
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.