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.io.IOException;
40 import java.io.StringWriter;
41 import java.util.logging.Level;
42 import javax.xml.bind.JAXBContext;
43 import javax.xml.bind.JAXBException;
44 import javax.xml.bind.Marshaller;
45 import javax.xml.bind.util.JAXBSource;
46 import javax.xml.transform.Source;
47 import org.apache.commons.cli.CommandLine;
48 import org.jomc.cli.commands.AbstractModletCommand.CommandLineClassLoader;
49 import org.jomc.model.Instance;
50 import org.jomc.model.Module;
51 import org.jomc.model.Modules;
52 import org.jomc.model.Specification;
53 import org.jomc.model.modlet.ModelHelper;
54 import org.jomc.modlet.Model;
55 import org.jomc.modlet.ModelContext;
56 import org.jomc.modlet.ModelException;
57 import org.jomc.modlet.ModelValidationReport;
58 import org.jomc.modlet.ObjectFactory;
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82 @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.2.3", comments = "See http://jomc.sourceforge.net/jomc/1.2/jomc-tools-1.2.3" )
83
84
85 public final class ShowModelCommand extends AbstractModelCommand
86 {
87
88
89
90
91 protected void executeCommand( final CommandLine commandLine ) throws CommandExecutionException
92 {
93 if ( commandLine == null )
94 {
95 throw new NullPointerException( "commandLine" );
96 }
97
98 CommandLineClassLoader classLoader = null;
99 boolean suppressExceptionOnClose = true;
100
101 try
102 {
103 classLoader = new CommandLineClassLoader( commandLine );
104 final ModelContext context = this.createModelContext( commandLine, classLoader );
105 final Model model = this.getModel( context, commandLine );
106 final JAXBContext jaxbContext = context.createContext( model.getIdentifier() );
107 final Marshaller marshaller = context.createMarshaller( model.getIdentifier() );
108 final Source source = new JAXBSource( jaxbContext, new ObjectFactory().createModel( model ) );
109 final ModelValidationReport validationReport = context.validateModel( model.getIdentifier(), source );
110 final Modules modules = ModelHelper.getModules( model );
111 this.log( validationReport, marshaller );
112
113 if ( !validationReport.isModelValid() )
114 {
115 throw new CommandExecutionException( this.getInvalidModelMessage(
116 this.getLocale(), this.getModel( commandLine ) ) );
117
118 }
119
120 final Model displayModel = new Model();
121 displayModel.setIdentifier( model.getIdentifier() );
122
123 boolean displayModules = true;
124
125 if ( commandLine.hasOption( this.getImplementationOption().getOpt() ) )
126 {
127 final String identifier = commandLine.getOptionValue( this.getImplementationOption().getOpt() );
128 final Instance instance = modules != null ? modules.getInstance( identifier ) : null;
129 displayModules = false;
130
131 if ( instance != null )
132 {
133 displayModel.getAny().add( new org.jomc.model.ObjectFactory().createInstance( instance ) );
134 }
135 else if ( this.isLoggable( Level.WARNING ) )
136 {
137 this.log( Level.WARNING, this.getImplementationNotFoundWarning(
138 this.getLocale(), identifier ), null );
139
140 }
141 }
142
143 if ( commandLine.hasOption( this.getSpecificationOption().getOpt() ) )
144 {
145 final String identifier = commandLine.getOptionValue( this.getSpecificationOption().getOpt() );
146 final Specification specification = modules != null ? modules.getSpecification( identifier ) : null;
147 displayModules = false;
148
149 if ( specification != null )
150 {
151 displayModel.getAny().add(
152 new org.jomc.model.ObjectFactory().createSpecification( specification ) );
153
154 }
155 else if ( this.isLoggable( Level.WARNING ) )
156 {
157 this.log( Level.WARNING, this.getSpecificationNotFoundWarning(
158 this.getLocale(), identifier ), null );
159
160 }
161 }
162
163 if ( commandLine.hasOption( this.getModuleNameOption().getOpt() ) )
164 {
165 final String moduleName = commandLine.getOptionValue( this.getModuleNameOption().getOpt() );
166 final Module m = modules != null ? modules.getModule( moduleName ) : null;
167 displayModules = false;
168
169 if ( m != null )
170 {
171 displayModel.getAny().add( new org.jomc.model.ObjectFactory().createModule( m ) );
172 }
173 else if ( this.isLoggable( Level.WARNING ) )
174 {
175 this.log( Level.WARNING, this.getModuleNotFoundWarning( this.getLocale(), moduleName ), null );
176 }
177 }
178
179 if ( displayModules )
180 {
181 ModelHelper.setModules( displayModel, modules );
182 }
183
184 marshaller.setProperty( Marshaller.JAXB_FORMATTED_OUTPUT, Boolean.TRUE );
185
186 if ( commandLine.hasOption( this.getDocumentEncodingOption().getOpt() ) )
187 {
188 marshaller.setProperty( Marshaller.JAXB_ENCODING,
189 commandLine.getOptionValue( this.getDocumentEncodingOption().getOpt() ) );
190
191 }
192
193 if ( commandLine.hasOption( this.getDocumentOption().getOpt() ) )
194 {
195 final File documentFile = new File( commandLine.getOptionValue( this.getDocumentOption().getOpt() ) );
196
197 if ( this.isLoggable( Level.INFO ) )
198 {
199 this.log( Level.INFO, this.getWriteInfo( this.getLocale(), documentFile.getAbsolutePath() ), null );
200 }
201
202 marshaller.marshal( new ObjectFactory().createModel( displayModel ), documentFile );
203 }
204 else if ( this.isLoggable( Level.INFO ) )
205 {
206 final StringWriter stringWriter = new StringWriter();
207 marshaller.marshal( new ObjectFactory().createModel( displayModel ), stringWriter );
208 this.log( Level.INFO, stringWriter.toString(), null );
209 }
210
211 suppressExceptionOnClose = false;
212 }
213 catch ( final JAXBException e )
214 {
215 String message = getExceptionMessage( e );
216 if ( message == null )
217 {
218 message = getExceptionMessage( e.getLinkedException() );
219 }
220
221 throw new CommandExecutionException( message, e );
222 }
223 catch ( final ModelException e )
224 {
225 throw new CommandExecutionException( getExceptionMessage( e ), e );
226 }
227 finally
228 {
229 try
230 {
231 if ( classLoader != null )
232 {
233 classLoader.close();
234 }
235 }
236 catch ( final IOException e )
237 {
238 if ( suppressExceptionOnClose )
239 {
240 this.log( Level.SEVERE, getExceptionMessage( e ), e );
241 }
242 else
243 {
244 throw new CommandExecutionException( getExceptionMessage( e ), e );
245 }
246 }
247 }
248 }
249
250
251
252
253
254 @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.2.3", comments = "See http://jomc.sourceforge.net/jomc/1.2/jomc-tools-1.2.3" )
255 public ShowModelCommand()
256 {
257
258 super();
259
260 }
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277 @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.2.3", comments = "See http://jomc.sourceforge.net/jomc/1.2/jomc-tools-1.2.3" )
278 private org.apache.commons.cli.Option getClasspathOption()
279 {
280 final org.apache.commons.cli.Option _d = (org.apache.commons.cli.Option) org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getDependency( this, "ClasspathOption" );
281 assert _d != null : "'ClasspathOption' dependency not found.";
282 return _d;
283 }
284
285
286
287
288
289
290
291
292
293
294
295
296 @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.2.3", comments = "See http://jomc.sourceforge.net/jomc/1.2/jomc-tools-1.2.3" )
297 private org.apache.commons.cli.Option getDocumentEncodingOption()
298 {
299 final org.apache.commons.cli.Option _d = (org.apache.commons.cli.Option) org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getDependency( this, "DocumentEncodingOption" );
300 assert _d != null : "'DocumentEncodingOption' dependency not found.";
301 return _d;
302 }
303
304
305
306
307
308
309
310
311
312
313
314
315 @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.2.3", comments = "See http://jomc.sourceforge.net/jomc/1.2/jomc-tools-1.2.3" )
316 private org.apache.commons.cli.Option getDocumentOption()
317 {
318 final org.apache.commons.cli.Option _d = (org.apache.commons.cli.Option) org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getDependency( this, "DocumentOption" );
319 assert _d != null : "'DocumentOption' dependency not found.";
320 return _d;
321 }
322
323
324
325
326
327
328
329
330
331
332
333
334 @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.2.3", comments = "See http://jomc.sourceforge.net/jomc/1.2/jomc-tools-1.2.3" )
335 private org.apache.commons.cli.Option getDocumentsOption()
336 {
337 final org.apache.commons.cli.Option _d = (org.apache.commons.cli.Option) org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getDependency( this, "DocumentsOption" );
338 assert _d != null : "'DocumentsOption' dependency not found.";
339 return _d;
340 }
341
342
343
344
345
346
347
348
349
350
351
352
353 @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.2.3", comments = "See http://jomc.sourceforge.net/jomc/1.2/jomc-tools-1.2.3" )
354 private org.apache.commons.cli.Option getImplementationOption()
355 {
356 final org.apache.commons.cli.Option _d = (org.apache.commons.cli.Option) org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getDependency( this, "ImplementationOption" );
357 assert _d != null : "'ImplementationOption' dependency not found.";
358 return _d;
359 }
360
361
362
363
364
365
366
367
368
369
370
371
372 @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.2.3", comments = "See http://jomc.sourceforge.net/jomc/1.2/jomc-tools-1.2.3" )
373 private java.util.Locale getLocale()
374 {
375 final java.util.Locale _d = (java.util.Locale) org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getDependency( this, "Locale" );
376 assert _d != null : "'Locale' dependency not found.";
377 return _d;
378 }
379
380
381
382
383
384
385
386
387
388
389
390
391 @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.2.3", comments = "See http://jomc.sourceforge.net/jomc/1.2/jomc-tools-1.2.3" )
392 private org.apache.commons.cli.Option getModelContextFactoryOption()
393 {
394 final org.apache.commons.cli.Option _d = (org.apache.commons.cli.Option) org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getDependency( this, "ModelContextFactoryOption" );
395 assert _d != null : "'ModelContextFactoryOption' dependency not found.";
396 return _d;
397 }
398
399
400
401
402
403
404
405
406
407
408
409
410 @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.2.3", comments = "See http://jomc.sourceforge.net/jomc/1.2/jomc-tools-1.2.3" )
411 private org.apache.commons.cli.Option getModelOption()
412 {
413 final org.apache.commons.cli.Option _d = (org.apache.commons.cli.Option) org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getDependency( this, "ModelOption" );
414 assert _d != null : "'ModelOption' dependency not found.";
415 return _d;
416 }
417
418
419
420
421
422
423
424
425
426
427
428
429 @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.2.3", comments = "See http://jomc.sourceforge.net/jomc/1.2/jomc-tools-1.2.3" )
430 private org.apache.commons.cli.Option getModletLocationOption()
431 {
432 final org.apache.commons.cli.Option _d = (org.apache.commons.cli.Option) org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getDependency( this, "ModletLocationOption" );
433 assert _d != null : "'ModletLocationOption' dependency not found.";
434 return _d;
435 }
436
437
438
439
440
441
442
443
444
445
446
447
448 @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.2.3", comments = "See http://jomc.sourceforge.net/jomc/1.2/jomc-tools-1.2.3" )
449 private org.apache.commons.cli.Option getModletSchemaSystemIdOption()
450 {
451 final org.apache.commons.cli.Option _d = (org.apache.commons.cli.Option) org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getDependency( this, "ModletSchemaSystemIdOption" );
452 assert _d != null : "'ModletSchemaSystemIdOption' dependency not found.";
453 return _d;
454 }
455
456
457
458
459
460
461
462
463
464
465
466
467 @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.2.3", comments = "See http://jomc.sourceforge.net/jomc/1.2/jomc-tools-1.2.3" )
468 private org.apache.commons.cli.Option getModuleLocationOption()
469 {
470 final org.apache.commons.cli.Option _d = (org.apache.commons.cli.Option) org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getDependency( this, "ModuleLocationOption" );
471 assert _d != null : "'ModuleLocationOption' dependency not found.";
472 return _d;
473 }
474
475
476
477
478
479
480
481
482
483
484
485
486 @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.2.3", comments = "See http://jomc.sourceforge.net/jomc/1.2/jomc-tools-1.2.3" )
487 private org.apache.commons.cli.Option getModuleNameOption()
488 {
489 final org.apache.commons.cli.Option _d = (org.apache.commons.cli.Option) org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getDependency( this, "ModuleNameOption" );
490 assert _d != null : "'ModuleNameOption' dependency not found.";
491 return _d;
492 }
493
494
495
496
497
498
499
500
501
502
503
504
505 @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.2.3", comments = "See http://jomc.sourceforge.net/jomc/1.2/jomc-tools-1.2.3" )
506 private org.apache.commons.cli.Option getNoClasspathResolutionOption()
507 {
508 final org.apache.commons.cli.Option _d = (org.apache.commons.cli.Option) org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getDependency( this, "NoClasspathResolutionOption" );
509 assert _d != null : "'NoClasspathResolutionOption' dependency not found.";
510 return _d;
511 }
512
513
514
515
516
517
518
519
520
521
522
523
524 @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.2.3", comments = "See http://jomc.sourceforge.net/jomc/1.2/jomc-tools-1.2.3" )
525 private org.apache.commons.cli.Option getNoModelProcessingOption()
526 {
527 final org.apache.commons.cli.Option _d = (org.apache.commons.cli.Option) org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getDependency( this, "NoModelProcessingOption" );
528 assert _d != null : "'NoModelProcessingOption' dependency not found.";
529 return _d;
530 }
531
532
533
534
535
536
537
538
539
540
541
542
543 @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.2.3", comments = "See http://jomc.sourceforge.net/jomc/1.2/jomc-tools-1.2.3" )
544 private org.apache.commons.cli.Option getNoModelResourceValidation()
545 {
546 final org.apache.commons.cli.Option _d = (org.apache.commons.cli.Option) org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getDependency( this, "NoModelResourceValidation" );
547 assert _d != null : "'NoModelResourceValidation' dependency not found.";
548 return _d;
549 }
550
551
552
553
554
555
556
557
558
559
560
561
562 @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.2.3", comments = "See http://jomc.sourceforge.net/jomc/1.2/jomc-tools-1.2.3" )
563 private org.apache.commons.cli.Option getNoModletResourceValidation()
564 {
565 final org.apache.commons.cli.Option _d = (org.apache.commons.cli.Option) org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getDependency( this, "NoModletResourceValidation" );
566 assert _d != null : "'NoModletResourceValidation' dependency not found.";
567 return _d;
568 }
569
570
571
572
573
574
575
576
577
578
579
580
581 @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.2.3", comments = "See http://jomc.sourceforge.net/jomc/1.2/jomc-tools-1.2.3" )
582 private org.apache.commons.cli.Option getPlatformProviderLocationOption()
583 {
584 final org.apache.commons.cli.Option _d = (org.apache.commons.cli.Option) org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getDependency( this, "PlatformProviderLocationOption" );
585 assert _d != null : "'PlatformProviderLocationOption' dependency not found.";
586 return _d;
587 }
588
589
590
591
592
593
594
595
596
597
598
599
600 @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.2.3", comments = "See http://jomc.sourceforge.net/jomc/1.2/jomc-tools-1.2.3" )
601 private org.apache.commons.cli.Option getProviderLocationOption()
602 {
603 final org.apache.commons.cli.Option _d = (org.apache.commons.cli.Option) org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getDependency( this, "ProviderLocationOption" );
604 assert _d != null : "'ProviderLocationOption' dependency not found.";
605 return _d;
606 }
607
608
609
610
611
612
613
614
615
616
617
618
619 @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.2.3", comments = "See http://jomc.sourceforge.net/jomc/1.2/jomc-tools-1.2.3" )
620 private org.apache.commons.cli.Option getSpecificationOption()
621 {
622 final org.apache.commons.cli.Option _d = (org.apache.commons.cli.Option) org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getDependency( this, "SpecificationOption" );
623 assert _d != null : "'SpecificationOption' dependency not found.";
624 return _d;
625 }
626
627
628
629
630
631
632
633
634
635
636
637
638 @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.2.3", comments = "See http://jomc.sourceforge.net/jomc/1.2/jomc-tools-1.2.3" )
639 private org.apache.commons.cli.Option getTransformerLocationOption()
640 {
641 final org.apache.commons.cli.Option _d = (org.apache.commons.cli.Option) org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getDependency( this, "TransformerLocationOption" );
642 assert _d != null : "'TransformerLocationOption' dependency not found.";
643 return _d;
644 }
645
646
647
648
649
650
651
652
653
654
655
656
657 @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.2.3", comments = "See http://jomc.sourceforge.net/jomc/1.2/jomc-tools-1.2.3" )
658 private java.lang.String getAbbreviatedCommandName()
659 {
660 final java.lang.String _p = (java.lang.String) org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getProperty( this, "abbreviatedCommandName" );
661 assert _p != null : "'abbreviatedCommandName' property not found.";
662 return _p;
663 }
664
665
666
667
668
669
670
671
672 @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.2.3", comments = "See http://jomc.sourceforge.net/jomc/1.2/jomc-tools-1.2.3" )
673 private java.lang.String getApplicationModlet()
674 {
675 final java.lang.String _p = (java.lang.String) org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getProperty( this, "applicationModlet" );
676 assert _p != null : "'applicationModlet' property not found.";
677 return _p;
678 }
679
680
681
682
683
684
685
686
687 @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.2.3", comments = "See http://jomc.sourceforge.net/jomc/1.2/jomc-tools-1.2.3" )
688 private java.lang.String getCommandName()
689 {
690 final java.lang.String _p = (java.lang.String) org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getProperty( this, "commandName" );
691 assert _p != null : "'commandName' property not found.";
692 return _p;
693 }
694
695
696
697
698
699
700
701
702 @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.2.3", comments = "See http://jomc.sourceforge.net/jomc/1.2/jomc-tools-1.2.3" )
703 private java.lang.String getModletExcludes()
704 {
705 final java.lang.String _p = (java.lang.String) org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getProperty( this, "modletExcludes" );
706 assert _p != null : "'modletExcludes' property not found.";
707 return _p;
708 }
709
710
711
712
713
714
715
716
717 @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.2.3", comments = "See http://jomc.sourceforge.net/jomc/1.2/jomc-tools-1.2.3" )
718 private java.lang.String getProviderExcludes()
719 {
720 final java.lang.String _p = (java.lang.String) org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getProperty( this, "providerExcludes" );
721 assert _p != null : "'providerExcludes' property not found.";
722 return _p;
723 }
724
725
726
727
728
729
730
731
732 @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.2.3", comments = "See http://jomc.sourceforge.net/jomc/1.2/jomc-tools-1.2.3" )
733 private java.lang.String getSchemaExcludes()
734 {
735 final java.lang.String _p = (java.lang.String) org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getProperty( this, "schemaExcludes" );
736 assert _p != null : "'schemaExcludes' property not found.";
737 return _p;
738 }
739
740
741
742
743
744
745
746
747 @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.2.3", comments = "See http://jomc.sourceforge.net/jomc/1.2/jomc-tools-1.2.3" )
748 private java.lang.String getServiceExcludes()
749 {
750 final java.lang.String _p = (java.lang.String) org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getProperty( this, "serviceExcludes" );
751 assert _p != null : "'serviceExcludes' property not found.";
752 return _p;
753 }
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769 @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.2.3", comments = "See http://jomc.sourceforge.net/jomc/1.2/jomc-tools-1.2.3" )
770 private String getApplicationTitle( final java.util.Locale locale )
771 {
772 final String _m = org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getMessage( this, "applicationTitle", locale );
773 assert _m != null : "'applicationTitle' message not found.";
774 return _m;
775 }
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790 @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.2.3", comments = "See http://jomc.sourceforge.net/jomc/1.2/jomc-tools-1.2.3" )
791 private String getCannotProcessMessage( final java.util.Locale locale, final java.lang.String itemInfo, final java.lang.String detailMessage )
792 {
793 final String _m = org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getMessage( this, "cannotProcessMessage", locale, itemInfo, detailMessage );
794 assert _m != null : "'cannotProcessMessage' message not found.";
795 return _m;
796 }
797
798
799
800
801
802
803
804
805
806
807
808
809
810 @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.2.3", comments = "See http://jomc.sourceforge.net/jomc/1.2/jomc-tools-1.2.3" )
811 private String getClasspathElementInfo( final java.util.Locale locale, final java.lang.String classpathElement )
812 {
813 final String _m = org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getMessage( this, "classpathElementInfo", locale, classpathElement );
814 assert _m != null : "'classpathElementInfo' message not found.";
815 return _m;
816 }
817
818
819
820
821
822
823
824
825
826
827
828
829
830 @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.2.3", comments = "See http://jomc.sourceforge.net/jomc/1.2/jomc-tools-1.2.3" )
831 private String getClasspathElementNotFoundWarning( final java.util.Locale locale, final java.lang.String fileName )
832 {
833 final String _m = org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getMessage( this, "classpathElementNotFoundWarning", locale, fileName );
834 assert _m != null : "'classpathElementNotFoundWarning' message not found.";
835 return _m;
836 }
837
838
839
840
841
842
843
844
845
846
847
848
849
850 @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.2.3", comments = "See http://jomc.sourceforge.net/jomc/1.2/jomc-tools-1.2.3" )
851 private String getCommandFailureMessage( final java.util.Locale locale, final java.lang.String toolName )
852 {
853 final String _m = org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getMessage( this, "commandFailureMessage", locale, toolName );
854 assert _m != null : "'commandFailureMessage' message not found.";
855 return _m;
856 }
857
858
859
860
861
862
863
864
865
866
867
868
869
870 @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.2.3", comments = "See http://jomc.sourceforge.net/jomc/1.2/jomc-tools-1.2.3" )
871 private String getCommandInfoMessage( final java.util.Locale locale, final java.lang.String toolName )
872 {
873 final String _m = org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getMessage( this, "commandInfoMessage", locale, toolName );
874 assert _m != null : "'commandInfoMessage' message not found.";
875 return _m;
876 }
877
878
879
880
881
882
883
884
885
886
887
888
889
890 @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.2.3", comments = "See http://jomc.sourceforge.net/jomc/1.2/jomc-tools-1.2.3" )
891 private String getCommandSuccessMessage( final java.util.Locale locale, final java.lang.String toolName )
892 {
893 final String _m = org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getMessage( this, "commandSuccessMessage", locale, toolName );
894 assert _m != null : "'commandSuccessMessage' message not found.";
895 return _m;
896 }
897
898
899
900
901
902
903
904
905
906
907
908
909
910 @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.2.3", comments = "See http://jomc.sourceforge.net/jomc/1.2/jomc-tools-1.2.3" )
911 private String getDefaultLogLevelInfo( final java.util.Locale locale, final java.lang.String defaultLogLevel )
912 {
913 final String _m = org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getMessage( this, "defaultLogLevelInfo", locale, defaultLogLevel );
914 assert _m != null : "'defaultLogLevelInfo' message not found.";
915 return _m;
916 }
917
918
919
920
921
922
923
924
925
926
927
928
929
930 @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.2.3", comments = "See http://jomc.sourceforge.net/jomc/1.2/jomc-tools-1.2.3" )
931 private String getDocumentFileInfo( final java.util.Locale locale, final java.lang.String documentFile )
932 {
933 final String _m = org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getMessage( this, "documentFileInfo", locale, documentFile );
934 assert _m != null : "'documentFileInfo' message not found.";
935 return _m;
936 }
937
938
939
940
941
942
943
944
945
946
947
948
949
950 @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.2.3", comments = "See http://jomc.sourceforge.net/jomc/1.2/jomc-tools-1.2.3" )
951 private String getDocumentFileNotFoundWarning( final java.util.Locale locale, final java.lang.String fileName )
952 {
953 final String _m = org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getMessage( this, "documentFileNotFoundWarning", locale, fileName );
954 assert _m != null : "'documentFileNotFoundWarning' message not found.";
955 return _m;
956 }
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971 @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.2.3", comments = "See http://jomc.sourceforge.net/jomc/1.2/jomc-tools-1.2.3" )
972 private String getExcludedModletInfo( final java.util.Locale locale, final java.lang.String resourceName, final java.lang.String modletIdentifier )
973 {
974 final String _m = org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getMessage( this, "excludedModletInfo", locale, resourceName, modletIdentifier );
975 assert _m != null : "'excludedModletInfo' message not found.";
976 return _m;
977 }
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992 @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.2.3", comments = "See http://jomc.sourceforge.net/jomc/1.2/jomc-tools-1.2.3" )
993 private String getExcludedProviderInfo( final java.util.Locale locale, final java.lang.String resourceName, final java.lang.String providerName )
994 {
995 final String _m = org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getMessage( this, "excludedProviderInfo", locale, resourceName, providerName );
996 assert _m != null : "'excludedProviderInfo' message not found.";
997 return _m;
998 }
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013 @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.2.3", comments = "See http://jomc.sourceforge.net/jomc/1.2/jomc-tools-1.2.3" )
1014 private String getExcludedSchemaInfo( final java.util.Locale locale, final java.lang.String resourceName, final java.lang.String contextId )
1015 {
1016 final String _m = org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getMessage( this, "excludedSchemaInfo", locale, resourceName, contextId );
1017 assert _m != null : "'excludedSchemaInfo' message not found.";
1018 return _m;
1019 }
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034 @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.2.3", comments = "See http://jomc.sourceforge.net/jomc/1.2/jomc-tools-1.2.3" )
1035 private String getExcludedServiceInfo( final java.util.Locale locale, final java.lang.String resourceName, final java.lang.String serviceName )
1036 {
1037 final String _m = org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getMessage( this, "excludedServiceInfo", locale, resourceName, serviceName );
1038 assert _m != null : "'excludedServiceInfo' message not found.";
1039 return _m;
1040 }
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054 @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.2.3", comments = "See http://jomc.sourceforge.net/jomc/1.2/jomc-tools-1.2.3" )
1055 private String getImplementationNotFoundWarning( final java.util.Locale locale, final java.lang.String implementationIdentifier )
1056 {
1057 final String _m = org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getMessage( this, "implementationNotFoundWarning", locale, implementationIdentifier );
1058 assert _m != null : "'implementationNotFoundWarning' message not found.";
1059 return _m;
1060 }
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074 @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.2.3", comments = "See http://jomc.sourceforge.net/jomc/1.2/jomc-tools-1.2.3" )
1075 private String getInvalidModelMessage( final java.util.Locale locale, final java.lang.String modelIdentifier )
1076 {
1077 final String _m = org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getMessage( this, "invalidModelMessage", locale, modelIdentifier );
1078 assert _m != null : "'invalidModelMessage' message not found.";
1079 return _m;
1080 }
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093 @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.2.3", comments = "See http://jomc.sourceforge.net/jomc/1.2/jomc-tools-1.2.3" )
1094 private String getLongDescriptionMessage( final java.util.Locale locale )
1095 {
1096 final String _m = org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getMessage( this, "longDescriptionMessage", locale );
1097 assert _m != null : "'longDescriptionMessage' message not found.";
1098 return _m;
1099 }
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113 @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.2.3", comments = "See http://jomc.sourceforge.net/jomc/1.2/jomc-tools-1.2.3" )
1114 private String getModuleNotFoundWarning( final java.util.Locale locale, final java.lang.String moduleName )
1115 {
1116 final String _m = org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getMessage( this, "moduleNotFoundWarning", locale, moduleName );
1117 assert _m != null : "'moduleNotFoundWarning' message not found.";
1118 return _m;
1119 }
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133 @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.2.3", comments = "See http://jomc.sourceforge.net/jomc/1.2/jomc-tools-1.2.3" )
1134 private String getReadingMessage( final java.util.Locale locale, final java.lang.String locationInfo )
1135 {
1136 final String _m = org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getMessage( this, "readingMessage", locale, locationInfo );
1137 assert _m != null : "'readingMessage' message not found.";
1138 return _m;
1139 }
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151 @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.2.3", comments = "See http://jomc.sourceforge.net/jomc/1.2/jomc-tools-1.2.3" )
1152 private String getSeparator( final java.util.Locale locale )
1153 {
1154 final String _m = org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getMessage( this, "separator", locale );
1155 assert _m != null : "'separator' message not found.";
1156 return _m;
1157 }
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170 @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.2.3", comments = "See http://jomc.sourceforge.net/jomc/1.2/jomc-tools-1.2.3" )
1171 private String getShortDescriptionMessage( final java.util.Locale locale )
1172 {
1173 final String _m = org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getMessage( this, "shortDescriptionMessage", locale );
1174 assert _m != null : "'shortDescriptionMessage' message not found.";
1175 return _m;
1176 }
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190 @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.2.3", comments = "See http://jomc.sourceforge.net/jomc/1.2/jomc-tools-1.2.3" )
1191 private String getSpecificationNotFoundWarning( final java.util.Locale locale, final java.lang.String specificationIdentifier )
1192 {
1193 final String _m = org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getMessage( this, "specificationNotFoundWarning", locale, specificationIdentifier );
1194 assert _m != null : "'specificationNotFoundWarning' message not found.";
1195 return _m;
1196 }
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210 @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.2.3", comments = "See http://jomc.sourceforge.net/jomc/1.2/jomc-tools-1.2.3" )
1211 private String getWriteInfo( final java.util.Locale locale, final java.lang.String fileName )
1212 {
1213 final String _m = org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getMessage( this, "writeInfo", locale, fileName );
1214 assert _m != null : "'writeInfo' message not found.";
1215 return _m;
1216 }
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309 @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.2.3", comments = "See http://jomc.sourceforge.net/jomc/1.2/jomc-tools-1.2.3" )
1310 @Override
1311 public org.apache.commons.cli.Options getOptions()
1312 {
1313 final org.apache.commons.cli.Options options = new org.apache.commons.cli.Options();
1314 options.addOption( this.getClasspathOption() );
1315 options.addOption( this.getDocumentEncodingOption() );
1316 options.addOption( this.getDocumentOption() );
1317 options.addOption( this.getDocumentsOption() );
1318 options.addOption( this.getImplementationOption() );
1319 options.addOption( this.getModelContextFactoryOption() );
1320 options.addOption( this.getModelOption() );
1321 options.addOption( this.getModletLocationOption() );
1322 options.addOption( this.getModletSchemaSystemIdOption() );
1323 options.addOption( this.getModuleLocationOption() );
1324 options.addOption( this.getModuleNameOption() );
1325 options.addOption( this.getNoClasspathResolutionOption() );
1326 options.addOption( this.getNoModelProcessingOption() );
1327 options.addOption( this.getNoModelResourceValidation() );
1328 options.addOption( this.getNoModletResourceValidation() );
1329 options.addOption( this.getPlatformProviderLocationOption() );
1330 options.addOption( this.getProviderLocationOption() );
1331 options.addOption( this.getSpecificationOption() );
1332 options.addOption( this.getTransformerLocationOption() );
1333 return options;
1334 }
1335
1336
1337 }