View Javadoc
1   package org.kuali.ole;
2   
3   import com.thoughtworks.xstream.XStream;
4   import org.kuali.ole.pojo.edi.*;
5   
6   import java.util.Arrays;
7   
8   
9   /**
10   * Created by IntelliJ IDEA.
11   * User: palanivel
12   * Date: 3/2/12
13   * Time: 8:11 PM
14   * To change this template use File | Settings | File Templates.
15   */
16  public class OLETranscationalRecordGenerator {
17  
18      public String toXml(EDIOrder ediOrder) {
19          EDIOrders ediOrders = new EDIOrders();
20          ediOrders.setOrders(Arrays.asList(ediOrder));
21          String xml = toXml(ediOrders);
22          return xml;
23      }
24  
25      public String toXml(EDIOrders ediOrders) {
26          XStream xStream = intXStream();
27          String order = xStream.toXML(ediOrders);
28          return order;
29      }
30  
31      public EDIOrders fromXml(String requestXML) {
32          XStream xStream = intXStream();
33          return (EDIOrders) xStream.fromXML(requestXML);
34      }
35  
36      public INVOrders fromInvoiceXml(String requestXML) {
37          XStream xStream = intInvoiceXStream();
38          return (INVOrders) xStream.fromXML(requestXML);
39      }
40  
41      public String toInvoiceXml(INVOrders invOrders) {
42          XStream xStream = intInvoiceXStream();
43          return xStream.toXML(invOrders);
44      }
45  
46      private XStream intXStream() {
47          XStream xStream = new XStream();
48          xStream.alias("orders", EDIOrders.class);
49          xStream.alias("order", EDIOrder.class);
50          xStream.addImplicitCollection(EDIOrders.class, "orders", EDIOrder.class);
51  
52          xStream.aliasField("sendersandreceiversidentification", EDIOrder.class, "senderAndReceiver");
53          xStream.aliasField("sendersandreceiversconstant", SenderAndReceiver.class, "sendersAndReceiversConstant");
54          xStream.aliasField("code", SendersAndReceiversConstant.class, "code");
55          xStream.aliasField("value", SendersAndReceiversConstant.class, "value");
56          xStream.aliasField("senderinformation", SenderAndReceiver.class, "senderInformation");
57          xStream.aliasField("senderid", SenderInformation.class, "senderId");
58          xStream.aliasField("senderidtype", SenderInformation.class, "senderIdType");
59          xStream.aliasField("receiverinformation", SenderAndReceiver.class, "receiverInformation");
60          xStream.aliasField("receiverid", ReceiverInformation.class, "receiverId");
61          xStream.aliasField("receiveridtype", ReceiverInformation.class, "receiverIdType");
62          xStream.aliasField("schedule", SenderAndReceiver.class, "schedule");
63          xStream.aliasField("preparationdate", Schedule.class, "preparationDate");
64          xStream.aliasField("preparationtime", Schedule.class, "preparationTime");
65          xStream.aliasField("interchangecontrolref", SenderAndReceiver.class, "interChangeControlReference");
66  
67          xStream.aliasField("messageheader", EDIOrder.class, "messageHeader");
68          xStream.aliasField("interchangecontrolref", MessageHeader.class, "interchangeControlReference");
69          xStream.aliasField("messagetypeinformation", MessageHeader.class, "messsageTypeInformation");
70          xStream.aliasField("messagetypeid", MesssageTypeInformation.class, "messageTypeId");
71          xStream.aliasField("constant1", MesssageTypeInformation.class, "constant1");
72          xStream.aliasField("constant2", MesssageTypeInformation.class, "constant2");
73          xStream.aliasField("constant3", MesssageTypeInformation.class, "constant3");
74          xStream.aliasField("constant4", MesssageTypeInformation.class, "constant4");
75  
76          xStream.aliasField("message", EDIOrder.class, "message");
77          xStream.aliasField("messagebeginning", Message.class, "messageBeginning");
78          xStream.aliasField("order", MessageBeginning.class, "messageBeginningOrder");
79          xStream.aliasField("interchangecontrolref", MessageBeginning.class, "messageBeginningInterchangeControlReference");
80          xStream.aliasField("codelistagency", MessageBeginning.class, "messageBeginningCodeListAgency");
81  
82          xStream.aliasField("messagecreationinfo", Message.class, "messageCreationInformation");
83          xStream.aliasField("details", MessageCreationInformation.class, "messageCreationInfoDetails");
84          xStream.aliasField("constant", MessageCreationInfoDetails.class, "messageCreationInfoConstant");
85          xStream.aliasField("date", MessageCreationInfoDetails.class, "messageCreationInfoDate");
86          xStream.aliasField("dateformat", MessageCreationInfoDetails.class, "messageCreationInfoDateFormat");
87  
88          xStream.aliasField("buyerpartyqualifier", Message.class, "buyerPartyQualifier");
89          xStream.aliasField("buyer", BuyerPartyQualifier.class, "buyer");
90          xStream.aliasField("buyerinfo", BuyerPartyQualifier.class, "buyerInformation");
91          xStream.aliasField("codedidentification", BuyerInformation.class, "buyerCodeIdentification");
92          xStream.aliasField("partyidentificationcode", BuyerInformation.class, "buyerPartyIdentificationCode");
93          xStream.aliasField("codelistagency", BuyerInformation.class, "buyerCodeListAgency");
94  
95          xStream.aliasField("reference", Message.class, "messageReference");
96          xStream.aliasField("partydetails", MessageReference.class, "partyDetails");
97          xStream.aliasField("additionalpartyidentification", PartyDetails.class, "additionalPartyIdentification");
98          xStream.aliasField("partyname", PartyDetails.class, "partyName");
99  
100         xStream.aliasField("supplierpartyqualifier", Message.class, "supplierPartyQualifier");
101         xStream.aliasField("supplier", SupplierPartyQualifier.class, "supplier");
102         xStream.aliasField("supplierinfo", SupplierPartyQualifier.class, "supplierInformation");
103         xStream.aliasField("codedidentification", SupplierInformation.class, "supplierCodeIdentification");
104         xStream.aliasField("partyidentificationcode", SupplierInformation.class, "supplierPartyIdentificationCode");
105         xStream.aliasField("codelistagency", SupplierInformation.class, "supplierCodeListAgency");
106 
107         xStream.aliasField("currencydetails", Message.class, "currencyDetails");
108         xStream.aliasField("supplierinfo", CurrencyDetails.class, "currencyDetailsSupplierInformation");
109         xStream.aliasField("defaultcurrency", CurrencyDetailsSupplierInformation.class, "defaultCurrency");
110         xStream.aliasField("currencytype", CurrencyDetailsSupplierInformation.class, "currencyType");
111         xStream.aliasField("ordercurrency", CurrencyDetailsSupplierInformation.class, "orderCurrency");
112 
113         xStream.alias("lineitemOrder", LineItemOrder.class);
114         xStream.alias("lineitem", LineItem.class);
115         xStream.alias("articlenumber", LineItemArticleNumber.class);
116         xStream.alias("productfunction", ProductFunction.class);
117         xStream.alias("articlenumber", ProductArticleNumber.class);
118         xStream.alias("itemdescription", ItemDescription.class);
119         xStream.alias("quantityinformation", QuantityInformation.class);
120         xStream.alias("quantity", Qunatity.class);
121         xStream.alias("priceinformation", PriceInformation.class);
122         xStream.alias("price", ItemPrice.class);
123         xStream.alias("referenceinformation", BuyerReferenceInformation.class);
124         xStream.alias("reference", BuyerLineItemReference.class);
125         xStream.alias("suppliersreferenceinformation", SupplierReferenceInformation.class);
126         xStream.alias("suppliersreference", SupplierLineItemReference.class);
127         xStream.alias("fundnumberreference", FundNumberReference.class);
128         xStream.alias("buyers", BuyersFundNumberReference.class);
129         xStream.alias("note", FreeTextNotes.class);
130         xStream.alias("transportstagequalifier", TransportStageQualifier.class);
131 
132         xStream.addImplicitCollection(EDIOrder.class, "lineItemOrder", LineItemOrder.class);
133         xStream.addImplicitCollection(LineItemOrder.class, "lineItem", LineItem.class);
134 
135         xStream.aliasField("sequencenumber", LineItem.class, "sequenceNumber");
136         xStream.aliasField("itemnumberid", LineItem.class, "itemNumberId");
137 
138         xStream.addImplicitCollection(LineItem.class, "lineItemArticleNumber", LineItemArticleNumber.class);
139 
140         xStream.aliasField("isbn", LineItemArticleNumber.class, "lineItemIsbn");
141         xStream.aliasField("itemnumbertype", LineItemArticleNumber.class, "lineItemNumberType");
142 
143         xStream.addImplicitCollection(LineItemOrder.class, "productFunction", ProductFunction.class);
144 
145         xStream.aliasField("productid", ProductFunction.class, "productId");
146 
147         xStream.addImplicitCollection(ProductFunction.class, "productArticleNumber", ProductArticleNumber.class);
148 
149         xStream.aliasField("isbn", ProductArticleNumber.class, "productIsbn");
150         xStream.aliasField("itemnumbertype", ProductArticleNumber.class, "productItemNumberType");
151 
152         xStream.addImplicitCollection(LineItemOrder.class, "itemDescriptionList", ItemDescription.class);
153 
154         xStream.aliasField("text", ItemDescription.class, "text");
155         xStream.aliasField("itemcharacteristiccode", ItemDescription.class, "itemCharacteristicCode");
156         xStream.aliasField("data", ItemDescription.class, "data");
157 
158         xStream.addImplicitCollection(LineItemOrder.class, "quantityInformation", QuantityInformation.class);
159         xStream.addImplicitCollection(QuantityInformation.class, "qunatity", Qunatity.class);
160 
161         xStream.aliasField("constant", Qunatity.class, "quantityConstant");
162         xStream.aliasField("quantity", Qunatity.class, "quantity");
163 
164         xStream.addImplicitCollection(LineItemOrder.class, "priceInformation", PriceInformation.class);
165         xStream.addImplicitCollection(PriceInformation.class, "itemPrice", ItemPrice.class);
166 
167         xStream.aliasField("grossprice", ItemPrice.class, "grossPrice");
168         xStream.aliasField("price", ItemPrice.class, "price");
169 
170         xStream.addImplicitCollection(LineItemOrder.class, "buyerReferenceInformation", BuyerReferenceInformation.class);
171         xStream.addImplicitCollection(BuyerReferenceInformation.class, "buyerLineItemReference", BuyerLineItemReference.class);
172 
173         xStream.aliasField("buyersorderline", BuyerLineItemReference.class, "buyersOrderLine");
174         xStream.aliasField("orderlinenumber", BuyerLineItemReference.class, "orderLineNumber");
175 
176 
177         xStream.addImplicitCollection(LineItemOrder.class, "supplierReferenceInformation", SupplierReferenceInformation.class);
178         xStream.addImplicitCollection(SupplierReferenceInformation.class, "supplierLineItemReference", SupplierLineItemReference.class);
179 
180         xStream.aliasField("suppliersorderline", SupplierLineItemReference.class, "suppliersOrderLine");
181         xStream.aliasField("vendorreferencenumber", SupplierLineItemReference.class, "vendorReferenceNumber");
182 
183 
184         xStream.addImplicitCollection(LineItemOrder.class, "fundNumberReference", FundNumberReference.class);
185         xStream.addImplicitCollection(FundNumberReference.class, "buyersFundNumberReference", BuyersFundNumberReference.class);
186 
187         xStream.aliasField("buyersfundnumber", BuyersFundNumberReference.class, "buyersFundNumber");
188         xStream.aliasField("budgetnumber", BuyersFundNumberReference.class, "budgetNumber");
189 
190         xStream.addImplicitCollection(LineItemOrder.class, "note", FreeTextNotes.class);
191 
192         xStream.aliasField("notelineitem", FreeTextNotes.class, "noteLineItem");
193         xStream.aliasField("noteempty1", FreeTextNotes.class, "noteempty1");
194         xStream.aliasField("noteempty2", FreeTextNotes.class, "noteempty2");
195         xStream.aliasField("noteempty3", FreeTextNotes.class, "noteempty3");
196 
197 
198         xStream.addImplicitCollection(LineItemOrder.class, "transportStageQualifier", TransportStageQualifier.class);
199 
200         xStream.aliasField("transportstagequalifierconstant", TransportStageQualifier.class, "transportStageConstant");
201         xStream.aliasField("surfacemail", TransportStageQualifier.class, "surfaceMail");
202 
203 
204         xStream.aliasField("summary", LineItemOrder.class, "supplierReferenceInformation");
205         xStream.aliasField("summarysection", Summary.class, "summarySection");
206         xStream.aliasField("separatorinfo", SummarySection.class, "separatorInformation");
207 
208         xStream.alias("controlinfomation", ControlInfomation.class);
209         xStream.alias("control", Control.class);
210 
211         xStream.addImplicitCollection(Summary.class, "controlInfomation", ControlInfomation.class);
212         xStream.addImplicitCollection(ControlInfomation.class, "control", Control.class);
213 
214         xStream.aliasField("controlqualifier", Control.class, "controlQualifier");
215         xStream.aliasField("totalqtysegments", Control.class, "totalQuantitySegments");
216 
217 
218         xStream.aliasField("unt", Summary.class, "untSummary");
219         xStream.aliasField("messagesegmentsnumber", UNTSummary.class, "segmentNumber");
220         xStream.aliasField("linsegmentstotal", UNTSummary.class, "linSegmentTotal");
221         xStream.addImplicitCollection(EDIOrders.class, "orders");
222         return xStream;
223     }
224 
225 
226     private XStream intInvoiceXStream() {
227         XStream xStream = new XStream();
228         xStream.alias("orders", INVOrders.class);
229 
230         xStream.aliasField("sendersandreceiversidentification", INVOrders.class, "senderAndReceiver");
231         xStream.aliasField("sendersandreceiversconstant", SenderAndReceiver.class, "sendersAndReceiversConstant");
232         xStream.aliasField("code", SendersAndReceiversConstant.class, "code");
233         xStream.aliasField("value", SendersAndReceiversConstant.class, "value");
234         xStream.aliasField("senderinformation", SenderAndReceiver.class, "senderInformation");
235         xStream.aliasField("senderid", SenderInformation.class, "senderId");
236         xStream.aliasField("senderidtype", SenderInformation.class, "senderIdType");
237         xStream.aliasField("receiverinformation", SenderAndReceiver.class, "receiverInformation");
238         xStream.aliasField("receiverid", ReceiverInformation.class, "receiverId");
239         xStream.aliasField("receiveridtype", ReceiverInformation.class, "receiverIdType");
240         xStream.aliasField("schedule", SenderAndReceiver.class, "schedule");
241         xStream.aliasField("preparationdate", Schedule.class, "preparationDate");
242         xStream.aliasField("preparationtime", Schedule.class, "preparationTime");
243         xStream.aliasField("interchangecontrolref", SenderAndReceiver.class, "interChangeControlReference");
244         xStream.aliasField("field6", SenderAndReceiver.class, "field6");
245         xStream.aliasField("field7", SenderAndReceiver.class, "field7");
246         xStream.aliasField("field8", SenderAndReceiver.class, "field8");
247         xStream.aliasField("field9", SenderAndReceiver.class, "field9");
248         xStream.aliasField("field10", SenderAndReceiver.class, "field10");
249         xStream.aliasField("field11", SenderAndReceiver.class, "field11");
250 
251         xStream.alias("order", INVOrder.class);
252         xStream.addImplicitCollection(INVOrders.class, "invOrder", INVOrder.class);
253 
254 
255         xStream.aliasField("messageheader", INVOrder.class, "messageHeader");
256         xStream.aliasField("interchangecontrolref", MessageHeader.class, "interchangeControlReference");
257         xStream.aliasField("messagetypeinformation", MessageHeader.class, "messsageTypeInformation");
258         xStream.aliasField("messagetypeid", MesssageTypeInformation.class, "messageTypeId");
259         xStream.aliasField("constant1", MesssageTypeInformation.class, "constant1");
260         xStream.aliasField("constant2", MesssageTypeInformation.class, "constant2");
261         xStream.aliasField("constant3", MesssageTypeInformation.class, "constant3");
262         xStream.aliasField("constant4", MesssageTypeInformation.class, "constant4");
263 
264         xStream.aliasField("message", INVOrder.class, "message");
265         xStream.aliasField("messagebeginning", InvoiceMessage.class, "messageBeginning");
266         xStream.aliasField("order", MessageBeginning.class, "messageBeginningOrder");
267         xStream.aliasField("interchangecontrolref", MessageBeginning.class, "messageBeginningInterchangeControlReference");
268         xStream.aliasField("codelistagency", MessageBeginning.class, "messageBeginningCodeListAgency");
269 
270         xStream.aliasField("messagecreationinfo", InvoiceMessage.class, "messageCreationInformation");
271         xStream.aliasField("details", MessageCreationInformation.class, "messageCreationInfoDetails");
272         xStream.aliasField("constant", MessageCreationInfoDetails.class, "messageCreationInfoConstant");
273         xStream.aliasField("date", MessageCreationInfoDetails.class, "messageCreationInfoDate");
274         xStream.aliasField("dateformat", MessageCreationInfoDetails.class, "messageCreationInfoDateFormat");
275 
276         xStream.aliasField("purchaseordernumber", InvoiceMessage.class, "purchaseOrderQualifier");
277         xStream.aliasField("purchaseorderreference", PurchaseOrderQualifier.class, "purchaseOrderReference");
278         xStream.aliasField("purchaseorderline", PurchaseOrderReference.class, "purchaseOrderLine");
279         xStream.aliasField("purchaseordernumber", PurchaseOrderReference.class, "purchaseOrderNumber");
280 
281         xStream.alias("partyqualifier", PartyQualifier.class);
282         xStream.addImplicitCollection(InvoiceMessage.class, "partyQualifier", PartyQualifier.class);
283 
284         xStream.aliasField("partyqualifier", InvoiceMessage.class, "partyQualifier");
285         xStream.aliasField("partycode", PartyQualifier.class, "partyCode");
286         xStream.aliasField("partyinfo", PartyQualifier.class, "partyInformation");
287         xStream.aliasField("codedidentification", PartyInformation.class, "codeIdentification");
288         xStream.aliasField("partyidentificationcode", PartyInformation.class, "partyIdentificationCode");
289         xStream.aliasField("codelistagency", PartyInformation.class, "codeListAgency");
290 
291         xStream.aliasField("reference", InvoiceMessage.class, "messageReference");
292         xStream.aliasField("partydetails", MessageReference.class, "partyDetails");
293         xStream.aliasField("additionalpartyidentification", PartyDetails.class, "additionalPartyIdentification");
294         xStream.aliasField("partyname", PartyDetails.class, "partyName");
295 
296         xStream.aliasField("currencydetails", InvoiceMessage.class, "currencyDetails");
297         xStream.aliasField("supplierinfo", CurrencyDetails.class, "currencyDetailsSupplierInformation");
298         xStream.aliasField("defaultcurrency", CurrencyDetailsSupplierInformation.class, "defaultCurrency");
299         xStream.aliasField("currencytype", CurrencyDetailsSupplierInformation.class, "currencyType");
300         xStream.aliasField("ordercurrency", CurrencyDetailsSupplierInformation.class, "orderCurrency");
301 
302         xStream.aliasField("allowanceorcharge", InvoiceMessage.class, "allowanceOrCharge");
303         xStream.aliasField("allowanceorchargequalifier", AllowanceOrCharge.class, "allowanceOrChargeQualifier");
304         xStream.aliasField("freetext", AllowanceOrCharge.class, "freeText");
305         xStream.aliasField("settlement", AllowanceOrCharge.class, "settlement");
306         xStream.aliasField("calculationsequenceindicator", AllowanceOrCharge.class, "calculationSequenceIndicator");
307         xStream.aliasField("specialserviceidentification", AllowanceOrCharge.class, "specialServiceIdentification");
308         xStream.aliasField("specialservicecode", SpecialServiceIdentification.class, "specialServiceCode");
309         xStream.aliasField("codelistqualifier", SpecialServiceIdentification.class, "codeListQualifier");
310         xStream.aliasField("codelistqualifieragency", SpecialServiceIdentification.class, "codeListQualifierAgency");
311         xStream.aliasField("specialservice", SpecialServiceIdentification.class, "specialService");
312 
313         xStream.aliasField("monetary", InvoiceMessage.class, "monetary");
314         xStream.aliasField("monetaryinfo", Monetary.class, "monetaryInformation");
315         xStream.aliasField("monetaryamounttype", MonetaryInformation.class, "amountType");
316         xStream.aliasField("monetaryamount", MonetaryInformation.class, "amount");
317 
318 
319         xStream.alias("lineitemOrder", LineItemOrder.class);
320         xStream.alias("lineitem", LineItem.class);
321         xStream.alias("linearticlenumber", LineItemArticleNumber.class);
322         xStream.alias("productfunction", ProductFunction.class);
323         xStream.alias("articlenumber", ProductArticleNumber.class);
324         xStream.alias("supplierarticlenumber", SupplierArticleNumber.class);
325         xStream.alias("itemdescription", ItemDescription.class);
326         xStream.alias("quantityinformation", QuantityInformation.class);
327         xStream.alias("quantity", Qunatity.class);
328         xStream.alias("datetimedetail", DateTimeDetail.class);
329         xStream.alias("datetimeinfo", DateTimeInformation.class);
330         xStream.alias("priceinformation", PriceInformation.class);
331         xStream.alias("price", ItemPrice.class);
332         xStream.alias("suppliersreferenceinformation", SupplierReferenceInformation.class);
333         xStream.alias("suppliersreference", SupplierLineItemReference.class);
334 
335         xStream.alias("note", FreeTextNotes.class);
336         xStream.alias("monetary", MonetaryDetail.class);
337         xStream.alias("monetaryinfo", MonetaryLineItemInformation.class);
338 
339         xStream.alias("lineitemallowanceorcharge", LineItemAllowanceOrCharge.class);
340         xStream.alias("lineitemspecialserviceidentification", LineItemSpecialServiceIdentification.class);
341 
342         xStream.alias("allowancemonetaryadditionalcharge", AllowanceMonetaryDetail.class);
343         xStream.alias("allowancemonetaryinfo", AllowanceMonetaryLineItemInformation.class);
344 
345         xStream.addImplicitCollection(INVOrder.class, "lineItemOrder", LineItemOrder.class);
346         xStream.addImplicitCollection(LineItemOrder.class, "lineItem", LineItem.class);
347 
348         xStream.aliasField("sequencenumber", LineItem.class, "sequenceNumber");
349         xStream.aliasField("itemnumberid", LineItem.class, "itemNumberId");
350 
351         xStream.addImplicitCollection(LineItem.class, "lineItemArticleNumber", LineItemArticleNumber.class);
352 
353         xStream.aliasField("isbn", LineItemArticleNumber.class, "lineItemIsbn");
354         xStream.aliasField("itemnumbertype", LineItemArticleNumber.class, "lineItemNumberType");
355 
356         xStream.addImplicitCollection(LineItemOrder.class, "productFunction", ProductFunction.class);
357 
358         xStream.aliasField("productid", ProductFunction.class, "productId");
359 
360         xStream.addImplicitCollection(ProductFunction.class, "productArticleNumber", ProductArticleNumber.class);
361 
362         xStream.aliasField("isbn", ProductArticleNumber.class, "productIsbn");
363         xStream.aliasField("itemnumbertype", ProductArticleNumber.class, "productItemNumberType");
364         xStream.aliasField("unknown1", ProductArticleNumber.class, "unknown1");
365         xStream.aliasField("unknown2", ProductArticleNumber.class, "unknown2");
366         xStream.aliasField("unknown3", ProductArticleNumber.class, "unknown3");
367 
368         xStream.addImplicitCollection(ProductFunction.class, "supplierArticleNumber", SupplierArticleNumber.class);
369 
370         xStream.aliasField("isbn", SupplierArticleNumber.class, "isbn");
371         xStream.aliasField("supplierarticle", SupplierArticleNumber.class, "supplierArticle");
372 
373         xStream.addImplicitCollection(LineItemOrder.class, "itemDescriptionList", ItemDescription.class);
374 
375         xStream.aliasField("text", ItemDescription.class, "text");
376         xStream.aliasField("itemcharacteristiccode", ItemDescription.class, "itemCharacteristicCode");
377         xStream.aliasField("data", ItemDescription.class, "data");
378 
379         xStream.addImplicitCollection(LineItemOrder.class, "quantityInformation", QuantityInformation.class);
380         xStream.addImplicitCollection(QuantityInformation.class, "qunatity", Qunatity.class);
381 
382         xStream.aliasField("constant", Qunatity.class, "quantityConstant");
383         xStream.aliasField("quantity", Qunatity.class, "quantity");
384 
385         xStream.addImplicitCollection(LineItemOrder.class, "dateTimeDetail", DateTimeDetail.class);
386         xStream.addImplicitCollection(DateTimeDetail.class, "dateTimeInformationList", DateTimeInformation.class);
387 
388         xStream.aliasField("periodqualifier", DateTimeInformation.class, "periodQualifier");
389         xStream.aliasField("period", DateTimeInformation.class, "period");
390         xStream.aliasField("periodformat", DateTimeInformation.class, "periodFormat");
391 
392         xStream.addImplicitCollection(LineItemOrder.class, "note", FreeTextNotes.class);
393 
394         xStream.aliasField("notelineitem", FreeTextNotes.class, "noteLineItem");
395         xStream.aliasField("noteempty1", FreeTextNotes.class, "noteempty1");
396         xStream.aliasField("noteempty2", FreeTextNotes.class, "noteempty2");
397         xStream.aliasField("noteempty3", FreeTextNotes.class, "noteempty3");
398 
399         xStream.addImplicitCollection(LineItemOrder.class, "monetaryDetail", MonetaryDetail.class);
400         xStream.addImplicitCollection(MonetaryDetail.class, "monetaryLineItemInformation", MonetaryLineItemInformation.class);
401 
402         xStream.aliasField("monetaryamounttype", MonetaryLineItemInformation.class, "amountType");
403         xStream.aliasField("monetaryamount", MonetaryLineItemInformation.class, "amount");
404 
405 
406 
407 
408 
409         xStream.addImplicitCollection(LineItemOrder.class, "lineItemAllowanceOrCharge", LineItemAllowanceOrCharge.class);
410         xStream.addImplicitCollection(LineItemAllowanceOrCharge.class, "lineItemSpecialServiceIdentification", LineItemSpecialServiceIdentification.class);
411 
412         xStream.aliasField("allowanceorchargequalifier", LineItemAllowanceOrCharge.class, "allowanceOrChargeQualifier");
413         xStream.aliasField("freetext", LineItemAllowanceOrCharge.class, "freeText");
414         xStream.aliasField("settlement", LineItemAllowanceOrCharge.class, "settlement");
415         xStream.aliasField("calculationsequenceindicator", LineItemAllowanceOrCharge.class, "calculationSequenceIndicator");
416 
417         xStream.aliasField("specialservicecode", LineItemSpecialServiceIdentification.class, "specialServiceCode");
418         xStream.aliasField("codelistqualifier", LineItemSpecialServiceIdentification.class, "codeListQualifier");
419         xStream.aliasField("codelistqualifieragency", LineItemSpecialServiceIdentification.class, "codeListQualifierAgency");
420         xStream.aliasField("specialservice", LineItemSpecialServiceIdentification.class, "specialService");
421 
422 
423 
424 
425         xStream.addImplicitCollection(LineItemOrder.class, "allowanceMonetaryDetail", AllowanceMonetaryDetail.class);
426         xStream.addImplicitCollection(AllowanceMonetaryDetail.class, "allowanceMonetaryLineItemInformation", AllowanceMonetaryLineItemInformation.class);
427 
428         xStream.aliasField("monetaryamounttype", AllowanceMonetaryLineItemInformation.class, "amountType");
429         xStream.aliasField("monetaryamount", AllowanceMonetaryLineItemInformation.class, "amount");
430 
431         xStream.addImplicitCollection(LineItemOrder.class, "priceInformation", PriceInformation.class);
432         xStream.addImplicitCollection(PriceInformation.class, "itemPrice", ItemPrice.class);
433 
434         xStream.aliasField("grossprice", ItemPrice.class, "grossPrice");
435         xStream.aliasField("price", ItemPrice.class, "price");
436 
437         xStream.addImplicitCollection(LineItemOrder.class, "supplierReferenceInformation", SupplierReferenceInformation.class);
438         xStream.addImplicitCollection(SupplierReferenceInformation.class, "supplierLineItemReference", SupplierLineItemReference.class);
439 
440         xStream.aliasField("suppliersorderline", SupplierLineItemReference.class, "suppliersOrderLine");
441         xStream.aliasField("vendorreferencenumber", SupplierLineItemReference.class, "vendorReferenceNumber");
442 
443         xStream.aliasField("summary", LineItemOrder.class, "supplierReferenceInformation");
444         xStream.aliasField("summarysection", Summary.class, "summarySection");
445         xStream.aliasField("separatorinfo", SummarySection.class, "separatorInformation");
446 
447         xStream.alias("controlinfomation", ControlInfomation.class);
448         xStream.alias("control", Control.class);
449 
450         xStream.alias("monetarysummary", MonetarySummary.class);
451         xStream.alias("monetaryinfosummary", MonetarySummaryInformation.class);
452 
453         xStream.addImplicitCollection(Summary.class, "controlInfomation", ControlInfomation.class);
454         xStream.addImplicitCollection(ControlInfomation.class, "control", Control.class);
455 
456         xStream.aliasField("controlqualifier", Control.class, "controlQualifier");
457         xStream.aliasField("totalqtysegments", Control.class, "totalQuantitySegments");
458 
459         xStream.addImplicitCollection(Summary.class, "monetarySummary", MonetarySummary.class);
460         xStream.addImplicitCollection(MonetarySummary.class, "monetarySummaryInformation", MonetarySummaryInformation.class);
461 
462         xStream.aliasField("monetaryamounttype", MonetarySummaryInformation.class, "amountType");
463         xStream.aliasField("monetaryamount", MonetarySummaryInformation.class, "amount");
464 
465 
466         xStream.aliasField("unt", Summary.class, "untSummary");
467         xStream.aliasField("messagesegmentsnumber", UNTSummary.class, "segmentNumber");
468         xStream.aliasField("linsegmentstotal", UNTSummary.class, "linSegmentTotal");
469         xStream.addImplicitCollection(INVOrders.class, "invOrder");
470         return xStream;
471     }
472 
473 }