input
stringlengths
10
828
output
stringlengths
5
107
public pipeline builder controller get controller return controller
get the controller
public default mutable tree node get currently selected node default mutable tree node parent node null tree path parent path this get selection path if parent path null parent node get pipeline root node else parent node default mutable tree node parent path get last path component return parent node
get the currently selected node
public pipeline tree get tree return tree
get the tree
public void set pipeline root node default mutable tree node pipeline root node this pipeline root node pipeline root node
set the pipeline tree root node
public void tree nodes changed tree model event e default mutable tree node node node default mutable tree node e get tree path get last path component if the event lists children then the changed node is the child of the node we ve already gotten otherwise the changed node and the specified node are the same try int index e get child indices 0 node default mutable tree node node get child at index catch null pointer exception exc system out println the user has finished editing the node system out println new value node get user object
called when tree nodes have been changed
public default mutable tree node get pipeline root node return pipeline root node
get the pipeline tree root node
public void set pipeline tree model default tree model pipeline tree model this set model pipeline tree model this pipeline tree model pipeline tree model
set the pipeline tree model for this tree component
public void setup command line options options super setup command line options log service get instance options add option option builder is required has arg true with description i18n get conversion 010 with long opt file create f options add option option builder is required has arg true with description i18n get conversion 011 with long opt config create c
setup the options on the command line
public string to string return new to string builder this append name name append column column append width width append conversion type conversion type append value value append pattern pattern append start group start group append end group end group append fields fields to string
to xml to a string
public default tree model get pipeline tree model return pipeline tree model
get the pipeline tree model
public void set field column string field column this field column field column
get the field column line para
public string get field column return field column
get the field column line para
public void set field name string field name system out println field set field name field name this field name field name
set the field name
public tree node add pipeline string pipe return add object null pipeline tree node pipeline node pipe
add a pipeline to the tree
public void set row element string row element this row element row element
set the row element
public int get conversion type if conversion get csv fields size 0 return csv conversion else if conversion get line fields size 0 return line conversion else if conversion get paragraph fields size 0 return para conversion else if conversion get line segments size 0 return lineseg conversion return 1
get the conversion type
public string get row element return row element
get the row element
public void set field number string field number this field number field number
get the field number csv
public string get field number return field number
get the field number csv
public tree node remove pipeline string pipe tree node tree node get tree node for pipeline pipe if tree node null get pipeline tree model remove node from parent mutable tree node tree node return tree node
remove a pipeline from the tree of pipelines
public void set field row string field row this field row field row
set the field row para
public string get field separator try if conversion get header get input document get field separator null return conversion get header get input document get field separator catch exception e return default csv separator
get the field separator charactor
public string get field row return field row
get the field row para
public void set conversion type string conversion type system out println input document set conversion type conversion type this conversion type conversion type
set the converserion type
public void set field width string field width this field width field width
set the field width para line
public string get field width return field width
get the field width para line
public void set field separator string field separator system out println input document set field separator field separator if field separator equals t this field separator t else this field separator field separator
set the field separator charactor csv
public int get inter paragraph skip return number utils string to int conversion get header get input document get inter skip
get the inter paragraph skip value
public void set begin group name string begin group name this begin group name begin group name
set begin group name
public input document get input document return input document
get the input document
public tree node remove pipeline stage tree node pipe node string stage if pipe node null tree node stage node get tree node for pipeline stage pipe node stage get pipeline tree model remove node from parent mutable tree node stage node return null
remove the pipeline stage node from the tree
public void set inter skip string inter skip system out println input document set inter skip inter skip this inter skip inter skip
set the interskip value
public void set output document output document output document this output document output document
set the output document
public output document get output document return output document
get the output document
public string get inter skip return inter skip
get the inter skip
public array list get csv fields return csv fields
get the csv fields
public int get left margin return number utils string to int conversion get header get input document get left margin 0
get the left margin skip
public void set left margin string left margin system out println input document set left margin left margin this left margin left margin
get the left margin skip
public void set documentation string documentation system out println documentation this documentation documentation
set the documentation
public void set header header header system out println conversion set header this header header
set the header
public void set line ending string line ending system out println input document set line ending line ending this line ending line ending
set the line ending character
public string get end group name return end group name
get end group name
public array list get line fields return line fields
get the line fields
public tree node get tree node for pipeline string pipe default mutable tree node root node default mutable tree node get pipeline tree model get root for int i 0 i root node get child count i tree node tree node root node get child at i if pipe equals tree node to string return tree node return null
get the tree node which corresponds to the pipeline name
public string get line separator try if conversion get header get input document get line ending null return conversion get header get input document get line ending catch exception e return default line separator
get the line separator character
public array list get line segments return line segments
get the line segments
public void set lines per para string lines per para system out println input document set lines per para lines per para this lines per para lines per para
set the lines per para value
public void set unmarshaller conversion unmarshaller unmarshaller this unmarshaller unmarshaller
set the unmarshaller
public void set name string name system out println name this name name
set the name
public string get lines per para return lines per para
get the lines per para value
public tree node get tree node for pipeline stage tree node pipe node string stage if pipe node null for int i 0 i pipe node get child count i tree node tree node pipe node get child at i if stage equals tree node to string return tree node return null
get the pipeline stage tree node node for the pipeline stage
public void set top skip string top skip system out println input document set top skip top skip this top skip top skip
set the top skip value
public array list get paragraph fields return paragraph fields
get the paragraph fields
public conversion unmarshaller get unmarshaller return unmarshaller
get the unmarshaller
public string get top skip return top skip
set the top skip value
public void add csv field field csv field system out println conversion add csv field this csv fields add csv field
add a csv field
protected default mutable tree node add object object child default mutable tree node parent node get currently selected node return add object parent node child true
add child to the currently selected node
public void add line field field line field system out println conversion add line field this line fields add line field
add a line field
public void convert element element string para throws conversion exception if get unmarshaller get conversion type conversion unmarshaller csv conversion convert csv element para get unmarshaller get fields else if get unmarshaller get conversion type conversion unmarshaller line conversion convert line element para get unmarshaller get fields else if get unmarshaller get conversion type conversion unmarshaller para conversion convert para element para get unmarshaller get fields else throw new conversion exception i18n get conversion 007
convert the data
public void add paragraph field field paragraph field system out println conversion add paragraph field this paragraph fields add paragraph field
add paragraph field
protected default mutable tree node add object default mutable tree node parent object child return add object parent child false
add a node to the tree
public string get root element return conversion get header get output document get root element
the root element in the output document
protected boolean do skip lines buffered reader reader int num to skip for int i 0 i num to skip i if read line reader null return false return true
skip the number of lines at the top of the file
protected void error comment element element exception e e print stack trace element add comment e to string
add an error comment right here
public void add line field field line field system out println line segment add line field this line fields add line field
add line field
public void clear get pipeline root node remove all children get pipeline tree model reload
remove all nodes except the root node
public void remove current node tree path current selection this get selection path if current selection null default mutable tree node current node default mutable tree node current selection get last path component mutable tree node parent mutable tree node current node get parent if parent null get pipeline tree model remove node from parent current node return either there was no selection or the root was selected toolkit get default toolkit beep
remove the currently selected node
public boolean is valid object value return value instanceof string
all values are valid as long as they are strings
public boolean is valid object value boolean valid false if value null this values null for int i 0 i values length i if values i equals value to string valid true break return valid
check if the given value is valid
public string get encoding if conversion get header get output document get encoding null return conversion get header get output document get encoding else return default encoding
get the encoding string
public boolean is valid object value for iterator iterator suboptions iterator has next config option config option config option iterator next if config option get type is valid value return false return true
get the validity
public boolean is valid object value return true
all values are valid
public complex config option type add config option configoption this suboptions add configoption return this
add a subconfigoption for this option
public iterator suboptions return this suboptions iterator
get an iterator to the suboptions
public boolean is valid object value try integer parse int value to string return true catch exception e return false
just try to to xml to an integer
public boolean is valid object value try return new url value to string null catch malformed urlexception e return false
try to to xml to a url
public collection get mandatory options if mandatory null mandatory new array list iterator iter get options iterator while iter has next config option option config option iter next mandatory add option return mandatory
get the mandatory options
public boolean is valid object value return true equals value false equals value
is this object valid
public boolean is complex return type instanceof complex config option type
is this complex
public config option get option string option name if options null system out println making the options get options return config option options get option name
returns option with the give name
protected string trim line string input int left margin unmarshaller get left margin if left margin 0 return input else if left margin input length return null else return input substring left margin
trim the left margin from the line
public string get config string string name string key return config service get string name key
get a string from the configuration service
public config option get option in path string pathbits if pathbits null pathbits length 0 config option config get option pathbits 0 if config null for int i 1 i pathbits length i config config get suboption pathbits i if config null return null return config return null
this will search down a path like array of path components looking for
public babeldoc module get module string a module return babeldoc module this map get a module
get the module with the name a module
private void handle non segmented element root string paragraph element row element root add element get unmarshaller get row element try convert row element paragraph catch conversion exception ce error comment row element ce
handle non segmented paragraph
public string get formatted date string format int days calendar calendar calendar get instance calendar add calendar day of month days java util date date calendar get time return new simple date format format format date
get a date number of days
public void add module babeldoc module module module initialize map put module get name module modules null set the cached list of modules to null
add the module to the list of modules
public boolean is valid for iterator iterator get options iterator iterator has next config option config option config option iterator next if config option is valid return false return true
get the validity of the configuration information and the data set on it
public boolean is default value string value return default value equals value
is this value the default value
private void load dynamic modules for enumeration i service providers babeldoc module class i has more elements babeldoc module module babeldoc module i next element system out println module found module get name add module module
load the module list using the jakarta discovery services methods
public string get line in string prompt system out println prompt try return new buffered reader new input stream reader system in read line catch exception ex log log error ex return null
get a string from system
public void execute command line command line if command line has option l list modules else if command line has option c create cache else if command line has option d delete cache else print usage
process and execute the commandline
public void set dependent on array list new dependent on dependent on new dependent on
set the depends on paramter
public void list modules babeldoc module modules babeldoc module list get instance get sorted modules if modules null for int i 0 i modules length i babeldoc module module modules i string deps get dependants as cvs module get depends on system out println i18n get core module command list output module get name deps else system out println no modules found
list the currently load modules in the system
public void setup command line options options super setup command line options options add option option builder is required false has arg false with description i18n get core module command option list create l options add option option builder is required false has arg false with description i18n get core module command option create create c options add option option builder is required false has arg false with description i18n get core module command option delete create d
setup the command line arguments
public string get number string int length char zeroval 0 string buffer buf new string buffer for int i 0 i length i int rand random next int get inc if rand 0 rand 1 rand 10 char c char rand c zeroval buf append c return buf to string
get a number of certain length
private string get dependants as cvs set dep set if dep set null string deps array new string dep set size dep set to array deps array string buffer deps new string buffer for int j 0 j deps array length j if j 0 deps append append deps array j else deps append deps array j return deps to string else return
get the set of strings as a csv string
public collection get dependent on return dependent on
return options that must exist if this option set
public object get value string path config option option get option in path path if option null return option get value else return null
get the option value in the path of options
public set get depends on return null
return the names of the those objects that this module is dependant on