1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21 package org.apache.directory.api.dsmlv2.request;
22
23
24 import java.io.IOException;
25 import java.lang.reflect.Array;
26 import java.util.Base64;
27 import java.util.HashMap;
28
29 import org.apache.directory.api.asn1.DecoderException;
30 import org.apache.directory.api.asn1.util.Oid;
31 import org.apache.directory.api.dsmlv2.AbstractGrammar;
32 import org.apache.directory.api.dsmlv2.DsmlControl;
33 import org.apache.directory.api.dsmlv2.DsmlLiterals;
34 import org.apache.directory.api.dsmlv2.Dsmlv2Container;
35 import org.apache.directory.api.dsmlv2.Dsmlv2StatesEnum;
36 import org.apache.directory.api.dsmlv2.Grammar;
37 import org.apache.directory.api.dsmlv2.GrammarAction;
38 import org.apache.directory.api.dsmlv2.GrammarTransition;
39 import org.apache.directory.api.dsmlv2.ParserUtils;
40 import org.apache.directory.api.dsmlv2.Tag;
41 import org.apache.directory.api.dsmlv2.request.BatchRequestDsml.OnError;
42 import org.apache.directory.api.dsmlv2.request.BatchRequestDsml.Processing;
43 import org.apache.directory.api.dsmlv2.request.BatchRequestDsml.ResponseOrder;
44 import org.apache.directory.api.i18n.I18n;
45 import org.apache.directory.api.ldap.codec.api.ControlFactory;
46 import org.apache.directory.api.ldap.codec.api.LdapApiService;
47 import org.apache.directory.api.ldap.codec.api.LdapApiServiceFactory;
48 import org.apache.directory.api.ldap.codec.api.LdapCodecConstants;
49 import org.apache.directory.api.ldap.model.entry.Value;
50 import org.apache.directory.api.ldap.model.exception.LdapException;
51 import org.apache.directory.api.ldap.model.exception.LdapInvalidDnException;
52 import org.apache.directory.api.ldap.model.exception.LdapSchemaException;
53 import org.apache.directory.api.ldap.model.filter.ExprNode;
54 import org.apache.directory.api.ldap.model.message.AbandonRequestImpl;
55 import org.apache.directory.api.ldap.model.message.AddRequestImpl;
56 import org.apache.directory.api.ldap.model.message.AliasDerefMode;
57 import org.apache.directory.api.ldap.model.message.BindRequestImpl;
58 import org.apache.directory.api.ldap.model.message.CompareRequest;
59 import org.apache.directory.api.ldap.model.message.CompareRequestImpl;
60 import org.apache.directory.api.ldap.model.message.Control;
61 import org.apache.directory.api.ldap.model.message.DeleteRequestImpl;
62 import org.apache.directory.api.ldap.model.message.ModifyDnRequestImpl;
63 import org.apache.directory.api.ldap.model.message.ModifyRequestImpl;
64 import org.apache.directory.api.ldap.model.message.OpaqueExtendedRequest;
65 import org.apache.directory.api.ldap.model.message.Request;
66 import org.apache.directory.api.ldap.model.message.SearchRequest;
67 import org.apache.directory.api.ldap.model.message.SearchRequestImpl;
68 import org.apache.directory.api.ldap.model.message.SearchScope;
69 import org.apache.directory.api.ldap.model.message.controls.OpaqueControl;
70 import org.apache.directory.api.ldap.model.name.Dn;
71 import org.apache.directory.api.ldap.model.name.Rdn;
72 import org.apache.directory.api.util.Strings;
73 import org.xmlpull.v1.XmlPullParser;
74 import org.xmlpull.v1.XmlPullParserException;
75
76
77
78
79
80
81
82 public final class Dsmlv2Grammar extends AbstractGrammar implements Grammar
83 {
84 private LdapApiService codec = LdapApiServiceFactory.getSingleton();
85
86
87
88
89
90
91
92
93 private final GrammarAction batchRequestCreation = new GrammarAction( "Create Batch Request" )
94 {
95
96
97
98 @Override
99 public void action( Dsmlv2Container container ) throws XmlPullParserException
100 {
101 BatchRequestDsml batchRequest = new BatchRequestDsml();
102
103 container.setBatchRequest( batchRequest );
104
105 XmlPullParser xpp = container.getParser();
106
107
108 String attributeValue;
109
110 attributeValue = xpp.getAttributeValue( Strings.EMPTY_STRING, DsmlLiterals.REQUEST_ID );
111
112 if ( attributeValue != null )
113 {
114 batchRequest.setRequestID( ParserUtils.parseAndVerifyRequestID( attributeValue, xpp ) );
115 }
116
117 attributeValue = xpp.getAttributeValue( Strings.EMPTY_STRING, DsmlLiterals.PROCESSING );
118
119 if ( attributeValue != null )
120 {
121 if ( DsmlLiterals.SEQUENTIAL.equals( attributeValue ) )
122 {
123 batchRequest.setProcessing( Processing.SEQUENTIAL );
124 }
125 else if ( DsmlLiterals.PARALLEL.equals( attributeValue ) )
126 {
127 batchRequest.setProcessing( Processing.PARALLEL );
128 }
129 else
130 {
131 throw new XmlPullParserException( I18n.err( I18n.ERR_03013_UNKNOWN_PROCESSING_VALUE ), xpp, null );
132 }
133 }
134 else
135 {
136 batchRequest.setProcessing( Processing.SEQUENTIAL );
137 }
138
139
140 attributeValue = xpp.getAttributeValue( Strings.EMPTY_STRING, DsmlLiterals.ON_ERROR );
141
142 if ( attributeValue != null )
143 {
144 if ( DsmlLiterals.RESUME.equals( attributeValue ) )
145 {
146 batchRequest.setOnError( OnError.RESUME );
147 }
148 else if ( DsmlLiterals.EXIT.equals( attributeValue ) )
149 {
150 batchRequest.setOnError( OnError.EXIT );
151 }
152 else
153 {
154 throw new XmlPullParserException( I18n.err( I18n.ERR_03014_UNKNOWN_ON_ERROR_VALUE ), xpp, null );
155 }
156 }
157 else
158 {
159 batchRequest.setOnError( OnError.EXIT );
160 }
161
162
163 attributeValue = xpp.getAttributeValue( Strings.EMPTY_STRING, DsmlLiterals.RESPONSE_ORDER );
164
165 if ( attributeValue != null )
166 {
167 if ( DsmlLiterals.SEQUENTIAL.equals( attributeValue ) )
168 {
169 batchRequest.setResponseOrder( ResponseOrder.SEQUENTIAL );
170 }
171 else if ( DsmlLiterals.UNORDERED.equals( attributeValue ) )
172 {
173 batchRequest.setResponseOrder( ResponseOrder.UNORDERED );
174 }
175 else
176 {
177 throw new XmlPullParserException( I18n.err( I18n.ERR_03015_UNKNOWN_RESPONSE_ORDER_VALUE ), xpp, null );
178 }
179 }
180 else
181 {
182 batchRequest.setResponseOrder( ResponseOrder.SEQUENTIAL );
183 }
184 }
185 };
186
187
188
189
190 private final GrammarAction abandonRequestCreation = new GrammarAction( "Create Abandon Request" )
191 {
192
193
194
195 @Override
196 public void action( Dsmlv2Container container ) throws XmlPullParserException
197 {
198 AbandonRequestDsml abandonRequest = new AbandonRequestDsml( codec, new AbandonRequestImpl() );
199 container.getBatchRequest().addRequest( abandonRequest );
200
201 XmlPullParser xpp = container.getParser();
202
203
204 String attributeValue;
205
206 attributeValue = xpp.getAttributeValue( Strings.EMPTY_STRING, DsmlLiterals.REQUEST_ID );
207
208 if ( attributeValue != null )
209 {
210 abandonRequest.setMessageId( ParserUtils.parseAndVerifyRequestID( attributeValue, xpp ) );
211 }
212 else
213 {
214 if ( ParserUtils.isRequestIdNeeded( container ) )
215 {
216 throw new XmlPullParserException( I18n.err( I18n.ERR_03000_REQUEST_ID_REQUIRED ), xpp, null );
217 }
218 }
219
220
221 attributeValue = xpp.getAttributeValue( Strings.EMPTY_STRING, DsmlLiterals.ABANDON_ID );
222
223 if ( attributeValue != null )
224 {
225 try
226 {
227 abandonRequest.setAbandoned( Integer.parseInt( attributeValue ) );
228 }
229 catch ( NumberFormatException nfe )
230 {
231 throw new XmlPullParserException( I18n.err( I18n.ERR_03017_ABANDON_ID_NOT_INTEGER ), xpp, nfe );
232 }
233 }
234 else
235 {
236 throw new XmlPullParserException( I18n.err( I18n.ERR_03018_ABANDON_ID_REQUIRED ), xpp, null );
237 }
238 }
239 };
240
241
242
243
244 private final GrammarAction addRequestCreation = new GrammarAction( "Create Add Request" )
245 {
246
247
248
249 @Override
250 public void action( Dsmlv2Container container ) throws XmlPullParserException
251 {
252 AddRequestDsml addRequest = new AddRequestDsml( codec, new AddRequestImpl() );
253 container.getBatchRequest().addRequest( addRequest );
254
255 XmlPullParser xpp = container.getParser();
256
257
258 String attributeValue;
259
260 attributeValue = xpp.getAttributeValue( Strings.EMPTY_STRING, DsmlLiterals.REQUEST_ID );
261
262 if ( attributeValue != null )
263 {
264 addRequest.setMessageId( ParserUtils.parseAndVerifyRequestID( attributeValue, xpp ) );
265 }
266 else
267 {
268 if ( ParserUtils.isRequestIdNeeded( container ) )
269 {
270 throw new XmlPullParserException( I18n.err( I18n.ERR_03000_REQUEST_ID_REQUIRED ), xpp, null );
271 }
272 }
273
274
275 attributeValue = xpp.getAttributeValue( Strings.EMPTY_STRING, DsmlLiterals.DN );
276
277 if ( attributeValue != null )
278 {
279 try
280 {
281 addRequest.setEntryDn( new Dn( attributeValue ) );
282 }
283 catch ( LdapInvalidDnException lide )
284 {
285 throw new XmlPullParserException( I18n.err( I18n.ERR_03039_PARSING_ERROR, lide.getMessage() ), xpp, lide );
286 }
287 }
288 else
289 {
290 throw new XmlPullParserException( I18n.err( I18n.ERR_03001_DN_ATTRIBUTE_REQUIRED ), xpp, null );
291 }
292 }
293 };
294
295
296
297
298 private final GrammarAction addRequestAddAttribute = new GrammarAction( "Add Attribute to Add Request" )
299 {
300
301
302
303 @Override
304 public void action( Dsmlv2Container container ) throws XmlPullParserException
305 {
306 AddRequestDsml addRequest = ( AddRequestDsml )
307 container.getBatchRequest().getCurrentRequest();
308
309 XmlPullParser xpp = container.getParser();
310
311
312 String attributeValue;
313
314 attributeValue = xpp.getAttributeValue( Strings.EMPTY_STRING, DsmlLiterals.NAME );
315
316 if ( attributeValue != null )
317 {
318 try
319 {
320 addRequest.addAttributeType( attributeValue );
321 }
322 catch ( LdapException le )
323 {
324 throw new XmlPullParserException( I18n.err( I18n.ERR_03020_CANT_ADD_ATTRIBUTE_VALUE ), xpp, le );
325 }
326 }
327 else
328 {
329 throw new XmlPullParserException( I18n.err( I18n.ERR_03002_NAME_ATTRIBUTE_REQUIRED ), xpp, null );
330 }
331 }
332 };
333
334
335
336
337 private final GrammarAction addRequestAddValue = new GrammarAction( "Add Value to Attribute" )
338 {
339
340
341
342 @Override
343 public void action( Dsmlv2Container container ) throws XmlPullParserException
344 {
345 AddRequestDsml addRequest = ( AddRequestDsml )
346 container.getBatchRequest().getCurrentRequest();
347
348 XmlPullParser xpp = container.getParser();
349
350 try
351 {
352
353 String typeValue = ParserUtils.getXsiTypeAttributeValue( xpp );
354
355
356 String nextText = xpp.nextText();
357
358 if ( !Strings.isEmpty( nextText ) )
359 {
360 try
361 {
362 if ( ParserUtils.isBase64BinaryValue( xpp, typeValue ) )
363 {
364 addRequest.addAttributeValue( Base64.getDecoder().decode( nextText.trim() ) );
365 }
366 else
367 {
368 addRequest.addAttributeValue( nextText.trim() );
369 }
370 }
371 catch ( LdapException le )
372 {
373 throw new XmlPullParserException( le.getMessage(), xpp, le );
374 }
375 }
376 }
377 catch ( IOException ioe )
378 {
379 throw new XmlPullParserException( I18n.err( I18n.ERR_03008_UNEXPECTED_ERROR, ioe.getMessage() ), xpp, ioe );
380 }
381 }
382 };
383
384
385
386
387 private final GrammarAction authRequestCreation = new GrammarAction( "Create Auth Request" )
388 {
389
390
391
392 @Override
393 public void action( Dsmlv2Container container ) throws XmlPullParserException
394 {
395 BindRequestDsml authRequest = new BindRequestDsml( codec, new BindRequestImpl() );
396 container.getBatchRequest().addRequest( authRequest );
397
398 authRequest.setSimple( true );
399 authRequest.setVersion3( true );
400
401 XmlPullParser xpp = container.getParser();
402
403
404 String attributeValue;
405
406 attributeValue = xpp.getAttributeValue( Strings.EMPTY_STRING, DsmlLiterals.REQUEST_ID );
407
408 if ( attributeValue != null )
409 {
410 authRequest.setMessageId( ParserUtils.parseAndVerifyRequestID( attributeValue, xpp ) );
411 }
412 else
413 {
414 if ( ParserUtils.isRequestIdNeeded( container ) )
415 {
416 throw new XmlPullParserException( I18n.err( I18n.ERR_03000_REQUEST_ID_REQUIRED ), xpp, null );
417 }
418 }
419
420 attributeValue = xpp.getAttributeValue( Strings.EMPTY_STRING, DsmlLiterals.PRINCIPAL );
421
422 if ( attributeValue != null )
423 {
424 authRequest.setName( attributeValue );
425 }
426 else
427 {
428 throw new XmlPullParserException( I18n.err( I18n.ERR_03021_PRINCIPAL_ATTRIBUTE_REQUIRED ), xpp, null );
429 }
430 }
431 };
432
433
434
435
436 private final GrammarAction compareRequestCreation = new GrammarAction( "Create Compare Request" )
437 {
438
439
440
441 @Override
442 public void action( Dsmlv2Container container ) throws XmlPullParserException
443 {
444 CompareRequestDsml compareRequest = new CompareRequestDsml( codec, new CompareRequestImpl() );
445 container.getBatchRequest().addRequest( compareRequest );
446
447 XmlPullParser xpp = container.getParser();
448
449
450 String attributeValue;
451
452 attributeValue = xpp.getAttributeValue( Strings.EMPTY_STRING, DsmlLiterals.REQUEST_ID );
453
454 if ( attributeValue != null )
455 {
456 compareRequest.setMessageId( ParserUtils.parseAndVerifyRequestID( attributeValue, xpp ) );
457 }
458 else
459 {
460 if ( ParserUtils.isRequestIdNeeded( container ) )
461 {
462 throw new XmlPullParserException( I18n.err( I18n.ERR_03000_REQUEST_ID_REQUIRED ), xpp, null );
463 }
464 }
465
466
467 attributeValue = xpp.getAttributeValue( Strings.EMPTY_STRING, DsmlLiterals.DN );
468
469 if ( attributeValue != null )
470 {
471 try
472 {
473 compareRequest.setName( new Dn( attributeValue ) );
474 }
475 catch ( LdapInvalidDnException lide )
476 {
477 throw new XmlPullParserException( I18n.err( I18n.ERR_03039_PARSING_ERROR, lide.getMessage() ), xpp, lide );
478 }
479 }
480 else
481 {
482 throw new XmlPullParserException( I18n.err( I18n.ERR_03001_DN_ATTRIBUTE_REQUIRED ), xpp, null );
483 }
484 }
485 };
486
487
488
489
490 private final GrammarAction compareRequestAddAssertion = new GrammarAction( "Add Assertion to Compare Request" )
491 {
492
493
494
495 @Override
496 public void action( Dsmlv2Container container ) throws XmlPullParserException
497 {
498 CompareRequest compareRequest = ( CompareRequest ) container.getBatchRequest().getCurrentRequest();
499
500 XmlPullParser xpp = container.getParser();
501
502
503 String attributeId;
504
505
506 attributeId = xpp.getAttributeValue( Strings.EMPTY_STRING, DsmlLiterals.NAME );
507
508 if ( attributeId != null )
509 {
510 compareRequest.setAttributeId( attributeId );
511 }
512 else
513 {
514 throw new XmlPullParserException( I18n.err( I18n.ERR_03002_NAME_ATTRIBUTE_REQUIRED ), xpp, null );
515 }
516 }
517 };
518
519
520
521
522 private final GrammarAction compareRequestAddValue = new GrammarAction( "Add Value to Compare Request" )
523 {
524
525
526
527 @Override
528 public void action( Dsmlv2Container container ) throws XmlPullParserException
529 {
530 CompareRequest compareRequest = ( CompareRequest ) container.getBatchRequest().getCurrentRequest();
531
532 XmlPullParser xpp = container.getParser();
533
534 try
535 {
536
537 String typeValue = ParserUtils.getXsiTypeAttributeValue( xpp );
538
539
540 String nextText = xpp.nextText();
541
542 if ( !Strings.isEmpty( nextText ) )
543 {
544 if ( ParserUtils.isBase64BinaryValue( xpp, typeValue ) )
545 {
546 compareRequest.setAssertionValue( Base64.getDecoder().decode( nextText.trim() ) );
547 }
548 else
549 {
550 compareRequest.setAssertionValue( nextText.trim() );
551 }
552 }
553 }
554 catch ( IOException ioe )
555 {
556 throw new XmlPullParserException( I18n.err( I18n.ERR_03008_UNEXPECTED_ERROR, ioe.getMessage() ), xpp, ioe );
557 }
558 }
559 };
560
561
562
563
564 private final GrammarAction delRequestCreation = new GrammarAction( "Create Del Request" )
565 {
566
567
568
569 @Override
570 public void action( Dsmlv2Container container ) throws XmlPullParserException
571 {
572 DelRequestDsml delRequest = new DelRequestDsml( codec, new DeleteRequestImpl() );
573 container.getBatchRequest().addRequest( delRequest );
574
575 XmlPullParser xpp = container.getParser();
576
577
578 String attributeValue;
579
580 attributeValue = xpp.getAttributeValue( Strings.EMPTY_STRING, DsmlLiterals.REQUEST_ID );
581
582 if ( attributeValue != null )
583 {
584 delRequest.setMessageId( ParserUtils.parseAndVerifyRequestID( attributeValue, xpp ) );
585 }
586 else
587 {
588 if ( ParserUtils.isRequestIdNeeded( container ) )
589 {
590 throw new XmlPullParserException( I18n.err( I18n.ERR_03000_REQUEST_ID_REQUIRED ), xpp, null );
591 }
592 }
593
594
595 attributeValue = xpp.getAttributeValue( Strings.EMPTY_STRING, DsmlLiterals.DN );
596
597 if ( attributeValue != null )
598 {
599 try
600 {
601 delRequest.setName( new Dn( attributeValue ) );
602 }
603 catch ( LdapInvalidDnException lide )
604 {
605 throw new XmlPullParserException( I18n.err( I18n.ERR_03039_PARSING_ERROR, lide.getMessage() ), xpp, lide );
606 }
607 }
608 else
609 {
610 throw new XmlPullParserException( I18n.err( I18n.ERR_03001_DN_ATTRIBUTE_REQUIRED ), xpp, null );
611 }
612 }
613 };
614
615
616
617
618 private final GrammarAction extendedRequestCreation = new GrammarAction( "Create Extended Request" )
619 {
620
621
622
623 @Override
624 public void action( Dsmlv2Container container ) throws XmlPullParserException
625 {
626 ExtendedRequestDsml<?, ?> extendedRequest =
627 new ExtendedRequestDsml<>( codec,
628 new OpaqueExtendedRequest() );
629 container.getBatchRequest().addRequest( extendedRequest );
630
631 XmlPullParser xpp = container.getParser();
632
633
634 String attributeValue;
635
636 attributeValue = xpp.getAttributeValue( Strings.EMPTY_STRING, DsmlLiterals.REQUEST_ID );
637
638 if ( attributeValue != null )
639 {
640 extendedRequest.setMessageId( ParserUtils.parseAndVerifyRequestID( attributeValue, xpp ) );
641 }
642 else
643 {
644 if ( ParserUtils.isRequestIdNeeded( container ) )
645 {
646 throw new XmlPullParserException( I18n.err( I18n.ERR_03000_REQUEST_ID_REQUIRED ), xpp, null );
647 }
648 }
649 }
650 };
651
652
653
654
655 private final GrammarAction extendedRequestAddName = new GrammarAction( "Add Name to Extended Request" )
656 {
657
658
659
660 @Override
661 public void action( Dsmlv2Container container ) throws XmlPullParserException
662 {
663 ExtendedRequestDsml<?, ?> extendedRequest = ( ExtendedRequestDsml<?, ?> )
664 container.getBatchRequest().getCurrentRequest();
665
666 XmlPullParser xpp = container.getParser();
667
668 try
669 {
670 String nextText = xpp.nextText();
671
672 if ( Strings.isEmpty( nextText ) )
673 {
674 throw new XmlPullParserException( I18n.err( I18n.ERR_03022_NULL_REQUEST_NAME ), xpp, null );
675 }
676 else
677 {
678 String oid = nextText.trim();
679
680 if ( Oid.isOid( oid ) )
681 {
682 extendedRequest.setRequestName( nextText.trim() );
683 }
684 else
685 {
686 throw new XmlPullParserException( I18n.err( I18n.ERR_03038_BAD_OID, oid ), xpp, null );
687 }
688 }
689 }
690 catch ( IOException ioe )
691 {
692 throw new XmlPullParserException( I18n.err( I18n.ERR_03008_UNEXPECTED_ERROR, ioe.getMessage() ), xpp, ioe );
693 }
694 }
695 };
696
697
698
699
700 private final GrammarAction extendedRequestAddValue = new GrammarAction( "Add Value to Extended Request" )
701 {
702
703
704
705 @Override
706 public void action( Dsmlv2Container container ) throws XmlPullParserException
707 {
708 ExtendedRequestDsml<?, ?> extendedRequest = ( ExtendedRequestDsml<?, ?> )
709 container.getBatchRequest().getCurrentRequest();
710
711 XmlPullParser xpp = container.getParser();
712
713 try
714 {
715
716 String typeValue = ParserUtils.getXsiTypeAttributeValue( xpp );
717
718
719 String nextText = xpp.nextText();
720
721 if ( !Strings.isEmpty( nextText ) )
722 {
723 if ( ParserUtils.isBase64BinaryValue( xpp, typeValue ) )
724 {
725 extendedRequest.setRequestValue( Base64.getDecoder().decode( nextText.trim() ) );
726 }
727 else
728 {
729 extendedRequest.setRequestValue( Strings.getBytesUtf8( nextText.trim() ) );
730 }
731 }
732 }
733 catch ( IOException ioe )
734 {
735 throw new XmlPullParserException( I18n.err( I18n.ERR_03008_UNEXPECTED_ERROR, ioe.getMessage() ), xpp, ioe );
736 }
737 }
738 };
739
740
741
742
743 private final GrammarAction modDNRequestCreation = new GrammarAction( "Create Modify Dn Request" )
744 {
745
746
747
748 @Override
749 public void action( Dsmlv2Container container ) throws XmlPullParserException
750 {
751 ModifyDNRequestDsml modifyDNRequest = new ModifyDNRequestDsml( codec, new ModifyDnRequestImpl() );
752 container.getBatchRequest().addRequest( modifyDNRequest );
753
754 XmlPullParser xpp = container.getParser();
755
756
757 String attributeValue;
758
759 attributeValue = xpp.getAttributeValue( Strings.EMPTY_STRING, DsmlLiterals.REQUEST_ID );
760
761 if ( attributeValue != null )
762 {
763 modifyDNRequest.setMessageId( ParserUtils.parseAndVerifyRequestID( attributeValue, xpp ) );
764 }
765 else
766 {
767 if ( ParserUtils.isRequestIdNeeded( container ) )
768 {
769 throw new XmlPullParserException( I18n.err( I18n.ERR_03000_REQUEST_ID_REQUIRED ), xpp, null );
770 }
771 }
772
773
774 attributeValue = xpp.getAttributeValue( Strings.EMPTY_STRING, DsmlLiterals.DN );
775
776 if ( attributeValue != null )
777 {
778 try
779 {
780 modifyDNRequest.setName( new Dn( attributeValue ) );
781 }
782 catch ( LdapInvalidDnException lide )
783 {
784 throw new XmlPullParserException( I18n.err( I18n.ERR_03039_PARSING_ERROR, lide.getMessage() ), xpp, lide );
785 }
786 }
787 else
788 {
789 throw new XmlPullParserException( I18n.err( I18n.ERR_03001_DN_ATTRIBUTE_REQUIRED ), xpp, null );
790 }
791
792
793 attributeValue = xpp.getAttributeValue( Strings.EMPTY_STRING, DsmlLiterals.NEW_RDN );
794
795 if ( attributeValue != null )
796 {
797 try
798 {
799 modifyDNRequest.setNewRdn( new Rdn( attributeValue ) );
800 }
801 catch ( LdapInvalidDnException lide )
802 {
803 throw new XmlPullParserException( I18n.err( I18n.ERR_03039_PARSING_ERROR, lide.getMessage() ), xpp, lide );
804 }
805 }
806 else
807 {
808 throw new XmlPullParserException( I18n.err( I18n.ERR_03023_NEW_RDN_ATTRIBUTE_REQUESTED ), xpp, null );
809 }
810
811
812 attributeValue = xpp.getAttributeValue( Strings.EMPTY_STRING, DsmlLiterals.DELETE_OLD_RDN );
813
814 if ( attributeValue != null )
815 {
816 if ( ( attributeValue.equalsIgnoreCase( DsmlLiterals.TRUE ) ) || ( "1".equals( attributeValue ) ) )
817 {
818 modifyDNRequest.setDeleteOldRdn( true );
819 }
820 else if ( ( attributeValue.equalsIgnoreCase( DsmlLiterals.FALSE ) ) || ( "0".equals( attributeValue ) ) )
821 {
822 modifyDNRequest.setDeleteOldRdn( false );
823 }
824 else
825 {
826 throw new XmlPullParserException( I18n.err( I18n.ERR_03024_INCORRECT_DELETE_OLD_RDN_VALUE ), xpp, null );
827 }
828 }
829 else
830 {
831 modifyDNRequest.setDeleteOldRdn( true );
832 }
833
834
835 attributeValue = xpp.getAttributeValue( Strings.EMPTY_STRING, DsmlLiterals.NEW_SUPERIOR );
836
837 if ( attributeValue != null )
838 {
839 try
840 {
841 modifyDNRequest.setNewSuperior( new Dn( attributeValue ) );
842 }
843 catch ( LdapInvalidDnException lide )
844 {
845 throw new XmlPullParserException( I18n.err( I18n.ERR_03039_PARSING_ERROR, lide.getMessage() ), xpp, lide );
846 }
847 }
848 }
849 };
850
851
852
853
854 private final GrammarAction modifyRequestCreation = new GrammarAction( "Create Modify Request" )
855 {
856
857
858
859 @Override
860 public void action( Dsmlv2Container container ) throws XmlPullParserException
861 {
862 ModifyRequestDsml modifyRequest = new ModifyRequestDsml( codec, new ModifyRequestImpl() );
863 container.getBatchRequest().addRequest( modifyRequest );
864
865 XmlPullParser xpp = container.getParser();
866
867
868 String attributeValue;
869
870 attributeValue = xpp.getAttributeValue( Strings.EMPTY_STRING, DsmlLiterals.REQUEST_ID );
871
872 if ( attributeValue != null )
873 {
874 modifyRequest.setMessageId( ParserUtils.parseAndVerifyRequestID( attributeValue, xpp ) );
875 }
876 else
877 {
878 if ( ParserUtils.isRequestIdNeeded( container ) )
879 {
880 throw new XmlPullParserException( I18n.err( I18n.ERR_03000_REQUEST_ID_REQUIRED ), xpp, null );
881 }
882 }
883
884
885 attributeValue = xpp.getAttributeValue( Strings.EMPTY_STRING, DsmlLiterals.DN );
886
887 if ( attributeValue != null )
888 {
889 try
890 {
891 modifyRequest.setName( new Dn( attributeValue ) );
892 }
893 catch ( LdapInvalidDnException lide )
894 {
895 throw new XmlPullParserException( I18n.err( I18n.ERR_03039_PARSING_ERROR, lide.getLocalizedMessage() ), xpp, lide );
896 }
897 }
898 else
899 {
900 throw new XmlPullParserException( I18n.err( I18n.ERR_03001_DN_ATTRIBUTE_REQUIRED ), xpp, null );
901 }
902 }
903 };
904
905
906
907
908 private final GrammarAction modifyRequestAddModification = new GrammarAction( "Adds Modification to Modify Request" )
909 {
910
911
912
913 @Override
914 public void action( Dsmlv2Container container ) throws XmlPullParserException
915 {
916 ModifyRequestDsml modifyRequest = ( ModifyRequestDsml )
917 container.getBatchRequest().getCurrentRequest();
918
919 XmlPullParser xpp = container.getParser();
920
921
922 String attributeValue;
923
924 attributeValue = xpp.getAttributeValue( Strings.EMPTY_STRING, DsmlLiterals.OPERATION );
925
926 if ( attributeValue != null )
927 {
928 if ( DsmlLiterals.ADD.equals( attributeValue ) )
929 {
930 modifyRequest.setCurrentOperation( LdapCodecConstants.OPERATION_ADD );
931 }
932 else if ( DsmlLiterals.DELETE.equals( attributeValue ) )
933 {
934 modifyRequest.setCurrentOperation( LdapCodecConstants.OPERATION_DELETE );
935 }
936 else if ( DsmlLiterals.REPLACE.equals( attributeValue ) )
937 {
938 modifyRequest.setCurrentOperation( LdapCodecConstants.OPERATION_REPLACE );
939 }
940 else if ( DsmlLiterals.INCREMENT.equals( attributeValue ) )
941 {
942 modifyRequest.setCurrentOperation( LdapCodecConstants.OPERATION_INCREMENT );
943 }
944 else
945 {
946 throw new XmlPullParserException( I18n.err( I18n.ERR_03040_UNKNOWN_OPERATION ), xpp, null );
947 }
948 }
949 else
950 {
951 throw new XmlPullParserException( I18n.err( I18n.ERR_03025_OPERATION_TTRIBUTE_REQUIRED ), xpp, null );
952 }
953
954
955 attributeValue = xpp.getAttributeValue( Strings.EMPTY_STRING, DsmlLiterals.NAME );
956
957 if ( attributeValue != null )
958 {
959 modifyRequest.addAttributeTypeAndValues( attributeValue );
960 }
961 else
962 {
963 throw new XmlPullParserException( I18n.err( I18n.ERR_03002_NAME_ATTRIBUTE_REQUIRED ), xpp, null );
964 }
965 }
966 };
967
968
969
970
971 private final GrammarAction modifyRequestAddValue = new GrammarAction(
972 "Add Value to Modification of Modify Request" )
973 {
974
975
976
977 @Override
978 public void action( Dsmlv2Container container ) throws XmlPullParserException
979 {
980 ModifyRequestDsml modifyRequest = ( ModifyRequestDsml )
981 container.getBatchRequest().getCurrentRequest();
982
983 XmlPullParser xpp = container.getParser();
984
985 try
986 {
987
988 String typeValue = ParserUtils.getXsiTypeAttributeValue( xpp );
989
990
991 String nextText = xpp.nextText();
992
993
994 try
995 {
996 if ( ParserUtils.isBase64BinaryValue( xpp, typeValue ) )
997 {
998 modifyRequest.addAttributeValue( Base64.getDecoder().decode( nextText.trim() ) );
999 }
1000 else
1001 {
1002 modifyRequest.addAttributeValue( nextText.trim() );
1003 }
1004 }
1005 catch ( LdapException le )
1006 {
1007 throw new XmlPullParserException( le.getMessage(), xpp, le );
1008 }
1009 }
1010 catch ( IOException ioe )
1011 {
1012 throw new XmlPullParserException( I18n.err( I18n.ERR_03008_UNEXPECTED_ERROR, ioe.getMessage() ), xpp, ioe );
1013 }
1014 }
1015 };
1016
1017
1018
1019
1020 private final GrammarAction searchRequestCreation = new GrammarAction( "Create Search Request" )
1021 {
1022
1023
1024
1025 @Override
1026 public void action( Dsmlv2Container container ) throws XmlPullParserException
1027 {
1028 SearchRequestDsml searchRequest = new SearchRequestDsml( codec, new SearchRequestImpl() );
1029 container.getBatchRequest().addRequest( searchRequest );
1030
1031 XmlPullParser xpp = container.getParser();
1032
1033
1034 String attributeValue;
1035
1036 attributeValue = xpp.getAttributeValue( Strings.EMPTY_STRING, DsmlLiterals.REQUEST_ID );
1037
1038 if ( attributeValue != null )
1039 {
1040 searchRequest.setMessageId( ParserUtils.parseAndVerifyRequestID( attributeValue, xpp ) );
1041 }
1042 else
1043 {
1044 if ( ParserUtils.isRequestIdNeeded( container ) )
1045 {
1046 throw new XmlPullParserException( I18n.err( I18n.ERR_03000_REQUEST_ID_REQUIRED ), xpp, null );
1047 }
1048 }
1049
1050
1051 attributeValue = xpp.getAttributeValue( Strings.EMPTY_STRING, DsmlLiterals.DN );
1052
1053 if ( attributeValue != null )
1054 {
1055 try
1056 {
1057 searchRequest.setBase( new Dn( attributeValue ) );
1058 }
1059 catch ( LdapInvalidDnException lide )
1060 {
1061 throw new XmlPullParserException( I18n.err( I18n.ERR_03039_PARSING_ERROR, lide.getMessage() ), xpp, lide );
1062 }
1063 }
1064 else
1065 {
1066 throw new XmlPullParserException( I18n.err( I18n.ERR_03001_DN_ATTRIBUTE_REQUIRED ), xpp, null );
1067 }
1068
1069
1070 attributeValue = xpp.getAttributeValue( Strings.EMPTY_STRING, DsmlLiterals.SCOPE );
1071
1072 if ( attributeValue != null )
1073 {
1074 if ( DsmlLiterals.BASE_OBJECT.equals( attributeValue ) )
1075 {
1076 searchRequest.setScope( SearchScope.OBJECT );
1077 }
1078 else if ( DsmlLiterals.SINGLE_LEVEL.equals( attributeValue ) )
1079 {
1080 searchRequest.setScope( SearchScope.ONELEVEL );
1081 }
1082 else if ( DsmlLiterals.WHOLE_SUBTREE.equals( attributeValue ) )
1083 {
1084 searchRequest.setScope( SearchScope.SUBTREE );
1085 }
1086 else
1087 {
1088 throw new XmlPullParserException( I18n.err( I18n.ERR_03026_UNKNOWN_SCOPE ), xpp, null );
1089 }
1090 }
1091 else
1092 {
1093 throw new XmlPullParserException( I18n.err( I18n.ERR_03027_SCOPE_ATTRIBUTE_REQUIRED ), xpp, null );
1094 }
1095
1096
1097 attributeValue = xpp.getAttributeValue( Strings.EMPTY_STRING, DsmlLiterals.DEREF_ALIASES );
1098
1099 if ( attributeValue != null )
1100 {
1101 if ( DsmlLiterals.NEVER_DEREF_ALIASES.equals( attributeValue ) )
1102 {
1103 searchRequest.setDerefAliases( AliasDerefMode.NEVER_DEREF_ALIASES );
1104 }
1105 else if ( DsmlLiterals.DEREF_IN_SEARCHING.equals( attributeValue ) )
1106 {
1107 searchRequest.setDerefAliases( AliasDerefMode.DEREF_IN_SEARCHING );
1108 }
1109 else if ( DsmlLiterals.DEREF_FINDING_BASE_OBJ.equals( attributeValue ) )
1110 {
1111 searchRequest.setDerefAliases( AliasDerefMode.DEREF_FINDING_BASE_OBJ );
1112 }
1113 else if ( DsmlLiterals.DEREF_ALWAYS.equals( attributeValue ) )
1114 {
1115 searchRequest.setDerefAliases( AliasDerefMode.DEREF_ALWAYS );
1116 }
1117 else
1118 {
1119 throw new XmlPullParserException( I18n.err( I18n.ERR_03028_UNKNOWN_DEREFALIAS_VALUE ), xpp, null );
1120 }
1121 }
1122 else
1123 {
1124 throw new XmlPullParserException( I18n.err( I18n.ERR_03029_DEREFALIA_ATTRIBUTE_REQUIRED ), xpp, null );
1125 }
1126
1127
1128 attributeValue = xpp.getAttributeValue( Strings.EMPTY_STRING, DsmlLiterals.SIZE_LIMIT );
1129
1130 if ( attributeValue != null )
1131 {
1132 try
1133 {
1134 searchRequest.setSizeLimit( Long.parseLong( attributeValue ) );
1135 }
1136 catch ( NumberFormatException nfe )
1137 {
1138 throw new XmlPullParserException( I18n.err( I18n.ERR_03030_SIZE_LIMIT_NOT_INTEGER ), xpp, nfe );
1139 }
1140 }
1141 else
1142 {
1143 searchRequest.setSizeLimit( 0L );
1144 }
1145
1146
1147 attributeValue = xpp.getAttributeValue( Strings.EMPTY_STRING, DsmlLiterals.TIME_LIMIT );
1148
1149 if ( attributeValue != null )
1150 {
1151 try
1152 {
1153 searchRequest.setTimeLimit( Integer.parseInt( attributeValue ) );
1154 }
1155 catch ( NumberFormatException nfe )
1156 {
1157 throw new XmlPullParserException( I18n.err( I18n.ERR_03031_TIME_LIMIT_NOT_INTEGER ), xpp, nfe );
1158 }
1159 }
1160 else
1161 {
1162 searchRequest.setTimeLimit( 0 );
1163 }
1164
1165
1166 attributeValue = xpp.getAttributeValue( Strings.EMPTY_STRING, DsmlLiterals.TYPES_ONLY );
1167
1168 if ( attributeValue != null )
1169 {
1170 if ( ( attributeValue.equals( DsmlLiterals.TRUE ) ) || ( "1".equals( attributeValue ) ) )
1171 {
1172 searchRequest.setTypesOnly( true );
1173 }
1174 else if ( ( attributeValue.equals( DsmlLiterals.FALSE ) ) || ( "0".equals( attributeValue ) ) )
1175 {
1176 searchRequest.setTypesOnly( false );
1177 }
1178 else
1179 {
1180 throw new XmlPullParserException( I18n.err( I18n.ERR_03032_TYPES_ONLY_NOT_BOOLEAN ), xpp, null );
1181 }
1182 }
1183 else
1184 {
1185 searchRequest.setTypesOnly( false );
1186 }
1187 }
1188 };
1189
1190
1191
1192
1193 private final GrammarAction searchRequestAddAttribute = new GrammarAction(
1194 "Add Value to Modification of Modify Request" )
1195 {
1196
1197
1198
1199 @Override
1200 public void action( Dsmlv2Container container ) throws XmlPullParserException
1201 {
1202 SearchRequest searchRequest = ( SearchRequest ) container.getBatchRequest().getCurrentRequest();
1203
1204 XmlPullParser xpp = container.getParser();
1205
1206
1207 String attributeName = xpp.getAttributeValue( Strings.EMPTY_STRING, DsmlLiterals.NAME );
1208
1209 if ( attributeName != null )
1210 {
1211 searchRequest.addAttributes( attributeName );
1212 }
1213 else
1214 {
1215 throw new XmlPullParserException( I18n.err( I18n.ERR_03002_NAME_ATTRIBUTE_REQUIRED ), xpp, null );
1216 }
1217 }
1218 };
1219
1220
1221
1222
1223 private final GrammarAction substringsFilterCreation = new GrammarAction( "Create Substring Filter" )
1224 {
1225
1226
1227
1228 @Override
1229 public void action( Dsmlv2Container container ) throws XmlPullParserException
1230 {
1231 SearchRequestDsml searchRequestDecorator = ( SearchRequestDsml )
1232 container.getBatchRequest().getCurrentRequest();
1233
1234 XmlPullParser xpp = container.getParser();
1235
1236 SubstringFilter filter = new SubstringFilter();
1237
1238
1239 try
1240 {
1241 searchRequestDecorator.addCurrentFilter( filter );
1242 }
1243 catch ( DecoderException de )
1244 {
1245 throw new XmlPullParserException( de.getMessage(), xpp, de );
1246 }
1247
1248 searchRequestDecorator.setTerminalFilter( filter );
1249
1250
1251 String attributeValue;
1252
1253 attributeValue = xpp.getAttributeValue( Strings.EMPTY_STRING, DsmlLiterals.NAME );
1254
1255 if ( attributeValue != null )
1256 {
1257 filter.setType( attributeValue );
1258 }
1259 else
1260 {
1261 throw new XmlPullParserException( I18n.err( I18n.ERR_03002_NAME_ATTRIBUTE_REQUIRED ), xpp, null );
1262 }
1263 }
1264 };
1265
1266
1267
1268
1269 private final GrammarAction substringsFilterSetInitial = new GrammarAction( "Set Initial value to Substring Filter" )
1270 {
1271
1272
1273
1274 @Override
1275 public void action( Dsmlv2Container container ) throws XmlPullParserException
1276 {
1277 SearchRequestDsml searchRequestDecorator = ( SearchRequestDsml )
1278 container.getBatchRequest().getCurrentRequest();
1279
1280 SubstringFilter substringFilter = ( SubstringFilter )
1281 searchRequestDecorator.getTerminalFilter();
1282
1283 XmlPullParser xpp = container.getParser();
1284
1285 try
1286 {
1287
1288 String typeValue = ParserUtils.getXsiTypeAttributeValue( xpp );
1289
1290
1291 String nextText = xpp.nextText();
1292
1293 if ( !Strings.isEmpty( nextText ) )
1294 {
1295 if ( ParserUtils.isBase64BinaryValue( xpp, typeValue ) )
1296 {
1297 substringFilter
1298 .setInitialSubstrings( Strings.utf8ToString( Base64.getDecoder().decode( nextText.trim() ) ) );
1299 }
1300 else
1301 {
1302 substringFilter.setInitialSubstrings( nextText.trim() );
1303 }
1304 }
1305 }
1306 catch ( IOException ioe )
1307 {
1308 throw new XmlPullParserException( I18n.err( I18n.ERR_03008_UNEXPECTED_ERROR, ioe.getMessage() ), xpp, ioe );
1309 }
1310 }
1311 };
1312
1313
1314
1315
1316 private final GrammarAction substringsFilterAddAny = new GrammarAction( "Add Any value to Substring Filter" )
1317 {
1318
1319
1320
1321 @Override
1322 public void action( Dsmlv2Container container ) throws XmlPullParserException
1323 {
1324 SearchRequestDsml searchRequestDecorator = ( SearchRequestDsml )
1325 container.getBatchRequest().getCurrentRequest();
1326
1327 SubstringFilter substringFilter = ( SubstringFilter ) searchRequestDecorator.getTerminalFilter();
1328
1329 XmlPullParser xpp = container.getParser();
1330
1331 try
1332 {
1333
1334 String typeValue = ParserUtils.getXsiTypeAttributeValue( xpp );
1335
1336
1337 String nextText = xpp.nextText();
1338
1339 if ( !Strings.isEmpty( nextText ) )
1340 {
1341 if ( ParserUtils.isBase64BinaryValue( xpp, typeValue ) )
1342 {
1343 substringFilter.addAnySubstrings( Strings.utf8ToString(
1344 Base64.getDecoder().decode( nextText.trim() ) ) );
1345 }
1346 else
1347 {
1348 substringFilter.addAnySubstrings( nextText.trim() );
1349 }
1350 }
1351 }
1352 catch ( IOException ioe )
1353 {
1354 throw new XmlPullParserException( I18n.err( I18n.ERR_03008_UNEXPECTED_ERROR, ioe.getMessage() ), xpp, ioe );
1355 }
1356 }
1357 };
1358
1359
1360
1361
1362 private final GrammarAction substringsFilterSetFinal = new GrammarAction( "Set Final value to Substring Filter" )
1363 {
1364
1365
1366
1367 @Override
1368 public void action( Dsmlv2Container container ) throws XmlPullParserException
1369 {
1370 SearchRequestDsml searchRequestDecorator = ( SearchRequestDsml )
1371 container.getBatchRequest().getCurrentRequest();
1372
1373 SubstringFilter substringFilter = ( SubstringFilter ) searchRequestDecorator.getTerminalFilter();
1374
1375 XmlPullParser xpp = container.getParser();
1376
1377 try
1378 {
1379
1380 String typeValue = ParserUtils.getXsiTypeAttributeValue( xpp );
1381
1382
1383 String nextText = xpp.nextText();
1384
1385 if ( !Strings.isEmpty( nextText ) )
1386 {
1387 if ( ParserUtils.isBase64BinaryValue( xpp, typeValue ) )
1388 {
1389 substringFilter
1390 .setFinalSubstrings( Strings.utf8ToString(
1391 Base64.getDecoder().decode( nextText.trim() ) ) );
1392 }
1393 else
1394 {
1395 substringFilter.setFinalSubstrings( nextText.trim() );
1396 }
1397 }
1398 }
1399 catch ( IOException ioe )
1400 {
1401 throw new XmlPullParserException( I18n.err( I18n.ERR_03008_UNEXPECTED_ERROR, ioe.getMessage() ), xpp, ioe );
1402 }
1403 }
1404 };
1405
1406
1407
1408
1409 private final GrammarAction substringsFilterClose = new GrammarAction( "Close Substring Filter" )
1410 {
1411
1412
1413
1414 @Override
1415 public void action( Dsmlv2Container container ) throws XmlPullParserException
1416 {
1417 SearchRequestDsml searchRequestDecorator = ( SearchRequestDsml )
1418 container.getBatchRequest().getCurrentRequest();
1419
1420 searchRequestDecorator.setTerminalFilter( null );
1421 }
1422 };
1423
1424
1425
1426
1427 private final GrammarAction andFilterCreation = new GrammarAction( "Create And Filter" )
1428 {
1429
1430
1431
1432 @Override
1433 public void action( Dsmlv2Container container ) throws XmlPullParserException
1434 {
1435 SearchRequestDsml searchRequestDecorator = ( SearchRequestDsml )
1436 container.getBatchRequest().getCurrentRequest();
1437
1438 XmlPullParser xpp = container.getParser();
1439
1440 AndFilter filter = new AndFilter();
1441
1442
1443 try
1444 {
1445 searchRequestDecorator.addCurrentFilter( filter );
1446 }
1447 catch ( DecoderException de )
1448 {
1449 throw new XmlPullParserException( de.getMessage(), xpp, de );
1450 }
1451 }
1452 };
1453
1454
1455
1456
1457 private final GrammarAction connectorFilterClose = new GrammarAction( "Close Connector Filter" )
1458 {
1459
1460
1461
1462 @Override
1463 public void action( Dsmlv2Container container ) throws XmlPullParserException
1464 {
1465 SearchRequestDsml searchRequestDecorator = ( SearchRequestDsml )
1466 container.getBatchRequest().getCurrentRequest();
1467
1468 searchRequestDecorator.endCurrentConnectorFilter();
1469 }
1470 };
1471
1472
1473
1474
1475 private final GrammarAction orFilterCreation = new GrammarAction( "Create Or Filter" )
1476 {
1477
1478
1479
1480 @Override
1481 public void action( Dsmlv2Container container ) throws XmlPullParserException
1482 {
1483 SearchRequestDsml searchRequestDecorator = ( SearchRequestDsml )
1484 container.getBatchRequest().getCurrentRequest();
1485
1486 XmlPullParser xpp = container.getParser();
1487
1488 OrFilter filter = new OrFilter();
1489
1490
1491 try
1492 {
1493 searchRequestDecorator.addCurrentFilter( filter );
1494 }
1495 catch ( DecoderException de )
1496 {
1497 throw new XmlPullParserException( de.getMessage(), xpp, de );
1498 }
1499 }
1500 };
1501
1502
1503
1504
1505 private final GrammarAction notFilterCreation = new GrammarAction( "Create Not Filter" )
1506 {
1507
1508
1509
1510 @Override
1511 public void action( Dsmlv2Container container ) throws XmlPullParserException
1512 {
1513 SearchRequestDsml searchRequestDecorator = ( SearchRequestDsml )
1514 container.getBatchRequest().getCurrentRequest();
1515
1516 XmlPullParser xpp = container.getParser();
1517
1518 NotFilter filter = new NotFilter();
1519
1520
1521 try
1522 {
1523 searchRequestDecorator.addCurrentFilter( filter );
1524 }
1525 catch ( DecoderException de )
1526 {
1527 throw new XmlPullParserException( de.getMessage(), xpp, de );
1528 }
1529 }
1530 };
1531
1532
1533
1534
1535 private final GrammarAction equalityMatchFilterCreation = new GrammarAction( "Create Equality Match Filter" )
1536 {
1537
1538
1539
1540 @Override
1541 public void action( Dsmlv2Container container ) throws XmlPullParserException
1542 {
1543 SearchRequestDsml searchRequestDecorator = ( SearchRequestDsml )
1544 container.getBatchRequest().getCurrentRequest();
1545
1546 XmlPullParser xpp = container.getParser();
1547
1548 AttributeValueAssertion assertion = new AttributeValueAssertion();
1549
1550
1551 String attributeName = xpp.getAttributeValue( Strings.EMPTY_STRING, DsmlLiterals.NAME );
1552
1553 if ( attributeName != null )
1554 {
1555 assertion.setAttributeDesc( attributeName );
1556 }
1557 else
1558 {
1559 throw new XmlPullParserException( I18n.err( I18n.ERR_03002_NAME_ATTRIBUTE_REQUIRED ), xpp, null );
1560 }
1561
1562 AttributeValueAssertionFilter filter = new AttributeValueAssertionFilter(
1563 LdapCodecConstants.EQUALITY_MATCH_FILTER );
1564
1565 filter.setAssertion( assertion );
1566
1567
1568 try
1569 {
1570 searchRequestDecorator.addCurrentFilter( filter );
1571 }
1572 catch ( DecoderException de )
1573 {
1574 throw new XmlPullParserException( de.getMessage(), xpp, de );
1575 }
1576
1577 searchRequestDecorator.setTerminalFilter( filter );
1578 }
1579 };
1580
1581
1582
1583
1584 private final GrammarAction greaterOrEqualFilterCreation = new GrammarAction( "Create Greater Or Equal Filter" )
1585 {
1586
1587
1588
1589 @Override
1590 public void action( Dsmlv2Container container ) throws XmlPullParserException
1591 {
1592 SearchRequestDsml searchRequestDecorator = ( SearchRequestDsml )
1593 container.getBatchRequest().getCurrentRequest();
1594
1595 XmlPullParser xpp = container.getParser();
1596
1597 AttributeValueAssertion assertion = new AttributeValueAssertion();
1598
1599
1600 String attributeName = xpp.getAttributeValue( Strings.EMPTY_STRING, DsmlLiterals.NAME );
1601
1602 if ( attributeName != null )
1603 {
1604 assertion.setAttributeDesc( attributeName );
1605 }
1606 else
1607 {
1608 throw new XmlPullParserException( I18n.err( I18n.ERR_03002_NAME_ATTRIBUTE_REQUIRED ), xpp, null );
1609 }
1610
1611 AttributeValueAssertionFilter filter = new AttributeValueAssertionFilter(
1612 LdapCodecConstants.GREATER_OR_EQUAL_FILTER );
1613
1614 filter.setAssertion( assertion );
1615
1616
1617 try
1618 {
1619 searchRequestDecorator.addCurrentFilter( filter );
1620 }
1621 catch ( DecoderException de )
1622 {
1623 throw new XmlPullParserException( de.getMessage(), xpp, de );
1624 }
1625
1626 searchRequestDecorator.setTerminalFilter( filter );
1627 }
1628 };
1629
1630
1631
1632
1633 private final GrammarAction lessOrEqualFilterCreation = new GrammarAction( "Create Less Or Equal Filter" )
1634 {
1635
1636
1637
1638 @Override
1639 public void action( Dsmlv2Container container ) throws XmlPullParserException
1640 {
1641 SearchRequestDsml searchRequestDecorator = ( SearchRequestDsml )
1642 container.getBatchRequest().getCurrentRequest();
1643
1644 XmlPullParser xpp = container.getParser();
1645
1646 AttributeValueAssertion assertion = new AttributeValueAssertion();
1647
1648
1649 String attributeValue;
1650
1651 attributeValue = xpp.getAttributeValue( Strings.EMPTY_STRING, DsmlLiterals.NAME );
1652
1653 if ( attributeValue != null )
1654 {
1655 assertion.setAttributeDesc( attributeValue );
1656 }
1657 else
1658 {
1659 throw new XmlPullParserException( I18n.err( I18n.ERR_03002_NAME_ATTRIBUTE_REQUIRED ), xpp, null );
1660 }
1661
1662 AttributeValueAssertionFilter filter = new AttributeValueAssertionFilter(
1663 LdapCodecConstants.LESS_OR_EQUAL_FILTER );
1664
1665 filter.setAssertion( assertion );
1666
1667
1668 try
1669 {
1670 searchRequestDecorator.addCurrentFilter( filter );
1671 }
1672 catch ( DecoderException de )
1673 {
1674 throw new XmlPullParserException( de.getMessage(), xpp, de );
1675 }
1676
1677 searchRequestDecorator.setTerminalFilter( filter );
1678 }
1679 };
1680
1681
1682
1683
1684 private final GrammarAction approxMatchFilterCreation = new GrammarAction( "Create Approx Match Filter" )
1685 {
1686
1687
1688
1689 @Override
1690 public void action( Dsmlv2Container container ) throws XmlPullParserException
1691 {
1692 SearchRequestDsml searchRequestDecorator = ( SearchRequestDsml )
1693 container.getBatchRequest().getCurrentRequest();
1694
1695 XmlPullParser xpp = container.getParser();
1696
1697 AttributeValueAssertion assertion = new AttributeValueAssertion();
1698
1699
1700 String attributeName = xpp.getAttributeValue( Strings.EMPTY_STRING, DsmlLiterals.NAME );
1701
1702 if ( attributeName != null )
1703 {
1704 assertion.setAttributeDesc( attributeName );
1705 }
1706 else
1707 {
1708 throw new XmlPullParserException( I18n.err( I18n.ERR_03002_NAME_ATTRIBUTE_REQUIRED ), xpp, null );
1709 }
1710
1711 AttributeValueAssertionFilter filter = new AttributeValueAssertionFilter(
1712 LdapCodecConstants.APPROX_MATCH_FILTER );
1713
1714 filter.setAssertion( assertion );
1715
1716
1717 try
1718 {
1719 searchRequestDecorator.addCurrentFilter( filter );
1720 }
1721 catch ( DecoderException de )
1722 {
1723 throw new XmlPullParserException( de.getMessage(), xpp, de );
1724 }
1725
1726 searchRequestDecorator.setTerminalFilter( filter );
1727 }
1728 };
1729
1730
1731
1732
1733 private final GrammarAction filterAddValue = new GrammarAction( "Adds Value to Filter" )
1734 {
1735
1736
1737
1738 @Override
1739 public void action( Dsmlv2Container container ) throws XmlPullParserException
1740 {
1741 SearchRequestDsml searchRequestDecorator = ( SearchRequestDsml )
1742 container.getBatchRequest().getCurrentRequest();
1743 AttributeValueAssertionFilter filter = ( AttributeValueAssertionFilter ) searchRequestDecorator
1744 .getTerminalFilter();
1745 AttributeValueAssertion assertion = filter.getAssertion();
1746
1747 XmlPullParser xpp = container.getParser();
1748
1749 try
1750 {
1751
1752 String typeValue = ParserUtils.getXsiTypeAttributeValue( xpp );
1753
1754
1755 String nextText = xpp.nextText();
1756
1757 if ( !Strings.isEmpty( nextText ) )
1758 {
1759 if ( ParserUtils.isBase64BinaryValue( xpp, typeValue ) )
1760 {
1761 Value value = new Value( Base64.getDecoder().decode( nextText.trim() ) );
1762 assertion.setAssertionValue( value );
1763 }
1764 else
1765 {
1766 Value value = new Value( nextText.trim() );
1767 assertion.setAssertionValue( value );
1768 }
1769 }
1770 }
1771 catch ( IOException ioe )
1772 {
1773 throw new XmlPullParserException( I18n.err( I18n.ERR_03008_UNEXPECTED_ERROR, ioe.getMessage() ), xpp, ioe );
1774 }
1775 }
1776 };
1777
1778
1779
1780
1781 private final GrammarAction presentFilterCreation = new GrammarAction( "Create Present Filter" )
1782 {
1783
1784
1785
1786 @Override
1787 public void action( Dsmlv2Container container ) throws XmlPullParserException
1788 {
1789 PresentFilter presentFilter = new PresentFilter();
1790
1791 XmlPullParser xpp = container.getParser();
1792
1793
1794 SearchRequestDsml searchRequestDecorator = ( SearchRequestDsml )
1795 container.getBatchRequest().getCurrentRequest();
1796
1797 try
1798 {
1799 searchRequestDecorator.addCurrentFilter( presentFilter );
1800 }
1801 catch ( DecoderException de )
1802 {
1803 throw new XmlPullParserException( de.getMessage(), xpp, de );
1804 }
1805
1806
1807 String attributeValue;
1808
1809 attributeValue = xpp.getAttributeValue( Strings.EMPTY_STRING, DsmlLiterals.NAME );
1810
1811 if ( attributeValue != null )
1812 {
1813 presentFilter.setAttributeDescription( attributeValue );
1814 }
1815 else
1816 {
1817 throw new XmlPullParserException( I18n.err( I18n.ERR_03002_NAME_ATTRIBUTE_REQUIRED ), xpp, null );
1818 }
1819 }
1820 };
1821
1822
1823
1824
1825 private final GrammarAction storeFilter = new GrammarAction( "Store Filter" )
1826 {
1827
1828
1829
1830 @Override
1831 public void action( Dsmlv2Container container ) throws XmlPullParserException
1832 {
1833
1834 SearchRequestDsml searchRequestDecorator = ( SearchRequestDsml )
1835 container.getBatchRequest().getCurrentRequest();
1836 SearchRequest searchRequest = searchRequestDecorator.getDecorated();
1837
1838 try
1839 {
1840 ExprNode exprNode = searchRequestDecorator.getFilterNode();
1841
1842 if ( exprNode == null )
1843 {
1844 throw new IllegalStateException( I18n.err( I18n.ERR_03041_NO_FILTER_ELEMENT ) );
1845 }
1846
1847 searchRequest.setFilter( exprNode );
1848 }
1849 catch ( LdapSchemaException lse )
1850 {
1851
1852 }
1853 }
1854 };
1855
1856
1857
1858
1859 private final GrammarAction extensibleMatchFilterCreation = new GrammarAction( "Create Extensible Match Filter" )
1860 {
1861
1862
1863
1864 @Override
1865 public void action( Dsmlv2Container container ) throws XmlPullParserException
1866 {
1867 ExtensibleMatchFilter extensibleMatchFilter = new ExtensibleMatchFilter();
1868
1869 XmlPullParser xpp = container.getParser();
1870
1871
1872 SearchRequestDsml searchRequestDecorator = ( SearchRequestDsml )
1873 container.getBatchRequest().getCurrentRequest();
1874
1875 try
1876 {
1877 searchRequestDecorator.addCurrentFilter( extensibleMatchFilter );
1878 }
1879 catch ( DecoderException de )
1880 {
1881 throw new XmlPullParserException( I18n.err( I18n.ERR_03002_NAME_ATTRIBUTE_REQUIRED ), xpp, de );
1882 }
1883
1884 searchRequestDecorator.setTerminalFilter( extensibleMatchFilter );
1885
1886
1887 String attributeValue;
1888
1889 attributeValue = xpp.getAttributeValue( Strings.EMPTY_STRING, DsmlLiterals.DN_ATTRIBUTES );
1890
1891 if ( attributeValue != null )
1892 {
1893 if ( ( attributeValue.equals( DsmlLiterals.TRUE ) ) || ( "1".equals( attributeValue ) ) )
1894 {
1895 extensibleMatchFilter.setDnAttributes( true );
1896 }
1897 else if ( ( attributeValue.equals( DsmlLiterals.FALSE ) ) || ( "0".equals( attributeValue ) ) )
1898 {
1899 extensibleMatchFilter.setDnAttributes( false );
1900 }
1901 else
1902 {
1903 throw new XmlPullParserException( I18n.err( I18n.ERR_03033_DN_ATTRIBUTES_NOT_BOOLEAN ), xpp, null );
1904 }
1905 }
1906 else
1907 {
1908 extensibleMatchFilter.setDnAttributes( false );
1909 }
1910
1911
1912 attributeValue = xpp.getAttributeValue( Strings.EMPTY_STRING, DsmlLiterals.MATCHING_RULE );
1913
1914 if ( attributeValue != null )
1915 {
1916 extensibleMatchFilter.setMatchingRule( attributeValue );
1917 }
1918
1919
1920 attributeValue = xpp.getAttributeValue( Strings.EMPTY_STRING, DsmlLiterals.NAME );
1921
1922 if ( attributeValue != null )
1923 {
1924 extensibleMatchFilter.setType( attributeValue );
1925 }
1926 }
1927 };
1928
1929
1930
1931
1932 private final GrammarAction extensibleMatchAddValue = new GrammarAction( "Adds Value to Extensible MatchFilter" )
1933 {
1934
1935
1936
1937 @Override
1938 public void action( Dsmlv2Container container ) throws XmlPullParserException
1939 {
1940 SearchRequestDsml searchRequestDecorator = ( SearchRequestDsml )
1941 container.getBatchRequest().getCurrentRequest();
1942 ExtensibleMatchFilter filter = ( ExtensibleMatchFilter ) searchRequestDecorator.getTerminalFilter();
1943
1944 XmlPullParser xpp = container.getParser();
1945
1946 try
1947 {
1948
1949 String typeValue = ParserUtils.getXsiTypeAttributeValue( xpp );
1950
1951
1952 String nextText = xpp.nextText();
1953
1954 if ( !Strings.isEmpty( nextText ) )
1955 {
1956 if ( ParserUtils.isBase64BinaryValue( xpp, typeValue ) )
1957 {
1958 filter.setMatchValue( new Value( Base64.getDecoder().decode( nextText.trim() ) ) );
1959 }
1960 else
1961 {
1962 filter.setMatchValue( new Value( nextText.trim() ) );
1963 }
1964 }
1965 }
1966 catch ( IOException ioe )
1967 {
1968 throw new XmlPullParserException( I18n.err( I18n.ERR_03008_UNEXPECTED_ERROR, ioe.getMessage() ), xpp, ioe );
1969 }
1970 }
1971 };
1972
1973
1974
1975
1976 private final GrammarAction controlCreation = new GrammarAction( "Create Control" )
1977 {
1978
1979
1980
1981 @Override
1982 public void action( Dsmlv2Container container ) throws XmlPullParserException
1983 {
1984 XmlPullParser xpp = container.getParser();
1985 Control control;
1986
1987
1988 String attributeValue;
1989
1990
1991 attributeValue = xpp.getAttributeValue( Strings.EMPTY_STRING, DsmlLiterals.TYPE );
1992
1993 if ( attributeValue != null )
1994 {
1995 if ( !Oid.isOid( attributeValue ) )
1996 {
1997 throw new XmlPullParserException( I18n.err( I18n.ERR_03034_INCORRECT_TYPE_VALUE ), xpp, null );
1998 }
1999
2000 ControlFactory<? extends Control> factory = codec.getRequestControlFactories().get( attributeValue );
2001
2002 if ( factory == null )
2003 {
2004 control = new OpaqueControl( attributeValue );
2005 }
2006 else
2007 {
2008 control = factory.newControl();
2009 }
2010
2011 ( ( Request ) container.getBatchRequest().getCurrentRequest() ).addControl( control );
2012 }
2013 else
2014 {
2015 throw new XmlPullParserException( I18n.err( I18n.ERR_03035_TYPE_ATTRIBUTE_REQUIRED ), xpp, null );
2016 }
2017
2018
2019 attributeValue = xpp.getAttributeValue( Strings.EMPTY_STRING, DsmlLiterals.CRITICALITY );
2020
2021 if ( attributeValue != null )
2022 {
2023 if ( attributeValue.equals( DsmlLiterals.TRUE ) )
2024 {
2025 control.setCritical( true );
2026 }
2027 else if ( attributeValue.equals( DsmlLiterals.FALSE ) )
2028 {
2029 control.setCritical( false );
2030 }
2031 else
2032 {
2033 throw new XmlPullParserException( I18n.err( I18n.ERR_03007_INCORRECT_CRITICALITY_VALUE ), xpp, null );
2034 }
2035 }
2036 }
2037 };
2038
2039
2040
2041
2042 private final GrammarAction controlValueCreation = new GrammarAction( "Add ControlValue to Control" )
2043 {
2044
2045
2046
2047 @Override
2048 public void action( Dsmlv2Container container ) throws XmlPullParserException
2049 {
2050 AbstractRequestDsml<? extends Request> request =
2051 ( AbstractRequestDsml<? extends Request> ) container.getBatchRequest().getCurrentRequest();
2052 DsmlControl<? extends Control> control = request.getCurrentControl();
2053
2054 XmlPullParser xpp = container.getParser();
2055
2056 try
2057 {
2058
2059 String typeValue = ParserUtils.getXsiTypeAttributeValue( xpp );
2060
2061
2062 String nextText = xpp.nextText();
2063
2064 if ( !Strings.isEmpty( nextText ) )
2065 {
2066 if ( ParserUtils.isBase64BinaryValue( xpp, typeValue ) )
2067 {
2068 control.setValue( Base64.getDecoder().decode( nextText.trim() ) );
2069 }
2070 else
2071 {
2072 control.setValue( Strings.getBytesUtf8( nextText.trim() ) );
2073 }
2074 }
2075 }
2076 catch ( IOException ioe )
2077 {
2078 throw new XmlPullParserException( I18n.err( I18n.ERR_03008_UNEXPECTED_ERROR, ioe.getMessage() ), xpp, ioe );
2079 }
2080 }
2081 };
2082
2083
2084
2085
2086
2087 @SuppressWarnings("unchecked")
2088 public Dsmlv2Grammar()
2089 {
2090 name = Dsmlv2Grammar.class.getName();
2091
2092
2093 super.transitions = ( HashMap<Tag, GrammarTransition>[] ) Array.newInstance( HashMap.class, 200 );
2094
2095
2096
2097
2098 super.transitions[Dsmlv2StatesEnum.INIT_GRAMMAR_STATE.ordinal()] = new HashMap<Tag, GrammarTransition>();
2099 super.transitions[Dsmlv2StatesEnum.BATCHREQUEST_START_TAG.ordinal()] = new HashMap<Tag, GrammarTransition>();
2100 super.transitions[Dsmlv2StatesEnum.BATCHREQUEST_LOOP.ordinal()] = new HashMap<Tag, GrammarTransition>();
2101 super.transitions[Dsmlv2StatesEnum.BATCHREQUEST_END_TAG.ordinal()] = new HashMap<Tag, GrammarTransition>();
2102
2103
2104
2105 super.transitions[Dsmlv2StatesEnum.INIT_GRAMMAR_STATE.ordinal()].put( new Tag( DsmlLiterals.BATCH_REQUEST, Tag.START ),
2106 new GrammarTransition( Dsmlv2StatesEnum.INIT_GRAMMAR_STATE, Dsmlv2StatesEnum.BATCHREQUEST_START_TAG,
2107 batchRequestCreation ) );
2108
2109
2110
2111 super.transitions[Dsmlv2StatesEnum.BATCHREQUEST_START_TAG.ordinal()]
2112 .put( new Tag( DsmlLiterals.BATCH_REQUEST, Tag.END ), new GrammarTransition( Dsmlv2StatesEnum.BATCHREQUEST_START_TAG,
2113 Dsmlv2StatesEnum.BATCHREQUEST_END_TAG, null ) );
2114
2115 super.transitions[Dsmlv2StatesEnum.BATCHREQUEST_LOOP.ordinal()].put( new Tag( DsmlLiterals.BATCH_REQUEST, Tag.END ),
2116 new GrammarTransition( Dsmlv2StatesEnum.BATCHREQUEST_LOOP, Dsmlv2StatesEnum.GRAMMAR_END, null ) );
2117
2118
2119
2120 super.transitions[Dsmlv2StatesEnum.BATCHREQUEST_START_TAG.ordinal()].put(
2121 new Tag( DsmlLiterals.ABANDON_REQUEST, Tag.START ),
2122 new GrammarTransition( Dsmlv2StatesEnum.BATCHREQUEST_START_TAG, Dsmlv2StatesEnum.ABANDON_REQUEST_START_TAG,
2123 abandonRequestCreation ) );
2124
2125 super.transitions[Dsmlv2StatesEnum.BATCHREQUEST_LOOP.ordinal()].put( new Tag( DsmlLiterals.ABANDON_REQUEST, Tag.START ),
2126 new GrammarTransition( Dsmlv2StatesEnum.BATCHREQUEST_LOOP, Dsmlv2StatesEnum.ABANDON_REQUEST_START_TAG,
2127 abandonRequestCreation ) );
2128
2129
2130
2131 super.transitions[Dsmlv2StatesEnum.BATCHREQUEST_START_TAG.ordinal()].put( new Tag( DsmlLiterals.ADD_REQUEST, Tag.START ),
2132 new GrammarTransition( Dsmlv2StatesEnum.BATCHREQUEST_START_TAG, Dsmlv2StatesEnum.ADD_REQUEST_START_TAG,
2133 addRequestCreation ) );
2134
2135 super.transitions[Dsmlv2StatesEnum.BATCHREQUEST_LOOP.ordinal()].put( new Tag( DsmlLiterals.ADD_REQUEST, Tag.START ),
2136 new GrammarTransition( Dsmlv2StatesEnum.BATCHREQUEST_LOOP, Dsmlv2StatesEnum.ADD_REQUEST_START_TAG,
2137 addRequestCreation ) );
2138
2139
2140
2141 super.transitions[Dsmlv2StatesEnum.BATCHREQUEST_START_TAG.ordinal()].put( new Tag( DsmlLiterals.AUTH_REQUEST, Tag.START ),
2142 new GrammarTransition( Dsmlv2StatesEnum.BATCHREQUEST_START_TAG, Dsmlv2StatesEnum.AUTH_REQUEST_START_TAG,
2143 authRequestCreation ) );
2144
2145
2146
2147 super.transitions[Dsmlv2StatesEnum.BATCHREQUEST_START_TAG.ordinal()].put(
2148 new Tag( DsmlLiterals.COMPARE_REQUEST, Tag.START ),
2149 new GrammarTransition( Dsmlv2StatesEnum.BATCHREQUEST_START_TAG, Dsmlv2StatesEnum.COMPARE_REQUEST_START_TAG,
2150 compareRequestCreation ) );
2151
2152 super.transitions[Dsmlv2StatesEnum.BATCHREQUEST_LOOP.ordinal()].put( new Tag( DsmlLiterals.COMPARE_REQUEST, Tag.START ),
2153 new GrammarTransition( Dsmlv2StatesEnum.BATCHREQUEST_LOOP, Dsmlv2StatesEnum.COMPARE_REQUEST_START_TAG,
2154 compareRequestCreation ) );
2155
2156
2157
2158 super.transitions[Dsmlv2StatesEnum.BATCHREQUEST_START_TAG.ordinal()].put( new Tag( DsmlLiterals.DEL_REQUEST, Tag.START ),
2159 new GrammarTransition( Dsmlv2StatesEnum.BATCHREQUEST_START_TAG, Dsmlv2StatesEnum.DEL_REQUEST_START_TAG,
2160 delRequestCreation ) );
2161
2162 super.transitions[Dsmlv2StatesEnum.BATCHREQUEST_LOOP.ordinal()].put( new Tag( DsmlLiterals.DEL_REQUEST, Tag.START ),
2163 new GrammarTransition( Dsmlv2StatesEnum.BATCHREQUEST_LOOP, Dsmlv2StatesEnum.DEL_REQUEST_START_TAG,
2164 delRequestCreation ) );
2165
2166
2167
2168 super.transitions[Dsmlv2StatesEnum.BATCHREQUEST_START_TAG.ordinal()].put(
2169 new Tag( DsmlLiterals.EXTENDED_REQUEST, Tag.START ),
2170 new GrammarTransition( Dsmlv2StatesEnum.BATCHREQUEST_START_TAG,
2171 Dsmlv2StatesEnum.EXTENDED_REQUEST_START_TAG, extendedRequestCreation ) );
2172
2173 super.transitions[Dsmlv2StatesEnum.BATCHREQUEST_LOOP.ordinal()].put( new Tag( DsmlLiterals.EXTENDED_REQUEST, Tag.START ),
2174 new GrammarTransition( Dsmlv2StatesEnum.BATCHREQUEST_LOOP, Dsmlv2StatesEnum.EXTENDED_REQUEST_START_TAG,
2175 extendedRequestCreation ) );
2176
2177
2178
2179 super.transitions[Dsmlv2StatesEnum.BATCHREQUEST_START_TAG.ordinal()].put( new Tag( DsmlLiterals.MOD_DN_REQUEST, Tag.START ),
2180 new GrammarTransition( Dsmlv2StatesEnum.BATCHREQUEST_START_TAG,
2181 Dsmlv2StatesEnum.MODIFY_DN_REQUEST_START_TAG, modDNRequestCreation ) );
2182
2183 super.transitions[Dsmlv2StatesEnum.BATCHREQUEST_LOOP.ordinal()].put( new Tag( DsmlLiterals.MOD_DN_REQUEST, Tag.START ),
2184 new GrammarTransition( Dsmlv2StatesEnum.BATCHREQUEST_LOOP, Dsmlv2StatesEnum.MODIFY_DN_REQUEST_START_TAG,
2185 modDNRequestCreation ) );
2186
2187
2188
2189 super.transitions[Dsmlv2StatesEnum.BATCHREQUEST_START_TAG.ordinal()].put(
2190 new Tag( DsmlLiterals.MODIFY_REQUEST, Tag.START ),
2191 new GrammarTransition( Dsmlv2StatesEnum.BATCHREQUEST_START_TAG, Dsmlv2StatesEnum.MODIFY_REQUEST_START_TAG,
2192 modifyRequestCreation ) );
2193
2194 super.transitions[Dsmlv2StatesEnum.BATCHREQUEST_LOOP.ordinal()].put( new Tag( DsmlLiterals.MODIFY_REQUEST, Tag.START ),
2195 new GrammarTransition( Dsmlv2StatesEnum.BATCHREQUEST_LOOP, Dsmlv2StatesEnum.MODIFY_REQUEST_START_TAG,
2196 modifyRequestCreation ) );
2197
2198
2199
2200 super.transitions[Dsmlv2StatesEnum.BATCHREQUEST_START_TAG.ordinal()].put(
2201 new Tag( DsmlLiterals.SEARCH_REQUEST, Tag.START ),
2202 new GrammarTransition( Dsmlv2StatesEnum.BATCHREQUEST_START_TAG, Dsmlv2StatesEnum.SEARCH_REQUEST_START_TAG,
2203 searchRequestCreation ) );
2204
2205 super.transitions[Dsmlv2StatesEnum.BATCHREQUEST_LOOP.ordinal()].put( new Tag( DsmlLiterals.SEARCH_REQUEST, Tag.START ),
2206 new GrammarTransition( Dsmlv2StatesEnum.BATCHREQUEST_LOOP, Dsmlv2StatesEnum.SEARCH_REQUEST_START_TAG,
2207 searchRequestCreation ) );
2208
2209
2210
2211
2212 super.transitions[Dsmlv2StatesEnum.ABANDON_REQUEST_START_TAG.ordinal()] = new HashMap<Tag, GrammarTransition>();
2213 super.transitions[Dsmlv2StatesEnum.ABANDON_REQUEST_CONTROL_START_TAG.ordinal()] = new HashMap<Tag, GrammarTransition>();
2214 super.transitions[Dsmlv2StatesEnum.ABANDON_REQUEST_CONTROL_END_TAG.ordinal()] = new HashMap<Tag, GrammarTransition>();
2215 super.transitions[Dsmlv2StatesEnum.ABANDON_REQUEST_CONTROLVALUE_END_TAG.ordinal()] = new HashMap<Tag, GrammarTransition>();
2216
2217
2218 super.transitions[Dsmlv2StatesEnum.ABANDON_REQUEST_START_TAG.ordinal()]
2219 .put( new Tag( DsmlLiterals.ABANDON_REQUEST, Tag.END ), new GrammarTransition(
2220 Dsmlv2StatesEnum.ABANDON_REQUEST_START_TAG, Dsmlv2StatesEnum.BATCHREQUEST_LOOP, null ) );
2221
2222
2223 super.transitions[Dsmlv2StatesEnum.ABANDON_REQUEST_START_TAG.ordinal()].put( new Tag( DsmlLiterals.CONTROL, Tag.START ),
2224 new GrammarTransition( Dsmlv2StatesEnum.ABANDON_REQUEST_START_TAG,
2225 Dsmlv2StatesEnum.ABANDON_REQUEST_CONTROL_START_TAG, controlCreation ) );
2226
2227
2228 super.transitions[Dsmlv2StatesEnum.ABANDON_REQUEST_CONTROL_START_TAG.ordinal()].put(
2229 new Tag( DsmlLiterals.CONTROL_VALUE, Tag.START ), new GrammarTransition(
2230 Dsmlv2StatesEnum.ABANDON_REQUEST_CONTROL_START_TAG,
2231 Dsmlv2StatesEnum.ABANDON_REQUEST_CONTROLVALUE_END_TAG, controlValueCreation ) );
2232
2233
2234 super.transitions[Dsmlv2StatesEnum.ABANDON_REQUEST_CONTROLVALUE_END_TAG.ordinal()].put( new Tag( DsmlLiterals.CONTROL,
2235 Tag.END ),
2236 new GrammarTransition( Dsmlv2StatesEnum.ABANDON_REQUEST_CONTROLVALUE_END_TAG,
2237 Dsmlv2StatesEnum.ABANDON_REQUEST_CONTROL_END_TAG, null ) );
2238
2239
2240 super.transitions[Dsmlv2StatesEnum.ABANDON_REQUEST_CONTROL_START_TAG.ordinal()].put( new Tag( DsmlLiterals.CONTROL,
2241 Tag.END ),
2242 new GrammarTransition( Dsmlv2StatesEnum.ABANDON_REQUEST_CONTROL_START_TAG,
2243 Dsmlv2StatesEnum.ABANDON_REQUEST_CONTROL_END_TAG, null ) );
2244
2245
2246 super.transitions[Dsmlv2StatesEnum.ABANDON_REQUEST_CONTROL_END_TAG.ordinal()].put( new Tag( DsmlLiterals.CONTROL,
2247 Tag.START ),
2248 new GrammarTransition( Dsmlv2StatesEnum.ABANDON_REQUEST_CONTROL_END_TAG,
2249 Dsmlv2StatesEnum.ABANDON_REQUEST_CONTROL_START_TAG, controlCreation ) );
2250
2251
2252 super.transitions[Dsmlv2StatesEnum.ABANDON_REQUEST_CONTROL_END_TAG.ordinal()].put( new Tag( DsmlLiterals.ABANDON_REQUEST,
2253 Tag.END ),
2254 new GrammarTransition( Dsmlv2StatesEnum.ABANDON_REQUEST_CONTROL_END_TAG,
2255 Dsmlv2StatesEnum.BATCHREQUEST_LOOP, null ) );
2256
2257
2258
2259
2260 super.transitions[Dsmlv2StatesEnum.ADD_REQUEST_START_TAG.ordinal()] = new HashMap<Tag, GrammarTransition>();
2261 super.transitions[Dsmlv2StatesEnum.ADD_REQUEST_CONTROL_START_TAG.ordinal()] = new HashMap<Tag, GrammarTransition>();
2262 super.transitions[Dsmlv2StatesEnum.ADD_REQUEST_CONTROL_END_TAG.ordinal()] = new HashMap<Tag, GrammarTransition>();
2263 super.transitions[Dsmlv2StatesEnum.ADD_REQUEST_CONTROLVALUE_END_TAG.ordinal()] = new HashMap<Tag, GrammarTransition>();
2264 super.transitions[Dsmlv2StatesEnum.ADD_REQUEST_ATTR_START_TAG.ordinal()] = new HashMap<Tag, GrammarTransition>();
2265 super.transitions[Dsmlv2StatesEnum.ADD_REQUEST_ATTR_END_TAG.ordinal()] = new HashMap<Tag, GrammarTransition>();
2266
2267
2268 super.transitions[Dsmlv2StatesEnum.ADD_REQUEST_START_TAG.ordinal()].put( new Tag( DsmlLiterals.ADD_REQUEST, Tag.END ),
2269 new GrammarTransition( Dsmlv2StatesEnum.ADD_REQUEST_START_TAG, Dsmlv2StatesEnum.BATCHREQUEST_LOOP, null ) );
2270
2271
2272 super.transitions[Dsmlv2StatesEnum.ADD_REQUEST_START_TAG.ordinal()].put( new Tag( DsmlLiterals.CONTROL, Tag.START ),
2273 new GrammarTransition( Dsmlv2StatesEnum.ADD_REQUEST_START_TAG,
2274 Dsmlv2StatesEnum.ADD_REQUEST_CONTROL_START_TAG, controlCreation ) );
2275
2276
2277 super.transitions[Dsmlv2StatesEnum.ADD_REQUEST_CONTROL_START_TAG.ordinal()].put( new Tag( DsmlLiterals.CONTROL_VALUE,
2278 Tag.START ),
2279 new GrammarTransition( Dsmlv2StatesEnum.ADD_REQUEST_CONTROL_START_TAG,
2280 Dsmlv2StatesEnum.ADD_REQUEST_CONTROLVALUE_END_TAG, controlValueCreation ) );
2281
2282
2283 super.transitions[Dsmlv2StatesEnum.ADD_REQUEST_CONTROLVALUE_END_TAG.ordinal()].put(
2284 new Tag( DsmlLiterals.CONTROL, Tag.END ),
2285 new GrammarTransition( Dsmlv2StatesEnum.ADD_REQUEST_CONTROLVALUE_END_TAG,
2286 Dsmlv2StatesEnum.ADD_REQUEST_CONTROL_END_TAG, null ) );
2287
2288
2289 super.transitions[Dsmlv2StatesEnum.ADD_REQUEST_CONTROL_START_TAG.ordinal()].put( new Tag( DsmlLiterals.CONTROL, Tag.END ),
2290 new GrammarTransition( Dsmlv2StatesEnum.ADD_REQUEST_CONTROL_START_TAG,
2291 Dsmlv2StatesEnum.ADD_REQUEST_CONTROL_END_TAG, null ) );
2292
2293
2294 super.transitions[Dsmlv2StatesEnum.ADD_REQUEST_CONTROL_END_TAG.ordinal()].put( new Tag( DsmlLiterals.CONTROL, Tag.START ),
2295 new GrammarTransition( Dsmlv2StatesEnum.ADD_REQUEST_CONTROL_END_TAG,
2296 Dsmlv2StatesEnum.ADD_REQUEST_CONTROL_START_TAG, controlCreation ) );
2297
2298
2299 super.transitions[Dsmlv2StatesEnum.ADD_REQUEST_CONTROL_END_TAG.ordinal()].put(
2300 new Tag( DsmlLiterals.ADD_REQUEST, Tag.END ),
2301 new GrammarTransition( Dsmlv2StatesEnum.ADD_REQUEST_CONTROL_END_TAG, Dsmlv2StatesEnum.BATCHREQUEST_LOOP,
2302 null ) );
2303
2304
2305 super.transitions[Dsmlv2StatesEnum.ADD_REQUEST_START_TAG.ordinal()].put( new Tag( DsmlLiterals.ATTR, Tag.START ),
2306 new GrammarTransition( Dsmlv2StatesEnum.ADD_REQUEST_START_TAG, Dsmlv2StatesEnum.ADD_REQUEST_ATTR_START_TAG,
2307 addRequestAddAttribute ) );
2308
2309
2310 super.transitions[Dsmlv2StatesEnum.ADD_REQUEST_CONTROL_END_TAG.ordinal()].put( new Tag( DsmlLiterals.ATTR, Tag.START ),
2311 new GrammarTransition( Dsmlv2StatesEnum.ADD_REQUEST_CONTROL_END_TAG,
2312 Dsmlv2StatesEnum.ADD_REQUEST_ATTR_START_TAG, addRequestAddAttribute ) );
2313
2314
2315 super.transitions[Dsmlv2StatesEnum.ADD_REQUEST_ATTR_END_TAG.ordinal()].put( new Tag( DsmlLiterals.ATTR, Tag.START ),
2316 new GrammarTransition( Dsmlv2StatesEnum.ADD_REQUEST_ATTR_END_TAG,
2317 Dsmlv2StatesEnum.ADD_REQUEST_ATTR_START_TAG, addRequestAddAttribute ) );
2318
2319
2320 super.transitions[Dsmlv2StatesEnum.ADD_REQUEST_ATTR_START_TAG.ordinal()].put( new Tag( DsmlLiterals.ATTR, Tag.END ),
2321 new GrammarTransition( Dsmlv2StatesEnum.ADD_REQUEST_ATTR_START_TAG,
2322 Dsmlv2StatesEnum.ADD_REQUEST_ATTR_END_TAG, null ) );
2323
2324
2325 super.transitions[Dsmlv2StatesEnum.ADD_REQUEST_ATTR_START_TAG.ordinal()].put( new Tag( DsmlLiterals.VALUE, Tag.START ),
2326 new GrammarTransition( Dsmlv2StatesEnum.ADD_REQUEST_ATTR_START_TAG,
2327 Dsmlv2StatesEnum.ADD_REQUEST_ATTR_START_TAG, addRequestAddValue ) );
2328
2329
2330 super.transitions[Dsmlv2StatesEnum.ADD_REQUEST_ATTR_END_TAG.ordinal()]
2331 .put( new Tag( DsmlLiterals.ADD_REQUEST, Tag.END ), new GrammarTransition( Dsmlv2StatesEnum.ADD_REQUEST_ATTR_END_TAG,
2332 Dsmlv2StatesEnum.BATCHREQUEST_LOOP, null ) );
2333
2334
2335
2336
2337 super.transitions[Dsmlv2StatesEnum.AUTH_REQUEST_START_TAG.ordinal()] = new HashMap<Tag, GrammarTransition>();
2338 super.transitions[Dsmlv2StatesEnum.AUTH_REQUEST_CONTROL_START_TAG.ordinal()] = new HashMap<Tag, GrammarTransition>();
2339 super.transitions[Dsmlv2StatesEnum.AUTH_REQUEST_CONTROL_END_TAG.ordinal()] = new HashMap<Tag, GrammarTransition>();
2340 super.transitions[Dsmlv2StatesEnum.AUTH_REQUEST_CONTROLVALUE_END_TAG.ordinal()] = new HashMap<Tag, GrammarTransition>();
2341
2342
2343 super.transitions[Dsmlv2StatesEnum.AUTH_REQUEST_START_TAG.ordinal()].put( new Tag( DsmlLiterals.AUTH_REQUEST, Tag.END ),
2344 new GrammarTransition( Dsmlv2StatesEnum.AUTH_REQUEST_START_TAG, Dsmlv2StatesEnum.BATCHREQUEST_LOOP, null ) );
2345
2346
2347 super.transitions[Dsmlv2StatesEnum.AUTH_REQUEST_START_TAG.ordinal()].put( new Tag( DsmlLiterals.CONTROL, Tag.START ),
2348 new GrammarTransition( Dsmlv2StatesEnum.AUTH_REQUEST_START_TAG,
2349 Dsmlv2StatesEnum.AUTH_REQUEST_CONTROL_START_TAG, controlCreation ) );
2350
2351
2352 super.transitions[Dsmlv2StatesEnum.AUTH_REQUEST_CONTROL_START_TAG.ordinal()].put( new Tag( DsmlLiterals.CONTROL_VALUE,
2353 Tag.START ),
2354 new GrammarTransition( Dsmlv2StatesEnum.AUTH_REQUEST_CONTROL_START_TAG,
2355 Dsmlv2StatesEnum.AUTH_REQUEST_CONTROLVALUE_END_TAG, controlValueCreation ) );
2356
2357
2358 super.transitions[Dsmlv2StatesEnum.AUTH_REQUEST_CONTROLVALUE_END_TAG.ordinal()].put( new Tag( DsmlLiterals.CONTROL,
2359 Tag.END ),
2360 new GrammarTransition( Dsmlv2StatesEnum.AUTH_REQUEST_CONTROLVALUE_END_TAG,
2361 Dsmlv2StatesEnum.AUTH_REQUEST_CONTROL_END_TAG, null ) );
2362
2363
2364 super.transitions[Dsmlv2StatesEnum.AUTH_REQUEST_CONTROL_START_TAG.ordinal()].put(
2365 new Tag( DsmlLiterals.CONTROL, Tag.END ),
2366 new GrammarTransition( Dsmlv2StatesEnum.AUTH_REQUEST_CONTROL_START_TAG,
2367 Dsmlv2StatesEnum.AUTH_REQUEST_CONTROL_END_TAG, null ) );
2368
2369
2370 super.transitions[Dsmlv2StatesEnum.AUTH_REQUEST_CONTROL_END_TAG.ordinal()].put(
2371 new Tag( DsmlLiterals.CONTROL, Tag.START ),
2372 new GrammarTransition( Dsmlv2StatesEnum.AUTH_REQUEST_CONTROL_END_TAG,
2373 Dsmlv2StatesEnum.AUTH_REQUEST_CONTROL_START_TAG, controlCreation ) );
2374
2375
2376 super.transitions[Dsmlv2StatesEnum.AUTH_REQUEST_CONTROL_END_TAG.ordinal()].put(
2377 new Tag( DsmlLiterals.AUTH_REQUEST, Tag.END ),
2378 new GrammarTransition( Dsmlv2StatesEnum.AUTH_REQUEST_CONTROL_END_TAG, Dsmlv2StatesEnum.BATCHREQUEST_LOOP,
2379 null ) );
2380
2381
2382
2383
2384 super.transitions[Dsmlv2StatesEnum.COMPARE_REQUEST_START_TAG.ordinal()] = new HashMap<Tag, GrammarTransition>();
2385 super.transitions[Dsmlv2StatesEnum.COMPARE_REQUEST_CONTROL_START_TAG.ordinal()] = new HashMap<Tag, GrammarTransition>();
2386 super.transitions[Dsmlv2StatesEnum.COMPARE_REQUEST_CONTROL_END_TAG.ordinal()] = new HashMap<Tag, GrammarTransition>();
2387 super.transitions[Dsmlv2StatesEnum.COMPARE_REQUEST_CONTROLVALUE_END_TAG.ordinal()] = new HashMap<Tag, GrammarTransition>();
2388 super.transitions[Dsmlv2StatesEnum.COMPARE_REQUEST_ASSERTION_START_TAG.ordinal()] = new HashMap<Tag, GrammarTransition>();
2389 super.transitions[Dsmlv2StatesEnum.COMPARE_REQUEST_ASSERTION_END_TAG.ordinal()] = new HashMap<Tag, GrammarTransition>();
2390 super.transitions[Dsmlv2StatesEnum.COMPARE_REQUEST_VALUE_END_TAG.ordinal()] = new HashMap<Tag, GrammarTransition>();
2391
2392
2393 super.transitions[Dsmlv2StatesEnum.COMPARE_REQUEST_START_TAG.ordinal()].put( new Tag( DsmlLiterals.CONTROL, Tag.START ),
2394 new GrammarTransition( Dsmlv2StatesEnum.COMPARE_REQUEST_START_TAG,
2395 Dsmlv2StatesEnum.COMPARE_REQUEST_CONTROL_START_TAG, controlCreation ) );
2396
2397
2398 super.transitions[Dsmlv2StatesEnum.COMPARE_REQUEST_CONTROL_START_TAG.ordinal()].put(
2399 new Tag( DsmlLiterals.CONTROL_VALUE, Tag.START ), new GrammarTransition(
2400 Dsmlv2StatesEnum.COMPARE_REQUEST_CONTROL_START_TAG,
2401 Dsmlv2StatesEnum.COMPARE_REQUEST_CONTROLVALUE_END_TAG, controlValueCreation ) );
2402
2403
2404 super.transitions[Dsmlv2StatesEnum.COMPARE_REQUEST_CONTROLVALUE_END_TAG.ordinal()].put( new Tag( DsmlLiterals.CONTROL,
2405 Tag.END ),
2406 new GrammarTransition( Dsmlv2StatesEnum.COMPARE_REQUEST_CONTROLVALUE_END_TAG,
2407 Dsmlv2StatesEnum.COMPARE_REQUEST_CONTROL_END_TAG, null ) );
2408
2409
2410 super.transitions[Dsmlv2StatesEnum.COMPARE_REQUEST_CONTROL_START_TAG.ordinal()].put( new Tag( DsmlLiterals.CONTROL,
2411 Tag.END ),
2412 new GrammarTransition( Dsmlv2StatesEnum.COMPARE_REQUEST_CONTROL_START_TAG,
2413 Dsmlv2StatesEnum.COMPARE_REQUEST_CONTROL_END_TAG, null ) );
2414
2415
2416 super.transitions[Dsmlv2StatesEnum.COMPARE_REQUEST_CONTROL_END_TAG.ordinal()].put( new Tag( DsmlLiterals.CONTROL,
2417 Tag.START ),
2418 new GrammarTransition( Dsmlv2StatesEnum.COMPARE_REQUEST_CONTROL_END_TAG,
2419 Dsmlv2StatesEnum.COMPARE_REQUEST_CONTROL_START_TAG, controlCreation ) );
2420
2421
2422 super.transitions[Dsmlv2StatesEnum.COMPARE_REQUEST_CONTROL_END_TAG.ordinal()].put( new Tag( DsmlLiterals.COMPARE_REQUEST,
2423 Tag.END ),
2424 new GrammarTransition( Dsmlv2StatesEnum.COMPARE_REQUEST_CONTROL_END_TAG,
2425 Dsmlv2StatesEnum.BATCHREQUEST_LOOP, null ) );
2426
2427
2428 super.transitions[Dsmlv2StatesEnum.COMPARE_REQUEST_START_TAG.ordinal()].put( new Tag( DsmlLiterals.ASSERTION, Tag.START ),
2429 new GrammarTransition( Dsmlv2StatesEnum.COMPARE_REQUEST_CONTROL_START_TAG,
2430 Dsmlv2StatesEnum.COMPARE_REQUEST_ASSERTION_START_TAG, compareRequestAddAssertion ) );
2431
2432
2433 super.transitions[Dsmlv2StatesEnum.COMPARE_REQUEST_CONTROL_END_TAG.ordinal()].put( new Tag( DsmlLiterals.ASSERTION,
2434 Tag.START ),
2435 new GrammarTransition( Dsmlv2StatesEnum.COMPARE_REQUEST_CONTROL_END_TAG,
2436 Dsmlv2StatesEnum.COMPARE_REQUEST_ASSERTION_START_TAG, compareRequestAddAssertion ) );
2437
2438
2439 super.transitions[Dsmlv2StatesEnum.COMPARE_REQUEST_ASSERTION_START_TAG.ordinal()].put( new Tag( DsmlLiterals.VALUE,
2440 Tag.START ),
2441 new GrammarTransition( Dsmlv2StatesEnum.COMPARE_REQUEST_ASSERTION_START_TAG,
2442 Dsmlv2StatesEnum.COMPARE_REQUEST_VALUE_END_TAG, compareRequestAddValue ) );
2443
2444
2445 super.transitions[Dsmlv2StatesEnum.COMPARE_REQUEST_VALUE_END_TAG.ordinal()].put(
2446 new Tag( DsmlLiterals.ASSERTION, Tag.END ),
2447 new GrammarTransition( Dsmlv2StatesEnum.COMPARE_REQUEST_VALUE_END_TAG,
2448 Dsmlv2StatesEnum.COMPARE_REQUEST_ASSERTION_END_TAG, null ) );
2449
2450
2451 super.transitions[Dsmlv2StatesEnum.COMPARE_REQUEST_ASSERTION_END_TAG.ordinal()].put(
2452 new Tag( DsmlLiterals.COMPARE_REQUEST, Tag.END ), new GrammarTransition(
2453 Dsmlv2StatesEnum.COMPARE_REQUEST_ASSERTION_END_TAG, Dsmlv2StatesEnum.BATCHREQUEST_LOOP, null ) );
2454
2455
2456
2457
2458 super.transitions[Dsmlv2StatesEnum.DEL_REQUEST_START_TAG.ordinal()] = new HashMap<Tag, GrammarTransition>();
2459 super.transitions[Dsmlv2StatesEnum.DEL_REQUEST_CONTROL_START_TAG.ordinal()] = new HashMap<Tag, GrammarTransition>();
2460 super.transitions[Dsmlv2StatesEnum.DEL_REQUEST_CONTROL_END_TAG.ordinal()] = new HashMap<Tag, GrammarTransition>();
2461 super.transitions[Dsmlv2StatesEnum.DEL_REQUEST_CONTROLVALUE_END_TAG.ordinal()] = new HashMap<Tag, GrammarTransition>();
2462
2463
2464 super.transitions[Dsmlv2StatesEnum.DEL_REQUEST_START_TAG.ordinal()].put( new Tag( DsmlLiterals.DEL_REQUEST, Tag.END ),
2465 new GrammarTransition( Dsmlv2StatesEnum.DEL_REQUEST_START_TAG, Dsmlv2StatesEnum.BATCHREQUEST_LOOP, null ) );
2466
2467
2468 super.transitions[Dsmlv2StatesEnum.DEL_REQUEST_START_TAG.ordinal()].put( new Tag( DsmlLiterals.CONTROL, Tag.START ),
2469 new GrammarTransition( Dsmlv2StatesEnum.DEL_REQUEST_START_TAG,
2470 Dsmlv2StatesEnum.DEL_REQUEST_CONTROL_START_TAG, controlCreation ) );
2471
2472
2473 super.transitions[Dsmlv2StatesEnum.DEL_REQUEST_CONTROL_START_TAG.ordinal()].put( new Tag( DsmlLiterals.CONTROL_VALUE,
2474 Tag.START ),
2475 new GrammarTransition( Dsmlv2StatesEnum.DEL_REQUEST_CONTROL_START_TAG,
2476 Dsmlv2StatesEnum.DEL_REQUEST_CONTROLVALUE_END_TAG, controlValueCreation ) );
2477
2478
2479 super.transitions[Dsmlv2StatesEnum.DEL_REQUEST_CONTROLVALUE_END_TAG.ordinal()].put(
2480 new Tag( DsmlLiterals.CONTROL, Tag.END ),
2481 new GrammarTransition( Dsmlv2StatesEnum.DEL_REQUEST_CONTROLVALUE_END_TAG,
2482 Dsmlv2StatesEnum.DEL_REQUEST_CONTROL_END_TAG, null ) );
2483
2484
2485 super.transitions[Dsmlv2StatesEnum.DEL_REQUEST_CONTROL_START_TAG.ordinal()].put( new Tag( DsmlLiterals.CONTROL, Tag.END ),
2486 new GrammarTransition( Dsmlv2StatesEnum.DEL_REQUEST_CONTROL_START_TAG,
2487 Dsmlv2StatesEnum.DEL_REQUEST_CONTROL_END_TAG, null ) );
2488
2489
2490 super.transitions[Dsmlv2StatesEnum.DEL_REQUEST_CONTROL_END_TAG.ordinal()].put( new Tag( DsmlLiterals.CONTROL, Tag.START ),
2491 new GrammarTransition( Dsmlv2StatesEnum.DEL_REQUEST_CONTROL_END_TAG,
2492 Dsmlv2StatesEnum.DEL_REQUEST_CONTROL_START_TAG, controlCreation ) );
2493
2494
2495 super.transitions[Dsmlv2StatesEnum.DEL_REQUEST_CONTROL_END_TAG.ordinal()].put(
2496 new Tag( DsmlLiterals.DEL_REQUEST, Tag.END ),
2497 new GrammarTransition( Dsmlv2StatesEnum.DEL_REQUEST_CONTROL_END_TAG, Dsmlv2StatesEnum.BATCHREQUEST_LOOP,
2498 null ) );
2499
2500
2501
2502
2503 super.transitions[Dsmlv2StatesEnum.EXTENDED_REQUEST_START_TAG.ordinal()] = new HashMap<Tag, GrammarTransition>();
2504 super.transitions[Dsmlv2StatesEnum.EXTENDED_REQUEST_CONTROL_START_TAG.ordinal()] = new HashMap<Tag, GrammarTransition>();
2505 super.transitions[Dsmlv2StatesEnum.EXTENDED_REQUEST_CONTROL_END_TAG.ordinal()] = new HashMap<Tag, GrammarTransition>();
2506 super.transitions[Dsmlv2StatesEnum.EXTENDED_REQUEST_CONTROLVALUE_END_TAG.ordinal()] = new HashMap<Tag, GrammarTransition>();
2507 super.transitions[Dsmlv2StatesEnum.EXTENDED_REQUEST_REQUESTNAME_END_TAG.ordinal()] = new HashMap<Tag, GrammarTransition>();
2508 super.transitions[Dsmlv2StatesEnum.EXTENDED_REQUEST_REQUESTVALUE_END_TAG.ordinal()] = new HashMap<Tag, GrammarTransition>();
2509
2510
2511 super.transitions[Dsmlv2StatesEnum.EXTENDED_REQUEST_START_TAG.ordinal()].put( new Tag( DsmlLiterals.CONTROL, Tag.START ),
2512 new GrammarTransition( Dsmlv2StatesEnum.EXTENDED_REQUEST_START_TAG,
2513 Dsmlv2StatesEnum.EXTENDED_REQUEST_CONTROL_START_TAG, controlCreation ) );
2514
2515
2516 super.transitions[Dsmlv2StatesEnum.EXTENDED_REQUEST_CONTROL_START_TAG.ordinal()].put(
2517 new Tag( DsmlLiterals.CONTROL_VALUE, Tag.START ), new GrammarTransition(
2518 Dsmlv2StatesEnum.EXTENDED_REQUEST_CONTROL_START_TAG,
2519 Dsmlv2StatesEnum.EXTENDED_REQUEST_CONTROLVALUE_END_TAG, controlValueCreation ) );
2520
2521
2522 super.transitions[Dsmlv2StatesEnum.EXTENDED_REQUEST_CONTROLVALUE_END_TAG.ordinal()].put( new Tag( DsmlLiterals.CONTROL,
2523 Tag.END ),
2524 new GrammarTransition( Dsmlv2StatesEnum.EXTENDED_REQUEST_CONTROLVALUE_END_TAG,
2525 Dsmlv2StatesEnum.EXTENDED_REQUEST_CONTROL_END_TAG, null ) );
2526
2527
2528 super.transitions[Dsmlv2StatesEnum.EXTENDED_REQUEST_CONTROL_START_TAG.ordinal()].put( new Tag( DsmlLiterals.CONTROL,
2529 Tag.END ),
2530 new GrammarTransition( Dsmlv2StatesEnum.EXTENDED_REQUEST_CONTROL_START_TAG,
2531 Dsmlv2StatesEnum.EXTENDED_REQUEST_CONTROL_END_TAG, null ) );
2532
2533
2534 super.transitions[Dsmlv2StatesEnum.EXTENDED_REQUEST_CONTROL_END_TAG.ordinal()].put( new Tag( DsmlLiterals.CONTROL,
2535 Tag.START ),
2536 new GrammarTransition( Dsmlv2StatesEnum.EXTENDED_REQUEST_CONTROL_END_TAG,
2537 Dsmlv2StatesEnum.EXTENDED_REQUEST_CONTROL_START_TAG, controlCreation ) );
2538
2539
2540 super.transitions[Dsmlv2StatesEnum.EXTENDED_REQUEST_CONTROL_END_TAG.ordinal()].put(
2541 new Tag( DsmlLiterals.EXTENDED_REQUEST, Tag.END ), new GrammarTransition(
2542 Dsmlv2StatesEnum.EXTENDED_REQUEST_CONTROL_END_TAG, Dsmlv2StatesEnum.BATCHREQUEST_LOOP, null ) );
2543
2544
2545 super.transitions[Dsmlv2StatesEnum.EXTENDED_REQUEST_START_TAG.ordinal()].put(
2546 new Tag( DsmlLiterals.REQUEST_NAME, Tag.START ),
2547 new GrammarTransition( Dsmlv2StatesEnum.EXTENDED_REQUEST_START_TAG,
2548 Dsmlv2StatesEnum.EXTENDED_REQUEST_REQUESTNAME_END_TAG, extendedRequestAddName ) );
2549
2550
2551 super.transitions[Dsmlv2StatesEnum.EXTENDED_REQUEST_CONTROL_END_TAG.ordinal()].put( new Tag( DsmlLiterals.REQUEST_NAME,
2552 Tag.START ),
2553 new GrammarTransition( Dsmlv2StatesEnum.EXTENDED_REQUEST_CONTROL_END_TAG,
2554 Dsmlv2StatesEnum.EXTENDED_REQUEST_REQUESTNAME_END_TAG, extendedRequestAddName ) );
2555
2556
2557 super.transitions[Dsmlv2StatesEnum.EXTENDED_REQUEST_REQUESTNAME_END_TAG.ordinal()].put( new Tag(
2558 DsmlLiterals.EXTENDED_REQUEST,
2559 Tag.END ), new GrammarTransition( Dsmlv2StatesEnum.EXTENDED_REQUEST_REQUESTNAME_END_TAG,
2560 Dsmlv2StatesEnum.BATCHREQUEST_LOOP, null ) );
2561
2562
2563 super.transitions[Dsmlv2StatesEnum.EXTENDED_REQUEST_REQUESTNAME_END_TAG.ordinal()].put( new Tag(
2564 DsmlLiterals.REQUEST_VALUE,
2565 Tag.START ), new GrammarTransition( Dsmlv2StatesEnum.EXTENDED_REQUEST_REQUESTNAME_END_TAG,
2566 Dsmlv2StatesEnum.EXTENDED_REQUEST_REQUESTVALUE_END_TAG, extendedRequestAddValue ) );
2567
2568
2569 super.transitions[Dsmlv2StatesEnum.EXTENDED_REQUEST_REQUESTVALUE_END_TAG.ordinal()].put( new Tag(
2570 DsmlLiterals.EXTENDED_REQUEST,
2571 Tag.END ), new GrammarTransition( Dsmlv2StatesEnum.EXTENDED_REQUEST_REQUESTVALUE_END_TAG,
2572 Dsmlv2StatesEnum.BATCHREQUEST_LOOP, null ) );
2573
2574
2575
2576
2577 super.transitions[Dsmlv2StatesEnum.MODIFY_DN_REQUEST_START_TAG.ordinal()] = new HashMap<Tag, GrammarTransition>();
2578 super.transitions[Dsmlv2StatesEnum.MODIFY_DN_REQUEST_CONTROL_START_TAG.ordinal()] = new HashMap<Tag, GrammarTransition>();
2579 super.transitions[Dsmlv2StatesEnum.MODIFY_DN_REQUEST_CONTROL_END_TAG.ordinal()] = new HashMap<Tag, GrammarTransition>();
2580 super.transitions[Dsmlv2StatesEnum.MODIFY_DN_REQUEST_CONTROLVALUE_END_TAG.ordinal()] = new HashMap<Tag, GrammarTransition>();
2581
2582
2583 super.transitions[Dsmlv2StatesEnum.MODIFY_DN_REQUEST_START_TAG.ordinal()].put(
2584 new Tag( DsmlLiterals.MOD_DN_REQUEST, Tag.END ),
2585 new GrammarTransition( Dsmlv2StatesEnum.MODIFY_DN_REQUEST_START_TAG, Dsmlv2StatesEnum.BATCHREQUEST_LOOP,
2586 null ) );
2587
2588
2589 super.transitions[Dsmlv2StatesEnum.MODIFY_DN_REQUEST_START_TAG.ordinal()].put( new Tag( DsmlLiterals.CONTROL, Tag.START ),
2590 new GrammarTransition( Dsmlv2StatesEnum.MODIFY_DN_REQUEST_START_TAG,
2591 Dsmlv2StatesEnum.MODIFY_DN_REQUEST_CONTROL_START_TAG, controlCreation ) );
2592
2593
2594 super.transitions[Dsmlv2StatesEnum.MODIFY_DN_REQUEST_CONTROL_START_TAG.ordinal()].put(
2595 new Tag( DsmlLiterals.CONTROL_VALUE, Tag.START ), new GrammarTransition(
2596 Dsmlv2StatesEnum.MODIFY_DN_REQUEST_CONTROL_START_TAG,
2597 Dsmlv2StatesEnum.MODIFY_DN_REQUEST_CONTROLVALUE_END_TAG, controlValueCreation ) );
2598
2599
2600 super.transitions[Dsmlv2StatesEnum.MODIFY_DN_REQUEST_CONTROLVALUE_END_TAG.ordinal()].put( new Tag( DsmlLiterals.CONTROL,
2601 Tag.END ),
2602 new GrammarTransition( Dsmlv2StatesEnum.MODIFY_DN_REQUEST_CONTROLVALUE_END_TAG,
2603 Dsmlv2StatesEnum.MODIFY_DN_REQUEST_CONTROL_END_TAG, null ) );
2604
2605
2606 super.transitions[Dsmlv2StatesEnum.MODIFY_DN_REQUEST_CONTROL_START_TAG.ordinal()].put( new Tag( DsmlLiterals.CONTROL,
2607 Tag.END ),
2608 new GrammarTransition( Dsmlv2StatesEnum.MODIFY_DN_REQUEST_CONTROL_START_TAG,
2609 Dsmlv2StatesEnum.MODIFY_DN_REQUEST_CONTROL_END_TAG, null ) );
2610
2611
2612 super.transitions[Dsmlv2StatesEnum.MODIFY_DN_REQUEST_CONTROL_END_TAG.ordinal()].put( new Tag( DsmlLiterals.CONTROL,
2613 Tag.START ),
2614 new GrammarTransition( Dsmlv2StatesEnum.MODIFY_DN_REQUEST_CONTROL_END_TAG,
2615 Dsmlv2StatesEnum.MODIFY_DN_REQUEST_CONTROL_START_TAG, controlCreation ) );
2616
2617
2618 super.transitions[Dsmlv2StatesEnum.MODIFY_DN_REQUEST_CONTROL_END_TAG.ordinal()].put( new Tag( DsmlLiterals.MOD_DN_REQUEST,
2619 Tag.END ),
2620 new GrammarTransition( Dsmlv2StatesEnum.MODIFY_DN_REQUEST_CONTROL_END_TAG,
2621 Dsmlv2StatesEnum.BATCHREQUEST_LOOP, null ) );
2622
2623
2624
2625
2626 super.transitions[Dsmlv2StatesEnum.MODIFY_REQUEST_START_TAG.ordinal()] = new HashMap<Tag, GrammarTransition>();
2627 super.transitions[Dsmlv2StatesEnum.MODIFY_REQUEST_CONTROL_START_TAG.ordinal()] = new HashMap<Tag, GrammarTransition>();
2628 super.transitions[Dsmlv2StatesEnum.MODIFY_REQUEST_CONTROL_END_TAG.ordinal()] = new HashMap<Tag, GrammarTransition>();
2629 super.transitions[Dsmlv2StatesEnum.MODIFY_REQUEST_CONTROLVALUE_END_TAG.ordinal()] = new HashMap<Tag, GrammarTransition>();
2630 super.transitions[Dsmlv2StatesEnum.MODIFY_REQUEST_MODIFICATION_START_TAG.ordinal()] = new HashMap<Tag, GrammarTransition>();
2631 super.transitions[Dsmlv2StatesEnum.MODIFY_REQUEST_MODIFICATION_END_TAG.ordinal()] = new HashMap<Tag, GrammarTransition>();
2632 super.transitions[Dsmlv2StatesEnum.MODIFY_REQUEST_VALUE_END_TAG.ordinal()] = new HashMap<Tag, GrammarTransition>();
2633
2634
2635 super.transitions[Dsmlv2StatesEnum.MODIFY_REQUEST_START_TAG.ordinal()]
2636 .put( new Tag( DsmlLiterals.MODIFY_REQUEST, Tag.END ), new GrammarTransition(
2637 Dsmlv2StatesEnum.MODIFY_REQUEST_START_TAG, Dsmlv2StatesEnum.BATCHREQUEST_LOOP, null ) );
2638
2639
2640 super.transitions[Dsmlv2StatesEnum.MODIFY_REQUEST_START_TAG.ordinal()].put( new Tag( DsmlLiterals.CONTROL, Tag.START ),
2641 new GrammarTransition( Dsmlv2StatesEnum.MODIFY_REQUEST_START_TAG,
2642 Dsmlv2StatesEnum.MODIFY_REQUEST_CONTROL_START_TAG, controlCreation ) );
2643
2644
2645 super.transitions[Dsmlv2StatesEnum.MODIFY_REQUEST_CONTROL_START_TAG.ordinal()].put( new Tag( DsmlLiterals.CONTROL_VALUE,
2646 Tag.START ),
2647 new GrammarTransition( Dsmlv2StatesEnum.MODIFY_REQUEST_CONTROL_START_TAG,
2648 Dsmlv2StatesEnum.MODIFY_REQUEST_CONTROLVALUE_END_TAG, controlValueCreation ) );
2649
2650
2651 super.transitions[Dsmlv2StatesEnum.MODIFY_REQUEST_CONTROLVALUE_END_TAG.ordinal()].put( new Tag( DsmlLiterals.CONTROL,
2652 Tag.END ),
2653 new GrammarTransition( Dsmlv2StatesEnum.MODIFY_REQUEST_CONTROLVALUE_END_TAG,
2654 Dsmlv2StatesEnum.MODIFY_REQUEST_CONTROL_END_TAG, null ) );
2655
2656
2657 super.transitions[Dsmlv2StatesEnum.MODIFY_REQUEST_CONTROL_START_TAG.ordinal()].put(
2658 new Tag( DsmlLiterals.CONTROL, Tag.END ),
2659 new GrammarTransition( Dsmlv2StatesEnum.MODIFY_REQUEST_CONTROL_START_TAG,
2660 Dsmlv2StatesEnum.MODIFY_REQUEST_CONTROL_END_TAG, null ) );
2661
2662
2663 super.transitions[Dsmlv2StatesEnum.MODIFY_REQUEST_CONTROL_END_TAG.ordinal()].put(
2664 new Tag( DsmlLiterals.CONTROL, Tag.START ),
2665 new GrammarTransition( Dsmlv2StatesEnum.MODIFY_REQUEST_CONTROL_END_TAG,
2666 Dsmlv2StatesEnum.MODIFY_REQUEST_CONTROL_START_TAG, controlCreation ) );
2667
2668
2669 super.transitions[Dsmlv2StatesEnum.MODIFY_REQUEST_CONTROL_END_TAG.ordinal()].put( new Tag( DsmlLiterals.MODIFY_REQUEST,
2670 Tag.END ),
2671 new GrammarTransition( Dsmlv2StatesEnum.MODIFY_REQUEST_CONTROL_END_TAG, Dsmlv2StatesEnum.BATCHREQUEST_LOOP,
2672 null ) );
2673
2674
2675 super.transitions[Dsmlv2StatesEnum.MODIFY_REQUEST_CONTROL_END_TAG.ordinal()].put( new Tag( DsmlLiterals.MODIFICATION,
2676 Tag.START ),
2677 new GrammarTransition( Dsmlv2StatesEnum.MODIFY_REQUEST_CONTROL_END_TAG,
2678 Dsmlv2StatesEnum.MODIFY_REQUEST_MODIFICATION_START_TAG, modifyRequestAddModification ) );
2679
2680
2681 super.transitions[Dsmlv2StatesEnum.MODIFY_REQUEST_START_TAG.ordinal()].put(
2682 new Tag( DsmlLiterals.MODIFICATION, Tag.START ),
2683 new GrammarTransition( Dsmlv2StatesEnum.MODIFY_REQUEST_START_TAG,
2684 Dsmlv2StatesEnum.MODIFY_REQUEST_MODIFICATION_START_TAG, modifyRequestAddModification ) );
2685
2686
2687 super.transitions[Dsmlv2StatesEnum.MODIFY_REQUEST_MODIFICATION_END_TAG.ordinal()].put(
2688 new Tag( DsmlLiterals.MODIFICATION, Tag.START ), new GrammarTransition(
2689 Dsmlv2StatesEnum.MODIFY_REQUEST_MODIFICATION_END_TAG,
2690 Dsmlv2StatesEnum.MODIFY_REQUEST_MODIFICATION_START_TAG, modifyRequestAddModification ) );
2691
2692
2693 super.transitions[Dsmlv2StatesEnum.MODIFY_REQUEST_MODIFICATION_START_TAG.ordinal()].put(
2694 new Tag( DsmlLiterals.MODIFICATION, Tag.END ), new GrammarTransition(
2695 Dsmlv2StatesEnum.MODIFY_REQUEST_MODIFICATION_START_TAG,
2696 Dsmlv2StatesEnum.MODIFY_REQUEST_MODIFICATION_END_TAG, null ) );
2697
2698
2699 super.transitions[Dsmlv2StatesEnum.MODIFY_REQUEST_MODIFICATION_START_TAG.ordinal()].put( new Tag( DsmlLiterals.VALUE,
2700 Tag.START ),
2701 new GrammarTransition( Dsmlv2StatesEnum.MODIFY_REQUEST_MODIFICATION_START_TAG,
2702 Dsmlv2StatesEnum.MODIFY_REQUEST_VALUE_END_TAG, modifyRequestAddValue ) );
2703
2704
2705 super.transitions[Dsmlv2StatesEnum.MODIFY_REQUEST_VALUE_END_TAG.ordinal()].put( new Tag( DsmlLiterals.VALUE, Tag.START ),
2706 new GrammarTransition( Dsmlv2StatesEnum.MODIFY_REQUEST_VALUE_END_TAG,
2707 Dsmlv2StatesEnum.MODIFY_REQUEST_VALUE_END_TAG, modifyRequestAddValue ) );
2708
2709
2710 super.transitions[Dsmlv2StatesEnum.MODIFY_REQUEST_VALUE_END_TAG.ordinal()].put( new Tag( DsmlLiterals.MODIFICATION,
2711 Tag.END ),
2712 new GrammarTransition( Dsmlv2StatesEnum.MODIFY_REQUEST_VALUE_END_TAG,
2713 Dsmlv2StatesEnum.MODIFY_REQUEST_MODIFICATION_END_TAG, null ) );
2714
2715
2716 super.transitions[Dsmlv2StatesEnum.MODIFY_REQUEST_MODIFICATION_END_TAG.ordinal()].put(
2717 new Tag( DsmlLiterals.MODIFY_REQUEST, Tag.END ), new GrammarTransition(
2718 Dsmlv2StatesEnum.MODIFY_REQUEST_MODIFICATION_END_TAG, Dsmlv2StatesEnum.BATCHREQUEST_LOOP, null ) );
2719
2720
2721
2722
2723 super.transitions[Dsmlv2StatesEnum.SEARCH_REQUEST_START_TAG.ordinal()] = new HashMap<Tag, GrammarTransition>();
2724 super.transitions[Dsmlv2StatesEnum.SEARCH_REQUEST_CONTROL_START_TAG.ordinal()] = new HashMap<Tag, GrammarTransition>();
2725 super.transitions[Dsmlv2StatesEnum.SEARCH_REQUEST_CONTROL_END_TAG.ordinal()] = new HashMap<Tag, GrammarTransition>();
2726 super.transitions[Dsmlv2StatesEnum.SEARCH_REQUEST_CONTROLVALUE_END_TAG.ordinal()] = new HashMap<Tag, GrammarTransition>();
2727 super.transitions[Dsmlv2StatesEnum.SEARCH_REQUEST_ATTRIBUTES_START_TAG.ordinal()] = new HashMap<Tag, GrammarTransition>();
2728 super.transitions[Dsmlv2StatesEnum.SEARCH_REQUEST_ATTRIBUTES_END_TAG.ordinal()] = new HashMap<Tag, GrammarTransition>();
2729 super.transitions[Dsmlv2StatesEnum.SEARCH_REQUEST_ATTRIBUTE_START_TAG.ordinal()] = new HashMap<Tag, GrammarTransition>();
2730 super.transitions[Dsmlv2StatesEnum.SEARCH_REQUEST_ATTRIBUTE_END_TAG.ordinal()] = new HashMap<Tag, GrammarTransition>();
2731
2732
2733 super.transitions[Dsmlv2StatesEnum.SEARCH_REQUEST_START_TAG.ordinal()].put( new Tag( DsmlLiterals.CONTROL, Tag.START ),
2734 new GrammarTransition( Dsmlv2StatesEnum.SEARCH_REQUEST_START_TAG,
2735 Dsmlv2StatesEnum.SEARCH_REQUEST_CONTROL_START_TAG, controlCreation ) );
2736
2737
2738 super.transitions[Dsmlv2StatesEnum.SEARCH_REQUEST_CONTROL_START_TAG.ordinal()].put( new Tag( DsmlLiterals.CONTROL_VALUE,
2739 Tag.START ),
2740 new GrammarTransition( Dsmlv2StatesEnum.SEARCH_REQUEST_CONTROL_START_TAG,
2741 Dsmlv2StatesEnum.SEARCH_REQUEST_CONTROLVALUE_END_TAG, controlValueCreation ) );
2742
2743
2744 super.transitions[Dsmlv2StatesEnum.SEARCH_REQUEST_CONTROLVALUE_END_TAG.ordinal()].put( new Tag( DsmlLiterals.CONTROL,
2745 Tag.END ),
2746 new GrammarTransition( Dsmlv2StatesEnum.SEARCH_REQUEST_CONTROLVALUE_END_TAG,
2747 Dsmlv2StatesEnum.SEARCH_REQUEST_CONTROL_END_TAG, null ) );
2748
2749
2750 super.transitions[Dsmlv2StatesEnum.SEARCH_REQUEST_CONTROL_START_TAG.ordinal()].put(
2751 new Tag( DsmlLiterals.CONTROL, Tag.END ),
2752 new GrammarTransition( Dsmlv2StatesEnum.SEARCH_REQUEST_CONTROL_START_TAG,
2753 Dsmlv2StatesEnum.SEARCH_REQUEST_CONTROL_END_TAG, null ) );
2754
2755
2756 super.transitions[Dsmlv2StatesEnum.SEARCH_REQUEST_CONTROL_END_TAG.ordinal()].put(
2757 new Tag( DsmlLiterals.CONTROL, Tag.START ),
2758 new GrammarTransition( Dsmlv2StatesEnum.SEARCH_REQUEST_CONTROL_END_TAG,
2759 Dsmlv2StatesEnum.SEARCH_REQUEST_CONTROL_START_TAG, controlCreation ) );
2760
2761
2762 super.transitions[Dsmlv2StatesEnum.SEARCH_REQUEST_CONTROL_END_TAG.ordinal()].put( new Tag( DsmlLiterals.SEARCH_REQUEST,
2763 Tag.END ),
2764 new GrammarTransition( Dsmlv2StatesEnum.SEARCH_REQUEST_CONTROL_END_TAG, Dsmlv2StatesEnum.BATCHREQUEST_LOOP,
2765 storeFilter ) );
2766
2767
2768 super.transitions[Dsmlv2StatesEnum.SEARCH_REQUEST_ATTRIBUTES_START_TAG.ordinal()].put( new Tag( DsmlLiterals.ATTRIBUTES,
2769 Tag.END ),
2770 new GrammarTransition( Dsmlv2StatesEnum.SEARCH_REQUEST_ATTRIBUTES_START_TAG,
2771 Dsmlv2StatesEnum.SEARCH_REQUEST_ATTRIBUTES_END_TAG, null ) );
2772
2773
2774 super.transitions[Dsmlv2StatesEnum.SEARCH_REQUEST_ATTRIBUTES_START_TAG.ordinal()].put( new Tag( DsmlLiterals.ATTRIBUTE,
2775 Tag.START ),
2776 new GrammarTransition( Dsmlv2StatesEnum.SEARCH_REQUEST_ATTRIBUTES_START_TAG,
2777 Dsmlv2StatesEnum.SEARCH_REQUEST_ATTRIBUTE_START_TAG, searchRequestAddAttribute ) );
2778
2779
2780 super.transitions[Dsmlv2StatesEnum.SEARCH_REQUEST_ATTRIBUTE_START_TAG.ordinal()].put( new Tag( DsmlLiterals.ATTRIBUTE,
2781 Tag.END ),
2782 new GrammarTransition( Dsmlv2StatesEnum.SEARCH_REQUEST_ATTRIBUTE_START_TAG,
2783 Dsmlv2StatesEnum.SEARCH_REQUEST_ATTRIBUTE_END_TAG, null ) );
2784
2785
2786 super.transitions[Dsmlv2StatesEnum.SEARCH_REQUEST_ATTRIBUTE_END_TAG.ordinal()].put( new Tag( DsmlLiterals.ATTRIBUTE,
2787 Tag.START ),
2788 new GrammarTransition( Dsmlv2StatesEnum.SEARCH_REQUEST_ATTRIBUTE_END_TAG,
2789 Dsmlv2StatesEnum.SEARCH_REQUEST_ATTRIBUTE_START_TAG, searchRequestAddAttribute ) );
2790
2791
2792 super.transitions[Dsmlv2StatesEnum.SEARCH_REQUEST_ATTRIBUTE_END_TAG.ordinal()].put( new Tag( DsmlLiterals.ATTRIBUTES,
2793 Tag.END ),
2794 new GrammarTransition( Dsmlv2StatesEnum.SEARCH_REQUEST_ATTRIBUTE_END_TAG,
2795 Dsmlv2StatesEnum.SEARCH_REQUEST_ATTRIBUTES_END_TAG, null ) );
2796
2797
2798 super.transitions[Dsmlv2StatesEnum.SEARCH_REQUEST_ATTRIBUTES_END_TAG.ordinal()].put( new Tag( DsmlLiterals.SEARCH_REQUEST,
2799 Tag.END ),
2800 new GrammarTransition( Dsmlv2StatesEnum.SEARCH_REQUEST_ATTRIBUTES_END_TAG,
2801 Dsmlv2StatesEnum.BATCHREQUEST_LOOP, storeFilter ) );
2802
2803
2804
2805
2806 super.transitions[Dsmlv2StatesEnum.SEARCH_REQUEST_FILTER_START_TAG.ordinal()] = new HashMap<Tag, GrammarTransition>();
2807 super.transitions[Dsmlv2StatesEnum.SEARCH_REQUEST_FILTER_END_TAG.ordinal()] = new HashMap<Tag, GrammarTransition>();
2808 super.transitions[Dsmlv2StatesEnum.SEARCH_REQUEST_FILTER_LOOP.ordinal()] = new HashMap<Tag, GrammarTransition>();
2809 super.transitions[Dsmlv2StatesEnum.SEARCH_REQUEST_EQUALITYMATCH_START_TAG.ordinal()] = new HashMap<Tag, GrammarTransition>();
2810 super.transitions[Dsmlv2StatesEnum.SEARCH_REQUEST_GREATEROREQUAL_START_TAG.ordinal()] = new HashMap<Tag, GrammarTransition>();
2811 super.transitions[Dsmlv2StatesEnum.SEARCH_REQUEST_LESSOREQUAL_START_TAG.ordinal()] = new HashMap<Tag, GrammarTransition>();
2812 super.transitions[Dsmlv2StatesEnum.SEARCH_REQUEST_APPROXMATCH_START_TAG.ordinal()] = new HashMap<Tag, GrammarTransition>();
2813 super.transitions[Dsmlv2StatesEnum.SEARCH_REQUEST_PRESENT_START_TAG.ordinal()] = new HashMap<Tag, GrammarTransition>();
2814 super.transitions[Dsmlv2StatesEnum.SEARCH_REQUEST_EXTENSIBLEMATCH_START_TAG.ordinal()] = new HashMap<Tag, GrammarTransition>();
2815 super.transitions[Dsmlv2StatesEnum.SEARCH_REQUEST_EXTENSIBLEMATCH_VALUE_END_TAG.ordinal()] = new HashMap<Tag, GrammarTransition>();
2816 super.transitions[Dsmlv2StatesEnum.SEARCH_REQUEST_VALUE_END_TAG.ordinal()] = new HashMap<Tag, GrammarTransition>();
2817
2818
2819 super.transitions[Dsmlv2StatesEnum.SEARCH_REQUEST_START_TAG.ordinal()].put( new Tag( DsmlLiterals.FILTER, Tag.START ),
2820 new GrammarTransition( Dsmlv2StatesEnum.SEARCH_REQUEST_START_TAG,
2821 Dsmlv2StatesEnum.SEARCH_REQUEST_FILTER_START_TAG, null ) );
2822
2823
2824 super.transitions[Dsmlv2StatesEnum.SEARCH_REQUEST_CONTROL_END_TAG.ordinal()].put(
2825 new Tag( DsmlLiterals.FILTER, Tag.START ),
2826 new GrammarTransition( Dsmlv2StatesEnum.SEARCH_REQUEST_CONTROL_END_TAG,
2827 Dsmlv2StatesEnum.SEARCH_REQUEST_FILTER_START_TAG, null ) );
2828
2829
2830
2831 super.transitions[Dsmlv2StatesEnum.SEARCH_REQUEST_FILTER_START_TAG.ordinal()].put( new Tag( DsmlLiterals.AND, Tag.START ),
2832 new GrammarTransition( Dsmlv2StatesEnum.SEARCH_REQUEST_FILTER_START_TAG,
2833 Dsmlv2StatesEnum.SEARCH_REQUEST_FILTER_LOOP, andFilterCreation ) );
2834
2835
2836 super.transitions[Dsmlv2StatesEnum.SEARCH_REQUEST_FILTER_LOOP.ordinal()].put( new Tag( DsmlLiterals.AND, Tag.START ),
2837 new GrammarTransition( Dsmlv2StatesEnum.SEARCH_REQUEST_FILTER_LOOP,
2838 Dsmlv2StatesEnum.SEARCH_REQUEST_FILTER_LOOP, andFilterCreation ) );
2839
2840
2841 super.transitions[Dsmlv2StatesEnum.SEARCH_REQUEST_FILTER_LOOP.ordinal()].put( new Tag( DsmlLiterals.AND, Tag.END ),
2842 new GrammarTransition( Dsmlv2StatesEnum.SEARCH_REQUEST_FILTER_LOOP,
2843 Dsmlv2StatesEnum.SEARCH_REQUEST_FILTER_LOOP, connectorFilterClose ) );
2844
2845
2846
2847 super.transitions[Dsmlv2StatesEnum.SEARCH_REQUEST_FILTER_START_TAG.ordinal()].put( new Tag( DsmlLiterals.OR, Tag.START ),
2848 new GrammarTransition( Dsmlv2StatesEnum.SEARCH_REQUEST_FILTER_START_TAG,
2849 Dsmlv2StatesEnum.SEARCH_REQUEST_FILTER_LOOP, orFilterCreation ) );
2850
2851
2852 super.transitions[Dsmlv2StatesEnum.SEARCH_REQUEST_FILTER_LOOP.ordinal()].put( new Tag( DsmlLiterals.OR, Tag.START ),
2853 new GrammarTransition( Dsmlv2StatesEnum.SEARCH_REQUEST_FILTER_LOOP,
2854 Dsmlv2StatesEnum.SEARCH_REQUEST_FILTER_LOOP, orFilterCreation ) );
2855
2856
2857 super.transitions[Dsmlv2StatesEnum.SEARCH_REQUEST_FILTER_LOOP.ordinal()].put( new Tag( DsmlLiterals.OR, Tag.END ),
2858 new GrammarTransition( Dsmlv2StatesEnum.SEARCH_REQUEST_FILTER_LOOP,
2859 Dsmlv2StatesEnum.SEARCH_REQUEST_FILTER_LOOP, connectorFilterClose ) );
2860
2861
2862
2863 super.transitions[Dsmlv2StatesEnum.SEARCH_REQUEST_FILTER_START_TAG.ordinal()].put( new Tag( DsmlLiterals.NOT, Tag.START ),
2864 new GrammarTransition( Dsmlv2StatesEnum.SEARCH_REQUEST_FILTER_START_TAG,
2865 Dsmlv2StatesEnum.SEARCH_REQUEST_FILTER_LOOP, notFilterCreation ) );
2866
2867
2868 super.transitions[Dsmlv2StatesEnum.SEARCH_REQUEST_FILTER_LOOP.ordinal()].put( new Tag( DsmlLiterals.NOT, Tag.START ),
2869 new GrammarTransition( Dsmlv2StatesEnum.SEARCH_REQUEST_FILTER_LOOP,
2870 Dsmlv2StatesEnum.SEARCH_REQUEST_FILTER_LOOP, notFilterCreation ) );
2871
2872
2873 super.transitions[Dsmlv2StatesEnum.SEARCH_REQUEST_FILTER_LOOP.ordinal()].put( new Tag( DsmlLiterals.NOT, Tag.END ),
2874 new GrammarTransition( Dsmlv2StatesEnum.SEARCH_REQUEST_FILTER_LOOP,
2875 Dsmlv2StatesEnum.SEARCH_REQUEST_FILTER_LOOP, connectorFilterClose ) );
2876
2877
2878
2879 super.transitions[Dsmlv2StatesEnum.SEARCH_REQUEST_FILTER_START_TAG.ordinal()].put( new Tag( DsmlLiterals.SUBSTRINGS,
2880 Tag.START ),
2881 new GrammarTransition( Dsmlv2StatesEnum.SEARCH_REQUEST_FILTER_START_TAG,
2882 Dsmlv2StatesEnum.SEARCH_REQUEST_SUBSTRINGS_START_TAG, substringsFilterCreation ) );
2883
2884
2885 super.transitions[Dsmlv2StatesEnum.SEARCH_REQUEST_FILTER_LOOP.ordinal()].put(
2886 new Tag( DsmlLiterals.SUBSTRINGS, Tag.START ),
2887 new GrammarTransition( Dsmlv2StatesEnum.SEARCH_REQUEST_FILTER_LOOP,
2888 Dsmlv2StatesEnum.SEARCH_REQUEST_SUBSTRINGS_START_TAG, substringsFilterCreation ) );
2889
2890
2891
2892 super.transitions[Dsmlv2StatesEnum.SEARCH_REQUEST_FILTER_START_TAG.ordinal()].put( new Tag( DsmlLiterals.EQUALITY_MATCH,
2893 Tag.START ),
2894 new GrammarTransition( Dsmlv2StatesEnum.SEARCH_REQUEST_FILTER_START_TAG,
2895 Dsmlv2StatesEnum.SEARCH_REQUEST_EQUALITYMATCH_START_TAG, equalityMatchFilterCreation ) );
2896
2897
2898 super.transitions[Dsmlv2StatesEnum.SEARCH_REQUEST_FILTER_LOOP.ordinal()].put( new Tag( DsmlLiterals.EQUALITY_MATCH,
2899 Tag.START ),
2900 new GrammarTransition( Dsmlv2StatesEnum.SEARCH_REQUEST_FILTER_LOOP,
2901 Dsmlv2StatesEnum.SEARCH_REQUEST_EQUALITYMATCH_START_TAG, equalityMatchFilterCreation ) );
2902
2903
2904 super.transitions[Dsmlv2StatesEnum.SEARCH_REQUEST_EQUALITYMATCH_START_TAG.ordinal()].put( new Tag( DsmlLiterals.VALUE,
2905 Tag.START ),
2906 new GrammarTransition( Dsmlv2StatesEnum.SEARCH_REQUEST_EQUALITYMATCH_START_TAG,
2907 Dsmlv2StatesEnum.SEARCH_REQUEST_VALUE_END_TAG, filterAddValue ) );
2908
2909
2910 super.transitions[Dsmlv2StatesEnum.SEARCH_REQUEST_VALUE_END_TAG.ordinal()].put( new Tag( DsmlLiterals.EQUALITY_MATCH,
2911 Tag.END ),
2912 new GrammarTransition( Dsmlv2StatesEnum.SEARCH_REQUEST_VALUE_END_TAG,
2913 Dsmlv2StatesEnum.SEARCH_REQUEST_FILTER_LOOP, null ) );
2914
2915
2916
2917 super.transitions[Dsmlv2StatesEnum.SEARCH_REQUEST_FILTER_START_TAG.ordinal()].put(
2918 new Tag( DsmlLiterals.GREATER_OR_EQUAL, Tag.START ), new GrammarTransition(
2919 Dsmlv2StatesEnum.SEARCH_REQUEST_FILTER_START_TAG,
2920 Dsmlv2StatesEnum.SEARCH_REQUEST_GREATEROREQUAL_START_TAG, greaterOrEqualFilterCreation ) );
2921
2922
2923 super.transitions[Dsmlv2StatesEnum.SEARCH_REQUEST_FILTER_LOOP.ordinal()].put( new Tag( DsmlLiterals.GREATER_OR_EQUAL,
2924 Tag.START ),
2925 new GrammarTransition( Dsmlv2StatesEnum.SEARCH_REQUEST_FILTER_LOOP,
2926 Dsmlv2StatesEnum.SEARCH_REQUEST_GREATEROREQUAL_START_TAG, greaterOrEqualFilterCreation ) );
2927
2928
2929 super.transitions[Dsmlv2StatesEnum.SEARCH_REQUEST_GREATEROREQUAL_START_TAG.ordinal()].put( new Tag( DsmlLiterals.VALUE,
2930 Tag.START ),
2931 new GrammarTransition( Dsmlv2StatesEnum.SEARCH_REQUEST_GREATEROREQUAL_START_TAG,
2932 Dsmlv2StatesEnum.SEARCH_REQUEST_VALUE_END_TAG, filterAddValue ) );
2933
2934
2935 super.transitions[Dsmlv2StatesEnum.SEARCH_REQUEST_VALUE_END_TAG.ordinal()].put( new Tag( DsmlLiterals.GREATER_OR_EQUAL,
2936 Tag.END ),
2937 new GrammarTransition( Dsmlv2StatesEnum.SEARCH_REQUEST_VALUE_END_TAG,
2938 Dsmlv2StatesEnum.SEARCH_REQUEST_FILTER_LOOP, null ) );
2939
2940
2941
2942 super.transitions[Dsmlv2StatesEnum.SEARCH_REQUEST_FILTER_START_TAG.ordinal()].put( new Tag( DsmlLiterals.LESS_OR_EQUAL,
2943 Tag.START ),
2944 new GrammarTransition( Dsmlv2StatesEnum.SEARCH_REQUEST_FILTER_START_TAG,
2945 Dsmlv2StatesEnum.SEARCH_REQUEST_LESSOREQUAL_START_TAG, lessOrEqualFilterCreation ) );
2946
2947
2948 super.transitions[Dsmlv2StatesEnum.SEARCH_REQUEST_FILTER_LOOP.ordinal()].put(
2949 new Tag( DsmlLiterals.LESS_OR_EQUAL, Tag.START ),
2950 new GrammarTransition( Dsmlv2StatesEnum.SEARCH_REQUEST_FILTER_LOOP,
2951 Dsmlv2StatesEnum.SEARCH_REQUEST_LESSOREQUAL_START_TAG, lessOrEqualFilterCreation ) );
2952
2953
2954 super.transitions[Dsmlv2StatesEnum.SEARCH_REQUEST_LESSOREQUAL_START_TAG.ordinal()].put( new Tag( DsmlLiterals.VALUE,
2955 Tag.START ),
2956 new GrammarTransition( Dsmlv2StatesEnum.SEARCH_REQUEST_LESSOREQUAL_START_TAG,
2957 Dsmlv2StatesEnum.SEARCH_REQUEST_VALUE_END_TAG, filterAddValue ) );
2958
2959
2960 super.transitions[Dsmlv2StatesEnum.SEARCH_REQUEST_VALUE_END_TAG.ordinal()].put(
2961 new Tag( DsmlLiterals.LESS_OR_EQUAL, Tag.END ),
2962 new GrammarTransition( Dsmlv2StatesEnum.SEARCH_REQUEST_VALUE_END_TAG,
2963 Dsmlv2StatesEnum.SEARCH_REQUEST_FILTER_LOOP, null ) );
2964
2965
2966
2967 super.transitions[Dsmlv2StatesEnum.SEARCH_REQUEST_FILTER_START_TAG.ordinal()].put( new Tag( DsmlLiterals.APPROX_MATCH,
2968 Tag.START ),
2969 new GrammarTransition( Dsmlv2StatesEnum.SEARCH_REQUEST_FILTER_START_TAG,
2970 Dsmlv2StatesEnum.SEARCH_REQUEST_APPROXMATCH_START_TAG, approxMatchFilterCreation ) );
2971
2972
2973 super.transitions[Dsmlv2StatesEnum.SEARCH_REQUEST_FILTER_LOOP.ordinal()].put(
2974 new Tag( DsmlLiterals.APPROX_MATCH, Tag.START ),
2975 new GrammarTransition( Dsmlv2StatesEnum.SEARCH_REQUEST_FILTER_LOOP,
2976 Dsmlv2StatesEnum.SEARCH_REQUEST_APPROXMATCH_START_TAG, approxMatchFilterCreation ) );
2977
2978
2979 super.transitions[Dsmlv2StatesEnum.SEARCH_REQUEST_APPROXMATCH_START_TAG.ordinal()].put( new Tag( DsmlLiterals.VALUE,
2980 Tag.START ),
2981 new GrammarTransition( Dsmlv2StatesEnum.SEARCH_REQUEST_APPROXMATCH_START_TAG,
2982 Dsmlv2StatesEnum.SEARCH_REQUEST_VALUE_END_TAG, filterAddValue ) );
2983
2984
2985 super.transitions[Dsmlv2StatesEnum.SEARCH_REQUEST_VALUE_END_TAG.ordinal()].put(
2986 new Tag( DsmlLiterals.APPROX_MATCH, Tag.END ),
2987 new GrammarTransition( Dsmlv2StatesEnum.SEARCH_REQUEST_VALUE_END_TAG,
2988 Dsmlv2StatesEnum.SEARCH_REQUEST_FILTER_LOOP, null ) );
2989
2990
2991
2992 super.transitions[Dsmlv2StatesEnum.SEARCH_REQUEST_FILTER_START_TAG.ordinal()].put( new Tag( DsmlLiterals.PRESENT,
2993 Tag.START ),
2994 new GrammarTransition( Dsmlv2StatesEnum.SEARCH_REQUEST_FILTER_START_TAG,
2995 Dsmlv2StatesEnum.SEARCH_REQUEST_PRESENT_START_TAG, presentFilterCreation ) );
2996
2997
2998 super.transitions[Dsmlv2StatesEnum.SEARCH_REQUEST_FILTER_LOOP.ordinal()].put( new Tag( DsmlLiterals.PRESENT, Tag.START ),
2999 new GrammarTransition( Dsmlv2StatesEnum.SEARCH_REQUEST_FILTER_LOOP,
3000 Dsmlv2StatesEnum.SEARCH_REQUEST_PRESENT_START_TAG, presentFilterCreation ) );
3001
3002
3003 super.transitions[Dsmlv2StatesEnum.SEARCH_REQUEST_PRESENT_START_TAG.ordinal()].put(
3004 new Tag( DsmlLiterals.PRESENT, Tag.END ),
3005 new GrammarTransition( Dsmlv2StatesEnum.SEARCH_REQUEST_PRESENT_START_TAG,
3006 Dsmlv2StatesEnum.SEARCH_REQUEST_FILTER_LOOP, null ) );
3007
3008
3009
3010 super.transitions[Dsmlv2StatesEnum.SEARCH_REQUEST_FILTER_START_TAG.ordinal()].put(
3011 new Tag( DsmlLiterals.EXTENSIBLE_MATCH, Tag.START ), new GrammarTransition(
3012 Dsmlv2StatesEnum.SEARCH_REQUEST_FILTER_START_TAG,
3013 Dsmlv2StatesEnum.SEARCH_REQUEST_EXTENSIBLEMATCH_START_TAG, extensibleMatchFilterCreation ) );
3014
3015
3016 super.transitions[Dsmlv2StatesEnum.SEARCH_REQUEST_FILTER_LOOP.ordinal()].put( new Tag( DsmlLiterals.EXTENSIBLE_MATCH,
3017 Tag.START ),
3018 new GrammarTransition( Dsmlv2StatesEnum.SEARCH_REQUEST_FILTER_LOOP,
3019 Dsmlv2StatesEnum.SEARCH_REQUEST_EXTENSIBLEMATCH_START_TAG, extensibleMatchFilterCreation ) );
3020
3021
3022 super.transitions[Dsmlv2StatesEnum.SEARCH_REQUEST_EXTENSIBLEMATCH_START_TAG.ordinal()].put(
3023 new Tag( DsmlLiterals.VALUE, Tag.START ), new GrammarTransition(
3024 Dsmlv2StatesEnum.SEARCH_REQUEST_EXTENSIBLEMATCH_START_TAG,
3025 Dsmlv2StatesEnum.SEARCH_REQUEST_EXTENSIBLEMATCH_VALUE_END_TAG, extensibleMatchAddValue ) );
3026
3027
3028 super.transitions[Dsmlv2StatesEnum.SEARCH_REQUEST_EXTENSIBLEMATCH_VALUE_END_TAG.ordinal()].put( new Tag(
3029 DsmlLiterals.EXTENSIBLE_MATCH, Tag.END ), new GrammarTransition(
3030 Dsmlv2StatesEnum.SEARCH_REQUEST_EXTENSIBLEMATCH_VALUE_END_TAG, Dsmlv2StatesEnum.SEARCH_REQUEST_FILTER_LOOP,
3031 null ) );
3032
3033
3034
3035 super.transitions[Dsmlv2StatesEnum.SEARCH_REQUEST_FILTER_LOOP.ordinal()].put( new Tag( DsmlLiterals.FILTER, Tag.END ),
3036 new GrammarTransition( Dsmlv2StatesEnum.SEARCH_REQUEST_FILTER_LOOP,
3037 Dsmlv2StatesEnum.SEARCH_REQUEST_FILTER_END_TAG, null ) );
3038
3039
3040 super.transitions[Dsmlv2StatesEnum.SEARCH_REQUEST_FILTER_END_TAG.ordinal()].put( new Tag( DsmlLiterals.ATTRIBUTES,
3041 Tag.START ),
3042 new GrammarTransition( Dsmlv2StatesEnum.SEARCH_REQUEST_FILTER_END_TAG,
3043 Dsmlv2StatesEnum.SEARCH_REQUEST_ATTRIBUTES_START_TAG, null ) );
3044
3045
3046 super.transitions[Dsmlv2StatesEnum.SEARCH_REQUEST_FILTER_END_TAG.ordinal()].put( new Tag( DsmlLiterals.SEARCH_REQUEST,
3047 Tag.END ),
3048 new GrammarTransition( Dsmlv2StatesEnum.SEARCH_REQUEST_FILTER_END_TAG, Dsmlv2StatesEnum.BATCHREQUEST_LOOP,
3049 storeFilter ) );
3050
3051
3052
3053
3054 super.transitions[Dsmlv2StatesEnum.SEARCH_REQUEST_SUBSTRINGS_START_TAG.ordinal()] = new HashMap<Tag, GrammarTransition>();
3055 super.transitions[Dsmlv2StatesEnum.SEARCH_REQUEST_INITIAL_END_TAG.ordinal()] = new HashMap<Tag, GrammarTransition>();
3056 super.transitions[Dsmlv2StatesEnum.SEARCH_REQUEST_ANY_END_TAG.ordinal()] = new HashMap<Tag, GrammarTransition>();
3057 super.transitions[Dsmlv2StatesEnum.SEARCH_REQUEST_FINAL_END_TAG.ordinal()] = new HashMap<Tag, GrammarTransition>();
3058 super.transitions[Dsmlv2StatesEnum.SEARCH_REQUEST_SUBSTRINGS_END_TAG.ordinal()] = new HashMap<Tag, GrammarTransition>();
3059
3060
3061 super.transitions[Dsmlv2StatesEnum.SEARCH_REQUEST_SUBSTRINGS_START_TAG.ordinal()].put( new Tag( DsmlLiterals.SUBSTRINGS,
3062 Tag.END ),
3063 new GrammarTransition( Dsmlv2StatesEnum.SEARCH_REQUEST_SUBSTRINGS_START_TAG,
3064 Dsmlv2StatesEnum.SEARCH_REQUEST_FILTER_LOOP, null ) );
3065
3066
3067 super.transitions[Dsmlv2StatesEnum.SEARCH_REQUEST_SUBSTRINGS_START_TAG.ordinal()].put( new Tag( DsmlLiterals.INITIAL,
3068 Tag.START ),
3069 new GrammarTransition( Dsmlv2StatesEnum.SEARCH_REQUEST_SUBSTRINGS_START_TAG,
3070 Dsmlv2StatesEnum.SEARCH_REQUEST_INITIAL_END_TAG, substringsFilterSetInitial ) );
3071
3072
3073 super.transitions[Dsmlv2StatesEnum.SEARCH_REQUEST_INITIAL_END_TAG.ordinal()].put( new Tag( DsmlLiterals.ANY, Tag.START ),
3074 new GrammarTransition( Dsmlv2StatesEnum.SEARCH_REQUEST_INITIAL_END_TAG,
3075 Dsmlv2StatesEnum.SEARCH_REQUEST_ANY_END_TAG, substringsFilterAddAny ) );
3076
3077
3078 super.transitions[Dsmlv2StatesEnum.SEARCH_REQUEST_INITIAL_END_TAG.ordinal()].put(
3079 new Tag( DsmlLiterals.FINAL, Tag.START ),
3080 new GrammarTransition( Dsmlv2StatesEnum.SEARCH_REQUEST_INITIAL_END_TAG,
3081 Dsmlv2StatesEnum.SEARCH_REQUEST_FINAL_END_TAG, substringsFilterSetFinal ) );
3082
3083
3084 super.transitions[Dsmlv2StatesEnum.SEARCH_REQUEST_INITIAL_END_TAG.ordinal()].put( new Tag( DsmlLiterals.SUBSTRINGS,
3085 Tag.END ),
3086 new GrammarTransition( Dsmlv2StatesEnum.SEARCH_REQUEST_INITIAL_END_TAG,
3087 Dsmlv2StatesEnum.SEARCH_REQUEST_FILTER_LOOP, substringsFilterClose ) );
3088
3089
3090 super.transitions[Dsmlv2StatesEnum.SEARCH_REQUEST_SUBSTRINGS_START_TAG.ordinal()].put( new Tag( DsmlLiterals.ANY,
3091 Tag.START ),
3092 new GrammarTransition( Dsmlv2StatesEnum.SEARCH_REQUEST_SUBSTRINGS_START_TAG,
3093 Dsmlv2StatesEnum.SEARCH_REQUEST_ANY_END_TAG, substringsFilterAddAny ) );
3094
3095
3096 super.transitions[Dsmlv2StatesEnum.SEARCH_REQUEST_ANY_END_TAG.ordinal()].put( new Tag( DsmlLiterals.ANY, Tag.START ),
3097 new GrammarTransition( Dsmlv2StatesEnum.SEARCH_REQUEST_ANY_END_TAG,
3098 Dsmlv2StatesEnum.SEARCH_REQUEST_ANY_END_TAG, substringsFilterAddAny ) );
3099
3100
3101 super.transitions[Dsmlv2StatesEnum.SEARCH_REQUEST_ANY_END_TAG.ordinal()].put( new Tag( DsmlLiterals.FINAL, Tag.START ),
3102 new GrammarTransition( Dsmlv2StatesEnum.SEARCH_REQUEST_ANY_END_TAG,
3103 Dsmlv2StatesEnum.SEARCH_REQUEST_FINAL_END_TAG, substringsFilterSetFinal ) );
3104
3105
3106 super.transitions[Dsmlv2StatesEnum.SEARCH_REQUEST_ANY_END_TAG.ordinal()].put( new Tag( DsmlLiterals.SUBSTRINGS, Tag.END ),
3107 new GrammarTransition( Dsmlv2StatesEnum.SEARCH_REQUEST_ANY_END_TAG,
3108 Dsmlv2StatesEnum.SEARCH_REQUEST_FILTER_LOOP, substringsFilterClose ) );
3109
3110
3111 super.transitions[Dsmlv2StatesEnum.SEARCH_REQUEST_SUBSTRINGS_START_TAG.ordinal()].put( new Tag( DsmlLiterals.FINAL,
3112 Tag.START ),
3113 new GrammarTransition( Dsmlv2StatesEnum.SEARCH_REQUEST_SUBSTRINGS_START_TAG,
3114 Dsmlv2StatesEnum.SEARCH_REQUEST_FINAL_END_TAG, substringsFilterSetFinal ) );
3115
3116
3117 super.transitions[Dsmlv2StatesEnum.SEARCH_REQUEST_FINAL_END_TAG.ordinal()].put(
3118 new Tag( DsmlLiterals.SUBSTRINGS, Tag.END ),
3119 new GrammarTransition( Dsmlv2StatesEnum.SEARCH_REQUEST_FINAL_END_TAG,
3120 Dsmlv2StatesEnum.SEARCH_REQUEST_FILTER_LOOP, substringsFilterClose ) );
3121
3122
3123 super.transitions[Dsmlv2StatesEnum.SOAP_ENVELOPE_START_TAG.ordinal()] = new HashMap<Tag, GrammarTransition>();
3124 super.transitions[Dsmlv2StatesEnum.SOAP_HEADER_START_TAG.ordinal()] = new HashMap<Tag, GrammarTransition>();
3125 super.transitions[Dsmlv2StatesEnum.SOAP_HEADER_END_TAG.ordinal()] = new HashMap<Tag, GrammarTransition>();
3126 super.transitions[Dsmlv2StatesEnum.SOAP_BODY_START_TAG.ordinal()] = new HashMap<Tag, GrammarTransition>();
3127 super.transitions[Dsmlv2StatesEnum.SOAP_BODY_END_TAG.ordinal()] = new HashMap<Tag, GrammarTransition>();
3128
3129 super.transitions[Dsmlv2StatesEnum.GRAMMAR_END.ordinal()] = new HashMap<Tag, GrammarTransition>();
3130
3131
3132 super.transitions[Dsmlv2StatesEnum.INIT_GRAMMAR_STATE.ordinal()].put( new Tag( DsmlLiterals.ENVELOPE, Tag.START ),
3133 new GrammarTransition( Dsmlv2StatesEnum.INIT_GRAMMAR_STATE, Dsmlv2StatesEnum.SOAP_ENVELOPE_START_TAG,
3134 null ) );
3135
3136
3137 super.transitions[Dsmlv2StatesEnum.SOAP_ENVELOPE_START_TAG.ordinal()].put( new Tag( DsmlLiterals.HEADER, Tag.START ),
3138 new GrammarTransition( Dsmlv2StatesEnum.SOAP_ENVELOPE_START_TAG, Dsmlv2StatesEnum.SOAP_HEADER_START_TAG,
3139 ParserUtils.READ_SOAP_HEADER ) );
3140
3141
3142 super.transitions[Dsmlv2StatesEnum.SOAP_HEADER_START_TAG.ordinal()]
3143 .put( new Tag( DsmlLiterals.HEADER, Tag.END ),
3144 new GrammarTransition( Dsmlv2StatesEnum.SOAP_HEADER_START_TAG, Dsmlv2StatesEnum.SOAP_HEADER_END_TAG,
3145 null ) );
3146
3147
3148 super.transitions[Dsmlv2StatesEnum.SOAP_HEADER_END_TAG.ordinal()].put( new Tag( DsmlLiterals.BODY, Tag.START ),
3149 new GrammarTransition( Dsmlv2StatesEnum.SOAP_HEADER_END_TAG, Dsmlv2StatesEnum.SOAP_BODY_START_TAG, null ) );
3150
3151
3152 super.transitions[Dsmlv2StatesEnum.SOAP_BODY_START_TAG.ordinal()].put( new Tag( DsmlLiterals.BATCH_REQUEST, Tag.START ),
3153 new GrammarTransition( Dsmlv2StatesEnum.SOAP_BODY_START_TAG, Dsmlv2StatesEnum.BATCHREQUEST_START_TAG,
3154 batchRequestCreation ) );
3155
3156
3157
3158 super.transitions[Dsmlv2StatesEnum.SOAP_ENVELOPE_START_TAG.ordinal()]
3159 .put( new Tag( DsmlLiterals.BODY, Tag.START ),
3160 new GrammarTransition( Dsmlv2StatesEnum.SOAP_ENVELOPE_START_TAG, Dsmlv2StatesEnum.SOAP_BODY_START_TAG,
3161 null ) );
3162
3163
3164
3165
3166
3167 super.transitions[Dsmlv2StatesEnum.GRAMMAR_END.ordinal()].put( new Tag( DsmlLiterals.BODY, Tag.END ),
3168 new GrammarTransition( Dsmlv2StatesEnum.GRAMMAR_END, Dsmlv2StatesEnum.GRAMMAR_END, null ) );
3169
3170 super.transitions[Dsmlv2StatesEnum.GRAMMAR_END.ordinal()].put( new Tag( DsmlLiterals.ENVELOPE, Tag.END ),
3171 new GrammarTransition( Dsmlv2StatesEnum.GRAMMAR_END, Dsmlv2StatesEnum.GRAMMAR_END, null ) );
3172
3173
3174
3175 }
3176
3177
3178
3179
3180
3181 public LdapApiService getLdapCodecService()
3182 {
3183 return codec;
3184 }
3185 }