Design for DHL Tracking

Based on the DTD from DHL for the tracking response the following 2 Objects are are developed:
(The DTD is the DHLTrackingAPI.doc documentation)

DHLSummaryRecord :

Fields:
    String originCity;
    String originCountry;
    String destiCity;
    String destiCountry;
    String lastEventMonth;
    String lastEventDay;
    String lastEventYear;
    String lastEventHour;
    String lastEventMinute;
    String lastEventComment;
    String signatory;
    String noDataInfo;
    String awbNumber;

There is only one instance of this object for a single Airbill Tracking of DHL

DHLServiceEvent:

Fields:
    String eventMonth;
    String eventDay;
    String eventYear;
    String eventHour;
    String eventMinute;
    String eventCity;
    String eventCountry;
    String eventComments;
    String awbNumber;

There are multiple instances of this Object for a single airbill tracking. Each represent a shipment event that occured on this shipment.
 

The XML Parsing program:

The xml parser class DHLTrackParser  uses a SAX parser implementation. It parses the data returned by the DHL tracking Cgi-script and create a DHLSummaryRecord and a vector of DHLServiceEvents. It provides accessor methods that returns the the DHLSummaryRecord and the vector of DHLServiceEvent objects.

Tracking details and Tracking Holder class:

The class TrackingHolder represents data of a shipment and provides the tracking details. The informations from the DHLSummaryRecord and DHLServiceEvent are used to populate the fields of the TrackingHolder. The TrackingHolder instance could be used to generate HTML representation of the tracking information.