Top Level Namespace

Defined Under Namespace

Modules: BPM, DAO, DB, Kernel, Mbpm_AsynchronousNode, Mbpm_SynchronousNode, Mbpm_abstractTransition, Mbpm_asynchronousDecisionNode, Mbpm_asynchronousNode, Mbpm_decision_Node, Mbpm_endNode, Mbpm_forkNode, Mbpm_joinNode, Mbpm_named_Node, Mbpm_node, Mbpm_process, Mbpm_source_Node, Mbpm_startNode, Mbpm_synchronousDecisionNode, Mbpm_synchronousNode, Mbpm_timeOutTransition, Mjava_Annotation, Mrdf_Model, Mrdf_Repository, Mrdf_Resource, Msoa_dataFilter, Mstruts_tab, Muml_Class, Muml_ClassProcess, Muml_Classifier, Muml_Component, Muml_DataType, Muml_Element, Muml_Enumeration, Muml_EnumerationLiteral, Muml_Interface, Muml_Model, Muml_MultiplicityElement, Muml_NamedElement, Muml_Namespace, Muml_Operation, Muml_Package, Muml_Parameter, Muml_Property, Muml_Stereotype, Muml_Stereotype_Create, Muml_TypedElement, Muml_UML, Muml_VisibilityKind, Mxsd_Annotation, Mxsd_Schema, Ontomde Classes: Ckb_UML_METACLASS, Ckb_UML_SLOT, Crdf_ProtegeDataModel, Crdf_Repository, Crdf_Resource, Crdfs_Class, Cstruts_tab, Cxsd_Schema, DatatypeMapping, DatatypeMappingBLOB, DatatypeMappingBoolean, DatatypeMappingCalendar, DatatypeMappingCallback, DatatypeMappingEmailAddress, DatatypeMappingFile, DatatypeMappingGRAPHVIZ, DatatypeMappingGenericClass, DatatypeMappingGenericEnum, DatatypeMappingIMG, DatatypeMappingInteger, DatatypeMappingLargeText, DatatypeMappingLong, DatatypeMappingLongObject, DatatypeMappingMimeType, DatatypeMappingOrdinal, DatatypeMappingPassword, DatatypeMappingText, DatatypeMappingTimeStamp, DatatypeMappingURL, DatatypeMappingerror, JHelper, Java_collectionMapping_Array, Java_collectionMapping_Collection_ArrayList, Java_collectionMapping_List_ArrayList, Java_collectionMapping_None, Java_collectionMapping_Set_HashSet, Java_collectionMapping_base, String, XSD_collectionMapping_Array, XSD_collectionMapping_Collection_ArrayList, XSD_collectionMapping_List_ArrayList, XSD_collectionMapping_None, XSD_collectionMapping_Set_HashSet, XSD_collectionMapping_base

Constant Summary collapse

DB_PERSISTENCE_MODULE =

this constant is defined in every db module multiple db module inclusion will trigger a warning

"ontomde-uml2_jpa"
DEFAULT_GENERATION_CHAIN =

default generation workflow used by default implemetation of #getGenerationChain Default steps: #step_initComponent, #step_load, #step_addTenant, #step_generateKb, #step_generateCustomDTO, #step_bpm, #step_generate_tests , #step_transform10 , #step_transform20, #step_transform30, #step_transform40, #step_generate_java, #step_generate_xsd, #step_generate_struts, #step_generate_crank, #step_generate_misc, #step_generate_flex, #step_clean

[
[:load , :step_load],
[:nocode, :step_removeNoCode],
[:tenant , :step_addTenant],  
[:kb , :step_generateKb],  
[:bpm , :step_bpm],
[:tests , :step_generate_tests],
[:dto1 , :step_generateCustomDTO_step1 ],
[:dto2 , :step_generateCustomDTO_step2 ],
[:mda1 , :step_transform10],
[:mda2 , :step_transform20],
[:vso	,:step_vso ],
[:initComponent, :step_initComponent],
[:mda3 , :step_transform30],
[:mda4 , :step_transform40],
[:java , :step_generate_java],
[:xsd , :step_generate_xsd],
[:jsp , :step_generate_struts],
[:crank , :step_generate_crank],
[:misc , :step_generate_misc],
[:flex , :step_generate_flex],
[:clean, :step_clean]]
OR_MAPPING =
%w[jpox,jpa]
OR_MAPPING_ALIASES =
{ "jdo" => "jpox", "jpa" => "hibernate" ,"none" => "none"}
DB_TYPE_DISCRIMINATOR =
%w[:default,:int]
DB_TYPE_DISCRIMINATOR_ALIASES =
{"int"=>:int,"default"=>:default}
ONTOMDE_DEFAULT_CONFIGURATION =

default configuration file

".ontomde-java"
STRUTS_CHECK_MESSAGE_USED =

should generator check if every message used is defined ?

true
STRUTS_MESSAGE_USED =
Set.new
STRUTS_MESSAGE_DEFINED =
Set.new

Instance Method Summary collapse

Instance Method Details

#addOptionsFromConfigurationFile(opts) ⇒ Object

open default configuration file.



55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
# File 'lib/ontomde-java/frontend/command.rb', line 55

def addOptionsFromConfigurationFile(opts)
  insertIndex=0
  [ONTOMDE_DEFAULT_CONFIGURATION, ONTOMDE_DEFAULT_CONFIGURATION+"-user"].each {|confile|
    unless(File.exists?(confile)) 
      puts "no configuration file found (#{confile})"
    else
      puts "loading configuration file (#{confile})"
      File.open(confile){ |f|
        f.each_line { |line|
          next if line =~/^[    ]*#/
          next if line =~/^[    ]*$/
          line.chop!.split(" ").each { |item|
            opts.insert(insertIndex,item)
            insertIndex+=1
          }
        }
      }
    end
  }
end

#binaryOption(opts, options, symb, help) ⇒ Object

Helper for creating a binary option



540
541
542
543
544
# File 'lib/ontomde-java/frontend/options.rb', line 540

def binaryOption(opts,options,symb,help)
  opts.on("--[no-]#{symb}", help ,%{default: --#{options[symb]?"":"no-"}#{symb}}) do |v|
    options[symb] = v
  end  
end

#bpm_writeJPDL_extensionsObject



192
193
194
195
# File 'lib/ontomde-java/jpdl/jpdl.rb', line 192

def bpm_writeJPDL_extensions
  return if context[:bpm_rawJPDL]
  write(%{     <action name="action" class="com.incomplete.action.MessageActionGenericHandler" />\n}) unless context[:bpm_rawJPDL]
end

#callStep(model, stepMethodName) ⇒ Object

Examples of stepMethodName include #step_load, #step_bpm.



43
44
45
46
# File 'lib/ontomde-java/frontend/steps.rb', line 43

def callStep(model, stepMethodName)
  cmd="#{stepMethodName}(model)"
  eval(cmd)
end

#db_addTableNameOverride(orgname, overridenname) ⇒ Object

adds a directive for replacing default table name orgname by overridenname



544
545
546
# File 'lib/ontomde-java/jpa/jpa.rb', line 544

def db_addTableNameOverride(orgname,overridenname)
  ::Muml_Class::DB_TABLE_NAME_OVERRIDE[orgname.to_s]=overridenname.to_s
end

#generateDebugLauncher(orgARGV) ⇒ Object

generate a helper ruby file for running this script from a debugger.



89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
# File 'lib/ontomde-java/frontend/command.rb', line 89

def generateDebugLauncher(orgARGV)
  initARGV="ARGV.clear\n"
  orgARGV.each { |item|  
    initARGV+="ARGV<< '"+item.gsub(/\\/,'\\\\\\\\')+"' \n"
  }
  File.open("ontomde-java-debug.rb",File::CREAT|File::TRUNC|File::RDWR, 0644) { |f| 
    f.write %{
puts "# # # Begin of debug script"

puts "# # # Move to original working directory"
Dir.chdir(File.dirname(__FILE__))

puts "# # # ARGV initialization"
#{initARGV}

if( ! ARGV.include?('--nogem'))
	puts "# # # requesting ontomde-java version #{Ontomde::Java::VERSION}"
	require 'rubygems'
	gem("ontomde-java","#{Ontomde::Java::VERSION}")
end

puts "# # #loading ontomde-java command line script"
require 'ontomde-java/frontend/command.rb'

puts "# # # running ontomde-java"
runJavaFrontEnd(__FILE__)

puts "### End of debug script"

    }
  }
end

#getDefaultOptions(options = {}) ⇒ Object

return an option array field with default values



3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
# File 'lib/ontomde-java/frontend/defaultOptions.rb', line 3

def getDefaultOptions(options={}) 
  #options = {}
  options[:dbSchemaName] = 'testschema' 
  options[:multiTenant] = false
  options[:jspUseXmdaTaglib]=true
  options[:backTrace] = false
  options[:selfTestAndExit] = false
  options[:verbose]=false

  # Path related defaults
  options[:targetDir]='.'
  options[:defaultRootDir ]='' # examples: domain or webapp
  options[:testRelativeDir]='src/test/java/'
  options[:javaRelativeDir]='src/main/java/'
  options[:flexRelativeDir]='webapp/src/main/flex/'
  options[:webResourcesDir]=options[:javaRelativeDir]
  options[:webContentRelativeDir]='./WebContent/'

  options[:flex]=false
  options[:mysql]=false
  options[:nt]=[]
  options[:load]=[]
  options[:dryRun]=false
  options[:pruneEmptyEnums]=false
  options[:withAutoImplementProperty]=false
  options[:withEnumAsString]=false
  options[:withAutoImplementOperation]=false
  options[:withMultipleInheritance]=true
  options[:withGenerateImplicitComponent]=false
  options[:generateComponent]=true
  options[:strutsActionFormPackage]="struts"
  options[:enumAssignableSubPackage]="assignable"
  options[:withEnumAssignable]=true
  options[:withGenerateMethodForm]=false
  options[:makeCompositionBiNavigable]=false
  options[:salvage]=false
  #options[:useUnzip]=false
  options[:messageCheck]=true
  options[:struts]=false
  options[:crank]=false 
  options[:ejb2]=false
  options[:security]=false
  options[:script]=false
  options[:webservice]=false
  options[:javadoc]=true
  options[:javaRefactorFile]=nil
  options[:statemachine]=false
  #options[:installRessources]=true
  options[:target_ejbconf] = nil
  options[:autoNewFileCreation]=true
  options[:javaClassRelDir]=nil
  options[:generateAntBuildFile]=false
  options[:silentlyForceUnknownDatatypeToString]=false
  options[:allowAutomaticCodeDeletion]=false
  options[:generateCompositionDiagram] = false
  options[:checkForAbstractAndInheritance]=false
  options[:generateXMLStrutsForm]=false
  options[:java_addJavaEnumInterface]=false
  options[:silentlyTruncateTableName]=false
  options[:benchmark]=false
  options[:profile]=false
  options[:logFileWrite]=false
  options[:javaFilePathRegexp]=[]
  options[:bpm_javaSubPackage]="bpm"
  options[:struts_useSpring]=true
  options[:db_useExtraTypeParameterForFindAll]=true
  options[:bpm_addPingNode]=false
  options[:jpaConfigDir] = nil

  options[:rel_mapping] = "none"
  options[:groovyExperimental]=false
  options[:inspector] = false 
  options[:inspectorAfterLoad]=false
  options[:generateDebugLauncher]=false
  options[:contextualizeStaticProperties]=false
  options[:dbTypeDiscriminator]=DB_TYPE_DISCRIMINATOR[0]
  options[:dbDiscriminatorCacheRelFile]="dbDiscriminatorCache.rb"
  options[:ddl_mode]="create"
  options[:simulateNotImplementedMethods]=false
  options[:db_useStereotypeMarker]=false
  options[:versionSignature]=nil
  #options[:db_stereotypeMarkerName]=false
  options[:enableTestData] = false
  options[:testDataRDF] = nil
  options[:testDataRDFS] = nil
  options[:updateTestDataProject] = false
  
  options[:hideJavadocReverseTag]=false
  options[:updateKB]=false
  options[:kbTargetfile]="defaultKbTargetFile"

  options[:excludeNonTestFiles]=false
  options[:includeTestFiles]=true

  options[:java_failIfNonUniqueName]=true
  options[:generateXSD]=false


  options[:rsm6WebDocURI]=""
  options[:jpdl]=[]
  options[:ntbpm]=[]
  options[:bpm]=false
  options[:skipNoReverseMarker]=false
  options[:readGlobalReverseFile]=true

  options[:derby]=false
  
  options[:globalReverseFile]=nil
  options[:hasGlobalReverse]=false
  options[:dataModel]=nil
  options[:vsoTargetFile]=nil  
  #  options[:hib_dialect]="org.hibernate.dialect.MySQL5InnoDBDialect"
  #
  #
  #   options[:hib_dialect]="org.hibernate.dialect.MySQL5InnoDBDialect"
  #   options[:hib_connection_driver_class]="com.mysql.jdbc.Driver"
  #   options[:hib_connection_url]=nil
  #   options[:hib_connection_username]="testuser"
  #   options[:hib_connection_password]="testpwd"
  #
  #   options[:hib_dialect]="org.hibernate.dialect.DerbyDialect"
  #   options[:hib_connection_driver_class]="org.apache.derby.jdbc.EmbeddedDriver"
  #   options[:hib_connection_url]="jdbc:derby:realty;create=true"
  #   options[:hib_connection_username]="testuser"
  #   options[:hib_connection_password]="testpwd"
  #
  return options
end

#getGenerationChainObject

returns generation workflow as an array of steps. a step is an array of a label and a method name.

Example:

[:load,: #step_load ],[:java,: #step_generate_java ]


36
37
38
# File 'lib/ontomde-java/frontend/steps.rb', line 36

def getGenerationChain
  return DEFAULT_GENERATION_CHAIN
end

#populateAccessControl(opts, options) ⇒ Object



224
225
226
227
228
229
230
# File 'lib/ontomde-java/frontend/options.rb', line 224

def populateAccessControl(opts,options)
  populateAddHeader(opts,"Access control enhancement options:")

  opts.on("--[no-]security",": Activate authentification and access control",%{default: --#{options[:security]?"":"no-"}security}) do |v|
    options[:security] = v
  end
end

#populateAddHeader(opts, msg) ⇒ Object



50
51
52
53
54
55
# File 'lib/ontomde-java/frontend/options.rb', line 50

def populateAddHeader(opts,msg)
  h3="## "
  opts.separator ""
  opts.separator "#{h3} #{msg}"
  opts.separator ""
end

#populateBpm(opts, options) ⇒ Object



245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
# File 'lib/ontomde-java/frontend/options.rb', line 245

def populateBpm(opts,options)
  populateAddHeader(opts,"BPM enhancement options:")

  opts.on("--[no-]bpm",": Activate bpm processing",%{default: --#{options[:bpm]?"":"no-"}bpm}) do |v|
    options[:bpm] = v
    # if bpm is set, J2EE is mandatory (spring use is deactivated)
    options[:struts_useSpring]=!v
  end
  #    opts.on("--ntBPM FILE1.nt,FILE2.nt, ...",Array,"Source BPM model(s) (exported from a BPM modeling tool in nt format)","default: --ntBPM #{options[:ntBPM]}") do |v|
  #      options[:ntBPM].concat(v)
  #    end

  opts.on("--jpdl FILE1.nt,FILE2.nt, ...",Array,": Source jpdl xml BPM model(s)","default: --jpdl #{options[:jpdl]}") do |v|
    options[:bpm]=true
    options[:jpdl].concat(v)
  end

  opts.on("--jpdlList FILE_list1,FILE_list2, ...",Array,": File containing a list of jpdl file to be loaded") do |v|
    options[:bpm]=true
    v.each { |fn|  File.open(fn) { |f| f.each_line { |line|
	  next if line.empty? || line[0]=='#'[0]
	  options[:jpdl]<<( "#{File.dirname(fn)}/#{line.chomp}" )
	}}}
  end

  opts.on("--bpm_javaSubPackage [SUBPACKAGE]",": Relative sub package where will be generated service class","(enums for transitions,...)",%{default: --bpm_javaSubPackage #{options[:bpm_javaSubPackage]}}) do |v|
    options[:bpm_javaSubPackage] = v
  end
end

#populateCrank(opts, options) ⇒ Object



274
275
276
277
278
279
280
281
282
# File 'lib/ontomde-java/frontend/options.rb', line 274

def populateCrank(opts,options)
  populateAddHeader(opts,"Crank options")
  
  opts.on("--[no-]crank","Enable crank generation.","default: --#{options[:crank]?'':'no-'}crank") do |v|
    options[:crank] = v
    options[:java_addJavaEnumInterface]=true
    #options[:db_autonomousDAO] = v    
  end
end

#populateDebug(opts, options) ⇒ Object



476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
# File 'lib/ontomde-java/frontend/options.rb', line 476

def populateDebug(opts,options)
  populateAddHeader(opts,"Debug options:")

  opts.on("--[no-]salvage",": Tries to handle highly defective model using best guess.","This feature is only intended for **quick demo** purposes.","Do not use for serious work!",%{default: --#{options[:salvage]?"":"no-"}salvage}) do |v|
    options[:salvage] = v
  end

  populateAddHeader(opts,"File creation options:")

  opts.on("--[no-]autoNewFileCreation",": Allows generator to create new file on its own","This feature should be deactivated for project under version control so no new file can be added to a project without a developper approval.","This feature should also be deactivated to help keep track of file rename and allow project refactoring",%{default: --#{options[:autoNewFileCreation]?"":"no-"}autoNewFileCreation}) do |v|
    options[:autoNewFileCreation] = v
  end

  opts.on("--[no-]allowAutomaticCodeDeletion",": Automatically ignore deleted protected code.","If disabled, generator will halt when reversed code is not reused in file newly created",%{default: --#{options[:allowAutomaticCodeDeletion]?"":"no-"}allowAutomaticCodeDeletion}) do |v|
    options[:allowAutomaticCodeDeletion] = v
  end

  opts.on("-s","--[no-]dryRun",": Do a dry run without executing actions..","No file will be changed neither created on disk",%{default: --#{options[:dryRun]?"":"no-"}dryRun}) do |v|
    options[:dryRun] = v
  end

  opts.on("-v", "--[no-]verbose", ":Run in verbose mode",%{default: --#{options[:verbose]?"":"no-"}verbose}) do |v|
    options[:verbose] = v
  end

  opts.on("-v", "--[no-]benchmark", ": Run in benchmark mode","Feature usefull for optimizing generation time",%{default: --#{options[:benchmark]?"":"no-"}benchmark}) do |v|
    options[:benchmark] = v
  end

  opts.on("-v", "--[no-]profile", ": Run in profile mode","Feature usefull for optimizing generation time",%{default: --#{options[:profile]?"":"no-"}profile}) do |v|
    options[:profile] = v
    require 'unprof' if options[:profile]
  end

  opts.on("-v", "--[no-]logFileWrite", ": Log file write access to screen",%{default: --#{options[:logFileWrite]?"":"no-"}logFileWrite}) do |v|
    options[:logFileWrite] = v
  end

  opts.on("--[no-]selfTestAndExit", ": Self test and exit.","(loads every dependencies)","(Note: used by binary generator)",%{default: --#{options[:selfTestAndExit]?"":"no-"}selfTestAndExit}) do |v|
    options[:selfTestAndExit] = v
  end

  opts.on("--[no-]backTrace", ": Display back trace on error.",%{default: --#{options[:backTrace]?"":"no-"}backTrace}) do |v|
    options[:backTrace] = v
  end
end

#populateDocumentation(opts, options) ⇒ Object



456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
# File 'lib/ontomde-java/frontend/options.rb', line 456

def populateDocumentation(opts,options)
  populateAddHeader(opts,"Report generator:")

  opts.on("--rsm6WebDocURI URL",": Base URL of RSM6 model html export","default: -- #{options[:rsm6WebDocURI]}") do |v|
    options[:rsm6WebDocURI] = v
  end

  opts.on("--[no-]hideJavadocReverseTag",": Hide javadoc reverse tag.",%{default: --#{options[:hideJavadocReverseTag]?"":"no-"}reverseJavadoc}) do |v|
    options[:hideJavadocReverseTag] = v
  end
  

  opts.on("--[no-]generateCompositionDiagram",": Generate a composition diagram (in graphviz dot file format)",%{default: --#{options[:generateCompositionDiagram]?"":"no-"}generateCompositionDiagram}) do |v|
    options[:generateCompositionDiagram] = v
  end

  opts.on("--[no-]checkForAbstractAndInheritance",": Check model for abstract class with inheriting classes. Stop generation if an invalid class is encountered.",%{default: --#{options[:checkForAbstractAndInheritance]?"":"no-"}checkForAbstractAndInheritance}) do |v|
    options[:checkForAbstractAndInheritance] = v
  end
end

#populateEJB(opts, options) ⇒ Object



379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
# File 'lib/ontomde-java/frontend/options.rb', line 379

def populateEJB(opts,options)
  populateAddHeader(opts,"EJB options:")

  opts.on("--[no-]ejb2",": Enable ejb2 experimental processing","default: --#{options[:ejb2]?'':'no-'}ejb2") do |v|
    options[:ejb2] = v
  end

  opts.on("--[no-]generateComponent",": generate UML component as Java code","default: --#{options[:generateComponent]?'':'no-'}generateComponent") do |v|
    options[:generateComponent] = v
  end

  opts.on("-t","--target_ejbconf DIRECTORY",": Destination directory for generated files","default: --target_ejbconf #{options[:target_ejbconf]}") do |v|
    options[:target_ejbconf] = v
  end
end

#populateFlex(opts, options) ⇒ Object



283
284
285
286
287
288
289
290
291
292
293
294
295
# File 'lib/ontomde-java/frontend/options.rb', line 283

def populateFlex(opts,options)
  populateAddHeader(opts,"Flex integration options:")

  opts.on("--[no-]generateXMLStrutsForm",": Add XML form serializer.","feature introduced for FLEX",%{default: --#{options[:generateXMLStrutsForm]?"":"no-"}generateXMLStrutsForm}) do |v|
    options[:generateXMLStrutsForm] = v
  end

  opts.on("--[no-]flex",": Generate flex code",%{default: --#{options[:flex]?"":"no-"}flex}) do |v|
    options[:flex] = v
    # force generateXMLStrutsForm if flex is activated
    options[:generateXMLStrutsForm] = v if v
  end
end

#populateHeader(opts, options, startupFile) ⇒ Object



57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
# File 'lib/ontomde-java/frontend/options.rb', line 57

def populateHeader(opts,options,startupFile)
  h3="## "

  opts.banner =<<ENDHELP
#{File.basename(startupFile)} is a command line utility to generate Java Code from a UML2 model stored in a UML2/RDF model file.

  This command line is a front end to OntoMDE generator offering a set of pre-packaged, yet powerfull generation rules.

  This Java code generator is full featured and covers many UML features (incremental generation, loading of additional MDA transformation rules, ...)

#{h3}Example: generate java code from one model file
  $ #{File.basename(startupFile)} --nt myUmlModel.emx.nt

#{h3}Example: generate java code in a custom directory
  $ #{File.basename(startupFile)} --nt myUmlModel.emx.nt --target ./src

#{h3}Usage:
  #{File.basename(startupFile)} [options]
ENDHELP
end

#populateHelp(opts, options) ⇒ Object



551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
# File 'lib/ontomde-java/frontend/options.rb', line 551

def populateHelp(opts,options)
  # No argument, shows at tail.  This will print an options summary.
  # Try it and see!
  opts.on_tail("-h", "--help", ": Show this message") do
    puts opts
    exit 1
  end

  opts.on_tail("--help-rdoc", ": Show help in rdoc format") do
    #x=opts.to_s.
    #Set very wide columns to disable column wrapping
    opts.summary_indent="~"*300
    opts.summary_width=999
    puts opts.to_s.
      gsub(/^##/,'==').
      gsub(/(default:)/,"\n\n<i>\\1</i>").
      gsub(/^[^a-zA-Z\n]*(-[^:\n]*:)/,"===\\1\n\n").
      gsub(/  */," ").
      gsub(/  */," ").
      gsub(/~~*/,"").
      to_s


    #gsub(/^[ \t]*-([a-zA-Z])[ \t]*\n/,'-\1 ,').
    #gsub(/^[ \t]*/,'').

    #gsub(/(^[^:\n]*--*[^\t\n ]*)/,"<b>\\1</b>").
	

    exit 1
  end
end

#populateKb(opts, options) ⇒ Object



523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
# File 'lib/ontomde-java/frontend/options.rb', line 523

def populateKb(opts,options)
  populateAddHeader(opts,"Knowledge base export options:")
  
  opts.on("--[no-]updateTestDataProject", ": update data test file specified by testDataRDFS",%{default: --#{options[:updateTestDataProject]?"":"no-"}updateTestDataProject}) do |v|
    options[:updateTestDataProject] = v
  end  
  
  opts.on("--testDataProject DATAPROJECT",": load Data from Protege/2000 RDF/RDFS DATAPROJECT (name of project without extension .pprj)") do |v|
    options[:enableTestData] = true
    options[:updateTestDataProject] =true
    options[:testDataProject] = v
    options[:testDataRDF] = v+".rdf"
    options[:testDataRDFS] = v+".rdfs"
  end
end

#populateMisc(opts, options) ⇒ Object



395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
# File 'lib/ontomde-java/frontend/options.rb', line 395

def populateMisc(opts,options)  
  populateAddHeader(opts,"Misc. options:")

  opts.on("--[no-]generateAntBuildFile",": Generates a default ant build file",%{default: --#{options[:generateAntBuildFile]?"":"no-"}generateAntBuildFile}) do |v|
    options[:generateAntBuildFile] = v
  end
  opts.on("--versionSignature version",": Adds a version signature to generated code, so old cold will not compile.","(an implemented interface is added to class and interfaces)","default: --versionSignature #{options[:versionSignature]}") do |v|
    options[:versionSignature] = v
  end

  opts.on("--[no-]skipNoReverseMarker",": Only write markers when reverse is already set to yes. Usefull to get rid of unused reverse zone and get a better code browsing experience.","default: --#{options[:skipNoReverseMarker]?'':'no-'}skipNoReverseMarker") do |v|
    options[:skipNoReverseMarker] = v
  end

  opts.on("--globalReverseFile FILE",": File containing all the tags of the reversed files") do |v|
    options[:globalReverseFile] = v
  end

  opts.on("--[no-]readGlobalReverseFile",": Read the global reverse file for protected code.",%{default: --#{options[:readGlobalReverseFile]?"":"no-"}readGlobalReverseFile}) do |v|
    options[:readGlobalReverseFile] = v
  end
  
  opts.on("--[no-]silentlyForceUnknownDatatypeToString",": Silently map an unknown datatype to String. This feature should only be used for testing.",%{default: --#{options[:silentlyForceUnknownDatatypeToString]?"":"no-"}silentlyForceUnknownDatatypeToString}) do |v|
    options[:silentlyForceUnknownDatatypeToString] = v
  end

  opts.on("--[no-]java_failIfNonUniqueName",": Stop generation immediately when a name unicitiy constraint failure is detected.",%{default: --#{options[:java_failIfNonUniqueName]?"":"no-"}java_failIfNonUniqueName}) do |v|
    options[:java_failIfNonUniqueName] = v
  end
  opts.on("--[no-]groovyExperimental",": Add experimental groovy features (alpha).",%{default: --#{options[:groovyExperimental]?"":"no-"}groovyExperimental}) do |v|
    options[:groovyExperimental] = v 
  end

  opts.on("--[no-]inspector",": start inspector web server at the end of code generation. Inspector is a web application for browsing in-memory scructure. This features is usefull for browsing meta-model structure and meta-model method calls.",%{default: --#{options[:inspector]?"":"no-"}inspector}) do |v|
    options[:inspector] = v 
  end
  
    opts.on("--[no-]inspectorAfterLoad",": start inspector web server just after loading models in memory. Inspector is a web application for browsing in-memory scructure. This features is usefull for browsing meta-model structure and meta-model method calls.",%{default: --#{options[:inspectorAfterLoad]?"":"no-"}inspectorAfterLoad}) do |v|
    options[:inspectorAfterLoad] = v 
  end

  opts.on("--[no-]generateDebugLauncher",": generates ruby script helper for launching ontomde-java from a ruby debugger. (netbeans, ruby, ...)",%{default: --#{options[:generateDebugLauncher]?"":"no-"}generateDebugLauncher}) do |v|
    options[:generateDebugLauncher] = v 
  end

  opts.on("--vsoTargetFile VSO_TARGET_FILE",": if sets, generate a file containing VmWare VSO file mapping for inclusion into VMO","default: -- #{options[:vsoTargetFile]}") do |v|
    options[:vsoTargetFile] = v
  end

  opts.on("--javaRefactorFile JAVA_REFACTOR_FILE",": if sets, generate a file containing information on what was generated. This file is designed to be easy to diff in order to know what to refactor","default: -- #{options[:javaRefactorFile]}") do |v|
    options[:javaRefactorFile] = v
  end

  opts.on("--nogem",": internal options. Used in core ontomde developer mode.") do |v|
	  # do nothing.
	  # just ignore the option
  end


end

#populateModelEnhancement(opts, options) ⇒ Object



166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
# File 'lib/ontomde-java/frontend/options.rb', line 166

def populateModelEnhancement(opts,options)
  populateAddHeader(opts,"Model enhancement options:")

  opts.on("-a","--[no-]withEnumAssignable",": Generates for each class and interfaces an enum containing assignable class","(required for creators)","NOTE: also disable generation of createAndAdd methods",%{default: --#{options[:withEnumAssignable]?"":"no-"}withEnumAssignable}) do |v|
    options[:withEnumAssignable] = v
  end
  
  opts.on("--enumAssignableSubPackage SUBDIR",": Directory where enumAssignable artefacts wil be generated",%{default: --enumAssignableSubPackage #{options[:enumAssignableSubPackage]} }) do |v|
    options[:enumAssignableSubPackage] = v
  end
  
  opts.on("-f","--[no-]withGenerateMethodForm",": Apply a pattern to generate a form (as a class) for every method of the model.","(Feature introduced for web form handling)",%{default: --#{options[:withGenerateMethodForm]?"":"no-"}withGenerateMethodForm}) do |v|
    options[:withGenerateMethodForm] = v
  end
end

#populateModelPreprocessors(opts, options) ⇒ Object



139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
# File 'lib/ontomde-java/frontend/options.rb', line 139

def populateModelPreprocessors(opts,options)
  populateAddHeader(opts,"Model pre-processors options :")
 
  opts.on("--[no-]withMultipleInheritance",": Apply pattern to map UML model with multiple inheritance to Java compliant model.","  (Class inheritance is mapped to interface implementation)",%{default: --#{options[:withMultipleInheritance]?"":"no-"}withMultipleInheritance}) do |v|
    options[:withMultipleInheritance] = v
  end

  opts.on("--[no-]statemachine",": Apply state Machine genration on State Diagram."," State Machine",%{default: --#{options[:statemachine]?"":"no-"}statemachine}) do |v|
    options[:statemachine] = v
  end

  opts.on("-p","--[no-]withAutoImplementProperty",": Generate automatically missing property in concrete class implementing an interface uml properties","  (feature introduced for model redondancy reduction)","default: --#{options[:withAutoImplementProperty]?'':'no-'}withAutoImplementProperty") do |v|
    options[:withAutoImplementProperty] = v
  end

  opts.on("-o","--[no-]withAutoImplementOperation",": Generate automatically missing operations in concrete class implementing an interface","  (feature introduced for  model redondancy reduction)","default: --#{options[:withAutoImplementOperation]?'':'no-'}withAutoImplementOperation") do |v|
    options[:withAutoImplementOperation] = v
  end

  opts.on("--[no-]makeCompositionBiNavigable",": Force compositions to be bi-navigable","(Feature introduced for web persistence handling)",%{default: --#{options[:makeCompositionBiNavigable]?"":"no-"}makeCompositionBiNavigable}) do |v|
    options[:makeCompositionBiNavigable] = v
  end

  opts.on("--[no-]contextualizeStaticProperties",": (alpha feature) Move static elements to composite owner.","This feature is used in order to have persistent static properties.",%{default: --#{options[:contextualizeStaticProperties]?"":"no-"}contextualizeStaticProperties}) do |v|
    options[:contextualizeStaticProperties] = v
  end
end

#populateOptionsFromCommandLine(startupFile, options) ⇒ Object



3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
# File 'lib/ontomde-java/frontend/options.rb', line 3

def populateOptionsFromCommandLine(startupFile,options)
  #cf: http://www.ruby-doc.org/core/classes/OptionParser.html
  
  OptionParser.new do |opts|
    populateHeader(opts,options,startupFile)
    populateSourceAndTarget(opts,options)
    populateModelPreprocessors(opts,options)
    populateModelEnhancement(opts,options)
    populatePreJava5(opts,options)
    populateTests(opts,options)
    populateAccessControl(opts,options)
    populateScripting(opts,options)
    populateWebService(opts,options)
    populateBpm(opts,options) 
    populateCrank(opts,options)
    populateFlex(opts,options)
    populatePersistence(opts,options)
    populateStruts(opts,options)
    populateEJB(opts,options)
    populateMisc(opts,options)  
    populateDocumentation(opts,options)
    populateDebug(opts,options)
    populateKb(opts,options)
    populateXSD(opts,options)
    populateSASS(opts,options)
    
    populateHelp(opts,options)
  end.parse!

  if (ARGV.length > 0) && options[:nt].nil?
    log.warn("**********************")
    log.warn("DEPRECATED SYNTAX USED")
    log.warn("For help:")
    log.warn("#{File.basename(startupFile)} --help")
    log.warn("**********************")
    options[:nt]=[]
    ARGV.each { |f| options[:nt]<< f }
    ARGV.clear
  end

  if ARGV.length > 0
    raise Exception.new("An error occured while processing command line arguments. Unparseable paramater : '#{ARGV}'")
  end
  
  return options
end

#populatePersistence(opts, options) ⇒ Object



297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
# File 'lib/ontomde-java/frontend/options.rb', line 297

def populatePersistence(opts,options)
  populateAddHeader(opts,"Database persistence options:")

  code_list = (OR_MAPPING_ALIASES.keys + OR_MAPPING).join(',')
  opts.on("-m","--relational_mapping objr", OR_MAPPING, OR_MAPPING_ALIASES, ": Select object/relation library", "  (#{code_list})","default: --relation_mapping #{options[:rel_mapping]}") do |encoding|
    options[:rel_mapping] = encoding
  end

  opts.on("--[no-]db_useStereotypeMarker",": Are persistent capable classes marked with a stereotype",%{default: --#{options[:db_useStereotypeMarker]?"":"no-"}db_useStereotypeMarker}) do |v|
    options[:db_useStereotypeMarker] = v
  end

  opts.on("--[no-]silentlyTruncateTableName",": Silently truncate generated table name to maximum sgbd allowed length.",%{default: --#{options[:silentlyTruncateTableName]?"":"no-"}silentlyTruncateTableName}) do |v|
    options[:silentlyTruncateTableName] = v
  end

  opts.on("-d","--ddl_mode [MODE]",": SGBD schema creation mode","(create/update/...)",%{default: --ddl_mode #{options[:ddl_mode]}}) do |v|
    options[:ddl_mode] = v
  end

  opts.on("--dbSchemaName [SCHEMA_NAME]",": Name of the schema used in configuration files",%{default: --dbSchemaName #{options[:dbSchemaName]}}) do |v|
    options[:dbSchemaName] = v
  end

  opts.on("-s","--[no-]simulateNotImplementedMethods",": Replace unimplemeted method with a simulation method.",%{default: --#{options[:simulateNotImplementedMethods]?"":"no-"}simulateNotImplementedMethods}) do |v|
    options[:simulateNotImplementedMethods] = v
  end

  opts.on("-s","--[no-]java_addSuggester",": Add or remove the suggester method.",%{default: --#{options[:java_addSuggester]?"":"no-"}java_addSuggester}) do |v|
    options[:java_addSuggester] = v
  end


  code_list2 = (DB_TYPE_DISCRIMINATOR_ALIASES.keys + DB_TYPE_DISCRIMINATOR).join(',')
  opts.on("--dbTypeDiscriminator [objr]", DB_TYPE_DISCRIMINATOR, DB_TYPE_DISCRIMINATOR_ALIASES, ": Column type used to store an object type in database.", "  (#{code_list2})","default: --dbTypeDiscriminator #{options[:dbTypeDiscriminator]}") do |encoding|
    options[:dbTypeDiscriminator] = encoding
  end

  opts.on("--dbDiscriminatorCacheRelFile [RBFILE]",": File where db discriminator will be saved","to allow subsquent generation to use the same ids","NOTE: generated file will not be used, unless specified using --load option",%{default: --dbDiscriminatorCacheRelFile #{options[:dbDiscriminatorCacheRelFile]}}) do |v|
    options[:dbDiscriminatorCacheRelFile] = v
  end

  opts.on("--[no-]mysql",": Optimize for mysql.",%{default: --#{options[:mysql]?"":"no-"}mysql}) do |v|
    options[:mysql] = v
  end
  opts.on("--[no-]derby",": Optimize for derby.",%{default: --#{options[:derby]?"":"no-"}derby}) do |v|
    options[:derby] = v
  end
  opts.on("--jpaConfigDir JPA_CONFIG_DIR",": Directory for the persistence.xml") do |v|
    options[:jpaConfigDir] = v
  end
end

#populatePreJava5(opts, options) ⇒ Object



182
183
184
185
186
187
188
# File 'lib/ontomde-java/frontend/options.rb', line 182

def populatePreJava5(opts,options)
  populateAddHeader(opts,"Pre-Java 5 compatibility options:")
  
  opts.on("-e","--[no-]withEnumAsString",": Generate additional string getter and setter","for properties with an enum type, so enums property can be manipulated as if it was a string","  (feature introduced","  for Flex interoperability)","default: --#{options[:withEnumAsString]?'':'no-'}withEnumAsString") do |v|
    options[:withEnumAsString] = v
  end
end

#populateSASS(opts, options) ⇒ Object



190
191
192
193
194
195
196
197
# File 'lib/ontomde-java/frontend/options.rb', line 190

def populateSASS(opts,options)
    populateAddHeader(opts,"Software As A Service (SaaS) options:")
    
    opts.on("--[no-]multiTenant",": enable multi-tenant mode which allows shared hosting of an application for multiple tenants.","default: --#{options[:multiTenant]?'':'no-'}multiTenant") do |v|
    options[:multiTenant] = v
  end
  
end

#populateScripting(opts, options) ⇒ Object



231
232
233
234
235
236
237
# File 'lib/ontomde-java/frontend/options.rb', line 231

def populateScripting(opts,options)
  populateAddHeader(opts,"Runtime scripting options:")
    
  opts.on("--[no-]script",": Activate script engine",%{default: --#{options[:script]?"":"no-"}script}) do |v|
    options[:script] = v
  end
end

#populateSourceAndTarget(opts, options) ⇒ Object



78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
# File 'lib/ontomde-java/frontend/options.rb', line 78

def populateSourceAndTarget(opts,options)
  populateAddHeader(opts,"Source and Target options :")

  opts.on("--nt FILE1.nt,FILE2.nt, ...",Array,": Source UML2 model(s) (exported from a UML case tool)","default: --nt #{options[:nt]}") do |v|
    options[:nt].concat(v)
  end
  opts.separator ""

  opts.on("--ntList FILE1,FILE2,...",Array,": File containing a list of nt file to be loaded") do |v|
    v.each { |fn|  File.open(fn) { |f| f.each_line { |line|
	  next if line.empty? || line[0]=='#'[0]
	  options[:nt]<<( "#{File.dirname(fn)}/#{line.chomp}" )
	}}}
  end

  opts.on("-l","--load FILE1.rb,File2.rb",Array,": Optionnal ruby extension or setup file (used as well new datatype declaration mappings, as for any generation customisation)","default: --load #{options[:load]}" ) do |v|
    options[:load].concat(v)
  end

  opts.on("-l","--loadDir DIRECTORY1,..",Array,": Optionnal ruby extension or setup file","(used as well new datatype declaration mappings, as for any generation customisation)","default: --loadDir " ) do |v|
    v.each { |d|
      Dir.foreach(d) { |f|
	next unless f =~ /\.rb$/
	puts "f=#{f}"
	options[:load]<<("#{d}/#{f}")
      }
    }
  end

  opts.on("--loadList FILE_list1,FILE_list2, ...",Array,": File containing a list of ruby file to be loaded","(same as --load on each item)") do |v|
    v.each { |fn|  File.open(fn) { |f| f.each_line { |line|
	  next if line.empty? || line[0]=='#'[0]
	  options[:load]<<( "#{File.dirname(fn)}/#{line.chomp}" )
	}}}
  end

  opts.on("--javaRelativeDir DIRECTORY",": Relative destination directory for generated java files, properties, ...","relative to --targetDir","default: --javaRelativeDir #{options[:javaRelativeDir]}") do |v|
    options[:javaRelativeDir] = v
  end

  opts.on("--defaultRootDir ROOT_DIR_NAME",": Default root dir used for package without a root dir (a package stereotyped root). (examples: webapp, domain, ...)","default: --defaultRootDir #{options[:defaultRootDir]}") do |v|
    options[:defaultRootDir] = v
  end



  opts.on("--webResourcesDir DIRECTORY",": Relative destination directory for generated Web Resources properties, ...","relative to --targetDir","default: --webResourcesDir #{options[:webResourcesDir]}") do |v|
    options[:webResourcesDir] = v
  end

  opts.on("--javaFilePathRegexp REGEXP@DIRECTORY",": Relative destination directory for generated java files, properties, ...","relative to --targetDir","default: --javaFilePathRegexp #{options[:javaFilePathRegexp]}") do |v|
    re=Regexp.new(v.split('@')[0])
    p=v.split('@')[1]
    options[:javaFilePathRegexp]<<([re,p])
  end

  opts.on("--targetDir DIRECTORY",": Target generation root directory","default: --targetDir #{options[:targetDir]}") do |v|
    options[:targetDir] = v
  end
end

#populateStruts(opts, options) ⇒ Object



350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
# File 'lib/ontomde-java/frontend/options.rb', line 350

def populateStruts(opts,options)
  populateAddHeader(opts,"Struts Webapp options:")

  opts.on("--[no-]struts",": Enable struts generation.","default: --#{options[:struts]?'':'no-'}struts") do |v|
    options[:struts] = v
    options[:java_addJavaEnumInterface]=true
  end

  opts.on("--[no-]java_addJavaEnumInterface",": Add Enum Interface.","default: --#{options[:java_addJavaEnumInterface]?'':'no-'}java_addJavaEnumInterface") do |v|
    options[:java_addJavaEnumInterface] = v
  end
  opts.on("-u","--[no-]useUnzip",": Use unzip to install resources.","default: --#{options[:useUnzip]?'':'no-'}useUnzip") do |v|
	  puts "#WARNING --useUnzip option deprecated. Please remove from your setup file"
    #options[:useUnzip] = v
  end

  opts.on("-c","--[no-]message-check",": Check message ressources consistency.","default: --#{options[:messageCheck]?'':'no-'}message-check") do |v|
    options[:messageCheck] = v
  end

  opts.on("--webContentRelativeDir [DIRECTORY]",": Directory where webapp artefacts wil be generated (WEB-INF, META-INF, JSP, ...)",%{default: --webContentRelativeDir #{options[:webContentRelativeDir]}}) do |v|
    options[:webContentRelativeDir] = v
  end

  opts.on("--strutsActionFormPackage [SUBPACKAGE]",": SubPackage where to generate struts related classes",%{default: --strutsActionFormPackage #{options[:strutsActionFormPackage]}}) do |v|
    options[:strutsActionFormPackage] = v
  end
end

#populateTests(opts, options) ⇒ Object



198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
# File 'lib/ontomde-java/frontend/options.rb', line 198

def populateTests(opts,options)
  populateAddHeader(opts,"Tests Data options:")
    
  #  opts.on("--updateKB",": Create or update protege 2000 knowledge base project (for creating tests data and junit tests bases on use cases.)","default: --#{options[:updateKB]?'':'no-'}updateKB") do |v|
  #    options[:updateKB] = v
  #  end
    
  #  opts.on("--kbTargetfile FILENAME  _WITHOUT_EXTENSION",": Protege data test file to be generated or update.","This generates a protege/2000 project file to be used for editing tests data attached to test instances.","default: --kbTargetfile #{options[:kbTargetfile]}") do |v|
  #    options[:kbTargetfile] = v
  #  end
    

  opts.on("--[no-]excludeNonTestFiles",": Do not generate files which are not test files","junit,data,...","default: --#{options[:excludeNonTestFiles]?'':'no-'}excludeNonTestFiles") do |v|
    options[:excludeNonTestFiles] = v
  end

  opts.on("--[no-]includeTestFiles",": Include test files in generation","junit,data,...","default: --#{options[:includeTestFiles]?'':'no-'}includeTestFiles") do |v|
    options[:includeTestFiles] = v
  end

  #    opts.on("--[no-]enableTestData","enable data tests options",%{default: --#{options[:enableTestData]?"":"no-"}enableTestData}) do |v|
  #      options[:enableData] = v
  #    end


end

#populateWebService(opts, options) ⇒ Object



238
239
240
241
242
243
244
# File 'lib/ontomde-java/frontend/options.rb', line 238

def populateWebService(opts,options)
  populateAddHeader(opts,"WebService options:")
    
  opts.on("--[no-]webservice",": Activate Web Service",%{default: --#{options[:webservice]?"":"no-"}webservice}) do |v|
    options[:webservice] = v
  end
end

#populateXSD(opts, options) ⇒ Object



546
547
548
549
# File 'lib/ontomde-java/frontend/options.rb', line 546

def populateXSD(opts,options)
  populateAddHeader(opts,"XML schema export options:")
  binaryOption(opts,options,:generateXSD,": generate XSD schema files")
end

#removeVersionInARGVObject

Rubygems allow a specific script version to be passed on command line. Version is passed as a first parameter like : 1.0.1

For testing purposes, this script may be called directly (not through gem). We have to remove the version number which was not removed by gem.



81
82
83
84
85
86
# File 'lib/ontomde-java/frontend/command.rb', line 81

def  removeVersionInARGV  
  return if ARGV.empty?
  return unless ARGV[0]=~/^_[.0-9]*_$/
  puts "** WARNING: command line parameter #{ARGV[0]} ignored.\n"
  ARGV.delete_at(0)
end

#runJavaFrontEnd(startupFile) ⇒ Object

run java generator command line front end startupFile is the name of the calling script.

cf: #getDefaultOptions, #populateOptionsFromCommandLine, #getGenerationChain



128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
# File 'lib/ontomde-java/frontend/command.rb', line 128

def runJavaFrontEnd(startupFile)
  puts "Starting ontomde v. #{Ontomde::Java::VERSION}"

  removeVersionInARGV() 
  orgARGV=ARGV.clone
  addOptionsFromConfigurationFile(ARGV)
  options=getDefaultOptions()
  populateOptionsFromCommandLine(startupFile,options)
  generateDebugLauncher(orgARGV) if[:generateDebugLauncher]
  


  begin # of the rescue section
    if options[:selfTestAndExit ]
      # load every depencies
      # used by rubyscript2exe to automatically populate
      # en inventory of used dependencies
      Kernel::DEPS.each { |deps|
	require deps
      }
      exit 0
    end

    if options[:bpm]
      require_deps 'ontomde-uml2-jpdl'
    end

    if options[:inspector] || options[:inspectorAfterLoad]
      puts "dameon"
      require_deps 'ontomde-core/inspector'
    end
    
    if options[:struts] #||options[:useUnzip] || options[:messageCheck]
      options[:withGenerateMethodForm]=true
      require_deps 'ontomde-java/struts'
    else
      #options[:installRessources]=false
      options[:messageCheck]=false
      #options[:useUnzip]=false
    end

    if options[:crank] #||options[:useUnzip] || options[:messageCheck] 
      require_deps 'ontomde-java/crank'
    end

    if options[:testDataRDFS].nil? && options[:testDataRDF]=~/\.rdf$/
      #guess rdfs file name
      options[:testDataRDFS]=options[:testDataRDF].gsub(/\.rdf$/,'.rdfs')
    end

    if options[:ejb2]
      require_deps 'ontomde-uml2-ejb2'
    end

    if options[:rel_mapping]=='jpox'
      require_deps 'ontomde-uml2-jdo'
    elsif options[:rel_mapping]=='hibernate'
      require_deps 'ontomde-java/jpa'
    elsif options[:rel_mapping]=='none'
      # nop
    else
      m="unknown object/relational mapping library (#{options[:rel_mapping]})"
      log.error(m)
      raise Exception.new(m)
    end

    if options[:flex]
      require_deps 'ontomde-uml2-flex'
    end

    if options[:enableTestData]
      puts "ENABLED testDATA" if options[:verbose]
      require_deps 'ontomde-uml2/kb'
      require_deps 'ontomde-java/kbjava'
    end
    options[:db]=(options[:rel_mapping] != "none")
    #options[:javaDir]=options[:targetDir]+"/"+options[:javaRelativeDir]
    options[:flexDir]=options[:targetDir]+"/"+options[:flexRelativeDir]

    if !options[:jpaConfigDir].nil?
      options[:jpaConfigDir]=options[:targetDir]+"/"+options[:jpaConfigDir]
    end
    options[:webResourcesDir]=options[:targetDir]+"/"+options[:webResourcesDir]
    options[:webContentDir]=options[:targetDir]+"/"+options[:webContentRelativeDir]
    options[:load].each { |f|
      puts "INFO : Loading custom transformation from #{f} in #{FileUtils.pwd}" if options[:verbose]
      begin
	# if require is used add "./" to avoid
	# file not found from binary generated with rubyscript2exe
	require "./#{f}"
      rescue Exception => e
	log.error %{
*************** ERROR ***************
** Error processing
** --load #{f}
** (pwd=#{FileUtils.pwd})
** Exception:
** #{e}
*************** ERROR ***************

	}
	raise e

      end
    }

    
    if !options[:globalReverseFile].nil?
      options[:hasGlobalReverse]=true
    end
    
    options[:startupFile]=startupFile # used by inspectAfterLoad

    model=Crdf_Repository.new
    model.mtk_context(options) {

      




      if model.context[:benchmark]
	require 'benchmark'
	include Benchmark

	labels=[]
	getGenerationChain.each{ |step|
	  puts "step : #{step[0]}"
	  labels<<step[0]
	}
	Benchmark.benchmark("        " + CAPTION, labels.length, FMTSTR, *(labels+[">total",">avg"])) do |x|
	  duration={}
	  totalDuration=0
	  getGenerationChain.each { |step| 
	    label=step[0]
	    methodName=step[1]
	    duration[label]=x.report(label) { 
	      callStep(model,methodName)
	    }
	    totalDuration+=duration[label]
	  }
	  puts "***************************************************"
	  puts "             user     system      total        real"
	  return duration+[totalDuration,totalDuration/labels.length]
	end
      else
	getGenerationChain.each{ |step|
	  label=step[0]
	  methodName=step[1]
	  callStep(model,methodName)
	}
      end
      
      model.inspector_start_daemon(startupFile) if options[:inspector]
      
    }
  rescue Exception => e
    if options[:backTrace]
      raise e
    else
      puts "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"
      puts e
      puts "use --backTrace to display full backtrace"
      puts "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"
      exit(1)
    end
  rescue => e
    if options[:backTrace]
      raise e
    else
      puts "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"
      puts e
      puts "use --backTrace to display full backtrace"
      puts "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"
      exit(1)
    end
  rescue RuntimeError => e
    if options[:backTrace]
      raise e
    else
      puts "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"
      puts e
      puts "use --backTrace to display full backtrace"
      puts "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"
      exit(1)
    end
  end

end

#say(x) ⇒ Object



319
320
321
322
# File 'lib/ontomde-java/frontend/command.rb', line 319

def say(x)
  #puts("# #{File.basename(startupFile)}: #{x}")
  puts "  :#{x}"
end

#step_addTenant(model) ⇒ Object

add tenant information to model



77
78
79
80
81
82
83
# File 'lib/ontomde-java/frontend/steps.rb', line 77

def step_addTenant(model)
  return unless model.context[:multiTenant]
  puts "adding tenants"
  model.java_addTenantClass!
  model.java_addTenantFields!
  #tenant is added before generateKb to be available in kb.
end

#step_bpm(model) ⇒ Object

Process bpm enhancement.



125
126
127
128
129
130
131
132
# File 'lib/ontomde-java/frontend/steps.rb', line 125

def step_bpm(model)
  return unless model.context[:bpm]
  say "processing bpm"
  model.bpm_addPingNode!
  model.bpm_handleProcessMethods!
  model.bpm_transform!
  #model.bpm_graphGen_dot
end

#step_clean(model) ⇒ Object

cleanup temporary files



317
318
319
# File 'lib/ontomde-java/frontend/steps.rb', line 317

def step_clean(model)
  mtk_deleteTempFiles
end

#step_generate_crank(model) ⇒ Object



297
298
299
300
301
302
303
304
305
# File 'lib/ontomde-java/frontend/steps.rb', line 297

def step_generate_crank(model)
  return if model.context[:excludeNonTestFiles]
  if(model.context[:crank])
    model.crank_generate_facesconfig
    model.crank_generate_facelets
    model.crank_generate_home
    
  end
end

#step_generate_flex(model) ⇒ Object

generate flex artefacts



285
286
287
288
289
290
291
292
293
294
295
# File 'lib/ontomde-java/frontend/steps.rb', line 285

def step_generate_flex(model)
  return unless model.context[:flex]
  say "processing flex"
  model.mtk_context(:javaDir => "#{model.context[:flexDir]}/src/", :javaFilePathRegexp => nil) {
    model.flex_generateVO
    model.flex_generateMXML
  }
  model.mtk_context(:javaDir => "#{model.context[:flexDir]}/script/", :javaFilePathRegexp => nil) {
    model.flex_generateImportationAS
  }
end

#step_generate_java(model) ⇒ Object

write java files to disk



224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
# File 'lib/ontomde-java/frontend/steps.rb', line 224

def step_generate_java(model)
  if model.context[:hasGlobalReverse]
    say "Reversing java files"
    model.java_addJavaAnnotationOntoMDE!
    
    model.context[:reverseGlobalMap]={}
    model.context[:reversedFiles]=[]
    model.context[:requireReverseExtensions]=[]
    if model.context[:readGlobalReverseFile]
      if !(model.mtk_retrieveProtected(model.context[:globalReverseFile],FileTypeJava.instance))
        raise Warning.new,"#{model.context[:globalReverseFile]} doesn't exist. Add --no-readGlobalReverseFile option if it's normal."
      end
    end
  end
  say "Generating/Updating java files"
  model.java_generateRepository

  if !model.context[:javaRefactorFile,nil].nil?
    say "Generating helper file javaRefactorFile"
    model.java_generateRefactorFile
    end

end

#step_generate_misc(model) ⇒ Object

generate misc. artefacts



274
275
276
277
278
279
280
281
282
# File 'lib/ontomde-java/frontend/steps.rb', line 274

def step_generate_misc(model)
  return if model.context[:excludeNonTestFiles]
  say "processing misc."
  model.db_saveDB_DISCRIMINATOR if model.context[:db]
  model.db_generateConfiguration if model.context[:db]
  model.java_generateAntBuildFile
  model.java_generatePackageDoc

end

#step_generate_struts(model) ⇒ Object

write struts files to disk



256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
# File 'lib/ontomde-java/frontend/steps.rb', line 256

def step_generate_struts(model)
  return if model.context[:excludeNonTestFiles]
  if(model.context[:struts])
    say "processing struts"
    model.struts_generate_webxml
    model.struts_struts_config_generate
    model.struts_validator_generate
    model.struts_validation_generate
    model.struts_copyReloadDefinitionsActionClass

    model.struts_index_generate
    model.struts_edit_generate
    model.struts_messageResources_generate
    model.struts_generateSpringApplicationContext
  end
end

#step_generate_tests(model) ⇒ Object

process tests loaded from protege/2000 and generate test artefacts.



212
213
214
215
216
217
218
219
220
221
# File 'lib/ontomde-java/frontend/steps.rb', line 212

def step_generate_tests(model)
  if(model.context[:enableTestData])
    say "processing tests"
    data_model=model[:dataModel]
    data_model.kbjava_generateJavaJunit!
    data_model.mtk_context(:build=>%{#{model.context[:testRelativeDir]}}) {
      data_model.kbjava_generate
    }
  end
end

#step_generate_xsd(model) ⇒ Object

write java files to disk



248
249
250
251
252
253
# File 'lib/ontomde-java/frontend/steps.rb', line 248

def step_generate_xsd(model)
  return unless model.context[:generateXSD]
  say "processing xsd"
  model.xsd_generateSchemaElements!
  model.xsd_generate_all
end

#step_generateCustomDTO_step1(model) ⇒ Object

generate custom DTO based on business objects and setup from protege.



136
137
138
# File 'lib/ontomde-java/frontend/steps.rb', line 136

def step_generateCustomDTO_step1(model)
  model.dto_generateCustomDTO_step1()
end

#step_generateCustomDTO_step2(model) ⇒ Object



140
141
142
# File 'lib/ontomde-java/frontend/steps.rb', line 140

def step_generateCustomDTO_step2(model)
  model.dto_generateCustomDTO_step2()
end

#step_generateKb(model) ⇒ Object

Generate protege 2000 knowlege base



86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
# File 'lib/ontomde-java/frontend/steps.rb', line 86

def step_generateKb(model) 
  
  # Pre-generation  
  #model.umlx_autoImplementProperty! if model.context[:withAutoImplementProperty]
  #model.umlx_autoImplementOperation! if model.context[:withAutoImplementOperation]
  
  if model.context[:updateTestDataProject]
    say "generating KB project and schema"
    model.generateRDFS(model.context[:testDataProject])
  end
  
  if model.context[:enableTestData] || model.context[:webservice]
    say "loading KB project data"
    ignoreheader=true
    data_model=Crdf_ProtegeDataModel.new
    begin 
	    failOnWarn=true
    data_model.loadMetaModelFromFile(model.context[:testDataRDFS],ignoreheader,failOnWarn)
      #data_model.loadFail_on_warn=true
      data_model.loadModelFromFile(model.context[:testDataRDF],ignoreheader,failOnWarn)
    rescue Exception => z
	    puts <<END 

* PLEASE READ: An error occured while reading tests data.
* PLEASE READ: This is most likely caused by tests data out of sync
* PLEASE READ: with model due to a change in source model.
* PLEASE READ: You should open test project with Protege/2000
* PLEASE READ: (.pprj file associated to: #{model.context[:testDataRDFS]})
* PLEASE READ: remove offending data, save and rerun generation.

END
	    raise z
    end
    data_model.kbjava_umlSourceModel = model
    model[:dataModel]=data_model
  end
end

#step_initComponent(model) ⇒ Object



311
312
313
314
# File 'lib/ontomde-java/frontend/steps.rb', line 311

def step_initComponent(model)
  model.java_autoGenerateCrudComponents! if model.context[:webservice]
  model.umlx_autoCreateImplicitComponent! if model.context[:withGenerateImplicitComponent]
end

#step_load(model) ⇒ Object

load meta-model(s) and model(s)



50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
# File 'lib/ontomde-java/frontend/steps.rb', line 50

def step_load(model)
  if model.context[:bpm]
    say "loading bpm meta-model"
    model.bpm_loadBPM
  end
  say "loading UML2 meta-model"
  model.loadUml2
  i=0
  model.context[:nt].each { |f|
    i=i+1
    say "loading uml data from '#{f}'" if model.context[:verbose]
    model.loadModelFromFile(f)
  }
  
  model.umlx_processUnrootedElements! # required for EA incremental loading
  model.umlx_processShortcuts!

  model.context[:jpdl].each { |f|
    i=i+1
    say "loading bpm data from'#{f}'" if model.context[:verbose]
    model.bpm_loadJPDL(f)
  }
  say "# Loaded #{i} model(s)." if model.context[:verbose]
  model.inspector_start_daemon(model.context[:startupFile]) if model.context[:inspectorAfterLoad]
end

#step_removeNoCode(model) ⇒ Object



307
308
309
# File 'lib/ontomde-java/frontend/steps.rb', line 307

def  step_removeNoCode(model)
	model.umlx_removeNoCode!()
end

#step_transform10(model) ⇒ Object

Enhance UML model



145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
# File 'lib/ontomde-java/frontend/steps.rb', line 145

def step_transform10(model)
  say "processing UML model structure"
  model.umlx_tryToSalvageErrors!
  model.struts_createDataTypeHelpers! if model.context[:struts]

  model.java_addJavaEnumInterface!
  model.umlx_makeCompositionNavigable!
  model.java_contextualizeStaticProperties! if model.context[:contextualizeStaticProperties]
  model.umlx_mapMultipleInheritanceToInterface! if model.context[:withMultipleInheritance]

  model.umlx_checkAbstractAndInheritance

  model.umlx_generateCompositonDotDiagram
  if model.context[:ejb2]
    model.ejb2_transform!
  end
  #Should be placed before autoImplementoperation: otherwise autoImplementedMethod are not considered as business method
  model.umlx_MarkAllAsbusinessMethod!
  
  model.java_addEnumAssignable! if model.context[:withEnumAssignable]
  model.umlx_autoImplementProperty! if model.context[:withAutoImplementProperty]
  model.umlx_autoImplementOperation! if model.context[:withAutoImplementOperation]
  
  
  model.java_processComponents! if model.context[:webservice]

  model.java_addGroovyImplementations! if model.context[:groovyExperimental]
  model.java_addStateMachine! if model.context[:statemachine]
  
  model.struts_addAllOperationAggregateParameterClass!
  model.java_addEnumCompatibilityLayerProperties! if model.context[:withEnumAsString]
  model.db_addDAO! if model.context[:db]
  model.java_transform!
end

#step_transform20(model) ⇒ Object



179
180
181
182
183
184
185
186
187
188
189
190
191
# File 'lib/ontomde-java/frontend/steps.rb', line 179

def step_transform20(model)
  
  

  model.db_addPersistence! if model.context[:db]

  model.struts_addActionLocaleForm! if model.context[:struts]
  model.struts_addPerClassElement! if model.context[:struts]

  model.db_addTestImplementations! if model.context[:simulateNotImplementedMethods]
  # model.struts_installRessources if model.context[:installRessources ]
  model.struts_getFunctionalException if model.context[:struts]
end

#step_transform30(model) ⇒ Object



192
193
194
195
196
197
198
199
200
201
202
# File 'lib/ontomde-java/frontend/steps.rb', line 192

def step_transform30(model)
  model.struts_getExceptionHandlerClass if model.context[:struts]
  model.uml_addVersionSignature

  if model.context[:crank]
    model.crank_generate_context
    model.crank_generate_validation
  end
  model.umlx_populateSecuredMethodEnumeration if model.context[:security]
  model.umlx_populateScriptedMethodEnumeration if model.context[:script]
end

#step_transform40(model) ⇒ Object



203
204
205
206
207
208
209
# File 'lib/ontomde-java/frontend/steps.rb', line 203

def step_transform40(model)
  model.umlx_populateSecuredPropertyEnumeration if model.context[:security]
  model.umlx_processSecuredElements if model.context[:security]
  
  model.umlx_processScriptedElements if model.context[:script]
  model.umlx_pruneEmptyEnums! if model.context[:pruneEmptyEnums]
end

#step_vso(model) ⇒ Object



321
322
323
# File 'lib/ontomde-java/frontend/steps.rb', line 321

def step_vso(model)
  model.vso_generateMapping
end

#struts_getTimeZoneSelectObject



91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
# File 'lib/ontomde-java/struts/localeAction.rb', line 91

def struts_getTimeZoneSelect
  return <<ENDSELECT
<html:select property="#{::Muml_Classifier::STRUTS_SETTIMEZONE_FIELD}" onchange="#{::Muml_Class::STRUTS_SETTIMEZONE_ACTION}(options[selectedIndex].value)" >
	<html:option value="US/Alaska">US/Alaska</html:option>
	<html:option value="US/Aleutian">US/Aleutian</html:option>
	<html:option value="US/Arizona">US/Arizona</html:option>
	<html:option value="US/Central">US/Central</html:option>
	<html:option value="US/Eastern">US/Eastern</html:option>
	<html:option value="US/East-Indiana">US/East-Indiana</html:option>
	<html:option value="US/Hawaii">US/Hawaii</html:option>
	<html:option value="US/Indiana-Starke">US/Indiana-Starke</html:option>

	<html:option value="US/Michigan">US/Michigan</html:option>
	<html:option value="US/Mountain">US/Mountain</html:option>
	<html:option value="US/Pacific">US/Pacific</html:option>
	<html:option value="US/Samoa">US/Samoa</html:option>
	<html:option value="Africa/Abidjan">Africa/Abidjan</html:option>
	<html:option value="Africa/Accra">Africa/Accra</html:option>

	<html:option value="Africa/Addis_Ababa">Africa/Addis_Ababa</html:option>
	<html:option value="Africa/Algiers">Africa/Algiers</html:option>
	<html:option value="Africa/Asmera">Africa/Asmera</html:option>
	<html:option value="Africa/Bamako">Africa/Bamako</html:option>
	<html:option value="Africa/Bangui">Africa/Bangui</html:option>
	<html:option value="Africa/Banjul">Africa/Banjul</html:option>

	<html:option value="Africa/Bissau">Africa/Bissau</html:option>
	<html:option value="Africa/Blantyre">Africa/Blantyre</html:option>
	<html:option value="Africa/Brazzaville">Africa/Brazzaville</html:option>
	<html:option value="Africa/Bujumbura">Africa/Bujumbura</html:option>
	<html:option value="Africa/Cairo">Africa/Cairo</html:option>
	<html:option value="Africa/Casablanca">Africa/Casablanca</html:option>

	<html:option value="Africa/Ceuta">Africa/Ceuta</html:option>
	<html:option value="Africa/Conakry">Africa/Conakry</html:option>
	<html:option value="Africa/Dakar">Africa/Dakar</html:option>
	<html:option value="Africa/Dar_es_Salaam">Africa/Dar_es_Salaam</html:option>
	<html:option value="Africa/Djibouti">Africa/Djibouti</html:option>
	<html:option value="Africa/Douala">Africa/Douala</html:option>

	<html:option value="Africa/El_Aaiun">Africa/El_Aaiun</html:option>
	<html:option value="Africa/Freetown">Africa/Freetown</html:option>
	<html:option value="Africa/Gaborone">Africa/Gaborone</html:option>
	<html:option value="Africa/Harare">Africa/Harare</html:option>
	<html:option value="Africa/Johannesburg">Africa/Johannesburg</html:option>
	<html:option value="Africa/Kampala">Africa/Kampala</html:option>

	<html:option value="Africa/Khartoum">Africa/Khartoum</html:option>
	<html:option value="Africa/Kigali">Africa/Kigali</html:option>
	<html:option value="Africa/Kinshasa">Africa/Kinshasa</html:option>
	<html:option value="Africa/Lagos">Africa/Lagos</html:option>
	<html:option value="Africa/Libreville">Africa/Libreville</html:option>
	<html:option value="Africa/Lome">Africa/Lome</html:option>

	<html:option value="Africa/Luanda">Africa/Luanda</html:option>
	<html:option value="Africa/Lubumbashi">Africa/Lubumbashi</html:option>
	<html:option value="Africa/Lusaka">Africa/Lusaka</html:option>
	<html:option value="Africa/Malabo">Africa/Malabo</html:option>
	<html:option value="Africa/Maputo">Africa/Maputo</html:option>
	<html:option value="Africa/Maseru">Africa/Maseru</html:option>

	<html:option value="Africa/Mbabane">Africa/Mbabane</html:option>
	<html:option value="Africa/Mogadishu">Africa/Mogadishu</html:option>
	<html:option value="Africa/Monrovia">Africa/Monrovia</html:option>
	<html:option value="Africa/Nairobi">Africa/Nairobi</html:option>
	<html:option value="Africa/Ndjamena">Africa/Ndjamena</html:option>
	<html:option value="Africa/Niamey">Africa/Niamey</html:option>

	<html:option value="Africa/Nouakchott">Africa/Nouakchott</html:option>
	<html:option value="Africa/Ouagadougou">Africa/Ouagadougou</html:option>
	<html:option value="Africa/Porto-Novo">Africa/Porto-Novo</html:option>
	<html:option value="Africa/Sao_Tome">Africa/Sao_Tome</html:option>
	<html:option value="Africa/Timbuktu">Africa/Timbuktu</html:option>
	<html:option value="Africa/Tripoli">Africa/Tripoli</html:option>

	<html:option value="Africa/Tunis">Africa/Tunis</html:option>
	<html:option value="Africa/Windhoek">Africa/Windhoek</html:option>
	<html:option value="America/Adak">America/Adak</html:option>
	<html:option value="America/Anchorage">America/Anchorage</html:option>
	<html:option value="America/Anguilla">America/Anguilla</html:option>
	<html:option value="America/Antigua">America/Antigua</html:option>

	<html:option value="America/Araguaina">America/Araguaina</html:option>
	<html:option value="America/Aruba">America/Aruba</html:option>
	<html:option value="America/Asuncion">America/Asuncion</html:option>
	<html:option value="America/Atka">America/Atka</html:option>
	<html:option value="America/Barbados">America/Barbados</html:option>
	<html:option value="America/Belem">America/Belem</html:option>

	<html:option value="America/Belize">America/Belize</html:option>
	<html:option value="America/Boa_Vista">America/Boa_Vista</html:option>
	<html:option value="America/Bogota">America/Bogota</html:option>
	<html:option value="America/Boise">America/Boise</html:option>
	<html:option value="America/Buenos_Aires">America/Buenos_Aires</html:option>
	<html:option value="America/Cambridge_Bay">America/Cambridge_Bay</html:option>

	<html:option value="America/Cancun">America/Cancun</html:option>
	<html:option value="America/Caracas">America/Caracas</html:option>
	<html:option value="America/Catamarca">America/Catamarca</html:option>
	<html:option value="America/Cayenne">America/Cayenne</html:option>
	<html:option value="America/Cayman">America/Cayman</html:option>
	<html:option value="America/Chicago">America/Chicago</html:option>

	<html:option value="America/Chihuahua">America/Chihuahua</html:option>
	<html:option value="America/Cordoba">America/Cordoba</html:option>
	<html:option value="America/Costa_Rica">America/Costa_Rica</html:option>
	<html:option value="America/Cuiaba">America/Cuiaba</html:option>
	<html:option value="America/Curacao">America/Curacao</html:option>
	<html:option value="America/Dawson">America/Dawson</html:option>

	<html:option value="America/Dawson_Creek">America/Dawson_Creek</html:option>
	<html:option value="America/Denver">America/Denver</html:option>
	<html:option value="America/Detroit">America/Detroit</html:option>
	<html:option value="America/Dominica">America/Dominica</html:option>
	<html:option value="America/Edmonton">America/Edmonton</html:option>
	<html:option value="America/El_Salvador">America/El_Salvador</html:option>

	<html:option value="America/Ensenada">America/Ensenada</html:option>
	<html:option value="America/Fortaleza">America/Fortaleza</html:option>
	<html:option value="America/Fort_Wayne">America/Fort_Wayne</html:option>
	<html:option value="America/Glace_Bay">America/Glace_Bay</html:option>
	<html:option value="America/Godthab">America/Godthab</html:option>
	<html:option value="America/Goose_Bay">America/Goose_Bay</html:option>

	<html:option value="America/Grand_Turk">America/Grand_Turk</html:option>
	<html:option value="America/Grenada">America/Grenada</html:option>
	<html:option value="America/Guadeloupe">America/Guadeloupe</html:option>
	<html:option value="America/Guatemala">America/Guatemala</html:option>
	<html:option value="America/Guayaquil">America/Guayaquil</html:option>
	<html:option value="America/Guyana">America/Guyana</html:option>

	<html:option value="America/Halifax">America/Halifax</html:option>
	<html:option value="America/Havana">America/Havana</html:option>
	<html:option value="America/Hermosillo">America/Hermosillo</html:option>
	<html:option value="America/Indiana/Indianapolis">America/Indiana/Indianapolis</html:option>
	<html:option value="America/Indiana/Knox">America/Indiana/Knox</html:option>
	<html:option value="America/Indiana/Marengo">America/Indiana/Marengo</html:option>

	<html:option value="America/Indiana/Vevay">America/Indiana/Vevay</html:option>
	<html:option value="America/Indianapolis">America/Indianapolis</html:option>
	<html:option value="America/Inuvik">America/Inuvik</html:option>
	<html:option value="America/Iqaluit">America/Iqaluit</html:option>
	<html:option value="America/Jamaica">America/Jamaica</html:option>
	<html:option value="America/Jujuy">America/Jujuy</html:option>

	<html:option value="America/Juneau">America/Juneau</html:option>
	<html:option value="America/Knox_IN">America/Knox_IN</html:option>
	<html:option value="America/La_Paz">America/La_Paz</html:option>
	<html:option value="America/Lima">America/Lima</html:option>
	<html:option value="America/Los_Angeles">America/Los_Angeles</html:option>
	<html:option value="America/Louisville">America/Louisville</html:option>

	<html:option value="America/Maceio">America/Maceio</html:option>
	<html:option value="America/Managua">America/Managua</html:option>
	<html:option value="America/Manaus">America/Manaus</html:option>
	<html:option value="America/Martinique">America/Martinique</html:option>
	<html:option value="America/Mazatlan">America/Mazatlan</html:option>
	<html:option value="America/Mendoza">America/Mendoza</html:option>

	<html:option value="America/Menominee">America/Menominee</html:option>
	<html:option value="America/Mexico_City">America/Mexico_City</html:option>
	<html:option value="America/Miquelon">America/Miquelon</html:option>
	<html:option value="America/Montevideo">America/Montevideo</html:option>
	<html:option value="America/Montreal">America/Montreal</html:option>
	<html:option value="America/Montserrat">America/Montserrat</html:option>

	<html:option value="America/Nassau">America/Nassau</html:option>
	<html:option value="America/New_York">America/New_York</html:option>
	<html:option value="America/Nipigon">America/Nipigon</html:option>
	<html:option value="America/Nome">America/Nome</html:option>
	<html:option value="America/Noronha">America/Noronha</html:option>
	<html:option value="America/Panama">America/Panama</html:option>

	<html:option value="America/Pangnirtung">America/Pangnirtung</html:option>
	<html:option value="America/Paramaribo">America/Paramaribo</html:option>
	<html:option value="America/Phoenix">America/Phoenix</html:option>
	<html:option value="America/Port-au-Prince">America/Port-au-Prince</html:option>
	<html:option value="America/Porto_Acre">America/Porto_Acre</html:option>
	<html:option value="America/Port_of_Spain">America/Port_of_Spain</html:option>

	<html:option value="America/Porto_Velho">America/Porto_Velho</html:option>
	<html:option value="America/Puerto_Rico">America/Puerto_Rico</html:option>
	<html:option value="America/Rainy_River">America/Rainy_River</html:option>
	<html:option value="America/Rankin_Inlet">America/Rankin_Inlet</html:option>
	<html:option value="America/Regina">America/Regina</html:option>
	<html:option value="America/Rosario">America/Rosario</html:option>

	<html:option value="America/Santiago">America/Santiago</html:option>
	<html:option value="America/Santo_Domingo">America/Santo_Domingo</html:option>
	<html:option value="America/Sao_Paulo">America/Sao_Paulo</html:option>
	<html:option value="America/Scoresbysund">America/Scoresbysund</html:option>
	<html:option value="America/Shiprock">America/Shiprock</html:option>
	<html:option value="America/St_Johns">America/St_Johns</html:option>

	<html:option value="America/St_Kitts">America/St_Kitts</html:option>
	<html:option value="America/St_Lucia">America/St_Lucia</html:option>
	<html:option value="America/St_Thomas">America/St_Thomas</html:option>
	<html:option value="America/St_Vincent">America/St_Vincent</html:option>
	<html:option value="America/Swift_Current">America/Swift_Current</html:option>
	<html:option value="America/Tegucigalpa">America/Tegucigalpa</html:option>

	<html:option value="America/Thule">America/Thule</html:option>
	<html:option value="America/Thunder_Bay">America/Thunder_Bay</html:option>
	<html:option value="America/Tijuana">America/Tijuana</html:option>
	<html:option value="America/Tortola">America/Tortola</html:option>
	<html:option value="America/Vancouver">America/Vancouver</html:option>
	<html:option value="America/Virgin">America/Virgin</html:option>

	<html:option value="America/Whitehorse">America/Whitehorse</html:option>
	<html:option value="America/Winnipeg">America/Winnipeg</html:option>
	<html:option value="America/Yakutat">America/Yakutat</html:option>
	<html:option value="America/Yellowknife">America/Yellowknife</html:option>
	<html:option value="Antarctica/Casey">Antarctica/Casey</html:option>
	<html:option value="Antarctica/Davis">Antarctica/Davis</html:option>

	<html:option value="Antarctica/DumontDUrville">Antarctica/DumontDUrville</html:option>
	<html:option value="Antarctica/Mawson">Antarctica/Mawson</html:option>
	<html:option value="Antarctica/McMurdo">Antarctica/McMurdo</html:option>
	<html:option value="Antarctica/Palmer">Antarctica/Palmer</html:option>
	<html:option value="Antarctica/South_Pole">Antarctica/South_Pole</html:option>
	<html:option value="Antarctica/Syowa">Antarctica/Syowa</html:option>

	<html:option value="Arctic/Longyearbyen">Arctic/Longyearbyen</html:option>
	<html:option value="Asia/Aden">Asia/Aden</html:option>
	<html:option value="Asia/Almaty">Asia/Almaty</html:option>
	<html:option value="Asia/Amman">Asia/Amman</html:option>
	<html:option value="Asia/Anadyr">Asia/Anadyr</html:option>
	<html:option value="Asia/Aqtau">Asia/Aqtau</html:option>

	<html:option value="Asia/Aqtobe">Asia/Aqtobe</html:option>
	<html:option value="Asia/Ashkhabad">Asia/Ashkhabad</html:option>
	<html:option value="Asia/Baghdad">Asia/Baghdad</html:option>
	<html:option value="Asia/Bahrain">Asia/Bahrain</html:option>
	<html:option value="Asia/Baku">Asia/Baku</html:option>
	<html:option value="Asia/Bangkok">Asia/Bangkok</html:option>

	<html:option value="Asia/Beirut">Asia/Beirut</html:option>
	<html:option value="Asia/Bishkek">Asia/Bishkek</html:option>
	<html:option value="Asia/Brunei">Asia/Brunei</html:option>
	<html:option value="Asia/Calcutta">Asia/Calcutta</html:option>
	<html:option value="Asia/Chungking">Asia/Chungking</html:option>
	<html:option value="Asia/Colombo">Asia/Colombo</html:option>

	<html:option value="Asia/Dacca">Asia/Dacca</html:option>
	<html:option value="Asia/Damascus">Asia/Damascus</html:option>
	<html:option value="Asia/Dili">Asia/Dili</html:option>
	<html:option value="Asia/Dubai">Asia/Dubai</html:option>
	<html:option value="Asia/Dushanbe">Asia/Dushanbe</html:option>
	<html:option value="Asia/Gaza">Asia/Gaza</html:option>

	<html:option value="Asia/Harbin">Asia/Harbin</html:option>
	<html:option value="Asia/Hong_Kong">Asia/Hong_Kong</html:option>
	<html:option value="Asia/Hovd">Asia/Hovd</html:option>
	<html:option value="Asia/Irkutsk">Asia/Irkutsk</html:option>
	<html:option value="Asia/Istanbul">Asia/Istanbul</html:option>
	<html:option value="Asia/Jakarta">Asia/Jakarta</html:option>

	<html:option value="Asia/Jayapura">Asia/Jayapura</html:option>
	<html:option value="Asia/Jerusalem">Asia/Jerusalem</html:option>
	<html:option value="Asia/Kabul">Asia/Kabul</html:option>
	<html:option value="Asia/Kamchatka">Asia/Kamchatka</html:option>
	<html:option value="Asia/Karachi">Asia/Karachi</html:option>
	<html:option value="Asia/Kashgar">Asia/Kashgar</html:option>

	<html:option value="Asia/Katmandu">Asia/Katmandu</html:option>
	<html:option value="Asia/Krasnoyarsk">Asia/Krasnoyarsk</html:option>
	<html:option value="Asia/Kuala_Lumpur">Asia/Kuala_Lumpur</html:option>
	<html:option value="Asia/Kuching">Asia/Kuching</html:option>
	<html:option value="Asia/Kuwait">Asia/Kuwait</html:option>
	<html:option value="Asia/Macao">Asia/Macao</html:option>

	<html:option value="Asia/Magadan">Asia/Magadan</html:option>
	<html:option value="Asia/Manila">Asia/Manila</html:option>
	<html:option value="Asia/Muscat">Asia/Muscat</html:option>
	<html:option value="Asia/Nicosia">Asia/Nicosia</html:option>
	<html:option value="Asia/Novosibirsk">Asia/Novosibirsk</html:option>
	<html:option value="Asia/Omsk">Asia/Omsk</html:option>

	<html:option value="Asia/Phnom_Penh">Asia/Phnom_Penh</html:option>
	<html:option value="Asia/Pyongyang">Asia/Pyongyang</html:option>
	<html:option value="Asia/Qatar">Asia/Qatar</html:option>
	<html:option value="Asia/Rangoon">Asia/Rangoon</html:option>
	<html:option value="Asia/Riyadh">Asia/Riyadh</html:option>
	<html:option value="Asia/Riyadh87">Asia/Riyadh87</html:option>

	<html:option value="Asia/Riyadh88">Asia/Riyadh88</html:option>
	<html:option value="Asia/Riyadh89">Asia/Riyadh89</html:option>
	<html:option value="Asia/Saigon">Asia/Saigon</html:option>
	<html:option value="Asia/Samarkand">Asia/Samarkand</html:option>
	<html:option value="Asia/Seoul">Asia/Seoul</html:option>
	<html:option value="Asia/Shanghai">Asia/Shanghai</html:option>

	<html:option value="Asia/Singapore">Asia/Singapore</html:option>
	<html:option value="Asia/Taipei">Asia/Taipei</html:option>
	<html:option value="Asia/Tashkent">Asia/Tashkent</html:option>
	<html:option value="Asia/Tbilisi">Asia/Tbilisi</html:option>
	<html:option value="Asia/Tehran">Asia/Tehran</html:option>
	<html:option value="Asia/Tel_Aviv">Asia/Tel_Aviv</html:option>

	<html:option value="Asia/Thimbu">Asia/Thimbu</html:option>
	<html:option value="Asia/Tokyo">Asia/Tokyo</html:option>
	<html:option value="Asia/Ujung_Pandang">Asia/Ujung_Pandang</html:option>
	<html:option value="Asia/Ulaanbaatar">Asia/Ulaanbaatar</html:option>
	<html:option value="Asia/Ulan_Bator">Asia/Ulan_Bator</html:option>
	<html:option value="Asia/Urumqi">Asia/Urumqi</html:option>

	<html:option value="Asia/Vientiane">Asia/Vientiane</html:option>
	<html:option value="Asia/Vladivostok">Asia/Vladivostok</html:option>
	<html:option value="Asia/Yakutsk">Asia/Yakutsk</html:option>
	<html:option value="Asia/Yekaterinburg">Asia/Yekaterinburg</html:option>
	<html:option value="Asia/Yerevan">Asia/Yerevan</html:option>
	<html:option value="Atlantic/Azores">Atlantic/Azores</html:option>

	<html:option value="Atlantic/Bermuda">Atlantic/Bermuda</html:option>
	<html:option value="Atlantic/Canary">Atlantic/Canary</html:option>
	<html:option value="Atlantic/Cape_Verde">Atlantic/Cape_Verde</html:option>
	<html:option value="Atlantic/Faeroe">Atlantic/Faeroe</html:option>
	<html:option value="Atlantic/Jan_Mayen">Atlantic/Jan_Mayen</html:option>
	<html:option value="Atlantic/Madeira">Atlantic/Madeira</html:option>

	<html:option value="Atlantic/Reykjavik">Atlantic/Reykjavik</html:option>
	<html:option value="Atlantic/South_Georgia">Atlantic/South_Georgia</html:option>
	<html:option value="Atlantic/Stanley">Atlantic/Stanley</html:option>
	<html:option value="Atlantic/St_Helena">Atlantic/St_Helena</html:option>
	<html:option value="Australia/ACT">Australia/ACT</html:option>
	<html:option value="Australia/Adelaide">Australia/Adelaide</html:option>

	<html:option value="Australia/Brisbane">Australia/Brisbane</html:option>
	<html:option value="Australia/Broken_Hill">Australia/Broken_Hill</html:option>
	<html:option value="Australia/Canberra">Australia/Canberra</html:option>
	<html:option value="Australia/Darwin">Australia/Darwin</html:option>
	<html:option value="Australia/Hobart">Australia/Hobart</html:option>
	<html:option value="Australia/LHI">Australia/LHI</html:option>

	<html:option value="Australia/Lindeman">Australia/Lindeman</html:option>
	<html:option value="Australia/Lord_Howe">Australia/Lord_Howe</html:option>
	<html:option value="Australia/Melbourne">Australia/Melbourne</html:option>
	<html:option value="Australia/North">Australia/North</html:option>
	<html:option value="Australia/NSW">Australia/NSW</html:option>
	<html:option value="Australia/Perth">Australia/Perth</html:option>

	<html:option value="Australia/Queensland">Australia/Queensland</html:option>
	<html:option value="Australia/South">Australia/South</html:option>
	<html:option value="Australia/Sydney">Australia/Sydney</html:option>
	<html:option value="Australia/Tasmania">Australia/Tasmania</html:option>
	<html:option value="Australia/Victoria">Australia/Victoria</html:option>
	<html:option value="Australia/West">Australia/West</html:option>

	<html:option value="Australia/Yancowinna">Australia/Yancowinna</html:option>
	<html:option value="Brazil/Acre">Brazil/Acre</html:option>
	<html:option value="Brazil/DeNoronha">Brazil/DeNoronha</html:option>
	<html:option value="Brazil/East">Brazil/East</html:option>
	<html:option value="Brazil/West">Brazil/West</html:option>
	<html:option value="Canada/Atlantic">Canada/Atlantic</html:option>

	<html:option value="Canada/Central">Canada/Central</html:option>
	<html:option value="Canada/Eastern">Canada/Eastern</html:option>
	<html:option value="Canada/East-Saskatchewan">Canada/East-Saskatchewan</html:option>
	<html:option value="Canada/Mountain">Canada/Mountain</html:option>
	<html:option value="Canada/Newfoundland">Canada/Newfoundland</html:option>
	<html:option value="Canada/Pacific">Canada/Pacific</html:option>

	<html:option value="Canada/Saskatchewan">Canada/Saskatchewan</html:option>
	<html:option value="Canada/Yukon">Canada/Yukon</html:option>
	<html:option value="CET">CET</html:option>
	<html:option value="Chile/Continental">Chile/Continental</html:option>
	<html:option value="Chile/EasterIsland">Chile/EasterIsland</html:option>
	<html:option value="China/Beijing">China/Beijing</html:option>

	<html:option value="China/Shanghai">China/Shanghai</html:option>
	<html:option value="CST6CDT">CST6CDT</html:option>
	<html:option value="Cuba">Cuba</html:option>
	<html:option value="EET">EET</html:option>
	<html:option value="Egypt">Egypt</html:option>
	<html:option value="Eire">Eire</html:option>

	<html:option value="EST">EST</html:option>
	<html:option value="EST5EDT">EST5EDT</html:option>
	<html:option value="Europe/Amsterdam">Europe/Amsterdam</html:option>
	<html:option value="Europe/Andorra">Europe/Andorra</html:option>
	<html:option value="Europe/Athens">Europe/Athens</html:option>
	<html:option value="Europe/Belfast">Europe/Belfast</html:option>

	<html:option value="Europe/Belgrade">Europe/Belgrade</html:option>
	<html:option value="Europe/Berlin">Europe/Berlin</html:option>
	<html:option value="Europe/Bratislava">Europe/Bratislava</html:option>
	<html:option value="Europe/Brussels">Europe/Brussels</html:option>
	<html:option value="Europe/Bucharest">Europe/Bucharest</html:option>
	<html:option value="Europe/Budapest">Europe/Budapest</html:option>

	<html:option value="Europe/Chisinau">Europe/Chisinau</html:option>
	<html:option value="Europe/Copenhagen">Europe/Copenhagen</html:option>
	<html:option value="Europe/Dublin">Europe/Dublin</html:option>
	<html:option value="Europe/Gibraltar">Europe/Gibraltar</html:option>
	<html:option value="Europe/Helsinki">Europe/Helsinki</html:option>
	<html:option value="Europe/Istanbul">Europe/Istanbul</html:option>

	<html:option value="Europe/Kaliningrad">Europe/Kaliningrad</html:option>
	<html:option value="Europe/Kiev">Europe/Kiev</html:option>
	<html:option value="Europe/Lisbon">Europe/Lisbon</html:option>
	<html:option value="Europe/Ljubljana">Europe/Ljubljana</html:option>
	<html:option value="Europe/London">Europe/London</html:option>
	<html:option value="Europe/Luxembourg">Europe/Luxembourg</html:option>

	<html:option value="Europe/Madrid">Europe/Madrid</html:option>
	<html:option value="Europe/Malta">Europe/Malta</html:option>
	<html:option value="Europe/Minsk">Europe/Minsk</html:option>
	<html:option value="Europe/Monaco">Europe/Monaco</html:option>
	<html:option value="Europe/Moscow">Europe/Moscow</html:option>
	<html:option value="Europe/Oslo">Europe/Oslo</html:option>

	<html:option value="Europe/Paris" >Europe/Paris</html:option>
	<html:option value="Europe/Prague">Europe/Prague</html:option>
	<html:option value="Europe/Riga">Europe/Riga</html:option>
	<html:option value="Europe/Rome">Europe/Rome</html:option>
	<html:option value="Europe/Samara">Europe/Samara</html:option>
	<html:option value="Europe/San_Marino">Europe/San_Marino</html:option>

	<html:option value="Europe/Sarajevo">Europe/Sarajevo</html:option>
	<html:option value="Europe/Simferopol">Europe/Simferopol</html:option>
	<html:option value="Europe/Skopje">Europe/Skopje</html:option>
	<html:option value="Europe/Sofia">Europe/Sofia</html:option>
	<html:option value="Europe/Stockholm">Europe/Stockholm</html:option>
	<html:option value="Europe/Tallinn">Europe/Tallinn</html:option>

	<html:option value="Europe/Tirane">Europe/Tirane</html:option>
	<html:option value="Europe/Tiraspol">Europe/Tiraspol</html:option>
	<html:option value="Europe/Uzhgorod">Europe/Uzhgorod</html:option>
	<html:option value="Europe/Vaduz">Europe/Vaduz</html:option>
	<html:option value="Europe/Vatican">Europe/Vatican</html:option>
	<html:option value="Europe/Vienna">Europe/Vienna</html:option>

	<html:option value="Europe/Vilnius">Europe/Vilnius</html:option>
	<html:option value="Europe/Warsaw">Europe/Warsaw</html:option>
	<html:option value="Europe/Zagreb">Europe/Zagreb</html:option>
	<html:option value="Europe/Zaporozhye">Europe/Zaporozhye</html:option>
	<html:option value="Europe/Zurich">Europe/Zurich</html:option>
	<html:option value="Factory">Factory</html:option>

	<html:option value="GB">GB</html:option>
	<html:option value="GB-Eire">GB-Eire</html:option>
	<html:option value="GMT">GMT</html:option>
	<html:option value="GMT0">GMT0</html:option>
	<html:option value="GMT-0">GMT-0</html:option>
	<html:option value="GMT+0">GMT+0</html:option>

	<html:option value="Greenwich">Greenwich</html:option>
	<html:option value="Hongkong">Hongkong</html:option>
	<html:option value="HST">HST</html:option>
	<html:option value="Iceland">Iceland</html:option>
	<html:option value="Indian/Antananarivo">Indian/Antananarivo</html:option>
	<html:option value="Indian/Chagos">Indian/Chagos</html:option>

	<html:option value="Indian/Christmas">Indian/Christmas</html:option>
	<html:option value="Indian/Cocos">Indian/Cocos</html:option>
	<html:option value="Indian/Comoro">Indian/Comoro</html:option>
	<html:option value="Indian/Kerguelen">Indian/Kerguelen</html:option>
	<html:option value="Indian/Mahe">Indian/Mahe</html:option>
	<html:option value="Indian/Maldives">Indian/Maldives</html:option>

	<html:option value="Indian/Mauritius">Indian/Mauritius</html:option>
	<html:option value="Indian/Mayotte">Indian/Mayotte</html:option>
	<html:option value="Indian/Reunion">Indian/Reunion</html:option>
	<html:option value="Iran">Iran</html:option>
	<html:option value="Israel">Israel</html:option>
	<html:option value="Jamaica">Jamaica</html:option>

	<html:option value="Japan">Japan</html:option>
	<html:option value="Kwajalein">Kwajalein</html:option>
	<html:option value="Libya">Libya</html:option>
	<html:option value="MET">MET</html:option>
	<html:option value="Mexico/BajaNorte">Mexico/BajaNorte</html:option>
	<html:option value="Mexico/BajaSur">Mexico/BajaSur</html:option>

	<html:option value="Mexico/General">Mexico/General</html:option>
	<html:option value="Mideast/Riyadh87">Mideast/Riyadh87</html:option>
	<html:option value="Mideast/Riyadh88">Mideast/Riyadh88</html:option>
	<html:option value="Mideast/Riyadh89">Mideast/Riyadh89</html:option>
	<html:option value="MST">MST</html:option>
	<html:option value="MST7MDT">MST7MDT</html:option>

	<html:option value="Navajo">Navajo</html:option>
	<html:option value="None">None</html:option>
	<html:option value="NZ">NZ</html:option>
	<html:option value="NZ-CHAT">NZ-CHAT</html:option>
	<html:option value="Pacific/Apia">Pacific/Apia</html:option>
	<html:option value="Pacific/Auckland">Pacific/Auckland</html:option>

	<html:option value="Pacific/Chatham">Pacific/Chatham</html:option>
	<html:option value="Pacific/Easter">Pacific/Easter</html:option>
	<html:option value="Pacific/Efate">Pacific/Efate</html:option>
	<html:option value="Pacific/Enderbury">Pacific/Enderbury</html:option>
	<html:option value="Pacific/Fakaofo">Pacific/Fakaofo</html:option>
	<html:option value="Pacific/Fiji">Pacific/Fiji</html:option>

	<html:option value="Pacific/Funafuti">Pacific/Funafuti</html:option>
	<html:option value="Pacific/Galapagos">Pacific/Galapagos</html:option>
	<html:option value="Pacific/Gambier">Pacific/Gambier</html:option>
	<html:option value="Pacific/Guadalcanal">Pacific/Guadalcanal</html:option>
	<html:option value="Pacific/Guam">Pacific/Guam</html:option>
	<html:option value="Pacific/Honolulu">Pacific/Honolulu</html:option>

	<html:option value="Pacific/Johnston">Pacific/Johnston</html:option>
	<html:option value="Pacific/Kiritimati">Pacific/Kiritimati</html:option>
	<html:option value="Pacific/Kosrae">Pacific/Kosrae</html:option>
	<html:option value="Pacific/Kwajalein">Pacific/Kwajalein</html:option>
	<html:option value="Pacific/Majuro">Pacific/Majuro</html:option>
	<html:option value="Pacific/Marquesas">Pacific/Marquesas</html:option>

	<html:option value="Pacific/Midway">Pacific/Midway</html:option>
	<html:option value="Pacific/Nauru">Pacific/Nauru</html:option>
	<html:option value="Pacific/Niue">Pacific/Niue</html:option>
	<html:option value="Pacific/Norfolk">Pacific/Norfolk</html:option>
	<html:option value="Pacific/Noumea">Pacific/Noumea</html:option>
	<html:option value="Pacific/Pago_Pago">Pacific/Pago_Pago</html:option>

	<html:option value="Pacific/Palau">Pacific/Palau</html:option>
	<html:option value="Pacific/Pitcairn">Pacific/Pitcairn</html:option>
	<html:option value="Pacific/Ponape">Pacific/Ponape</html:option>
	<html:option value="Pacific/Port_Moresby">Pacific/Port_Moresby</html:option>
	<html:option value="Pacific/Rarotonga">Pacific/Rarotonga</html:option>
	<html:option value="Pacific/Saipan">Pacific/Saipan</html:option>

	<html:option value="Pacific/Samoa">Pacific/Samoa</html:option>
	<html:option value="Pacific/Tahiti">Pacific/Tahiti</html:option>
	<html:option value="Pacific/Tarawa">Pacific/Tarawa</html:option>
	<html:option value="Pacific/Tongatapu">Pacific/Tongatapu</html:option>
	<html:option value="Pacific/Truk">Pacific/Truk</html:option>
	<html:option value="Pacific/Wake">Pacific/Wake</html:option>

	<html:option value="Pacific/Wallis">Pacific/Wallis</html:option>
	<html:option value="Pacific/Yap">Pacific/Yap</html:option>
	<html:option value="Poland">Poland</html:option>
	<html:option value="Portugal">Portugal</html:option>
	<html:option value="PRC">PRC</html:option>
	<html:option value="PST8PDT">PST8PDT</html:option>

	<html:option value="ROC">ROC</html:option>
	<html:option value="ROK">ROK</html:option>
	<html:option value="Singapore">Singapore</html:option>
	<html:option value="Turkey">Turkey</html:option>
	<html:option value="UCT">UCT</html:option>
	<html:option value="Universal">Universal</html:option>

	<html:option value="UTC">UTC</html:option>
	<html:option value="WET">WET</html:option>
	<html:option value="W-SU">W-SU</html:option>
	<html:option value="Zulu">Zulu</html:option>
</html:select>
ENDSELECT
end

#struts_messageCheckObject



16
17
18
19
20
21
# File 'lib/ontomde-java/struts/MessageResources.rb', line 16

def struts_messageCheck
	STRUTS_MESSAGE_USED.each { |key|
		next if STRUTS_MESSAGE_DEFINED.include?(key)
		log.error("ressource undefined: #{key}")
	}
end

#struts_writeMsg(key) ⇒ Object



6
7
8
9
# File 'lib/ontomde-java/struts/MessageResources.rb', line 6

def struts_writeMsg(key)
	STRUTS_MESSAGE_USED.add(key) if STRUTS_CHECK_MESSAGE_USED
	return %{<bean:message key="#{key}"/>}
end

#struts_writeMsgRes(key, msg, writeAsComment, locale) ⇒ Object



11
12
13
14
# File 'lib/ontomde-java/struts/MessageResources.rb', line 11

def struts_writeMsgRes(key,msg,writeAsComment,locale)
	write(%{#{key}=#{writeAsComment ? "#{locale}: " : ""}#{msg}\n})
	STRUTS_MESSAGE_DEFINED.add(key) if STRUTS_CHECK_MESSAGE_USED && (!writeAsComment)
end

#struts_writeTimeoutIndicatorObject



78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
# File 'lib/ontomde-java/struts/jsp_edit.rb', line 78

def struts_writeTimeoutIndicator()
  write %{
<div style="display: none; left: 136px; top: 112px;" id="bubble_tooltip">
	<div class="bubble_top"><span></span></div>
	<div class="bubble_middle"><span id="bubble_tooltip_content">Message Help To add</span></div>
	<div class="bubble_bottom"></div>
</div>
<script>
function showToolTip(e,text){
	if(document.all)e = event;

	var obj = document.getElementById('bubble_tooltip');
	var obj2 = document.getElementById('bubble_tooltip_content');
	obj2.innerHTML = text;
	obj.style.display = 'block';
	var st = Math.max(document.body.scrollTop,document.documentElement.scrollTop);
	if(navigator.userAgent.toLowerCase().indexOf('safari')>=0)st=0;
	var leftPos = e.clientX - 100;
	if(leftPos<0)leftPos = 0;
	obj.style.left = leftPos + 'px';
	obj.style.top = e.clientY - obj.offsetHeight -1 + st + 'px';
}

function hideToolTip()
{
	document.getElementById('bubble_tooltip').style.display = 'none';

}
</script>

<%-- TPL:1 BEGIN --%>
<%-- Start JavaScript Clock Code --%>
<a id="js_remaining_time" onmouseover="showToolTip(event,'This is a simple, simple test');return false" onmouseout="hideToolTip()">
<script language="javascript">
load_time=new Date();
server_timeout=#{struts_writeMsg(Mrdf_Repository::STRUTS_SESSION_TIMEOUT_IN_MINUTES_RES)} // minutes
function js_remaining_time(){
	var clock_div = document.getElementById('js_remaining_time');
	clock_div.innerHTML = Math.floor(server_timeout-(new Date()-load_time)/1000/60)+"'"
	setTimeout("js_remaining_time()", 10000);
}
js_remaining_time();
</script>
</a>
<div id="TipLayer" style="visibility:hidden;position:absolute;z-index:1000;top:-100;"></div>

<%-- End JavaScript Clock Code --%>
<%-- TPL:1 END --%>
  }
end