#import "agentrank.h" #ifndef DEF_AGENTRANKNS0FindAgents_M #define DEF_AGENTRANKNS0FindAgents_M /** * User: marc Date: Oct 1, 2009 Time: 5:26:25 AM

THIS SOFTWARE IS COPYRIGHTED. THE SOFTWARE MAY NOT BE COPIED REPRODUCED, TRANSLATED, OR REDUCED TO ANY ELECTRONIC MEDIUM OR MACHINE READABLE FORM WITHOUT THE PRIOR WRITTEN CONSENT OF SOCO TECHNOLOGIES. */ @implementation AGENTRANKNS0FindAgents /** * agents */ - (AGENTRANKNS0Agents *) agents { return _agents; } /** * agents */ - (void) setAgents: (AGENTRANKNS0Agents *) newAgents { [newAgents retain]; [_agents release]; _agents = newAgents; } /** * (no documentation provided) */ - (AGENTRANKNS0Status *) status { return _status; } /** * (no documentation provided) */ - (void) setStatus: (AGENTRANKNS0Status *) newStatus { [newStatus retain]; [_status release]; _status = newStatus; } - (void) dealloc { [self setAgents: nil]; [self setStatus: nil]; [super dealloc]; } //documentation inherited. + (id) readFromXML: (NSData *) xml { AGENTRANKNS0FindAgents *_aGENTRANKNS0FindAgents; xmlTextReaderPtr reader = xmlReaderForMemory([xml bytes], [xml length], NULL, NULL, 0); if (reader == NULL) { [NSException raise: @"XMLReadError" format: @"Error instantiating an XML reader."]; return nil; } _aGENTRANKNS0FindAgents = (AGENTRANKNS0FindAgents *) [AGENTRANKNS0FindAgents readXMLElement: reader]; xmlFreeTextReader(reader); //free the reader return _aGENTRANKNS0FindAgents; } //documentation inherited. - (NSData *) writeToXML { xmlBufferPtr buf; xmlTextWriterPtr writer; int rc; NSData *data; buf = xmlBufferCreate(); if (buf == NULL) { [NSException raise: @"XMLWriteError" format: @"Error creating an XML buffer."]; return nil; } writer = xmlNewTextWriterMemory(buf, 0); if (writer == NULL) { xmlBufferFree(buf); [NSException raise: @"XMLWriteError" format: @"Error creating an XML writer."]; return nil; } rc = xmlTextWriterStartDocument(writer, NULL, "utf-8", NULL); if (rc < 0) { xmlFreeTextWriter(writer); xmlBufferFree(buf); [NSException raise: @"XMLWriteError" format: @"Error writing XML start document."]; return nil; } NS_DURING { [self writeXMLElement: writer]; } NS_HANDLER { xmlFreeTextWriter(writer); xmlBufferFree(buf); [localException raise]; } NS_ENDHANDLER rc = xmlTextWriterEndDocument(writer); if (rc < 0) { xmlFreeTextWriter(writer); xmlBufferFree(buf); [NSException raise: @"XMLWriteError" format: @"Error writing XML end document."]; return nil; } xmlFreeTextWriter(writer); data = [NSData dataWithBytes: buf->content length: buf->use]; xmlBufferFree(buf); return data; } @end /* implementation AGENTRANKNS0FindAgents */ /** * Internal, private interface for JAXB reading and writing. */ @interface AGENTRANKNS0FindAgents (JAXB) @end /*interface AGENTRANKNS0FindAgents (JAXB)*/ /** * Internal, private implementation for JAXB reading and writing. */ @implementation AGENTRANKNS0FindAgents (JAXB) /** * Read an instance of AGENTRANKNS0FindAgents from an XML reader. * * @param reader The reader. * @return An instance of AGENTRANKNS0FindAgents defined by the XML reader. */ + (id) readXMLType: (xmlTextReaderPtr) reader { AGENTRANKNS0FindAgents *_aGENTRANKNS0FindAgents = [[AGENTRANKNS0FindAgents alloc] init]; NS_DURING { [_aGENTRANKNS0FindAgents initWithReader: reader]; } NS_HANDLER { _aGENTRANKNS0FindAgents = nil; [localException raise]; } NS_ENDHANDLER [_aGENTRANKNS0FindAgents autorelease]; return _aGENTRANKNS0FindAgents; } /** * Initialize this instance of AGENTRANKNS0FindAgents according to * the XML being read from the reader. * * @param reader The reader. */ - (id) initWithReader: (xmlTextReaderPtr) reader { return [super initWithReader: reader]; } /** * Write the XML for this instance of AGENTRANKNS0FindAgents to the writer. * Note that since we're only writing the XML type, * No start/end element will be written. * * @param reader The reader. */ - (void) writeXMLType: (xmlTextWriterPtr) writer { [super writeXMLType:writer]; } /** * Reads a AGENTRANKNS0FindAgents from an XML reader. The element to be read is * "response". * * @param reader The XML reader. * @return The AGENTRANKNS0FindAgents. */ + (id) readXMLElement: (xmlTextReaderPtr) reader { int status; AGENTRANKNS0FindAgents *_findAgents = nil; if (xmlTextReaderNodeType(reader) != XML_READER_TYPE_ELEMENT) { status = xmlTextReaderAdvanceToNextStartOrEndElement(reader); if (status < 1) { [NSException raise: @"XMLReadError" format: @"Error advancing the reader to start element response."]; } } if (xmlStrcmp(BAD_CAST "response", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read root element {}response."); #endif _findAgents = (AGENTRANKNS0FindAgents *)[AGENTRANKNS0FindAgents readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"Successfully read root element {}response."); #endif } else { if (xmlTextReaderConstNamespaceUri(reader) == NULL) { [NSException raise: @"XMLReadError" format: @"Unable to read AGENTRANKNS0FindAgents. Expected element response. Current element: {}%s", xmlTextReaderConstLocalName(reader)]; } else { [NSException raise: @"XMLReadError" format: @"Unable to read AGENTRANKNS0FindAgents. Expected element response. Current element: {%s}%s\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)]; } } return _findAgents; } /** * Writes this AGENTRANKNS0FindAgents to XML under element name "response". * The namespace declarations for the element will be written. * * @param writer The XML writer. * @param _findAgents The FindAgents to write. * @return 1 if successful, 0 otherwise. */ - (void) writeXMLElement: (xmlTextWriterPtr) writer { [self writeXMLElement: writer writeNamespaces: YES]; } /** * Writes this AGENTRANKNS0FindAgents to an XML writer. * * @param writer The writer. * @param writeNs Whether to write the namespaces for this element to the xml writer. */ - (void) writeXMLElement: (xmlTextWriterPtr) writer writeNamespaces: (BOOL) writeNs { int rc = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "response", NULL); if (rc < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start element {}response. XML writer status: %i\n", rc]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing type {}findAgents for root element {}response..."); #endif [self writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote type {}findAgents for root element {}response..."); #endif rc = xmlTextWriterEndElement(writer); if (rc < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end element {}response. XML writer status: %i\n", rc]; } } //documentation inherited. - (BOOL) readJAXBAttribute: (xmlTextReaderPtr) reader { void *_child_accessor; if ([super readJAXBAttribute: reader]) { return YES; } return NO; } //documentation inherited. - (BOOL) readJAXBValue: (xmlTextReaderPtr) reader { return [super readJAXBValue: reader]; } //documentation inherited. - (BOOL) readJAXBChildElement: (xmlTextReaderPtr) reader { id __child; void *_child_accessor; int status, depth; if ([super readJAXBChildElement: reader]) { return YES; } if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "agents", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read choice {}agents of type {}agents."); #endif __child = [AGENTRANKNS0Agents readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read choice {}agents of type {}agents."); #endif [self setAgents: __child]; return YES; } //end "if choice" if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "status", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read choice {}status of type {}status."); #endif __child = [AGENTRANKNS0Status readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read choice {}status of type {}status."); #endif [self setStatus: __child]; return YES; } //end "if choice" return NO; } //documentation inherited. - (int) readUnknownJAXBChildElement: (xmlTextReaderPtr) reader { return [super readUnknownJAXBChildElement: reader]; } //documentation inherited. - (void) readUnknownJAXBAttribute: (xmlTextReaderPtr) reader { [super readUnknownJAXBAttribute: reader]; } //documentation inherited. - (void) writeJAXBAttributes: (xmlTextWriterPtr) writer { int status; [super writeJAXBAttributes: writer]; } //documentation inherited. - (void) writeJAXBValue: (xmlTextWriterPtr) writer { [super writeJAXBValue: writer]; } /** * Method for writing the child elements. * * @param writer The writer. */ - (void) writeJAXBChildElements: (xmlTextWriterPtr) writer { int status; id __item; NSEnumerator *__enumerator; [super writeJAXBChildElements: writer]; if ([self agents]) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "agents", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start child element {}agents."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing element {}agents..."); #endif [[self agents] writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote element {}agents..."); #endif status = xmlTextWriterEndElement(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end child element {}agents."]; } } if ([self status]) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "status", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start child element {}status."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing element {}status..."); #endif [[self status] writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote element {}status..."); #endif status = xmlTextWriterEndElement(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end child element {}status."]; } } } @end /* implementation AGENTRANKNS0FindAgents (JAXB) */ #endif /* DEF_AGENTRANKNS0FindAgents_M */ #ifndef DEF_AGENTRANKNS0GetMarket_M #define DEF_AGENTRANKNS0GetMarket_M /** * User: marc Date: Oct 1, 2009 Time: 5:26:25 AM

THIS SOFTWARE IS COPYRIGHTED. THE SOFTWARE MAY NOT BE COPIED REPRODUCED, TRANSLATED, OR REDUCED TO ANY ELECTRONIC MEDIUM OR MACHINE READABLE FORM WITHOUT THE PRIOR WRITTEN CONSENT OF SOCO TECHNOLOGIES. */ @implementation AGENTRANKNS0GetMarket /** * market */ - (AGENTRANKNS0Market *) market { return _market; } /** * market */ - (void) setMarket: (AGENTRANKNS0Market *) newMarket { [newMarket retain]; [_market release]; _market = newMarket; } /** * status */ - (AGENTRANKNS0Status *) status { return _status; } /** * status */ - (void) setStatus: (AGENTRANKNS0Status *) newStatus { [newStatus retain]; [_status release]; _status = newStatus; } - (void) dealloc { [self setMarket: nil]; [self setStatus: nil]; [super dealloc]; } //documentation inherited. + (id) readFromXML: (NSData *) xml { AGENTRANKNS0GetMarket *_aGENTRANKNS0GetMarket; xmlTextReaderPtr reader = xmlReaderForMemory([xml bytes], [xml length], NULL, NULL, 0); if (reader == NULL) { [NSException raise: @"XMLReadError" format: @"Error instantiating an XML reader."]; return nil; } _aGENTRANKNS0GetMarket = (AGENTRANKNS0GetMarket *) [AGENTRANKNS0GetMarket readXMLElement: reader]; xmlFreeTextReader(reader); //free the reader return _aGENTRANKNS0GetMarket; } //documentation inherited. - (NSData *) writeToXML { xmlBufferPtr buf; xmlTextWriterPtr writer; int rc; NSData *data; buf = xmlBufferCreate(); if (buf == NULL) { [NSException raise: @"XMLWriteError" format: @"Error creating an XML buffer."]; return nil; } writer = xmlNewTextWriterMemory(buf, 0); if (writer == NULL) { xmlBufferFree(buf); [NSException raise: @"XMLWriteError" format: @"Error creating an XML writer."]; return nil; } rc = xmlTextWriterStartDocument(writer, NULL, "utf-8", NULL); if (rc < 0) { xmlFreeTextWriter(writer); xmlBufferFree(buf); [NSException raise: @"XMLWriteError" format: @"Error writing XML start document."]; return nil; } NS_DURING { [self writeXMLElement: writer]; } NS_HANDLER { xmlFreeTextWriter(writer); xmlBufferFree(buf); [localException raise]; } NS_ENDHANDLER rc = xmlTextWriterEndDocument(writer); if (rc < 0) { xmlFreeTextWriter(writer); xmlBufferFree(buf); [NSException raise: @"XMLWriteError" format: @"Error writing XML end document."]; return nil; } xmlFreeTextWriter(writer); data = [NSData dataWithBytes: buf->content length: buf->use]; xmlBufferFree(buf); return data; } @end /* implementation AGENTRANKNS0GetMarket */ /** * Internal, private interface for JAXB reading and writing. */ @interface AGENTRANKNS0GetMarket (JAXB) @end /*interface AGENTRANKNS0GetMarket (JAXB)*/ /** * Internal, private implementation for JAXB reading and writing. */ @implementation AGENTRANKNS0GetMarket (JAXB) /** * Read an instance of AGENTRANKNS0GetMarket from an XML reader. * * @param reader The reader. * @return An instance of AGENTRANKNS0GetMarket defined by the XML reader. */ + (id) readXMLType: (xmlTextReaderPtr) reader { AGENTRANKNS0GetMarket *_aGENTRANKNS0GetMarket = [[AGENTRANKNS0GetMarket alloc] init]; NS_DURING { [_aGENTRANKNS0GetMarket initWithReader: reader]; } NS_HANDLER { _aGENTRANKNS0GetMarket = nil; [localException raise]; } NS_ENDHANDLER [_aGENTRANKNS0GetMarket autorelease]; return _aGENTRANKNS0GetMarket; } /** * Initialize this instance of AGENTRANKNS0GetMarket according to * the XML being read from the reader. * * @param reader The reader. */ - (id) initWithReader: (xmlTextReaderPtr) reader { return [super initWithReader: reader]; } /** * Write the XML for this instance of AGENTRANKNS0GetMarket to the writer. * Note that since we're only writing the XML type, * No start/end element will be written. * * @param reader The reader. */ - (void) writeXMLType: (xmlTextWriterPtr) writer { [super writeXMLType:writer]; } /** * Reads a AGENTRANKNS0GetMarket from an XML reader. The element to be read is * "response". * * @param reader The XML reader. * @return The AGENTRANKNS0GetMarket. */ + (id) readXMLElement: (xmlTextReaderPtr) reader { int status; AGENTRANKNS0GetMarket *_getMarket = nil; if (xmlTextReaderNodeType(reader) != XML_READER_TYPE_ELEMENT) { status = xmlTextReaderAdvanceToNextStartOrEndElement(reader); if (status < 1) { [NSException raise: @"XMLReadError" format: @"Error advancing the reader to start element response."]; } } if (xmlStrcmp(BAD_CAST "response", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read root element {}response."); #endif _getMarket = (AGENTRANKNS0GetMarket *)[AGENTRANKNS0GetMarket readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"Successfully read root element {}response."); #endif } else { if (xmlTextReaderConstNamespaceUri(reader) == NULL) { [NSException raise: @"XMLReadError" format: @"Unable to read AGENTRANKNS0GetMarket. Expected element response. Current element: {}%s", xmlTextReaderConstLocalName(reader)]; } else { [NSException raise: @"XMLReadError" format: @"Unable to read AGENTRANKNS0GetMarket. Expected element response. Current element: {%s}%s\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)]; } } return _getMarket; } /** * Writes this AGENTRANKNS0GetMarket to XML under element name "response". * The namespace declarations for the element will be written. * * @param writer The XML writer. * @param _getMarket The GetMarket to write. * @return 1 if successful, 0 otherwise. */ - (void) writeXMLElement: (xmlTextWriterPtr) writer { [self writeXMLElement: writer writeNamespaces: YES]; } /** * Writes this AGENTRANKNS0GetMarket to an XML writer. * * @param writer The writer. * @param writeNs Whether to write the namespaces for this element to the xml writer. */ - (void) writeXMLElement: (xmlTextWriterPtr) writer writeNamespaces: (BOOL) writeNs { int rc = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "response", NULL); if (rc < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start element {}response. XML writer status: %i\n", rc]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing type {}getMarket for root element {}response..."); #endif [self writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote type {}getMarket for root element {}response..."); #endif rc = xmlTextWriterEndElement(writer); if (rc < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end element {}response. XML writer status: %i\n", rc]; } } //documentation inherited. - (BOOL) readJAXBAttribute: (xmlTextReaderPtr) reader { void *_child_accessor; if ([super readJAXBAttribute: reader]) { return YES; } return NO; } //documentation inherited. - (BOOL) readJAXBValue: (xmlTextReaderPtr) reader { return [super readJAXBValue: reader]; } //documentation inherited. - (BOOL) readJAXBChildElement: (xmlTextReaderPtr) reader { id __child; void *_child_accessor; int status, depth; if ([super readJAXBChildElement: reader]) { return YES; } if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "market", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read choice {}market of type {}market."); #endif __child = [AGENTRANKNS0Market readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read choice {}market of type {}market."); #endif [self setMarket: __child]; return YES; } //end "if choice" if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "status", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read choice {}status of type {}status."); #endif __child = [AGENTRANKNS0Status readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read choice {}status of type {}status."); #endif [self setStatus: __child]; return YES; } //end "if choice" return NO; } //documentation inherited. - (int) readUnknownJAXBChildElement: (xmlTextReaderPtr) reader { return [super readUnknownJAXBChildElement: reader]; } //documentation inherited. - (void) readUnknownJAXBAttribute: (xmlTextReaderPtr) reader { [super readUnknownJAXBAttribute: reader]; } //documentation inherited. - (void) writeJAXBAttributes: (xmlTextWriterPtr) writer { int status; [super writeJAXBAttributes: writer]; } //documentation inherited. - (void) writeJAXBValue: (xmlTextWriterPtr) writer { [super writeJAXBValue: writer]; } /** * Method for writing the child elements. * * @param writer The writer. */ - (void) writeJAXBChildElements: (xmlTextWriterPtr) writer { int status; id __item; NSEnumerator *__enumerator; [super writeJAXBChildElements: writer]; if ([self market]) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "market", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start child element {}market."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing element {}market..."); #endif [[self market] writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote element {}market..."); #endif status = xmlTextWriterEndElement(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end child element {}market."]; } } if ([self status]) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "status", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start child element {}status."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing element {}status..."); #endif [[self status] writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote element {}status..."); #endif status = xmlTextWriterEndElement(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end child element {}status."]; } } } @end /* implementation AGENTRANKNS0GetMarket (JAXB) */ #endif /* DEF_AGENTRANKNS0GetMarket_M */ #ifndef DEF_AGENTRANKNS0History_M #define DEF_AGENTRANKNS0History_M /** * User: marc Date: Apr 25, 2009 Time: 2:40:38 PM

THIS SOFTWARE IS COPYRIGHTED. THE SOFTWARE MAY NOT BE COPIED REPRODUCED, TRANSLATED, OR REDUCED TO ANY ELECTRONIC MEDIUM OR MACHINE READABLE FORM WITHOUT THE PRIOR WRITTEN CONSENT OF SOCO TECHNOLOGIES. */ @implementation AGENTRANKNS0History /** * date */ - (NSDate *) date { return _date; } /** * date */ - (void) setDate: (NSDate *) newDate { [newDate retain]; [_date release]; _date = newDate; } /** * (no documentation provided) */ - (NSString *) market { return _market; } /** * (no documentation provided) */ - (void) setMarket: (NSString *) newMarket { [newMarket retain]; [_market release]; _market = newMarket; } /** * (no documentation provided) */ - (NSString *) metric { return _metric; } /** * (no documentation provided) */ - (void) setMetric: (NSString *) newMetric { [newMetric retain]; [_metric release]; _metric = newMetric; } /** * (no documentation provided) */ - (NSDecimalNumber *) value { return _value; } /** * (no documentation provided) */ - (void) setValue: (NSDecimalNumber *) newValue { [newValue retain]; [_value release]; _value = newValue; } - (void) dealloc { [self setDate: nil]; [self setMarket: nil]; [self setMetric: nil]; [self setValue: nil]; [super dealloc]; } @end /* implementation AGENTRANKNS0History */ /** * Internal, private interface for JAXB reading and writing. */ @interface AGENTRANKNS0History (JAXB) @end /*interface AGENTRANKNS0History (JAXB)*/ /** * Internal, private implementation for JAXB reading and writing. */ @implementation AGENTRANKNS0History (JAXB) /** * Read an instance of AGENTRANKNS0History from an XML reader. * * @param reader The reader. * @return An instance of AGENTRANKNS0History defined by the XML reader. */ + (id) readXMLType: (xmlTextReaderPtr) reader { AGENTRANKNS0History *_aGENTRANKNS0History = [[AGENTRANKNS0History alloc] init]; NS_DURING { [_aGENTRANKNS0History initWithReader: reader]; } NS_HANDLER { _aGENTRANKNS0History = nil; [localException raise]; } NS_ENDHANDLER [_aGENTRANKNS0History autorelease]; return _aGENTRANKNS0History; } /** * Initialize this instance of AGENTRANKNS0History according to * the XML being read from the reader. * * @param reader The reader. */ - (id) initWithReader: (xmlTextReaderPtr) reader { return [super initWithReader: reader]; } /** * Write the XML for this instance of AGENTRANKNS0History to the writer. * Note that since we're only writing the XML type, * No start/end element will be written. * * @param reader The reader. */ - (void) writeXMLType: (xmlTextWriterPtr) writer { [super writeXMLType:writer]; } //documentation inherited. - (BOOL) readJAXBAttribute: (xmlTextReaderPtr) reader { void *_child_accessor; if ([super readJAXBAttribute: reader]) { return YES; } return NO; } //documentation inherited. - (BOOL) readJAXBValue: (xmlTextReaderPtr) reader { return [super readJAXBValue: reader]; } //documentation inherited. - (BOOL) readJAXBChildElement: (xmlTextReaderPtr) reader { id __child; void *_child_accessor; int status, depth; if ([super readJAXBChildElement: reader]) { return YES; } if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "date", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read choice {}date of type {http://www.w3.org/2001/XMLSchema}dateTime."); #endif __child = [NSDate readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read choice {}date of type {http://www.w3.org/2001/XMLSchema}dateTime."); #endif [self setDate: __child]; return YES; } //end "if choice" if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "market", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read choice {}market of type {http://www.w3.org/2001/XMLSchema}string."); #endif __child = [NSString readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read choice {}market of type {http://www.w3.org/2001/XMLSchema}string."); #endif [self setMarket: __child]; return YES; } //end "if choice" if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "metric", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read choice {}metric of type {http://www.w3.org/2001/XMLSchema}string."); #endif __child = [NSString readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read choice {}metric of type {http://www.w3.org/2001/XMLSchema}string."); #endif [self setMetric: __child]; return YES; } //end "if choice" if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "value", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read choice {}value of type {http://www.w3.org/2001/XMLSchema}decimal."); #endif __child = [NSDecimalNumber readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read choice {}value of type {http://www.w3.org/2001/XMLSchema}decimal."); #endif [self setValue: __child]; return YES; } //end "if choice" return NO; } //documentation inherited. - (int) readUnknownJAXBChildElement: (xmlTextReaderPtr) reader { return [super readUnknownJAXBChildElement: reader]; } //documentation inherited. - (void) readUnknownJAXBAttribute: (xmlTextReaderPtr) reader { [super readUnknownJAXBAttribute: reader]; } //documentation inherited. - (void) writeJAXBAttributes: (xmlTextWriterPtr) writer { int status; [super writeJAXBAttributes: writer]; } //documentation inherited. - (void) writeJAXBValue: (xmlTextWriterPtr) writer { [super writeJAXBValue: writer]; } /** * Method for writing the child elements. * * @param writer The writer. */ - (void) writeJAXBChildElements: (xmlTextWriterPtr) writer { int status; id __item; NSEnumerator *__enumerator; [super writeJAXBChildElements: writer]; if ([self date]) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "date", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start child element {}date."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing element {}date..."); #endif [[self date] writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote element {}date..."); #endif status = xmlTextWriterEndElement(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end child element {}date."]; } } if ([self market]) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "market", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start child element {}market."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing element {}market..."); #endif [[self market] writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote element {}market..."); #endif status = xmlTextWriterEndElement(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end child element {}market."]; } } if ([self metric]) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "metric", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start child element {}metric."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing element {}metric..."); #endif [[self metric] writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote element {}metric..."); #endif status = xmlTextWriterEndElement(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end child element {}metric."]; } } if ([self value]) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "value", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start child element {}value."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing element {}value..."); #endif [[self value] writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote element {}value..."); #endif status = xmlTextWriterEndElement(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end child element {}value."]; } } } @end /* implementation AGENTRANKNS0History (JAXB) */ #endif /* DEF_AGENTRANKNS0History_M */ #ifndef DEF_AGENTRANKNS0Locations_M #define DEF_AGENTRANKNS0Locations_M /** * User: marc Date: Mar 4, 2008 Time: 6:15:00 AM

THIS SOFTWARE IS COPYRIGHTED. THE SOFTWARE MAY NOT BE COPIED REPRODUCED, TRANSLATED, OR REDUCED TO ANY ELECTRONIC MEDIUM OR MACHINE READABLE FORM WITHOUT THE PRIOR WRITTEN CONSENT OF SOCO TECHNOLOGIES. */ @implementation AGENTRANKNS0Locations /** * (no documentation provided) */ - (NSArray *) location { return _location; } /** * (no documentation provided) */ - (void) setLocation: (NSArray *) newLocation { [newLocation retain]; [_location release]; _location = newLocation; } - (void) dealloc { [self setLocation: nil]; [super dealloc]; } //documentation inherited. + (id) readFromXML: (NSData *) xml { AGENTRANKNS0Locations *_aGENTRANKNS0Locations; xmlTextReaderPtr reader = xmlReaderForMemory([xml bytes], [xml length], NULL, NULL, 0); if (reader == NULL) { [NSException raise: @"XMLReadError" format: @"Error instantiating an XML reader."]; return nil; } _aGENTRANKNS0Locations = (AGENTRANKNS0Locations *) [AGENTRANKNS0Locations readXMLElement: reader]; xmlFreeTextReader(reader); //free the reader return _aGENTRANKNS0Locations; } //documentation inherited. - (NSData *) writeToXML { xmlBufferPtr buf; xmlTextWriterPtr writer; int rc; NSData *data; buf = xmlBufferCreate(); if (buf == NULL) { [NSException raise: @"XMLWriteError" format: @"Error creating an XML buffer."]; return nil; } writer = xmlNewTextWriterMemory(buf, 0); if (writer == NULL) { xmlBufferFree(buf); [NSException raise: @"XMLWriteError" format: @"Error creating an XML writer."]; return nil; } rc = xmlTextWriterStartDocument(writer, NULL, "utf-8", NULL); if (rc < 0) { xmlFreeTextWriter(writer); xmlBufferFree(buf); [NSException raise: @"XMLWriteError" format: @"Error writing XML start document."]; return nil; } NS_DURING { [self writeXMLElement: writer]; } NS_HANDLER { xmlFreeTextWriter(writer); xmlBufferFree(buf); [localException raise]; } NS_ENDHANDLER rc = xmlTextWriterEndDocument(writer); if (rc < 0) { xmlFreeTextWriter(writer); xmlBufferFree(buf); [NSException raise: @"XMLWriteError" format: @"Error writing XML end document."]; return nil; } xmlFreeTextWriter(writer); data = [NSData dataWithBytes: buf->content length: buf->use]; xmlBufferFree(buf); return data; } @end /* implementation AGENTRANKNS0Locations */ /** * Internal, private interface for JAXB reading and writing. */ @interface AGENTRANKNS0Locations (JAXB) @end /*interface AGENTRANKNS0Locations (JAXB)*/ /** * Internal, private implementation for JAXB reading and writing. */ @implementation AGENTRANKNS0Locations (JAXB) /** * Read an instance of AGENTRANKNS0Locations from an XML reader. * * @param reader The reader. * @return An instance of AGENTRANKNS0Locations defined by the XML reader. */ + (id) readXMLType: (xmlTextReaderPtr) reader { AGENTRANKNS0Locations *_aGENTRANKNS0Locations = [[AGENTRANKNS0Locations alloc] init]; NS_DURING { [_aGENTRANKNS0Locations initWithReader: reader]; } NS_HANDLER { _aGENTRANKNS0Locations = nil; [localException raise]; } NS_ENDHANDLER [_aGENTRANKNS0Locations autorelease]; return _aGENTRANKNS0Locations; } /** * Initialize this instance of AGENTRANKNS0Locations according to * the XML being read from the reader. * * @param reader The reader. */ - (id) initWithReader: (xmlTextReaderPtr) reader { return [super initWithReader: reader]; } /** * Write the XML for this instance of AGENTRANKNS0Locations to the writer. * Note that since we're only writing the XML type, * No start/end element will be written. * * @param reader The reader. */ - (void) writeXMLType: (xmlTextWriterPtr) writer { [super writeXMLType:writer]; } /** * Reads a AGENTRANKNS0Locations from an XML reader. The element to be read is * "locations". * * @param reader The XML reader. * @return The AGENTRANKNS0Locations. */ + (id) readXMLElement: (xmlTextReaderPtr) reader { int status; AGENTRANKNS0Locations *_locations = nil; if (xmlTextReaderNodeType(reader) != XML_READER_TYPE_ELEMENT) { status = xmlTextReaderAdvanceToNextStartOrEndElement(reader); if (status < 1) { [NSException raise: @"XMLReadError" format: @"Error advancing the reader to start element locations."]; } } if (xmlStrcmp(BAD_CAST "locations", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read root element {}locations."); #endif _locations = (AGENTRANKNS0Locations *)[AGENTRANKNS0Locations readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"Successfully read root element {}locations."); #endif } else { if (xmlTextReaderConstNamespaceUri(reader) == NULL) { [NSException raise: @"XMLReadError" format: @"Unable to read AGENTRANKNS0Locations. Expected element locations. Current element: {}%s", xmlTextReaderConstLocalName(reader)]; } else { [NSException raise: @"XMLReadError" format: @"Unable to read AGENTRANKNS0Locations. Expected element locations. Current element: {%s}%s\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)]; } } return _locations; } /** * Writes this AGENTRANKNS0Locations to XML under element name "locations". * The namespace declarations for the element will be written. * * @param writer The XML writer. * @param _locations The Locations to write. * @return 1 if successful, 0 otherwise. */ - (void) writeXMLElement: (xmlTextWriterPtr) writer { [self writeXMLElement: writer writeNamespaces: YES]; } /** * Writes this AGENTRANKNS0Locations to an XML writer. * * @param writer The writer. * @param writeNs Whether to write the namespaces for this element to the xml writer. */ - (void) writeXMLElement: (xmlTextWriterPtr) writer writeNamespaces: (BOOL) writeNs { int rc = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "locations", NULL); if (rc < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start element {}locations. XML writer status: %i\n", rc]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing type {}locations for root element {}locations..."); #endif [self writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote type {}locations for root element {}locations..."); #endif rc = xmlTextWriterEndElement(writer); if (rc < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end element {}locations. XML writer status: %i\n", rc]; } } //documentation inherited. - (BOOL) readJAXBAttribute: (xmlTextReaderPtr) reader { void *_child_accessor; if ([super readJAXBAttribute: reader]) { return YES; } return NO; } //documentation inherited. - (BOOL) readJAXBValue: (xmlTextReaderPtr) reader { return [super readJAXBValue: reader]; } //documentation inherited. - (BOOL) readJAXBChildElement: (xmlTextReaderPtr) reader { id __child; void *_child_accessor; int status, depth; if ([super readJAXBChildElement: reader]) { return YES; } if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "location", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read choice {}location of type {}location."); #endif __child = [AGENTRANKNS0Location readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read choice {}location of type {}location."); #endif if ([self location]) { [self setLocation: [[self location] arrayByAddingObject: __child]]; } else { [self setLocation: [NSArray arrayWithObject: __child]]; } return YES; } //end "if choice" return NO; } //documentation inherited. - (int) readUnknownJAXBChildElement: (xmlTextReaderPtr) reader { return [super readUnknownJAXBChildElement: reader]; } //documentation inherited. - (void) readUnknownJAXBAttribute: (xmlTextReaderPtr) reader { [super readUnknownJAXBAttribute: reader]; } //documentation inherited. - (void) writeJAXBAttributes: (xmlTextWriterPtr) writer { int status; [super writeJAXBAttributes: writer]; } //documentation inherited. - (void) writeJAXBValue: (xmlTextWriterPtr) writer { [super writeJAXBValue: writer]; } /** * Method for writing the child elements. * * @param writer The writer. */ - (void) writeJAXBChildElements: (xmlTextWriterPtr) writer { int status; id __item; NSEnumerator *__enumerator; [super writeJAXBChildElements: writer]; if ([self location]) { __enumerator = [[self location] objectEnumerator]; while ( (__item = [__enumerator nextObject]) ) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "location", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start child element {}location."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing element {}location..."); #endif [__item writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote element {}location..."); #endif status = xmlTextWriterEndElement(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end child element {}location."]; } } //end item iterator. } } @end /* implementation AGENTRANKNS0Locations (JAXB) */ #endif /* DEF_AGENTRANKNS0Locations_M */ #ifndef DEF_AGENTRANKNS0PhotoSize_M #define DEF_AGENTRANKNS0PhotoSize_M /** * User: marc Date: Mar 4, 2008 Time: 6:15:00 AM

THIS SOFTWARE IS COPYRIGHTED. THE SOFTWARE MAY NOT BE COPIED REPRODUCED, TRANSLATED, OR REDUCED TO ANY ELECTRONIC MEDIUM OR MACHINE READABLE FORM WITHOUT THE PRIOR WRITTEN CONSENT OF SOCO TECHNOLOGIES. */ @implementation AGENTRANKNS0PhotoSize /** * (no documentation provided) */ - (int) height { return _height; } /** * (no documentation provided) */ - (void) setHeight: (int) newHeight { _height = newHeight; } /** * (no documentation provided) */ - (int) width { return _width; } /** * (no documentation provided) */ - (void) setWidth: (int) newWidth { _width = newWidth; } /** * (no documentation provided) */ - (NSString *) type { return _type; } /** * (no documentation provided) */ - (void) setType: (NSString *) newType { [newType retain]; [_type release]; _type = newType; } - (void) dealloc { [self setType: nil]; [super dealloc]; } //documentation inherited. + (id) readFromXML: (NSData *) xml { AGENTRANKNS0PhotoSize *_aGENTRANKNS0PhotoSize; xmlTextReaderPtr reader = xmlReaderForMemory([xml bytes], [xml length], NULL, NULL, 0); if (reader == NULL) { [NSException raise: @"XMLReadError" format: @"Error instantiating an XML reader."]; return nil; } _aGENTRANKNS0PhotoSize = (AGENTRANKNS0PhotoSize *) [AGENTRANKNS0PhotoSize readXMLElement: reader]; xmlFreeTextReader(reader); //free the reader return _aGENTRANKNS0PhotoSize; } //documentation inherited. - (NSData *) writeToXML { xmlBufferPtr buf; xmlTextWriterPtr writer; int rc; NSData *data; buf = xmlBufferCreate(); if (buf == NULL) { [NSException raise: @"XMLWriteError" format: @"Error creating an XML buffer."]; return nil; } writer = xmlNewTextWriterMemory(buf, 0); if (writer == NULL) { xmlBufferFree(buf); [NSException raise: @"XMLWriteError" format: @"Error creating an XML writer."]; return nil; } rc = xmlTextWriterStartDocument(writer, NULL, "utf-8", NULL); if (rc < 0) { xmlFreeTextWriter(writer); xmlBufferFree(buf); [NSException raise: @"XMLWriteError" format: @"Error writing XML start document."]; return nil; } NS_DURING { [self writeXMLElement: writer]; } NS_HANDLER { xmlFreeTextWriter(writer); xmlBufferFree(buf); [localException raise]; } NS_ENDHANDLER rc = xmlTextWriterEndDocument(writer); if (rc < 0) { xmlFreeTextWriter(writer); xmlBufferFree(buf); [NSException raise: @"XMLWriteError" format: @"Error writing XML end document."]; return nil; } xmlFreeTextWriter(writer); data = [NSData dataWithBytes: buf->content length: buf->use]; xmlBufferFree(buf); return data; } @end /* implementation AGENTRANKNS0PhotoSize */ /** * Internal, private interface for JAXB reading and writing. */ @interface AGENTRANKNS0PhotoSize (JAXB) @end /*interface AGENTRANKNS0PhotoSize (JAXB)*/ /** * Internal, private implementation for JAXB reading and writing. */ @implementation AGENTRANKNS0PhotoSize (JAXB) /** * Read an instance of AGENTRANKNS0PhotoSize from an XML reader. * * @param reader The reader. * @return An instance of AGENTRANKNS0PhotoSize defined by the XML reader. */ + (id) readXMLType: (xmlTextReaderPtr) reader { AGENTRANKNS0PhotoSize *_aGENTRANKNS0PhotoSize = [[AGENTRANKNS0PhotoSize alloc] init]; NS_DURING { [_aGENTRANKNS0PhotoSize initWithReader: reader]; } NS_HANDLER { _aGENTRANKNS0PhotoSize = nil; [localException raise]; } NS_ENDHANDLER [_aGENTRANKNS0PhotoSize autorelease]; return _aGENTRANKNS0PhotoSize; } /** * Initialize this instance of AGENTRANKNS0PhotoSize according to * the XML being read from the reader. * * @param reader The reader. */ - (id) initWithReader: (xmlTextReaderPtr) reader { return [super initWithReader: reader]; } /** * Write the XML for this instance of AGENTRANKNS0PhotoSize to the writer. * Note that since we're only writing the XML type, * No start/end element will be written. * * @param reader The reader. */ - (void) writeXMLType: (xmlTextWriterPtr) writer { [super writeXMLType:writer]; } /** * Reads a AGENTRANKNS0PhotoSize from an XML reader. The element to be read is * "photoSize". * * @param reader The XML reader. * @return The AGENTRANKNS0PhotoSize. */ + (id) readXMLElement: (xmlTextReaderPtr) reader { int status; AGENTRANKNS0PhotoSize *_photoSize = nil; if (xmlTextReaderNodeType(reader) != XML_READER_TYPE_ELEMENT) { status = xmlTextReaderAdvanceToNextStartOrEndElement(reader); if (status < 1) { [NSException raise: @"XMLReadError" format: @"Error advancing the reader to start element photoSize."]; } } if (xmlStrcmp(BAD_CAST "photoSize", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read root element {}photoSize."); #endif _photoSize = (AGENTRANKNS0PhotoSize *)[AGENTRANKNS0PhotoSize readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"Successfully read root element {}photoSize."); #endif } else { if (xmlTextReaderConstNamespaceUri(reader) == NULL) { [NSException raise: @"XMLReadError" format: @"Unable to read AGENTRANKNS0PhotoSize. Expected element photoSize. Current element: {}%s", xmlTextReaderConstLocalName(reader)]; } else { [NSException raise: @"XMLReadError" format: @"Unable to read AGENTRANKNS0PhotoSize. Expected element photoSize. Current element: {%s}%s\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)]; } } return _photoSize; } /** * Writes this AGENTRANKNS0PhotoSize to XML under element name "photoSize". * The namespace declarations for the element will be written. * * @param writer The XML writer. * @param _photoSize The PhotoSize to write. * @return 1 if successful, 0 otherwise. */ - (void) writeXMLElement: (xmlTextWriterPtr) writer { [self writeXMLElement: writer writeNamespaces: YES]; } /** * Writes this AGENTRANKNS0PhotoSize to an XML writer. * * @param writer The writer. * @param writeNs Whether to write the namespaces for this element to the xml writer. */ - (void) writeXMLElement: (xmlTextWriterPtr) writer writeNamespaces: (BOOL) writeNs { int rc = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "photoSize", NULL); if (rc < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start element {}photoSize. XML writer status: %i\n", rc]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing type {}photoSize for root element {}photoSize..."); #endif [self writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote type {}photoSize for root element {}photoSize..."); #endif rc = xmlTextWriterEndElement(writer); if (rc < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end element {}photoSize. XML writer status: %i\n", rc]; } } //documentation inherited. - (BOOL) readJAXBAttribute: (xmlTextReaderPtr) reader { void *_child_accessor; if ([super readJAXBAttribute: reader]) { return YES; } if ((xmlStrcmp(BAD_CAST "height", xmlTextReaderConstLocalName(reader)) == 0) && (xmlTextReaderConstNamespaceUri(reader) == NULL)) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read attribute {}height..."); #endif _child_accessor = xmlTextReaderReadIntType(reader); if (_child_accessor == NULL) { //panic: unable to read the attribute value for some reason. [NSException raise: @"XMLReadError" format: @"Error reading attribute {}height."]; } [self setHeight: *((int*) _child_accessor)]; free(_child_accessor); #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read attribute {}height..."); #endif return YES; } if ((xmlStrcmp(BAD_CAST "width", xmlTextReaderConstLocalName(reader)) == 0) && (xmlTextReaderConstNamespaceUri(reader) == NULL)) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read attribute {}width..."); #endif _child_accessor = xmlTextReaderReadIntType(reader); if (_child_accessor == NULL) { //panic: unable to read the attribute value for some reason. [NSException raise: @"XMLReadError" format: @"Error reading attribute {}width."]; } [self setWidth: *((int*) _child_accessor)]; free(_child_accessor); #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read attribute {}width..."); #endif return YES; } if ((xmlStrcmp(BAD_CAST "type", xmlTextReaderConstLocalName(reader)) == 0) && (xmlTextReaderConstNamespaceUri(reader) == NULL)) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read attribute {}type..."); #endif [self setType: (NSString*) [NSString readXMLType: reader]]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read attribute {}type..."); #endif return YES; } return NO; } //documentation inherited. - (BOOL) readJAXBValue: (xmlTextReaderPtr) reader { return [super readJAXBValue: reader]; } //documentation inherited. - (BOOL) readJAXBChildElement: (xmlTextReaderPtr) reader { id __child; void *_child_accessor; int status, depth; if ([super readJAXBChildElement: reader]) { return YES; } return NO; } //documentation inherited. - (int) readUnknownJAXBChildElement: (xmlTextReaderPtr) reader { return [super readUnknownJAXBChildElement: reader]; } //documentation inherited. - (void) readUnknownJAXBAttribute: (xmlTextReaderPtr) reader { [super readUnknownJAXBAttribute: reader]; } //documentation inherited. - (void) writeJAXBAttributes: (xmlTextWriterPtr) writer { int status; [super writeJAXBAttributes: writer]; if (YES) { //always write the primitive attributes... status = xmlTextWriterStartAttributeNS(writer, NULL, BAD_CAST "height", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start attribute {}height."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing attribute {}height..."); #endif status = xmlTextWriterWriteIntType(writer, &_height); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing attribute {}height."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote attribute {}height..."); #endif status = xmlTextWriterEndAttribute(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end attribute {}height."]; } } if (YES) { //always write the primitive attributes... status = xmlTextWriterStartAttributeNS(writer, NULL, BAD_CAST "width", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start attribute {}width."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing attribute {}width..."); #endif status = xmlTextWriterWriteIntType(writer, &_width); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing attribute {}width."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote attribute {}width..."); #endif status = xmlTextWriterEndAttribute(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end attribute {}width."]; } } if ([self type]) { status = xmlTextWriterStartAttributeNS(writer, NULL, BAD_CAST "type", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start attribute {}type."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing attribute {}type..."); #endif [[self type] writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote attribute {}type..."); #endif status = xmlTextWriterEndAttribute(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end attribute {}type."]; } } } //documentation inherited. - (void) writeJAXBValue: (xmlTextWriterPtr) writer { [super writeJAXBValue: writer]; } /** * Method for writing the child elements. * * @param writer The writer. */ - (void) writeJAXBChildElements: (xmlTextWriterPtr) writer { int status; id __item; NSEnumerator *__enumerator; [super writeJAXBChildElements: writer]; } @end /* implementation AGENTRANKNS0PhotoSize (JAXB) */ #endif /* DEF_AGENTRANKNS0PhotoSize_M */ #ifndef DEF_AGENTRANKNS0PagedList_M #define DEF_AGENTRANKNS0PagedList_M /** * (no documentation provided) */ @implementation AGENTRANKNS0PagedList /** * (no documentation provided) */ - (int *) start_index { return _start_index; } /** * (no documentation provided) */ - (void) setStart_index: (int *) newStart_index { if (_start_index != NULL) { free(_start_index); } _start_index = newStart_index; } /** * (no documentation provided) */ - (int *) max_results { return _max_results; } /** * (no documentation provided) */ - (void) setMax_results: (int *) newMax_results { if (_max_results != NULL) { free(_max_results); } _max_results = newMax_results; } /** * (no documentation provided) */ - (int *) last_index { return _last_index; } /** * (no documentation provided) */ - (void) setLast_index: (int *) newLast_index { if (_last_index != NULL) { free(_last_index); } _last_index = newLast_index; } /** * (no documentation provided) */ - (int *) total_results { return _total_results; } /** * (no documentation provided) */ - (void) setTotal_results: (int *) newTotal_results { if (_total_results != NULL) { free(_total_results); } _total_results = newTotal_results; } /** * (no documentation provided) */ - (int *) first_index { return _first_index; } /** * (no documentation provided) */ - (void) setFirst_index: (int *) newFirst_index { if (_first_index != NULL) { free(_first_index); } _first_index = newFirst_index; } - (void) dealloc { [self setStart_index: NULL]; [self setMax_results: NULL]; [self setLast_index: NULL]; [self setTotal_results: NULL]; [self setFirst_index: NULL]; [super dealloc]; } @end /* implementation AGENTRANKNS0PagedList */ /** * Internal, private interface for JAXB reading and writing. */ @interface AGENTRANKNS0PagedList (JAXB) @end /*interface AGENTRANKNS0PagedList (JAXB)*/ /** * Internal, private implementation for JAXB reading and writing. */ @implementation AGENTRANKNS0PagedList (JAXB) /** * Read an instance of AGENTRANKNS0PagedList from an XML reader. * * @param reader The reader. * @return An instance of AGENTRANKNS0PagedList defined by the XML reader. */ + (id) readXMLType: (xmlTextReaderPtr) reader { AGENTRANKNS0PagedList *_aGENTRANKNS0PagedList = [[AGENTRANKNS0PagedList alloc] init]; NS_DURING { [_aGENTRANKNS0PagedList initWithReader: reader]; } NS_HANDLER { _aGENTRANKNS0PagedList = nil; [localException raise]; } NS_ENDHANDLER [_aGENTRANKNS0PagedList autorelease]; return _aGENTRANKNS0PagedList; } /** * Initialize this instance of AGENTRANKNS0PagedList according to * the XML being read from the reader. * * @param reader The reader. */ - (id) initWithReader: (xmlTextReaderPtr) reader { return [super initWithReader: reader]; } /** * Write the XML for this instance of AGENTRANKNS0PagedList to the writer. * Note that since we're only writing the XML type, * No start/end element will be written. * * @param reader The reader. */ - (void) writeXMLType: (xmlTextWriterPtr) writer { [super writeXMLType:writer]; } //documentation inherited. - (BOOL) readJAXBAttribute: (xmlTextReaderPtr) reader { void *_child_accessor; if ([super readJAXBAttribute: reader]) { return YES; } if ((xmlStrcmp(BAD_CAST "start_index", xmlTextReaderConstLocalName(reader)) == 0) && (xmlTextReaderConstNamespaceUri(reader) == NULL)) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read attribute {}start_index..."); #endif _child_accessor = xmlTextReaderReadIntType(reader); if (_child_accessor == NULL) { //panic: unable to read the attribute value for some reason. [NSException raise: @"XMLReadError" format: @"Error reading attribute {}start_index."]; } [self setStart_index: ((int*) _child_accessor)]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read attribute {}start_index..."); #endif return YES; } if ((xmlStrcmp(BAD_CAST "max_results", xmlTextReaderConstLocalName(reader)) == 0) && (xmlTextReaderConstNamespaceUri(reader) == NULL)) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read attribute {}max_results..."); #endif _child_accessor = xmlTextReaderReadIntType(reader); if (_child_accessor == NULL) { //panic: unable to read the attribute value for some reason. [NSException raise: @"XMLReadError" format: @"Error reading attribute {}max_results."]; } [self setMax_results: ((int*) _child_accessor)]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read attribute {}max_results..."); #endif return YES; } if ((xmlStrcmp(BAD_CAST "last_index", xmlTextReaderConstLocalName(reader)) == 0) && (xmlTextReaderConstNamespaceUri(reader) == NULL)) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read attribute {}last_index..."); #endif _child_accessor = xmlTextReaderReadIntType(reader); if (_child_accessor == NULL) { //panic: unable to read the attribute value for some reason. [NSException raise: @"XMLReadError" format: @"Error reading attribute {}last_index."]; } [self setLast_index: ((int*) _child_accessor)]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read attribute {}last_index..."); #endif return YES; } if ((xmlStrcmp(BAD_CAST "total_results", xmlTextReaderConstLocalName(reader)) == 0) && (xmlTextReaderConstNamespaceUri(reader) == NULL)) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read attribute {}total_results..."); #endif _child_accessor = xmlTextReaderReadIntType(reader); if (_child_accessor == NULL) { //panic: unable to read the attribute value for some reason. [NSException raise: @"XMLReadError" format: @"Error reading attribute {}total_results."]; } [self setTotal_results: ((int*) _child_accessor)]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read attribute {}total_results..."); #endif return YES; } if ((xmlStrcmp(BAD_CAST "first_index", xmlTextReaderConstLocalName(reader)) == 0) && (xmlTextReaderConstNamespaceUri(reader) == NULL)) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read attribute {}first_index..."); #endif _child_accessor = xmlTextReaderReadIntType(reader); if (_child_accessor == NULL) { //panic: unable to read the attribute value for some reason. [NSException raise: @"XMLReadError" format: @"Error reading attribute {}first_index."]; } [self setFirst_index: ((int*) _child_accessor)]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read attribute {}first_index..."); #endif return YES; } return NO; } //documentation inherited. - (BOOL) readJAXBValue: (xmlTextReaderPtr) reader { return [super readJAXBValue: reader]; } //documentation inherited. - (BOOL) readJAXBChildElement: (xmlTextReaderPtr) reader { id __child; void *_child_accessor; int status, depth; if ([super readJAXBChildElement: reader]) { return YES; } return NO; } //documentation inherited. - (int) readUnknownJAXBChildElement: (xmlTextReaderPtr) reader { return [super readUnknownJAXBChildElement: reader]; } //documentation inherited. - (void) readUnknownJAXBAttribute: (xmlTextReaderPtr) reader { [super readUnknownJAXBAttribute: reader]; } //documentation inherited. - (void) writeJAXBAttributes: (xmlTextWriterPtr) writer { int status; [super writeJAXBAttributes: writer]; if ([self start_index] != NULL) { status = xmlTextWriterStartAttributeNS(writer, NULL, BAD_CAST "start_index", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start attribute {}start_index."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing attribute {}start_index..."); #endif status = xmlTextWriterWriteIntType(writer, [self start_index]); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing attribute {}start_index."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote attribute {}start_index..."); #endif status = xmlTextWriterEndAttribute(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end attribute {}start_index."]; } } if ([self max_results] != NULL) { status = xmlTextWriterStartAttributeNS(writer, NULL, BAD_CAST "max_results", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start attribute {}max_results."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing attribute {}max_results..."); #endif status = xmlTextWriterWriteIntType(writer, [self max_results]); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing attribute {}max_results."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote attribute {}max_results..."); #endif status = xmlTextWriterEndAttribute(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end attribute {}max_results."]; } } if ([self last_index] != NULL) { status = xmlTextWriterStartAttributeNS(writer, NULL, BAD_CAST "last_index", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start attribute {}last_index."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing attribute {}last_index..."); #endif status = xmlTextWriterWriteIntType(writer, [self last_index]); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing attribute {}last_index."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote attribute {}last_index..."); #endif status = xmlTextWriterEndAttribute(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end attribute {}last_index."]; } } if ([self total_results] != NULL) { status = xmlTextWriterStartAttributeNS(writer, NULL, BAD_CAST "total_results", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start attribute {}total_results."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing attribute {}total_results..."); #endif status = xmlTextWriterWriteIntType(writer, [self total_results]); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing attribute {}total_results."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote attribute {}total_results..."); #endif status = xmlTextWriterEndAttribute(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end attribute {}total_results."]; } } if ([self first_index] != NULL) { status = xmlTextWriterStartAttributeNS(writer, NULL, BAD_CAST "first_index", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start attribute {}first_index."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing attribute {}first_index..."); #endif status = xmlTextWriterWriteIntType(writer, [self first_index]); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing attribute {}first_index."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote attribute {}first_index..."); #endif status = xmlTextWriterEndAttribute(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end attribute {}first_index."]; } } } //documentation inherited. - (void) writeJAXBValue: (xmlTextWriterPtr) writer { [super writeJAXBValue: writer]; } /** * Method for writing the child elements. * * @param writer The writer. */ - (void) writeJAXBChildElements: (xmlTextWriterPtr) writer { int status; id __item; NSEnumerator *__enumerator; [super writeJAXBChildElements: writer]; } @end /* implementation AGENTRANKNS0PagedList (JAXB) */ #endif /* DEF_AGENTRANKNS0PagedList_M */ #ifndef DEF_AGENTRANKNS0ClaimProfile_M #define DEF_AGENTRANKNS0ClaimProfile_M /** * Created by IntelliJ IDEA. User: marc Date: Jul 24, 2010 Time: 7:07:31 AM */ @implementation AGENTRANKNS0ClaimProfile /** * status */ - (AGENTRANKNS0Status *) status { return _status; } /** * status */ - (void) setStatus: (AGENTRANKNS0Status *) newStatus { [newStatus retain]; [_status release]; _status = newStatus; } - (void) dealloc { [self setStatus: nil]; [super dealloc]; } //documentation inherited. + (id) readFromXML: (NSData *) xml { AGENTRANKNS0ClaimProfile *_aGENTRANKNS0ClaimProfile; xmlTextReaderPtr reader = xmlReaderForMemory([xml bytes], [xml length], NULL, NULL, 0); if (reader == NULL) { [NSException raise: @"XMLReadError" format: @"Error instantiating an XML reader."]; return nil; } _aGENTRANKNS0ClaimProfile = (AGENTRANKNS0ClaimProfile *) [AGENTRANKNS0ClaimProfile readXMLElement: reader]; xmlFreeTextReader(reader); //free the reader return _aGENTRANKNS0ClaimProfile; } //documentation inherited. - (NSData *) writeToXML { xmlBufferPtr buf; xmlTextWriterPtr writer; int rc; NSData *data; buf = xmlBufferCreate(); if (buf == NULL) { [NSException raise: @"XMLWriteError" format: @"Error creating an XML buffer."]; return nil; } writer = xmlNewTextWriterMemory(buf, 0); if (writer == NULL) { xmlBufferFree(buf); [NSException raise: @"XMLWriteError" format: @"Error creating an XML writer."]; return nil; } rc = xmlTextWriterStartDocument(writer, NULL, "utf-8", NULL); if (rc < 0) { xmlFreeTextWriter(writer); xmlBufferFree(buf); [NSException raise: @"XMLWriteError" format: @"Error writing XML start document."]; return nil; } NS_DURING { [self writeXMLElement: writer]; } NS_HANDLER { xmlFreeTextWriter(writer); xmlBufferFree(buf); [localException raise]; } NS_ENDHANDLER rc = xmlTextWriterEndDocument(writer); if (rc < 0) { xmlFreeTextWriter(writer); xmlBufferFree(buf); [NSException raise: @"XMLWriteError" format: @"Error writing XML end document."]; return nil; } xmlFreeTextWriter(writer); data = [NSData dataWithBytes: buf->content length: buf->use]; xmlBufferFree(buf); return data; } @end /* implementation AGENTRANKNS0ClaimProfile */ /** * Internal, private interface for JAXB reading and writing. */ @interface AGENTRANKNS0ClaimProfile (JAXB) @end /*interface AGENTRANKNS0ClaimProfile (JAXB)*/ /** * Internal, private implementation for JAXB reading and writing. */ @implementation AGENTRANKNS0ClaimProfile (JAXB) /** * Read an instance of AGENTRANKNS0ClaimProfile from an XML reader. * * @param reader The reader. * @return An instance of AGENTRANKNS0ClaimProfile defined by the XML reader. */ + (id) readXMLType: (xmlTextReaderPtr) reader { AGENTRANKNS0ClaimProfile *_aGENTRANKNS0ClaimProfile = [[AGENTRANKNS0ClaimProfile alloc] init]; NS_DURING { [_aGENTRANKNS0ClaimProfile initWithReader: reader]; } NS_HANDLER { _aGENTRANKNS0ClaimProfile = nil; [localException raise]; } NS_ENDHANDLER [_aGENTRANKNS0ClaimProfile autorelease]; return _aGENTRANKNS0ClaimProfile; } /** * Initialize this instance of AGENTRANKNS0ClaimProfile according to * the XML being read from the reader. * * @param reader The reader. */ - (id) initWithReader: (xmlTextReaderPtr) reader { return [super initWithReader: reader]; } /** * Write the XML for this instance of AGENTRANKNS0ClaimProfile to the writer. * Note that since we're only writing the XML type, * No start/end element will be written. * * @param reader The reader. */ - (void) writeXMLType: (xmlTextWriterPtr) writer { [super writeXMLType:writer]; } /** * Reads a AGENTRANKNS0ClaimProfile from an XML reader. The element to be read is * "response". * * @param reader The XML reader. * @return The AGENTRANKNS0ClaimProfile. */ + (id) readXMLElement: (xmlTextReaderPtr) reader { int status; AGENTRANKNS0ClaimProfile *_claimProfile = nil; if (xmlTextReaderNodeType(reader) != XML_READER_TYPE_ELEMENT) { status = xmlTextReaderAdvanceToNextStartOrEndElement(reader); if (status < 1) { [NSException raise: @"XMLReadError" format: @"Error advancing the reader to start element response."]; } } if (xmlStrcmp(BAD_CAST "response", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read root element {}response."); #endif _claimProfile = (AGENTRANKNS0ClaimProfile *)[AGENTRANKNS0ClaimProfile readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"Successfully read root element {}response."); #endif } else { if (xmlTextReaderConstNamespaceUri(reader) == NULL) { [NSException raise: @"XMLReadError" format: @"Unable to read AGENTRANKNS0ClaimProfile. Expected element response. Current element: {}%s", xmlTextReaderConstLocalName(reader)]; } else { [NSException raise: @"XMLReadError" format: @"Unable to read AGENTRANKNS0ClaimProfile. Expected element response. Current element: {%s}%s\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)]; } } return _claimProfile; } /** * Writes this AGENTRANKNS0ClaimProfile to XML under element name "response". * The namespace declarations for the element will be written. * * @param writer The XML writer. * @param _claimProfile The ClaimProfile to write. * @return 1 if successful, 0 otherwise. */ - (void) writeXMLElement: (xmlTextWriterPtr) writer { [self writeXMLElement: writer writeNamespaces: YES]; } /** * Writes this AGENTRANKNS0ClaimProfile to an XML writer. * * @param writer The writer. * @param writeNs Whether to write the namespaces for this element to the xml writer. */ - (void) writeXMLElement: (xmlTextWriterPtr) writer writeNamespaces: (BOOL) writeNs { int rc = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "response", NULL); if (rc < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start element {}response. XML writer status: %i\n", rc]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing type {}claimProfile for root element {}response..."); #endif [self writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote type {}claimProfile for root element {}response..."); #endif rc = xmlTextWriterEndElement(writer); if (rc < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end element {}response. XML writer status: %i\n", rc]; } } //documentation inherited. - (BOOL) readJAXBAttribute: (xmlTextReaderPtr) reader { void *_child_accessor; if ([super readJAXBAttribute: reader]) { return YES; } return NO; } //documentation inherited. - (BOOL) readJAXBValue: (xmlTextReaderPtr) reader { return [super readJAXBValue: reader]; } //documentation inherited. - (BOOL) readJAXBChildElement: (xmlTextReaderPtr) reader { id __child; void *_child_accessor; int status, depth; if ([super readJAXBChildElement: reader]) { return YES; } if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "status", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read choice {}status of type {}status."); #endif __child = [AGENTRANKNS0Status readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read choice {}status of type {}status."); #endif [self setStatus: __child]; return YES; } //end "if choice" return NO; } //documentation inherited. - (int) readUnknownJAXBChildElement: (xmlTextReaderPtr) reader { return [super readUnknownJAXBChildElement: reader]; } //documentation inherited. - (void) readUnknownJAXBAttribute: (xmlTextReaderPtr) reader { [super readUnknownJAXBAttribute: reader]; } //documentation inherited. - (void) writeJAXBAttributes: (xmlTextWriterPtr) writer { int status; [super writeJAXBAttributes: writer]; } //documentation inherited. - (void) writeJAXBValue: (xmlTextWriterPtr) writer { [super writeJAXBValue: writer]; } /** * Method for writing the child elements. * * @param writer The writer. */ - (void) writeJAXBChildElements: (xmlTextWriterPtr) writer { int status; id __item; NSEnumerator *__enumerator; [super writeJAXBChildElements: writer]; if ([self status]) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "status", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start child element {}status."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing element {}status..."); #endif [[self status] writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote element {}status..."); #endif status = xmlTextWriterEndElement(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end child element {}status."]; } } } @end /* implementation AGENTRANKNS0ClaimProfile (JAXB) */ #endif /* DEF_AGENTRANKNS0ClaimProfile_M */ #ifndef DEF_AGENTRANKNS0Forecast_M #define DEF_AGENTRANKNS0Forecast_M /** * User: marc Date: Mar 4, 2008 Time: 6:15:00 AM

THIS SOFTWARE IS COPYRIGHTED. THE SOFTWARE MAY NOT BE COPIED REPRODUCED, TRANSLATED, OR REDUCED TO ANY ELECTRONIC MEDIUM OR MACHINE READABLE FORM WITHOUT THE PRIOR WRITTEN CONSENT OF SOCO TECHNOLOGIES. */ @implementation AGENTRANKNS0Forecast /** * (no documentation provided) */ - (int *) identifier { return _identifier; } /** * (no documentation provided) */ - (void) setIdentifier: (int *) newIdentifier { if (_identifier != NULL) { free(_identifier); } _identifier = newIdentifier; } /** * (no documentation provided) */ - (NSString *) key { return _key; } /** * (no documentation provided) */ - (void) setKey: (NSString *) newKey { [newKey retain]; [_key release]; _key = newKey; } /** * attribution link */ - (AGENTRANKNS0Link *) link { return _link; } /** * attribution link */ - (void) setLink: (AGENTRANKNS0Link *) newLink { [newLink retain]; [_link release]; _link = newLink; } /** * future date */ - (NSDate *) date { return _date; } /** * future date */ - (void) setDate: (NSDate *) newDate { [newDate retain]; [_date release]; _date = newDate; } /** * slugs */ - (AGENTRANKNS0Slugs *) slugs { return _slugs; } /** * slugs */ - (void) setSlugs: (AGENTRANKNS0Slugs *) newSlugs { [newSlugs retain]; [_slugs release]; _slugs = newSlugs; } /** * body */ - (NSString *) body { return _body; } /** * body */ - (void) setBody: (NSString *) newBody { [newBody retain]; [_body release]; _body = newBody; } /** * title */ - (NSString *) title { return _title; } /** * title */ - (void) setTitle: (NSString *) newTitle { [newTitle retain]; [_title release]; _title = newTitle; } /** * market name */ - (NSString *) market { return _market; } /** * market name */ - (void) setMarket: (NSString *) newMarket { [newMarket retain]; [_market release]; _market = newMarket; } /** * (no documentation provided) */ - (NSString *) metric { return _metric; } /** * (no documentation provided) */ - (void) setMetric: (NSString *) newMetric { [newMetric retain]; [_metric release]; _metric = newMetric; } /** * (no documentation provided) */ - (NSDecimalNumber *) spot { return _spot; } /** * (no documentation provided) */ - (void) setSpot: (NSDecimalNumber *) newSpot { [newSpot retain]; [_spot release]; _spot = newSpot; } /** * (no documentation provided) */ - (NSDecimalNumber *) future { return _future; } /** * (no documentation provided) */ - (void) setFuture: (NSDecimalNumber *) newFuture { [newFuture retain]; [_future release]; _future = newFuture; } - (void) dealloc { [self setIdentifier: NULL]; [self setKey: nil]; [self setLink: nil]; [self setDate: nil]; [self setSlugs: nil]; [self setBody: nil]; [self setTitle: nil]; [self setMarket: nil]; [self setMetric: nil]; [self setSpot: nil]; [self setFuture: nil]; [super dealloc]; } //documentation inherited. + (id) readFromXML: (NSData *) xml { AGENTRANKNS0Forecast *_aGENTRANKNS0Forecast; xmlTextReaderPtr reader = xmlReaderForMemory([xml bytes], [xml length], NULL, NULL, 0); if (reader == NULL) { [NSException raise: @"XMLReadError" format: @"Error instantiating an XML reader."]; return nil; } _aGENTRANKNS0Forecast = (AGENTRANKNS0Forecast *) [AGENTRANKNS0Forecast readXMLElement: reader]; xmlFreeTextReader(reader); //free the reader return _aGENTRANKNS0Forecast; } //documentation inherited. - (NSData *) writeToXML { xmlBufferPtr buf; xmlTextWriterPtr writer; int rc; NSData *data; buf = xmlBufferCreate(); if (buf == NULL) { [NSException raise: @"XMLWriteError" format: @"Error creating an XML buffer."]; return nil; } writer = xmlNewTextWriterMemory(buf, 0); if (writer == NULL) { xmlBufferFree(buf); [NSException raise: @"XMLWriteError" format: @"Error creating an XML writer."]; return nil; } rc = xmlTextWriterStartDocument(writer, NULL, "utf-8", NULL); if (rc < 0) { xmlFreeTextWriter(writer); xmlBufferFree(buf); [NSException raise: @"XMLWriteError" format: @"Error writing XML start document."]; return nil; } NS_DURING { [self writeXMLElement: writer]; } NS_HANDLER { xmlFreeTextWriter(writer); xmlBufferFree(buf); [localException raise]; } NS_ENDHANDLER rc = xmlTextWriterEndDocument(writer); if (rc < 0) { xmlFreeTextWriter(writer); xmlBufferFree(buf); [NSException raise: @"XMLWriteError" format: @"Error writing XML end document."]; return nil; } xmlFreeTextWriter(writer); data = [NSData dataWithBytes: buf->content length: buf->use]; xmlBufferFree(buf); return data; } @end /* implementation AGENTRANKNS0Forecast */ /** * Internal, private interface for JAXB reading and writing. */ @interface AGENTRANKNS0Forecast (JAXB) @end /*interface AGENTRANKNS0Forecast (JAXB)*/ /** * Internal, private implementation for JAXB reading and writing. */ @implementation AGENTRANKNS0Forecast (JAXB) /** * Read an instance of AGENTRANKNS0Forecast from an XML reader. * * @param reader The reader. * @return An instance of AGENTRANKNS0Forecast defined by the XML reader. */ + (id) readXMLType: (xmlTextReaderPtr) reader { AGENTRANKNS0Forecast *_aGENTRANKNS0Forecast = [[AGENTRANKNS0Forecast alloc] init]; NS_DURING { [_aGENTRANKNS0Forecast initWithReader: reader]; } NS_HANDLER { _aGENTRANKNS0Forecast = nil; [localException raise]; } NS_ENDHANDLER [_aGENTRANKNS0Forecast autorelease]; return _aGENTRANKNS0Forecast; } /** * Initialize this instance of AGENTRANKNS0Forecast according to * the XML being read from the reader. * * @param reader The reader. */ - (id) initWithReader: (xmlTextReaderPtr) reader { return [super initWithReader: reader]; } /** * Write the XML for this instance of AGENTRANKNS0Forecast to the writer. * Note that since we're only writing the XML type, * No start/end element will be written. * * @param reader The reader. */ - (void) writeXMLType: (xmlTextWriterPtr) writer { [super writeXMLType:writer]; } /** * Reads a AGENTRANKNS0Forecast from an XML reader. The element to be read is * "forecast". * * @param reader The XML reader. * @return The AGENTRANKNS0Forecast. */ + (id) readXMLElement: (xmlTextReaderPtr) reader { int status; AGENTRANKNS0Forecast *_forecast = nil; if (xmlTextReaderNodeType(reader) != XML_READER_TYPE_ELEMENT) { status = xmlTextReaderAdvanceToNextStartOrEndElement(reader); if (status < 1) { [NSException raise: @"XMLReadError" format: @"Error advancing the reader to start element forecast."]; } } if (xmlStrcmp(BAD_CAST "forecast", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read root element {}forecast."); #endif _forecast = (AGENTRANKNS0Forecast *)[AGENTRANKNS0Forecast readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"Successfully read root element {}forecast."); #endif } else { if (xmlTextReaderConstNamespaceUri(reader) == NULL) { [NSException raise: @"XMLReadError" format: @"Unable to read AGENTRANKNS0Forecast. Expected element forecast. Current element: {}%s", xmlTextReaderConstLocalName(reader)]; } else { [NSException raise: @"XMLReadError" format: @"Unable to read AGENTRANKNS0Forecast. Expected element forecast. Current element: {%s}%s\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)]; } } return _forecast; } /** * Writes this AGENTRANKNS0Forecast to XML under element name "forecast". * The namespace declarations for the element will be written. * * @param writer The XML writer. * @param _forecast The Forecast to write. * @return 1 if successful, 0 otherwise. */ - (void) writeXMLElement: (xmlTextWriterPtr) writer { [self writeXMLElement: writer writeNamespaces: YES]; } /** * Writes this AGENTRANKNS0Forecast to an XML writer. * * @param writer The writer. * @param writeNs Whether to write the namespaces for this element to the xml writer. */ - (void) writeXMLElement: (xmlTextWriterPtr) writer writeNamespaces: (BOOL) writeNs { int rc = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "forecast", NULL); if (rc < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start element {}forecast. XML writer status: %i\n", rc]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing type {}forecast for root element {}forecast..."); #endif [self writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote type {}forecast for root element {}forecast..."); #endif rc = xmlTextWriterEndElement(writer); if (rc < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end element {}forecast. XML writer status: %i\n", rc]; } } //documentation inherited. - (BOOL) readJAXBAttribute: (xmlTextReaderPtr) reader { void *_child_accessor; if ([super readJAXBAttribute: reader]) { return YES; } if ((xmlStrcmp(BAD_CAST "id", xmlTextReaderConstLocalName(reader)) == 0) && (xmlTextReaderConstNamespaceUri(reader) == NULL)) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read attribute {}id..."); #endif _child_accessor = xmlTextReaderReadIntType(reader); if (_child_accessor == NULL) { //panic: unable to read the attribute value for some reason. [NSException raise: @"XMLReadError" format: @"Error reading attribute {}id."]; } [self setIdentifier: ((int*) _child_accessor)]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read attribute {}id..."); #endif return YES; } if ((xmlStrcmp(BAD_CAST "key", xmlTextReaderConstLocalName(reader)) == 0) && (xmlTextReaderConstNamespaceUri(reader) == NULL)) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read attribute {}key..."); #endif [self setKey: (NSString*) [NSString readXMLType: reader]]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read attribute {}key..."); #endif return YES; } return NO; } //documentation inherited. - (BOOL) readJAXBValue: (xmlTextReaderPtr) reader { return [super readJAXBValue: reader]; } //documentation inherited. - (BOOL) readJAXBChildElement: (xmlTextReaderPtr) reader { id __child; void *_child_accessor; int status, depth; if ([super readJAXBChildElement: reader]) { return YES; } if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "link", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read choice {}link of type {}link."); #endif __child = [AGENTRANKNS0Link readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read choice {}link of type {}link."); #endif [self setLink: __child]; return YES; } //end "if choice" if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "date", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read choice {}date of type {http://www.w3.org/2001/XMLSchema}dateTime."); #endif __child = [NSDate readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read choice {}date of type {http://www.w3.org/2001/XMLSchema}dateTime."); #endif [self setDate: __child]; return YES; } //end "if choice" if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "slugs", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read choice {}slugs of type {}slugs."); #endif __child = [AGENTRANKNS0Slugs readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read choice {}slugs of type {}slugs."); #endif [self setSlugs: __child]; return YES; } //end "if choice" if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "body", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read choice {}body of type {http://www.w3.org/2001/XMLSchema}string."); #endif __child = [NSString readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read choice {}body of type {http://www.w3.org/2001/XMLSchema}string."); #endif [self setBody: __child]; return YES; } //end "if choice" if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "title", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read choice {}title of type {http://www.w3.org/2001/XMLSchema}string."); #endif __child = [NSString readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read choice {}title of type {http://www.w3.org/2001/XMLSchema}string."); #endif [self setTitle: __child]; return YES; } //end "if choice" if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "market", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read choice {}market of type {http://www.w3.org/2001/XMLSchema}string."); #endif __child = [NSString readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read choice {}market of type {http://www.w3.org/2001/XMLSchema}string."); #endif [self setMarket: __child]; return YES; } //end "if choice" if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "metric", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read choice {}metric of type {http://www.w3.org/2001/XMLSchema}string."); #endif __child = [NSString readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read choice {}metric of type {http://www.w3.org/2001/XMLSchema}string."); #endif [self setMetric: __child]; return YES; } //end "if choice" if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "spot", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read choice {}spot of type {http://www.w3.org/2001/XMLSchema}decimal."); #endif __child = [NSDecimalNumber readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read choice {}spot of type {http://www.w3.org/2001/XMLSchema}decimal."); #endif [self setSpot: __child]; return YES; } //end "if choice" if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "future", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read choice {}future of type {http://www.w3.org/2001/XMLSchema}decimal."); #endif __child = [NSDecimalNumber readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read choice {}future of type {http://www.w3.org/2001/XMLSchema}decimal."); #endif [self setFuture: __child]; return YES; } //end "if choice" return NO; } //documentation inherited. - (int) readUnknownJAXBChildElement: (xmlTextReaderPtr) reader { return [super readUnknownJAXBChildElement: reader]; } //documentation inherited. - (void) readUnknownJAXBAttribute: (xmlTextReaderPtr) reader { [super readUnknownJAXBAttribute: reader]; } //documentation inherited. - (void) writeJAXBAttributes: (xmlTextWriterPtr) writer { int status; [super writeJAXBAttributes: writer]; if ([self identifier] != NULL) { status = xmlTextWriterStartAttributeNS(writer, NULL, BAD_CAST "id", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start attribute {}id."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing attribute {}id..."); #endif status = xmlTextWriterWriteIntType(writer, [self identifier]); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing attribute {}id."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote attribute {}id..."); #endif status = xmlTextWriterEndAttribute(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end attribute {}id."]; } } if ([self key]) { status = xmlTextWriterStartAttributeNS(writer, NULL, BAD_CAST "key", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start attribute {}key."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing attribute {}key..."); #endif [[self key] writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote attribute {}key..."); #endif status = xmlTextWriterEndAttribute(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end attribute {}key."]; } } } //documentation inherited. - (void) writeJAXBValue: (xmlTextWriterPtr) writer { [super writeJAXBValue: writer]; } /** * Method for writing the child elements. * * @param writer The writer. */ - (void) writeJAXBChildElements: (xmlTextWriterPtr) writer { int status; id __item; NSEnumerator *__enumerator; [super writeJAXBChildElements: writer]; if ([self link]) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "link", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start child element {}link."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing element {}link..."); #endif [[self link] writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote element {}link..."); #endif status = xmlTextWriterEndElement(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end child element {}link."]; } } if ([self date]) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "date", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start child element {}date."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing element {}date..."); #endif [[self date] writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote element {}date..."); #endif status = xmlTextWriterEndElement(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end child element {}date."]; } } if ([self slugs]) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "slugs", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start child element {}slugs."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing element {}slugs..."); #endif [[self slugs] writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote element {}slugs..."); #endif status = xmlTextWriterEndElement(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end child element {}slugs."]; } } if ([self body]) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "body", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start child element {}body."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing element {}body..."); #endif [[self body] writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote element {}body..."); #endif status = xmlTextWriterEndElement(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end child element {}body."]; } } if ([self title]) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "title", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start child element {}title."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing element {}title..."); #endif [[self title] writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote element {}title..."); #endif status = xmlTextWriterEndElement(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end child element {}title."]; } } if ([self market]) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "market", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start child element {}market."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing element {}market..."); #endif [[self market] writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote element {}market..."); #endif status = xmlTextWriterEndElement(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end child element {}market."]; } } if ([self metric]) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "metric", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start child element {}metric."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing element {}metric..."); #endif [[self metric] writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote element {}metric..."); #endif status = xmlTextWriterEndElement(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end child element {}metric."]; } } if ([self spot]) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "spot", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start child element {}spot."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing element {}spot..."); #endif [[self spot] writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote element {}spot..."); #endif status = xmlTextWriterEndElement(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end child element {}spot."]; } } if ([self future]) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "future", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start child element {}future."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing element {}future..."); #endif [[self future] writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote element {}future..."); #endif status = xmlTextWriterEndElement(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end child element {}future."]; } } } @end /* implementation AGENTRANKNS0Forecast (JAXB) */ #endif /* DEF_AGENTRANKNS0Forecast_M */ #ifndef DEF_AGENTRANKNS0GetForecast_M #define DEF_AGENTRANKNS0GetForecast_M /** * Created by IntelliJ IDEA. User: marc Date: Dec 8, 2010 Time: 10:30:36 AM */ @implementation AGENTRANKNS0GetForecast /** * the image chart */ - (AGENTRANKNS0Images *) charts { return _charts; } /** * the image chart */ - (void) setCharts: (AGENTRANKNS0Images *) newCharts { [newCharts retain]; [_charts release]; _charts = newCharts; } /** * forecast */ - (AGENTRANKNS0Forecast *) forecast { return _forecast; } /** * forecast */ - (void) setForecast: (AGENTRANKNS0Forecast *) newForecast { [newForecast retain]; [_forecast release]; _forecast = newForecast; } /** * (no documentation provided) */ - (AGENTRANKNS0Status *) status { return _status; } /** * (no documentation provided) */ - (void) setStatus: (AGENTRANKNS0Status *) newStatus { [newStatus retain]; [_status release]; _status = newStatus; } - (void) dealloc { [self setCharts: nil]; [self setForecast: nil]; [self setStatus: nil]; [super dealloc]; } //documentation inherited. + (id) readFromXML: (NSData *) xml { AGENTRANKNS0GetForecast *_aGENTRANKNS0GetForecast; xmlTextReaderPtr reader = xmlReaderForMemory([xml bytes], [xml length], NULL, NULL, 0); if (reader == NULL) { [NSException raise: @"XMLReadError" format: @"Error instantiating an XML reader."]; return nil; } _aGENTRANKNS0GetForecast = (AGENTRANKNS0GetForecast *) [AGENTRANKNS0GetForecast readXMLElement: reader]; xmlFreeTextReader(reader); //free the reader return _aGENTRANKNS0GetForecast; } //documentation inherited. - (NSData *) writeToXML { xmlBufferPtr buf; xmlTextWriterPtr writer; int rc; NSData *data; buf = xmlBufferCreate(); if (buf == NULL) { [NSException raise: @"XMLWriteError" format: @"Error creating an XML buffer."]; return nil; } writer = xmlNewTextWriterMemory(buf, 0); if (writer == NULL) { xmlBufferFree(buf); [NSException raise: @"XMLWriteError" format: @"Error creating an XML writer."]; return nil; } rc = xmlTextWriterStartDocument(writer, NULL, "utf-8", NULL); if (rc < 0) { xmlFreeTextWriter(writer); xmlBufferFree(buf); [NSException raise: @"XMLWriteError" format: @"Error writing XML start document."]; return nil; } NS_DURING { [self writeXMLElement: writer]; } NS_HANDLER { xmlFreeTextWriter(writer); xmlBufferFree(buf); [localException raise]; } NS_ENDHANDLER rc = xmlTextWriterEndDocument(writer); if (rc < 0) { xmlFreeTextWriter(writer); xmlBufferFree(buf); [NSException raise: @"XMLWriteError" format: @"Error writing XML end document."]; return nil; } xmlFreeTextWriter(writer); data = [NSData dataWithBytes: buf->content length: buf->use]; xmlBufferFree(buf); return data; } @end /* implementation AGENTRANKNS0GetForecast */ /** * Internal, private interface for JAXB reading and writing. */ @interface AGENTRANKNS0GetForecast (JAXB) @end /*interface AGENTRANKNS0GetForecast (JAXB)*/ /** * Internal, private implementation for JAXB reading and writing. */ @implementation AGENTRANKNS0GetForecast (JAXB) /** * Read an instance of AGENTRANKNS0GetForecast from an XML reader. * * @param reader The reader. * @return An instance of AGENTRANKNS0GetForecast defined by the XML reader. */ + (id) readXMLType: (xmlTextReaderPtr) reader { AGENTRANKNS0GetForecast *_aGENTRANKNS0GetForecast = [[AGENTRANKNS0GetForecast alloc] init]; NS_DURING { [_aGENTRANKNS0GetForecast initWithReader: reader]; } NS_HANDLER { _aGENTRANKNS0GetForecast = nil; [localException raise]; } NS_ENDHANDLER [_aGENTRANKNS0GetForecast autorelease]; return _aGENTRANKNS0GetForecast; } /** * Initialize this instance of AGENTRANKNS0GetForecast according to * the XML being read from the reader. * * @param reader The reader. */ - (id) initWithReader: (xmlTextReaderPtr) reader { return [super initWithReader: reader]; } /** * Write the XML for this instance of AGENTRANKNS0GetForecast to the writer. * Note that since we're only writing the XML type, * No start/end element will be written. * * @param reader The reader. */ - (void) writeXMLType: (xmlTextWriterPtr) writer { [super writeXMLType:writer]; } /** * Reads a AGENTRANKNS0GetForecast from an XML reader. The element to be read is * "response". * * @param reader The XML reader. * @return The AGENTRANKNS0GetForecast. */ + (id) readXMLElement: (xmlTextReaderPtr) reader { int status; AGENTRANKNS0GetForecast *_getForecast = nil; if (xmlTextReaderNodeType(reader) != XML_READER_TYPE_ELEMENT) { status = xmlTextReaderAdvanceToNextStartOrEndElement(reader); if (status < 1) { [NSException raise: @"XMLReadError" format: @"Error advancing the reader to start element response."]; } } if (xmlStrcmp(BAD_CAST "response", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read root element {}response."); #endif _getForecast = (AGENTRANKNS0GetForecast *)[AGENTRANKNS0GetForecast readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"Successfully read root element {}response."); #endif } else { if (xmlTextReaderConstNamespaceUri(reader) == NULL) { [NSException raise: @"XMLReadError" format: @"Unable to read AGENTRANKNS0GetForecast. Expected element response. Current element: {}%s", xmlTextReaderConstLocalName(reader)]; } else { [NSException raise: @"XMLReadError" format: @"Unable to read AGENTRANKNS0GetForecast. Expected element response. Current element: {%s}%s\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)]; } } return _getForecast; } /** * Writes this AGENTRANKNS0GetForecast to XML under element name "response". * The namespace declarations for the element will be written. * * @param writer The XML writer. * @param _getForecast The GetForecast to write. * @return 1 if successful, 0 otherwise. */ - (void) writeXMLElement: (xmlTextWriterPtr) writer { [self writeXMLElement: writer writeNamespaces: YES]; } /** * Writes this AGENTRANKNS0GetForecast to an XML writer. * * @param writer The writer. * @param writeNs Whether to write the namespaces for this element to the xml writer. */ - (void) writeXMLElement: (xmlTextWriterPtr) writer writeNamespaces: (BOOL) writeNs { int rc = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "response", NULL); if (rc < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start element {}response. XML writer status: %i\n", rc]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing type {}getForecast for root element {}response..."); #endif [self writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote type {}getForecast for root element {}response..."); #endif rc = xmlTextWriterEndElement(writer); if (rc < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end element {}response. XML writer status: %i\n", rc]; } } //documentation inherited. - (BOOL) readJAXBAttribute: (xmlTextReaderPtr) reader { void *_child_accessor; if ([super readJAXBAttribute: reader]) { return YES; } return NO; } //documentation inherited. - (BOOL) readJAXBValue: (xmlTextReaderPtr) reader { return [super readJAXBValue: reader]; } //documentation inherited. - (BOOL) readJAXBChildElement: (xmlTextReaderPtr) reader { id __child; void *_child_accessor; int status, depth; if ([super readJAXBChildElement: reader]) { return YES; } if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "charts", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read choice {}charts of type {}images."); #endif __child = [AGENTRANKNS0Images readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read choice {}charts of type {}images."); #endif [self setCharts: __child]; return YES; } //end "if choice" if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "forecast", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read choice {}forecast of type {}forecast."); #endif __child = [AGENTRANKNS0Forecast readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read choice {}forecast of type {}forecast."); #endif [self setForecast: __child]; return YES; } //end "if choice" if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "status", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read choice {}status of type {}status."); #endif __child = [AGENTRANKNS0Status readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read choice {}status of type {}status."); #endif [self setStatus: __child]; return YES; } //end "if choice" return NO; } //documentation inherited. - (int) readUnknownJAXBChildElement: (xmlTextReaderPtr) reader { return [super readUnknownJAXBChildElement: reader]; } //documentation inherited. - (void) readUnknownJAXBAttribute: (xmlTextReaderPtr) reader { [super readUnknownJAXBAttribute: reader]; } //documentation inherited. - (void) writeJAXBAttributes: (xmlTextWriterPtr) writer { int status; [super writeJAXBAttributes: writer]; } //documentation inherited. - (void) writeJAXBValue: (xmlTextWriterPtr) writer { [super writeJAXBValue: writer]; } /** * Method for writing the child elements. * * @param writer The writer. */ - (void) writeJAXBChildElements: (xmlTextWriterPtr) writer { int status; id __item; NSEnumerator *__enumerator; [super writeJAXBChildElements: writer]; if ([self charts]) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "charts", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start child element {}charts."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing element {}charts..."); #endif [[self charts] writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote element {}charts..."); #endif status = xmlTextWriterEndElement(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end child element {}charts."]; } } if ([self forecast]) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "forecast", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start child element {}forecast."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing element {}forecast..."); #endif [[self forecast] writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote element {}forecast..."); #endif status = xmlTextWriterEndElement(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end child element {}forecast."]; } } if ([self status]) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "status", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start child element {}status."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing element {}status..."); #endif [[self status] writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote element {}status..."); #endif status = xmlTextWriterEndElement(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end child element {}status."]; } } } @end /* implementation AGENTRANKNS0GetForecast (JAXB) */ #endif /* DEF_AGENTRANKNS0GetForecast_M */ #ifndef DEF_AGENTRANKNS0GetProfile_M #define DEF_AGENTRANKNS0GetProfile_M /** * User: marc Date: Oct 1, 2009 Time: 5:26:25 AM

THIS SOFTWARE IS COPYRIGHTED. THE SOFTWARE MAY NOT BE COPIED REPRODUCED, TRANSLATED, OR REDUCED TO ANY ELECTRONIC MEDIUM OR MACHINE READABLE FORM WITHOUT THE PRIOR WRITTEN CONSENT OF SOCO TECHNOLOGIES. */ @implementation AGENTRANKNS0GetProfile /** * status */ - (AGENTRANKNS0Status *) status { return _status; } /** * status */ - (void) setStatus: (AGENTRANKNS0Status *) newStatus { [newStatus retain]; [_status release]; _status = newStatus; } /** * (no documentation provided) */ - (AGENTRANKNS0Profile *) profile { return _profile; } /** * (no documentation provided) */ - (void) setProfile: (AGENTRANKNS0Profile *) newProfile { [newProfile retain]; [_profile release]; _profile = newProfile; } - (void) dealloc { [self setStatus: nil]; [self setProfile: nil]; [super dealloc]; } //documentation inherited. + (id) readFromXML: (NSData *) xml { AGENTRANKNS0GetProfile *_aGENTRANKNS0GetProfile; xmlTextReaderPtr reader = xmlReaderForMemory([xml bytes], [xml length], NULL, NULL, 0); if (reader == NULL) { [NSException raise: @"XMLReadError" format: @"Error instantiating an XML reader."]; return nil; } _aGENTRANKNS0GetProfile = (AGENTRANKNS0GetProfile *) [AGENTRANKNS0GetProfile readXMLElement: reader]; xmlFreeTextReader(reader); //free the reader return _aGENTRANKNS0GetProfile; } //documentation inherited. - (NSData *) writeToXML { xmlBufferPtr buf; xmlTextWriterPtr writer; int rc; NSData *data; buf = xmlBufferCreate(); if (buf == NULL) { [NSException raise: @"XMLWriteError" format: @"Error creating an XML buffer."]; return nil; } writer = xmlNewTextWriterMemory(buf, 0); if (writer == NULL) { xmlBufferFree(buf); [NSException raise: @"XMLWriteError" format: @"Error creating an XML writer."]; return nil; } rc = xmlTextWriterStartDocument(writer, NULL, "utf-8", NULL); if (rc < 0) { xmlFreeTextWriter(writer); xmlBufferFree(buf); [NSException raise: @"XMLWriteError" format: @"Error writing XML start document."]; return nil; } NS_DURING { [self writeXMLElement: writer]; } NS_HANDLER { xmlFreeTextWriter(writer); xmlBufferFree(buf); [localException raise]; } NS_ENDHANDLER rc = xmlTextWriterEndDocument(writer); if (rc < 0) { xmlFreeTextWriter(writer); xmlBufferFree(buf); [NSException raise: @"XMLWriteError" format: @"Error writing XML end document."]; return nil; } xmlFreeTextWriter(writer); data = [NSData dataWithBytes: buf->content length: buf->use]; xmlBufferFree(buf); return data; } @end /* implementation AGENTRANKNS0GetProfile */ /** * Internal, private interface for JAXB reading and writing. */ @interface AGENTRANKNS0GetProfile (JAXB) @end /*interface AGENTRANKNS0GetProfile (JAXB)*/ /** * Internal, private implementation for JAXB reading and writing. */ @implementation AGENTRANKNS0GetProfile (JAXB) /** * Read an instance of AGENTRANKNS0GetProfile from an XML reader. * * @param reader The reader. * @return An instance of AGENTRANKNS0GetProfile defined by the XML reader. */ + (id) readXMLType: (xmlTextReaderPtr) reader { AGENTRANKNS0GetProfile *_aGENTRANKNS0GetProfile = [[AGENTRANKNS0GetProfile alloc] init]; NS_DURING { [_aGENTRANKNS0GetProfile initWithReader: reader]; } NS_HANDLER { _aGENTRANKNS0GetProfile = nil; [localException raise]; } NS_ENDHANDLER [_aGENTRANKNS0GetProfile autorelease]; return _aGENTRANKNS0GetProfile; } /** * Initialize this instance of AGENTRANKNS0GetProfile according to * the XML being read from the reader. * * @param reader The reader. */ - (id) initWithReader: (xmlTextReaderPtr) reader { return [super initWithReader: reader]; } /** * Write the XML for this instance of AGENTRANKNS0GetProfile to the writer. * Note that since we're only writing the XML type, * No start/end element will be written. * * @param reader The reader. */ - (void) writeXMLType: (xmlTextWriterPtr) writer { [super writeXMLType:writer]; } /** * Reads a AGENTRANKNS0GetProfile from an XML reader. The element to be read is * "response". * * @param reader The XML reader. * @return The AGENTRANKNS0GetProfile. */ + (id) readXMLElement: (xmlTextReaderPtr) reader { int status; AGENTRANKNS0GetProfile *_getProfile = nil; if (xmlTextReaderNodeType(reader) != XML_READER_TYPE_ELEMENT) { status = xmlTextReaderAdvanceToNextStartOrEndElement(reader); if (status < 1) { [NSException raise: @"XMLReadError" format: @"Error advancing the reader to start element response."]; } } if (xmlStrcmp(BAD_CAST "response", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read root element {}response."); #endif _getProfile = (AGENTRANKNS0GetProfile *)[AGENTRANKNS0GetProfile readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"Successfully read root element {}response."); #endif } else { if (xmlTextReaderConstNamespaceUri(reader) == NULL) { [NSException raise: @"XMLReadError" format: @"Unable to read AGENTRANKNS0GetProfile. Expected element response. Current element: {}%s", xmlTextReaderConstLocalName(reader)]; } else { [NSException raise: @"XMLReadError" format: @"Unable to read AGENTRANKNS0GetProfile. Expected element response. Current element: {%s}%s\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)]; } } return _getProfile; } /** * Writes this AGENTRANKNS0GetProfile to XML under element name "response". * The namespace declarations for the element will be written. * * @param writer The XML writer. * @param _getProfile The GetProfile to write. * @return 1 if successful, 0 otherwise. */ - (void) writeXMLElement: (xmlTextWriterPtr) writer { [self writeXMLElement: writer writeNamespaces: YES]; } /** * Writes this AGENTRANKNS0GetProfile to an XML writer. * * @param writer The writer. * @param writeNs Whether to write the namespaces for this element to the xml writer. */ - (void) writeXMLElement: (xmlTextWriterPtr) writer writeNamespaces: (BOOL) writeNs { int rc = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "response", NULL); if (rc < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start element {}response. XML writer status: %i\n", rc]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing type {}getProfile for root element {}response..."); #endif [self writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote type {}getProfile for root element {}response..."); #endif rc = xmlTextWriterEndElement(writer); if (rc < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end element {}response. XML writer status: %i\n", rc]; } } //documentation inherited. - (BOOL) readJAXBAttribute: (xmlTextReaderPtr) reader { void *_child_accessor; if ([super readJAXBAttribute: reader]) { return YES; } return NO; } //documentation inherited. - (BOOL) readJAXBValue: (xmlTextReaderPtr) reader { return [super readJAXBValue: reader]; } //documentation inherited. - (BOOL) readJAXBChildElement: (xmlTextReaderPtr) reader { id __child; void *_child_accessor; int status, depth; if ([super readJAXBChildElement: reader]) { return YES; } if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "status", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read choice {}status of type {}status."); #endif __child = [AGENTRANKNS0Status readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read choice {}status of type {}status."); #endif [self setStatus: __child]; return YES; } //end "if choice" if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "profile", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read choice {}profile of type {}profile."); #endif __child = [AGENTRANKNS0Profile readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read choice {}profile of type {}profile."); #endif [self setProfile: __child]; return YES; } //end "if choice" return NO; } //documentation inherited. - (int) readUnknownJAXBChildElement: (xmlTextReaderPtr) reader { return [super readUnknownJAXBChildElement: reader]; } //documentation inherited. - (void) readUnknownJAXBAttribute: (xmlTextReaderPtr) reader { [super readUnknownJAXBAttribute: reader]; } //documentation inherited. - (void) writeJAXBAttributes: (xmlTextWriterPtr) writer { int status; [super writeJAXBAttributes: writer]; } //documentation inherited. - (void) writeJAXBValue: (xmlTextWriterPtr) writer { [super writeJAXBValue: writer]; } /** * Method for writing the child elements. * * @param writer The writer. */ - (void) writeJAXBChildElements: (xmlTextWriterPtr) writer { int status; id __item; NSEnumerator *__enumerator; [super writeJAXBChildElements: writer]; if ([self status]) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "status", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start child element {}status."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing element {}status..."); #endif [[self status] writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote element {}status..."); #endif status = xmlTextWriterEndElement(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end child element {}status."]; } } if ([self profile]) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "profile", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start child element {}profile."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing element {}profile..."); #endif [[self profile] writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote element {}profile..."); #endif status = xmlTextWriterEndElement(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end child element {}profile."]; } } } @end /* implementation AGENTRANKNS0GetProfile (JAXB) */ #endif /* DEF_AGENTRANKNS0GetProfile_M */ #ifndef DEF_AGENTRANKNS0GetReviews_M #define DEF_AGENTRANKNS0GetReviews_M /** * User: marc Date: Oct 1, 2009 Time: 5:26:25 AM

THIS SOFTWARE IS COPYRIGHTED. THE SOFTWARE MAY NOT BE COPIED REPRODUCED, TRANSLATED, OR REDUCED TO ANY ELECTRONIC MEDIUM OR MACHINE READABLE FORM WITHOUT THE PRIOR WRITTEN CONSENT OF SOCO TECHNOLOGIES. */ @implementation AGENTRANKNS0GetReviews /** * status */ - (AGENTRANKNS0Status *) status { return _status; } /** * status */ - (void) setStatus: (AGENTRANKNS0Status *) newStatus { [newStatus retain]; [_status release]; _status = newStatus; } /** * chart links */ - (AGENTRANKNS0Images *) charts { return _charts; } /** * chart links */ - (void) setCharts: (AGENTRANKNS0Images *) newCharts { [newCharts retain]; [_charts release]; _charts = newCharts; } /** * reviews */ - (AGENTRANKNS0Reviews *) reviews { return _reviews; } /** * reviews */ - (void) setReviews: (AGENTRANKNS0Reviews *) newReviews { [newReviews retain]; [_reviews release]; _reviews = newReviews; } - (void) dealloc { [self setStatus: nil]; [self setCharts: nil]; [self setReviews: nil]; [super dealloc]; } //documentation inherited. + (id) readFromXML: (NSData *) xml { AGENTRANKNS0GetReviews *_aGENTRANKNS0GetReviews; xmlTextReaderPtr reader = xmlReaderForMemory([xml bytes], [xml length], NULL, NULL, 0); if (reader == NULL) { [NSException raise: @"XMLReadError" format: @"Error instantiating an XML reader."]; return nil; } _aGENTRANKNS0GetReviews = (AGENTRANKNS0GetReviews *) [AGENTRANKNS0GetReviews readXMLElement: reader]; xmlFreeTextReader(reader); //free the reader return _aGENTRANKNS0GetReviews; } //documentation inherited. - (NSData *) writeToXML { xmlBufferPtr buf; xmlTextWriterPtr writer; int rc; NSData *data; buf = xmlBufferCreate(); if (buf == NULL) { [NSException raise: @"XMLWriteError" format: @"Error creating an XML buffer."]; return nil; } writer = xmlNewTextWriterMemory(buf, 0); if (writer == NULL) { xmlBufferFree(buf); [NSException raise: @"XMLWriteError" format: @"Error creating an XML writer."]; return nil; } rc = xmlTextWriterStartDocument(writer, NULL, "utf-8", NULL); if (rc < 0) { xmlFreeTextWriter(writer); xmlBufferFree(buf); [NSException raise: @"XMLWriteError" format: @"Error writing XML start document."]; return nil; } NS_DURING { [self writeXMLElement: writer]; } NS_HANDLER { xmlFreeTextWriter(writer); xmlBufferFree(buf); [localException raise]; } NS_ENDHANDLER rc = xmlTextWriterEndDocument(writer); if (rc < 0) { xmlFreeTextWriter(writer); xmlBufferFree(buf); [NSException raise: @"XMLWriteError" format: @"Error writing XML end document."]; return nil; } xmlFreeTextWriter(writer); data = [NSData dataWithBytes: buf->content length: buf->use]; xmlBufferFree(buf); return data; } @end /* implementation AGENTRANKNS0GetReviews */ /** * Internal, private interface for JAXB reading and writing. */ @interface AGENTRANKNS0GetReviews (JAXB) @end /*interface AGENTRANKNS0GetReviews (JAXB)*/ /** * Internal, private implementation for JAXB reading and writing. */ @implementation AGENTRANKNS0GetReviews (JAXB) /** * Read an instance of AGENTRANKNS0GetReviews from an XML reader. * * @param reader The reader. * @return An instance of AGENTRANKNS0GetReviews defined by the XML reader. */ + (id) readXMLType: (xmlTextReaderPtr) reader { AGENTRANKNS0GetReviews *_aGENTRANKNS0GetReviews = [[AGENTRANKNS0GetReviews alloc] init]; NS_DURING { [_aGENTRANKNS0GetReviews initWithReader: reader]; } NS_HANDLER { _aGENTRANKNS0GetReviews = nil; [localException raise]; } NS_ENDHANDLER [_aGENTRANKNS0GetReviews autorelease]; return _aGENTRANKNS0GetReviews; } /** * Initialize this instance of AGENTRANKNS0GetReviews according to * the XML being read from the reader. * * @param reader The reader. */ - (id) initWithReader: (xmlTextReaderPtr) reader { return [super initWithReader: reader]; } /** * Write the XML for this instance of AGENTRANKNS0GetReviews to the writer. * Note that since we're only writing the XML type, * No start/end element will be written. * * @param reader The reader. */ - (void) writeXMLType: (xmlTextWriterPtr) writer { [super writeXMLType:writer]; } /** * Reads a AGENTRANKNS0GetReviews from an XML reader. The element to be read is * "response". * * @param reader The XML reader. * @return The AGENTRANKNS0GetReviews. */ + (id) readXMLElement: (xmlTextReaderPtr) reader { int status; AGENTRANKNS0GetReviews *_getReviews = nil; if (xmlTextReaderNodeType(reader) != XML_READER_TYPE_ELEMENT) { status = xmlTextReaderAdvanceToNextStartOrEndElement(reader); if (status < 1) { [NSException raise: @"XMLReadError" format: @"Error advancing the reader to start element response."]; } } if (xmlStrcmp(BAD_CAST "response", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read root element {}response."); #endif _getReviews = (AGENTRANKNS0GetReviews *)[AGENTRANKNS0GetReviews readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"Successfully read root element {}response."); #endif } else { if (xmlTextReaderConstNamespaceUri(reader) == NULL) { [NSException raise: @"XMLReadError" format: @"Unable to read AGENTRANKNS0GetReviews. Expected element response. Current element: {}%s", xmlTextReaderConstLocalName(reader)]; } else { [NSException raise: @"XMLReadError" format: @"Unable to read AGENTRANKNS0GetReviews. Expected element response. Current element: {%s}%s\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)]; } } return _getReviews; } /** * Writes this AGENTRANKNS0GetReviews to XML under element name "response". * The namespace declarations for the element will be written. * * @param writer The XML writer. * @param _getReviews The GetReviews to write. * @return 1 if successful, 0 otherwise. */ - (void) writeXMLElement: (xmlTextWriterPtr) writer { [self writeXMLElement: writer writeNamespaces: YES]; } /** * Writes this AGENTRANKNS0GetReviews to an XML writer. * * @param writer The writer. * @param writeNs Whether to write the namespaces for this element to the xml writer. */ - (void) writeXMLElement: (xmlTextWriterPtr) writer writeNamespaces: (BOOL) writeNs { int rc = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "response", NULL); if (rc < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start element {}response. XML writer status: %i\n", rc]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing type {}getReviews for root element {}response..."); #endif [self writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote type {}getReviews for root element {}response..."); #endif rc = xmlTextWriterEndElement(writer); if (rc < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end element {}response. XML writer status: %i\n", rc]; } } //documentation inherited. - (BOOL) readJAXBAttribute: (xmlTextReaderPtr) reader { void *_child_accessor; if ([super readJAXBAttribute: reader]) { return YES; } return NO; } //documentation inherited. - (BOOL) readJAXBValue: (xmlTextReaderPtr) reader { return [super readJAXBValue: reader]; } //documentation inherited. - (BOOL) readJAXBChildElement: (xmlTextReaderPtr) reader { id __child; void *_child_accessor; int status, depth; if ([super readJAXBChildElement: reader]) { return YES; } if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "status", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read choice {}status of type {}status."); #endif __child = [AGENTRANKNS0Status readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read choice {}status of type {}status."); #endif [self setStatus: __child]; return YES; } //end "if choice" if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "charts", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read choice {}charts of type {}images."); #endif __child = [AGENTRANKNS0Images readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read choice {}charts of type {}images."); #endif [self setCharts: __child]; return YES; } //end "if choice" if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "reviews", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read choice {}reviews of type {}reviews."); #endif __child = [AGENTRANKNS0Reviews readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read choice {}reviews of type {}reviews."); #endif [self setReviews: __child]; return YES; } //end "if choice" return NO; } //documentation inherited. - (int) readUnknownJAXBChildElement: (xmlTextReaderPtr) reader { return [super readUnknownJAXBChildElement: reader]; } //documentation inherited. - (void) readUnknownJAXBAttribute: (xmlTextReaderPtr) reader { [super readUnknownJAXBAttribute: reader]; } //documentation inherited. - (void) writeJAXBAttributes: (xmlTextWriterPtr) writer { int status; [super writeJAXBAttributes: writer]; } //documentation inherited. - (void) writeJAXBValue: (xmlTextWriterPtr) writer { [super writeJAXBValue: writer]; } /** * Method for writing the child elements. * * @param writer The writer. */ - (void) writeJAXBChildElements: (xmlTextWriterPtr) writer { int status; id __item; NSEnumerator *__enumerator; [super writeJAXBChildElements: writer]; if ([self status]) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "status", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start child element {}status."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing element {}status..."); #endif [[self status] writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote element {}status..."); #endif status = xmlTextWriterEndElement(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end child element {}status."]; } } if ([self charts]) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "charts", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start child element {}charts."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing element {}charts..."); #endif [[self charts] writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote element {}charts..."); #endif status = xmlTextWriterEndElement(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end child element {}charts."]; } } if ([self reviews]) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "reviews", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start child element {}reviews."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing element {}reviews..."); #endif [[self reviews] writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote element {}reviews..."); #endif status = xmlTextWriterEndElement(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end child element {}reviews."]; } } } @end /* implementation AGENTRANKNS0GetReviews (JAXB) */ #endif /* DEF_AGENTRANKNS0GetReviews_M */ #ifndef DEF_AGENTRANKNS0GetSales_M #define DEF_AGENTRANKNS0GetSales_M /** * User: marc Date: Oct 1, 2009 Time: 5:26:25 AM

THIS SOFTWARE IS COPYRIGHTED. THE SOFTWARE MAY NOT BE COPIED REPRODUCED, TRANSLATED, OR REDUCED TO ANY ELECTRONIC MEDIUM OR MACHINE READABLE FORM WITHOUT THE PRIOR WRITTEN CONSENT OF SOCO TECHNOLOGIES. */ @implementation AGENTRANKNS0GetSales /** * sales */ - (AGENTRANKNS0Sales *) sales { return _sales; } /** * sales */ - (void) setSales: (AGENTRANKNS0Sales *) newSales { [newSales retain]; [_sales release]; _sales = newSales; } /** * static map */ - (AGENTRANKNS0Images *) maps { return _maps; } /** * static map */ - (void) setMaps: (AGENTRANKNS0Images *) newMaps { [newMaps retain]; [_maps release]; _maps = newMaps; } /** * chart links */ - (AGENTRANKNS0Images *) charts { return _charts; } /** * chart links */ - (void) setCharts: (AGENTRANKNS0Images *) newCharts { [newCharts retain]; [_charts release]; _charts = newCharts; } /** * status */ - (AGENTRANKNS0Status *) status { return _status; } /** * status */ - (void) setStatus: (AGENTRANKNS0Status *) newStatus { [newStatus retain]; [_status release]; _status = newStatus; } - (void) dealloc { [self setSales: nil]; [self setMaps: nil]; [self setCharts: nil]; [self setStatus: nil]; [super dealloc]; } //documentation inherited. + (id) readFromXML: (NSData *) xml { AGENTRANKNS0GetSales *_aGENTRANKNS0GetSales; xmlTextReaderPtr reader = xmlReaderForMemory([xml bytes], [xml length], NULL, NULL, 0); if (reader == NULL) { [NSException raise: @"XMLReadError" format: @"Error instantiating an XML reader."]; return nil; } _aGENTRANKNS0GetSales = (AGENTRANKNS0GetSales *) [AGENTRANKNS0GetSales readXMLElement: reader]; xmlFreeTextReader(reader); //free the reader return _aGENTRANKNS0GetSales; } //documentation inherited. - (NSData *) writeToXML { xmlBufferPtr buf; xmlTextWriterPtr writer; int rc; NSData *data; buf = xmlBufferCreate(); if (buf == NULL) { [NSException raise: @"XMLWriteError" format: @"Error creating an XML buffer."]; return nil; } writer = xmlNewTextWriterMemory(buf, 0); if (writer == NULL) { xmlBufferFree(buf); [NSException raise: @"XMLWriteError" format: @"Error creating an XML writer."]; return nil; } rc = xmlTextWriterStartDocument(writer, NULL, "utf-8", NULL); if (rc < 0) { xmlFreeTextWriter(writer); xmlBufferFree(buf); [NSException raise: @"XMLWriteError" format: @"Error writing XML start document."]; return nil; } NS_DURING { [self writeXMLElement: writer]; } NS_HANDLER { xmlFreeTextWriter(writer); xmlBufferFree(buf); [localException raise]; } NS_ENDHANDLER rc = xmlTextWriterEndDocument(writer); if (rc < 0) { xmlFreeTextWriter(writer); xmlBufferFree(buf); [NSException raise: @"XMLWriteError" format: @"Error writing XML end document."]; return nil; } xmlFreeTextWriter(writer); data = [NSData dataWithBytes: buf->content length: buf->use]; xmlBufferFree(buf); return data; } @end /* implementation AGENTRANKNS0GetSales */ /** * Internal, private interface for JAXB reading and writing. */ @interface AGENTRANKNS0GetSales (JAXB) @end /*interface AGENTRANKNS0GetSales (JAXB)*/ /** * Internal, private implementation for JAXB reading and writing. */ @implementation AGENTRANKNS0GetSales (JAXB) /** * Read an instance of AGENTRANKNS0GetSales from an XML reader. * * @param reader The reader. * @return An instance of AGENTRANKNS0GetSales defined by the XML reader. */ + (id) readXMLType: (xmlTextReaderPtr) reader { AGENTRANKNS0GetSales *_aGENTRANKNS0GetSales = [[AGENTRANKNS0GetSales alloc] init]; NS_DURING { [_aGENTRANKNS0GetSales initWithReader: reader]; } NS_HANDLER { _aGENTRANKNS0GetSales = nil; [localException raise]; } NS_ENDHANDLER [_aGENTRANKNS0GetSales autorelease]; return _aGENTRANKNS0GetSales; } /** * Initialize this instance of AGENTRANKNS0GetSales according to * the XML being read from the reader. * * @param reader The reader. */ - (id) initWithReader: (xmlTextReaderPtr) reader { return [super initWithReader: reader]; } /** * Write the XML for this instance of AGENTRANKNS0GetSales to the writer. * Note that since we're only writing the XML type, * No start/end element will be written. * * @param reader The reader. */ - (void) writeXMLType: (xmlTextWriterPtr) writer { [super writeXMLType:writer]; } /** * Reads a AGENTRANKNS0GetSales from an XML reader. The element to be read is * "response". * * @param reader The XML reader. * @return The AGENTRANKNS0GetSales. */ + (id) readXMLElement: (xmlTextReaderPtr) reader { int status; AGENTRANKNS0GetSales *_getSales = nil; if (xmlTextReaderNodeType(reader) != XML_READER_TYPE_ELEMENT) { status = xmlTextReaderAdvanceToNextStartOrEndElement(reader); if (status < 1) { [NSException raise: @"XMLReadError" format: @"Error advancing the reader to start element response."]; } } if (xmlStrcmp(BAD_CAST "response", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read root element {}response."); #endif _getSales = (AGENTRANKNS0GetSales *)[AGENTRANKNS0GetSales readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"Successfully read root element {}response."); #endif } else { if (xmlTextReaderConstNamespaceUri(reader) == NULL) { [NSException raise: @"XMLReadError" format: @"Unable to read AGENTRANKNS0GetSales. Expected element response. Current element: {}%s", xmlTextReaderConstLocalName(reader)]; } else { [NSException raise: @"XMLReadError" format: @"Unable to read AGENTRANKNS0GetSales. Expected element response. Current element: {%s}%s\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)]; } } return _getSales; } /** * Writes this AGENTRANKNS0GetSales to XML under element name "response". * The namespace declarations for the element will be written. * * @param writer The XML writer. * @param _getSales The GetSales to write. * @return 1 if successful, 0 otherwise. */ - (void) writeXMLElement: (xmlTextWriterPtr) writer { [self writeXMLElement: writer writeNamespaces: YES]; } /** * Writes this AGENTRANKNS0GetSales to an XML writer. * * @param writer The writer. * @param writeNs Whether to write the namespaces for this element to the xml writer. */ - (void) writeXMLElement: (xmlTextWriterPtr) writer writeNamespaces: (BOOL) writeNs { int rc = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "response", NULL); if (rc < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start element {}response. XML writer status: %i\n", rc]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing type {}getSales for root element {}response..."); #endif [self writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote type {}getSales for root element {}response..."); #endif rc = xmlTextWriterEndElement(writer); if (rc < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end element {}response. XML writer status: %i\n", rc]; } } //documentation inherited. - (BOOL) readJAXBAttribute: (xmlTextReaderPtr) reader { void *_child_accessor; if ([super readJAXBAttribute: reader]) { return YES; } return NO; } //documentation inherited. - (BOOL) readJAXBValue: (xmlTextReaderPtr) reader { return [super readJAXBValue: reader]; } //documentation inherited. - (BOOL) readJAXBChildElement: (xmlTextReaderPtr) reader { id __child; void *_child_accessor; int status, depth; if ([super readJAXBChildElement: reader]) { return YES; } if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "sales", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read choice {}sales of type {}sales."); #endif __child = [AGENTRANKNS0Sales readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read choice {}sales of type {}sales."); #endif [self setSales: __child]; return YES; } //end "if choice" if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "maps", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read choice {}maps of type {}images."); #endif __child = [AGENTRANKNS0Images readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read choice {}maps of type {}images."); #endif [self setMaps: __child]; return YES; } //end "if choice" if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "charts", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read choice {}charts of type {}images."); #endif __child = [AGENTRANKNS0Images readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read choice {}charts of type {}images."); #endif [self setCharts: __child]; return YES; } //end "if choice" if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "status", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read choice {}status of type {}status."); #endif __child = [AGENTRANKNS0Status readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read choice {}status of type {}status."); #endif [self setStatus: __child]; return YES; } //end "if choice" return NO; } //documentation inherited. - (int) readUnknownJAXBChildElement: (xmlTextReaderPtr) reader { return [super readUnknownJAXBChildElement: reader]; } //documentation inherited. - (void) readUnknownJAXBAttribute: (xmlTextReaderPtr) reader { [super readUnknownJAXBAttribute: reader]; } //documentation inherited. - (void) writeJAXBAttributes: (xmlTextWriterPtr) writer { int status; [super writeJAXBAttributes: writer]; } //documentation inherited. - (void) writeJAXBValue: (xmlTextWriterPtr) writer { [super writeJAXBValue: writer]; } /** * Method for writing the child elements. * * @param writer The writer. */ - (void) writeJAXBChildElements: (xmlTextWriterPtr) writer { int status; id __item; NSEnumerator *__enumerator; [super writeJAXBChildElements: writer]; if ([self sales]) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "sales", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start child element {}sales."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing element {}sales..."); #endif [[self sales] writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote element {}sales..."); #endif status = xmlTextWriterEndElement(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end child element {}sales."]; } } if ([self maps]) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "maps", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start child element {}maps."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing element {}maps..."); #endif [[self maps] writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote element {}maps..."); #endif status = xmlTextWriterEndElement(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end child element {}maps."]; } } if ([self charts]) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "charts", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start child element {}charts."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing element {}charts..."); #endif [[self charts] writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote element {}charts..."); #endif status = xmlTextWriterEndElement(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end child element {}charts."]; } } if ([self status]) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "status", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start child element {}status."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing element {}status..."); #endif [[self status] writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote element {}status..."); #endif status = xmlTextWriterEndElement(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end child element {}status."]; } } } @end /* implementation AGENTRANKNS0GetSales (JAXB) */ #endif /* DEF_AGENTRANKNS0GetSales_M */ #ifndef DEF_AGENTRANKNS0PostFlag_M #define DEF_AGENTRANKNS0PostFlag_M /** * User: marc Date: Oct 1, 2009 Time: 5:26:25 AM

THIS SOFTWARE IS COPYRIGHTED. THE SOFTWARE MAY NOT BE COPIED REPRODUCED, TRANSLATED, OR REDUCED TO ANY ELECTRONIC MEDIUM OR MACHINE READABLE FORM WITHOUT THE PRIOR WRITTEN CONSENT OF SOCO TECHNOLOGIES. */ @implementation AGENTRANKNS0PostFlag /** * status */ - (AGENTRANKNS0Status *) status { return _status; } /** * status */ - (void) setStatus: (AGENTRANKNS0Status *) newStatus { [newStatus retain]; [_status release]; _status = newStatus; } - (void) dealloc { [self setStatus: nil]; [super dealloc]; } //documentation inherited. + (id) readFromXML: (NSData *) xml { AGENTRANKNS0PostFlag *_aGENTRANKNS0PostFlag; xmlTextReaderPtr reader = xmlReaderForMemory([xml bytes], [xml length], NULL, NULL, 0); if (reader == NULL) { [NSException raise: @"XMLReadError" format: @"Error instantiating an XML reader."]; return nil; } _aGENTRANKNS0PostFlag = (AGENTRANKNS0PostFlag *) [AGENTRANKNS0PostFlag readXMLElement: reader]; xmlFreeTextReader(reader); //free the reader return _aGENTRANKNS0PostFlag; } //documentation inherited. - (NSData *) writeToXML { xmlBufferPtr buf; xmlTextWriterPtr writer; int rc; NSData *data; buf = xmlBufferCreate(); if (buf == NULL) { [NSException raise: @"XMLWriteError" format: @"Error creating an XML buffer."]; return nil; } writer = xmlNewTextWriterMemory(buf, 0); if (writer == NULL) { xmlBufferFree(buf); [NSException raise: @"XMLWriteError" format: @"Error creating an XML writer."]; return nil; } rc = xmlTextWriterStartDocument(writer, NULL, "utf-8", NULL); if (rc < 0) { xmlFreeTextWriter(writer); xmlBufferFree(buf); [NSException raise: @"XMLWriteError" format: @"Error writing XML start document."]; return nil; } NS_DURING { [self writeXMLElement: writer]; } NS_HANDLER { xmlFreeTextWriter(writer); xmlBufferFree(buf); [localException raise]; } NS_ENDHANDLER rc = xmlTextWriterEndDocument(writer); if (rc < 0) { xmlFreeTextWriter(writer); xmlBufferFree(buf); [NSException raise: @"XMLWriteError" format: @"Error writing XML end document."]; return nil; } xmlFreeTextWriter(writer); data = [NSData dataWithBytes: buf->content length: buf->use]; xmlBufferFree(buf); return data; } @end /* implementation AGENTRANKNS0PostFlag */ /** * Internal, private interface for JAXB reading and writing. */ @interface AGENTRANKNS0PostFlag (JAXB) @end /*interface AGENTRANKNS0PostFlag (JAXB)*/ /** * Internal, private implementation for JAXB reading and writing. */ @implementation AGENTRANKNS0PostFlag (JAXB) /** * Read an instance of AGENTRANKNS0PostFlag from an XML reader. * * @param reader The reader. * @return An instance of AGENTRANKNS0PostFlag defined by the XML reader. */ + (id) readXMLType: (xmlTextReaderPtr) reader { AGENTRANKNS0PostFlag *_aGENTRANKNS0PostFlag = [[AGENTRANKNS0PostFlag alloc] init]; NS_DURING { [_aGENTRANKNS0PostFlag initWithReader: reader]; } NS_HANDLER { _aGENTRANKNS0PostFlag = nil; [localException raise]; } NS_ENDHANDLER [_aGENTRANKNS0PostFlag autorelease]; return _aGENTRANKNS0PostFlag; } /** * Initialize this instance of AGENTRANKNS0PostFlag according to * the XML being read from the reader. * * @param reader The reader. */ - (id) initWithReader: (xmlTextReaderPtr) reader { return [super initWithReader: reader]; } /** * Write the XML for this instance of AGENTRANKNS0PostFlag to the writer. * Note that since we're only writing the XML type, * No start/end element will be written. * * @param reader The reader. */ - (void) writeXMLType: (xmlTextWriterPtr) writer { [super writeXMLType:writer]; } /** * Reads a AGENTRANKNS0PostFlag from an XML reader. The element to be read is * "response". * * @param reader The XML reader. * @return The AGENTRANKNS0PostFlag. */ + (id) readXMLElement: (xmlTextReaderPtr) reader { int status; AGENTRANKNS0PostFlag *_postFlag = nil; if (xmlTextReaderNodeType(reader) != XML_READER_TYPE_ELEMENT) { status = xmlTextReaderAdvanceToNextStartOrEndElement(reader); if (status < 1) { [NSException raise: @"XMLReadError" format: @"Error advancing the reader to start element response."]; } } if (xmlStrcmp(BAD_CAST "response", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read root element {}response."); #endif _postFlag = (AGENTRANKNS0PostFlag *)[AGENTRANKNS0PostFlag readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"Successfully read root element {}response."); #endif } else { if (xmlTextReaderConstNamespaceUri(reader) == NULL) { [NSException raise: @"XMLReadError" format: @"Unable to read AGENTRANKNS0PostFlag. Expected element response. Current element: {}%s", xmlTextReaderConstLocalName(reader)]; } else { [NSException raise: @"XMLReadError" format: @"Unable to read AGENTRANKNS0PostFlag. Expected element response. Current element: {%s}%s\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)]; } } return _postFlag; } /** * Writes this AGENTRANKNS0PostFlag to XML under element name "response". * The namespace declarations for the element will be written. * * @param writer The XML writer. * @param _postFlag The PostFlag to write. * @return 1 if successful, 0 otherwise. */ - (void) writeXMLElement: (xmlTextWriterPtr) writer { [self writeXMLElement: writer writeNamespaces: YES]; } /** * Writes this AGENTRANKNS0PostFlag to an XML writer. * * @param writer The writer. * @param writeNs Whether to write the namespaces for this element to the xml writer. */ - (void) writeXMLElement: (xmlTextWriterPtr) writer writeNamespaces: (BOOL) writeNs { int rc = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "response", NULL); if (rc < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start element {}response. XML writer status: %i\n", rc]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing type {}postFlag for root element {}response..."); #endif [self writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote type {}postFlag for root element {}response..."); #endif rc = xmlTextWriterEndElement(writer); if (rc < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end element {}response. XML writer status: %i\n", rc]; } } //documentation inherited. - (BOOL) readJAXBAttribute: (xmlTextReaderPtr) reader { void *_child_accessor; if ([super readJAXBAttribute: reader]) { return YES; } return NO; } //documentation inherited. - (BOOL) readJAXBValue: (xmlTextReaderPtr) reader { return [super readJAXBValue: reader]; } //documentation inherited. - (BOOL) readJAXBChildElement: (xmlTextReaderPtr) reader { id __child; void *_child_accessor; int status, depth; if ([super readJAXBChildElement: reader]) { return YES; } if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "status", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read choice {}status of type {}status."); #endif __child = [AGENTRANKNS0Status readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read choice {}status of type {}status."); #endif [self setStatus: __child]; return YES; } //end "if choice" return NO; } //documentation inherited. - (int) readUnknownJAXBChildElement: (xmlTextReaderPtr) reader { return [super readUnknownJAXBChildElement: reader]; } //documentation inherited. - (void) readUnknownJAXBAttribute: (xmlTextReaderPtr) reader { [super readUnknownJAXBAttribute: reader]; } //documentation inherited. - (void) writeJAXBAttributes: (xmlTextWriterPtr) writer { int status; [super writeJAXBAttributes: writer]; } //documentation inherited. - (void) writeJAXBValue: (xmlTextWriterPtr) writer { [super writeJAXBValue: writer]; } /** * Method for writing the child elements. * * @param writer The writer. */ - (void) writeJAXBChildElements: (xmlTextWriterPtr) writer { int status; id __item; NSEnumerator *__enumerator; [super writeJAXBChildElements: writer]; if ([self status]) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "status", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start child element {}status."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing element {}status..."); #endif [[self status] writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote element {}status..."); #endif status = xmlTextWriterEndElement(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end child element {}status."]; } } } @end /* implementation AGENTRANKNS0PostFlag (JAXB) */ #endif /* DEF_AGENTRANKNS0PostFlag_M */ #ifndef DEF_AGENTRANKNS0Profile_M #define DEF_AGENTRANKNS0Profile_M /** * User: marc Date: Mar 4, 2008 Time: 6:15:00 AM

THIS SOFTWARE IS COPYRIGHTED. THE SOFTWARE MAY NOT BE COPIED REPRODUCED, TRANSLATED, OR REDUCED TO ANY ELECTRONIC MEDIUM OR MACHINE READABLE FORM WITHOUT THE PRIOR WRITTEN CONSENT OF SOCO TECHNOLOGIES. */ @implementation AGENTRANKNS0Profile /** * (no documentation provided) */ - (int *) identifier { return _identifier; } /** * (no documentation provided) */ - (void) setIdentifier: (int *) newIdentifier { if (_identifier != NULL) { free(_identifier); } _identifier = newIdentifier; } /** * (no documentation provided) */ - (NSString *) username { return _username; } /** * (no documentation provided) */ - (void) setUsername: (NSString *) newUsername { [newUsername retain]; [_username release]; _username = newUsername; } /** * (no documentation provided) */ - (BOOL) activated { return _activated; } /** * (no documentation provided) */ - (void) setActivated: (BOOL) newActivated { _activated = newActivated; } /** * link */ - (AGENTRANKNS0Link *) link { return _link; } /** * link */ - (void) setLink: (AGENTRANKNS0Link *) newLink { [newLink retain]; [_link release]; _link = newLink; } /** * (no documentation provided) */ - (AGENTRANKNS0Image *) photo { return _photo; } /** * (no documentation provided) */ - (void) setPhoto: (AGENTRANKNS0Image *) newPhoto { [newPhoto retain]; [_photo release]; _photo = newPhoto; } /** * (no documentation provided) */ - (AGENTRANKNS0Slugs *) slugs { return _slugs; } /** * (no documentation provided) */ - (void) setSlugs: (AGENTRANKNS0Slugs *) newSlugs { [newSlugs retain]; [_slugs release]; _slugs = newSlugs; } /** * (no documentation provided) */ - (NSString *) title { return _title; } /** * (no documentation provided) */ - (void) setTitle: (NSString *) newTitle { [newTitle retain]; [_title release]; _title = newTitle; } /** * (no documentation provided) */ - (NSString *) full_name { return _full_name; } /** * (no documentation provided) */ - (void) setFull_name: (NSString *) newFull_name { [newFull_name retain]; [_full_name release]; _full_name = newFull_name; } /** * (no documentation provided) */ - (NSString *) description { return _description; } /** * (no documentation provided) */ - (void) setDescription: (NSString *) newDescription { [newDescription retain]; [_description release]; _description = newDescription; } /** * (no documentation provided) */ - (int *) rank { return _rank; } /** * (no documentation provided) */ - (void) setRank: (int *) newRank { if (_rank != NULL) { free(_rank); } _rank = newRank; } /** * (no documentation provided) */ - (int *) sales { return _sales; } /** * (no documentation provided) */ - (void) setSales: (int *) newSales { if (_sales != NULL) { free(_sales); } _sales = newSales; } /** * (no documentation provided) */ - (int *) reviews { return _reviews; } /** * (no documentation provided) */ - (void) setReviews: (int *) newReviews { if (_reviews != NULL) { free(_reviews); } _reviews = newReviews; } /** * (no documentation provided) */ - (int *) forecasts { return _forecasts; } /** * (no documentation provided) */ - (void) setForecasts: (int *) newForecasts { if (_forecasts != NULL) { free(_forecasts); } _forecasts = newForecasts; } /** * (no documentation provided) */ - (NSDecimalNumber *) experience { return _experience; } /** * (no documentation provided) */ - (void) setExperience: (NSDecimalNumber *) newExperience { [newExperience retain]; [_experience release]; _experience = newExperience; } - (void) dealloc { [self setIdentifier: NULL]; [self setUsername: nil]; [self setLink: nil]; [self setPhoto: nil]; [self setSlugs: nil]; [self setTitle: nil]; [self setFull_name: nil]; [self setDescription: nil]; [self setRank: NULL]; [self setSales: NULL]; [self setReviews: NULL]; [self setForecasts: NULL]; [self setExperience: nil]; [super dealloc]; } //documentation inherited. + (id) readFromXML: (NSData *) xml { AGENTRANKNS0Profile *_aGENTRANKNS0Profile; xmlTextReaderPtr reader = xmlReaderForMemory([xml bytes], [xml length], NULL, NULL, 0); if (reader == NULL) { [NSException raise: @"XMLReadError" format: @"Error instantiating an XML reader."]; return nil; } _aGENTRANKNS0Profile = (AGENTRANKNS0Profile *) [AGENTRANKNS0Profile readXMLElement: reader]; xmlFreeTextReader(reader); //free the reader return _aGENTRANKNS0Profile; } //documentation inherited. - (NSData *) writeToXML { xmlBufferPtr buf; xmlTextWriterPtr writer; int rc; NSData *data; buf = xmlBufferCreate(); if (buf == NULL) { [NSException raise: @"XMLWriteError" format: @"Error creating an XML buffer."]; return nil; } writer = xmlNewTextWriterMemory(buf, 0); if (writer == NULL) { xmlBufferFree(buf); [NSException raise: @"XMLWriteError" format: @"Error creating an XML writer."]; return nil; } rc = xmlTextWriterStartDocument(writer, NULL, "utf-8", NULL); if (rc < 0) { xmlFreeTextWriter(writer); xmlBufferFree(buf); [NSException raise: @"XMLWriteError" format: @"Error writing XML start document."]; return nil; } NS_DURING { [self writeXMLElement: writer]; } NS_HANDLER { xmlFreeTextWriter(writer); xmlBufferFree(buf); [localException raise]; } NS_ENDHANDLER rc = xmlTextWriterEndDocument(writer); if (rc < 0) { xmlFreeTextWriter(writer); xmlBufferFree(buf); [NSException raise: @"XMLWriteError" format: @"Error writing XML end document."]; return nil; } xmlFreeTextWriter(writer); data = [NSData dataWithBytes: buf->content length: buf->use]; xmlBufferFree(buf); return data; } @end /* implementation AGENTRANKNS0Profile */ /** * Internal, private interface for JAXB reading and writing. */ @interface AGENTRANKNS0Profile (JAXB) @end /*interface AGENTRANKNS0Profile (JAXB)*/ /** * Internal, private implementation for JAXB reading and writing. */ @implementation AGENTRANKNS0Profile (JAXB) /** * Read an instance of AGENTRANKNS0Profile from an XML reader. * * @param reader The reader. * @return An instance of AGENTRANKNS0Profile defined by the XML reader. */ + (id) readXMLType: (xmlTextReaderPtr) reader { AGENTRANKNS0Profile *_aGENTRANKNS0Profile = [[AGENTRANKNS0Profile alloc] init]; NS_DURING { [_aGENTRANKNS0Profile initWithReader: reader]; } NS_HANDLER { _aGENTRANKNS0Profile = nil; [localException raise]; } NS_ENDHANDLER [_aGENTRANKNS0Profile autorelease]; return _aGENTRANKNS0Profile; } /** * Initialize this instance of AGENTRANKNS0Profile according to * the XML being read from the reader. * * @param reader The reader. */ - (id) initWithReader: (xmlTextReaderPtr) reader { return [super initWithReader: reader]; } /** * Write the XML for this instance of AGENTRANKNS0Profile to the writer. * Note that since we're only writing the XML type, * No start/end element will be written. * * @param reader The reader. */ - (void) writeXMLType: (xmlTextWriterPtr) writer { [super writeXMLType:writer]; } /** * Reads a AGENTRANKNS0Profile from an XML reader. The element to be read is * "profile". * * @param reader The XML reader. * @return The AGENTRANKNS0Profile. */ + (id) readXMLElement: (xmlTextReaderPtr) reader { int status; AGENTRANKNS0Profile *_profile = nil; if (xmlTextReaderNodeType(reader) != XML_READER_TYPE_ELEMENT) { status = xmlTextReaderAdvanceToNextStartOrEndElement(reader); if (status < 1) { [NSException raise: @"XMLReadError" format: @"Error advancing the reader to start element profile."]; } } if (xmlStrcmp(BAD_CAST "profile", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read root element {}profile."); #endif _profile = (AGENTRANKNS0Profile *)[AGENTRANKNS0Profile readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"Successfully read root element {}profile."); #endif } else { if (xmlTextReaderConstNamespaceUri(reader) == NULL) { [NSException raise: @"XMLReadError" format: @"Unable to read AGENTRANKNS0Profile. Expected element profile. Current element: {}%s", xmlTextReaderConstLocalName(reader)]; } else { [NSException raise: @"XMLReadError" format: @"Unable to read AGENTRANKNS0Profile. Expected element profile. Current element: {%s}%s\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)]; } } return _profile; } /** * Writes this AGENTRANKNS0Profile to XML under element name "profile". * The namespace declarations for the element will be written. * * @param writer The XML writer. * @param _profile The Profile to write. * @return 1 if successful, 0 otherwise. */ - (void) writeXMLElement: (xmlTextWriterPtr) writer { [self writeXMLElement: writer writeNamespaces: YES]; } /** * Writes this AGENTRANKNS0Profile to an XML writer. * * @param writer The writer. * @param writeNs Whether to write the namespaces for this element to the xml writer. */ - (void) writeXMLElement: (xmlTextWriterPtr) writer writeNamespaces: (BOOL) writeNs { int rc = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "profile", NULL); if (rc < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start element {}profile. XML writer status: %i\n", rc]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing type {}profile for root element {}profile..."); #endif [self writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote type {}profile for root element {}profile..."); #endif rc = xmlTextWriterEndElement(writer); if (rc < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end element {}profile. XML writer status: %i\n", rc]; } } //documentation inherited. - (BOOL) readJAXBAttribute: (xmlTextReaderPtr) reader { void *_child_accessor; if ([super readJAXBAttribute: reader]) { return YES; } if ((xmlStrcmp(BAD_CAST "id", xmlTextReaderConstLocalName(reader)) == 0) && (xmlTextReaderConstNamespaceUri(reader) == NULL)) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read attribute {}id..."); #endif _child_accessor = xmlTextReaderReadIntType(reader); if (_child_accessor == NULL) { //panic: unable to read the attribute value for some reason. [NSException raise: @"XMLReadError" format: @"Error reading attribute {}id."]; } [self setIdentifier: ((int*) _child_accessor)]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read attribute {}id..."); #endif return YES; } if ((xmlStrcmp(BAD_CAST "username", xmlTextReaderConstLocalName(reader)) == 0) && (xmlTextReaderConstNamespaceUri(reader) == NULL)) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read attribute {}username..."); #endif [self setUsername: (NSString*) [NSString readXMLType: reader]]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read attribute {}username..."); #endif return YES; } if ((xmlStrcmp(BAD_CAST "activated", xmlTextReaderConstLocalName(reader)) == 0) && (xmlTextReaderConstNamespaceUri(reader) == NULL)) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read attribute {}activated..."); #endif _child_accessor = xmlTextReaderReadBooleanType(reader); if (_child_accessor == NULL) { //panic: unable to read the attribute value for some reason. [NSException raise: @"XMLReadError" format: @"Error reading attribute {}activated."]; } [self setActivated: *((BOOL*) _child_accessor)]; free(_child_accessor); #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read attribute {}activated..."); #endif return YES; } return NO; } //documentation inherited. - (BOOL) readJAXBValue: (xmlTextReaderPtr) reader { return [super readJAXBValue: reader]; } //documentation inherited. - (BOOL) readJAXBChildElement: (xmlTextReaderPtr) reader { id __child; void *_child_accessor; int status, depth; if ([super readJAXBChildElement: reader]) { return YES; } if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "link", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read choice {}link of type {}link."); #endif __child = [AGENTRANKNS0Link readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read choice {}link of type {}link."); #endif [self setLink: __child]; return YES; } //end "if choice" if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "photo", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read choice {}photo of type {}image."); #endif __child = [AGENTRANKNS0Image readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read choice {}photo of type {}image."); #endif [self setPhoto: __child]; return YES; } //end "if choice" if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "slugs", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read choice {}slugs of type {}slugs."); #endif __child = [AGENTRANKNS0Slugs readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read choice {}slugs of type {}slugs."); #endif [self setSlugs: __child]; return YES; } //end "if choice" if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "title", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read choice {}title of type {http://www.w3.org/2001/XMLSchema}string."); #endif __child = [NSString readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read choice {}title of type {http://www.w3.org/2001/XMLSchema}string."); #endif [self setTitle: __child]; return YES; } //end "if choice" if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "full_name", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read choice {}full_name of type {http://www.w3.org/2001/XMLSchema}string."); #endif __child = [NSString readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read choice {}full_name of type {http://www.w3.org/2001/XMLSchema}string."); #endif [self setFull_name: __child]; return YES; } //end "if choice" if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "description", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read choice {}description of type {http://www.w3.org/2001/XMLSchema}string."); #endif __child = [NSString readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read choice {}description of type {http://www.w3.org/2001/XMLSchema}string."); #endif [self setDescription: __child]; return YES; } //end "if choice" if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "rank", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { _child_accessor = xmlTextReaderReadIntType(reader); if (_child_accessor == NULL) { //panic: unable to return the value for some reason. [NSException raise: @"XMLReadError" format: @"Error reading element value."]; } [self setRank: ((int*) _child_accessor)]; return YES; } if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "sales", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { _child_accessor = xmlTextReaderReadIntType(reader); if (_child_accessor == NULL) { //panic: unable to return the value for some reason. [NSException raise: @"XMLReadError" format: @"Error reading element value."]; } [self setSales: ((int*) _child_accessor)]; return YES; } if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "reviews", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { _child_accessor = xmlTextReaderReadIntType(reader); if (_child_accessor == NULL) { //panic: unable to return the value for some reason. [NSException raise: @"XMLReadError" format: @"Error reading element value."]; } [self setReviews: ((int*) _child_accessor)]; return YES; } if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "forecasts", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { _child_accessor = xmlTextReaderReadIntType(reader); if (_child_accessor == NULL) { //panic: unable to return the value for some reason. [NSException raise: @"XMLReadError" format: @"Error reading element value."]; } [self setForecasts: ((int*) _child_accessor)]; return YES; } if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "experience", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read choice {}experience of type {http://www.w3.org/2001/XMLSchema}decimal."); #endif __child = [NSDecimalNumber readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read choice {}experience of type {http://www.w3.org/2001/XMLSchema}decimal."); #endif [self setExperience: __child]; return YES; } //end "if choice" return NO; } //documentation inherited. - (int) readUnknownJAXBChildElement: (xmlTextReaderPtr) reader { return [super readUnknownJAXBChildElement: reader]; } //documentation inherited. - (void) readUnknownJAXBAttribute: (xmlTextReaderPtr) reader { [super readUnknownJAXBAttribute: reader]; } //documentation inherited. - (void) writeJAXBAttributes: (xmlTextWriterPtr) writer { int status; [super writeJAXBAttributes: writer]; if ([self identifier] != NULL) { status = xmlTextWriterStartAttributeNS(writer, NULL, BAD_CAST "id", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start attribute {}id."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing attribute {}id..."); #endif status = xmlTextWriterWriteIntType(writer, [self identifier]); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing attribute {}id."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote attribute {}id..."); #endif status = xmlTextWriterEndAttribute(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end attribute {}id."]; } } if ([self username]) { status = xmlTextWriterStartAttributeNS(writer, NULL, BAD_CAST "username", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start attribute {}username."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing attribute {}username..."); #endif [[self username] writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote attribute {}username..."); #endif status = xmlTextWriterEndAttribute(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end attribute {}username."]; } } if (YES) { //always write the primitive attributes... status = xmlTextWriterStartAttributeNS(writer, NULL, BAD_CAST "activated", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start attribute {}activated."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing attribute {}activated..."); #endif status = xmlTextWriterWriteBooleanType(writer, &_activated); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing attribute {}activated."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote attribute {}activated..."); #endif status = xmlTextWriterEndAttribute(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end attribute {}activated."]; } } } //documentation inherited. - (void) writeJAXBValue: (xmlTextWriterPtr) writer { [super writeJAXBValue: writer]; } /** * Method for writing the child elements. * * @param writer The writer. */ - (void) writeJAXBChildElements: (xmlTextWriterPtr) writer { int status; id __item; NSEnumerator *__enumerator; [super writeJAXBChildElements: writer]; if ([self link]) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "link", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start child element {}link."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing element {}link..."); #endif [[self link] writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote element {}link..."); #endif status = xmlTextWriterEndElement(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end child element {}link."]; } } if ([self photo]) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "photo", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start child element {}photo."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing element {}photo..."); #endif [[self photo] writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote element {}photo..."); #endif status = xmlTextWriterEndElement(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end child element {}photo."]; } } if ([self slugs]) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "slugs", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start child element {}slugs."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing element {}slugs..."); #endif [[self slugs] writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote element {}slugs..."); #endif status = xmlTextWriterEndElement(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end child element {}slugs."]; } } if ([self title]) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "title", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start child element {}title."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing element {}title..."); #endif [[self title] writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote element {}title..."); #endif status = xmlTextWriterEndElement(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end child element {}title."]; } } if ([self full_name]) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "full_name", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start child element {}full_name."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing element {}full_name..."); #endif [[self full_name] writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote element {}full_name..."); #endif status = xmlTextWriterEndElement(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end child element {}full_name."]; } } if ([self description]) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "description", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start child element {}description."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing element {}description..."); #endif [[self description] writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote element {}description..."); #endif status = xmlTextWriterEndElement(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end child element {}description."]; } } if ([self rank] != NULL) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "rank", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start child element {}rank."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing element {}rank..."); #endif status = xmlTextWriterWriteIntType(writer, [self rank]); #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote element {}rank..."); #endif if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing child element {}rank."]; } status = xmlTextWriterEndElement(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end child element {}rank."]; } } if ([self sales] != NULL) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "sales", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start child element {}sales."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing element {}sales..."); #endif status = xmlTextWriterWriteIntType(writer, [self sales]); #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote element {}sales..."); #endif if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing child element {}sales."]; } status = xmlTextWriterEndElement(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end child element {}sales."]; } } if ([self reviews] != NULL) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "reviews", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start child element {}reviews."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing element {}reviews..."); #endif status = xmlTextWriterWriteIntType(writer, [self reviews]); #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote element {}reviews..."); #endif if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing child element {}reviews."]; } status = xmlTextWriterEndElement(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end child element {}reviews."]; } } if ([self forecasts] != NULL) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "forecasts", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start child element {}forecasts."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing element {}forecasts..."); #endif status = xmlTextWriterWriteIntType(writer, [self forecasts]); #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote element {}forecasts..."); #endif if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing child element {}forecasts."]; } status = xmlTextWriterEndElement(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end child element {}forecasts."]; } } if ([self experience]) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "experience", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start child element {}experience."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing element {}experience..."); #endif [[self experience] writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote element {}experience..."); #endif status = xmlTextWriterEndElement(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end child element {}experience."]; } } } @end /* implementation AGENTRANKNS0Profile (JAXB) */ #endif /* DEF_AGENTRANKNS0Profile_M */ #ifndef DEF_AGENTRANKNS0Sale_M #define DEF_AGENTRANKNS0Sale_M /** * User: marc Date: Mar 4, 2008 Time: 6:15:00 AM

THIS SOFTWARE IS COPYRIGHTED. THE SOFTWARE MAY NOT BE COPIED REPRODUCED, TRANSLATED, OR REDUCED TO ANY ELECTRONIC MEDIUM OR MACHINE READABLE FORM WITHOUT THE PRIOR WRITTEN CONSENT OF SOCO TECHNOLOGIES. */ @implementation AGENTRANKNS0Sale /** * (no documentation provided) */ - (int *) identifier { return _identifier; } /** * (no documentation provided) */ - (void) setIdentifier: (int *) newIdentifier { if (_identifier != NULL) { free(_identifier); } _identifier = newIdentifier; } /** * (no documentation provided) */ - (NSDecimalNumber *) longitude { return _longitude; } /** * (no documentation provided) */ - (void) setLongitude: (NSDecimalNumber *) newLongitude { [newLongitude retain]; [_longitude release]; _longitude = newLongitude; } /** * (no documentation provided) */ - (NSDecimalNumber *) latitude { return _latitude; } /** * (no documentation provided) */ - (void) setLatitude: (NSDecimalNumber *) newLatitude { [newLatitude retain]; [_latitude release]; _latitude = newLatitude; } /** * (no documentation provided) */ - (NSString *) key { return _key; } /** * (no documentation provided) */ - (void) setKey: (NSString *) newKey { [newKey retain]; [_key release]; _key = newKey; } /** * link */ - (AGENTRANKNS0Link *) link { return _link; } /** * link */ - (void) setLink: (AGENTRANKNS0Link *) newLink { [newLink retain]; [_link release]; _link = newLink; } /** * (no documentation provided) */ - (NSDate *) list_date { return _list_date; } /** * (no documentation provided) */ - (void) setList_date: (NSDate *) newList_date { [newList_date retain]; [_list_date release]; _list_date = newList_date; } /** * (no documentation provided) */ - (NSDate *) sold_date { return _sold_date; } /** * (no documentation provided) */ - (void) setSold_date: (NSDate *) newSold_date { [newSold_date retain]; [_sold_date release]; _sold_date = newSold_date; } /** * (no documentation provided) */ - (AGENTRANKNS0Slugs *) slugs { return _slugs; } /** * (no documentation provided) */ - (void) setSlugs: (AGENTRANKNS0Slugs *) newSlugs { [newSlugs retain]; [_slugs release]; _slugs = newSlugs; } /** * (no documentation provided) */ - (NSString *) zip { return _zip; } /** * (no documentation provided) */ - (void) setZip: (NSString *) newZip { [newZip retain]; [_zip release]; _zip = newZip; } /** * (no documentation provided) */ - (NSString *) city { return _city; } /** * (no documentation provided) */ - (void) setCity: (NSString *) newCity { [newCity retain]; [_city release]; _city = newCity; } /** * (no documentation provided) */ - (NSString *) state { return _state; } /** * (no documentation provided) */ - (void) setState: (NSString *) newState { [newState retain]; [_state release]; _state = newState; } /** * (no documentation provided) */ - (NSString *) title { return _title; } /** * (no documentation provided) */ - (void) setTitle: (NSString *) newTitle { [newTitle retain]; [_title release]; _title = newTitle; } /** * (no documentation provided) */ - (NSString *) address { return _address; } /** * (no documentation provided) */ - (void) setAddress: (NSString *) newAddress { [newAddress retain]; [_address release]; _address = newAddress; } /** * (no documentation provided) */ - (NSString *) precision { return _precision; } /** * (no documentation provided) */ - (void) setPrecision: (NSString *) newPrecision { [newPrecision retain]; [_precision release]; _precision = newPrecision; } /** * (no documentation provided) */ - (NSString *) property_type { return _property_type; } /** * (no documentation provided) */ - (void) setProperty_type: (NSString *) newProperty_type { [newProperty_type retain]; [_property_type release]; _property_type = newProperty_type; } /** * (no documentation provided) */ - (NSString *) transaction_side { return _transaction_side; } /** * (no documentation provided) */ - (void) setTransaction_side: (NSString *) newTransaction_side { [newTransaction_side retain]; [_transaction_side release]; _transaction_side = newTransaction_side; } /** * (no documentation provided) */ - (int *) market_days { return _market_days; } /** * (no documentation provided) */ - (void) setMarket_days: (int *) newMarket_days { if (_market_days != NULL) { free(_market_days); } _market_days = newMarket_days; } /** * (no documentation provided) */ - (NSDecimalNumber *) list_price_final { return _list_price_final; } /** * (no documentation provided) */ - (void) setList_price_final: (NSDecimalNumber *) newList_price_final { [newList_price_final retain]; [_list_price_final release]; _list_price_final = newList_price_final; } /** * (no documentation provided) */ - (NSDecimalNumber *) sale_price_final { return _sale_price_final; } /** * (no documentation provided) */ - (void) setSale_price_final: (NSDecimalNumber *) newSale_price_final { [newSale_price_final retain]; [_sale_price_final release]; _sale_price_final = newSale_price_final; } /** * (no documentation provided) */ - (NSDecimalNumber *) list_price_original { return _list_price_original; } /** * (no documentation provided) */ - (void) setList_price_original: (NSDecimalNumber *) newList_price_original { [newList_price_original retain]; [_list_price_original release]; _list_price_original = newList_price_original; } /** * (no documentation provided) */ - (NSDecimalNumber *) price_per_size_unit { return _price_per_size_unit; } /** * (no documentation provided) */ - (void) setPrice_per_size_unit: (NSDecimalNumber *) newPrice_per_size_unit { [newPrice_per_size_unit retain]; [_price_per_size_unit release]; _price_per_size_unit = newPrice_per_size_unit; } - (void) dealloc { [self setIdentifier: NULL]; [self setLongitude: nil]; [self setLatitude: nil]; [self setKey: nil]; [self setLink: nil]; [self setList_date: nil]; [self setSold_date: nil]; [self setSlugs: nil]; [self setZip: nil]; [self setCity: nil]; [self setState: nil]; [self setTitle: nil]; [self setAddress: nil]; [self setPrecision: nil]; [self setProperty_type: nil]; [self setTransaction_side: nil]; [self setMarket_days: NULL]; [self setList_price_final: nil]; [self setSale_price_final: nil]; [self setList_price_original: nil]; [self setPrice_per_size_unit: nil]; [super dealloc]; } //documentation inherited. + (id) readFromXML: (NSData *) xml { AGENTRANKNS0Sale *_aGENTRANKNS0Sale; xmlTextReaderPtr reader = xmlReaderForMemory([xml bytes], [xml length], NULL, NULL, 0); if (reader == NULL) { [NSException raise: @"XMLReadError" format: @"Error instantiating an XML reader."]; return nil; } _aGENTRANKNS0Sale = (AGENTRANKNS0Sale *) [AGENTRANKNS0Sale readXMLElement: reader]; xmlFreeTextReader(reader); //free the reader return _aGENTRANKNS0Sale; } //documentation inherited. - (NSData *) writeToXML { xmlBufferPtr buf; xmlTextWriterPtr writer; int rc; NSData *data; buf = xmlBufferCreate(); if (buf == NULL) { [NSException raise: @"XMLWriteError" format: @"Error creating an XML buffer."]; return nil; } writer = xmlNewTextWriterMemory(buf, 0); if (writer == NULL) { xmlBufferFree(buf); [NSException raise: @"XMLWriteError" format: @"Error creating an XML writer."]; return nil; } rc = xmlTextWriterStartDocument(writer, NULL, "utf-8", NULL); if (rc < 0) { xmlFreeTextWriter(writer); xmlBufferFree(buf); [NSException raise: @"XMLWriteError" format: @"Error writing XML start document."]; return nil; } NS_DURING { [self writeXMLElement: writer]; } NS_HANDLER { xmlFreeTextWriter(writer); xmlBufferFree(buf); [localException raise]; } NS_ENDHANDLER rc = xmlTextWriterEndDocument(writer); if (rc < 0) { xmlFreeTextWriter(writer); xmlBufferFree(buf); [NSException raise: @"XMLWriteError" format: @"Error writing XML end document."]; return nil; } xmlFreeTextWriter(writer); data = [NSData dataWithBytes: buf->content length: buf->use]; xmlBufferFree(buf); return data; } @end /* implementation AGENTRANKNS0Sale */ /** * Internal, private interface for JAXB reading and writing. */ @interface AGENTRANKNS0Sale (JAXB) @end /*interface AGENTRANKNS0Sale (JAXB)*/ /** * Internal, private implementation for JAXB reading and writing. */ @implementation AGENTRANKNS0Sale (JAXB) /** * Read an instance of AGENTRANKNS0Sale from an XML reader. * * @param reader The reader. * @return An instance of AGENTRANKNS0Sale defined by the XML reader. */ + (id) readXMLType: (xmlTextReaderPtr) reader { AGENTRANKNS0Sale *_aGENTRANKNS0Sale = [[AGENTRANKNS0Sale alloc] init]; NS_DURING { [_aGENTRANKNS0Sale initWithReader: reader]; } NS_HANDLER { _aGENTRANKNS0Sale = nil; [localException raise]; } NS_ENDHANDLER [_aGENTRANKNS0Sale autorelease]; return _aGENTRANKNS0Sale; } /** * Initialize this instance of AGENTRANKNS0Sale according to * the XML being read from the reader. * * @param reader The reader. */ - (id) initWithReader: (xmlTextReaderPtr) reader { return [super initWithReader: reader]; } /** * Write the XML for this instance of AGENTRANKNS0Sale to the writer. * Note that since we're only writing the XML type, * No start/end element will be written. * * @param reader The reader. */ - (void) writeXMLType: (xmlTextWriterPtr) writer { [super writeXMLType:writer]; } /** * Reads a AGENTRANKNS0Sale from an XML reader. The element to be read is * "sale". * * @param reader The XML reader. * @return The AGENTRANKNS0Sale. */ + (id) readXMLElement: (xmlTextReaderPtr) reader { int status; AGENTRANKNS0Sale *_sale = nil; if (xmlTextReaderNodeType(reader) != XML_READER_TYPE_ELEMENT) { status = xmlTextReaderAdvanceToNextStartOrEndElement(reader); if (status < 1) { [NSException raise: @"XMLReadError" format: @"Error advancing the reader to start element sale."]; } } if (xmlStrcmp(BAD_CAST "sale", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read root element {}sale."); #endif _sale = (AGENTRANKNS0Sale *)[AGENTRANKNS0Sale readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"Successfully read root element {}sale."); #endif } else { if (xmlTextReaderConstNamespaceUri(reader) == NULL) { [NSException raise: @"XMLReadError" format: @"Unable to read AGENTRANKNS0Sale. Expected element sale. Current element: {}%s", xmlTextReaderConstLocalName(reader)]; } else { [NSException raise: @"XMLReadError" format: @"Unable to read AGENTRANKNS0Sale. Expected element sale. Current element: {%s}%s\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)]; } } return _sale; } /** * Writes this AGENTRANKNS0Sale to XML under element name "sale". * The namespace declarations for the element will be written. * * @param writer The XML writer. * @param _sale The Sale to write. * @return 1 if successful, 0 otherwise. */ - (void) writeXMLElement: (xmlTextWriterPtr) writer { [self writeXMLElement: writer writeNamespaces: YES]; } /** * Writes this AGENTRANKNS0Sale to an XML writer. * * @param writer The writer. * @param writeNs Whether to write the namespaces for this element to the xml writer. */ - (void) writeXMLElement: (xmlTextWriterPtr) writer writeNamespaces: (BOOL) writeNs { int rc = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "sale", NULL); if (rc < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start element {}sale. XML writer status: %i\n", rc]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing type {}sale for root element {}sale..."); #endif [self writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote type {}sale for root element {}sale..."); #endif rc = xmlTextWriterEndElement(writer); if (rc < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end element {}sale. XML writer status: %i\n", rc]; } } //documentation inherited. - (BOOL) readJAXBAttribute: (xmlTextReaderPtr) reader { void *_child_accessor; if ([super readJAXBAttribute: reader]) { return YES; } if ((xmlStrcmp(BAD_CAST "id", xmlTextReaderConstLocalName(reader)) == 0) && (xmlTextReaderConstNamespaceUri(reader) == NULL)) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read attribute {}id..."); #endif _child_accessor = xmlTextReaderReadIntType(reader); if (_child_accessor == NULL) { //panic: unable to read the attribute value for some reason. [NSException raise: @"XMLReadError" format: @"Error reading attribute {}id."]; } [self setIdentifier: ((int*) _child_accessor)]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read attribute {}id..."); #endif return YES; } if ((xmlStrcmp(BAD_CAST "longitude", xmlTextReaderConstLocalName(reader)) == 0) && (xmlTextReaderConstNamespaceUri(reader) == NULL)) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read attribute {}longitude..."); #endif [self setLongitude: (NSDecimalNumber*) [NSDecimalNumber readXMLType: reader]]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read attribute {}longitude..."); #endif return YES; } if ((xmlStrcmp(BAD_CAST "latitude", xmlTextReaderConstLocalName(reader)) == 0) && (xmlTextReaderConstNamespaceUri(reader) == NULL)) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read attribute {}latitude..."); #endif [self setLatitude: (NSDecimalNumber*) [NSDecimalNumber readXMLType: reader]]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read attribute {}latitude..."); #endif return YES; } if ((xmlStrcmp(BAD_CAST "key", xmlTextReaderConstLocalName(reader)) == 0) && (xmlTextReaderConstNamespaceUri(reader) == NULL)) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read attribute {}key..."); #endif [self setKey: (NSString*) [NSString readXMLType: reader]]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read attribute {}key..."); #endif return YES; } return NO; } //documentation inherited. - (BOOL) readJAXBValue: (xmlTextReaderPtr) reader { return [super readJAXBValue: reader]; } //documentation inherited. - (BOOL) readJAXBChildElement: (xmlTextReaderPtr) reader { id __child; void *_child_accessor; int status, depth; if ([super readJAXBChildElement: reader]) { return YES; } if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "link", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read choice {}link of type {}link."); #endif __child = [AGENTRANKNS0Link readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read choice {}link of type {}link."); #endif [self setLink: __child]; return YES; } //end "if choice" if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "list_date", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read choice {}list_date of type {http://www.w3.org/2001/XMLSchema}dateTime."); #endif __child = [NSDate readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read choice {}list_date of type {http://www.w3.org/2001/XMLSchema}dateTime."); #endif [self setList_date: __child]; return YES; } //end "if choice" if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "sold_date", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read choice {}sold_date of type {http://www.w3.org/2001/XMLSchema}dateTime."); #endif __child = [NSDate readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read choice {}sold_date of type {http://www.w3.org/2001/XMLSchema}dateTime."); #endif [self setSold_date: __child]; return YES; } //end "if choice" if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "slugs", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read choice {}slugs of type {}slugs."); #endif __child = [AGENTRANKNS0Slugs readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read choice {}slugs of type {}slugs."); #endif [self setSlugs: __child]; return YES; } //end "if choice" if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "zip", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read choice {}zip of type {http://www.w3.org/2001/XMLSchema}string."); #endif __child = [NSString readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read choice {}zip of type {http://www.w3.org/2001/XMLSchema}string."); #endif [self setZip: __child]; return YES; } //end "if choice" if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "city", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read choice {}city of type {http://www.w3.org/2001/XMLSchema}string."); #endif __child = [NSString readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read choice {}city of type {http://www.w3.org/2001/XMLSchema}string."); #endif [self setCity: __child]; return YES; } //end "if choice" if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "state", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read choice {}state of type {http://www.w3.org/2001/XMLSchema}string."); #endif __child = [NSString readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read choice {}state of type {http://www.w3.org/2001/XMLSchema}string."); #endif [self setState: __child]; return YES; } //end "if choice" if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "title", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read choice {}title of type {http://www.w3.org/2001/XMLSchema}string."); #endif __child = [NSString readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read choice {}title of type {http://www.w3.org/2001/XMLSchema}string."); #endif [self setTitle: __child]; return YES; } //end "if choice" if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "address", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read choice {}address of type {http://www.w3.org/2001/XMLSchema}string."); #endif __child = [NSString readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read choice {}address of type {http://www.w3.org/2001/XMLSchema}string."); #endif [self setAddress: __child]; return YES; } //end "if choice" if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "precision", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read choice {}precision of type {http://www.w3.org/2001/XMLSchema}string."); #endif __child = [NSString readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read choice {}precision of type {http://www.w3.org/2001/XMLSchema}string."); #endif [self setPrecision: __child]; return YES; } //end "if choice" if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "property_type", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read choice {}property_type of type {http://www.w3.org/2001/XMLSchema}string."); #endif __child = [NSString readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read choice {}property_type of type {http://www.w3.org/2001/XMLSchema}string."); #endif [self setProperty_type: __child]; return YES; } //end "if choice" if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "transaction_side", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read choice {}transaction_side of type {http://www.w3.org/2001/XMLSchema}string."); #endif __child = [NSString readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read choice {}transaction_side of type {http://www.w3.org/2001/XMLSchema}string."); #endif [self setTransaction_side: __child]; return YES; } //end "if choice" if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "market_days", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { _child_accessor = xmlTextReaderReadIntType(reader); if (_child_accessor == NULL) { //panic: unable to return the value for some reason. [NSException raise: @"XMLReadError" format: @"Error reading element value."]; } [self setMarket_days: ((int*) _child_accessor)]; return YES; } if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "list_price_final", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read choice {}list_price_final of type {http://www.w3.org/2001/XMLSchema}decimal."); #endif __child = [NSDecimalNumber readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read choice {}list_price_final of type {http://www.w3.org/2001/XMLSchema}decimal."); #endif [self setList_price_final: __child]; return YES; } //end "if choice" if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "sale_price_final", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read choice {}sale_price_final of type {http://www.w3.org/2001/XMLSchema}decimal."); #endif __child = [NSDecimalNumber readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read choice {}sale_price_final of type {http://www.w3.org/2001/XMLSchema}decimal."); #endif [self setSale_price_final: __child]; return YES; } //end "if choice" if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "list_price_original", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read choice {}list_price_original of type {http://www.w3.org/2001/XMLSchema}decimal."); #endif __child = [NSDecimalNumber readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read choice {}list_price_original of type {http://www.w3.org/2001/XMLSchema}decimal."); #endif [self setList_price_original: __child]; return YES; } //end "if choice" if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "price_per_size_unit", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read choice {}price_per_size_unit of type {http://www.w3.org/2001/XMLSchema}decimal."); #endif __child = [NSDecimalNumber readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read choice {}price_per_size_unit of type {http://www.w3.org/2001/XMLSchema}decimal."); #endif [self setPrice_per_size_unit: __child]; return YES; } //end "if choice" return NO; } //documentation inherited. - (int) readUnknownJAXBChildElement: (xmlTextReaderPtr) reader { return [super readUnknownJAXBChildElement: reader]; } //documentation inherited. - (void) readUnknownJAXBAttribute: (xmlTextReaderPtr) reader { [super readUnknownJAXBAttribute: reader]; } //documentation inherited. - (void) writeJAXBAttributes: (xmlTextWriterPtr) writer { int status; [super writeJAXBAttributes: writer]; if ([self identifier] != NULL) { status = xmlTextWriterStartAttributeNS(writer, NULL, BAD_CAST "id", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start attribute {}id."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing attribute {}id..."); #endif status = xmlTextWriterWriteIntType(writer, [self identifier]); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing attribute {}id."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote attribute {}id..."); #endif status = xmlTextWriterEndAttribute(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end attribute {}id."]; } } if ([self longitude]) { status = xmlTextWriterStartAttributeNS(writer, NULL, BAD_CAST "longitude", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start attribute {}longitude."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing attribute {}longitude..."); #endif [[self longitude] writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote attribute {}longitude..."); #endif status = xmlTextWriterEndAttribute(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end attribute {}longitude."]; } } if ([self latitude]) { status = xmlTextWriterStartAttributeNS(writer, NULL, BAD_CAST "latitude", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start attribute {}latitude."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing attribute {}latitude..."); #endif [[self latitude] writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote attribute {}latitude..."); #endif status = xmlTextWriterEndAttribute(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end attribute {}latitude."]; } } if ([self key]) { status = xmlTextWriterStartAttributeNS(writer, NULL, BAD_CAST "key", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start attribute {}key."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing attribute {}key..."); #endif [[self key] writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote attribute {}key..."); #endif status = xmlTextWriterEndAttribute(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end attribute {}key."]; } } } //documentation inherited. - (void) writeJAXBValue: (xmlTextWriterPtr) writer { [super writeJAXBValue: writer]; } /** * Method for writing the child elements. * * @param writer The writer. */ - (void) writeJAXBChildElements: (xmlTextWriterPtr) writer { int status; id __item; NSEnumerator *__enumerator; [super writeJAXBChildElements: writer]; if ([self link]) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "link", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start child element {}link."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing element {}link..."); #endif [[self link] writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote element {}link..."); #endif status = xmlTextWriterEndElement(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end child element {}link."]; } } if ([self list_date]) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "list_date", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start child element {}list_date."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing element {}list_date..."); #endif [[self list_date] writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote element {}list_date..."); #endif status = xmlTextWriterEndElement(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end child element {}list_date."]; } } if ([self sold_date]) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "sold_date", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start child element {}sold_date."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing element {}sold_date..."); #endif [[self sold_date] writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote element {}sold_date..."); #endif status = xmlTextWriterEndElement(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end child element {}sold_date."]; } } if ([self slugs]) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "slugs", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start child element {}slugs."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing element {}slugs..."); #endif [[self slugs] writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote element {}slugs..."); #endif status = xmlTextWriterEndElement(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end child element {}slugs."]; } } if ([self zip]) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "zip", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start child element {}zip."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing element {}zip..."); #endif [[self zip] writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote element {}zip..."); #endif status = xmlTextWriterEndElement(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end child element {}zip."]; } } if ([self city]) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "city", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start child element {}city."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing element {}city..."); #endif [[self city] writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote element {}city..."); #endif status = xmlTextWriterEndElement(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end child element {}city."]; } } if ([self state]) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "state", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start child element {}state."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing element {}state..."); #endif [[self state] writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote element {}state..."); #endif status = xmlTextWriterEndElement(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end child element {}state."]; } } if ([self title]) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "title", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start child element {}title."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing element {}title..."); #endif [[self title] writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote element {}title..."); #endif status = xmlTextWriterEndElement(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end child element {}title."]; } } if ([self address]) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "address", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start child element {}address."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing element {}address..."); #endif [[self address] writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote element {}address..."); #endif status = xmlTextWriterEndElement(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end child element {}address."]; } } if ([self precision]) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "precision", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start child element {}precision."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing element {}precision..."); #endif [[self precision] writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote element {}precision..."); #endif status = xmlTextWriterEndElement(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end child element {}precision."]; } } if ([self property_type]) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "property_type", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start child element {}property_type."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing element {}property_type..."); #endif [[self property_type] writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote element {}property_type..."); #endif status = xmlTextWriterEndElement(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end child element {}property_type."]; } } if ([self transaction_side]) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "transaction_side", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start child element {}transaction_side."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing element {}transaction_side..."); #endif [[self transaction_side] writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote element {}transaction_side..."); #endif status = xmlTextWriterEndElement(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end child element {}transaction_side."]; } } if ([self market_days] != NULL) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "market_days", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start child element {}market_days."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing element {}market_days..."); #endif status = xmlTextWriterWriteIntType(writer, [self market_days]); #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote element {}market_days..."); #endif if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing child element {}market_days."]; } status = xmlTextWriterEndElement(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end child element {}market_days."]; } } if ([self list_price_final]) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "list_price_final", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start child element {}list_price_final."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing element {}list_price_final..."); #endif [[self list_price_final] writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote element {}list_price_final..."); #endif status = xmlTextWriterEndElement(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end child element {}list_price_final."]; } } if ([self sale_price_final]) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "sale_price_final", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start child element {}sale_price_final."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing element {}sale_price_final..."); #endif [[self sale_price_final] writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote element {}sale_price_final..."); #endif status = xmlTextWriterEndElement(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end child element {}sale_price_final."]; } } if ([self list_price_original]) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "list_price_original", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start child element {}list_price_original."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing element {}list_price_original..."); #endif [[self list_price_original] writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote element {}list_price_original..."); #endif status = xmlTextWriterEndElement(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end child element {}list_price_original."]; } } if ([self price_per_size_unit]) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "price_per_size_unit", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start child element {}price_per_size_unit."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing element {}price_per_size_unit..."); #endif [[self price_per_size_unit] writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote element {}price_per_size_unit..."); #endif status = xmlTextWriterEndElement(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end child element {}price_per_size_unit."]; } } } @end /* implementation AGENTRANKNS0Sale (JAXB) */ #endif /* DEF_AGENTRANKNS0Sale_M */ #ifndef DEF_AGENTRANKNS0Image_M #define DEF_AGENTRANKNS0Image_M /** * User: marc Date: Mar 4, 2008 Time: 6:15:00 AM

THIS SOFTWARE IS COPYRIGHTED. THE SOFTWARE MAY NOT BE COPIED REPRODUCED, TRANSLATED, OR REDUCED TO ANY ELECTRONIC MEDIUM OR MACHINE READABLE FORM WITHOUT THE PRIOR WRITTEN CONSENT OF SOCO TECHNOLOGIES. */ @implementation AGENTRANKNS0Image /** * (no documentation provided) */ - (int *) height { return _height; } /** * (no documentation provided) */ - (void) setHeight: (int *) newHeight { if (_height != NULL) { free(_height); } _height = newHeight; } /** * (no documentation provided) */ - (NSString *) alt { return _alt; } /** * (no documentation provided) */ - (void) setAlt: (NSString *) newAlt { [newAlt retain]; [_alt release]; _alt = newAlt; } /** * (no documentation provided) */ - (int *) width { return _width; } /** * (no documentation provided) */ - (void) setWidth: (int *) newWidth { if (_width != NULL) { free(_width); } _width = newWidth; } /** * (no documentation provided) */ - (NSString *) url { return _url; } /** * (no documentation provided) */ - (void) setUrl: (NSString *) newUrl { [newUrl retain]; [_url release]; _url = newUrl; } - (void) dealloc { [self setHeight: NULL]; [self setAlt: nil]; [self setWidth: NULL]; [self setUrl: nil]; [super dealloc]; } //documentation inherited. + (id) readFromXML: (NSData *) xml { AGENTRANKNS0Image *_aGENTRANKNS0Image; xmlTextReaderPtr reader = xmlReaderForMemory([xml bytes], [xml length], NULL, NULL, 0); if (reader == NULL) { [NSException raise: @"XMLReadError" format: @"Error instantiating an XML reader."]; return nil; } _aGENTRANKNS0Image = (AGENTRANKNS0Image *) [AGENTRANKNS0Image readXMLElement: reader]; xmlFreeTextReader(reader); //free the reader return _aGENTRANKNS0Image; } //documentation inherited. - (NSData *) writeToXML { xmlBufferPtr buf; xmlTextWriterPtr writer; int rc; NSData *data; buf = xmlBufferCreate(); if (buf == NULL) { [NSException raise: @"XMLWriteError" format: @"Error creating an XML buffer."]; return nil; } writer = xmlNewTextWriterMemory(buf, 0); if (writer == NULL) { xmlBufferFree(buf); [NSException raise: @"XMLWriteError" format: @"Error creating an XML writer."]; return nil; } rc = xmlTextWriterStartDocument(writer, NULL, "utf-8", NULL); if (rc < 0) { xmlFreeTextWriter(writer); xmlBufferFree(buf); [NSException raise: @"XMLWriteError" format: @"Error writing XML start document."]; return nil; } NS_DURING { [self writeXMLElement: writer]; } NS_HANDLER { xmlFreeTextWriter(writer); xmlBufferFree(buf); [localException raise]; } NS_ENDHANDLER rc = xmlTextWriterEndDocument(writer); if (rc < 0) { xmlFreeTextWriter(writer); xmlBufferFree(buf); [NSException raise: @"XMLWriteError" format: @"Error writing XML end document."]; return nil; } xmlFreeTextWriter(writer); data = [NSData dataWithBytes: buf->content length: buf->use]; xmlBufferFree(buf); return data; } @end /* implementation AGENTRANKNS0Image */ /** * Internal, private interface for JAXB reading and writing. */ @interface AGENTRANKNS0Image (JAXB) @end /*interface AGENTRANKNS0Image (JAXB)*/ /** * Internal, private implementation for JAXB reading and writing. */ @implementation AGENTRANKNS0Image (JAXB) /** * Read an instance of AGENTRANKNS0Image from an XML reader. * * @param reader The reader. * @return An instance of AGENTRANKNS0Image defined by the XML reader. */ + (id) readXMLType: (xmlTextReaderPtr) reader { AGENTRANKNS0Image *_aGENTRANKNS0Image = [[AGENTRANKNS0Image alloc] init]; NS_DURING { [_aGENTRANKNS0Image initWithReader: reader]; } NS_HANDLER { _aGENTRANKNS0Image = nil; [localException raise]; } NS_ENDHANDLER [_aGENTRANKNS0Image autorelease]; return _aGENTRANKNS0Image; } /** * Initialize this instance of AGENTRANKNS0Image according to * the XML being read from the reader. * * @param reader The reader. */ - (id) initWithReader: (xmlTextReaderPtr) reader { return [super initWithReader: reader]; } /** * Write the XML for this instance of AGENTRANKNS0Image to the writer. * Note that since we're only writing the XML type, * No start/end element will be written. * * @param reader The reader. */ - (void) writeXMLType: (xmlTextWriterPtr) writer { [super writeXMLType:writer]; } /** * Reads a AGENTRANKNS0Image from an XML reader. The element to be read is * "image". * * @param reader The XML reader. * @return The AGENTRANKNS0Image. */ + (id) readXMLElement: (xmlTextReaderPtr) reader { int status; AGENTRANKNS0Image *_image = nil; if (xmlTextReaderNodeType(reader) != XML_READER_TYPE_ELEMENT) { status = xmlTextReaderAdvanceToNextStartOrEndElement(reader); if (status < 1) { [NSException raise: @"XMLReadError" format: @"Error advancing the reader to start element image."]; } } if (xmlStrcmp(BAD_CAST "image", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read root element {}image."); #endif _image = (AGENTRANKNS0Image *)[AGENTRANKNS0Image readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"Successfully read root element {}image."); #endif } else { if (xmlTextReaderConstNamespaceUri(reader) == NULL) { [NSException raise: @"XMLReadError" format: @"Unable to read AGENTRANKNS0Image. Expected element image. Current element: {}%s", xmlTextReaderConstLocalName(reader)]; } else { [NSException raise: @"XMLReadError" format: @"Unable to read AGENTRANKNS0Image. Expected element image. Current element: {%s}%s\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)]; } } return _image; } /** * Writes this AGENTRANKNS0Image to XML under element name "image". * The namespace declarations for the element will be written. * * @param writer The XML writer. * @param _image The Image to write. * @return 1 if successful, 0 otherwise. */ - (void) writeXMLElement: (xmlTextWriterPtr) writer { [self writeXMLElement: writer writeNamespaces: YES]; } /** * Writes this AGENTRANKNS0Image to an XML writer. * * @param writer The writer. * @param writeNs Whether to write the namespaces for this element to the xml writer. */ - (void) writeXMLElement: (xmlTextWriterPtr) writer writeNamespaces: (BOOL) writeNs { int rc = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "image", NULL); if (rc < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start element {}image. XML writer status: %i\n", rc]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing type {}image for root element {}image..."); #endif [self writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote type {}image for root element {}image..."); #endif rc = xmlTextWriterEndElement(writer); if (rc < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end element {}image. XML writer status: %i\n", rc]; } } //documentation inherited. - (BOOL) readJAXBAttribute: (xmlTextReaderPtr) reader { void *_child_accessor; if ([super readJAXBAttribute: reader]) { return YES; } if ((xmlStrcmp(BAD_CAST "height", xmlTextReaderConstLocalName(reader)) == 0) && (xmlTextReaderConstNamespaceUri(reader) == NULL)) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read attribute {}height..."); #endif _child_accessor = xmlTextReaderReadIntType(reader); if (_child_accessor == NULL) { //panic: unable to read the attribute value for some reason. [NSException raise: @"XMLReadError" format: @"Error reading attribute {}height."]; } [self setHeight: ((int*) _child_accessor)]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read attribute {}height..."); #endif return YES; } if ((xmlStrcmp(BAD_CAST "alt", xmlTextReaderConstLocalName(reader)) == 0) && (xmlTextReaderConstNamespaceUri(reader) == NULL)) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read attribute {}alt..."); #endif [self setAlt: (NSString*) [NSString readXMLType: reader]]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read attribute {}alt..."); #endif return YES; } if ((xmlStrcmp(BAD_CAST "width", xmlTextReaderConstLocalName(reader)) == 0) && (xmlTextReaderConstNamespaceUri(reader) == NULL)) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read attribute {}width..."); #endif _child_accessor = xmlTextReaderReadIntType(reader); if (_child_accessor == NULL) { //panic: unable to read the attribute value for some reason. [NSException raise: @"XMLReadError" format: @"Error reading attribute {}width."]; } [self setWidth: ((int*) _child_accessor)]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read attribute {}width..."); #endif return YES; } if ((xmlStrcmp(BAD_CAST "url", xmlTextReaderConstLocalName(reader)) == 0) && (xmlTextReaderConstNamespaceUri(reader) == NULL)) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read attribute {}url..."); #endif [self setUrl: (NSString*) [NSString readXMLType: reader]]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read attribute {}url..."); #endif return YES; } return NO; } //documentation inherited. - (BOOL) readJAXBValue: (xmlTextReaderPtr) reader { return [super readJAXBValue: reader]; } //documentation inherited. - (BOOL) readJAXBChildElement: (xmlTextReaderPtr) reader { id __child; void *_child_accessor; int status, depth; if ([super readJAXBChildElement: reader]) { return YES; } return NO; } //documentation inherited. - (int) readUnknownJAXBChildElement: (xmlTextReaderPtr) reader { return [super readUnknownJAXBChildElement: reader]; } //documentation inherited. - (void) readUnknownJAXBAttribute: (xmlTextReaderPtr) reader { [super readUnknownJAXBAttribute: reader]; } //documentation inherited. - (void) writeJAXBAttributes: (xmlTextWriterPtr) writer { int status; [super writeJAXBAttributes: writer]; if ([self height] != NULL) { status = xmlTextWriterStartAttributeNS(writer, NULL, BAD_CAST "height", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start attribute {}height."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing attribute {}height..."); #endif status = xmlTextWriterWriteIntType(writer, [self height]); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing attribute {}height."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote attribute {}height..."); #endif status = xmlTextWriterEndAttribute(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end attribute {}height."]; } } if ([self alt]) { status = xmlTextWriterStartAttributeNS(writer, NULL, BAD_CAST "alt", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start attribute {}alt."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing attribute {}alt..."); #endif [[self alt] writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote attribute {}alt..."); #endif status = xmlTextWriterEndAttribute(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end attribute {}alt."]; } } if ([self width] != NULL) { status = xmlTextWriterStartAttributeNS(writer, NULL, BAD_CAST "width", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start attribute {}width."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing attribute {}width..."); #endif status = xmlTextWriterWriteIntType(writer, [self width]); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing attribute {}width."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote attribute {}width..."); #endif status = xmlTextWriterEndAttribute(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end attribute {}width."]; } } if ([self url]) { status = xmlTextWriterStartAttributeNS(writer, NULL, BAD_CAST "url", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start attribute {}url."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing attribute {}url..."); #endif [[self url] writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote attribute {}url..."); #endif status = xmlTextWriterEndAttribute(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end attribute {}url."]; } } } //documentation inherited. - (void) writeJAXBValue: (xmlTextWriterPtr) writer { [super writeJAXBValue: writer]; } /** * Method for writing the child elements. * * @param writer The writer. */ - (void) writeJAXBChildElements: (xmlTextWriterPtr) writer { int status; id __item; NSEnumerator *__enumerator; [super writeJAXBChildElements: writer]; } @end /* implementation AGENTRANKNS0Image (JAXB) */ #endif /* DEF_AGENTRANKNS0Image_M */ #ifndef DEF_AGENTRANKNS0Link_M #define DEF_AGENTRANKNS0Link_M /** * User: marc Date: Mar 24, 2008 Time: 6:44:23 AM

THIS SOFTWARE IS COPYRIGHTED. THE SOFTWARE MAY NOT BE COPIED REPRODUCED, TRANSLATED, OR REDUCED TO ANY ELECTRONIC MEDIUM OR MACHINE READABLE FORM WITHOUT THE PRIOR WRITTEN CONSENT OF SOCO TECHNOLOGIES. */ @implementation AGENTRANKNS0Link /** * (no documentation provided) */ - (NSString *) identifier { return _identifier; } /** * (no documentation provided) */ - (void) setIdentifier: (NSString *) newIdentifier { [newIdentifier retain]; [_identifier release]; _identifier = newIdentifier; } /** * (no documentation provided) */ - (NSString *) title { return _title; } /** * (no documentation provided) */ - (void) setTitle: (NSString *) newTitle { [newTitle retain]; [_title release]; _title = newTitle; } /** * (no documentation provided) */ - (NSString *) text { return _text; } /** * (no documentation provided) */ - (void) setText: (NSString *) newText { [newText retain]; [_text release]; _text = newText; } /** * (no documentation provided) */ - (NSString *) mouseover { return _mouseover; } /** * (no documentation provided) */ - (void) setMouseover: (NSString *) newMouseover { [newMouseover retain]; [_mouseover release]; _mouseover = newMouseover; } /** * (no documentation provided) */ - (NSString *) rel { return _rel; } /** * (no documentation provided) */ - (void) setRel: (NSString *) newRel { [newRel retain]; [_rel release]; _rel = newRel; } /** * (no documentation provided) */ - (NSString *) type { return _type; } /** * (no documentation provided) */ - (void) setType: (NSString *) newType { [newType retain]; [_type release]; _type = newType; } /** * (no documentation provided) */ - (NSString *) href { return _href; } /** * (no documentation provided) */ - (void) setHref: (NSString *) newHref { [newHref retain]; [_href release]; _href = newHref; } - (void) dealloc { [self setIdentifier: nil]; [self setTitle: nil]; [self setText: nil]; [self setMouseover: nil]; [self setRel: nil]; [self setType: nil]; [self setHref: nil]; [super dealloc]; } //documentation inherited. + (id) readFromXML: (NSData *) xml { AGENTRANKNS0Link *_aGENTRANKNS0Link; xmlTextReaderPtr reader = xmlReaderForMemory([xml bytes], [xml length], NULL, NULL, 0); if (reader == NULL) { [NSException raise: @"XMLReadError" format: @"Error instantiating an XML reader."]; return nil; } _aGENTRANKNS0Link = (AGENTRANKNS0Link *) [AGENTRANKNS0Link readXMLElement: reader]; xmlFreeTextReader(reader); //free the reader return _aGENTRANKNS0Link; } //documentation inherited. - (NSData *) writeToXML { xmlBufferPtr buf; xmlTextWriterPtr writer; int rc; NSData *data; buf = xmlBufferCreate(); if (buf == NULL) { [NSException raise: @"XMLWriteError" format: @"Error creating an XML buffer."]; return nil; } writer = xmlNewTextWriterMemory(buf, 0); if (writer == NULL) { xmlBufferFree(buf); [NSException raise: @"XMLWriteError" format: @"Error creating an XML writer."]; return nil; } rc = xmlTextWriterStartDocument(writer, NULL, "utf-8", NULL); if (rc < 0) { xmlFreeTextWriter(writer); xmlBufferFree(buf); [NSException raise: @"XMLWriteError" format: @"Error writing XML start document."]; return nil; } NS_DURING { [self writeXMLElement: writer]; } NS_HANDLER { xmlFreeTextWriter(writer); xmlBufferFree(buf); [localException raise]; } NS_ENDHANDLER rc = xmlTextWriterEndDocument(writer); if (rc < 0) { xmlFreeTextWriter(writer); xmlBufferFree(buf); [NSException raise: @"XMLWriteError" format: @"Error writing XML end document."]; return nil; } xmlFreeTextWriter(writer); data = [NSData dataWithBytes: buf->content length: buf->use]; xmlBufferFree(buf); return data; } @end /* implementation AGENTRANKNS0Link */ /** * Internal, private interface for JAXB reading and writing. */ @interface AGENTRANKNS0Link (JAXB) @end /*interface AGENTRANKNS0Link (JAXB)*/ /** * Internal, private implementation for JAXB reading and writing. */ @implementation AGENTRANKNS0Link (JAXB) /** * Read an instance of AGENTRANKNS0Link from an XML reader. * * @param reader The reader. * @return An instance of AGENTRANKNS0Link defined by the XML reader. */ + (id) readXMLType: (xmlTextReaderPtr) reader { AGENTRANKNS0Link *_aGENTRANKNS0Link = [[AGENTRANKNS0Link alloc] init]; NS_DURING { [_aGENTRANKNS0Link initWithReader: reader]; } NS_HANDLER { _aGENTRANKNS0Link = nil; [localException raise]; } NS_ENDHANDLER [_aGENTRANKNS0Link autorelease]; return _aGENTRANKNS0Link; } /** * Initialize this instance of AGENTRANKNS0Link according to * the XML being read from the reader. * * @param reader The reader. */ - (id) initWithReader: (xmlTextReaderPtr) reader { return [super initWithReader: reader]; } /** * Write the XML for this instance of AGENTRANKNS0Link to the writer. * Note that since we're only writing the XML type, * No start/end element will be written. * * @param reader The reader. */ - (void) writeXMLType: (xmlTextWriterPtr) writer { [super writeXMLType:writer]; } /** * Reads a AGENTRANKNS0Link from an XML reader. The element to be read is * "link". * * @param reader The XML reader. * @return The AGENTRANKNS0Link. */ + (id) readXMLElement: (xmlTextReaderPtr) reader { int status; AGENTRANKNS0Link *_link = nil; if (xmlTextReaderNodeType(reader) != XML_READER_TYPE_ELEMENT) { status = xmlTextReaderAdvanceToNextStartOrEndElement(reader); if (status < 1) { [NSException raise: @"XMLReadError" format: @"Error advancing the reader to start element link."]; } } if (xmlStrcmp(BAD_CAST "link", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read root element {}link."); #endif _link = (AGENTRANKNS0Link *)[AGENTRANKNS0Link readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"Successfully read root element {}link."); #endif } else { if (xmlTextReaderConstNamespaceUri(reader) == NULL) { [NSException raise: @"XMLReadError" format: @"Unable to read AGENTRANKNS0Link. Expected element link. Current element: {}%s", xmlTextReaderConstLocalName(reader)]; } else { [NSException raise: @"XMLReadError" format: @"Unable to read AGENTRANKNS0Link. Expected element link. Current element: {%s}%s\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)]; } } return _link; } /** * Writes this AGENTRANKNS0Link to XML under element name "link". * The namespace declarations for the element will be written. * * @param writer The XML writer. * @param _link The Link to write. * @return 1 if successful, 0 otherwise. */ - (void) writeXMLElement: (xmlTextWriterPtr) writer { [self writeXMLElement: writer writeNamespaces: YES]; } /** * Writes this AGENTRANKNS0Link to an XML writer. * * @param writer The writer. * @param writeNs Whether to write the namespaces for this element to the xml writer. */ - (void) writeXMLElement: (xmlTextWriterPtr) writer writeNamespaces: (BOOL) writeNs { int rc = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "link", NULL); if (rc < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start element {}link. XML writer status: %i\n", rc]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing type {}link for root element {}link..."); #endif [self writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote type {}link for root element {}link..."); #endif rc = xmlTextWriterEndElement(writer); if (rc < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end element {}link. XML writer status: %i\n", rc]; } } //documentation inherited. - (BOOL) readJAXBAttribute: (xmlTextReaderPtr) reader { void *_child_accessor; if ([super readJAXBAttribute: reader]) { return YES; } if ((xmlStrcmp(BAD_CAST "id", xmlTextReaderConstLocalName(reader)) == 0) && (xmlTextReaderConstNamespaceUri(reader) == NULL)) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read attribute {}id..."); #endif [self setIdentifier: (NSString*) [NSString readXMLType: reader]]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read attribute {}id..."); #endif return YES; } if ((xmlStrcmp(BAD_CAST "title", xmlTextReaderConstLocalName(reader)) == 0) && (xmlTextReaderConstNamespaceUri(reader) == NULL)) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read attribute {}title..."); #endif [self setTitle: (NSString*) [NSString readXMLType: reader]]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read attribute {}title..."); #endif return YES; } if ((xmlStrcmp(BAD_CAST "text", xmlTextReaderConstLocalName(reader)) == 0) && (xmlTextReaderConstNamespaceUri(reader) == NULL)) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read attribute {}text..."); #endif [self setText: (NSString*) [NSString readXMLType: reader]]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read attribute {}text..."); #endif return YES; } if ((xmlStrcmp(BAD_CAST "mouseover", xmlTextReaderConstLocalName(reader)) == 0) && (xmlTextReaderConstNamespaceUri(reader) == NULL)) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read attribute {}mouseover..."); #endif [self setMouseover: (NSString*) [NSString readXMLType: reader]]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read attribute {}mouseover..."); #endif return YES; } if ((xmlStrcmp(BAD_CAST "rel", xmlTextReaderConstLocalName(reader)) == 0) && (xmlTextReaderConstNamespaceUri(reader) == NULL)) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read attribute {}rel..."); #endif [self setRel: (NSString*) [NSString readXMLType: reader]]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read attribute {}rel..."); #endif return YES; } if ((xmlStrcmp(BAD_CAST "type", xmlTextReaderConstLocalName(reader)) == 0) && (xmlTextReaderConstNamespaceUri(reader) == NULL)) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read attribute {}type..."); #endif [self setType: (NSString*) [NSString readXMLType: reader]]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read attribute {}type..."); #endif return YES; } if ((xmlStrcmp(BAD_CAST "href", xmlTextReaderConstLocalName(reader)) == 0) && (xmlTextReaderConstNamespaceUri(reader) == NULL)) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read attribute {}href..."); #endif [self setHref: (NSString*) [NSString readXMLType: reader]]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read attribute {}href..."); #endif return YES; } return NO; } //documentation inherited. - (BOOL) readJAXBValue: (xmlTextReaderPtr) reader { return [super readJAXBValue: reader]; } //documentation inherited. - (BOOL) readJAXBChildElement: (xmlTextReaderPtr) reader { id __child; void *_child_accessor; int status, depth; if ([super readJAXBChildElement: reader]) { return YES; } return NO; } //documentation inherited. - (int) readUnknownJAXBChildElement: (xmlTextReaderPtr) reader { return [super readUnknownJAXBChildElement: reader]; } //documentation inherited. - (void) readUnknownJAXBAttribute: (xmlTextReaderPtr) reader { [super readUnknownJAXBAttribute: reader]; } //documentation inherited. - (void) writeJAXBAttributes: (xmlTextWriterPtr) writer { int status; [super writeJAXBAttributes: writer]; if ([self identifier]) { status = xmlTextWriterStartAttributeNS(writer, NULL, BAD_CAST "id", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start attribute {}id."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing attribute {}id..."); #endif [[self identifier] writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote attribute {}id..."); #endif status = xmlTextWriterEndAttribute(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end attribute {}id."]; } } if ([self title]) { status = xmlTextWriterStartAttributeNS(writer, NULL, BAD_CAST "title", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start attribute {}title."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing attribute {}title..."); #endif [[self title] writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote attribute {}title..."); #endif status = xmlTextWriterEndAttribute(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end attribute {}title."]; } } if ([self text]) { status = xmlTextWriterStartAttributeNS(writer, NULL, BAD_CAST "text", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start attribute {}text."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing attribute {}text..."); #endif [[self text] writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote attribute {}text..."); #endif status = xmlTextWriterEndAttribute(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end attribute {}text."]; } } if ([self mouseover]) { status = xmlTextWriterStartAttributeNS(writer, NULL, BAD_CAST "mouseover", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start attribute {}mouseover."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing attribute {}mouseover..."); #endif [[self mouseover] writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote attribute {}mouseover..."); #endif status = xmlTextWriterEndAttribute(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end attribute {}mouseover."]; } } if ([self rel]) { status = xmlTextWriterStartAttributeNS(writer, NULL, BAD_CAST "rel", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start attribute {}rel."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing attribute {}rel..."); #endif [[self rel] writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote attribute {}rel..."); #endif status = xmlTextWriterEndAttribute(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end attribute {}rel."]; } } if ([self type]) { status = xmlTextWriterStartAttributeNS(writer, NULL, BAD_CAST "type", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start attribute {}type."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing attribute {}type..."); #endif [[self type] writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote attribute {}type..."); #endif status = xmlTextWriterEndAttribute(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end attribute {}type."]; } } if ([self href]) { status = xmlTextWriterStartAttributeNS(writer, NULL, BAD_CAST "href", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start attribute {}href."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing attribute {}href..."); #endif [[self href] writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote attribute {}href..."); #endif status = xmlTextWriterEndAttribute(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end attribute {}href."]; } } } //documentation inherited. - (void) writeJAXBValue: (xmlTextWriterPtr) writer { [super writeJAXBValue: writer]; } /** * Method for writing the child elements. * * @param writer The writer. */ - (void) writeJAXBChildElements: (xmlTextWriterPtr) writer { int status; id __item; NSEnumerator *__enumerator; [super writeJAXBChildElements: writer]; } @end /* implementation AGENTRANKNS0Link (JAXB) */ #endif /* DEF_AGENTRANKNS0Link_M */ #ifndef DEF_AGENTRANKNS0Messages_M #define DEF_AGENTRANKNS0Messages_M /** * User: marc Date: Jul 17, 2009 Time: 3:05:10 PM

THIS SOFTWARE IS COPYRIGHTED. THE SOFTWARE MAY NOT BE COPIED REPRODUCED, TRANSLATED, OR REDUCED TO ANY ELECTRONIC MEDIUM OR MACHINE READABLE FORM WITHOUT THE PRIOR WRITTEN CONSENT OF SOCO TECHNOLOGIES. */ @implementation AGENTRANKNS0Messages /** * list of messages */ - (NSArray *) message { return _message; } /** * list of messages */ - (void) setMessage: (NSArray *) newMessage { [newMessage retain]; [_message release]; _message = newMessage; } - (void) dealloc { [self setMessage: nil]; [super dealloc]; } //documentation inherited. + (id) readFromXML: (NSData *) xml { AGENTRANKNS0Messages *_aGENTRANKNS0Messages; xmlTextReaderPtr reader = xmlReaderForMemory([xml bytes], [xml length], NULL, NULL, 0); if (reader == NULL) { [NSException raise: @"XMLReadError" format: @"Error instantiating an XML reader."]; return nil; } _aGENTRANKNS0Messages = (AGENTRANKNS0Messages *) [AGENTRANKNS0Messages readXMLElement: reader]; xmlFreeTextReader(reader); //free the reader return _aGENTRANKNS0Messages; } //documentation inherited. - (NSData *) writeToXML { xmlBufferPtr buf; xmlTextWriterPtr writer; int rc; NSData *data; buf = xmlBufferCreate(); if (buf == NULL) { [NSException raise: @"XMLWriteError" format: @"Error creating an XML buffer."]; return nil; } writer = xmlNewTextWriterMemory(buf, 0); if (writer == NULL) { xmlBufferFree(buf); [NSException raise: @"XMLWriteError" format: @"Error creating an XML writer."]; return nil; } rc = xmlTextWriterStartDocument(writer, NULL, "utf-8", NULL); if (rc < 0) { xmlFreeTextWriter(writer); xmlBufferFree(buf); [NSException raise: @"XMLWriteError" format: @"Error writing XML start document."]; return nil; } NS_DURING { [self writeXMLElement: writer]; } NS_HANDLER { xmlFreeTextWriter(writer); xmlBufferFree(buf); [localException raise]; } NS_ENDHANDLER rc = xmlTextWriterEndDocument(writer); if (rc < 0) { xmlFreeTextWriter(writer); xmlBufferFree(buf); [NSException raise: @"XMLWriteError" format: @"Error writing XML end document."]; return nil; } xmlFreeTextWriter(writer); data = [NSData dataWithBytes: buf->content length: buf->use]; xmlBufferFree(buf); return data; } @end /* implementation AGENTRANKNS0Messages */ /** * Internal, private interface for JAXB reading and writing. */ @interface AGENTRANKNS0Messages (JAXB) @end /*interface AGENTRANKNS0Messages (JAXB)*/ /** * Internal, private implementation for JAXB reading and writing. */ @implementation AGENTRANKNS0Messages (JAXB) /** * Read an instance of AGENTRANKNS0Messages from an XML reader. * * @param reader The reader. * @return An instance of AGENTRANKNS0Messages defined by the XML reader. */ + (id) readXMLType: (xmlTextReaderPtr) reader { AGENTRANKNS0Messages *_aGENTRANKNS0Messages = [[AGENTRANKNS0Messages alloc] init]; NS_DURING { [_aGENTRANKNS0Messages initWithReader: reader]; } NS_HANDLER { _aGENTRANKNS0Messages = nil; [localException raise]; } NS_ENDHANDLER [_aGENTRANKNS0Messages autorelease]; return _aGENTRANKNS0Messages; } /** * Initialize this instance of AGENTRANKNS0Messages according to * the XML being read from the reader. * * @param reader The reader. */ - (id) initWithReader: (xmlTextReaderPtr) reader { return [super initWithReader: reader]; } /** * Write the XML for this instance of AGENTRANKNS0Messages to the writer. * Note that since we're only writing the XML type, * No start/end element will be written. * * @param reader The reader. */ - (void) writeXMLType: (xmlTextWriterPtr) writer { [super writeXMLType:writer]; } /** * Reads a AGENTRANKNS0Messages from an XML reader. The element to be read is * "messages". * * @param reader The XML reader. * @return The AGENTRANKNS0Messages. */ + (id) readXMLElement: (xmlTextReaderPtr) reader { int status; AGENTRANKNS0Messages *_messages = nil; if (xmlTextReaderNodeType(reader) != XML_READER_TYPE_ELEMENT) { status = xmlTextReaderAdvanceToNextStartOrEndElement(reader); if (status < 1) { [NSException raise: @"XMLReadError" format: @"Error advancing the reader to start element messages."]; } } if (xmlStrcmp(BAD_CAST "messages", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read root element {}messages."); #endif _messages = (AGENTRANKNS0Messages *)[AGENTRANKNS0Messages readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"Successfully read root element {}messages."); #endif } else { if (xmlTextReaderConstNamespaceUri(reader) == NULL) { [NSException raise: @"XMLReadError" format: @"Unable to read AGENTRANKNS0Messages. Expected element messages. Current element: {}%s", xmlTextReaderConstLocalName(reader)]; } else { [NSException raise: @"XMLReadError" format: @"Unable to read AGENTRANKNS0Messages. Expected element messages. Current element: {%s}%s\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)]; } } return _messages; } /** * Writes this AGENTRANKNS0Messages to XML under element name "messages". * The namespace declarations for the element will be written. * * @param writer The XML writer. * @param _messages The Messages to write. * @return 1 if successful, 0 otherwise. */ - (void) writeXMLElement: (xmlTextWriterPtr) writer { [self writeXMLElement: writer writeNamespaces: YES]; } /** * Writes this AGENTRANKNS0Messages to an XML writer. * * @param writer The writer. * @param writeNs Whether to write the namespaces for this element to the xml writer. */ - (void) writeXMLElement: (xmlTextWriterPtr) writer writeNamespaces: (BOOL) writeNs { int rc = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "messages", NULL); if (rc < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start element {}messages. XML writer status: %i\n", rc]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing type {}messages for root element {}messages..."); #endif [self writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote type {}messages for root element {}messages..."); #endif rc = xmlTextWriterEndElement(writer); if (rc < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end element {}messages. XML writer status: %i\n", rc]; } } //documentation inherited. - (BOOL) readJAXBAttribute: (xmlTextReaderPtr) reader { void *_child_accessor; if ([super readJAXBAttribute: reader]) { return YES; } return NO; } //documentation inherited. - (BOOL) readJAXBValue: (xmlTextReaderPtr) reader { return [super readJAXBValue: reader]; } //documentation inherited. - (BOOL) readJAXBChildElement: (xmlTextReaderPtr) reader { id __child; void *_child_accessor; int status, depth; if ([super readJAXBChildElement: reader]) { return YES; } if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "message", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read choice {}message of type {http://www.w3.org/2001/XMLSchema}string."); #endif __child = [NSString readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read choice {}message of type {http://www.w3.org/2001/XMLSchema}string."); #endif if ([self message]) { [self setMessage: [[self message] arrayByAddingObject: __child]]; } else { [self setMessage: [NSArray arrayWithObject: __child]]; } return YES; } //end "if choice" return NO; } //documentation inherited. - (int) readUnknownJAXBChildElement: (xmlTextReaderPtr) reader { return [super readUnknownJAXBChildElement: reader]; } //documentation inherited. - (void) readUnknownJAXBAttribute: (xmlTextReaderPtr) reader { [super readUnknownJAXBAttribute: reader]; } //documentation inherited. - (void) writeJAXBAttributes: (xmlTextWriterPtr) writer { int status; [super writeJAXBAttributes: writer]; } //documentation inherited. - (void) writeJAXBValue: (xmlTextWriterPtr) writer { [super writeJAXBValue: writer]; } /** * Method for writing the child elements. * * @param writer The writer. */ - (void) writeJAXBChildElements: (xmlTextWriterPtr) writer { int status; id __item; NSEnumerator *__enumerator; [super writeJAXBChildElements: writer]; if ([self message]) { __enumerator = [[self message] objectEnumerator]; while ( (__item = [__enumerator nextObject]) ) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "message", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start child element {}message."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing element {}message..."); #endif [__item writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote element {}message..."); #endif status = xmlTextWriterEndElement(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end child element {}message."]; } } //end item iterator. } } @end /* implementation AGENTRANKNS0Messages (JAXB) */ #endif /* DEF_AGENTRANKNS0Messages_M */ #ifndef DEF_AGENTRANKNS0Slug_M #define DEF_AGENTRANKNS0Slug_M /** * Created by IntelliJ IDEA. User: marc Date: Nov 17, 2010 Time: 3:29:07 PM */ @implementation AGENTRANKNS0Slug /** * (no documentation provided) */ - (enum AGENTRANKNS0SlugType *) type { return _type; } /** * (no documentation provided) */ - (void) setType: (enum AGENTRANKNS0SlugType *) newType { if (_type != NULL) { free(_type); } _type = newType; } /** * (no documentation provided) */ - (NSString *) value { return _value; } /** * (no documentation provided) */ - (void) setValue: (NSString *) newValue { [newValue retain]; [_value release]; _value = newValue; } - (void) dealloc { [self setType: NULL]; [self setValue: nil]; [super dealloc]; } //documentation inherited. + (id) readFromXML: (NSData *) xml { AGENTRANKNS0Slug *_aGENTRANKNS0Slug; xmlTextReaderPtr reader = xmlReaderForMemory([xml bytes], [xml length], NULL, NULL, 0); if (reader == NULL) { [NSException raise: @"XMLReadError" format: @"Error instantiating an XML reader."]; return nil; } _aGENTRANKNS0Slug = (AGENTRANKNS0Slug *) [AGENTRANKNS0Slug readXMLElement: reader]; xmlFreeTextReader(reader); //free the reader return _aGENTRANKNS0Slug; } //documentation inherited. - (NSData *) writeToXML { xmlBufferPtr buf; xmlTextWriterPtr writer; int rc; NSData *data; buf = xmlBufferCreate(); if (buf == NULL) { [NSException raise: @"XMLWriteError" format: @"Error creating an XML buffer."]; return nil; } writer = xmlNewTextWriterMemory(buf, 0); if (writer == NULL) { xmlBufferFree(buf); [NSException raise: @"XMLWriteError" format: @"Error creating an XML writer."]; return nil; } rc = xmlTextWriterStartDocument(writer, NULL, "utf-8", NULL); if (rc < 0) { xmlFreeTextWriter(writer); xmlBufferFree(buf); [NSException raise: @"XMLWriteError" format: @"Error writing XML start document."]; return nil; } NS_DURING { [self writeXMLElement: writer]; } NS_HANDLER { xmlFreeTextWriter(writer); xmlBufferFree(buf); [localException raise]; } NS_ENDHANDLER rc = xmlTextWriterEndDocument(writer); if (rc < 0) { xmlFreeTextWriter(writer); xmlBufferFree(buf); [NSException raise: @"XMLWriteError" format: @"Error writing XML end document."]; return nil; } xmlFreeTextWriter(writer); data = [NSData dataWithBytes: buf->content length: buf->use]; xmlBufferFree(buf); return data; } @end /* implementation AGENTRANKNS0Slug */ /** * Internal, private interface for JAXB reading and writing. */ @interface AGENTRANKNS0Slug (JAXB) @end /*interface AGENTRANKNS0Slug (JAXB)*/ /** * Internal, private implementation for JAXB reading and writing. */ @implementation AGENTRANKNS0Slug (JAXB) /** * Read an instance of AGENTRANKNS0Slug from an XML reader. * * @param reader The reader. * @return An instance of AGENTRANKNS0Slug defined by the XML reader. */ + (id) readXMLType: (xmlTextReaderPtr) reader { AGENTRANKNS0Slug *_aGENTRANKNS0Slug = [[AGENTRANKNS0Slug alloc] init]; NS_DURING { [_aGENTRANKNS0Slug initWithReader: reader]; } NS_HANDLER { _aGENTRANKNS0Slug = nil; [localException raise]; } NS_ENDHANDLER [_aGENTRANKNS0Slug autorelease]; return _aGENTRANKNS0Slug; } /** * Initialize this instance of AGENTRANKNS0Slug according to * the XML being read from the reader. * * @param reader The reader. */ - (id) initWithReader: (xmlTextReaderPtr) reader { return [super initWithReader: reader]; } /** * Write the XML for this instance of AGENTRANKNS0Slug to the writer. * Note that since we're only writing the XML type, * No start/end element will be written. * * @param reader The reader. */ - (void) writeXMLType: (xmlTextWriterPtr) writer { [super writeXMLType:writer]; } /** * Reads a AGENTRANKNS0Slug from an XML reader. The element to be read is * "slug". * * @param reader The XML reader. * @return The AGENTRANKNS0Slug. */ + (id) readXMLElement: (xmlTextReaderPtr) reader { int status; AGENTRANKNS0Slug *_slug = nil; if (xmlTextReaderNodeType(reader) != XML_READER_TYPE_ELEMENT) { status = xmlTextReaderAdvanceToNextStartOrEndElement(reader); if (status < 1) { [NSException raise: @"XMLReadError" format: @"Error advancing the reader to start element slug."]; } } if (xmlStrcmp(BAD_CAST "slug", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read root element {}slug."); #endif _slug = (AGENTRANKNS0Slug *)[AGENTRANKNS0Slug readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"Successfully read root element {}slug."); #endif } else { if (xmlTextReaderConstNamespaceUri(reader) == NULL) { [NSException raise: @"XMLReadError" format: @"Unable to read AGENTRANKNS0Slug. Expected element slug. Current element: {}%s", xmlTextReaderConstLocalName(reader)]; } else { [NSException raise: @"XMLReadError" format: @"Unable to read AGENTRANKNS0Slug. Expected element slug. Current element: {%s}%s\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)]; } } return _slug; } /** * Writes this AGENTRANKNS0Slug to XML under element name "slug". * The namespace declarations for the element will be written. * * @param writer The XML writer. * @param _slug The Slug to write. * @return 1 if successful, 0 otherwise. */ - (void) writeXMLElement: (xmlTextWriterPtr) writer { [self writeXMLElement: writer writeNamespaces: YES]; } /** * Writes this AGENTRANKNS0Slug to an XML writer. * * @param writer The writer. * @param writeNs Whether to write the namespaces for this element to the xml writer. */ - (void) writeXMLElement: (xmlTextWriterPtr) writer writeNamespaces: (BOOL) writeNs { int rc = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "slug", NULL); if (rc < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start element {}slug. XML writer status: %i\n", rc]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing type {}slug for root element {}slug..."); #endif [self writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote type {}slug for root element {}slug..."); #endif rc = xmlTextWriterEndElement(writer); if (rc < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end element {}slug. XML writer status: %i\n", rc]; } } //documentation inherited. - (BOOL) readJAXBAttribute: (xmlTextReaderPtr) reader { void *_child_accessor; if ([super readJAXBAttribute: reader]) { return YES; } if ((xmlStrcmp(BAD_CAST "type", xmlTextReaderConstLocalName(reader)) == 0) && (xmlTextReaderConstNamespaceUri(reader) == NULL)) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read attribute {}type..."); #endif _child_accessor = xmlTextReaderReadAGENTRANKNS0SlugTypeType(reader); if (_child_accessor == NULL) { //panic: unable to read the attribute value for some reason. [NSException raise: @"XMLReadError" format: @"Error reading attribute {}type."]; } [self setType: ((enum AGENTRANKNS0SlugType*) _child_accessor)]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read attribute {}type..."); #endif return YES; } return NO; } //documentation inherited. - (BOOL) readJAXBValue: (xmlTextReaderPtr) reader { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read element value..."); #endif if (xmlTextReaderIsEmptyElement(reader) == 0) { [self setValue: (NSString *) [NSString readXMLType: reader]]; } else { [self setValue: @""]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read element value..."); #endif return YES; } //documentation inherited. - (BOOL) readJAXBChildElement: (xmlTextReaderPtr) reader { return [super readJAXBChildElement: reader]; } //documentation inherited. - (int) readUnknownJAXBChildElement: (xmlTextReaderPtr) reader { return [super readUnknownJAXBChildElement: reader]; } //documentation inherited. - (void) readUnknownJAXBAttribute: (xmlTextReaderPtr) reader { [super readUnknownJAXBAttribute: reader]; } //documentation inherited. - (void) writeJAXBAttributes: (xmlTextWriterPtr) writer { int status; [super writeJAXBAttributes: writer]; if ([self type] != NULL) { status = xmlTextWriterStartAttributeNS(writer, NULL, BAD_CAST "type", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start attribute {}type."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing attribute {}type..."); #endif status = xmlTextWriterWriteAGENTRANKNS0SlugTypeType(writer, [self type]); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing attribute {}type."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote attribute {}type..."); #endif status = xmlTextWriterEndAttribute(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end attribute {}type."]; } } } //documentation inherited. - (void) writeJAXBValue: (xmlTextWriterPtr) writer { #if DEBUG_ENUNCIATE > 1 NSLog(@"writing element value..."); #endif [[self value] writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote element value..."); #endif } /** * Method for writing the child elements. * * @param writer The writer. */ - (void) writeJAXBChildElements: (xmlTextWriterPtr) writer { [super writeJAXBChildElements: writer]; } @end /* implementation AGENTRANKNS0Slug (JAXB) */ #endif /* DEF_AGENTRANKNS0Slug_M */ #ifndef DEF_AGENTRANKNS0Status_M #define DEF_AGENTRANKNS0Status_M /** * User: marc Date: May 13, 2009 Time: 5:37:18 AM

THIS SOFTWARE IS COPYRIGHTED. THE SOFTWARE MAY NOT BE COPIED REPRODUCED, TRANSLATED, OR REDUCED TO ANY ELECTRONIC MEDIUM OR MACHINE READABLE FORM WITHOUT THE PRIOR WRITTEN CONSENT OF SOCO TECHNOLOGIES. */ @implementation AGENTRANKNS0Status /** * (no documentation provided) */ - (int) code { return _code; } /** * (no documentation provided) */ - (void) setCode: (int) newCode { _code = newCode; } /** * (no documentation provided) */ - (AGENTRANKNS0Messages *) messages { return _messages; } /** * (no documentation provided) */ - (void) setMessages: (AGENTRANKNS0Messages *) newMessages { [newMessages retain]; [_messages release]; _messages = newMessages; } - (void) dealloc { [self setMessages: nil]; [super dealloc]; } //documentation inherited. + (id) readFromXML: (NSData *) xml { AGENTRANKNS0Status *_aGENTRANKNS0Status; xmlTextReaderPtr reader = xmlReaderForMemory([xml bytes], [xml length], NULL, NULL, 0); if (reader == NULL) { [NSException raise: @"XMLReadError" format: @"Error instantiating an XML reader."]; return nil; } _aGENTRANKNS0Status = (AGENTRANKNS0Status *) [AGENTRANKNS0Status readXMLElement: reader]; xmlFreeTextReader(reader); //free the reader return _aGENTRANKNS0Status; } //documentation inherited. - (NSData *) writeToXML { xmlBufferPtr buf; xmlTextWriterPtr writer; int rc; NSData *data; buf = xmlBufferCreate(); if (buf == NULL) { [NSException raise: @"XMLWriteError" format: @"Error creating an XML buffer."]; return nil; } writer = xmlNewTextWriterMemory(buf, 0); if (writer == NULL) { xmlBufferFree(buf); [NSException raise: @"XMLWriteError" format: @"Error creating an XML writer."]; return nil; } rc = xmlTextWriterStartDocument(writer, NULL, "utf-8", NULL); if (rc < 0) { xmlFreeTextWriter(writer); xmlBufferFree(buf); [NSException raise: @"XMLWriteError" format: @"Error writing XML start document."]; return nil; } NS_DURING { [self writeXMLElement: writer]; } NS_HANDLER { xmlFreeTextWriter(writer); xmlBufferFree(buf); [localException raise]; } NS_ENDHANDLER rc = xmlTextWriterEndDocument(writer); if (rc < 0) { xmlFreeTextWriter(writer); xmlBufferFree(buf); [NSException raise: @"XMLWriteError" format: @"Error writing XML end document."]; return nil; } xmlFreeTextWriter(writer); data = [NSData dataWithBytes: buf->content length: buf->use]; xmlBufferFree(buf); return data; } @end /* implementation AGENTRANKNS0Status */ /** * Internal, private interface for JAXB reading and writing. */ @interface AGENTRANKNS0Status (JAXB) @end /*interface AGENTRANKNS0Status (JAXB)*/ /** * Internal, private implementation for JAXB reading and writing. */ @implementation AGENTRANKNS0Status (JAXB) /** * Read an instance of AGENTRANKNS0Status from an XML reader. * * @param reader The reader. * @return An instance of AGENTRANKNS0Status defined by the XML reader. */ + (id) readXMLType: (xmlTextReaderPtr) reader { AGENTRANKNS0Status *_aGENTRANKNS0Status = [[AGENTRANKNS0Status alloc] init]; NS_DURING { [_aGENTRANKNS0Status initWithReader: reader]; } NS_HANDLER { _aGENTRANKNS0Status = nil; [localException raise]; } NS_ENDHANDLER [_aGENTRANKNS0Status autorelease]; return _aGENTRANKNS0Status; } /** * Initialize this instance of AGENTRANKNS0Status according to * the XML being read from the reader. * * @param reader The reader. */ - (id) initWithReader: (xmlTextReaderPtr) reader { return [super initWithReader: reader]; } /** * Write the XML for this instance of AGENTRANKNS0Status to the writer. * Note that since we're only writing the XML type, * No start/end element will be written. * * @param reader The reader. */ - (void) writeXMLType: (xmlTextWriterPtr) writer { [super writeXMLType:writer]; } /** * Reads a AGENTRANKNS0Status from an XML reader. The element to be read is * "status". * * @param reader The XML reader. * @return The AGENTRANKNS0Status. */ + (id) readXMLElement: (xmlTextReaderPtr) reader { int status; AGENTRANKNS0Status *_status = nil; if (xmlTextReaderNodeType(reader) != XML_READER_TYPE_ELEMENT) { status = xmlTextReaderAdvanceToNextStartOrEndElement(reader); if (status < 1) { [NSException raise: @"XMLReadError" format: @"Error advancing the reader to start element status."]; } } if (xmlStrcmp(BAD_CAST "status", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read root element {}status."); #endif _status = (AGENTRANKNS0Status *)[AGENTRANKNS0Status readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"Successfully read root element {}status."); #endif } else { if (xmlTextReaderConstNamespaceUri(reader) == NULL) { [NSException raise: @"XMLReadError" format: @"Unable to read AGENTRANKNS0Status. Expected element status. Current element: {}%s", xmlTextReaderConstLocalName(reader)]; } else { [NSException raise: @"XMLReadError" format: @"Unable to read AGENTRANKNS0Status. Expected element status. Current element: {%s}%s\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)]; } } return _status; } /** * Writes this AGENTRANKNS0Status to XML under element name "status". * The namespace declarations for the element will be written. * * @param writer The XML writer. * @param _status The Status to write. * @return 1 if successful, 0 otherwise. */ - (void) writeXMLElement: (xmlTextWriterPtr) writer { [self writeXMLElement: writer writeNamespaces: YES]; } /** * Writes this AGENTRANKNS0Status to an XML writer. * * @param writer The writer. * @param writeNs Whether to write the namespaces for this element to the xml writer. */ - (void) writeXMLElement: (xmlTextWriterPtr) writer writeNamespaces: (BOOL) writeNs { int rc = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "status", NULL); if (rc < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start element {}status. XML writer status: %i\n", rc]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing type {}status for root element {}status..."); #endif [self writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote type {}status for root element {}status..."); #endif rc = xmlTextWriterEndElement(writer); if (rc < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end element {}status. XML writer status: %i\n", rc]; } } //documentation inherited. - (BOOL) readJAXBAttribute: (xmlTextReaderPtr) reader { void *_child_accessor; if ([super readJAXBAttribute: reader]) { return YES; } if ((xmlStrcmp(BAD_CAST "code", xmlTextReaderConstLocalName(reader)) == 0) && (xmlTextReaderConstNamespaceUri(reader) == NULL)) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read attribute {}code..."); #endif _child_accessor = xmlTextReaderReadIntType(reader); if (_child_accessor == NULL) { //panic: unable to read the attribute value for some reason. [NSException raise: @"XMLReadError" format: @"Error reading attribute {}code."]; } [self setCode: *((int*) _child_accessor)]; free(_child_accessor); #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read attribute {}code..."); #endif return YES; } return NO; } //documentation inherited. - (BOOL) readJAXBValue: (xmlTextReaderPtr) reader { return [super readJAXBValue: reader]; } //documentation inherited. - (BOOL) readJAXBChildElement: (xmlTextReaderPtr) reader { id __child; void *_child_accessor; int status, depth; if ([super readJAXBChildElement: reader]) { return YES; } if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "messages", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read choice {}messages of type {}messages."); #endif __child = [AGENTRANKNS0Messages readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read choice {}messages of type {}messages."); #endif [self setMessages: __child]; return YES; } //end "if choice" return NO; } //documentation inherited. - (int) readUnknownJAXBChildElement: (xmlTextReaderPtr) reader { return [super readUnknownJAXBChildElement: reader]; } //documentation inherited. - (void) readUnknownJAXBAttribute: (xmlTextReaderPtr) reader { [super readUnknownJAXBAttribute: reader]; } //documentation inherited. - (void) writeJAXBAttributes: (xmlTextWriterPtr) writer { int status; [super writeJAXBAttributes: writer]; if (YES) { //always write the primitive attributes... status = xmlTextWriterStartAttributeNS(writer, NULL, BAD_CAST "code", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start attribute {}code."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing attribute {}code..."); #endif status = xmlTextWriterWriteIntType(writer, &_code); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing attribute {}code."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote attribute {}code..."); #endif status = xmlTextWriterEndAttribute(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end attribute {}code."]; } } } //documentation inherited. - (void) writeJAXBValue: (xmlTextWriterPtr) writer { [super writeJAXBValue: writer]; } /** * Method for writing the child elements. * * @param writer The writer. */ - (void) writeJAXBChildElements: (xmlTextWriterPtr) writer { int status; id __item; NSEnumerator *__enumerator; [super writeJAXBChildElements: writer]; if ([self messages]) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "messages", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start child element {}messages."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing element {}messages..."); #endif [[self messages] writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote element {}messages..."); #endif status = xmlTextWriterEndElement(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end child element {}messages."]; } } } @end /* implementation AGENTRANKNS0Status (JAXB) */ #endif /* DEF_AGENTRANKNS0Status_M */ #ifndef DEF_AGENTRANKNS0Timestamp_M #define DEF_AGENTRANKNS0Timestamp_M /** * Created by IntelliJ IDEA. User: marc Date: Aug 25, 2010 Time: 9:46:16 AM */ @implementation AGENTRANKNS0Timestamp /** * (no documentation provided) */ - (long) time { return _time; } /** * (no documentation provided) */ - (void) setTime: (long) newTime { _time = newTime; } /** * (no documentation provided) */ - (NSString *) value { return _value; } /** * (no documentation provided) */ - (void) setValue: (NSString *) newValue { [newValue retain]; [_value release]; _value = newValue; } - (void) dealloc { [self setValue: nil]; [super dealloc]; } //documentation inherited. + (id) readFromXML: (NSData *) xml { AGENTRANKNS0Timestamp *_aGENTRANKNS0Timestamp; xmlTextReaderPtr reader = xmlReaderForMemory([xml bytes], [xml length], NULL, NULL, 0); if (reader == NULL) { [NSException raise: @"XMLReadError" format: @"Error instantiating an XML reader."]; return nil; } _aGENTRANKNS0Timestamp = (AGENTRANKNS0Timestamp *) [AGENTRANKNS0Timestamp readXMLElement: reader]; xmlFreeTextReader(reader); //free the reader return _aGENTRANKNS0Timestamp; } //documentation inherited. - (NSData *) writeToXML { xmlBufferPtr buf; xmlTextWriterPtr writer; int rc; NSData *data; buf = xmlBufferCreate(); if (buf == NULL) { [NSException raise: @"XMLWriteError" format: @"Error creating an XML buffer."]; return nil; } writer = xmlNewTextWriterMemory(buf, 0); if (writer == NULL) { xmlBufferFree(buf); [NSException raise: @"XMLWriteError" format: @"Error creating an XML writer."]; return nil; } rc = xmlTextWriterStartDocument(writer, NULL, "utf-8", NULL); if (rc < 0) { xmlFreeTextWriter(writer); xmlBufferFree(buf); [NSException raise: @"XMLWriteError" format: @"Error writing XML start document."]; return nil; } NS_DURING { [self writeXMLElement: writer]; } NS_HANDLER { xmlFreeTextWriter(writer); xmlBufferFree(buf); [localException raise]; } NS_ENDHANDLER rc = xmlTextWriterEndDocument(writer); if (rc < 0) { xmlFreeTextWriter(writer); xmlBufferFree(buf); [NSException raise: @"XMLWriteError" format: @"Error writing XML end document."]; return nil; } xmlFreeTextWriter(writer); data = [NSData dataWithBytes: buf->content length: buf->use]; xmlBufferFree(buf); return data; } @end /* implementation AGENTRANKNS0Timestamp */ /** * Internal, private interface for JAXB reading and writing. */ @interface AGENTRANKNS0Timestamp (JAXB) @end /*interface AGENTRANKNS0Timestamp (JAXB)*/ /** * Internal, private implementation for JAXB reading and writing. */ @implementation AGENTRANKNS0Timestamp (JAXB) /** * Read an instance of AGENTRANKNS0Timestamp from an XML reader. * * @param reader The reader. * @return An instance of AGENTRANKNS0Timestamp defined by the XML reader. */ + (id) readXMLType: (xmlTextReaderPtr) reader { AGENTRANKNS0Timestamp *_aGENTRANKNS0Timestamp = [[AGENTRANKNS0Timestamp alloc] init]; NS_DURING { [_aGENTRANKNS0Timestamp initWithReader: reader]; } NS_HANDLER { _aGENTRANKNS0Timestamp = nil; [localException raise]; } NS_ENDHANDLER [_aGENTRANKNS0Timestamp autorelease]; return _aGENTRANKNS0Timestamp; } /** * Initialize this instance of AGENTRANKNS0Timestamp according to * the XML being read from the reader. * * @param reader The reader. */ - (id) initWithReader: (xmlTextReaderPtr) reader { return [super initWithReader: reader]; } /** * Write the XML for this instance of AGENTRANKNS0Timestamp to the writer. * Note that since we're only writing the XML type, * No start/end element will be written. * * @param reader The reader. */ - (void) writeXMLType: (xmlTextWriterPtr) writer { [super writeXMLType:writer]; } /** * Reads a AGENTRANKNS0Timestamp from an XML reader. The element to be read is * "timestamp". * * @param reader The XML reader. * @return The AGENTRANKNS0Timestamp. */ + (id) readXMLElement: (xmlTextReaderPtr) reader { int status; AGENTRANKNS0Timestamp *_timestamp = nil; if (xmlTextReaderNodeType(reader) != XML_READER_TYPE_ELEMENT) { status = xmlTextReaderAdvanceToNextStartOrEndElement(reader); if (status < 1) { [NSException raise: @"XMLReadError" format: @"Error advancing the reader to start element timestamp."]; } } if (xmlStrcmp(BAD_CAST "timestamp", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read root element {}timestamp."); #endif _timestamp = (AGENTRANKNS0Timestamp *)[AGENTRANKNS0Timestamp readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"Successfully read root element {}timestamp."); #endif } else { if (xmlTextReaderConstNamespaceUri(reader) == NULL) { [NSException raise: @"XMLReadError" format: @"Unable to read AGENTRANKNS0Timestamp. Expected element timestamp. Current element: {}%s", xmlTextReaderConstLocalName(reader)]; } else { [NSException raise: @"XMLReadError" format: @"Unable to read AGENTRANKNS0Timestamp. Expected element timestamp. Current element: {%s}%s\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)]; } } return _timestamp; } /** * Writes this AGENTRANKNS0Timestamp to XML under element name "timestamp". * The namespace declarations for the element will be written. * * @param writer The XML writer. * @param _timestamp The Timestamp to write. * @return 1 if successful, 0 otherwise. */ - (void) writeXMLElement: (xmlTextWriterPtr) writer { [self writeXMLElement: writer writeNamespaces: YES]; } /** * Writes this AGENTRANKNS0Timestamp to an XML writer. * * @param writer The writer. * @param writeNs Whether to write the namespaces for this element to the xml writer. */ - (void) writeXMLElement: (xmlTextWriterPtr) writer writeNamespaces: (BOOL) writeNs { int rc = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "timestamp", NULL); if (rc < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start element {}timestamp. XML writer status: %i\n", rc]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing type {}timestamp for root element {}timestamp..."); #endif [self writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote type {}timestamp for root element {}timestamp..."); #endif rc = xmlTextWriterEndElement(writer); if (rc < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end element {}timestamp. XML writer status: %i\n", rc]; } } //documentation inherited. - (BOOL) readJAXBAttribute: (xmlTextReaderPtr) reader { void *_child_accessor; if ([super readJAXBAttribute: reader]) { return YES; } if ((xmlStrcmp(BAD_CAST "time", xmlTextReaderConstLocalName(reader)) == 0) && (xmlTextReaderConstNamespaceUri(reader) == NULL)) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read attribute {}time..."); #endif _child_accessor = xmlTextReaderReadLongType(reader); if (_child_accessor == NULL) { //panic: unable to read the attribute value for some reason. [NSException raise: @"XMLReadError" format: @"Error reading attribute {}time."]; } [self setTime: *((long*) _child_accessor)]; free(_child_accessor); #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read attribute {}time..."); #endif return YES; } return NO; } //documentation inherited. - (BOOL) readJAXBValue: (xmlTextReaderPtr) reader { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read element value..."); #endif if (xmlTextReaderIsEmptyElement(reader) == 0) { [self setValue: (NSString *) [NSString readXMLType: reader]]; } else { [self setValue: @""]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read element value..."); #endif return YES; } //documentation inherited. - (BOOL) readJAXBChildElement: (xmlTextReaderPtr) reader { return [super readJAXBChildElement: reader]; } //documentation inherited. - (int) readUnknownJAXBChildElement: (xmlTextReaderPtr) reader { return [super readUnknownJAXBChildElement: reader]; } //documentation inherited. - (void) readUnknownJAXBAttribute: (xmlTextReaderPtr) reader { [super readUnknownJAXBAttribute: reader]; } //documentation inherited. - (void) writeJAXBAttributes: (xmlTextWriterPtr) writer { int status; [super writeJAXBAttributes: writer]; if (YES) { //always write the primitive attributes... status = xmlTextWriterStartAttributeNS(writer, NULL, BAD_CAST "time", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start attribute {}time."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing attribute {}time..."); #endif status = xmlTextWriterWriteLongType(writer, &_time); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing attribute {}time."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote attribute {}time..."); #endif status = xmlTextWriterEndAttribute(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end attribute {}time."]; } } } //documentation inherited. - (void) writeJAXBValue: (xmlTextWriterPtr) writer { #if DEBUG_ENUNCIATE > 1 NSLog(@"writing element value..."); #endif [[self value] writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote element value..."); #endif } /** * Method for writing the child elements. * * @param writer The writer. */ - (void) writeJAXBChildElements: (xmlTextWriterPtr) writer { [super writeJAXBChildElements: writer]; } @end /* implementation AGENTRANKNS0Timestamp (JAXB) */ #endif /* DEF_AGENTRANKNS0Timestamp_M */ #ifndef DEF_AGENTRANKNS0GetUser_M #define DEF_AGENTRANKNS0GetUser_M /** * Created by IntelliJ IDEA. User: marc Date: Jul 24, 2010 Time: 7:07:31 AM */ @implementation AGENTRANKNS0GetUser /** * user */ - (AGENTRANKNS0User *) user { return _user; } /** * user */ - (void) setUser: (AGENTRANKNS0User *) newUser { [newUser retain]; [_user release]; _user = newUser; } /** * status */ - (AGENTRANKNS0Status *) status { return _status; } /** * status */ - (void) setStatus: (AGENTRANKNS0Status *) newStatus { [newStatus retain]; [_status release]; _status = newStatus; } - (void) dealloc { [self setUser: nil]; [self setStatus: nil]; [super dealloc]; } //documentation inherited. + (id) readFromXML: (NSData *) xml { AGENTRANKNS0GetUser *_aGENTRANKNS0GetUser; xmlTextReaderPtr reader = xmlReaderForMemory([xml bytes], [xml length], NULL, NULL, 0); if (reader == NULL) { [NSException raise: @"XMLReadError" format: @"Error instantiating an XML reader."]; return nil; } _aGENTRANKNS0GetUser = (AGENTRANKNS0GetUser *) [AGENTRANKNS0GetUser readXMLElement: reader]; xmlFreeTextReader(reader); //free the reader return _aGENTRANKNS0GetUser; } //documentation inherited. - (NSData *) writeToXML { xmlBufferPtr buf; xmlTextWriterPtr writer; int rc; NSData *data; buf = xmlBufferCreate(); if (buf == NULL) { [NSException raise: @"XMLWriteError" format: @"Error creating an XML buffer."]; return nil; } writer = xmlNewTextWriterMemory(buf, 0); if (writer == NULL) { xmlBufferFree(buf); [NSException raise: @"XMLWriteError" format: @"Error creating an XML writer."]; return nil; } rc = xmlTextWriterStartDocument(writer, NULL, "utf-8", NULL); if (rc < 0) { xmlFreeTextWriter(writer); xmlBufferFree(buf); [NSException raise: @"XMLWriteError" format: @"Error writing XML start document."]; return nil; } NS_DURING { [self writeXMLElement: writer]; } NS_HANDLER { xmlFreeTextWriter(writer); xmlBufferFree(buf); [localException raise]; } NS_ENDHANDLER rc = xmlTextWriterEndDocument(writer); if (rc < 0) { xmlFreeTextWriter(writer); xmlBufferFree(buf); [NSException raise: @"XMLWriteError" format: @"Error writing XML end document."]; return nil; } xmlFreeTextWriter(writer); data = [NSData dataWithBytes: buf->content length: buf->use]; xmlBufferFree(buf); return data; } @end /* implementation AGENTRANKNS0GetUser */ /** * Internal, private interface for JAXB reading and writing. */ @interface AGENTRANKNS0GetUser (JAXB) @end /*interface AGENTRANKNS0GetUser (JAXB)*/ /** * Internal, private implementation for JAXB reading and writing. */ @implementation AGENTRANKNS0GetUser (JAXB) /** * Read an instance of AGENTRANKNS0GetUser from an XML reader. * * @param reader The reader. * @return An instance of AGENTRANKNS0GetUser defined by the XML reader. */ + (id) readXMLType: (xmlTextReaderPtr) reader { AGENTRANKNS0GetUser *_aGENTRANKNS0GetUser = [[AGENTRANKNS0GetUser alloc] init]; NS_DURING { [_aGENTRANKNS0GetUser initWithReader: reader]; } NS_HANDLER { _aGENTRANKNS0GetUser = nil; [localException raise]; } NS_ENDHANDLER [_aGENTRANKNS0GetUser autorelease]; return _aGENTRANKNS0GetUser; } /** * Initialize this instance of AGENTRANKNS0GetUser according to * the XML being read from the reader. * * @param reader The reader. */ - (id) initWithReader: (xmlTextReaderPtr) reader { return [super initWithReader: reader]; } /** * Write the XML for this instance of AGENTRANKNS0GetUser to the writer. * Note that since we're only writing the XML type, * No start/end element will be written. * * @param reader The reader. */ - (void) writeXMLType: (xmlTextWriterPtr) writer { [super writeXMLType:writer]; } /** * Reads a AGENTRANKNS0GetUser from an XML reader. The element to be read is * "response". * * @param reader The XML reader. * @return The AGENTRANKNS0GetUser. */ + (id) readXMLElement: (xmlTextReaderPtr) reader { int status; AGENTRANKNS0GetUser *_getUser = nil; if (xmlTextReaderNodeType(reader) != XML_READER_TYPE_ELEMENT) { status = xmlTextReaderAdvanceToNextStartOrEndElement(reader); if (status < 1) { [NSException raise: @"XMLReadError" format: @"Error advancing the reader to start element response."]; } } if (xmlStrcmp(BAD_CAST "response", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read root element {}response."); #endif _getUser = (AGENTRANKNS0GetUser *)[AGENTRANKNS0GetUser readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"Successfully read root element {}response."); #endif } else { if (xmlTextReaderConstNamespaceUri(reader) == NULL) { [NSException raise: @"XMLReadError" format: @"Unable to read AGENTRANKNS0GetUser. Expected element response. Current element: {}%s", xmlTextReaderConstLocalName(reader)]; } else { [NSException raise: @"XMLReadError" format: @"Unable to read AGENTRANKNS0GetUser. Expected element response. Current element: {%s}%s\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)]; } } return _getUser; } /** * Writes this AGENTRANKNS0GetUser to XML under element name "response". * The namespace declarations for the element will be written. * * @param writer The XML writer. * @param _getUser The GetUser to write. * @return 1 if successful, 0 otherwise. */ - (void) writeXMLElement: (xmlTextWriterPtr) writer { [self writeXMLElement: writer writeNamespaces: YES]; } /** * Writes this AGENTRANKNS0GetUser to an XML writer. * * @param writer The writer. * @param writeNs Whether to write the namespaces for this element to the xml writer. */ - (void) writeXMLElement: (xmlTextWriterPtr) writer writeNamespaces: (BOOL) writeNs { int rc = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "response", NULL); if (rc < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start element {}response. XML writer status: %i\n", rc]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing type {}getUser for root element {}response..."); #endif [self writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote type {}getUser for root element {}response..."); #endif rc = xmlTextWriterEndElement(writer); if (rc < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end element {}response. XML writer status: %i\n", rc]; } } //documentation inherited. - (BOOL) readJAXBAttribute: (xmlTextReaderPtr) reader { void *_child_accessor; if ([super readJAXBAttribute: reader]) { return YES; } return NO; } //documentation inherited. - (BOOL) readJAXBValue: (xmlTextReaderPtr) reader { return [super readJAXBValue: reader]; } //documentation inherited. - (BOOL) readJAXBChildElement: (xmlTextReaderPtr) reader { id __child; void *_child_accessor; int status, depth; if ([super readJAXBChildElement: reader]) { return YES; } if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "user", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read choice {}user of type {}user."); #endif __child = [AGENTRANKNS0User readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read choice {}user of type {}user."); #endif [self setUser: __child]; return YES; } //end "if choice" if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "status", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read choice {}status of type {}status."); #endif __child = [AGENTRANKNS0Status readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read choice {}status of type {}status."); #endif [self setStatus: __child]; return YES; } //end "if choice" return NO; } //documentation inherited. - (int) readUnknownJAXBChildElement: (xmlTextReaderPtr) reader { return [super readUnknownJAXBChildElement: reader]; } //documentation inherited. - (void) readUnknownJAXBAttribute: (xmlTextReaderPtr) reader { [super readUnknownJAXBAttribute: reader]; } //documentation inherited. - (void) writeJAXBAttributes: (xmlTextWriterPtr) writer { int status; [super writeJAXBAttributes: writer]; } //documentation inherited. - (void) writeJAXBValue: (xmlTextWriterPtr) writer { [super writeJAXBValue: writer]; } /** * Method for writing the child elements. * * @param writer The writer. */ - (void) writeJAXBChildElements: (xmlTextWriterPtr) writer { int status; id __item; NSEnumerator *__enumerator; [super writeJAXBChildElements: writer]; if ([self user]) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "user", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start child element {}user."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing element {}user..."); #endif [[self user] writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote element {}user..."); #endif status = xmlTextWriterEndElement(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end child element {}user."]; } } if ([self status]) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "status", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start child element {}status."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing element {}status..."); #endif [[self status] writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote element {}status..."); #endif status = xmlTextWriterEndElement(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end child element {}status."]; } } } @end /* implementation AGENTRANKNS0GetUser (JAXB) */ #endif /* DEF_AGENTRANKNS0GetUser_M */ #ifndef DEF_AGENTRANKNS0Review_M #define DEF_AGENTRANKNS0Review_M /** * User: marc Date: Mar 4, 2008 Time: 6:39:03 PM

THIS SOFTWARE IS COPYRIGHTED. THE SOFTWARE MAY NOT BE COPIED REPRODUCED, TRANSLATED, OR REDUCED TO ANY ELECTRONIC MEDIUM OR MACHINE READABLE FORM WITHOUT THE PRIOR WRITTEN CONSENT OF SOCO TECHNOLOGIES. */ @implementation AGENTRANKNS0Review /** * (no documentation provided) */ - (int *) identifier { return _identifier; } /** * (no documentation provided) */ - (void) setIdentifier: (int *) newIdentifier { if (_identifier != NULL) { free(_identifier); } _identifier = newIdentifier; } /** * (no documentation provided) */ - (NSString *) key { return _key; } /** * (no documentation provided) */ - (void) setKey: (NSString *) newKey { [newKey retain]; [_key release]; _key = newKey; } /** * link */ - (AGENTRANKNS0Link *) link { return _link; } /** * link */ - (void) setLink: (AGENTRANKNS0Link *) newLink { [newLink retain]; [_link release]; _link = newLink; } /** * (no documentation provided) */ - (NSDate *) date { return _date; } /** * (no documentation provided) */ - (void) setDate: (NSDate *) newDate { [newDate retain]; [_date release]; _date = newDate; } /** * (no documentation provided) */ - (AGENTRANKNS0Slugs *) slugs { return _slugs; } /** * (no documentation provided) */ - (void) setSlugs: (AGENTRANKNS0Slugs *) newSlugs { [newSlugs retain]; [_slugs release]; _slugs = newSlugs; } /** * (no documentation provided) */ - (NSString *) name { return _name; } /** * (no documentation provided) */ - (void) setName: (NSString *) newName { [newName retain]; [_name release]; _name = newName; } /** * (no documentation provided) */ - (NSString *) email { return _email; } /** * (no documentation provided) */ - (void) setEmail: (NSString *) newEmail { [newEmail retain]; [_email release]; _email = newEmail; } /** * (no documentation provided) */ - (NSString *) title { return _title; } /** * (no documentation provided) */ - (void) setTitle: (NSString *) newTitle { [newTitle retain]; [_title release]; _title = newTitle; } /** * (no documentation provided) */ - (NSString *) comment { return _comment; } /** * (no documentation provided) */ - (void) setComment: (NSString *) newComment { [newComment retain]; [_comment release]; _comment = newComment; } /** * (no documentation provided) */ - (NSString *) satisfied { return _satisfied; } /** * (no documentation provided) */ - (void) setSatisfied: (NSString *) newSatisfied { [newSatisfied retain]; [_satisfied release]; _satisfied = newSatisfied; } /** * (no documentation provided) */ - (NSString *) recommend { return _recommend; } /** * (no documentation provided) */ - (void) setRecommend: (NSString *) newRecommend { [newRecommend retain]; [_recommend release]; _recommend = newRecommend; } - (void) dealloc { [self setIdentifier: NULL]; [self setKey: nil]; [self setLink: nil]; [self setDate: nil]; [self setSlugs: nil]; [self setName: nil]; [self setEmail: nil]; [self setTitle: nil]; [self setComment: nil]; [self setSatisfied: nil]; [self setRecommend: nil]; [super dealloc]; } @end /* implementation AGENTRANKNS0Review */ /** * Internal, private interface for JAXB reading and writing. */ @interface AGENTRANKNS0Review (JAXB) @end /*interface AGENTRANKNS0Review (JAXB)*/ /** * Internal, private implementation for JAXB reading and writing. */ @implementation AGENTRANKNS0Review (JAXB) /** * Read an instance of AGENTRANKNS0Review from an XML reader. * * @param reader The reader. * @return An instance of AGENTRANKNS0Review defined by the XML reader. */ + (id) readXMLType: (xmlTextReaderPtr) reader { AGENTRANKNS0Review *_aGENTRANKNS0Review = [[AGENTRANKNS0Review alloc] init]; NS_DURING { [_aGENTRANKNS0Review initWithReader: reader]; } NS_HANDLER { _aGENTRANKNS0Review = nil; [localException raise]; } NS_ENDHANDLER [_aGENTRANKNS0Review autorelease]; return _aGENTRANKNS0Review; } /** * Initialize this instance of AGENTRANKNS0Review according to * the XML being read from the reader. * * @param reader The reader. */ - (id) initWithReader: (xmlTextReaderPtr) reader { return [super initWithReader: reader]; } /** * Write the XML for this instance of AGENTRANKNS0Review to the writer. * Note that since we're only writing the XML type, * No start/end element will be written. * * @param reader The reader. */ - (void) writeXMLType: (xmlTextWriterPtr) writer { [super writeXMLType:writer]; } //documentation inherited. - (BOOL) readJAXBAttribute: (xmlTextReaderPtr) reader { void *_child_accessor; if ([super readJAXBAttribute: reader]) { return YES; } if ((xmlStrcmp(BAD_CAST "id", xmlTextReaderConstLocalName(reader)) == 0) && (xmlTextReaderConstNamespaceUri(reader) == NULL)) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read attribute {}id..."); #endif _child_accessor = xmlTextReaderReadIntType(reader); if (_child_accessor == NULL) { //panic: unable to read the attribute value for some reason. [NSException raise: @"XMLReadError" format: @"Error reading attribute {}id."]; } [self setIdentifier: ((int*) _child_accessor)]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read attribute {}id..."); #endif return YES; } if ((xmlStrcmp(BAD_CAST "key", xmlTextReaderConstLocalName(reader)) == 0) && (xmlTextReaderConstNamespaceUri(reader) == NULL)) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read attribute {}key..."); #endif [self setKey: (NSString*) [NSString readXMLType: reader]]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read attribute {}key..."); #endif return YES; } return NO; } //documentation inherited. - (BOOL) readJAXBValue: (xmlTextReaderPtr) reader { return [super readJAXBValue: reader]; } //documentation inherited. - (BOOL) readJAXBChildElement: (xmlTextReaderPtr) reader { id __child; void *_child_accessor; int status, depth; if ([super readJAXBChildElement: reader]) { return YES; } if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "link", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read choice {}link of type {}link."); #endif __child = [AGENTRANKNS0Link readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read choice {}link of type {}link."); #endif [self setLink: __child]; return YES; } //end "if choice" if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "date", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read choice {}date of type {http://www.w3.org/2001/XMLSchema}dateTime."); #endif __child = [NSDate readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read choice {}date of type {http://www.w3.org/2001/XMLSchema}dateTime."); #endif [self setDate: __child]; return YES; } //end "if choice" if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "slugs", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read choice {}slugs of type {}slugs."); #endif __child = [AGENTRANKNS0Slugs readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read choice {}slugs of type {}slugs."); #endif [self setSlugs: __child]; return YES; } //end "if choice" if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "name", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read choice {}name of type {http://www.w3.org/2001/XMLSchema}string."); #endif __child = [NSString readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read choice {}name of type {http://www.w3.org/2001/XMLSchema}string."); #endif [self setName: __child]; return YES; } //end "if choice" if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "email", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read choice {}email of type {http://www.w3.org/2001/XMLSchema}string."); #endif __child = [NSString readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read choice {}email of type {http://www.w3.org/2001/XMLSchema}string."); #endif [self setEmail: __child]; return YES; } //end "if choice" if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "title", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read choice {}title of type {http://www.w3.org/2001/XMLSchema}string."); #endif __child = [NSString readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read choice {}title of type {http://www.w3.org/2001/XMLSchema}string."); #endif [self setTitle: __child]; return YES; } //end "if choice" if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "comment", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read choice {}comment of type {http://www.w3.org/2001/XMLSchema}string."); #endif __child = [NSString readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read choice {}comment of type {http://www.w3.org/2001/XMLSchema}string."); #endif [self setComment: __child]; return YES; } //end "if choice" if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "satisfied", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read choice {}satisfied of type {http://www.w3.org/2001/XMLSchema}string."); #endif __child = [NSString readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read choice {}satisfied of type {http://www.w3.org/2001/XMLSchema}string."); #endif [self setSatisfied: __child]; return YES; } //end "if choice" if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "recommend", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read choice {}recommend of type {http://www.w3.org/2001/XMLSchema}string."); #endif __child = [NSString readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read choice {}recommend of type {http://www.w3.org/2001/XMLSchema}string."); #endif [self setRecommend: __child]; return YES; } //end "if choice" return NO; } //documentation inherited. - (int) readUnknownJAXBChildElement: (xmlTextReaderPtr) reader { return [super readUnknownJAXBChildElement: reader]; } //documentation inherited. - (void) readUnknownJAXBAttribute: (xmlTextReaderPtr) reader { [super readUnknownJAXBAttribute: reader]; } //documentation inherited. - (void) writeJAXBAttributes: (xmlTextWriterPtr) writer { int status; [super writeJAXBAttributes: writer]; if ([self identifier] != NULL) { status = xmlTextWriterStartAttributeNS(writer, NULL, BAD_CAST "id", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start attribute {}id."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing attribute {}id..."); #endif status = xmlTextWriterWriteIntType(writer, [self identifier]); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing attribute {}id."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote attribute {}id..."); #endif status = xmlTextWriterEndAttribute(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end attribute {}id."]; } } if ([self key]) { status = xmlTextWriterStartAttributeNS(writer, NULL, BAD_CAST "key", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start attribute {}key."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing attribute {}key..."); #endif [[self key] writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote attribute {}key..."); #endif status = xmlTextWriterEndAttribute(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end attribute {}key."]; } } } //documentation inherited. - (void) writeJAXBValue: (xmlTextWriterPtr) writer { [super writeJAXBValue: writer]; } /** * Method for writing the child elements. * * @param writer The writer. */ - (void) writeJAXBChildElements: (xmlTextWriterPtr) writer { int status; id __item; NSEnumerator *__enumerator; [super writeJAXBChildElements: writer]; if ([self link]) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "link", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start child element {}link."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing element {}link..."); #endif [[self link] writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote element {}link..."); #endif status = xmlTextWriterEndElement(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end child element {}link."]; } } if ([self date]) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "date", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start child element {}date."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing element {}date..."); #endif [[self date] writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote element {}date..."); #endif status = xmlTextWriterEndElement(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end child element {}date."]; } } if ([self slugs]) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "slugs", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start child element {}slugs."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing element {}slugs..."); #endif [[self slugs] writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote element {}slugs..."); #endif status = xmlTextWriterEndElement(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end child element {}slugs."]; } } if ([self name]) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "name", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start child element {}name."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing element {}name..."); #endif [[self name] writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote element {}name..."); #endif status = xmlTextWriterEndElement(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end child element {}name."]; } } if ([self email]) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "email", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start child element {}email."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing element {}email..."); #endif [[self email] writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote element {}email..."); #endif status = xmlTextWriterEndElement(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end child element {}email."]; } } if ([self title]) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "title", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start child element {}title."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing element {}title..."); #endif [[self title] writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote element {}title..."); #endif status = xmlTextWriterEndElement(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end child element {}title."]; } } if ([self comment]) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "comment", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start child element {}comment."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing element {}comment..."); #endif [[self comment] writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote element {}comment..."); #endif status = xmlTextWriterEndElement(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end child element {}comment."]; } } if ([self satisfied]) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "satisfied", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start child element {}satisfied."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing element {}satisfied..."); #endif [[self satisfied] writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote element {}satisfied..."); #endif status = xmlTextWriterEndElement(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end child element {}satisfied."]; } } if ([self recommend]) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "recommend", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start child element {}recommend."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing element {}recommend..."); #endif [[self recommend] writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote element {}recommend..."); #endif status = xmlTextWriterEndElement(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end child element {}recommend."]; } } } @end /* implementation AGENTRANKNS0Review (JAXB) */ #endif /* DEF_AGENTRANKNS0Review_M */ #ifndef DEF_AGENTRANKNS0User_M #define DEF_AGENTRANKNS0User_M /** * Created by IntelliJ IDEA. User: marc Date: Dec 29, 2010 Time: 5:28:52 AM */ @implementation AGENTRANKNS0User /** * password */ - (NSString *) email { return _email; } /** * password */ - (void) setEmail: (NSString *) newEmail { [newEmail retain]; [_email release]; _email = newEmail; } /** * (no documentation provided) */ - (NSString *) last_name { return _last_name; } /** * (no documentation provided) */ - (void) setLast_name: (NSString *) newLast_name { [newLast_name retain]; [_last_name release]; _last_name = newLast_name; } /** * (no documentation provided) */ - (NSString *) first_name { return _first_name; } /** * (no documentation provided) */ - (void) setFirst_name: (NSString *) newFirst_name { [newFirst_name retain]; [_first_name release]; _first_name = newFirst_name; } - (void) dealloc { [self setEmail: nil]; [self setLast_name: nil]; [self setFirst_name: nil]; [super dealloc]; } @end /* implementation AGENTRANKNS0User */ /** * Internal, private interface for JAXB reading and writing. */ @interface AGENTRANKNS0User (JAXB) @end /*interface AGENTRANKNS0User (JAXB)*/ /** * Internal, private implementation for JAXB reading and writing. */ @implementation AGENTRANKNS0User (JAXB) /** * Read an instance of AGENTRANKNS0User from an XML reader. * * @param reader The reader. * @return An instance of AGENTRANKNS0User defined by the XML reader. */ + (id) readXMLType: (xmlTextReaderPtr) reader { AGENTRANKNS0User *_aGENTRANKNS0User = [[AGENTRANKNS0User alloc] init]; NS_DURING { [_aGENTRANKNS0User initWithReader: reader]; } NS_HANDLER { _aGENTRANKNS0User = nil; [localException raise]; } NS_ENDHANDLER [_aGENTRANKNS0User autorelease]; return _aGENTRANKNS0User; } /** * Initialize this instance of AGENTRANKNS0User according to * the XML being read from the reader. * * @param reader The reader. */ - (id) initWithReader: (xmlTextReaderPtr) reader { return [super initWithReader: reader]; } /** * Write the XML for this instance of AGENTRANKNS0User to the writer. * Note that since we're only writing the XML type, * No start/end element will be written. * * @param reader The reader. */ - (void) writeXMLType: (xmlTextWriterPtr) writer { [super writeXMLType:writer]; } //documentation inherited. - (BOOL) readJAXBAttribute: (xmlTextReaderPtr) reader { void *_child_accessor; if ([super readJAXBAttribute: reader]) { return YES; } return NO; } //documentation inherited. - (BOOL) readJAXBValue: (xmlTextReaderPtr) reader { return [super readJAXBValue: reader]; } //documentation inherited. - (BOOL) readJAXBChildElement: (xmlTextReaderPtr) reader { id __child; void *_child_accessor; int status, depth; if ([super readJAXBChildElement: reader]) { return YES; } if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "email", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read choice {}email of type {http://www.w3.org/2001/XMLSchema}string."); #endif __child = [NSString readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read choice {}email of type {http://www.w3.org/2001/XMLSchema}string."); #endif [self setEmail: __child]; return YES; } //end "if choice" if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "last_name", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read choice {}last_name of type {http://www.w3.org/2001/XMLSchema}string."); #endif __child = [NSString readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read choice {}last_name of type {http://www.w3.org/2001/XMLSchema}string."); #endif [self setLast_name: __child]; return YES; } //end "if choice" if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "first_name", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read choice {}first_name of type {http://www.w3.org/2001/XMLSchema}string."); #endif __child = [NSString readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read choice {}first_name of type {http://www.w3.org/2001/XMLSchema}string."); #endif [self setFirst_name: __child]; return YES; } //end "if choice" return NO; } //documentation inherited. - (int) readUnknownJAXBChildElement: (xmlTextReaderPtr) reader { return [super readUnknownJAXBChildElement: reader]; } //documentation inherited. - (void) readUnknownJAXBAttribute: (xmlTextReaderPtr) reader { [super readUnknownJAXBAttribute: reader]; } //documentation inherited. - (void) writeJAXBAttributes: (xmlTextWriterPtr) writer { int status; [super writeJAXBAttributes: writer]; } //documentation inherited. - (void) writeJAXBValue: (xmlTextWriterPtr) writer { [super writeJAXBValue: writer]; } /** * Method for writing the child elements. * * @param writer The writer. */ - (void) writeJAXBChildElements: (xmlTextWriterPtr) writer { int status; id __item; NSEnumerator *__enumerator; [super writeJAXBChildElements: writer]; if ([self email]) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "email", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start child element {}email."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing element {}email..."); #endif [[self email] writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote element {}email..."); #endif status = xmlTextWriterEndElement(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end child element {}email."]; } } if ([self last_name]) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "last_name", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start child element {}last_name."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing element {}last_name..."); #endif [[self last_name] writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote element {}last_name..."); #endif status = xmlTextWriterEndElement(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end child element {}last_name."]; } } if ([self first_name]) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "first_name", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start child element {}first_name."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing element {}first_name..."); #endif [[self first_name] writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote element {}first_name..."); #endif status = xmlTextWriterEndElement(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end child element {}first_name."]; } } } @end /* implementation AGENTRANKNS0User (JAXB) */ #endif /* DEF_AGENTRANKNS0User_M */ #ifndef DEF_AGENTRANKNS0EditUser_M #define DEF_AGENTRANKNS0EditUser_M /** * Created by IntelliJ IDEA. User: marc Date: Jul 24, 2010 Time: 7:07:31 AM */ @implementation AGENTRANKNS0EditUser /** * id */ - (NSString *) identifier { return _identifier; } /** * id */ - (void) setIdentifier: (NSString *) newIdentifier { [newIdentifier retain]; [_identifier release]; _identifier = newIdentifier; } /** * (no documentation provided) */ - (NSString *) login { return _login; } /** * (no documentation provided) */ - (void) setLogin: (NSString *) newLogin { [newLogin retain]; [_login release]; _login = newLogin; } /** * (no documentation provided) */ - (AGENTRANKNS0Links *) links { return _links; } /** * (no documentation provided) */ - (void) setLinks: (AGENTRANKNS0Links *) newLinks { [newLinks retain]; [_links release]; _links = newLinks; } /** * (no documentation provided) */ - (AGENTRANKNS0Status *) status { return _status; } /** * (no documentation provided) */ - (void) setStatus: (AGENTRANKNS0Status *) newStatus { [newStatus retain]; [_status release]; _status = newStatus; } - (void) dealloc { [self setIdentifier: nil]; [self setLogin: nil]; [self setLinks: nil]; [self setStatus: nil]; [super dealloc]; } //documentation inherited. + (id) readFromXML: (NSData *) xml { AGENTRANKNS0EditUser *_aGENTRANKNS0EditUser; xmlTextReaderPtr reader = xmlReaderForMemory([xml bytes], [xml length], NULL, NULL, 0); if (reader == NULL) { [NSException raise: @"XMLReadError" format: @"Error instantiating an XML reader."]; return nil; } _aGENTRANKNS0EditUser = (AGENTRANKNS0EditUser *) [AGENTRANKNS0EditUser readXMLElement: reader]; xmlFreeTextReader(reader); //free the reader return _aGENTRANKNS0EditUser; } //documentation inherited. - (NSData *) writeToXML { xmlBufferPtr buf; xmlTextWriterPtr writer; int rc; NSData *data; buf = xmlBufferCreate(); if (buf == NULL) { [NSException raise: @"XMLWriteError" format: @"Error creating an XML buffer."]; return nil; } writer = xmlNewTextWriterMemory(buf, 0); if (writer == NULL) { xmlBufferFree(buf); [NSException raise: @"XMLWriteError" format: @"Error creating an XML writer."]; return nil; } rc = xmlTextWriterStartDocument(writer, NULL, "utf-8", NULL); if (rc < 0) { xmlFreeTextWriter(writer); xmlBufferFree(buf); [NSException raise: @"XMLWriteError" format: @"Error writing XML start document."]; return nil; } NS_DURING { [self writeXMLElement: writer]; } NS_HANDLER { xmlFreeTextWriter(writer); xmlBufferFree(buf); [localException raise]; } NS_ENDHANDLER rc = xmlTextWriterEndDocument(writer); if (rc < 0) { xmlFreeTextWriter(writer); xmlBufferFree(buf); [NSException raise: @"XMLWriteError" format: @"Error writing XML end document."]; return nil; } xmlFreeTextWriter(writer); data = [NSData dataWithBytes: buf->content length: buf->use]; xmlBufferFree(buf); return data; } @end /* implementation AGENTRANKNS0EditUser */ /** * Internal, private interface for JAXB reading and writing. */ @interface AGENTRANKNS0EditUser (JAXB) @end /*interface AGENTRANKNS0EditUser (JAXB)*/ /** * Internal, private implementation for JAXB reading and writing. */ @implementation AGENTRANKNS0EditUser (JAXB) /** * Read an instance of AGENTRANKNS0EditUser from an XML reader. * * @param reader The reader. * @return An instance of AGENTRANKNS0EditUser defined by the XML reader. */ + (id) readXMLType: (xmlTextReaderPtr) reader { AGENTRANKNS0EditUser *_aGENTRANKNS0EditUser = [[AGENTRANKNS0EditUser alloc] init]; NS_DURING { [_aGENTRANKNS0EditUser initWithReader: reader]; } NS_HANDLER { _aGENTRANKNS0EditUser = nil; [localException raise]; } NS_ENDHANDLER [_aGENTRANKNS0EditUser autorelease]; return _aGENTRANKNS0EditUser; } /** * Initialize this instance of AGENTRANKNS0EditUser according to * the XML being read from the reader. * * @param reader The reader. */ - (id) initWithReader: (xmlTextReaderPtr) reader { return [super initWithReader: reader]; } /** * Write the XML for this instance of AGENTRANKNS0EditUser to the writer. * Note that since we're only writing the XML type, * No start/end element will be written. * * @param reader The reader. */ - (void) writeXMLType: (xmlTextWriterPtr) writer { [super writeXMLType:writer]; } /** * Reads a AGENTRANKNS0EditUser from an XML reader. The element to be read is * "response". * * @param reader The XML reader. * @return The AGENTRANKNS0EditUser. */ + (id) readXMLElement: (xmlTextReaderPtr) reader { int status; AGENTRANKNS0EditUser *_editUser = nil; if (xmlTextReaderNodeType(reader) != XML_READER_TYPE_ELEMENT) { status = xmlTextReaderAdvanceToNextStartOrEndElement(reader); if (status < 1) { [NSException raise: @"XMLReadError" format: @"Error advancing the reader to start element response."]; } } if (xmlStrcmp(BAD_CAST "response", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read root element {}response."); #endif _editUser = (AGENTRANKNS0EditUser *)[AGENTRANKNS0EditUser readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"Successfully read root element {}response."); #endif } else { if (xmlTextReaderConstNamespaceUri(reader) == NULL) { [NSException raise: @"XMLReadError" format: @"Unable to read AGENTRANKNS0EditUser. Expected element response. Current element: {}%s", xmlTextReaderConstLocalName(reader)]; } else { [NSException raise: @"XMLReadError" format: @"Unable to read AGENTRANKNS0EditUser. Expected element response. Current element: {%s}%s\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)]; } } return _editUser; } /** * Writes this AGENTRANKNS0EditUser to XML under element name "response". * The namespace declarations for the element will be written. * * @param writer The XML writer. * @param _editUser The EditUser to write. * @return 1 if successful, 0 otherwise. */ - (void) writeXMLElement: (xmlTextWriterPtr) writer { [self writeXMLElement: writer writeNamespaces: YES]; } /** * Writes this AGENTRANKNS0EditUser to an XML writer. * * @param writer The writer. * @param writeNs Whether to write the namespaces for this element to the xml writer. */ - (void) writeXMLElement: (xmlTextWriterPtr) writer writeNamespaces: (BOOL) writeNs { int rc = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "response", NULL); if (rc < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start element {}response. XML writer status: %i\n", rc]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing type {}editUser for root element {}response..."); #endif [self writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote type {}editUser for root element {}response..."); #endif rc = xmlTextWriterEndElement(writer); if (rc < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end element {}response. XML writer status: %i\n", rc]; } } //documentation inherited. - (BOOL) readJAXBAttribute: (xmlTextReaderPtr) reader { void *_child_accessor; if ([super readJAXBAttribute: reader]) { return YES; } return NO; } //documentation inherited. - (BOOL) readJAXBValue: (xmlTextReaderPtr) reader { return [super readJAXBValue: reader]; } //documentation inherited. - (BOOL) readJAXBChildElement: (xmlTextReaderPtr) reader { id __child; void *_child_accessor; int status, depth; if ([super readJAXBChildElement: reader]) { return YES; } if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "id", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read choice {}id of type {http://www.w3.org/2001/XMLSchema}string."); #endif __child = [NSString readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read choice {}id of type {http://www.w3.org/2001/XMLSchema}string."); #endif [self setIdentifier: __child]; return YES; } //end "if choice" if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "login", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read choice {}login of type {http://www.w3.org/2001/XMLSchema}string."); #endif __child = [NSString readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read choice {}login of type {http://www.w3.org/2001/XMLSchema}string."); #endif [self setLogin: __child]; return YES; } //end "if choice" if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "links", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read choice {}links of type {}links."); #endif __child = [AGENTRANKNS0Links readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read choice {}links of type {}links."); #endif [self setLinks: __child]; return YES; } //end "if choice" if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "status", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read choice {}status of type {}status."); #endif __child = [AGENTRANKNS0Status readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read choice {}status of type {}status."); #endif [self setStatus: __child]; return YES; } //end "if choice" return NO; } //documentation inherited. - (int) readUnknownJAXBChildElement: (xmlTextReaderPtr) reader { return [super readUnknownJAXBChildElement: reader]; } //documentation inherited. - (void) readUnknownJAXBAttribute: (xmlTextReaderPtr) reader { [super readUnknownJAXBAttribute: reader]; } //documentation inherited. - (void) writeJAXBAttributes: (xmlTextWriterPtr) writer { int status; [super writeJAXBAttributes: writer]; } //documentation inherited. - (void) writeJAXBValue: (xmlTextWriterPtr) writer { [super writeJAXBValue: writer]; } /** * Method for writing the child elements. * * @param writer The writer. */ - (void) writeJAXBChildElements: (xmlTextWriterPtr) writer { int status; id __item; NSEnumerator *__enumerator; [super writeJAXBChildElements: writer]; if ([self identifier]) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "id", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start child element {}id."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing element {}id..."); #endif [[self identifier] writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote element {}id..."); #endif status = xmlTextWriterEndElement(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end child element {}id."]; } } if ([self login]) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "login", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start child element {}login."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing element {}login..."); #endif [[self login] writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote element {}login..."); #endif status = xmlTextWriterEndElement(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end child element {}login."]; } } if ([self links]) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "links", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start child element {}links."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing element {}links..."); #endif [[self links] writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote element {}links..."); #endif status = xmlTextWriterEndElement(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end child element {}links."]; } } if ([self status]) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "status", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start child element {}status."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing element {}status..."); #endif [[self status] writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote element {}status..."); #endif status = xmlTextWriterEndElement(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end child element {}status."]; } } } @end /* implementation AGENTRANKNS0EditUser (JAXB) */ #endif /* DEF_AGENTRANKNS0EditUser_M */ #ifndef DEF_AGENTRANKNS0Slugs_M #define DEF_AGENTRANKNS0Slugs_M /** * User: marc Date: May 13, 2009 Time: 5:44:51 AM

THIS SOFTWARE IS COPYRIGHTED. THE SOFTWARE MAY NOT BE COPIED REPRODUCED, TRANSLATED, OR REDUCED TO ANY ELECTRONIC MEDIUM OR MACHINE READABLE FORM WITHOUT THE PRIOR WRITTEN CONSENT OF SOCO TECHNOLOGIES. */ @implementation AGENTRANKNS0Slugs /** * get list of slugs */ - (NSArray *) slug { return _slug; } /** * get list of slugs */ - (void) setSlug: (NSArray *) newSlug { [newSlug retain]; [_slug release]; _slug = newSlug; } - (void) dealloc { [self setSlug: nil]; [super dealloc]; } //documentation inherited. + (id) readFromXML: (NSData *) xml { AGENTRANKNS0Slugs *_aGENTRANKNS0Slugs; xmlTextReaderPtr reader = xmlReaderForMemory([xml bytes], [xml length], NULL, NULL, 0); if (reader == NULL) { [NSException raise: @"XMLReadError" format: @"Error instantiating an XML reader."]; return nil; } _aGENTRANKNS0Slugs = (AGENTRANKNS0Slugs *) [AGENTRANKNS0Slugs readXMLElement: reader]; xmlFreeTextReader(reader); //free the reader return _aGENTRANKNS0Slugs; } //documentation inherited. - (NSData *) writeToXML { xmlBufferPtr buf; xmlTextWriterPtr writer; int rc; NSData *data; buf = xmlBufferCreate(); if (buf == NULL) { [NSException raise: @"XMLWriteError" format: @"Error creating an XML buffer."]; return nil; } writer = xmlNewTextWriterMemory(buf, 0); if (writer == NULL) { xmlBufferFree(buf); [NSException raise: @"XMLWriteError" format: @"Error creating an XML writer."]; return nil; } rc = xmlTextWriterStartDocument(writer, NULL, "utf-8", NULL); if (rc < 0) { xmlFreeTextWriter(writer); xmlBufferFree(buf); [NSException raise: @"XMLWriteError" format: @"Error writing XML start document."]; return nil; } NS_DURING { [self writeXMLElement: writer]; } NS_HANDLER { xmlFreeTextWriter(writer); xmlBufferFree(buf); [localException raise]; } NS_ENDHANDLER rc = xmlTextWriterEndDocument(writer); if (rc < 0) { xmlFreeTextWriter(writer); xmlBufferFree(buf); [NSException raise: @"XMLWriteError" format: @"Error writing XML end document."]; return nil; } xmlFreeTextWriter(writer); data = [NSData dataWithBytes: buf->content length: buf->use]; xmlBufferFree(buf); return data; } @end /* implementation AGENTRANKNS0Slugs */ /** * Internal, private interface for JAXB reading and writing. */ @interface AGENTRANKNS0Slugs (JAXB) @end /*interface AGENTRANKNS0Slugs (JAXB)*/ /** * Internal, private implementation for JAXB reading and writing. */ @implementation AGENTRANKNS0Slugs (JAXB) /** * Read an instance of AGENTRANKNS0Slugs from an XML reader. * * @param reader The reader. * @return An instance of AGENTRANKNS0Slugs defined by the XML reader. */ + (id) readXMLType: (xmlTextReaderPtr) reader { AGENTRANKNS0Slugs *_aGENTRANKNS0Slugs = [[AGENTRANKNS0Slugs alloc] init]; NS_DURING { [_aGENTRANKNS0Slugs initWithReader: reader]; } NS_HANDLER { _aGENTRANKNS0Slugs = nil; [localException raise]; } NS_ENDHANDLER [_aGENTRANKNS0Slugs autorelease]; return _aGENTRANKNS0Slugs; } /** * Initialize this instance of AGENTRANKNS0Slugs according to * the XML being read from the reader. * * @param reader The reader. */ - (id) initWithReader: (xmlTextReaderPtr) reader { return [super initWithReader: reader]; } /** * Write the XML for this instance of AGENTRANKNS0Slugs to the writer. * Note that since we're only writing the XML type, * No start/end element will be written. * * @param reader The reader. */ - (void) writeXMLType: (xmlTextWriterPtr) writer { [super writeXMLType:writer]; } /** * Reads a AGENTRANKNS0Slugs from an XML reader. The element to be read is * "slugs". * * @param reader The XML reader. * @return The AGENTRANKNS0Slugs. */ + (id) readXMLElement: (xmlTextReaderPtr) reader { int status; AGENTRANKNS0Slugs *_slugs = nil; if (xmlTextReaderNodeType(reader) != XML_READER_TYPE_ELEMENT) { status = xmlTextReaderAdvanceToNextStartOrEndElement(reader); if (status < 1) { [NSException raise: @"XMLReadError" format: @"Error advancing the reader to start element slugs."]; } } if (xmlStrcmp(BAD_CAST "slugs", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read root element {}slugs."); #endif _slugs = (AGENTRANKNS0Slugs *)[AGENTRANKNS0Slugs readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"Successfully read root element {}slugs."); #endif } else { if (xmlTextReaderConstNamespaceUri(reader) == NULL) { [NSException raise: @"XMLReadError" format: @"Unable to read AGENTRANKNS0Slugs. Expected element slugs. Current element: {}%s", xmlTextReaderConstLocalName(reader)]; } else { [NSException raise: @"XMLReadError" format: @"Unable to read AGENTRANKNS0Slugs. Expected element slugs. Current element: {%s}%s\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)]; } } return _slugs; } /** * Writes this AGENTRANKNS0Slugs to XML under element name "slugs". * The namespace declarations for the element will be written. * * @param writer The XML writer. * @param _slugs The Slugs to write. * @return 1 if successful, 0 otherwise. */ - (void) writeXMLElement: (xmlTextWriterPtr) writer { [self writeXMLElement: writer writeNamespaces: YES]; } /** * Writes this AGENTRANKNS0Slugs to an XML writer. * * @param writer The writer. * @param writeNs Whether to write the namespaces for this element to the xml writer. */ - (void) writeXMLElement: (xmlTextWriterPtr) writer writeNamespaces: (BOOL) writeNs { int rc = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "slugs", NULL); if (rc < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start element {}slugs. XML writer status: %i\n", rc]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing type {}slugs for root element {}slugs..."); #endif [self writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote type {}slugs for root element {}slugs..."); #endif rc = xmlTextWriterEndElement(writer); if (rc < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end element {}slugs. XML writer status: %i\n", rc]; } } //documentation inherited. - (BOOL) readJAXBAttribute: (xmlTextReaderPtr) reader { void *_child_accessor; if ([super readJAXBAttribute: reader]) { return YES; } return NO; } //documentation inherited. - (BOOL) readJAXBValue: (xmlTextReaderPtr) reader { return [super readJAXBValue: reader]; } //documentation inherited. - (BOOL) readJAXBChildElement: (xmlTextReaderPtr) reader { id __child; void *_child_accessor; int status, depth; if ([super readJAXBChildElement: reader]) { return YES; } if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "slug", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read choice {}slug of type {}slug."); #endif __child = [AGENTRANKNS0Slug readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read choice {}slug of type {}slug."); #endif if ([self slug]) { [self setSlug: [[self slug] arrayByAddingObject: __child]]; } else { [self setSlug: [NSArray arrayWithObject: __child]]; } return YES; } //end "if choice" return NO; } //documentation inherited. - (int) readUnknownJAXBChildElement: (xmlTextReaderPtr) reader { return [super readUnknownJAXBChildElement: reader]; } //documentation inherited. - (void) readUnknownJAXBAttribute: (xmlTextReaderPtr) reader { [super readUnknownJAXBAttribute: reader]; } //documentation inherited. - (void) writeJAXBAttributes: (xmlTextWriterPtr) writer { int status; [super writeJAXBAttributes: writer]; } //documentation inherited. - (void) writeJAXBValue: (xmlTextWriterPtr) writer { [super writeJAXBValue: writer]; } /** * Method for writing the child elements. * * @param writer The writer. */ - (void) writeJAXBChildElements: (xmlTextWriterPtr) writer { int status; id __item; NSEnumerator *__enumerator; [super writeJAXBChildElements: writer]; if ([self slug]) { __enumerator = [[self slug] objectEnumerator]; while ( (__item = [__enumerator nextObject]) ) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "slug", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start child element {}slug."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing element {}slug..."); #endif [__item writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote element {}slug..."); #endif status = xmlTextWriterEndElement(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end child element {}slug."]; } } //end item iterator. } } @end /* implementation AGENTRANKNS0Slugs (JAXB) */ #endif /* DEF_AGENTRANKNS0Slugs_M */ #ifndef DEF_AGENTRANKNS0Links_M #define DEF_AGENTRANKNS0Links_M /** * User: marc Date: May 13, 2009 Time: 5:44:51 AM

THIS SOFTWARE IS COPYRIGHTED. THE SOFTWARE MAY NOT BE COPIED REPRODUCED, TRANSLATED, OR REDUCED TO ANY ELECTRONIC MEDIUM OR MACHINE READABLE FORM WITHOUT THE PRIOR WRITTEN CONSENT OF SOCO TECHNOLOGIES. */ @implementation AGENTRANKNS0Links /** * get list of links */ - (NSArray *) link { return _link; } /** * get list of links */ - (void) setLink: (NSArray *) newLink { [newLink retain]; [_link release]; _link = newLink; } - (void) dealloc { [self setLink: nil]; [super dealloc]; } //documentation inherited. + (id) readFromXML: (NSData *) xml { AGENTRANKNS0Links *_aGENTRANKNS0Links; xmlTextReaderPtr reader = xmlReaderForMemory([xml bytes], [xml length], NULL, NULL, 0); if (reader == NULL) { [NSException raise: @"XMLReadError" format: @"Error instantiating an XML reader."]; return nil; } _aGENTRANKNS0Links = (AGENTRANKNS0Links *) [AGENTRANKNS0Links readXMLElement: reader]; xmlFreeTextReader(reader); //free the reader return _aGENTRANKNS0Links; } //documentation inherited. - (NSData *) writeToXML { xmlBufferPtr buf; xmlTextWriterPtr writer; int rc; NSData *data; buf = xmlBufferCreate(); if (buf == NULL) { [NSException raise: @"XMLWriteError" format: @"Error creating an XML buffer."]; return nil; } writer = xmlNewTextWriterMemory(buf, 0); if (writer == NULL) { xmlBufferFree(buf); [NSException raise: @"XMLWriteError" format: @"Error creating an XML writer."]; return nil; } rc = xmlTextWriterStartDocument(writer, NULL, "utf-8", NULL); if (rc < 0) { xmlFreeTextWriter(writer); xmlBufferFree(buf); [NSException raise: @"XMLWriteError" format: @"Error writing XML start document."]; return nil; } NS_DURING { [self writeXMLElement: writer]; } NS_HANDLER { xmlFreeTextWriter(writer); xmlBufferFree(buf); [localException raise]; } NS_ENDHANDLER rc = xmlTextWriterEndDocument(writer); if (rc < 0) { xmlFreeTextWriter(writer); xmlBufferFree(buf); [NSException raise: @"XMLWriteError" format: @"Error writing XML end document."]; return nil; } xmlFreeTextWriter(writer); data = [NSData dataWithBytes: buf->content length: buf->use]; xmlBufferFree(buf); return data; } @end /* implementation AGENTRANKNS0Links */ /** * Internal, private interface for JAXB reading and writing. */ @interface AGENTRANKNS0Links (JAXB) @end /*interface AGENTRANKNS0Links (JAXB)*/ /** * Internal, private implementation for JAXB reading and writing. */ @implementation AGENTRANKNS0Links (JAXB) /** * Read an instance of AGENTRANKNS0Links from an XML reader. * * @param reader The reader. * @return An instance of AGENTRANKNS0Links defined by the XML reader. */ + (id) readXMLType: (xmlTextReaderPtr) reader { AGENTRANKNS0Links *_aGENTRANKNS0Links = [[AGENTRANKNS0Links alloc] init]; NS_DURING { [_aGENTRANKNS0Links initWithReader: reader]; } NS_HANDLER { _aGENTRANKNS0Links = nil; [localException raise]; } NS_ENDHANDLER [_aGENTRANKNS0Links autorelease]; return _aGENTRANKNS0Links; } /** * Initialize this instance of AGENTRANKNS0Links according to * the XML being read from the reader. * * @param reader The reader. */ - (id) initWithReader: (xmlTextReaderPtr) reader { return [super initWithReader: reader]; } /** * Write the XML for this instance of AGENTRANKNS0Links to the writer. * Note that since we're only writing the XML type, * No start/end element will be written. * * @param reader The reader. */ - (void) writeXMLType: (xmlTextWriterPtr) writer { [super writeXMLType:writer]; } /** * Reads a AGENTRANKNS0Links from an XML reader. The element to be read is * "links". * * @param reader The XML reader. * @return The AGENTRANKNS0Links. */ + (id) readXMLElement: (xmlTextReaderPtr) reader { int status; AGENTRANKNS0Links *_links = nil; if (xmlTextReaderNodeType(reader) != XML_READER_TYPE_ELEMENT) { status = xmlTextReaderAdvanceToNextStartOrEndElement(reader); if (status < 1) { [NSException raise: @"XMLReadError" format: @"Error advancing the reader to start element links."]; } } if (xmlStrcmp(BAD_CAST "links", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read root element {}links."); #endif _links = (AGENTRANKNS0Links *)[AGENTRANKNS0Links readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"Successfully read root element {}links."); #endif } else { if (xmlTextReaderConstNamespaceUri(reader) == NULL) { [NSException raise: @"XMLReadError" format: @"Unable to read AGENTRANKNS0Links. Expected element links. Current element: {}%s", xmlTextReaderConstLocalName(reader)]; } else { [NSException raise: @"XMLReadError" format: @"Unable to read AGENTRANKNS0Links. Expected element links. Current element: {%s}%s\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)]; } } return _links; } /** * Writes this AGENTRANKNS0Links to XML under element name "links". * The namespace declarations for the element will be written. * * @param writer The XML writer. * @param _links The Links to write. * @return 1 if successful, 0 otherwise. */ - (void) writeXMLElement: (xmlTextWriterPtr) writer { [self writeXMLElement: writer writeNamespaces: YES]; } /** * Writes this AGENTRANKNS0Links to an XML writer. * * @param writer The writer. * @param writeNs Whether to write the namespaces for this element to the xml writer. */ - (void) writeXMLElement: (xmlTextWriterPtr) writer writeNamespaces: (BOOL) writeNs { int rc = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "links", NULL); if (rc < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start element {}links. XML writer status: %i\n", rc]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing type {}links for root element {}links..."); #endif [self writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote type {}links for root element {}links..."); #endif rc = xmlTextWriterEndElement(writer); if (rc < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end element {}links. XML writer status: %i\n", rc]; } } //documentation inherited. - (BOOL) readJAXBAttribute: (xmlTextReaderPtr) reader { void *_child_accessor; if ([super readJAXBAttribute: reader]) { return YES; } return NO; } //documentation inherited. - (BOOL) readJAXBValue: (xmlTextReaderPtr) reader { return [super readJAXBValue: reader]; } //documentation inherited. - (BOOL) readJAXBChildElement: (xmlTextReaderPtr) reader { id __child; void *_child_accessor; int status, depth; if ([super readJAXBChildElement: reader]) { return YES; } if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "link", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read choice {}link of type {}link."); #endif __child = [AGENTRANKNS0Link readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read choice {}link of type {}link."); #endif if ([self link]) { [self setLink: [[self link] arrayByAddingObject: __child]]; } else { [self setLink: [NSArray arrayWithObject: __child]]; } return YES; } //end "if choice" return NO; } //documentation inherited. - (int) readUnknownJAXBChildElement: (xmlTextReaderPtr) reader { return [super readUnknownJAXBChildElement: reader]; } //documentation inherited. - (void) readUnknownJAXBAttribute: (xmlTextReaderPtr) reader { [super readUnknownJAXBAttribute: reader]; } //documentation inherited. - (void) writeJAXBAttributes: (xmlTextWriterPtr) writer { int status; [super writeJAXBAttributes: writer]; } //documentation inherited. - (void) writeJAXBValue: (xmlTextWriterPtr) writer { [super writeJAXBValue: writer]; } /** * Method for writing the child elements. * * @param writer The writer. */ - (void) writeJAXBChildElements: (xmlTextWriterPtr) writer { int status; id __item; NSEnumerator *__enumerator; [super writeJAXBChildElements: writer]; if ([self link]) { __enumerator = [[self link] objectEnumerator]; while ( (__item = [__enumerator nextObject]) ) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "link", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start child element {}link."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing element {}link..."); #endif [__item writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote element {}link..."); #endif status = xmlTextWriterEndElement(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end child element {}link."]; } } //end item iterator. } } @end /* implementation AGENTRANKNS0Links (JAXB) */ #endif /* DEF_AGENTRANKNS0Links_M */ #ifndef DEF_AGENTRANKNS0Images_M #define DEF_AGENTRANKNS0Images_M /** * User: marc Date: May 13, 2009 Time: 5:44:51 AM

THIS SOFTWARE IS COPYRIGHTED. THE SOFTWARE MAY NOT BE COPIED REPRODUCED, TRANSLATED, OR REDUCED TO ANY ELECTRONIC MEDIUM OR MACHINE READABLE FORM WITHOUT THE PRIOR WRITTEN CONSENT OF SOCO TECHNOLOGIES. */ @implementation AGENTRANKNS0Images /** * get list of links */ - (NSArray *) image { return _image; } /** * get list of links */ - (void) setImage: (NSArray *) newImage { [newImage retain]; [_image release]; _image = newImage; } - (void) dealloc { [self setImage: nil]; [super dealloc]; } //documentation inherited. + (id) readFromXML: (NSData *) xml { AGENTRANKNS0Images *_aGENTRANKNS0Images; xmlTextReaderPtr reader = xmlReaderForMemory([xml bytes], [xml length], NULL, NULL, 0); if (reader == NULL) { [NSException raise: @"XMLReadError" format: @"Error instantiating an XML reader."]; return nil; } _aGENTRANKNS0Images = (AGENTRANKNS0Images *) [AGENTRANKNS0Images readXMLElement: reader]; xmlFreeTextReader(reader); //free the reader return _aGENTRANKNS0Images; } //documentation inherited. - (NSData *) writeToXML { xmlBufferPtr buf; xmlTextWriterPtr writer; int rc; NSData *data; buf = xmlBufferCreate(); if (buf == NULL) { [NSException raise: @"XMLWriteError" format: @"Error creating an XML buffer."]; return nil; } writer = xmlNewTextWriterMemory(buf, 0); if (writer == NULL) { xmlBufferFree(buf); [NSException raise: @"XMLWriteError" format: @"Error creating an XML writer."]; return nil; } rc = xmlTextWriterStartDocument(writer, NULL, "utf-8", NULL); if (rc < 0) { xmlFreeTextWriter(writer); xmlBufferFree(buf); [NSException raise: @"XMLWriteError" format: @"Error writing XML start document."]; return nil; } NS_DURING { [self writeXMLElement: writer]; } NS_HANDLER { xmlFreeTextWriter(writer); xmlBufferFree(buf); [localException raise]; } NS_ENDHANDLER rc = xmlTextWriterEndDocument(writer); if (rc < 0) { xmlFreeTextWriter(writer); xmlBufferFree(buf); [NSException raise: @"XMLWriteError" format: @"Error writing XML end document."]; return nil; } xmlFreeTextWriter(writer); data = [NSData dataWithBytes: buf->content length: buf->use]; xmlBufferFree(buf); return data; } @end /* implementation AGENTRANKNS0Images */ /** * Internal, private interface for JAXB reading and writing. */ @interface AGENTRANKNS0Images (JAXB) @end /*interface AGENTRANKNS0Images (JAXB)*/ /** * Internal, private implementation for JAXB reading and writing. */ @implementation AGENTRANKNS0Images (JAXB) /** * Read an instance of AGENTRANKNS0Images from an XML reader. * * @param reader The reader. * @return An instance of AGENTRANKNS0Images defined by the XML reader. */ + (id) readXMLType: (xmlTextReaderPtr) reader { AGENTRANKNS0Images *_aGENTRANKNS0Images = [[AGENTRANKNS0Images alloc] init]; NS_DURING { [_aGENTRANKNS0Images initWithReader: reader]; } NS_HANDLER { _aGENTRANKNS0Images = nil; [localException raise]; } NS_ENDHANDLER [_aGENTRANKNS0Images autorelease]; return _aGENTRANKNS0Images; } /** * Initialize this instance of AGENTRANKNS0Images according to * the XML being read from the reader. * * @param reader The reader. */ - (id) initWithReader: (xmlTextReaderPtr) reader { return [super initWithReader: reader]; } /** * Write the XML for this instance of AGENTRANKNS0Images to the writer. * Note that since we're only writing the XML type, * No start/end element will be written. * * @param reader The reader. */ - (void) writeXMLType: (xmlTextWriterPtr) writer { [super writeXMLType:writer]; } /** * Reads a AGENTRANKNS0Images from an XML reader. The element to be read is * "images". * * @param reader The XML reader. * @return The AGENTRANKNS0Images. */ + (id) readXMLElement: (xmlTextReaderPtr) reader { int status; AGENTRANKNS0Images *_images = nil; if (xmlTextReaderNodeType(reader) != XML_READER_TYPE_ELEMENT) { status = xmlTextReaderAdvanceToNextStartOrEndElement(reader); if (status < 1) { [NSException raise: @"XMLReadError" format: @"Error advancing the reader to start element images."]; } } if (xmlStrcmp(BAD_CAST "images", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read root element {}images."); #endif _images = (AGENTRANKNS0Images *)[AGENTRANKNS0Images readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"Successfully read root element {}images."); #endif } else { if (xmlTextReaderConstNamespaceUri(reader) == NULL) { [NSException raise: @"XMLReadError" format: @"Unable to read AGENTRANKNS0Images. Expected element images. Current element: {}%s", xmlTextReaderConstLocalName(reader)]; } else { [NSException raise: @"XMLReadError" format: @"Unable to read AGENTRANKNS0Images. Expected element images. Current element: {%s}%s\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)]; } } return _images; } /** * Writes this AGENTRANKNS0Images to XML under element name "images". * The namespace declarations for the element will be written. * * @param writer The XML writer. * @param _images The Images to write. * @return 1 if successful, 0 otherwise. */ - (void) writeXMLElement: (xmlTextWriterPtr) writer { [self writeXMLElement: writer writeNamespaces: YES]; } /** * Writes this AGENTRANKNS0Images to an XML writer. * * @param writer The writer. * @param writeNs Whether to write the namespaces for this element to the xml writer. */ - (void) writeXMLElement: (xmlTextWriterPtr) writer writeNamespaces: (BOOL) writeNs { int rc = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "images", NULL); if (rc < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start element {}images. XML writer status: %i\n", rc]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing type {}images for root element {}images..."); #endif [self writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote type {}images for root element {}images..."); #endif rc = xmlTextWriterEndElement(writer); if (rc < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end element {}images. XML writer status: %i\n", rc]; } } //documentation inherited. - (BOOL) readJAXBAttribute: (xmlTextReaderPtr) reader { void *_child_accessor; if ([super readJAXBAttribute: reader]) { return YES; } return NO; } //documentation inherited. - (BOOL) readJAXBValue: (xmlTextReaderPtr) reader { return [super readJAXBValue: reader]; } //documentation inherited. - (BOOL) readJAXBChildElement: (xmlTextReaderPtr) reader { id __child; void *_child_accessor; int status, depth; if ([super readJAXBChildElement: reader]) { return YES; } if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "image", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read choice {}image of type {}image."); #endif __child = [AGENTRANKNS0Image readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read choice {}image of type {}image."); #endif if ([self image]) { [self setImage: [[self image] arrayByAddingObject: __child]]; } else { [self setImage: [NSArray arrayWithObject: __child]]; } return YES; } //end "if choice" return NO; } //documentation inherited. - (int) readUnknownJAXBChildElement: (xmlTextReaderPtr) reader { return [super readUnknownJAXBChildElement: reader]; } //documentation inherited. - (void) readUnknownJAXBAttribute: (xmlTextReaderPtr) reader { [super readUnknownJAXBAttribute: reader]; } //documentation inherited. - (void) writeJAXBAttributes: (xmlTextWriterPtr) writer { int status; [super writeJAXBAttributes: writer]; } //documentation inherited. - (void) writeJAXBValue: (xmlTextWriterPtr) writer { [super writeJAXBValue: writer]; } /** * Method for writing the child elements. * * @param writer The writer. */ - (void) writeJAXBChildElements: (xmlTextWriterPtr) writer { int status; id __item; NSEnumerator *__enumerator; [super writeJAXBChildElements: writer]; if ([self image]) { __enumerator = [[self image] objectEnumerator]; while ( (__item = [__enumerator nextObject]) ) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "image", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start child element {}image."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing element {}image..."); #endif [__item writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote element {}image..."); #endif status = xmlTextWriterEndElement(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end child element {}image."]; } } //end item iterator. } } @end /* implementation AGENTRANKNS0Images (JAXB) */ #endif /* DEF_AGENTRANKNS0Images_M */ #ifndef DEF_AGENTRANKNS0Content_M #define DEF_AGENTRANKNS0Content_M /** * User: marc Date: May 12, 2009 Time: 8:28:24 PM

THIS SOFTWARE IS COPYRIGHTED. THE SOFTWARE MAY NOT BE COPIED REPRODUCED, TRANSLATED, OR REDUCED TO ANY ELECTRONIC MEDIUM OR MACHINE READABLE FORM WITHOUT THE PRIOR WRITTEN CONSENT OF SOCO TECHNOLOGIES. */ @implementation AGENTRANKNS0Content /** * (no documentation provided) */ - (NSString *) type { return _type; } /** * (no documentation provided) */ - (void) setType: (NSString *) newType { [newType retain]; [_type release]; _type = newType; } /** * (no documentation provided) */ - (NSString *) value { return _value; } /** * (no documentation provided) */ - (void) setValue: (NSString *) newValue { [newValue retain]; [_value release]; _value = newValue; } - (void) dealloc { [self setType: nil]; [self setValue: nil]; [super dealloc]; } //documentation inherited. + (id) readFromXML: (NSData *) xml { AGENTRANKNS0Content *_aGENTRANKNS0Content; xmlTextReaderPtr reader = xmlReaderForMemory([xml bytes], [xml length], NULL, NULL, 0); if (reader == NULL) { [NSException raise: @"XMLReadError" format: @"Error instantiating an XML reader."]; return nil; } _aGENTRANKNS0Content = (AGENTRANKNS0Content *) [AGENTRANKNS0Content readXMLElement: reader]; xmlFreeTextReader(reader); //free the reader return _aGENTRANKNS0Content; } //documentation inherited. - (NSData *) writeToXML { xmlBufferPtr buf; xmlTextWriterPtr writer; int rc; NSData *data; buf = xmlBufferCreate(); if (buf == NULL) { [NSException raise: @"XMLWriteError" format: @"Error creating an XML buffer."]; return nil; } writer = xmlNewTextWriterMemory(buf, 0); if (writer == NULL) { xmlBufferFree(buf); [NSException raise: @"XMLWriteError" format: @"Error creating an XML writer."]; return nil; } rc = xmlTextWriterStartDocument(writer, NULL, "utf-8", NULL); if (rc < 0) { xmlFreeTextWriter(writer); xmlBufferFree(buf); [NSException raise: @"XMLWriteError" format: @"Error writing XML start document."]; return nil; } NS_DURING { [self writeXMLElement: writer]; } NS_HANDLER { xmlFreeTextWriter(writer); xmlBufferFree(buf); [localException raise]; } NS_ENDHANDLER rc = xmlTextWriterEndDocument(writer); if (rc < 0) { xmlFreeTextWriter(writer); xmlBufferFree(buf); [NSException raise: @"XMLWriteError" format: @"Error writing XML end document."]; return nil; } xmlFreeTextWriter(writer); data = [NSData dataWithBytes: buf->content length: buf->use]; xmlBufferFree(buf); return data; } @end /* implementation AGENTRANKNS0Content */ /** * Internal, private interface for JAXB reading and writing. */ @interface AGENTRANKNS0Content (JAXB) @end /*interface AGENTRANKNS0Content (JAXB)*/ /** * Internal, private implementation for JAXB reading and writing. */ @implementation AGENTRANKNS0Content (JAXB) /** * Read an instance of AGENTRANKNS0Content from an XML reader. * * @param reader The reader. * @return An instance of AGENTRANKNS0Content defined by the XML reader. */ + (id) readXMLType: (xmlTextReaderPtr) reader { AGENTRANKNS0Content *_aGENTRANKNS0Content = [[AGENTRANKNS0Content alloc] init]; NS_DURING { [_aGENTRANKNS0Content initWithReader: reader]; } NS_HANDLER { _aGENTRANKNS0Content = nil; [localException raise]; } NS_ENDHANDLER [_aGENTRANKNS0Content autorelease]; return _aGENTRANKNS0Content; } /** * Initialize this instance of AGENTRANKNS0Content according to * the XML being read from the reader. * * @param reader The reader. */ - (id) initWithReader: (xmlTextReaderPtr) reader { return [super initWithReader: reader]; } /** * Write the XML for this instance of AGENTRANKNS0Content to the writer. * Note that since we're only writing the XML type, * No start/end element will be written. * * @param reader The reader. */ - (void) writeXMLType: (xmlTextWriterPtr) writer { [super writeXMLType:writer]; } /** * Reads a AGENTRANKNS0Content from an XML reader. The element to be read is * "content". * * @param reader The XML reader. * @return The AGENTRANKNS0Content. */ + (id) readXMLElement: (xmlTextReaderPtr) reader { int status; AGENTRANKNS0Content *_content = nil; if (xmlTextReaderNodeType(reader) != XML_READER_TYPE_ELEMENT) { status = xmlTextReaderAdvanceToNextStartOrEndElement(reader); if (status < 1) { [NSException raise: @"XMLReadError" format: @"Error advancing the reader to start element content."]; } } if (xmlStrcmp(BAD_CAST "content", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read root element {}content."); #endif _content = (AGENTRANKNS0Content *)[AGENTRANKNS0Content readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"Successfully read root element {}content."); #endif } else { if (xmlTextReaderConstNamespaceUri(reader) == NULL) { [NSException raise: @"XMLReadError" format: @"Unable to read AGENTRANKNS0Content. Expected element content. Current element: {}%s", xmlTextReaderConstLocalName(reader)]; } else { [NSException raise: @"XMLReadError" format: @"Unable to read AGENTRANKNS0Content. Expected element content. Current element: {%s}%s\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)]; } } return _content; } /** * Writes this AGENTRANKNS0Content to XML under element name "content". * The namespace declarations for the element will be written. * * @param writer The XML writer. * @param _content The Content to write. * @return 1 if successful, 0 otherwise. */ - (void) writeXMLElement: (xmlTextWriterPtr) writer { [self writeXMLElement: writer writeNamespaces: YES]; } /** * Writes this AGENTRANKNS0Content to an XML writer. * * @param writer The writer. * @param writeNs Whether to write the namespaces for this element to the xml writer. */ - (void) writeXMLElement: (xmlTextWriterPtr) writer writeNamespaces: (BOOL) writeNs { int rc = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "content", NULL); if (rc < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start element {}content. XML writer status: %i\n", rc]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing type {}content for root element {}content..."); #endif [self writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote type {}content for root element {}content..."); #endif rc = xmlTextWriterEndElement(writer); if (rc < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end element {}content. XML writer status: %i\n", rc]; } } //documentation inherited. - (BOOL) readJAXBAttribute: (xmlTextReaderPtr) reader { void *_child_accessor; if ([super readJAXBAttribute: reader]) { return YES; } if ((xmlStrcmp(BAD_CAST "type", xmlTextReaderConstLocalName(reader)) == 0) && (xmlTextReaderConstNamespaceUri(reader) == NULL)) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read attribute {}type..."); #endif [self setType: (NSString*) [NSString readXMLType: reader]]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read attribute {}type..."); #endif return YES; } return NO; } //documentation inherited. - (BOOL) readJAXBValue: (xmlTextReaderPtr) reader { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read element value..."); #endif if (xmlTextReaderIsEmptyElement(reader) == 0) { [self setValue: (NSString *) [NSString readXMLType: reader]]; } else { [self setValue: @""]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read element value..."); #endif return YES; } //documentation inherited. - (BOOL) readJAXBChildElement: (xmlTextReaderPtr) reader { return [super readJAXBChildElement: reader]; } //documentation inherited. - (int) readUnknownJAXBChildElement: (xmlTextReaderPtr) reader { return [super readUnknownJAXBChildElement: reader]; } //documentation inherited. - (void) readUnknownJAXBAttribute: (xmlTextReaderPtr) reader { [super readUnknownJAXBAttribute: reader]; } //documentation inherited. - (void) writeJAXBAttributes: (xmlTextWriterPtr) writer { int status; [super writeJAXBAttributes: writer]; if ([self type]) { status = xmlTextWriterStartAttributeNS(writer, NULL, BAD_CAST "type", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start attribute {}type."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing attribute {}type..."); #endif [[self type] writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote attribute {}type..."); #endif status = xmlTextWriterEndAttribute(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end attribute {}type."]; } } } //documentation inherited. - (void) writeJAXBValue: (xmlTextWriterPtr) writer { #if DEBUG_ENUNCIATE > 1 NSLog(@"writing element value..."); #endif [[self value] writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote element value..."); #endif } /** * Method for writing the child elements. * * @param writer The writer. */ - (void) writeJAXBChildElements: (xmlTextWriterPtr) writer { [super writeJAXBChildElements: writer]; } @end /* implementation AGENTRANKNS0Content (JAXB) */ #endif /* DEF_AGENTRANKNS0Content_M */ #ifndef DEF_AGENTRANKNS0PokeProfile_M #define DEF_AGENTRANKNS0PokeProfile_M /** * Created by IntelliJ IDEA. User: marc Date: Jul 24, 2010 Time: 7:07:31 AM */ @implementation AGENTRANKNS0PokeProfile /** * status */ - (AGENTRANKNS0Status *) status { return _status; } /** * status */ - (void) setStatus: (AGENTRANKNS0Status *) newStatus { [newStatus retain]; [_status release]; _status = newStatus; } - (void) dealloc { [self setStatus: nil]; [super dealloc]; } //documentation inherited. + (id) readFromXML: (NSData *) xml { AGENTRANKNS0PokeProfile *_aGENTRANKNS0PokeProfile; xmlTextReaderPtr reader = xmlReaderForMemory([xml bytes], [xml length], NULL, NULL, 0); if (reader == NULL) { [NSException raise: @"XMLReadError" format: @"Error instantiating an XML reader."]; return nil; } _aGENTRANKNS0PokeProfile = (AGENTRANKNS0PokeProfile *) [AGENTRANKNS0PokeProfile readXMLElement: reader]; xmlFreeTextReader(reader); //free the reader return _aGENTRANKNS0PokeProfile; } //documentation inherited. - (NSData *) writeToXML { xmlBufferPtr buf; xmlTextWriterPtr writer; int rc; NSData *data; buf = xmlBufferCreate(); if (buf == NULL) { [NSException raise: @"XMLWriteError" format: @"Error creating an XML buffer."]; return nil; } writer = xmlNewTextWriterMemory(buf, 0); if (writer == NULL) { xmlBufferFree(buf); [NSException raise: @"XMLWriteError" format: @"Error creating an XML writer."]; return nil; } rc = xmlTextWriterStartDocument(writer, NULL, "utf-8", NULL); if (rc < 0) { xmlFreeTextWriter(writer); xmlBufferFree(buf); [NSException raise: @"XMLWriteError" format: @"Error writing XML start document."]; return nil; } NS_DURING { [self writeXMLElement: writer]; } NS_HANDLER { xmlFreeTextWriter(writer); xmlBufferFree(buf); [localException raise]; } NS_ENDHANDLER rc = xmlTextWriterEndDocument(writer); if (rc < 0) { xmlFreeTextWriter(writer); xmlBufferFree(buf); [NSException raise: @"XMLWriteError" format: @"Error writing XML end document."]; return nil; } xmlFreeTextWriter(writer); data = [NSData dataWithBytes: buf->content length: buf->use]; xmlBufferFree(buf); return data; } @end /* implementation AGENTRANKNS0PokeProfile */ /** * Internal, private interface for JAXB reading and writing. */ @interface AGENTRANKNS0PokeProfile (JAXB) @end /*interface AGENTRANKNS0PokeProfile (JAXB)*/ /** * Internal, private implementation for JAXB reading and writing. */ @implementation AGENTRANKNS0PokeProfile (JAXB) /** * Read an instance of AGENTRANKNS0PokeProfile from an XML reader. * * @param reader The reader. * @return An instance of AGENTRANKNS0PokeProfile defined by the XML reader. */ + (id) readXMLType: (xmlTextReaderPtr) reader { AGENTRANKNS0PokeProfile *_aGENTRANKNS0PokeProfile = [[AGENTRANKNS0PokeProfile alloc] init]; NS_DURING { [_aGENTRANKNS0PokeProfile initWithReader: reader]; } NS_HANDLER { _aGENTRANKNS0PokeProfile = nil; [localException raise]; } NS_ENDHANDLER [_aGENTRANKNS0PokeProfile autorelease]; return _aGENTRANKNS0PokeProfile; } /** * Initialize this instance of AGENTRANKNS0PokeProfile according to * the XML being read from the reader. * * @param reader The reader. */ - (id) initWithReader: (xmlTextReaderPtr) reader { return [super initWithReader: reader]; } /** * Write the XML for this instance of AGENTRANKNS0PokeProfile to the writer. * Note that since we're only writing the XML type, * No start/end element will be written. * * @param reader The reader. */ - (void) writeXMLType: (xmlTextWriterPtr) writer { [super writeXMLType:writer]; } /** * Reads a AGENTRANKNS0PokeProfile from an XML reader. The element to be read is * "response". * * @param reader The XML reader. * @return The AGENTRANKNS0PokeProfile. */ + (id) readXMLElement: (xmlTextReaderPtr) reader { int status; AGENTRANKNS0PokeProfile *_pokeProfile = nil; if (xmlTextReaderNodeType(reader) != XML_READER_TYPE_ELEMENT) { status = xmlTextReaderAdvanceToNextStartOrEndElement(reader); if (status < 1) { [NSException raise: @"XMLReadError" format: @"Error advancing the reader to start element response."]; } } if (xmlStrcmp(BAD_CAST "response", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read root element {}response."); #endif _pokeProfile = (AGENTRANKNS0PokeProfile *)[AGENTRANKNS0PokeProfile readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"Successfully read root element {}response."); #endif } else { if (xmlTextReaderConstNamespaceUri(reader) == NULL) { [NSException raise: @"XMLReadError" format: @"Unable to read AGENTRANKNS0PokeProfile. Expected element response. Current element: {}%s", xmlTextReaderConstLocalName(reader)]; } else { [NSException raise: @"XMLReadError" format: @"Unable to read AGENTRANKNS0PokeProfile. Expected element response. Current element: {%s}%s\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)]; } } return _pokeProfile; } /** * Writes this AGENTRANKNS0PokeProfile to XML under element name "response". * The namespace declarations for the element will be written. * * @param writer The XML writer. * @param _pokeProfile The PokeProfile to write. * @return 1 if successful, 0 otherwise. */ - (void) writeXMLElement: (xmlTextWriterPtr) writer { [self writeXMLElement: writer writeNamespaces: YES]; } /** * Writes this AGENTRANKNS0PokeProfile to an XML writer. * * @param writer The writer. * @param writeNs Whether to write the namespaces for this element to the xml writer. */ - (void) writeXMLElement: (xmlTextWriterPtr) writer writeNamespaces: (BOOL) writeNs { int rc = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "response", NULL); if (rc < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start element {}response. XML writer status: %i\n", rc]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing type {}pokeProfile for root element {}response..."); #endif [self writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote type {}pokeProfile for root element {}response..."); #endif rc = xmlTextWriterEndElement(writer); if (rc < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end element {}response. XML writer status: %i\n", rc]; } } //documentation inherited. - (BOOL) readJAXBAttribute: (xmlTextReaderPtr) reader { void *_child_accessor; if ([super readJAXBAttribute: reader]) { return YES; } return NO; } //documentation inherited. - (BOOL) readJAXBValue: (xmlTextReaderPtr) reader { return [super readJAXBValue: reader]; } //documentation inherited. - (BOOL) readJAXBChildElement: (xmlTextReaderPtr) reader { id __child; void *_child_accessor; int status, depth; if ([super readJAXBChildElement: reader]) { return YES; } if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "status", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read choice {}status of type {}status."); #endif __child = [AGENTRANKNS0Status readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read choice {}status of type {}status."); #endif [self setStatus: __child]; return YES; } //end "if choice" return NO; } //documentation inherited. - (int) readUnknownJAXBChildElement: (xmlTextReaderPtr) reader { return [super readUnknownJAXBChildElement: reader]; } //documentation inherited. - (void) readUnknownJAXBAttribute: (xmlTextReaderPtr) reader { [super readUnknownJAXBAttribute: reader]; } //documentation inherited. - (void) writeJAXBAttributes: (xmlTextWriterPtr) writer { int status; [super writeJAXBAttributes: writer]; } //documentation inherited. - (void) writeJAXBValue: (xmlTextWriterPtr) writer { [super writeJAXBValue: writer]; } /** * Method for writing the child elements. * * @param writer The writer. */ - (void) writeJAXBChildElements: (xmlTextWriterPtr) writer { int status; id __item; NSEnumerator *__enumerator; [super writeJAXBChildElements: writer]; if ([self status]) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "status", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start child element {}status."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing element {}status..."); #endif [[self status] writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote element {}status..."); #endif status = xmlTextWriterEndElement(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end child element {}status."]; } } } @end /* implementation AGENTRANKNS0PokeProfile (JAXB) */ #endif /* DEF_AGENTRANKNS0PokeProfile_M */ #ifndef DEF_AGENTRANKNS0GetSale_M #define DEF_AGENTRANKNS0GetSale_M /** * User: marc Date: Oct 1, 2009 Time: 5:26:25 AM

THIS SOFTWARE IS COPYRIGHTED. THE SOFTWARE MAY NOT BE COPIED REPRODUCED, TRANSLATED, OR REDUCED TO ANY ELECTRONIC MEDIUM OR MACHINE READABLE FORM WITHOUT THE PRIOR WRITTEN CONSENT OF SOCO TECHNOLOGIES. */ @implementation AGENTRANKNS0GetSale /** * sale */ - (AGENTRANKNS0Sale *) sale { return _sale; } /** * sale */ - (void) setSale: (AGENTRANKNS0Sale *) newSale { [newSale retain]; [_sale release]; _sale = newSale; } /** * maps */ - (AGENTRANKNS0Images *) maps { return _maps; } /** * maps */ - (void) setMaps: (AGENTRANKNS0Images *) newMaps { [newMaps retain]; [_maps release]; _maps = newMaps; } /** * (no documentation provided) */ - (AGENTRANKNS0Status *) status { return _status; } /** * (no documentation provided) */ - (void) setStatus: (AGENTRANKNS0Status *) newStatus { [newStatus retain]; [_status release]; _status = newStatus; } - (void) dealloc { [self setSale: nil]; [self setMaps: nil]; [self setStatus: nil]; [super dealloc]; } //documentation inherited. + (id) readFromXML: (NSData *) xml { AGENTRANKNS0GetSale *_aGENTRANKNS0GetSale; xmlTextReaderPtr reader = xmlReaderForMemory([xml bytes], [xml length], NULL, NULL, 0); if (reader == NULL) { [NSException raise: @"XMLReadError" format: @"Error instantiating an XML reader."]; return nil; } _aGENTRANKNS0GetSale = (AGENTRANKNS0GetSale *) [AGENTRANKNS0GetSale readXMLElement: reader]; xmlFreeTextReader(reader); //free the reader return _aGENTRANKNS0GetSale; } //documentation inherited. - (NSData *) writeToXML { xmlBufferPtr buf; xmlTextWriterPtr writer; int rc; NSData *data; buf = xmlBufferCreate(); if (buf == NULL) { [NSException raise: @"XMLWriteError" format: @"Error creating an XML buffer."]; return nil; } writer = xmlNewTextWriterMemory(buf, 0); if (writer == NULL) { xmlBufferFree(buf); [NSException raise: @"XMLWriteError" format: @"Error creating an XML writer."]; return nil; } rc = xmlTextWriterStartDocument(writer, NULL, "utf-8", NULL); if (rc < 0) { xmlFreeTextWriter(writer); xmlBufferFree(buf); [NSException raise: @"XMLWriteError" format: @"Error writing XML start document."]; return nil; } NS_DURING { [self writeXMLElement: writer]; } NS_HANDLER { xmlFreeTextWriter(writer); xmlBufferFree(buf); [localException raise]; } NS_ENDHANDLER rc = xmlTextWriterEndDocument(writer); if (rc < 0) { xmlFreeTextWriter(writer); xmlBufferFree(buf); [NSException raise: @"XMLWriteError" format: @"Error writing XML end document."]; return nil; } xmlFreeTextWriter(writer); data = [NSData dataWithBytes: buf->content length: buf->use]; xmlBufferFree(buf); return data; } @end /* implementation AGENTRANKNS0GetSale */ /** * Internal, private interface for JAXB reading and writing. */ @interface AGENTRANKNS0GetSale (JAXB) @end /*interface AGENTRANKNS0GetSale (JAXB)*/ /** * Internal, private implementation for JAXB reading and writing. */ @implementation AGENTRANKNS0GetSale (JAXB) /** * Read an instance of AGENTRANKNS0GetSale from an XML reader. * * @param reader The reader. * @return An instance of AGENTRANKNS0GetSale defined by the XML reader. */ + (id) readXMLType: (xmlTextReaderPtr) reader { AGENTRANKNS0GetSale *_aGENTRANKNS0GetSale = [[AGENTRANKNS0GetSale alloc] init]; NS_DURING { [_aGENTRANKNS0GetSale initWithReader: reader]; } NS_HANDLER { _aGENTRANKNS0GetSale = nil; [localException raise]; } NS_ENDHANDLER [_aGENTRANKNS0GetSale autorelease]; return _aGENTRANKNS0GetSale; } /** * Initialize this instance of AGENTRANKNS0GetSale according to * the XML being read from the reader. * * @param reader The reader. */ - (id) initWithReader: (xmlTextReaderPtr) reader { return [super initWithReader: reader]; } /** * Write the XML for this instance of AGENTRANKNS0GetSale to the writer. * Note that since we're only writing the XML type, * No start/end element will be written. * * @param reader The reader. */ - (void) writeXMLType: (xmlTextWriterPtr) writer { [super writeXMLType:writer]; } /** * Reads a AGENTRANKNS0GetSale from an XML reader. The element to be read is * "response". * * @param reader The XML reader. * @return The AGENTRANKNS0GetSale. */ + (id) readXMLElement: (xmlTextReaderPtr) reader { int status; AGENTRANKNS0GetSale *_getSale = nil; if (xmlTextReaderNodeType(reader) != XML_READER_TYPE_ELEMENT) { status = xmlTextReaderAdvanceToNextStartOrEndElement(reader); if (status < 1) { [NSException raise: @"XMLReadError" format: @"Error advancing the reader to start element response."]; } } if (xmlStrcmp(BAD_CAST "response", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read root element {}response."); #endif _getSale = (AGENTRANKNS0GetSale *)[AGENTRANKNS0GetSale readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"Successfully read root element {}response."); #endif } else { if (xmlTextReaderConstNamespaceUri(reader) == NULL) { [NSException raise: @"XMLReadError" format: @"Unable to read AGENTRANKNS0GetSale. Expected element response. Current element: {}%s", xmlTextReaderConstLocalName(reader)]; } else { [NSException raise: @"XMLReadError" format: @"Unable to read AGENTRANKNS0GetSale. Expected element response. Current element: {%s}%s\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)]; } } return _getSale; } /** * Writes this AGENTRANKNS0GetSale to XML under element name "response". * The namespace declarations for the element will be written. * * @param writer The XML writer. * @param _getSale The GetSale to write. * @return 1 if successful, 0 otherwise. */ - (void) writeXMLElement: (xmlTextWriterPtr) writer { [self writeXMLElement: writer writeNamespaces: YES]; } /** * Writes this AGENTRANKNS0GetSale to an XML writer. * * @param writer The writer. * @param writeNs Whether to write the namespaces for this element to the xml writer. */ - (void) writeXMLElement: (xmlTextWriterPtr) writer writeNamespaces: (BOOL) writeNs { int rc = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "response", NULL); if (rc < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start element {}response. XML writer status: %i\n", rc]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing type {}getSale for root element {}response..."); #endif [self writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote type {}getSale for root element {}response..."); #endif rc = xmlTextWriterEndElement(writer); if (rc < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end element {}response. XML writer status: %i\n", rc]; } } //documentation inherited. - (BOOL) readJAXBAttribute: (xmlTextReaderPtr) reader { void *_child_accessor; if ([super readJAXBAttribute: reader]) { return YES; } return NO; } //documentation inherited. - (BOOL) readJAXBValue: (xmlTextReaderPtr) reader { return [super readJAXBValue: reader]; } //documentation inherited. - (BOOL) readJAXBChildElement: (xmlTextReaderPtr) reader { id __child; void *_child_accessor; int status, depth; if ([super readJAXBChildElement: reader]) { return YES; } if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "sale", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read choice {}sale of type {}sale."); #endif __child = [AGENTRANKNS0Sale readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read choice {}sale of type {}sale."); #endif [self setSale: __child]; return YES; } //end "if choice" if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "maps", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read choice {}maps of type {}images."); #endif __child = [AGENTRANKNS0Images readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read choice {}maps of type {}images."); #endif [self setMaps: __child]; return YES; } //end "if choice" if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "status", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read choice {}status of type {}status."); #endif __child = [AGENTRANKNS0Status readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read choice {}status of type {}status."); #endif [self setStatus: __child]; return YES; } //end "if choice" return NO; } //documentation inherited. - (int) readUnknownJAXBChildElement: (xmlTextReaderPtr) reader { return [super readUnknownJAXBChildElement: reader]; } //documentation inherited. - (void) readUnknownJAXBAttribute: (xmlTextReaderPtr) reader { [super readUnknownJAXBAttribute: reader]; } //documentation inherited. - (void) writeJAXBAttributes: (xmlTextWriterPtr) writer { int status; [super writeJAXBAttributes: writer]; } //documentation inherited. - (void) writeJAXBValue: (xmlTextWriterPtr) writer { [super writeJAXBValue: writer]; } /** * Method for writing the child elements. * * @param writer The writer. */ - (void) writeJAXBChildElements: (xmlTextWriterPtr) writer { int status; id __item; NSEnumerator *__enumerator; [super writeJAXBChildElements: writer]; if ([self sale]) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "sale", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start child element {}sale."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing element {}sale..."); #endif [[self sale] writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote element {}sale..."); #endif status = xmlTextWriterEndElement(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end child element {}sale."]; } } if ([self maps]) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "maps", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start child element {}maps."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing element {}maps..."); #endif [[self maps] writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote element {}maps..."); #endif status = xmlTextWriterEndElement(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end child element {}maps."]; } } if ([self status]) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "status", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start child element {}status."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing element {}status..."); #endif [[self status] writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote element {}status..."); #endif status = xmlTextWriterEndElement(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end child element {}status."]; } } } @end /* implementation AGENTRANKNS0GetSale (JAXB) */ #endif /* DEF_AGENTRANKNS0GetSale_M */ #ifndef DEF_AGENTRANKNS0GetReview_M #define DEF_AGENTRANKNS0GetReview_M /** * User: marc Date: Oct 1, 2009 Time: 5:26:25 AM

THIS SOFTWARE IS COPYRIGHTED. THE SOFTWARE MAY NOT BE COPIED REPRODUCED, TRANSLATED, OR REDUCED TO ANY ELECTRONIC MEDIUM OR MACHINE READABLE FORM WITHOUT THE PRIOR WRITTEN CONSENT OF SOCO TECHNOLOGIES. */ @implementation AGENTRANKNS0GetReview /** * status */ - (AGENTRANKNS0Status *) status { return _status; } /** * status */ - (void) setStatus: (AGENTRANKNS0Status *) newStatus { [newStatus retain]; [_status release]; _status = newStatus; } /** * (no documentation provided) */ - (AGENTRANKNS0Review *) review { return _review; } /** * (no documentation provided) */ - (void) setReview: (AGENTRANKNS0Review *) newReview { [newReview retain]; [_review release]; _review = newReview; } - (void) dealloc { [self setStatus: nil]; [self setReview: nil]; [super dealloc]; } //documentation inherited. + (id) readFromXML: (NSData *) xml { AGENTRANKNS0GetReview *_aGENTRANKNS0GetReview; xmlTextReaderPtr reader = xmlReaderForMemory([xml bytes], [xml length], NULL, NULL, 0); if (reader == NULL) { [NSException raise: @"XMLReadError" format: @"Error instantiating an XML reader."]; return nil; } _aGENTRANKNS0GetReview = (AGENTRANKNS0GetReview *) [AGENTRANKNS0GetReview readXMLElement: reader]; xmlFreeTextReader(reader); //free the reader return _aGENTRANKNS0GetReview; } //documentation inherited. - (NSData *) writeToXML { xmlBufferPtr buf; xmlTextWriterPtr writer; int rc; NSData *data; buf = xmlBufferCreate(); if (buf == NULL) { [NSException raise: @"XMLWriteError" format: @"Error creating an XML buffer."]; return nil; } writer = xmlNewTextWriterMemory(buf, 0); if (writer == NULL) { xmlBufferFree(buf); [NSException raise: @"XMLWriteError" format: @"Error creating an XML writer."]; return nil; } rc = xmlTextWriterStartDocument(writer, NULL, "utf-8", NULL); if (rc < 0) { xmlFreeTextWriter(writer); xmlBufferFree(buf); [NSException raise: @"XMLWriteError" format: @"Error writing XML start document."]; return nil; } NS_DURING { [self writeXMLElement: writer]; } NS_HANDLER { xmlFreeTextWriter(writer); xmlBufferFree(buf); [localException raise]; } NS_ENDHANDLER rc = xmlTextWriterEndDocument(writer); if (rc < 0) { xmlFreeTextWriter(writer); xmlBufferFree(buf); [NSException raise: @"XMLWriteError" format: @"Error writing XML end document."]; return nil; } xmlFreeTextWriter(writer); data = [NSData dataWithBytes: buf->content length: buf->use]; xmlBufferFree(buf); return data; } @end /* implementation AGENTRANKNS0GetReview */ /** * Internal, private interface for JAXB reading and writing. */ @interface AGENTRANKNS0GetReview (JAXB) @end /*interface AGENTRANKNS0GetReview (JAXB)*/ /** * Internal, private implementation for JAXB reading and writing. */ @implementation AGENTRANKNS0GetReview (JAXB) /** * Read an instance of AGENTRANKNS0GetReview from an XML reader. * * @param reader The reader. * @return An instance of AGENTRANKNS0GetReview defined by the XML reader. */ + (id) readXMLType: (xmlTextReaderPtr) reader { AGENTRANKNS0GetReview *_aGENTRANKNS0GetReview = [[AGENTRANKNS0GetReview alloc] init]; NS_DURING { [_aGENTRANKNS0GetReview initWithReader: reader]; } NS_HANDLER { _aGENTRANKNS0GetReview = nil; [localException raise]; } NS_ENDHANDLER [_aGENTRANKNS0GetReview autorelease]; return _aGENTRANKNS0GetReview; } /** * Initialize this instance of AGENTRANKNS0GetReview according to * the XML being read from the reader. * * @param reader The reader. */ - (id) initWithReader: (xmlTextReaderPtr) reader { return [super initWithReader: reader]; } /** * Write the XML for this instance of AGENTRANKNS0GetReview to the writer. * Note that since we're only writing the XML type, * No start/end element will be written. * * @param reader The reader. */ - (void) writeXMLType: (xmlTextWriterPtr) writer { [super writeXMLType:writer]; } /** * Reads a AGENTRANKNS0GetReview from an XML reader. The element to be read is * "response". * * @param reader The XML reader. * @return The AGENTRANKNS0GetReview. */ + (id) readXMLElement: (xmlTextReaderPtr) reader { int status; AGENTRANKNS0GetReview *_getReview = nil; if (xmlTextReaderNodeType(reader) != XML_READER_TYPE_ELEMENT) { status = xmlTextReaderAdvanceToNextStartOrEndElement(reader); if (status < 1) { [NSException raise: @"XMLReadError" format: @"Error advancing the reader to start element response."]; } } if (xmlStrcmp(BAD_CAST "response", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read root element {}response."); #endif _getReview = (AGENTRANKNS0GetReview *)[AGENTRANKNS0GetReview readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"Successfully read root element {}response."); #endif } else { if (xmlTextReaderConstNamespaceUri(reader) == NULL) { [NSException raise: @"XMLReadError" format: @"Unable to read AGENTRANKNS0GetReview. Expected element response. Current element: {}%s", xmlTextReaderConstLocalName(reader)]; } else { [NSException raise: @"XMLReadError" format: @"Unable to read AGENTRANKNS0GetReview. Expected element response. Current element: {%s}%s\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)]; } } return _getReview; } /** * Writes this AGENTRANKNS0GetReview to XML under element name "response". * The namespace declarations for the element will be written. * * @param writer The XML writer. * @param _getReview The GetReview to write. * @return 1 if successful, 0 otherwise. */ - (void) writeXMLElement: (xmlTextWriterPtr) writer { [self writeXMLElement: writer writeNamespaces: YES]; } /** * Writes this AGENTRANKNS0GetReview to an XML writer. * * @param writer The writer. * @param writeNs Whether to write the namespaces for this element to the xml writer. */ - (void) writeXMLElement: (xmlTextWriterPtr) writer writeNamespaces: (BOOL) writeNs { int rc = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "response", NULL); if (rc < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start element {}response. XML writer status: %i\n", rc]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing type {}getReview for root element {}response..."); #endif [self writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote type {}getReview for root element {}response..."); #endif rc = xmlTextWriterEndElement(writer); if (rc < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end element {}response. XML writer status: %i\n", rc]; } } //documentation inherited. - (BOOL) readJAXBAttribute: (xmlTextReaderPtr) reader { void *_child_accessor; if ([super readJAXBAttribute: reader]) { return YES; } return NO; } //documentation inherited. - (BOOL) readJAXBValue: (xmlTextReaderPtr) reader { return [super readJAXBValue: reader]; } //documentation inherited. - (BOOL) readJAXBChildElement: (xmlTextReaderPtr) reader { id __child; void *_child_accessor; int status, depth; if ([super readJAXBChildElement: reader]) { return YES; } if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "status", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read choice {}status of type {}status."); #endif __child = [AGENTRANKNS0Status readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read choice {}status of type {}status."); #endif [self setStatus: __child]; return YES; } //end "if choice" if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "review", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read choice {}review of type {}review."); #endif __child = [AGENTRANKNS0Review readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read choice {}review of type {}review."); #endif [self setReview: __child]; return YES; } //end "if choice" return NO; } //documentation inherited. - (int) readUnknownJAXBChildElement: (xmlTextReaderPtr) reader { return [super readUnknownJAXBChildElement: reader]; } //documentation inherited. - (void) readUnknownJAXBAttribute: (xmlTextReaderPtr) reader { [super readUnknownJAXBAttribute: reader]; } //documentation inherited. - (void) writeJAXBAttributes: (xmlTextWriterPtr) writer { int status; [super writeJAXBAttributes: writer]; } //documentation inherited. - (void) writeJAXBValue: (xmlTextWriterPtr) writer { [super writeJAXBValue: writer]; } /** * Method for writing the child elements. * * @param writer The writer. */ - (void) writeJAXBChildElements: (xmlTextWriterPtr) writer { int status; id __item; NSEnumerator *__enumerator; [super writeJAXBChildElements: writer]; if ([self status]) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "status", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start child element {}status."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing element {}status..."); #endif [[self status] writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote element {}status..."); #endif status = xmlTextWriterEndElement(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end child element {}status."]; } } if ([self review]) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "review", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start child element {}review."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing element {}review..."); #endif [[self review] writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote element {}review..."); #endif status = xmlTextWriterEndElement(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end child element {}review."]; } } } @end /* implementation AGENTRANKNS0GetReview (JAXB) */ #endif /* DEF_AGENTRANKNS0GetReview_M */ #ifndef DEF_AGENTRANKNS0GetForecasts_M #define DEF_AGENTRANKNS0GetForecasts_M /** * User: marc Date: Oct 1, 2009 Time: 5:26:25 AM

THIS SOFTWARE IS COPYRIGHTED. THE SOFTWARE MAY NOT BE COPIED REPRODUCED, TRANSLATED, OR REDUCED TO ANY ELECTRONIC MEDIUM OR MACHINE READABLE FORM WITHOUT THE PRIOR WRITTEN CONSENT OF SOCO TECHNOLOGIES. */ @implementation AGENTRANKNS0GetForecasts /** * chart image */ - (AGENTRANKNS0Images *) charts { return _charts; } /** * chart image */ - (void) setCharts: (AGENTRANKNS0Images *) newCharts { [newCharts retain]; [_charts release]; _charts = newCharts; } /** * status */ - (AGENTRANKNS0Status *) status { return _status; } /** * status */ - (void) setStatus: (AGENTRANKNS0Status *) newStatus { [newStatus retain]; [_status release]; _status = newStatus; } /** * forecasting */ - (AGENTRANKNS0Forecasts *) forecasts { return _forecasts; } /** * forecasting */ - (void) setForecasts: (AGENTRANKNS0Forecasts *) newForecasts { [newForecasts retain]; [_forecasts release]; _forecasts = newForecasts; } - (void) dealloc { [self setCharts: nil]; [self setStatus: nil]; [self setForecasts: nil]; [super dealloc]; } //documentation inherited. + (id) readFromXML: (NSData *) xml { AGENTRANKNS0GetForecasts *_aGENTRANKNS0GetForecasts; xmlTextReaderPtr reader = xmlReaderForMemory([xml bytes], [xml length], NULL, NULL, 0); if (reader == NULL) { [NSException raise: @"XMLReadError" format: @"Error instantiating an XML reader."]; return nil; } _aGENTRANKNS0GetForecasts = (AGENTRANKNS0GetForecasts *) [AGENTRANKNS0GetForecasts readXMLElement: reader]; xmlFreeTextReader(reader); //free the reader return _aGENTRANKNS0GetForecasts; } //documentation inherited. - (NSData *) writeToXML { xmlBufferPtr buf; xmlTextWriterPtr writer; int rc; NSData *data; buf = xmlBufferCreate(); if (buf == NULL) { [NSException raise: @"XMLWriteError" format: @"Error creating an XML buffer."]; return nil; } writer = xmlNewTextWriterMemory(buf, 0); if (writer == NULL) { xmlBufferFree(buf); [NSException raise: @"XMLWriteError" format: @"Error creating an XML writer."]; return nil; } rc = xmlTextWriterStartDocument(writer, NULL, "utf-8", NULL); if (rc < 0) { xmlFreeTextWriter(writer); xmlBufferFree(buf); [NSException raise: @"XMLWriteError" format: @"Error writing XML start document."]; return nil; } NS_DURING { [self writeXMLElement: writer]; } NS_HANDLER { xmlFreeTextWriter(writer); xmlBufferFree(buf); [localException raise]; } NS_ENDHANDLER rc = xmlTextWriterEndDocument(writer); if (rc < 0) { xmlFreeTextWriter(writer); xmlBufferFree(buf); [NSException raise: @"XMLWriteError" format: @"Error writing XML end document."]; return nil; } xmlFreeTextWriter(writer); data = [NSData dataWithBytes: buf->content length: buf->use]; xmlBufferFree(buf); return data; } @end /* implementation AGENTRANKNS0GetForecasts */ /** * Internal, private interface for JAXB reading and writing. */ @interface AGENTRANKNS0GetForecasts (JAXB) @end /*interface AGENTRANKNS0GetForecasts (JAXB)*/ /** * Internal, private implementation for JAXB reading and writing. */ @implementation AGENTRANKNS0GetForecasts (JAXB) /** * Read an instance of AGENTRANKNS0GetForecasts from an XML reader. * * @param reader The reader. * @return An instance of AGENTRANKNS0GetForecasts defined by the XML reader. */ + (id) readXMLType: (xmlTextReaderPtr) reader { AGENTRANKNS0GetForecasts *_aGENTRANKNS0GetForecasts = [[AGENTRANKNS0GetForecasts alloc] init]; NS_DURING { [_aGENTRANKNS0GetForecasts initWithReader: reader]; } NS_HANDLER { _aGENTRANKNS0GetForecasts = nil; [localException raise]; } NS_ENDHANDLER [_aGENTRANKNS0GetForecasts autorelease]; return _aGENTRANKNS0GetForecasts; } /** * Initialize this instance of AGENTRANKNS0GetForecasts according to * the XML being read from the reader. * * @param reader The reader. */ - (id) initWithReader: (xmlTextReaderPtr) reader { return [super initWithReader: reader]; } /** * Write the XML for this instance of AGENTRANKNS0GetForecasts to the writer. * Note that since we're only writing the XML type, * No start/end element will be written. * * @param reader The reader. */ - (void) writeXMLType: (xmlTextWriterPtr) writer { [super writeXMLType:writer]; } /** * Reads a AGENTRANKNS0GetForecasts from an XML reader. The element to be read is * "response". * * @param reader The XML reader. * @return The AGENTRANKNS0GetForecasts. */ + (id) readXMLElement: (xmlTextReaderPtr) reader { int status; AGENTRANKNS0GetForecasts *_getForecasts = nil; if (xmlTextReaderNodeType(reader) != XML_READER_TYPE_ELEMENT) { status = xmlTextReaderAdvanceToNextStartOrEndElement(reader); if (status < 1) { [NSException raise: @"XMLReadError" format: @"Error advancing the reader to start element response."]; } } if (xmlStrcmp(BAD_CAST "response", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read root element {}response."); #endif _getForecasts = (AGENTRANKNS0GetForecasts *)[AGENTRANKNS0GetForecasts readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"Successfully read root element {}response."); #endif } else { if (xmlTextReaderConstNamespaceUri(reader) == NULL) { [NSException raise: @"XMLReadError" format: @"Unable to read AGENTRANKNS0GetForecasts. Expected element response. Current element: {}%s", xmlTextReaderConstLocalName(reader)]; } else { [NSException raise: @"XMLReadError" format: @"Unable to read AGENTRANKNS0GetForecasts. Expected element response. Current element: {%s}%s\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)]; } } return _getForecasts; } /** * Writes this AGENTRANKNS0GetForecasts to XML under element name "response". * The namespace declarations for the element will be written. * * @param writer The XML writer. * @param _getForecasts The GetForecasts to write. * @return 1 if successful, 0 otherwise. */ - (void) writeXMLElement: (xmlTextWriterPtr) writer { [self writeXMLElement: writer writeNamespaces: YES]; } /** * Writes this AGENTRANKNS0GetForecasts to an XML writer. * * @param writer The writer. * @param writeNs Whether to write the namespaces for this element to the xml writer. */ - (void) writeXMLElement: (xmlTextWriterPtr) writer writeNamespaces: (BOOL) writeNs { int rc = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "response", NULL); if (rc < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start element {}response. XML writer status: %i\n", rc]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing type {}getForecasts for root element {}response..."); #endif [self writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote type {}getForecasts for root element {}response..."); #endif rc = xmlTextWriterEndElement(writer); if (rc < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end element {}response. XML writer status: %i\n", rc]; } } //documentation inherited. - (BOOL) readJAXBAttribute: (xmlTextReaderPtr) reader { void *_child_accessor; if ([super readJAXBAttribute: reader]) { return YES; } return NO; } //documentation inherited. - (BOOL) readJAXBValue: (xmlTextReaderPtr) reader { return [super readJAXBValue: reader]; } //documentation inherited. - (BOOL) readJAXBChildElement: (xmlTextReaderPtr) reader { id __child; void *_child_accessor; int status, depth; if ([super readJAXBChildElement: reader]) { return YES; } if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "charts", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read choice {}charts of type {}images."); #endif __child = [AGENTRANKNS0Images readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read choice {}charts of type {}images."); #endif [self setCharts: __child]; return YES; } //end "if choice" if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "status", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read choice {}status of type {}status."); #endif __child = [AGENTRANKNS0Status readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read choice {}status of type {}status."); #endif [self setStatus: __child]; return YES; } //end "if choice" if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "forecasts", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read choice {}forecasts of type {}forecasts."); #endif __child = [AGENTRANKNS0Forecasts readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read choice {}forecasts of type {}forecasts."); #endif [self setForecasts: __child]; return YES; } //end "if choice" return NO; } //documentation inherited. - (int) readUnknownJAXBChildElement: (xmlTextReaderPtr) reader { return [super readUnknownJAXBChildElement: reader]; } //documentation inherited. - (void) readUnknownJAXBAttribute: (xmlTextReaderPtr) reader { [super readUnknownJAXBAttribute: reader]; } //documentation inherited. - (void) writeJAXBAttributes: (xmlTextWriterPtr) writer { int status; [super writeJAXBAttributes: writer]; } //documentation inherited. - (void) writeJAXBValue: (xmlTextWriterPtr) writer { [super writeJAXBValue: writer]; } /** * Method for writing the child elements. * * @param writer The writer. */ - (void) writeJAXBChildElements: (xmlTextWriterPtr) writer { int status; id __item; NSEnumerator *__enumerator; [super writeJAXBChildElements: writer]; if ([self charts]) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "charts", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start child element {}charts."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing element {}charts..."); #endif [[self charts] writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote element {}charts..."); #endif status = xmlTextWriterEndElement(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end child element {}charts."]; } } if ([self status]) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "status", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start child element {}status."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing element {}status..."); #endif [[self status] writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote element {}status..."); #endif status = xmlTextWriterEndElement(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end child element {}status."]; } } if ([self forecasts]) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "forecasts", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start child element {}forecasts."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing element {}forecasts..."); #endif [[self forecasts] writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote element {}forecasts..."); #endif status = xmlTextWriterEndElement(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end child element {}forecasts."]; } } } @end /* implementation AGENTRANKNS0GetForecasts (JAXB) */ #endif /* DEF_AGENTRANKNS0GetForecasts_M */ #ifndef DEF_AGENTRANKNS0FindProfiles_M #define DEF_AGENTRANKNS0FindProfiles_M /** * User: marc Date: Oct 1, 2009 Time: 5:26:25 AM

THIS SOFTWARE IS COPYRIGHTED. THE SOFTWARE MAY NOT BE COPIED REPRODUCED, TRANSLATED, OR REDUCED TO ANY ELECTRONIC MEDIUM OR MACHINE READABLE FORM WITHOUT THE PRIOR WRITTEN CONSENT OF SOCO TECHNOLOGIES. */ @implementation AGENTRANKNS0FindProfiles /** * status */ - (AGENTRANKNS0Status *) status { return _status; } /** * status */ - (void) setStatus: (AGENTRANKNS0Status *) newStatus { [newStatus retain]; [_status release]; _status = newStatus; } /** * (no documentation provided) */ - (AGENTRANKNS0Profiles *) profiles { return _profiles; } /** * (no documentation provided) */ - (void) setProfiles: (AGENTRANKNS0Profiles *) newProfiles { [newProfiles retain]; [_profiles release]; _profiles = newProfiles; } - (void) dealloc { [self setStatus: nil]; [self setProfiles: nil]; [super dealloc]; } //documentation inherited. + (id) readFromXML: (NSData *) xml { AGENTRANKNS0FindProfiles *_aGENTRANKNS0FindProfiles; xmlTextReaderPtr reader = xmlReaderForMemory([xml bytes], [xml length], NULL, NULL, 0); if (reader == NULL) { [NSException raise: @"XMLReadError" format: @"Error instantiating an XML reader."]; return nil; } _aGENTRANKNS0FindProfiles = (AGENTRANKNS0FindProfiles *) [AGENTRANKNS0FindProfiles readXMLElement: reader]; xmlFreeTextReader(reader); //free the reader return _aGENTRANKNS0FindProfiles; } //documentation inherited. - (NSData *) writeToXML { xmlBufferPtr buf; xmlTextWriterPtr writer; int rc; NSData *data; buf = xmlBufferCreate(); if (buf == NULL) { [NSException raise: @"XMLWriteError" format: @"Error creating an XML buffer."]; return nil; } writer = xmlNewTextWriterMemory(buf, 0); if (writer == NULL) { xmlBufferFree(buf); [NSException raise: @"XMLWriteError" format: @"Error creating an XML writer."]; return nil; } rc = xmlTextWriterStartDocument(writer, NULL, "utf-8", NULL); if (rc < 0) { xmlFreeTextWriter(writer); xmlBufferFree(buf); [NSException raise: @"XMLWriteError" format: @"Error writing XML start document."]; return nil; } NS_DURING { [self writeXMLElement: writer]; } NS_HANDLER { xmlFreeTextWriter(writer); xmlBufferFree(buf); [localException raise]; } NS_ENDHANDLER rc = xmlTextWriterEndDocument(writer); if (rc < 0) { xmlFreeTextWriter(writer); xmlBufferFree(buf); [NSException raise: @"XMLWriteError" format: @"Error writing XML end document."]; return nil; } xmlFreeTextWriter(writer); data = [NSData dataWithBytes: buf->content length: buf->use]; xmlBufferFree(buf); return data; } @end /* implementation AGENTRANKNS0FindProfiles */ /** * Internal, private interface for JAXB reading and writing. */ @interface AGENTRANKNS0FindProfiles (JAXB) @end /*interface AGENTRANKNS0FindProfiles (JAXB)*/ /** * Internal, private implementation for JAXB reading and writing. */ @implementation AGENTRANKNS0FindProfiles (JAXB) /** * Read an instance of AGENTRANKNS0FindProfiles from an XML reader. * * @param reader The reader. * @return An instance of AGENTRANKNS0FindProfiles defined by the XML reader. */ + (id) readXMLType: (xmlTextReaderPtr) reader { AGENTRANKNS0FindProfiles *_aGENTRANKNS0FindProfiles = [[AGENTRANKNS0FindProfiles alloc] init]; NS_DURING { [_aGENTRANKNS0FindProfiles initWithReader: reader]; } NS_HANDLER { _aGENTRANKNS0FindProfiles = nil; [localException raise]; } NS_ENDHANDLER [_aGENTRANKNS0FindProfiles autorelease]; return _aGENTRANKNS0FindProfiles; } /** * Initialize this instance of AGENTRANKNS0FindProfiles according to * the XML being read from the reader. * * @param reader The reader. */ - (id) initWithReader: (xmlTextReaderPtr) reader { return [super initWithReader: reader]; } /** * Write the XML for this instance of AGENTRANKNS0FindProfiles to the writer. * Note that since we're only writing the XML type, * No start/end element will be written. * * @param reader The reader. */ - (void) writeXMLType: (xmlTextWriterPtr) writer { [super writeXMLType:writer]; } /** * Reads a AGENTRANKNS0FindProfiles from an XML reader. The element to be read is * "response". * * @param reader The XML reader. * @return The AGENTRANKNS0FindProfiles. */ + (id) readXMLElement: (xmlTextReaderPtr) reader { int status; AGENTRANKNS0FindProfiles *_findProfiles = nil; if (xmlTextReaderNodeType(reader) != XML_READER_TYPE_ELEMENT) { status = xmlTextReaderAdvanceToNextStartOrEndElement(reader); if (status < 1) { [NSException raise: @"XMLReadError" format: @"Error advancing the reader to start element response."]; } } if (xmlStrcmp(BAD_CAST "response", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read root element {}response."); #endif _findProfiles = (AGENTRANKNS0FindProfiles *)[AGENTRANKNS0FindProfiles readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"Successfully read root element {}response."); #endif } else { if (xmlTextReaderConstNamespaceUri(reader) == NULL) { [NSException raise: @"XMLReadError" format: @"Unable to read AGENTRANKNS0FindProfiles. Expected element response. Current element: {}%s", xmlTextReaderConstLocalName(reader)]; } else { [NSException raise: @"XMLReadError" format: @"Unable to read AGENTRANKNS0FindProfiles. Expected element response. Current element: {%s}%s\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)]; } } return _findProfiles; } /** * Writes this AGENTRANKNS0FindProfiles to XML under element name "response". * The namespace declarations for the element will be written. * * @param writer The XML writer. * @param _findProfiles The FindProfiles to write. * @return 1 if successful, 0 otherwise. */ - (void) writeXMLElement: (xmlTextWriterPtr) writer { [self writeXMLElement: writer writeNamespaces: YES]; } /** * Writes this AGENTRANKNS0FindProfiles to an XML writer. * * @param writer The writer. * @param writeNs Whether to write the namespaces for this element to the xml writer. */ - (void) writeXMLElement: (xmlTextWriterPtr) writer writeNamespaces: (BOOL) writeNs { int rc = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "response", NULL); if (rc < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start element {}response. XML writer status: %i\n", rc]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing type {}findProfiles for root element {}response..."); #endif [self writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote type {}findProfiles for root element {}response..."); #endif rc = xmlTextWriterEndElement(writer); if (rc < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end element {}response. XML writer status: %i\n", rc]; } } //documentation inherited. - (BOOL) readJAXBAttribute: (xmlTextReaderPtr) reader { void *_child_accessor; if ([super readJAXBAttribute: reader]) { return YES; } return NO; } //documentation inherited. - (BOOL) readJAXBValue: (xmlTextReaderPtr) reader { return [super readJAXBValue: reader]; } //documentation inherited. - (BOOL) readJAXBChildElement: (xmlTextReaderPtr) reader { id __child; void *_child_accessor; int status, depth; if ([super readJAXBChildElement: reader]) { return YES; } if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "status", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read choice {}status of type {}status."); #endif __child = [AGENTRANKNS0Status readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read choice {}status of type {}status."); #endif [self setStatus: __child]; return YES; } //end "if choice" if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "profiles", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read choice {}profiles of type {}profiles."); #endif __child = [AGENTRANKNS0Profiles readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read choice {}profiles of type {}profiles."); #endif [self setProfiles: __child]; return YES; } //end "if choice" return NO; } //documentation inherited. - (int) readUnknownJAXBChildElement: (xmlTextReaderPtr) reader { return [super readUnknownJAXBChildElement: reader]; } //documentation inherited. - (void) readUnknownJAXBAttribute: (xmlTextReaderPtr) reader { [super readUnknownJAXBAttribute: reader]; } //documentation inherited. - (void) writeJAXBAttributes: (xmlTextWriterPtr) writer { int status; [super writeJAXBAttributes: writer]; } //documentation inherited. - (void) writeJAXBValue: (xmlTextWriterPtr) writer { [super writeJAXBValue: writer]; } /** * Method for writing the child elements. * * @param writer The writer. */ - (void) writeJAXBChildElements: (xmlTextWriterPtr) writer { int status; id __item; NSEnumerator *__enumerator; [super writeJAXBChildElements: writer]; if ([self status]) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "status", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start child element {}status."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing element {}status..."); #endif [[self status] writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote element {}status..."); #endif status = xmlTextWriterEndElement(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end child element {}status."]; } } if ([self profiles]) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "profiles", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start child element {}profiles."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing element {}profiles..."); #endif [[self profiles] writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote element {}profiles..."); #endif status = xmlTextWriterEndElement(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end child element {}profiles."]; } } } @end /* implementation AGENTRANKNS0FindProfiles (JAXB) */ #endif /* DEF_AGENTRANKNS0FindProfiles_M */ #ifndef DEF_AGENTRANKNS0Agent_M #define DEF_AGENTRANKNS0Agent_M /** * User: marc Date: Mar 4, 2008 Time: 6:15:00 AM

THIS SOFTWARE IS COPYRIGHTED. THE SOFTWARE MAY NOT BE COPIED REPRODUCED, TRANSLATED, OR REDUCED TO ANY ELECTRONIC MEDIUM OR MACHINE READABLE FORM WITHOUT THE PRIOR WRITTEN CONSENT OF SOCO TECHNOLOGIES. */ @implementation AGENTRANKNS0Agent /** * (no documentation provided) */ - (NSString *) identifier { return _identifier; } /** * (no documentation provided) */ - (void) setIdentifier: (NSString *) newIdentifier { [newIdentifier retain]; [_identifier release]; _identifier = newIdentifier; } /** * sales */ - (AGENTRANKNS0Sales *) sales { return _sales; } /** * sales */ - (void) setSales: (AGENTRANKNS0Sales *) newSales { [newSales retain]; [_sales release]; _sales = newSales; } /** * (no documentation provided) */ - (AGENTRANKNS0Images *) charts { return _charts; } /** * (no documentation provided) */ - (void) setCharts: (AGENTRANKNS0Images *) newCharts { [newCharts retain]; [_charts release]; _charts = newCharts; } /** * (no documentation provided) */ - (AGENTRANKNS0Profile *) profile { return _profile; } /** * (no documentation provided) */ - (void) setProfile: (AGENTRANKNS0Profile *) newProfile { [newProfile retain]; [_profile release]; _profile = newProfile; } /** * (no documentation provided) */ - (AGENTRANKNS0Reviews *) reviews { return _reviews; } /** * (no documentation provided) */ - (void) setReviews: (AGENTRANKNS0Reviews *) newReviews { [newReviews retain]; [_reviews release]; _reviews = newReviews; } /** * (no documentation provided) */ - (AGENTRANKNS0Forecasts *) forecasts { return _forecasts; } /** * (no documentation provided) */ - (void) setForecasts: (AGENTRANKNS0Forecasts *) newForecasts { [newForecasts retain]; [_forecasts release]; _forecasts = newForecasts; } - (void) dealloc { [self setIdentifier: nil]; [self setSales: nil]; [self setCharts: nil]; [self setProfile: nil]; [self setReviews: nil]; [self setForecasts: nil]; [super dealloc]; } //documentation inherited. + (id) readFromXML: (NSData *) xml { AGENTRANKNS0Agent *_aGENTRANKNS0Agent; xmlTextReaderPtr reader = xmlReaderForMemory([xml bytes], [xml length], NULL, NULL, 0); if (reader == NULL) { [NSException raise: @"XMLReadError" format: @"Error instantiating an XML reader."]; return nil; } _aGENTRANKNS0Agent = (AGENTRANKNS0Agent *) [AGENTRANKNS0Agent readXMLElement: reader]; xmlFreeTextReader(reader); //free the reader return _aGENTRANKNS0Agent; } //documentation inherited. - (NSData *) writeToXML { xmlBufferPtr buf; xmlTextWriterPtr writer; int rc; NSData *data; buf = xmlBufferCreate(); if (buf == NULL) { [NSException raise: @"XMLWriteError" format: @"Error creating an XML buffer."]; return nil; } writer = xmlNewTextWriterMemory(buf, 0); if (writer == NULL) { xmlBufferFree(buf); [NSException raise: @"XMLWriteError" format: @"Error creating an XML writer."]; return nil; } rc = xmlTextWriterStartDocument(writer, NULL, "utf-8", NULL); if (rc < 0) { xmlFreeTextWriter(writer); xmlBufferFree(buf); [NSException raise: @"XMLWriteError" format: @"Error writing XML start document."]; return nil; } NS_DURING { [self writeXMLElement: writer]; } NS_HANDLER { xmlFreeTextWriter(writer); xmlBufferFree(buf); [localException raise]; } NS_ENDHANDLER rc = xmlTextWriterEndDocument(writer); if (rc < 0) { xmlFreeTextWriter(writer); xmlBufferFree(buf); [NSException raise: @"XMLWriteError" format: @"Error writing XML end document."]; return nil; } xmlFreeTextWriter(writer); data = [NSData dataWithBytes: buf->content length: buf->use]; xmlBufferFree(buf); return data; } @end /* implementation AGENTRANKNS0Agent */ /** * Internal, private interface for JAXB reading and writing. */ @interface AGENTRANKNS0Agent (JAXB) @end /*interface AGENTRANKNS0Agent (JAXB)*/ /** * Internal, private implementation for JAXB reading and writing. */ @implementation AGENTRANKNS0Agent (JAXB) /** * Read an instance of AGENTRANKNS0Agent from an XML reader. * * @param reader The reader. * @return An instance of AGENTRANKNS0Agent defined by the XML reader. */ + (id) readXMLType: (xmlTextReaderPtr) reader { AGENTRANKNS0Agent *_aGENTRANKNS0Agent = [[AGENTRANKNS0Agent alloc] init]; NS_DURING { [_aGENTRANKNS0Agent initWithReader: reader]; } NS_HANDLER { _aGENTRANKNS0Agent = nil; [localException raise]; } NS_ENDHANDLER [_aGENTRANKNS0Agent autorelease]; return _aGENTRANKNS0Agent; } /** * Initialize this instance of AGENTRANKNS0Agent according to * the XML being read from the reader. * * @param reader The reader. */ - (id) initWithReader: (xmlTextReaderPtr) reader { return [super initWithReader: reader]; } /** * Write the XML for this instance of AGENTRANKNS0Agent to the writer. * Note that since we're only writing the XML type, * No start/end element will be written. * * @param reader The reader. */ - (void) writeXMLType: (xmlTextWriterPtr) writer { [super writeXMLType:writer]; } /** * Reads a AGENTRANKNS0Agent from an XML reader. The element to be read is * "agent". * * @param reader The XML reader. * @return The AGENTRANKNS0Agent. */ + (id) readXMLElement: (xmlTextReaderPtr) reader { int status; AGENTRANKNS0Agent *_agent = nil; if (xmlTextReaderNodeType(reader) != XML_READER_TYPE_ELEMENT) { status = xmlTextReaderAdvanceToNextStartOrEndElement(reader); if (status < 1) { [NSException raise: @"XMLReadError" format: @"Error advancing the reader to start element agent."]; } } if (xmlStrcmp(BAD_CAST "agent", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read root element {}agent."); #endif _agent = (AGENTRANKNS0Agent *)[AGENTRANKNS0Agent readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"Successfully read root element {}agent."); #endif } else { if (xmlTextReaderConstNamespaceUri(reader) == NULL) { [NSException raise: @"XMLReadError" format: @"Unable to read AGENTRANKNS0Agent. Expected element agent. Current element: {}%s", xmlTextReaderConstLocalName(reader)]; } else { [NSException raise: @"XMLReadError" format: @"Unable to read AGENTRANKNS0Agent. Expected element agent. Current element: {%s}%s\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)]; } } return _agent; } /** * Writes this AGENTRANKNS0Agent to XML under element name "agent". * The namespace declarations for the element will be written. * * @param writer The XML writer. * @param _agent The Agent to write. * @return 1 if successful, 0 otherwise. */ - (void) writeXMLElement: (xmlTextWriterPtr) writer { [self writeXMLElement: writer writeNamespaces: YES]; } /** * Writes this AGENTRANKNS0Agent to an XML writer. * * @param writer The writer. * @param writeNs Whether to write the namespaces for this element to the xml writer. */ - (void) writeXMLElement: (xmlTextWriterPtr) writer writeNamespaces: (BOOL) writeNs { int rc = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "agent", NULL); if (rc < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start element {}agent. XML writer status: %i\n", rc]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing type {}agent for root element {}agent..."); #endif [self writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote type {}agent for root element {}agent..."); #endif rc = xmlTextWriterEndElement(writer); if (rc < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end element {}agent. XML writer status: %i\n", rc]; } } //documentation inherited. - (BOOL) readJAXBAttribute: (xmlTextReaderPtr) reader { void *_child_accessor; if ([super readJAXBAttribute: reader]) { return YES; } if ((xmlStrcmp(BAD_CAST "id", xmlTextReaderConstLocalName(reader)) == 0) && (xmlTextReaderConstNamespaceUri(reader) == NULL)) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read attribute {}id..."); #endif [self setIdentifier: (NSString*) [NSString readXMLType: reader]]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read attribute {}id..."); #endif return YES; } return NO; } //documentation inherited. - (BOOL) readJAXBValue: (xmlTextReaderPtr) reader { return [super readJAXBValue: reader]; } //documentation inherited. - (BOOL) readJAXBChildElement: (xmlTextReaderPtr) reader { id __child; void *_child_accessor; int status, depth; if ([super readJAXBChildElement: reader]) { return YES; } if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "sales", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read choice {}sales of type {}sales."); #endif __child = [AGENTRANKNS0Sales readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read choice {}sales of type {}sales."); #endif [self setSales: __child]; return YES; } //end "if choice" if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "charts", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read choice {}charts of type {}images."); #endif __child = [AGENTRANKNS0Images readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read choice {}charts of type {}images."); #endif [self setCharts: __child]; return YES; } //end "if choice" if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "profile", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read choice {}profile of type {}profile."); #endif __child = [AGENTRANKNS0Profile readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read choice {}profile of type {}profile."); #endif [self setProfile: __child]; return YES; } //end "if choice" if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "reviews", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read choice {}reviews of type {}reviews."); #endif __child = [AGENTRANKNS0Reviews readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read choice {}reviews of type {}reviews."); #endif [self setReviews: __child]; return YES; } //end "if choice" if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "forecasts", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read choice {}forecasts of type {}forecasts."); #endif __child = [AGENTRANKNS0Forecasts readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read choice {}forecasts of type {}forecasts."); #endif [self setForecasts: __child]; return YES; } //end "if choice" return NO; } //documentation inherited. - (int) readUnknownJAXBChildElement: (xmlTextReaderPtr) reader { return [super readUnknownJAXBChildElement: reader]; } //documentation inherited. - (void) readUnknownJAXBAttribute: (xmlTextReaderPtr) reader { [super readUnknownJAXBAttribute: reader]; } //documentation inherited. - (void) writeJAXBAttributes: (xmlTextWriterPtr) writer { int status; [super writeJAXBAttributes: writer]; if ([self identifier]) { status = xmlTextWriterStartAttributeNS(writer, NULL, BAD_CAST "id", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start attribute {}id."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing attribute {}id..."); #endif [[self identifier] writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote attribute {}id..."); #endif status = xmlTextWriterEndAttribute(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end attribute {}id."]; } } } //documentation inherited. - (void) writeJAXBValue: (xmlTextWriterPtr) writer { [super writeJAXBValue: writer]; } /** * Method for writing the child elements. * * @param writer The writer. */ - (void) writeJAXBChildElements: (xmlTextWriterPtr) writer { int status; id __item; NSEnumerator *__enumerator; [super writeJAXBChildElements: writer]; if ([self sales]) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "sales", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start child element {}sales."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing element {}sales..."); #endif [[self sales] writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote element {}sales..."); #endif status = xmlTextWriterEndElement(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end child element {}sales."]; } } if ([self charts]) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "charts", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start child element {}charts."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing element {}charts..."); #endif [[self charts] writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote element {}charts..."); #endif status = xmlTextWriterEndElement(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end child element {}charts."]; } } if ([self profile]) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "profile", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start child element {}profile."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing element {}profile..."); #endif [[self profile] writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote element {}profile..."); #endif status = xmlTextWriterEndElement(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end child element {}profile."]; } } if ([self reviews]) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "reviews", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start child element {}reviews."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing element {}reviews..."); #endif [[self reviews] writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote element {}reviews..."); #endif status = xmlTextWriterEndElement(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end child element {}reviews."]; } } if ([self forecasts]) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "forecasts", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start child element {}forecasts."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing element {}forecasts..."); #endif [[self forecasts] writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote element {}forecasts..."); #endif status = xmlTextWriterEndElement(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end child element {}forecasts."]; } } } @end /* implementation AGENTRANKNS0Agent (JAXB) */ #endif /* DEF_AGENTRANKNS0Agent_M */ #ifndef DEF_AGENTRANKNS0PhotoSizes_M #define DEF_AGENTRANKNS0PhotoSizes_M /** * User: marc Date: Mar 4, 2008 Time: 6:15:00 AM

THIS SOFTWARE IS COPYRIGHTED. THE SOFTWARE MAY NOT BE COPIED REPRODUCED, TRANSLATED, OR REDUCED TO ANY ELECTRONIC MEDIUM OR MACHINE READABLE FORM WITHOUT THE PRIOR WRITTEN CONSENT OF SOCO TECHNOLOGIES. */ @implementation AGENTRANKNS0PhotoSizes /** * (no documentation provided) */ - (NSArray *) size { return _size; } /** * (no documentation provided) */ - (void) setSize: (NSArray *) newSize { [newSize retain]; [_size release]; _size = newSize; } - (void) dealloc { [self setSize: nil]; [super dealloc]; } //documentation inherited. + (id) readFromXML: (NSData *) xml { AGENTRANKNS0PhotoSizes *_aGENTRANKNS0PhotoSizes; xmlTextReaderPtr reader = xmlReaderForMemory([xml bytes], [xml length], NULL, NULL, 0); if (reader == NULL) { [NSException raise: @"XMLReadError" format: @"Error instantiating an XML reader."]; return nil; } _aGENTRANKNS0PhotoSizes = (AGENTRANKNS0PhotoSizes *) [AGENTRANKNS0PhotoSizes readXMLElement: reader]; xmlFreeTextReader(reader); //free the reader return _aGENTRANKNS0PhotoSizes; } //documentation inherited. - (NSData *) writeToXML { xmlBufferPtr buf; xmlTextWriterPtr writer; int rc; NSData *data; buf = xmlBufferCreate(); if (buf == NULL) { [NSException raise: @"XMLWriteError" format: @"Error creating an XML buffer."]; return nil; } writer = xmlNewTextWriterMemory(buf, 0); if (writer == NULL) { xmlBufferFree(buf); [NSException raise: @"XMLWriteError" format: @"Error creating an XML writer."]; return nil; } rc = xmlTextWriterStartDocument(writer, NULL, "utf-8", NULL); if (rc < 0) { xmlFreeTextWriter(writer); xmlBufferFree(buf); [NSException raise: @"XMLWriteError" format: @"Error writing XML start document."]; return nil; } NS_DURING { [self writeXMLElement: writer]; } NS_HANDLER { xmlFreeTextWriter(writer); xmlBufferFree(buf); [localException raise]; } NS_ENDHANDLER rc = xmlTextWriterEndDocument(writer); if (rc < 0) { xmlFreeTextWriter(writer); xmlBufferFree(buf); [NSException raise: @"XMLWriteError" format: @"Error writing XML end document."]; return nil; } xmlFreeTextWriter(writer); data = [NSData dataWithBytes: buf->content length: buf->use]; xmlBufferFree(buf); return data; } @end /* implementation AGENTRANKNS0PhotoSizes */ /** * Internal, private interface for JAXB reading and writing. */ @interface AGENTRANKNS0PhotoSizes (JAXB) @end /*interface AGENTRANKNS0PhotoSizes (JAXB)*/ /** * Internal, private implementation for JAXB reading and writing. */ @implementation AGENTRANKNS0PhotoSizes (JAXB) /** * Read an instance of AGENTRANKNS0PhotoSizes from an XML reader. * * @param reader The reader. * @return An instance of AGENTRANKNS0PhotoSizes defined by the XML reader. */ + (id) readXMLType: (xmlTextReaderPtr) reader { AGENTRANKNS0PhotoSizes *_aGENTRANKNS0PhotoSizes = [[AGENTRANKNS0PhotoSizes alloc] init]; NS_DURING { [_aGENTRANKNS0PhotoSizes initWithReader: reader]; } NS_HANDLER { _aGENTRANKNS0PhotoSizes = nil; [localException raise]; } NS_ENDHANDLER [_aGENTRANKNS0PhotoSizes autorelease]; return _aGENTRANKNS0PhotoSizes; } /** * Initialize this instance of AGENTRANKNS0PhotoSizes according to * the XML being read from the reader. * * @param reader The reader. */ - (id) initWithReader: (xmlTextReaderPtr) reader { return [super initWithReader: reader]; } /** * Write the XML for this instance of AGENTRANKNS0PhotoSizes to the writer. * Note that since we're only writing the XML type, * No start/end element will be written. * * @param reader The reader. */ - (void) writeXMLType: (xmlTextWriterPtr) writer { [super writeXMLType:writer]; } /** * Reads a AGENTRANKNS0PhotoSizes from an XML reader. The element to be read is * "photoSizes". * * @param reader The XML reader. * @return The AGENTRANKNS0PhotoSizes. */ + (id) readXMLElement: (xmlTextReaderPtr) reader { int status; AGENTRANKNS0PhotoSizes *_photoSizes = nil; if (xmlTextReaderNodeType(reader) != XML_READER_TYPE_ELEMENT) { status = xmlTextReaderAdvanceToNextStartOrEndElement(reader); if (status < 1) { [NSException raise: @"XMLReadError" format: @"Error advancing the reader to start element photoSizes."]; } } if (xmlStrcmp(BAD_CAST "photoSizes", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read root element {}photoSizes."); #endif _photoSizes = (AGENTRANKNS0PhotoSizes *)[AGENTRANKNS0PhotoSizes readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"Successfully read root element {}photoSizes."); #endif } else { if (xmlTextReaderConstNamespaceUri(reader) == NULL) { [NSException raise: @"XMLReadError" format: @"Unable to read AGENTRANKNS0PhotoSizes. Expected element photoSizes. Current element: {}%s", xmlTextReaderConstLocalName(reader)]; } else { [NSException raise: @"XMLReadError" format: @"Unable to read AGENTRANKNS0PhotoSizes. Expected element photoSizes. Current element: {%s}%s\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)]; } } return _photoSizes; } /** * Writes this AGENTRANKNS0PhotoSizes to XML under element name "photoSizes". * The namespace declarations for the element will be written. * * @param writer The XML writer. * @param _photoSizes The PhotoSizes to write. * @return 1 if successful, 0 otherwise. */ - (void) writeXMLElement: (xmlTextWriterPtr) writer { [self writeXMLElement: writer writeNamespaces: YES]; } /** * Writes this AGENTRANKNS0PhotoSizes to an XML writer. * * @param writer The writer. * @param writeNs Whether to write the namespaces for this element to the xml writer. */ - (void) writeXMLElement: (xmlTextWriterPtr) writer writeNamespaces: (BOOL) writeNs { int rc = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "photoSizes", NULL); if (rc < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start element {}photoSizes. XML writer status: %i\n", rc]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing type {}photoSizes for root element {}photoSizes..."); #endif [self writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote type {}photoSizes for root element {}photoSizes..."); #endif rc = xmlTextWriterEndElement(writer); if (rc < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end element {}photoSizes. XML writer status: %i\n", rc]; } } //documentation inherited. - (BOOL) readJAXBAttribute: (xmlTextReaderPtr) reader { void *_child_accessor; if ([super readJAXBAttribute: reader]) { return YES; } return NO; } //documentation inherited. - (BOOL) readJAXBValue: (xmlTextReaderPtr) reader { return [super readJAXBValue: reader]; } //documentation inherited. - (BOOL) readJAXBChildElement: (xmlTextReaderPtr) reader { id __child; void *_child_accessor; int status, depth; if ([super readJAXBChildElement: reader]) { return YES; } if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "size", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read choice {}size of type {}photoSize."); #endif __child = [AGENTRANKNS0PhotoSize readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read choice {}size of type {}photoSize."); #endif if ([self size]) { [self setSize: [[self size] arrayByAddingObject: __child]]; } else { [self setSize: [NSArray arrayWithObject: __child]]; } return YES; } //end "if choice" return NO; } //documentation inherited. - (int) readUnknownJAXBChildElement: (xmlTextReaderPtr) reader { return [super readUnknownJAXBChildElement: reader]; } //documentation inherited. - (void) readUnknownJAXBAttribute: (xmlTextReaderPtr) reader { [super readUnknownJAXBAttribute: reader]; } //documentation inherited. - (void) writeJAXBAttributes: (xmlTextWriterPtr) writer { int status; [super writeJAXBAttributes: writer]; } //documentation inherited. - (void) writeJAXBValue: (xmlTextWriterPtr) writer { [super writeJAXBValue: writer]; } /** * Method for writing the child elements. * * @param writer The writer. */ - (void) writeJAXBChildElements: (xmlTextWriterPtr) writer { int status; id __item; NSEnumerator *__enumerator; [super writeJAXBChildElements: writer]; if ([self size]) { __enumerator = [[self size] objectEnumerator]; while ( (__item = [__enumerator nextObject]) ) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "size", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start child element {}size."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing element {}size..."); #endif [__item writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote element {}size..."); #endif status = xmlTextWriterEndElement(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end child element {}size."]; } } //end item iterator. } } @end /* implementation AGENTRANKNS0PhotoSizes (JAXB) */ #endif /* DEF_AGENTRANKNS0PhotoSizes_M */ #ifndef DEF_AGENTRANKNS0Market_M #define DEF_AGENTRANKNS0Market_M /** * User: marc Date: Mar 4, 2008 Time: 6:15:00 AM

THIS SOFTWARE IS COPYRIGHTED. THE SOFTWARE MAY NOT BE COPIED REPRODUCED, TRANSLATED, OR REDUCED TO ANY ELECTRONIC MEDIUM OR MACHINE READABLE FORM WITHOUT THE PRIOR WRITTEN CONSENT OF SOCO TECHNOLOGIES. */ @implementation AGENTRANKNS0Market /** * market's canonical name */ - (NSString *) name { return _name; } /** * market's canonical name */ - (void) setName: (NSString *) newName { [newName retain]; [_name release]; _name = newName; } /** * collection of forecasts */ - (AGENTRANKNS0Forecasts *) forecasts { return _forecasts; } /** * collection of forecasts */ - (void) setForecasts: (AGENTRANKNS0Forecasts *) newForecasts { [newForecasts retain]; [_forecasts release]; _forecasts = newForecasts; } /** * history */ - (AGENTRANKNS0Histories *) histories { return _histories; } /** * history */ - (void) setHistories: (AGENTRANKNS0Histories *) newHistories { [newHistories retain]; [_histories release]; _histories = newHistories; } - (void) dealloc { [self setName: nil]; [self setForecasts: nil]; [self setHistories: nil]; [super dealloc]; } //documentation inherited. + (id) readFromXML: (NSData *) xml { AGENTRANKNS0Market *_aGENTRANKNS0Market; xmlTextReaderPtr reader = xmlReaderForMemory([xml bytes], [xml length], NULL, NULL, 0); if (reader == NULL) { [NSException raise: @"XMLReadError" format: @"Error instantiating an XML reader."]; return nil; } _aGENTRANKNS0Market = (AGENTRANKNS0Market *) [AGENTRANKNS0Market readXMLElement: reader]; xmlFreeTextReader(reader); //free the reader return _aGENTRANKNS0Market; } //documentation inherited. - (NSData *) writeToXML { xmlBufferPtr buf; xmlTextWriterPtr writer; int rc; NSData *data; buf = xmlBufferCreate(); if (buf == NULL) { [NSException raise: @"XMLWriteError" format: @"Error creating an XML buffer."]; return nil; } writer = xmlNewTextWriterMemory(buf, 0); if (writer == NULL) { xmlBufferFree(buf); [NSException raise: @"XMLWriteError" format: @"Error creating an XML writer."]; return nil; } rc = xmlTextWriterStartDocument(writer, NULL, "utf-8", NULL); if (rc < 0) { xmlFreeTextWriter(writer); xmlBufferFree(buf); [NSException raise: @"XMLWriteError" format: @"Error writing XML start document."]; return nil; } NS_DURING { [self writeXMLElement: writer]; } NS_HANDLER { xmlFreeTextWriter(writer); xmlBufferFree(buf); [localException raise]; } NS_ENDHANDLER rc = xmlTextWriterEndDocument(writer); if (rc < 0) { xmlFreeTextWriter(writer); xmlBufferFree(buf); [NSException raise: @"XMLWriteError" format: @"Error writing XML end document."]; return nil; } xmlFreeTextWriter(writer); data = [NSData dataWithBytes: buf->content length: buf->use]; xmlBufferFree(buf); return data; } @end /* implementation AGENTRANKNS0Market */ /** * Internal, private interface for JAXB reading and writing. */ @interface AGENTRANKNS0Market (JAXB) @end /*interface AGENTRANKNS0Market (JAXB)*/ /** * Internal, private implementation for JAXB reading and writing. */ @implementation AGENTRANKNS0Market (JAXB) /** * Read an instance of AGENTRANKNS0Market from an XML reader. * * @param reader The reader. * @return An instance of AGENTRANKNS0Market defined by the XML reader. */ + (id) readXMLType: (xmlTextReaderPtr) reader { AGENTRANKNS0Market *_aGENTRANKNS0Market = [[AGENTRANKNS0Market alloc] init]; NS_DURING { [_aGENTRANKNS0Market initWithReader: reader]; } NS_HANDLER { _aGENTRANKNS0Market = nil; [localException raise]; } NS_ENDHANDLER [_aGENTRANKNS0Market autorelease]; return _aGENTRANKNS0Market; } /** * Initialize this instance of AGENTRANKNS0Market according to * the XML being read from the reader. * * @param reader The reader. */ - (id) initWithReader: (xmlTextReaderPtr) reader { return [super initWithReader: reader]; } /** * Write the XML for this instance of AGENTRANKNS0Market to the writer. * Note that since we're only writing the XML type, * No start/end element will be written. * * @param reader The reader. */ - (void) writeXMLType: (xmlTextWriterPtr) writer { [super writeXMLType:writer]; } /** * Reads a AGENTRANKNS0Market from an XML reader. The element to be read is * "market". * * @param reader The XML reader. * @return The AGENTRANKNS0Market. */ + (id) readXMLElement: (xmlTextReaderPtr) reader { int status; AGENTRANKNS0Market *_market = nil; if (xmlTextReaderNodeType(reader) != XML_READER_TYPE_ELEMENT) { status = xmlTextReaderAdvanceToNextStartOrEndElement(reader); if (status < 1) { [NSException raise: @"XMLReadError" format: @"Error advancing the reader to start element market."]; } } if (xmlStrcmp(BAD_CAST "market", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read root element {}market."); #endif _market = (AGENTRANKNS0Market *)[AGENTRANKNS0Market readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"Successfully read root element {}market."); #endif } else { if (xmlTextReaderConstNamespaceUri(reader) == NULL) { [NSException raise: @"XMLReadError" format: @"Unable to read AGENTRANKNS0Market. Expected element market. Current element: {}%s", xmlTextReaderConstLocalName(reader)]; } else { [NSException raise: @"XMLReadError" format: @"Unable to read AGENTRANKNS0Market. Expected element market. Current element: {%s}%s\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)]; } } return _market; } /** * Writes this AGENTRANKNS0Market to XML under element name "market". * The namespace declarations for the element will be written. * * @param writer The XML writer. * @param _market The Market to write. * @return 1 if successful, 0 otherwise. */ - (void) writeXMLElement: (xmlTextWriterPtr) writer { [self writeXMLElement: writer writeNamespaces: YES]; } /** * Writes this AGENTRANKNS0Market to an XML writer. * * @param writer The writer. * @param writeNs Whether to write the namespaces for this element to the xml writer. */ - (void) writeXMLElement: (xmlTextWriterPtr) writer writeNamespaces: (BOOL) writeNs { int rc = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "market", NULL); if (rc < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start element {}market. XML writer status: %i\n", rc]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing type {}market for root element {}market..."); #endif [self writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote type {}market for root element {}market..."); #endif rc = xmlTextWriterEndElement(writer); if (rc < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end element {}market. XML writer status: %i\n", rc]; } } //documentation inherited. - (BOOL) readJAXBAttribute: (xmlTextReaderPtr) reader { void *_child_accessor; if ([super readJAXBAttribute: reader]) { return YES; } return NO; } //documentation inherited. - (BOOL) readJAXBValue: (xmlTextReaderPtr) reader { return [super readJAXBValue: reader]; } //documentation inherited. - (BOOL) readJAXBChildElement: (xmlTextReaderPtr) reader { id __child; void *_child_accessor; int status, depth; if ([super readJAXBChildElement: reader]) { return YES; } if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "name", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read choice {}name of type {http://www.w3.org/2001/XMLSchema}string."); #endif __child = [NSString readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read choice {}name of type {http://www.w3.org/2001/XMLSchema}string."); #endif [self setName: __child]; return YES; } //end "if choice" if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "forecasts", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read choice {}forecasts of type {}forecasts."); #endif __child = [AGENTRANKNS0Forecasts readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read choice {}forecasts of type {}forecasts."); #endif [self setForecasts: __child]; return YES; } //end "if choice" if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "histories", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read choice {}histories of type {}histories."); #endif __child = [AGENTRANKNS0Histories readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read choice {}histories of type {}histories."); #endif [self setHistories: __child]; return YES; } //end "if choice" return NO; } //documentation inherited. - (int) readUnknownJAXBChildElement: (xmlTextReaderPtr) reader { return [super readUnknownJAXBChildElement: reader]; } //documentation inherited. - (void) readUnknownJAXBAttribute: (xmlTextReaderPtr) reader { [super readUnknownJAXBAttribute: reader]; } //documentation inherited. - (void) writeJAXBAttributes: (xmlTextWriterPtr) writer { int status; [super writeJAXBAttributes: writer]; } //documentation inherited. - (void) writeJAXBValue: (xmlTextWriterPtr) writer { [super writeJAXBValue: writer]; } /** * Method for writing the child elements. * * @param writer The writer. */ - (void) writeJAXBChildElements: (xmlTextWriterPtr) writer { int status; id __item; NSEnumerator *__enumerator; [super writeJAXBChildElements: writer]; if ([self name]) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "name", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start child element {}name."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing element {}name..."); #endif [[self name] writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote element {}name..."); #endif status = xmlTextWriterEndElement(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end child element {}name."]; } } if ([self forecasts]) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "forecasts", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start child element {}forecasts."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing element {}forecasts..."); #endif [[self forecasts] writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote element {}forecasts..."); #endif status = xmlTextWriterEndElement(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end child element {}forecasts."]; } } if ([self histories]) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "histories", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start child element {}histories."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing element {}histories..."); #endif [[self histories] writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote element {}histories..."); #endif status = xmlTextWriterEndElement(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end child element {}histories."]; } } } @end /* implementation AGENTRANKNS0Market (JAXB) */ #endif /* DEF_AGENTRANKNS0Market_M */ #ifndef DEF_AGENTRANKNS0Location_M #define DEF_AGENTRANKNS0Location_M /** * User: marc Date: Mar 4, 2008 Time: 6:39:03 PM

THIS SOFTWARE IS COPYRIGHTED. THE SOFTWARE MAY NOT BE COPIED REPRODUCED, TRANSLATED, OR REDUCED TO ANY ELECTRONIC MEDIUM OR MACHINE READABLE FORM WITHOUT THE PRIOR WRITTEN CONSENT OF SOCO TECHNOLOGIES. */ @implementation AGENTRANKNS0Location /** * (no documentation provided) */ - (int) identifier { return _identifier; } /** * (no documentation provided) */ - (void) setIdentifier: (int) newIdentifier { _identifier = newIdentifier; } /** * (no documentation provided) */ - (NSString *) type { return _type; } /** * (no documentation provided) */ - (void) setType: (NSString *) newType { [newType retain]; [_type release]; _type = newType; } /** * (no documentation provided) */ - (NSString *) name { return _name; } /** * (no documentation provided) */ - (void) setName: (NSString *) newName { [newName retain]; [_name release]; _name = newName; } - (void) dealloc { [self setType: nil]; [self setName: nil]; [super dealloc]; } @end /* implementation AGENTRANKNS0Location */ /** * Internal, private interface for JAXB reading and writing. */ @interface AGENTRANKNS0Location (JAXB) @end /*interface AGENTRANKNS0Location (JAXB)*/ /** * Internal, private implementation for JAXB reading and writing. */ @implementation AGENTRANKNS0Location (JAXB) /** * Read an instance of AGENTRANKNS0Location from an XML reader. * * @param reader The reader. * @return An instance of AGENTRANKNS0Location defined by the XML reader. */ + (id) readXMLType: (xmlTextReaderPtr) reader { AGENTRANKNS0Location *_aGENTRANKNS0Location = [[AGENTRANKNS0Location alloc] init]; NS_DURING { [_aGENTRANKNS0Location initWithReader: reader]; } NS_HANDLER { _aGENTRANKNS0Location = nil; [localException raise]; } NS_ENDHANDLER [_aGENTRANKNS0Location autorelease]; return _aGENTRANKNS0Location; } /** * Initialize this instance of AGENTRANKNS0Location according to * the XML being read from the reader. * * @param reader The reader. */ - (id) initWithReader: (xmlTextReaderPtr) reader { return [super initWithReader: reader]; } /** * Write the XML for this instance of AGENTRANKNS0Location to the writer. * Note that since we're only writing the XML type, * No start/end element will be written. * * @param reader The reader. */ - (void) writeXMLType: (xmlTextWriterPtr) writer { [super writeXMLType:writer]; } //documentation inherited. - (BOOL) readJAXBAttribute: (xmlTextReaderPtr) reader { void *_child_accessor; if ([super readJAXBAttribute: reader]) { return YES; } return NO; } //documentation inherited. - (BOOL) readJAXBValue: (xmlTextReaderPtr) reader { return [super readJAXBValue: reader]; } //documentation inherited. - (BOOL) readJAXBChildElement: (xmlTextReaderPtr) reader { id __child; void *_child_accessor; int status, depth; if ([super readJAXBChildElement: reader]) { return YES; } if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "id", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { _child_accessor = xmlTextReaderReadIntType(reader); if (_child_accessor == NULL) { //panic: unable to return the value for some reason. [NSException raise: @"XMLReadError" format: @"Error reading element value."]; } [self setIdentifier: *((int*) _child_accessor)]; free(_child_accessor); return YES; } if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "type", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read choice {}type of type {http://www.w3.org/2001/XMLSchema}string."); #endif __child = [NSString readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read choice {}type of type {http://www.w3.org/2001/XMLSchema}string."); #endif [self setType: __child]; return YES; } //end "if choice" if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "name", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read choice {}name of type {http://www.w3.org/2001/XMLSchema}string."); #endif __child = [NSString readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read choice {}name of type {http://www.w3.org/2001/XMLSchema}string."); #endif [self setName: __child]; return YES; } //end "if choice" return NO; } //documentation inherited. - (int) readUnknownJAXBChildElement: (xmlTextReaderPtr) reader { return [super readUnknownJAXBChildElement: reader]; } //documentation inherited. - (void) readUnknownJAXBAttribute: (xmlTextReaderPtr) reader { [super readUnknownJAXBAttribute: reader]; } //documentation inherited. - (void) writeJAXBAttributes: (xmlTextWriterPtr) writer { int status; [super writeJAXBAttributes: writer]; } //documentation inherited. - (void) writeJAXBValue: (xmlTextWriterPtr) writer { [super writeJAXBValue: writer]; } /** * Method for writing the child elements. * * @param writer The writer. */ - (void) writeJAXBChildElements: (xmlTextWriterPtr) writer { int status; id __item; NSEnumerator *__enumerator; [super writeJAXBChildElements: writer]; if (YES) { //always write the primitive element... status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "id", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start child element {}id."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing element {}id..."); #endif status = xmlTextWriterWriteIntType(writer, &_identifier); #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote element {}id..."); #endif if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing child element {}id."]; } status = xmlTextWriterEndElement(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end child element {}id."]; } } if ([self type]) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "type", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start child element {}type."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing element {}type..."); #endif [[self type] writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote element {}type..."); #endif status = xmlTextWriterEndElement(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end child element {}type."]; } } if ([self name]) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "name", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start child element {}name."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing element {}name..."); #endif [[self name] writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote element {}name..."); #endif status = xmlTextWriterEndElement(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end child element {}name."]; } } } @end /* implementation AGENTRANKNS0Location (JAXB) */ #endif /* DEF_AGENTRANKNS0Location_M */ #ifndef DEF_AGENTRANKNS0Histories_M #define DEF_AGENTRANKNS0Histories_M /** * User: marc Date: Apr 25, 2009 Time: 2:40:22 PM

THIS SOFTWARE IS COPYRIGHTED. THE SOFTWARE MAY NOT BE COPIED REPRODUCED, TRANSLATED, OR REDUCED TO ANY ELECTRONIC MEDIUM OR MACHINE READABLE FORM WITHOUT THE PRIOR WRITTEN CONSENT OF SOCO TECHNOLOGIES. */ @implementation AGENTRANKNS0Histories /** * chart image */ - (AGENTRANKNS0Image *) chart { return _chart; } /** * chart image */ - (void) setChart: (AGENTRANKNS0Image *) newChart { [newChart retain]; [_chart release]; _chart = newChart; } /** * history */ - (NSArray *) history { return _history; } /** * history */ - (void) setHistory: (NSArray *) newHistory { [newHistory retain]; [_history release]; _history = newHistory; } - (void) dealloc { [self setChart: nil]; [self setHistory: nil]; [super dealloc]; } @end /* implementation AGENTRANKNS0Histories */ /** * Internal, private interface for JAXB reading and writing. */ @interface AGENTRANKNS0Histories (JAXB) @end /*interface AGENTRANKNS0Histories (JAXB)*/ /** * Internal, private implementation for JAXB reading and writing. */ @implementation AGENTRANKNS0Histories (JAXB) /** * Read an instance of AGENTRANKNS0Histories from an XML reader. * * @param reader The reader. * @return An instance of AGENTRANKNS0Histories defined by the XML reader. */ + (id) readXMLType: (xmlTextReaderPtr) reader { AGENTRANKNS0Histories *_aGENTRANKNS0Histories = [[AGENTRANKNS0Histories alloc] init]; NS_DURING { [_aGENTRANKNS0Histories initWithReader: reader]; } NS_HANDLER { _aGENTRANKNS0Histories = nil; [localException raise]; } NS_ENDHANDLER [_aGENTRANKNS0Histories autorelease]; return _aGENTRANKNS0Histories; } /** * Initialize this instance of AGENTRANKNS0Histories according to * the XML being read from the reader. * * @param reader The reader. */ - (id) initWithReader: (xmlTextReaderPtr) reader { return [super initWithReader: reader]; } /** * Write the XML for this instance of AGENTRANKNS0Histories to the writer. * Note that since we're only writing the XML type, * No start/end element will be written. * * @param reader The reader. */ - (void) writeXMLType: (xmlTextWriterPtr) writer { [super writeXMLType:writer]; } //documentation inherited. - (BOOL) readJAXBAttribute: (xmlTextReaderPtr) reader { void *_child_accessor; if ([super readJAXBAttribute: reader]) { return YES; } return NO; } //documentation inherited. - (BOOL) readJAXBValue: (xmlTextReaderPtr) reader { return [super readJAXBValue: reader]; } //documentation inherited. - (BOOL) readJAXBChildElement: (xmlTextReaderPtr) reader { id __child; void *_child_accessor; int status, depth; if ([super readJAXBChildElement: reader]) { return YES; } if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "chart", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read choice {}chart of type {}image."); #endif __child = [AGENTRANKNS0Image readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read choice {}chart of type {}image."); #endif [self setChart: __child]; return YES; } //end "if choice" if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "history", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read choice {}history of type {}history."); #endif __child = [AGENTRANKNS0History readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read choice {}history of type {}history."); #endif if ([self history]) { [self setHistory: [[self history] arrayByAddingObject: __child]]; } else { [self setHistory: [NSArray arrayWithObject: __child]]; } return YES; } //end "if choice" return NO; } //documentation inherited. - (int) readUnknownJAXBChildElement: (xmlTextReaderPtr) reader { return [super readUnknownJAXBChildElement: reader]; } //documentation inherited. - (void) readUnknownJAXBAttribute: (xmlTextReaderPtr) reader { [super readUnknownJAXBAttribute: reader]; } //documentation inherited. - (void) writeJAXBAttributes: (xmlTextWriterPtr) writer { int status; [super writeJAXBAttributes: writer]; } //documentation inherited. - (void) writeJAXBValue: (xmlTextWriterPtr) writer { [super writeJAXBValue: writer]; } /** * Method for writing the child elements. * * @param writer The writer. */ - (void) writeJAXBChildElements: (xmlTextWriterPtr) writer { int status; id __item; NSEnumerator *__enumerator; [super writeJAXBChildElements: writer]; if ([self chart]) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "chart", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start child element {}chart."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing element {}chart..."); #endif [[self chart] writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote element {}chart..."); #endif status = xmlTextWriterEndElement(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end child element {}chart."]; } } if ([self history]) { __enumerator = [[self history] objectEnumerator]; while ( (__item = [__enumerator nextObject]) ) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "history", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start child element {}history."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing element {}history..."); #endif [__item writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote element {}history..."); #endif status = xmlTextWriterEndElement(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end child element {}history."]; } } //end item iterator. } } @end /* implementation AGENTRANKNS0Histories (JAXB) */ #endif /* DEF_AGENTRANKNS0Histories_M */ #ifndef DEF_AGENTRANKNS0GetAgent_M #define DEF_AGENTRANKNS0GetAgent_M /** * User: marc Date: Oct 1, 2009 Time: 5:26:25 AM

THIS SOFTWARE IS COPYRIGHTED. THE SOFTWARE MAY NOT BE COPIED REPRODUCED, TRANSLATED, OR REDUCED TO ANY ELECTRONIC MEDIUM OR MACHINE READABLE FORM WITHOUT THE PRIOR WRITTEN CONSENT OF SOCO TECHNOLOGIES. */ @implementation AGENTRANKNS0GetAgent /** * agent */ - (AGENTRANKNS0Agent *) agent { return _agent; } /** * agent */ - (void) setAgent: (AGENTRANKNS0Agent *) newAgent { [newAgent retain]; [_agent release]; _agent = newAgent; } /** * (no documentation provided) */ - (AGENTRANKNS0Status *) status { return _status; } /** * (no documentation provided) */ - (void) setStatus: (AGENTRANKNS0Status *) newStatus { [newStatus retain]; [_status release]; _status = newStatus; } - (void) dealloc { [self setAgent: nil]; [self setStatus: nil]; [super dealloc]; } //documentation inherited. + (id) readFromXML: (NSData *) xml { AGENTRANKNS0GetAgent *_aGENTRANKNS0GetAgent; xmlTextReaderPtr reader = xmlReaderForMemory([xml bytes], [xml length], NULL, NULL, 0); if (reader == NULL) { [NSException raise: @"XMLReadError" format: @"Error instantiating an XML reader."]; return nil; } _aGENTRANKNS0GetAgent = (AGENTRANKNS0GetAgent *) [AGENTRANKNS0GetAgent readXMLElement: reader]; xmlFreeTextReader(reader); //free the reader return _aGENTRANKNS0GetAgent; } //documentation inherited. - (NSData *) writeToXML { xmlBufferPtr buf; xmlTextWriterPtr writer; int rc; NSData *data; buf = xmlBufferCreate(); if (buf == NULL) { [NSException raise: @"XMLWriteError" format: @"Error creating an XML buffer."]; return nil; } writer = xmlNewTextWriterMemory(buf, 0); if (writer == NULL) { xmlBufferFree(buf); [NSException raise: @"XMLWriteError" format: @"Error creating an XML writer."]; return nil; } rc = xmlTextWriterStartDocument(writer, NULL, "utf-8", NULL); if (rc < 0) { xmlFreeTextWriter(writer); xmlBufferFree(buf); [NSException raise: @"XMLWriteError" format: @"Error writing XML start document."]; return nil; } NS_DURING { [self writeXMLElement: writer]; } NS_HANDLER { xmlFreeTextWriter(writer); xmlBufferFree(buf); [localException raise]; } NS_ENDHANDLER rc = xmlTextWriterEndDocument(writer); if (rc < 0) { xmlFreeTextWriter(writer); xmlBufferFree(buf); [NSException raise: @"XMLWriteError" format: @"Error writing XML end document."]; return nil; } xmlFreeTextWriter(writer); data = [NSData dataWithBytes: buf->content length: buf->use]; xmlBufferFree(buf); return data; } @end /* implementation AGENTRANKNS0GetAgent */ /** * Internal, private interface for JAXB reading and writing. */ @interface AGENTRANKNS0GetAgent (JAXB) @end /*interface AGENTRANKNS0GetAgent (JAXB)*/ /** * Internal, private implementation for JAXB reading and writing. */ @implementation AGENTRANKNS0GetAgent (JAXB) /** * Read an instance of AGENTRANKNS0GetAgent from an XML reader. * * @param reader The reader. * @return An instance of AGENTRANKNS0GetAgent defined by the XML reader. */ + (id) readXMLType: (xmlTextReaderPtr) reader { AGENTRANKNS0GetAgent *_aGENTRANKNS0GetAgent = [[AGENTRANKNS0GetAgent alloc] init]; NS_DURING { [_aGENTRANKNS0GetAgent initWithReader: reader]; } NS_HANDLER { _aGENTRANKNS0GetAgent = nil; [localException raise]; } NS_ENDHANDLER [_aGENTRANKNS0GetAgent autorelease]; return _aGENTRANKNS0GetAgent; } /** * Initialize this instance of AGENTRANKNS0GetAgent according to * the XML being read from the reader. * * @param reader The reader. */ - (id) initWithReader: (xmlTextReaderPtr) reader { return [super initWithReader: reader]; } /** * Write the XML for this instance of AGENTRANKNS0GetAgent to the writer. * Note that since we're only writing the XML type, * No start/end element will be written. * * @param reader The reader. */ - (void) writeXMLType: (xmlTextWriterPtr) writer { [super writeXMLType:writer]; } /** * Reads a AGENTRANKNS0GetAgent from an XML reader. The element to be read is * "response". * * @param reader The XML reader. * @return The AGENTRANKNS0GetAgent. */ + (id) readXMLElement: (xmlTextReaderPtr) reader { int status; AGENTRANKNS0GetAgent *_getAgent = nil; if (xmlTextReaderNodeType(reader) != XML_READER_TYPE_ELEMENT) { status = xmlTextReaderAdvanceToNextStartOrEndElement(reader); if (status < 1) { [NSException raise: @"XMLReadError" format: @"Error advancing the reader to start element response."]; } } if (xmlStrcmp(BAD_CAST "response", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read root element {}response."); #endif _getAgent = (AGENTRANKNS0GetAgent *)[AGENTRANKNS0GetAgent readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"Successfully read root element {}response."); #endif } else { if (xmlTextReaderConstNamespaceUri(reader) == NULL) { [NSException raise: @"XMLReadError" format: @"Unable to read AGENTRANKNS0GetAgent. Expected element response. Current element: {}%s", xmlTextReaderConstLocalName(reader)]; } else { [NSException raise: @"XMLReadError" format: @"Unable to read AGENTRANKNS0GetAgent. Expected element response. Current element: {%s}%s\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)]; } } return _getAgent; } /** * Writes this AGENTRANKNS0GetAgent to XML under element name "response". * The namespace declarations for the element will be written. * * @param writer The XML writer. * @param _getAgent The GetAgent to write. * @return 1 if successful, 0 otherwise. */ - (void) writeXMLElement: (xmlTextWriterPtr) writer { [self writeXMLElement: writer writeNamespaces: YES]; } /** * Writes this AGENTRANKNS0GetAgent to an XML writer. * * @param writer The writer. * @param writeNs Whether to write the namespaces for this element to the xml writer. */ - (void) writeXMLElement: (xmlTextWriterPtr) writer writeNamespaces: (BOOL) writeNs { int rc = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "response", NULL); if (rc < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start element {}response. XML writer status: %i\n", rc]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing type {}getAgent for root element {}response..."); #endif [self writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote type {}getAgent for root element {}response..."); #endif rc = xmlTextWriterEndElement(writer); if (rc < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end element {}response. XML writer status: %i\n", rc]; } } //documentation inherited. - (BOOL) readJAXBAttribute: (xmlTextReaderPtr) reader { void *_child_accessor; if ([super readJAXBAttribute: reader]) { return YES; } return NO; } //documentation inherited. - (BOOL) readJAXBValue: (xmlTextReaderPtr) reader { return [super readJAXBValue: reader]; } //documentation inherited. - (BOOL) readJAXBChildElement: (xmlTextReaderPtr) reader { id __child; void *_child_accessor; int status, depth; if ([super readJAXBChildElement: reader]) { return YES; } if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "agent", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read choice {}agent of type {}agent."); #endif __child = [AGENTRANKNS0Agent readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read choice {}agent of type {}agent."); #endif [self setAgent: __child]; return YES; } //end "if choice" if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "status", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read choice {}status of type {}status."); #endif __child = [AGENTRANKNS0Status readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read choice {}status of type {}status."); #endif [self setStatus: __child]; return YES; } //end "if choice" return NO; } //documentation inherited. - (int) readUnknownJAXBChildElement: (xmlTextReaderPtr) reader { return [super readUnknownJAXBChildElement: reader]; } //documentation inherited. - (void) readUnknownJAXBAttribute: (xmlTextReaderPtr) reader { [super readUnknownJAXBAttribute: reader]; } //documentation inherited. - (void) writeJAXBAttributes: (xmlTextWriterPtr) writer { int status; [super writeJAXBAttributes: writer]; } //documentation inherited. - (void) writeJAXBValue: (xmlTextWriterPtr) writer { [super writeJAXBValue: writer]; } /** * Method for writing the child elements. * * @param writer The writer. */ - (void) writeJAXBChildElements: (xmlTextWriterPtr) writer { int status; id __item; NSEnumerator *__enumerator; [super writeJAXBChildElements: writer]; if ([self agent]) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "agent", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start child element {}agent."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing element {}agent..."); #endif [[self agent] writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote element {}agent..."); #endif status = xmlTextWriterEndElement(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end child element {}agent."]; } } if ([self status]) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "status", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start child element {}status."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing element {}status..."); #endif [[self status] writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote element {}status..."); #endif status = xmlTextWriterEndElement(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end child element {}status."]; } } } @end /* implementation AGENTRANKNS0GetAgent (JAXB) */ #endif /* DEF_AGENTRANKNS0GetAgent_M */ #ifndef DEF_AGENTRANKNS0ContactAgent_M #define DEF_AGENTRANKNS0ContactAgent_M /** * User: marc Date: Oct 1, 2009 Time: 5:26:25 AM

THIS SOFTWARE IS COPYRIGHTED. THE SOFTWARE MAY NOT BE COPIED REPRODUCED, TRANSLATED, OR REDUCED TO ANY ELECTRONIC MEDIUM OR MACHINE READABLE FORM WITHOUT THE PRIOR WRITTEN CONSENT OF SOCO TECHNOLOGIES. */ @implementation AGENTRANKNS0ContactAgent /** * status */ - (AGENTRANKNS0Status *) status { return _status; } /** * status */ - (void) setStatus: (AGENTRANKNS0Status *) newStatus { [newStatus retain]; [_status release]; _status = newStatus; } - (void) dealloc { [self setStatus: nil]; [super dealloc]; } //documentation inherited. + (id) readFromXML: (NSData *) xml { AGENTRANKNS0ContactAgent *_aGENTRANKNS0ContactAgent; xmlTextReaderPtr reader = xmlReaderForMemory([xml bytes], [xml length], NULL, NULL, 0); if (reader == NULL) { [NSException raise: @"XMLReadError" format: @"Error instantiating an XML reader."]; return nil; } _aGENTRANKNS0ContactAgent = (AGENTRANKNS0ContactAgent *) [AGENTRANKNS0ContactAgent readXMLElement: reader]; xmlFreeTextReader(reader); //free the reader return _aGENTRANKNS0ContactAgent; } //documentation inherited. - (NSData *) writeToXML { xmlBufferPtr buf; xmlTextWriterPtr writer; int rc; NSData *data; buf = xmlBufferCreate(); if (buf == NULL) { [NSException raise: @"XMLWriteError" format: @"Error creating an XML buffer."]; return nil; } writer = xmlNewTextWriterMemory(buf, 0); if (writer == NULL) { xmlBufferFree(buf); [NSException raise: @"XMLWriteError" format: @"Error creating an XML writer."]; return nil; } rc = xmlTextWriterStartDocument(writer, NULL, "utf-8", NULL); if (rc < 0) { xmlFreeTextWriter(writer); xmlBufferFree(buf); [NSException raise: @"XMLWriteError" format: @"Error writing XML start document."]; return nil; } NS_DURING { [self writeXMLElement: writer]; } NS_HANDLER { xmlFreeTextWriter(writer); xmlBufferFree(buf); [localException raise]; } NS_ENDHANDLER rc = xmlTextWriterEndDocument(writer); if (rc < 0) { xmlFreeTextWriter(writer); xmlBufferFree(buf); [NSException raise: @"XMLWriteError" format: @"Error writing XML end document."]; return nil; } xmlFreeTextWriter(writer); data = [NSData dataWithBytes: buf->content length: buf->use]; xmlBufferFree(buf); return data; } @end /* implementation AGENTRANKNS0ContactAgent */ /** * Internal, private interface for JAXB reading and writing. */ @interface AGENTRANKNS0ContactAgent (JAXB) @end /*interface AGENTRANKNS0ContactAgent (JAXB)*/ /** * Internal, private implementation for JAXB reading and writing. */ @implementation AGENTRANKNS0ContactAgent (JAXB) /** * Read an instance of AGENTRANKNS0ContactAgent from an XML reader. * * @param reader The reader. * @return An instance of AGENTRANKNS0ContactAgent defined by the XML reader. */ + (id) readXMLType: (xmlTextReaderPtr) reader { AGENTRANKNS0ContactAgent *_aGENTRANKNS0ContactAgent = [[AGENTRANKNS0ContactAgent alloc] init]; NS_DURING { [_aGENTRANKNS0ContactAgent initWithReader: reader]; } NS_HANDLER { _aGENTRANKNS0ContactAgent = nil; [localException raise]; } NS_ENDHANDLER [_aGENTRANKNS0ContactAgent autorelease]; return _aGENTRANKNS0ContactAgent; } /** * Initialize this instance of AGENTRANKNS0ContactAgent according to * the XML being read from the reader. * * @param reader The reader. */ - (id) initWithReader: (xmlTextReaderPtr) reader { return [super initWithReader: reader]; } /** * Write the XML for this instance of AGENTRANKNS0ContactAgent to the writer. * Note that since we're only writing the XML type, * No start/end element will be written. * * @param reader The reader. */ - (void) writeXMLType: (xmlTextWriterPtr) writer { [super writeXMLType:writer]; } /** * Reads a AGENTRANKNS0ContactAgent from an XML reader. The element to be read is * "response". * * @param reader The XML reader. * @return The AGENTRANKNS0ContactAgent. */ + (id) readXMLElement: (xmlTextReaderPtr) reader { int status; AGENTRANKNS0ContactAgent *_contactAgent = nil; if (xmlTextReaderNodeType(reader) != XML_READER_TYPE_ELEMENT) { status = xmlTextReaderAdvanceToNextStartOrEndElement(reader); if (status < 1) { [NSException raise: @"XMLReadError" format: @"Error advancing the reader to start element response."]; } } if (xmlStrcmp(BAD_CAST "response", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read root element {}response."); #endif _contactAgent = (AGENTRANKNS0ContactAgent *)[AGENTRANKNS0ContactAgent readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"Successfully read root element {}response."); #endif } else { if (xmlTextReaderConstNamespaceUri(reader) == NULL) { [NSException raise: @"XMLReadError" format: @"Unable to read AGENTRANKNS0ContactAgent. Expected element response. Current element: {}%s", xmlTextReaderConstLocalName(reader)]; } else { [NSException raise: @"XMLReadError" format: @"Unable to read AGENTRANKNS0ContactAgent. Expected element response. Current element: {%s}%s\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)]; } } return _contactAgent; } /** * Writes this AGENTRANKNS0ContactAgent to XML under element name "response". * The namespace declarations for the element will be written. * * @param writer The XML writer. * @param _contactAgent The ContactAgent to write. * @return 1 if successful, 0 otherwise. */ - (void) writeXMLElement: (xmlTextWriterPtr) writer { [self writeXMLElement: writer writeNamespaces: YES]; } /** * Writes this AGENTRANKNS0ContactAgent to an XML writer. * * @param writer The writer. * @param writeNs Whether to write the namespaces for this element to the xml writer. */ - (void) writeXMLElement: (xmlTextWriterPtr) writer writeNamespaces: (BOOL) writeNs { int rc = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "response", NULL); if (rc < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start element {}response. XML writer status: %i\n", rc]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing type {}contactAgent for root element {}response..."); #endif [self writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote type {}contactAgent for root element {}response..."); #endif rc = xmlTextWriterEndElement(writer); if (rc < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end element {}response. XML writer status: %i\n", rc]; } } //documentation inherited. - (BOOL) readJAXBAttribute: (xmlTextReaderPtr) reader { void *_child_accessor; if ([super readJAXBAttribute: reader]) { return YES; } return NO; } //documentation inherited. - (BOOL) readJAXBValue: (xmlTextReaderPtr) reader { return [super readJAXBValue: reader]; } //documentation inherited. - (BOOL) readJAXBChildElement: (xmlTextReaderPtr) reader { id __child; void *_child_accessor; int status, depth; if ([super readJAXBChildElement: reader]) { return YES; } if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT && xmlStrcmp(BAD_CAST "status", xmlTextReaderConstLocalName(reader)) == 0 && xmlTextReaderConstNamespaceUri(reader) == NULL) { #if DEBUG_ENUNCIATE > 1 NSLog(@"Attempting to read choice {}status of type {}status."); #endif __child = [AGENTRANKNS0Status readXMLType: reader]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully read choice {}status of type {}status."); #endif [self setStatus: __child]; return YES; } //end "if choice" return NO; } //documentation inherited. - (int) readUnknownJAXBChildElement: (xmlTextReaderPtr) reader { return [super readUnknownJAXBChildElement: reader]; } //documentation inherited. - (void) readUnknownJAXBAttribute: (xmlTextReaderPtr) reader { [super readUnknownJAXBAttribute: reader]; } //documentation inherited. - (void) writeJAXBAttributes: (xmlTextWriterPtr) writer { int status; [super writeJAXBAttributes: writer]; } //documentation inherited. - (void) writeJAXBValue: (xmlTextWriterPtr) writer { [super writeJAXBValue: writer]; } /** * Method for writing the child elements. * * @param writer The writer. */ - (void) writeJAXBChildElements: (xmlTextWriterPtr) writer { int status; id __item; NSEnumerator *__enumerator; [super writeJAXBChildElements: writer]; if ([self status]) { status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "status", NULL); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing start child element {}status."]; } #if DEBUG_ENUNCIATE > 1 NSLog(@"writing element {}status..."); #endif [[self status] writeXMLType: writer]; #if DEBUG_ENUNCIATE > 1 NSLog(@"successfully wrote element {}status..."); #endif status = xmlTextWriterEndElement(writer); if (status < 0) { [NSException raise: @"XMLWriteError" format: @"Error writing end child element {}status."]; } } } @end /* implementation AGENTRANKNS0ContactAgent (JAXB) */ #endif /* DEF_AGENTRANKNS0ContactAgent_M */ #ifndef DEF_AGENTRANKNS0Agents_M #define DEF_AGENTRANKNS0Agents_M /** * User: marc Date: Mar 4, 2008 Time: 6:15:00 AM

THIS SOFTWARE IS COPYRIGHTED. THE SOFTWARE MAY NOT BE COPIED REPRODUCED, TRANSLATED, OR REDUCED TO ANY ELECTRONIC MEDIUM OR MACHINE READABLE FORM WITHOUT THE PRIOR WRITTEN CONSENT OF SOCO TECHNOLOGIES. */ @implementation AGENTRANKNS0Agents /** * agent list */ - (NSArray *) agent { return _agent; } /** * agent list */ - (void) setAgent: (NSArray *) newAgent { [newAgent retain]; [_agent release]; _agent = newAgent; } - (void) dealloc { [self setAgent: nil]; [super dealloc]; } //documentation inherited. + (id) readFromXML: (NSData *) xml { AGENTRANKNS0Agents *_aGENTRANKNS0Agents; xmlTextReaderPtr reader = xmlReaderForMemory([xml bytes], [xml length], NULL, NULL, 0); if (reader == NULL) { [NSException raise: @"XMLReadError" format: @"Error instantiating an XML reader."]; return nil; } _aGENTRANKNS0Agents = (AGENTRANKNS0Agents *) [AGENTRANKNS0Agents readXMLElement: reader]; xmlFreeTextReader(reader); //free the reader return _aGENTRANKNS0Agents; } //documentation inherited. - (NSData *) writeToXML { xmlBufferPtr buf; xmlTextWriterPtr writer; int rc; NSData *data; buf = xmlBufferCreate(); if (buf == NULL) { [NSException raise: @"XMLWriteError" format: @"Error creating an XML buffer."]; return nil; } writer = xmlNewTextWriterMemory(buf, 0); if (writer == NULL) { xmlBufferFree(buf); [NSException raise: @"XMLWriteError" format: @"Error creating an XML writer."]; return nil; } rc = xmlTextWriterStartDocument(writer, NULL, "utf-8", NULL); if (rc < 0) { xmlFreeTextWriter(writer); xmlBufferFree(buf); [NSException raise: @"XMLWriteError" format: @"Error writing XML start document."]; return nil; } NS_DURING { [self writeXMLElement: writer]; } NS_HANDLER { xmlFreeTextWriter(writer); xmlBufferFree(buf); [localException raise]; } NS_ENDHANDLER rc = xmlTextWriterEndDocument(writer); if (rc < 0) { xmlFreeTextWriter(writer); xmlBufferFree(buf); [NSException raise: @"XMLWriteError" format: @"Error writing XML end document."]; return nil; } xmlFreeTextWriter(writer); data = [NSData dataWithBytes: buf->content length: buf->use]; xmlBufferFree(buf); return data; } @end /* implementation AGENTRANKNS0Agents */ /** * Internal, private interface for JAXB reading and writing. */ @interface AGENTRANKNS0Agents (JAXB) @end /*interface AGENTRANKNS0Agents (JAXB)*/ /** * Internal, private implementation for JAXB reading and writing. */ @implementation AGENTRANKNS0Agents (JAXB) /** * Read an instance of AGENTRANKNS0Agents from an XML reader. * * @param reader The reader. * @return An instance of AGENTRANKNS0Agents defined by the XML reader. */ + (id) readXMLType: (xmlTextReaderPtr) reader { AGENTRANKNS0Agents *_aGENTRANKNS0Agents = [[AGENTRANKNS0Agents alloc] init]; NS_DURING { [_aGENTRANKNS0Agents initWithReader: reader]; } NS_HANDLER { _aGENTRANKNS0Agents = nil; [localException raise]; } NS_ENDHANDLER [_aGENTRANKNS0Agents autorelease]; return _aGENTRANKNS0Agents; } /** * Initialize this instance of AGENTRANKNS0Agents according to * the XML being read from the reader. * * @param reader The reader. */ - (id) initWithReader: (xmlTextReaderPtr) reader { return [super initWithReader: reader]; } /** * Write the XML for this instance of AGENTRANKNS0Agents to the writer. * Note that since we're only writing the XML type, * No start/end element will be written. * * @param reader The reader. */ - (void) writeXMLType: (xmlTextWriterPtr) writer { [super writeXMLType:writer]; } /** * Reads a AGENTRANKNS0Agents from an XML reader. The element to be read is * "agents". * * @param reader The XML reader. * @return The AGENTRANKNS0Agents. */ + (id) readXMLElement: (xmlTextReaderPtr) reader { int status; AGENTRANKNS0Agents *_agents = nil; if (xmlTextReaderNodeType(reader) != XML_READER_TYPE_ELEMENT) { status = xmlTextReaderAdvanceToNextStartOrEndElement(reader); if (status < 1) { [NSException rais