|
Lines 316-322
Link Here
|
| 316 |
} |
316 |
} |
| 317 |
|
317 |
|
| 318 |
//CommonBaseEvents/TemplateEvent: 1 |
318 |
//CommonBaseEvents/TemplateEvent: 1 |
| 319 |
else if(parentElement == 1){ |
319 |
else if(parentElement == 1 && anyElementNestingDepth == 0){ |
| 320 |
|
320 |
|
| 321 |
if(elementName.equals("CommonBaseEvent")){ |
321 |
if(elementName.equals("CommonBaseEvent")){ |
| 322 |
|
322 |
|
|
Lines 453-459
Link Here
|
| 453 |
//CommonBaseEvent: 2 |
453 |
//CommonBaseEvent: 2 |
| 454 |
else if(parentElement == 2){ |
454 |
else if(parentElement == 2){ |
| 455 |
|
455 |
|
| 456 |
if(elementName.equals("contextDataElements")){ |
456 |
if(elementName.equals("contextDataElements") && anyElementNestingDepth == 0){ |
| 457 |
|
457 |
|
| 458 |
ContextDataElement contextDataElement = EventFactory.eINSTANCE.createContextDataElement(); |
458 |
ContextDataElement contextDataElement = EventFactory.eINSTANCE.createContextDataElement(); |
| 459 |
|
459 |
|
|
Lines 474-480
Link Here
|
| 474 |
|
474 |
|
| 475 |
parentElement = 3; |
475 |
parentElement = 3; |
| 476 |
} |
476 |
} |
| 477 |
else if(elementName.equals("extendedDataElements")){ |
477 |
else if(elementName.equals("extendedDataElements") && anyElementNestingDepth == 0){ |
| 478 |
|
478 |
|
| 479 |
ExtendedDataElement extendedDataElement = EventFactory.eINSTANCE.createExtendedDataElement(); |
479 |
ExtendedDataElement extendedDataElement = EventFactory.eINSTANCE.createExtendedDataElement(); |
| 480 |
|
480 |
|
|
Lines 495-501
Link Here
|
| 495 |
|
495 |
|
| 496 |
parentElement = 4; |
496 |
parentElement = 4; |
| 497 |
} |
497 |
} |
| 498 |
else if(elementName.equals("associatedEvents")){ |
498 |
else if(elementName.equals("associatedEvents") && anyElementNestingDepth == 0){ |
| 499 |
|
499 |
|
| 500 |
AssociatedEvent associatedEvent = EventFactory.eINSTANCE.createAssociatedEvent(); |
500 |
AssociatedEvent associatedEvent = EventFactory.eINSTANCE.createAssociatedEvent(); |
| 501 |
|
501 |
|
|
Lines 513-519
Link Here
|
| 513 |
|
513 |
|
| 514 |
parentElement = 6; |
514 |
parentElement = 6; |
| 515 |
} |
515 |
} |
| 516 |
else if(elementName.equals("reporterComponentId")){ |
516 |
else if(elementName.equals("reporterComponentId") && anyElementNestingDepth == 0){ |
| 517 |
|
517 |
|
| 518 |
ComponentIdentification reporterComponentId = EventFactory.eINSTANCE.createComponentIdentification(); |
518 |
ComponentIdentification reporterComponentId = EventFactory.eINSTANCE.createComponentIdentification(); |
| 519 |
|
519 |
|
|
Lines 559-565
Link Here
|
| 559 |
|
559 |
|
| 560 |
((CommonBaseEvent)(parsedElements.get(parsedElements.size() - 1))).setReporterComponentId(reporterComponentId); |
560 |
((CommonBaseEvent)(parsedElements.get(parsedElements.size() - 1))).setReporterComponentId(reporterComponentId); |
| 561 |
} |
561 |
} |
| 562 |
else if(elementName.equals("sourceComponentId")){ |
562 |
else if(elementName.equals("sourceComponentId") && anyElementNestingDepth == 0){ |
| 563 |
|
563 |
|
| 564 |
ComponentIdentification sourceComponentId = EventFactory.eINSTANCE.createComponentIdentification(); |
564 |
ComponentIdentification sourceComponentId = EventFactory.eINSTANCE.createComponentIdentification(); |
| 565 |
|
565 |
|
|
Lines 605-611
Link Here
|
| 605 |
|
605 |
|
| 606 |
((CommonBaseEvent)(parsedElements.get(parsedElements.size() - 1))).setSourceComponentId(sourceComponentId); |
606 |
((CommonBaseEvent)(parsedElements.get(parsedElements.size() - 1))).setSourceComponentId(sourceComponentId); |
| 607 |
} |
607 |
} |
| 608 |
else if(elementName.equals("msgDataElement")){ |
608 |
else if(elementName.equals("msgDataElement") && anyElementNestingDepth == 0){ |
| 609 |
|
609 |
|
| 610 |
MsgDataElement msgDataElement = EventFactory.eINSTANCE.createMsgDataElement(); |
610 |
MsgDataElement msgDataElement = EventFactory.eINSTANCE.createMsgDataElement(); |
| 611 |
|
611 |
|
|
Lines 623-629
Link Here
|
| 623 |
|
623 |
|
| 624 |
parentElement = 7; |
624 |
parentElement = 7; |
| 625 |
} |
625 |
} |
| 626 |
else if(elementName.equals("situation")){ |
626 |
else if(elementName.equals("situation") && anyElementNestingDepth == 0){ |
| 627 |
|
627 |
|
| 628 |
Situation situation = EventFactory.eINSTANCE.createSituation(); |
628 |
Situation situation = EventFactory.eINSTANCE.createSituation(); |
| 629 |
|
629 |
|
|
Lines 675-681
Link Here
|
| 675 |
|
675 |
|
| 676 |
//extendedDataElements: 4 |
676 |
//extendedDataElements: 4 |
| 677 |
//children: 5 |
677 |
//children: 5 |
| 678 |
else if((parentElement == 4) || (parentElement == 5)){ |
678 |
else if((parentElement == 4) || (parentElement == 5) && anyElementNestingDepth == 0){ |
| 679 |
|
679 |
|
| 680 |
//Validate the remaining child elements when processing the ExtendedDataElements end element: |
680 |
//Validate the remaining child elements when processing the ExtendedDataElements end element: |
| 681 |
if(elementName.equals("children")){ |
681 |
if(elementName.equals("children")){ |
|
Lines 702-708
Link Here
|
| 702 |
} |
702 |
} |
| 703 |
|
703 |
|
| 704 |
//associatedEvents: 6 |
704 |
//associatedEvents: 6 |
| 705 |
else if(parentElement == 6){ |
705 |
else if(parentElement == 6 && anyElementNestingDepth == 0){ |
| 706 |
|
706 |
|
| 707 |
//Validate the remaining child elements when processing the msgDataElement end element: |
707 |
//Validate the remaining child elements when processing the msgDataElement end element: |
| 708 |
if(elementName.equals("associationEngineInfo")){ |
708 |
if(elementName.equals("associationEngineInfo")){ |
|
Lines 730-736
Link Here
|
| 730 |
} |
730 |
} |
| 731 |
|
731 |
|
| 732 |
//msgDataElement: 7 |
732 |
//msgDataElement: 7 |
| 733 |
else if(parentElement == 7){ |
733 |
else if(parentElement == 7 && anyElementNestingDepth == 0){ |
| 734 |
|
734 |
|
| 735 |
//Validate the remaining child elements when processing the msgDataElement end element: |
735 |
//Validate the remaining child elements when processing the msgDataElement end element: |
| 736 |
if(elementName.equals("msgCatalogTokens")){ |
736 |
if(elementName.equals("msgCatalogTokens")){ |
|
Lines 752-758
Link Here
|
| 752 |
} |
752 |
} |
| 753 |
|
753 |
|
| 754 |
//situation: 8 |
754 |
//situation: 8 |
| 755 |
else if(parentElement == 8){ |
755 |
else if(parentElement == 8 && anyElementNestingDepth == 0){ |
| 756 |
|
756 |
|
| 757 |
if(elementName.equals("situationType")){ |
757 |
if(elementName.equals("situationType")){ |
| 758 |
|
758 |
|
|
Lines 1050-1056
Link Here
|
| 1050 |
|
1050 |
|
| 1051 |
//Validate the child elements of the following elements when processing their end element: |
1051 |
//Validate the child elements of the following elements when processing their end element: |
| 1052 |
//-ContextDataElements |
1052 |
//-ContextDataElements |
| 1053 |
else if(parentElement != 3){ |
1053 |
else if(parentElement != 3 && anyElementNestingDepth == 0){ |
| 1054 |
throw new SAXException(LoggingCoreResourceBundle.getString("LOG_EVENT_SAX_PARSER_UNEXPECTED_XML_ELEMENT_EXC_", elementName, String.valueOf(line), String.valueOf(column))); |
1054 |
throw new SAXException(LoggingCoreResourceBundle.getString("LOG_EVENT_SAX_PARSER_UNEXPECTED_XML_ELEMENT_EXC_", elementName, String.valueOf(line), String.valueOf(column))); |
| 1055 |
} |
1055 |
} |
| 1056 |
|
1056 |
|
|
Lines 1074-1086
Link Here
|
| 1074 |
//CommonBaseEvent: 2 |
1074 |
//CommonBaseEvent: 2 |
| 1075 |
if(parentElement == 2){ |
1075 |
if(parentElement == 2){ |
| 1076 |
|
1076 |
|
| 1077 |
if(elementName.equals("CommonBaseEvent")){ |
1077 |
if(elementName.equals("CommonBaseEvent") && anyElementNestingDepth == 0){ |
| 1078 |
|
1078 |
|
| 1079 |
CommonBaseEvent commonBaseEvent = ((CommonBaseEvent)(parsedElements.remove(parsedElements.size() - 1))); |
1079 |
CommonBaseEvent commonBaseEvent = ((CommonBaseEvent)(parsedElements.remove(parsedElements.size() - 1))); |
| 1080 |
|
1080 |
|
| 1081 |
//Do not persist white space (e.g. formatting characters) between elements: |
1081 |
//Do not persist white space (e.g. formatting characters) between elements: |
| 1082 |
if (charactersBuffer.toString().trim().length() > 0) { |
1082 |
if (charactersBuffer.toString().trim().length() > 0) { |
| 1083 |
commonBaseEvent.addAny(XmlUtility.normalize(charactersBuffer.toString())); |
1083 |
commonBaseEvent.addAny(charactersBuffer.toString().trim()); |
| 1084 |
} |
1084 |
} |
| 1085 |
|
1085 |
|
| 1086 |
if(eventListener != null){ |
1086 |
if(eventListener != null){ |
|
Lines 1112-1118
Link Here
|
| 1112 |
} |
1112 |
} |
| 1113 |
|
1113 |
|
| 1114 |
//contextDataElements: 3 |
1114 |
//contextDataElements: 3 |
| 1115 |
else if(parentElement == 3){ |
1115 |
else if(parentElement == 3 && anyElementNestingDepth == 0){ |
| 1116 |
|
1116 |
|
| 1117 |
if(elementName.equals("contextValue")){ |
1117 |
if(elementName.equals("contextValue")){ |
| 1118 |
((ContextDataElement)(parsedElements.get(parsedElements.size() - 1))).setContextValue(charactersBuffer.toString()); |
1118 |
((ContextDataElement)(parsedElements.get(parsedElements.size() - 1))).setContextValue(charactersBuffer.toString()); |
|
Lines 1135-1141
Link Here
|
| 1135 |
|
1135 |
|
| 1136 |
//extendedDataElements: 4 |
1136 |
//extendedDataElements: 4 |
| 1137 |
//children: 5 |
1137 |
//children: 5 |
| 1138 |
else if((parentElement == 4) || (parentElement == 5)){ |
1138 |
else if((parentElement == 4) || (parentElement == 5) && anyElementNestingDepth == 0){ |
| 1139 |
|
1139 |
|
| 1140 |
if(elementName.equals("values")){ |
1140 |
if(elementName.equals("values")){ |
| 1141 |
((ExtendedDataElement)(parsedElements.get(parsedElements.size() - 1))).getValues().add(charactersBuffer.toString()); |
1141 |
((ExtendedDataElement)(parsedElements.get(parsedElements.size() - 1))).getValues().add(charactersBuffer.toString()); |
|
Lines 1165-1171
Link Here
|
| 1165 |
} |
1165 |
} |
| 1166 |
|
1166 |
|
| 1167 |
//associatedEvents: 6 |
1167 |
//associatedEvents: 6 |
| 1168 |
else if(parentElement == 6){ |
1168 |
else if(parentElement == 6 && anyElementNestingDepth == 0){ |
| 1169 |
|
1169 |
|
| 1170 |
if(elementName.equals("associationEngine")){ |
1170 |
if(elementName.equals("associationEngine")){ |
| 1171 |
((AssociatedEvent)(parsedElements.get(parsedElements.size() - 1))).setAssociationEngine(charactersBuffer.toString()); |
1171 |
((AssociatedEvent)(parsedElements.get(parsedElements.size() - 1))).setAssociationEngine(charactersBuffer.toString()); |
|
Lines 1184-1190
Link Here
|
| 1184 |
} |
1184 |
} |
| 1185 |
|
1185 |
|
| 1186 |
//msgDataElement: 7 |
1186 |
//msgDataElement: 7 |
| 1187 |
else if(parentElement == 7){ |
1187 |
else if(parentElement == 7 && anyElementNestingDepth == 0){ |
| 1188 |
|
1188 |
|
| 1189 |
if(elementName.equals("msgId")){ |
1189 |
if(elementName.equals("msgId")){ |
| 1190 |
((MsgDataElement)(parsedElements.get(parsedElements.size() - 1))).setMsgId(charactersBuffer.toString()); |
1190 |
((MsgDataElement)(parsedElements.get(parsedElements.size() - 1))).setMsgId(charactersBuffer.toString()); |
|
Lines 1215-1221
Link Here
|
| 1215 |
} |
1215 |
} |
| 1216 |
|
1216 |
|
| 1217 |
//situation: 8 |
1217 |
//situation: 8 |
| 1218 |
else if(parentElement == 8){ |
1218 |
else if(parentElement == 8 && anyElementNestingDepth == 0){ |
| 1219 |
|
1219 |
|
| 1220 |
if(elementName.equals("situation")){ |
1220 |
if(elementName.equals("situation")){ |
| 1221 |
|
1221 |
|
|
Lines 1233-1239
Link Here
|
| 1233 |
//OtherSituation: 9 |
1233 |
//OtherSituation: 9 |
| 1234 |
else if(parentElement == 9){ |
1234 |
else if(parentElement == 9){ |
| 1235 |
|
1235 |
|
| 1236 |
if(elementName.equals("situationType")){ |
1236 |
if(elementName.equals("situationType") && anyElementNestingDepth == 0){ |
| 1237 |
|
1237 |
|
| 1238 |
OtherSituation otherSituation = ((OtherSituation)(parsedElements.remove(parsedElements.size() - 1))); |
1238 |
OtherSituation otherSituation = ((OtherSituation)(parsedElements.remove(parsedElements.size() - 1))); |
| 1239 |
|
1239 |
|
|
Lines 1247-1253
Link Here
|
| 1247 |
|
1247 |
|
| 1248 |
//Do not persist white space (e.g. formatting characters) between elements: |
1248 |
//Do not persist white space (e.g. formatting characters) between elements: |
| 1249 |
if (charactersBuffer.toString().trim().length() > 0) { |
1249 |
if (charactersBuffer.toString().trim().length() > 0) { |
| 1250 |
otherSituation.setAny(XmlUtility.normalize(charactersBuffer.toString())); |
1250 |
otherSituation.setAny(charactersBuffer.toString().trim()); |
| 1251 |
} |
1251 |
} |
| 1252 |
|
1252 |
|
| 1253 |
((Situation)(parsedElements.get(parsedElements.size() - 1))).setSituationType(otherSituation); |
1253 |
((Situation)(parsedElements.get(parsedElements.size() - 1))).setSituationType(otherSituation); |