1
2
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 package org.jomc.cli.commands;
37
38 import java.io.File;
39 import java.util.logging.Level;
40 import javax.xml.bind.JAXBElement;
41 import javax.xml.bind.JAXBException;
42 import javax.xml.bind.Unmarshaller;
43 import org.apache.commons.cli.CommandLine;
44 import org.jomc.model.Module;
45 import org.jomc.model.Modules;
46 import org.jomc.model.modlet.DefaultModelProcessor;
47 import org.jomc.model.modlet.DefaultModelProvider;
48 import org.jomc.model.modlet.DefaultModelValidator;
49 import org.jomc.model.modlet.ModelHelper;
50 import org.jomc.modlet.Model;
51 import org.jomc.modlet.ModelContext;
52 import org.jomc.modlet.ModelException;
53 import org.jomc.tools.modlet.ToolsModelProcessor;
54 import org.jomc.tools.modlet.ToolsModelProvider;
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78 @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.5", comments = "See http://www.jomc.org/jomc/1.5/jomc-tools-1.5" )
79
80
81 public abstract class AbstractModelCommand extends AbstractModletCommand
82 {
83
84
85
86
87
88 @Override
89 protected ModelContext createModelContext( final CommandLine commandLine, final ClassLoader classLoader )
90 throws CommandExecutionException
91 {
92 if ( commandLine == null )
93 {
94 throw new NullPointerException( "commandLine" );
95 }
96
97 final ModelContext modelContext = super.createModelContext( commandLine, classLoader );
98
99 if ( commandLine.hasOption( this.getTransformerLocationOption().getOpt() ) )
100 {
101 modelContext.setAttribute( DefaultModelProcessor.TRANSFORMER_LOCATION_ATTRIBUTE_NAME,
102 commandLine.getOptionValue( this.getTransformerLocationOption().getOpt() ) );
103
104 }
105
106 if ( commandLine.hasOption( this.getModuleLocationOption().getOpt() ) )
107 {
108 modelContext.setAttribute( DefaultModelProvider.MODULE_LOCATION_ATTRIBUTE_NAME,
109 commandLine.getOptionValue( this.getModuleLocationOption().getOpt() ) );
110
111 }
112
113 modelContext.setAttribute( ToolsModelProvider.MODEL_OBJECT_CLASSPATH_RESOLUTION_ENABLED_ATTRIBUTE_NAME,
114 !commandLine.hasOption( this.getNoClasspathResolutionOption().getOpt() ) );
115
116 modelContext.setAttribute( ToolsModelProcessor.MODEL_OBJECT_CLASSPATH_RESOLUTION_ENABLED_ATTRIBUTE_NAME,
117 !commandLine.hasOption( this.getNoClasspathResolutionOption().getOpt() ) );
118
119 modelContext.setAttribute( DefaultModelProvider.VALIDATING_ATTRIBUTE_NAME,
120 !commandLine.hasOption( this.getNoModelResourceValidation().getOpt() ) );
121
122 modelContext.setAttribute( DefaultModelValidator.VALIDATE_JAVA_ATTRIBUTE_NAME,
123 !commandLine.hasOption( this.getNoJavaValidationOption().getOpt() ) );
124
125 return modelContext;
126 }
127
128
129
130
131
132
133
134
135
136
137
138 protected Model getModel( final ModelContext context, final CommandLine commandLine )
139 throws CommandExecutionException
140 {
141 try
142 {
143 Model model = new Model();
144 model.setIdentifier( this.getModel( commandLine ) );
145 Modules modules = new Modules();
146 ModelHelper.setModules( model, modules );
147
148 if ( commandLine.hasOption( this.getDocumentsOption().getOpt() ) )
149 {
150 final Unmarshaller u = context.createUnmarshaller( model.getIdentifier() );
151
152 if ( !commandLine.hasOption( this.getNoModelResourceValidation().getOpt() ) )
153 {
154 u.setSchema( context.createSchema( model.getIdentifier() ) );
155 }
156
157 for ( File f : this.getDocumentFiles( commandLine ) )
158 {
159 if ( this.isLoggable( Level.FINEST ) )
160 {
161 this.log( Level.FINEST, this.getReadingMessage( this.getLocale(), f.getAbsolutePath() ), null );
162 }
163
164 Object o = u.unmarshal( f );
165 if ( o instanceof JAXBElement<?> )
166 {
167 o = ( (JAXBElement<?>) o ).getValue();
168 }
169
170 if ( o instanceof Module )
171 {
172 modules.getModule().add( (Module) o );
173 }
174 else if ( o instanceof Modules )
175 {
176 modules.getModule().addAll( ( (Modules) o ).getModule() );
177 }
178 else if ( this.isLoggable( Level.WARNING ) )
179 {
180 this.log( Level.WARNING, this.getCannotProcessMessage(
181 this.getLocale(), f.getAbsolutePath(), o.toString() ), null );
182
183 }
184 }
185 }
186
187 if ( commandLine.hasOption( this.getClasspathOption().getOpt() ) )
188 {
189 model = context.findModel( model );
190 modules = ModelHelper.getModules( model );
191 }
192
193 if ( modules != null && !commandLine.hasOption( this.getNoClasspathResolutionOption().getOpt() ) )
194 {
195 final Module classpathModule = modules.getClasspathModule(
196 Modules.getDefaultClasspathModuleName(), context.getClassLoader() );
197
198 if ( classpathModule != null && modules.getModule( classpathModule.getName() ) == null )
199 {
200 modules.getModule().add( classpathModule );
201 }
202 }
203
204 if ( !commandLine.hasOption( this.getNoModelProcessingOption().getOpt() ) )
205 {
206 model = context.processModel( model );
207 modules = ModelHelper.getModules( model );
208 }
209
210 assert modules != null : "Modules '" + this.getModel( commandLine ) + "' not found.";
211 return model;
212 }
213 catch ( final ModelException e )
214 {
215 throw new CommandExecutionException( getExceptionMessage( e ), e );
216 }
217 catch ( final JAXBException e )
218 {
219 String message = getExceptionMessage( e );
220 if ( message == null )
221 {
222 message = getExceptionMessage( e.getLinkedException() );
223 }
224
225 throw new CommandExecutionException( message, e );
226 }
227 }
228
229
230
231
232
233 @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.5", comments = "See http://www.jomc.org/jomc/1.5/jomc-tools-1.5" )
234 public AbstractModelCommand()
235 {
236
237 super();
238
239 }
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256 @SuppressWarnings("unused")
257 @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.5", comments = "See http://www.jomc.org/jomc/1.5/jomc-tools-1.5" )
258 private org.apache.commons.cli.Option getClasspathOption()
259 {
260 final org.apache.commons.cli.Option _d = (org.apache.commons.cli.Option) org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getDependency( this, "Classpath Option" );
261 assert _d != null : "'Classpath Option' dependency not found.";
262 return _d;
263 }
264
265
266
267
268
269
270
271
272
273
274
275
276 @SuppressWarnings("unused")
277 @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.5", comments = "See http://www.jomc.org/jomc/1.5/jomc-tools-1.5" )
278 private org.apache.commons.cli.Option getDocumentsOption()
279 {
280 final org.apache.commons.cli.Option _d = (org.apache.commons.cli.Option) org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getDependency( this, "Documents Option" );
281 assert _d != null : "'Documents Option' dependency not found.";
282 return _d;
283 }
284
285
286
287
288
289
290
291
292
293
294
295
296 @SuppressWarnings("unused")
297 @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.5", comments = "See http://www.jomc.org/jomc/1.5/jomc-tools-1.5" )
298 private java.util.Locale getLocale()
299 {
300 final java.util.Locale _d = (java.util.Locale) org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getDependency( this, "Locale" );
301 assert _d != null : "'Locale' dependency not found.";
302 return _d;
303 }
304
305
306
307
308
309
310
311
312
313
314
315
316 @SuppressWarnings("unused")
317 @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.5", comments = "See http://www.jomc.org/jomc/1.5/jomc-tools-1.5" )
318 private org.apache.commons.cli.Option getModelContextFactoryOption()
319 {
320 final org.apache.commons.cli.Option _d = (org.apache.commons.cli.Option) org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getDependency( this, "Model Context Factory Option" );
321 assert _d != null : "'Model Context Factory Option' dependency not found.";
322 return _d;
323 }
324
325
326
327
328
329
330
331
332
333
334
335
336 @SuppressWarnings("unused")
337 @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.5", comments = "See http://www.jomc.org/jomc/1.5/jomc-tools-1.5" )
338 private org.apache.commons.cli.Option getModelOption()
339 {
340 final org.apache.commons.cli.Option _d = (org.apache.commons.cli.Option) org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getDependency( this, "Model Option" );
341 assert _d != null : "'Model Option' dependency not found.";
342 return _d;
343 }
344
345
346
347
348
349
350
351
352
353
354
355
356 @SuppressWarnings("unused")
357 @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.5", comments = "See http://www.jomc.org/jomc/1.5/jomc-tools-1.5" )
358 private org.apache.commons.cli.Option getModletLocationOption()
359 {
360 final org.apache.commons.cli.Option _d = (org.apache.commons.cli.Option) org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getDependency( this, "Modlet Location Option" );
361 assert _d != null : "'Modlet Location Option' dependency not found.";
362 return _d;
363 }
364
365
366
367
368
369
370
371
372
373
374
375
376 @SuppressWarnings("unused")
377 @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.5", comments = "See http://www.jomc.org/jomc/1.5/jomc-tools-1.5" )
378 private org.apache.commons.cli.Option getModletSchemaSystemIdOption()
379 {
380 final org.apache.commons.cli.Option _d = (org.apache.commons.cli.Option) org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getDependency( this, "Modlet Schema System Id Option" );
381 assert _d != null : "'Modlet Schema System Id Option' dependency not found.";
382 return _d;
383 }
384
385
386
387
388
389
390
391
392
393
394
395
396 @SuppressWarnings("unused")
397 @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.5", comments = "See http://www.jomc.org/jomc/1.5/jomc-tools-1.5" )
398 private org.apache.commons.cli.Option getModuleLocationOption()
399 {
400 final org.apache.commons.cli.Option _d = (org.apache.commons.cli.Option) org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getDependency( this, "Module Location Option" );
401 assert _d != null : "'Module Location Option' dependency not found.";
402 return _d;
403 }
404
405
406
407
408
409
410
411
412
413
414
415
416 @SuppressWarnings("unused")
417 @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.5", comments = "See http://www.jomc.org/jomc/1.5/jomc-tools-1.5" )
418 private org.apache.commons.cli.Option getNoClasspathResolutionOption()
419 {
420 final org.apache.commons.cli.Option _d = (org.apache.commons.cli.Option) org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getDependency( this, "No Classpath Resolution Option" );
421 assert _d != null : "'No Classpath Resolution Option' dependency not found.";
422 return _d;
423 }
424
425
426
427
428
429
430
431
432
433
434
435
436 @SuppressWarnings("unused")
437 @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.5", comments = "See http://www.jomc.org/jomc/1.5/jomc-tools-1.5" )
438 private org.apache.commons.cli.Option getNoJavaValidationOption()
439 {
440 final org.apache.commons.cli.Option _d = (org.apache.commons.cli.Option) org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getDependency( this, "No Java Validation Option" );
441 assert _d != null : "'No Java Validation Option' dependency not found.";
442 return _d;
443 }
444
445
446
447
448
449
450
451
452
453
454
455
456 @SuppressWarnings("unused")
457 @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.5", comments = "See http://www.jomc.org/jomc/1.5/jomc-tools-1.5" )
458 private org.apache.commons.cli.Option getNoModelProcessingOption()
459 {
460 final org.apache.commons.cli.Option _d = (org.apache.commons.cli.Option) org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getDependency( this, "No Model Processing Option" );
461 assert _d != null : "'No Model Processing Option' dependency not found.";
462 return _d;
463 }
464
465
466
467
468
469
470
471
472
473
474
475
476 @SuppressWarnings("unused")
477 @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.5", comments = "See http://www.jomc.org/jomc/1.5/jomc-tools-1.5" )
478 private org.apache.commons.cli.Option getNoModelResourceValidation()
479 {
480 final org.apache.commons.cli.Option _d = (org.apache.commons.cli.Option) org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getDependency( this, "No Model Resource Validation" );
481 assert _d != null : "'No Model Resource Validation' dependency not found.";
482 return _d;
483 }
484
485
486
487
488
489
490
491
492
493
494
495
496 @SuppressWarnings("unused")
497 @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.5", comments = "See http://www.jomc.org/jomc/1.5/jomc-tools-1.5" )
498 private org.apache.commons.cli.Option getNoModletResourceValidation()
499 {
500 final org.apache.commons.cli.Option _d = (org.apache.commons.cli.Option) org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getDependency( this, "No Modlet Resource Validation" );
501 assert _d != null : "'No Modlet Resource Validation' dependency not found.";
502 return _d;
503 }
504
505
506
507
508
509
510
511
512
513
514
515
516 @SuppressWarnings("unused")
517 @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.5", comments = "See http://www.jomc.org/jomc/1.5/jomc-tools-1.5" )
518 private org.apache.commons.cli.Option getPlatformProviderLocationOption()
519 {
520 final org.apache.commons.cli.Option _d = (org.apache.commons.cli.Option) org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getDependency( this, "Platform Provider Location Option" );
521 assert _d != null : "'Platform Provider Location Option' dependency not found.";
522 return _d;
523 }
524
525
526
527
528
529
530
531
532
533
534
535
536 @SuppressWarnings("unused")
537 @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.5", comments = "See http://www.jomc.org/jomc/1.5/jomc-tools-1.5" )
538 private org.apache.commons.cli.Option getProviderLocationOption()
539 {
540 final org.apache.commons.cli.Option _d = (org.apache.commons.cli.Option) org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getDependency( this, "Provider Location Option" );
541 assert _d != null : "'Provider Location Option' dependency not found.";
542 return _d;
543 }
544
545
546
547
548
549
550
551
552
553
554
555
556 @SuppressWarnings("unused")
557 @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.5", comments = "See http://www.jomc.org/jomc/1.5/jomc-tools-1.5" )
558 private org.apache.commons.cli.Option getTransformerLocationOption()
559 {
560 final org.apache.commons.cli.Option _d = (org.apache.commons.cli.Option) org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getDependency( this, "Transformer Location Option" );
561 assert _d != null : "'Transformer Location Option' dependency not found.";
562 return _d;
563 }
564
565
566
567
568
569
570
571
572
573
574
575
576 @SuppressWarnings("unused")
577 @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.5", comments = "See http://www.jomc.org/jomc/1.5/jomc-tools-1.5" )
578 private java.lang.String getAbbreviatedCommandName()
579 {
580 final java.lang.String _p = (java.lang.String) org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getProperty( this, "Abbreviated Command Name" );
581 assert _p != null : "'Abbreviated Command Name' property not found.";
582 return _p;
583 }
584
585
586
587
588
589
590
591
592 @SuppressWarnings("unused")
593 @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.5", comments = "See http://www.jomc.org/jomc/1.5/jomc-tools-1.5" )
594 private java.lang.String getApplicationModlet()
595 {
596 final java.lang.String _p = (java.lang.String) org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getProperty( this, "Application Modlet" );
597 assert _p != null : "'Application Modlet' property not found.";
598 return _p;
599 }
600
601
602
603
604
605
606
607
608 @SuppressWarnings("unused")
609 @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.5", comments = "See http://www.jomc.org/jomc/1.5/jomc-tools-1.5" )
610 private java.lang.String getCommandName()
611 {
612 final java.lang.String _p = (java.lang.String) org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getProperty( this, "Command Name" );
613 assert _p != null : "'Command Name' property not found.";
614 return _p;
615 }
616
617
618
619
620
621
622
623
624 @SuppressWarnings("unused")
625 @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.5", comments = "See http://www.jomc.org/jomc/1.5/jomc-tools-1.5" )
626 private java.lang.String getModletExcludes()
627 {
628 final java.lang.String _p = (java.lang.String) org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getProperty( this, "Modlet Excludes" );
629 assert _p != null : "'Modlet Excludes' property not found.";
630 return _p;
631 }
632
633
634
635
636
637
638
639
640 @SuppressWarnings("unused")
641 @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.5", comments = "See http://www.jomc.org/jomc/1.5/jomc-tools-1.5" )
642 private java.lang.String getProviderExcludes()
643 {
644 final java.lang.String _p = (java.lang.String) org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getProperty( this, "Provider Excludes" );
645 assert _p != null : "'Provider Excludes' property not found.";
646 return _p;
647 }
648
649
650
651
652
653
654
655
656 @SuppressWarnings("unused")
657 @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.5", comments = "See http://www.jomc.org/jomc/1.5/jomc-tools-1.5" )
658 private java.lang.String getSchemaExcludes()
659 {
660 final java.lang.String _p = (java.lang.String) org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getProperty( this, "Schema Excludes" );
661 assert _p != null : "'Schema Excludes' property not found.";
662 return _p;
663 }
664
665
666
667
668
669
670
671
672 @SuppressWarnings("unused")
673 @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.5", comments = "See http://www.jomc.org/jomc/1.5/jomc-tools-1.5" )
674 private java.lang.String getServiceExcludes()
675 {
676 final java.lang.String _p = (java.lang.String) org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getProperty( this, "Service Excludes" );
677 assert _p != null : "'Service Excludes' property not found.";
678 return _p;
679 }
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695 @SuppressWarnings("unused")
696 @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.5", comments = "See http://www.jomc.org/jomc/1.5/jomc-tools-1.5" )
697 private String getApplicationTitle( final java.util.Locale locale )
698 {
699 final String _m = org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getMessage( this, "Application Title", locale );
700 assert _m != null : "'Application Title' message not found.";
701 return _m;
702 }
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717 @SuppressWarnings("unused")
718 @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.5", comments = "See http://www.jomc.org/jomc/1.5/jomc-tools-1.5" )
719 private String getCannotProcessMessage( final java.util.Locale locale, final java.lang.String itemInfo, final java.lang.String detailMessage )
720 {
721 final String _m = org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getMessage( this, "Cannot Process Message", locale, itemInfo, detailMessage );
722 assert _m != null : "'Cannot Process Message' message not found.";
723 return _m;
724 }
725
726
727
728
729
730
731
732
733
734
735
736
737
738 @SuppressWarnings("unused")
739 @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.5", comments = "See http://www.jomc.org/jomc/1.5/jomc-tools-1.5" )
740 private String getClasspathElementInfo( final java.util.Locale locale, final java.lang.String classpathElement )
741 {
742 final String _m = org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getMessage( this, "Classpath Element Info", locale, classpathElement );
743 assert _m != null : "'Classpath Element Info' message not found.";
744 return _m;
745 }
746
747
748
749
750
751
752
753
754
755
756
757
758
759 @SuppressWarnings("unused")
760 @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.5", comments = "See http://www.jomc.org/jomc/1.5/jomc-tools-1.5" )
761 private String getClasspathElementNotFoundWarning( final java.util.Locale locale, final java.lang.String fileName )
762 {
763 final String _m = org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getMessage( this, "Classpath Element Not Found Warning", locale, fileName );
764 assert _m != null : "'Classpath Element Not Found Warning' message not found.";
765 return _m;
766 }
767
768
769
770
771
772
773
774
775
776
777
778
779
780 @SuppressWarnings("unused")
781 @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.5", comments = "See http://www.jomc.org/jomc/1.5/jomc-tools-1.5" )
782 private String getCommandFailureMessage( final java.util.Locale locale, final java.lang.String toolName )
783 {
784 final String _m = org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getMessage( this, "Command Failure Message", locale, toolName );
785 assert _m != null : "'Command Failure Message' message not found.";
786 return _m;
787 }
788
789
790
791
792
793
794
795
796
797
798
799
800
801 @SuppressWarnings("unused")
802 @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.5", comments = "See http://www.jomc.org/jomc/1.5/jomc-tools-1.5" )
803 private String getCommandInfoMessage( final java.util.Locale locale, final java.lang.String toolName )
804 {
805 final String _m = org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getMessage( this, "Command Info Message", locale, toolName );
806 assert _m != null : "'Command Info Message' message not found.";
807 return _m;
808 }
809
810
811
812
813
814
815
816
817
818
819
820
821
822 @SuppressWarnings("unused")
823 @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.5", comments = "See http://www.jomc.org/jomc/1.5/jomc-tools-1.5" )
824 private String getCommandSuccessMessage( final java.util.Locale locale, final java.lang.String toolName )
825 {
826 final String _m = org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getMessage( this, "Command Success Message", locale, toolName );
827 assert _m != null : "'Command Success Message' message not found.";
828 return _m;
829 }
830
831
832
833
834
835
836
837
838
839
840
841
842
843 @SuppressWarnings("unused")
844 @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.5", comments = "See http://www.jomc.org/jomc/1.5/jomc-tools-1.5" )
845 private String getDefaultLogLevelInfo( final java.util.Locale locale, final java.lang.String defaultLogLevel )
846 {
847 final String _m = org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getMessage( this, "Default Log Level Info", locale, defaultLogLevel );
848 assert _m != null : "'Default Log Level Info' message not found.";
849 return _m;
850 }
851
852
853
854
855
856
857
858
859
860
861
862
863
864 @SuppressWarnings("unused")
865 @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.5", comments = "See http://www.jomc.org/jomc/1.5/jomc-tools-1.5" )
866 private String getDocumentFileInfo( final java.util.Locale locale, final java.lang.String documentFile )
867 {
868 final String _m = org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getMessage( this, "Document File Info", locale, documentFile );
869 assert _m != null : "'Document File Info' message not found.";
870 return _m;
871 }
872
873
874
875
876
877
878
879
880
881
882
883
884
885 @SuppressWarnings("unused")
886 @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.5", comments = "See http://www.jomc.org/jomc/1.5/jomc-tools-1.5" )
887 private String getDocumentFileNotFoundWarning( final java.util.Locale locale, final java.lang.String fileName )
888 {
889 final String _m = org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getMessage( this, "Document File Not Found Warning", locale, fileName );
890 assert _m != null : "'Document File Not Found Warning' message not found.";
891 return _m;
892 }
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907 @SuppressWarnings("unused")
908 @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.5", comments = "See http://www.jomc.org/jomc/1.5/jomc-tools-1.5" )
909 private String getExcludedModletInfo( final java.util.Locale locale, final java.lang.String resourceName, final java.lang.String modletIdentifier )
910 {
911 final String _m = org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getMessage( this, "Excluded Modlet Info", locale, resourceName, modletIdentifier );
912 assert _m != null : "'Excluded Modlet Info' message not found.";
913 return _m;
914 }
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929 @SuppressWarnings("unused")
930 @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.5", comments = "See http://www.jomc.org/jomc/1.5/jomc-tools-1.5" )
931 private String getExcludedProviderInfo( final java.util.Locale locale, final java.lang.String resourceName, final java.lang.String providerName )
932 {
933 final String _m = org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getMessage( this, "Excluded Provider Info", locale, resourceName, providerName );
934 assert _m != null : "'Excluded Provider Info' message not found.";
935 return _m;
936 }
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951 @SuppressWarnings("unused")
952 @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.5", comments = "See http://www.jomc.org/jomc/1.5/jomc-tools-1.5" )
953 private String getExcludedSchemaInfo( final java.util.Locale locale, final java.lang.String resourceName, final java.lang.String contextId )
954 {
955 final String _m = org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getMessage( this, "Excluded Schema Info", locale, resourceName, contextId );
956 assert _m != null : "'Excluded Schema Info' message not found.";
957 return _m;
958 }
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973 @SuppressWarnings("unused")
974 @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.5", comments = "See http://www.jomc.org/jomc/1.5/jomc-tools-1.5" )
975 private String getExcludedServiceInfo( final java.util.Locale locale, final java.lang.String resourceName, final java.lang.String serviceName )
976 {
977 final String _m = org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getMessage( this, "Excluded Service Info", locale, resourceName, serviceName );
978 assert _m != null : "'Excluded Service Info' message not found.";
979 return _m;
980 }
981
982
983
984
985
986
987
988
989
990
991
992
993
994 @SuppressWarnings("unused")
995 @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.5", comments = "See http://www.jomc.org/jomc/1.5/jomc-tools-1.5" )
996 private String getInvalidModelMessage( final java.util.Locale locale, final java.lang.String modelIdentifier )
997 {
998 final String _m = org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getMessage( this, "Invalid Model Message", locale, modelIdentifier );
999 assert _m != null : "'Invalid Model Message' message not found.";
1000 return _m;
1001 }
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013 @SuppressWarnings("unused")
1014 @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.5", comments = "See http://www.jomc.org/jomc/1.5/jomc-tools-1.5" )
1015 private String getLongDescriptionMessage( final java.util.Locale locale )
1016 {
1017 final String _m = org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getMessage( this, "Long Description Message", locale );
1018 assert _m != null : "'Long Description Message' message not found.";
1019 return _m;
1020 }
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034 @SuppressWarnings("unused")
1035 @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.5", comments = "See http://www.jomc.org/jomc/1.5/jomc-tools-1.5" )
1036 private String getReadingMessage( final java.util.Locale locale, final java.lang.String locationInfo )
1037 {
1038 final String _m = org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getMessage( this, "Reading Message", locale, locationInfo );
1039 assert _m != null : "'Reading Message' message not found.";
1040 return _m;
1041 }
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053 @SuppressWarnings("unused")
1054 @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.5", comments = "See http://www.jomc.org/jomc/1.5/jomc-tools-1.5" )
1055 private String getSeparator( final java.util.Locale locale )
1056 {
1057 final String _m = org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getMessage( this, "Separator", locale );
1058 assert _m != null : "'Separator' message not found.";
1059 return _m;
1060 }
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072 @SuppressWarnings("unused")
1073 @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.5", comments = "See http://www.jomc.org/jomc/1.5/jomc-tools-1.5" )
1074 private String getShortDescriptionMessage( final java.util.Locale locale )
1075 {
1076 final String _m = org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getMessage( this, "Short Description Message", locale );
1077 assert _m != null : "'Short Description Message' message not found.";
1078 return _m;
1079 }
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156 @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.5", comments = "See http://www.jomc.org/jomc/1.5/jomc-tools-1.5" )
1157 @Override
1158 public org.apache.commons.cli.Options getOptions()
1159 {
1160 final org.apache.commons.cli.Options options = new org.apache.commons.cli.Options();
1161 options.addOption( this.getClasspathOption() );
1162 options.addOption( this.getDocumentsOption() );
1163 options.addOption( this.getModelContextFactoryOption() );
1164 options.addOption( this.getModelOption() );
1165 options.addOption( this.getModletLocationOption() );
1166 options.addOption( this.getModletSchemaSystemIdOption() );
1167 options.addOption( this.getModuleLocationOption() );
1168 options.addOption( this.getNoClasspathResolutionOption() );
1169 options.addOption( this.getNoJavaValidationOption() );
1170 options.addOption( this.getNoModelProcessingOption() );
1171 options.addOption( this.getNoModelResourceValidation() );
1172 options.addOption( this.getNoModletResourceValidation() );
1173 options.addOption( this.getPlatformProviderLocationOption() );
1174 options.addOption( this.getProviderLocationOption() );
1175 options.addOption( this.getTransformerLocationOption() );
1176 return options;
1177 }
1178
1179
1180 }